Astaroth  3.1
Scalable Multi-GPU Stencil Computations
Loading...
Searching...
No Matches
particle_sets.h
Go to the documentation of this file.
1#pragma once
2//Particle sets of the DSL, see particle_sets.c
3#include <stdbool.h>
4#include <stddef.h>
5
6#define MAX_PARTICLE_SETS (16)
7#define MAX_PARTICLE_MEMBERS (128)
8#define MAX_PARTICLE_STR (256)
9
10typedef struct {
13 char dims[MAX_PARTICLE_STR]; //leading dimensions including the brackets, e.g. "[6]", or ""
14 int rank; //number of leading dimensions
15 bool evolved; //has the RK accumulator AC_d<set>_<name>
16 bool output; //read by the host: kept allocated even if no kernel reads it
17 bool packonly; //in the migration records but not moved or unpacked
19
20typedef struct {
23 char migrated_via[MAX_PARTICLE_STR]; //set holding the migration buffers buf, idx, idx2, or "" if not migrated
27
29extern size_t num_particle_sets;
30
31//Lowers the particle sets in the preprocessed DSL source filename (declarations, kernels over sets,
32//set.member accesses) to plain DSL and writes the host header user_particle_sets.h
33void lower_particle_sets(const char* filename);
void lower_particle_sets(const char *filename)
ParticleSet particle_sets[(16)]
#define MAX_PARTICLE_STR
Definition particle_sets.h:8
#define MAX_PARTICLE_SETS
Definition particle_sets.h:6
size_t num_particle_sets
#define MAX_PARTICLE_MEMBERS
Definition particle_sets.h:7
Definition particle_sets.h:10
bool output
Definition particle_sets.h:16
bool packonly
Definition particle_sets.h:17
char name[(256)]
Definition particle_sets.h:11
char type[(256)]
Definition particle_sets.h:12
bool evolved
Definition particle_sets.h:15
char dims[(256)]
Definition particle_sets.h:13
int rank
Definition particle_sets.h:14
Definition particle_sets.h:20
char migrated_via[(256)]
Definition particle_sets.h:23
size_t num_members
Definition particle_sets.h:25
char capacity[(256)]
Definition particle_sets.h:22
ParticleMember members[(128)]
Definition particle_sets.h:24
char name[(256)]
Definition particle_sets.h:21