Skip to content

Instantly share code, notes, and snippets.

View RealNeGate's full-sized avatar

Yasser Arguelles Snape RealNeGate

  • Washington, USA
View GitHub Profile
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "DynArray.h"
typedef enum {
TOKEN_IDENTIFIER, // abc0123
TOKEN_NUMBER, // 1738
TOKEN_STRING, // "Blah"
#pragma once
#include <stdio.h>
#include <assert.h>
#include <stdint.h>
#include <stdlib.h>
#define NULL_REG SIZE_MAX
typedef size_t Reg;
#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
#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)
// 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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
enum {
FS_MAGIC_NUMBER = 0x666f6f64,
FS_LATEST_VERSION = 1,
};
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;
#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;
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <x86intrin.h>
enum {
TOKEN_ACCESSOR = '.',
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <x86intrin.h>
const char keywords[][16] = {
"alignof",
"auto",
"break",