This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/* http://stackoverflow.com/q/12790337/274261 */ | |
/* Generates random DAGs. The key is to 'rank' the nodes, and | |
only draw edges from lower ranked nodes to higher ranked ones. */ | |
/* Nodes/Rank: How 'fat' the DAG should be. */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Compiling with `gcc -fopenmp -m32 -O2 -S' produces: | |
movl $1, %eax | |
lock xaddl %eax, j | |
movl %eax, i | |
ret | |
*/ | |
int i, j; | |
void foo (void) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <X11/Xlib.h> | |
/* The window which contains the text. */ | |
struct | |
{ | |
int width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#define HASH_BITS 10 | |
#define BUCKETS (1 << HASH_BITS) | |
/* A half-avalanche 4 byte integer hash function, as described at: | |
http://burtleburtle.net/bob/hash/integer.html */ |
NewerOlder