This file contains 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 <string.h> | |
#include <stdlib.h> | |
#include "DynArray.h" | |
typedef enum { | |
TOKEN_IDENTIFIER, // abc0123 | |
TOKEN_NUMBER, // 1738 | |
TOKEN_STRING, // "Blah" |
This file contains 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
#pragma once | |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define NULL_REG SIZE_MAX | |
typedef size_t Reg; |
This file contains 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
#pragma once | |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
typedef float Vec3 __attribute__((ext_vector_type(3))); | |
#define MAX_KD_NODES 1024 |
This file contains 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 <string.h> | |
#include <stdlib.h> | |
#define STRINGIZE(arg) STRINGIZE1(arg) | |
#define STRINGIZE1(arg) STRINGIZE2(arg) | |
#define STRINGIZE2(arg) #arg | |
#define CONCATENATE(arg1, arg2) CONCATENATE1(arg1, arg2) | |
#define CONCATENATE1(arg1, arg2) CONCATENATE2(arg1, arg2) |
This file contains 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
// The Computer Language Benchmarks Game | |
// https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ | |
// | |
// Contributed by Mark C. Lewis. | |
// Modified slightly by Chad Whipkey. | |
// Converted from Java to C++ and added SSE support by Branimir Maksimovic. | |
// Converted from C++ to C by Alexey Medvedchikov. | |
// Modified by Jeremy Zerfas. | |
// Modified by Yasser Arguelles |
This file contains 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 <string.h> | |
#include <stdint.h> | |
enum { | |
FS_MAGIC_NUMBER = 0x666f6f64, | |
FS_LATEST_VERSION = 1, | |
}; |
This file contains 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
typedef struct ParticleSet { | |
size_t count; | |
// note that each of these arrays have to be aligned to the vector | |
// width we'll be working with, since it always updates in multiples | |
// of the vector width. | |
float* x; | |
float* y; | |
float* z; | |
float* vx; |
This file contains 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 <x86intrin.h> | |
typedef struct TriangleX4 { | |
__m128 ax, ay, az; | |
__m128 bx, by, bz; | |
__m128 cx, cy, cz; | |
} TriangleX4; | |
typedef struct TriangleNormalX4 { | |
__m128 nx, ny, nz; |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#include <x86intrin.h> | |
enum { | |
TOKEN_ACCESSOR = '.', | |
This file contains 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 <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <x86intrin.h> | |
const char keywords[][16] = { | |
"alignof", | |
"auto", | |
"break", |
OlderNewer