diff options
| author | steven-na <noreply.github@stvnc.dev> | 2026-08-06 02:36:01 -0700 |
|---|---|---|
| committer | steven-na <noreply.github@stvnc.dev> | 2026-08-06 02:36:01 -0700 |
| commit | 5d575f8cd99e9bc064b3d998f17b194a818e3546 (patch) | |
| tree | 8a8e1485dda924aeefb5428e26dbcca74f74721e /src/vec2sw.h | |
| parent | d07b96b9914e706630dc1d2807ecfa9e104945d5 (diff) | |
Sliding window array implementation
Diffstat (limited to 'src/vec2sw.h')
| -rw-r--r-- | src/vec2sw.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vec2sw.h b/src/vec2sw.h new file mode 100644 index 0000000..cbf8e6d --- /dev/null +++ b/src/vec2sw.h @@ -0,0 +1,16 @@ +#pragma once + +#include "common.h" +#include "smrt_arena.h" +#include "vec2.h" +#include "slidingwindow.h" + +typedef struct { + sliding_window_array_t *xs; + sliding_window_array_t *ys; + u64 size; +} vec2d_sw_soa_t; + +vec2d_sw_soa_t vec2d_sw_soa(smrt_arena_t *arena, u64 size); + void vec2d_sw_soa_insert(vec2d_sw_soa_t sw_vs, vec2d_t v); + vec2d_soa_t vec2d_sw_soa_get(vec2d_sw_soa_t sw_vs); |