NUM_INT_PARAM_TYPES is now NUM_INT_PARAMS etc, replaced these throughout the project
This commit is contained in:
@@ -273,20 +273,20 @@ typedef enum {
|
||||
*/
|
||||
typedef enum {
|
||||
AC_FOR_INT_PARAM_TYPES(AC_GEN_ID),
|
||||
NUM_INT_PARAM_TYPES
|
||||
NUM_INT_PARAMS
|
||||
} AcIntParam;
|
||||
|
||||
typedef enum {
|
||||
AC_FOR_REAL_PARAM_TYPES(AC_GEN_ID),
|
||||
NUM_REAL_PARAM_TYPES
|
||||
NUM_REAL_PARAMS
|
||||
} AcRealParam;
|
||||
|
||||
extern const char* intparam_names[]; // Defined in astaroth.cu
|
||||
extern const char* realparam_names[]; // Defined in astaroth.cu
|
||||
|
||||
typedef struct {
|
||||
int int_params[NUM_INT_PARAM_TYPES];
|
||||
AcReal real_params[NUM_REAL_PARAM_TYPES];
|
||||
int int_params[NUM_INT_PARAMS];
|
||||
AcReal real_params[NUM_REAL_PARAMS];
|
||||
} AcMeshInfo;
|
||||
|
||||
/*
|
||||
|
@@ -37,9 +37,9 @@
|
||||
static inline void
|
||||
print(const AcMeshInfo& config)
|
||||
{
|
||||
for (int i = 0; i < NUM_INT_PARAM_TYPES; ++i)
|
||||
for (int i = 0; i < NUM_INT_PARAMS; ++i)
|
||||
printf("[%s]: %d\n", intparam_names[i], config.int_params[i]);
|
||||
for (int i = 0; i < NUM_REAL_PARAM_TYPES; ++i)
|
||||
for (int i = 0; i < NUM_REAL_PARAMS; ++i)
|
||||
printf("[%s]: %g\n", realparam_names[i], double(config.real_params[i]));
|
||||
}
|
||||
|
||||
@@ -77,9 +77,9 @@ parse_config(const char* path, AcMeshInfo* config)
|
||||
continue;
|
||||
|
||||
int idx = -1;
|
||||
if ((idx = find_str(keyword, intparam_names, NUM_INT_PARAM_TYPES)) >= 0)
|
||||
if ((idx = find_str(keyword, intparam_names, NUM_INT_PARAMS)) >= 0)
|
||||
config->int_params[idx] = atoi(value);
|
||||
else if ((idx = find_str(keyword, realparam_names, NUM_REAL_PARAM_TYPES)) >= 0)
|
||||
else if ((idx = find_str(keyword, realparam_names, NUM_REAL_PARAMS)) >= 0)
|
||||
config->real_params[idx] = AcReal(atof(value));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user