Linked the defines used by the DSL and astaroth.h. Now f.ex. LENTROPY has to be set only once in acc/mhd_solver/stencil_defines.h and it is propagated throughout the whole project. The name for stencil_defines.h is not final and may change if I come up with a better name. In any case, there is now a standard header associated with each DSL solver where the user can set defines, and declare arrays (VTXBUF_LNRHO) and device constants (uniforms).
This commit is contained in:
@@ -21,4 +21,4 @@ else
|
||||
exit
|
||||
fi
|
||||
|
||||
${ACC_DIR}/preprocess.sh $1 | ${ACC_DIR}/build/acc ${COMPILE_FLAGS} > ${CUH_FILENAME}
|
||||
${ACC_DIR}/preprocess.sh $2 $1 | ${ACC_DIR}/build/acc ${COMPILE_FLAGS} > ${CUH_FILENAME}
|
||||
|
9
acc/mhd_solver/stencil_defines.h
Normal file
9
acc/mhd_solver/stencil_defines.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#define STENCIL_ORDER (6)
|
||||
#define NGHOST (STENCIL_ORDER / 2)
|
||||
#define LDENSITY (1)
|
||||
#define LHYDRO (1)
|
||||
#define LMAGNETIC (0)
|
||||
#define LENTROPY (0)
|
||||
#define LTEMPERATURE (0)
|
||||
#define LFORCING (0)
|
||||
#define LUPWD (0)
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
# Preprocesses the give file using GCC. This script is usually automatically called in
|
||||
# ./compile.sh, but may be called also individually for debugging purposes.
|
||||
gcc -E -x c ${@} | sed "s/#.*//g"
|
||||
cat ${@} | gcc -x c -E - | sed "s/#.*//g"
|
||||
|
Reference in New Issue
Block a user