Files
abelian-sandpile/lib.h
Aryadev Chavali 026aa887f9 +further multithreading
I split the grid into 4 quadrants which are managed by their own
thread.  Improves speed and uses more resources correctly.
2023-08-26 00:51:17 +01:00

25 lines
386 B
C

#ifndef LIB_H
#define LIB_H
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
typedef struct State
{
// Sandpiles
uint64_t *data;
size_t dwidth;
size_t window_len;
double multiplier;
bool thread_alive;
uint64_t payload;
} state_t;
bool load_from_file(state_t *state, const char *filepath);
bool write_to_file(state_t *state, const char *filepath);
#endif