8 #ifndef SCAMAC_INTERNAL_H 9 #define SCAMAC_INTERNAL_H 27 typedef ScamacErrorCode (*scamac_gen_work_alloc_ft)(
const void * par,
const void * tab,
void ** ws);
28 typedef ScamacErrorCode (*scamac_gen_work_free_ft)(
void * ws);
29 typedef ScamacErrorCode (*scamac_gen_tables_create_ft)(
const void * par,
void ** tables, scamac_info_st * info);
30 typedef ScamacErrorCode (*scamac_gen_tables_destroy_ft)(
void * tables);
31 typedef ScamacErrorCode (*scamac_gen_row_ft)(
const void * par,
const void * table,
void * ws, ScamacIdx irow, ScamacFlag flag,
void *row);
32 typedef ScamacErrorCode (*scamac_gen_check_ft)(
const void * par,
char ** desc);
34 typedef ScamacErrorCode (*scamac_gen_unwrap_ft)(
const void * wrapped_par,
void *par);
36 typedef ScamacErrorCode (*scamac_gen_coord_ft)(
const void * par,
const void * table,
void * ws, ScamacIdx idx,
double * x,
double * y,
double * z,
int * ilayer, ScamacIdx * iblock);
38 struct scamac_generator_st {
39 char name[SCAMAC_NAME_LENGTH];
43 scamac_gen_work_alloc_ft fct_work_alloc;
44 scamac_gen_work_free_ft fct_work_free;
45 scamac_gen_tables_create_ft fct_tables_create;
46 scamac_gen_tables_destroy_ft fct_tables_destroy;
47 scamac_gen_row_ft fct_gen_row;
48 scamac_gen_check_ft fct_check;
51 bool needs_unwrapping;
53 scamac_gen_unwrap_ft fct_unwrap_par;
54 scamac_gen_check_ft fct_check_wrapped;
57 scamac_gen_coord_ft fct_coord;
60 bool needs_finalization;
66 struct scamac_workspace_st {
67 scamac_sparserow_real_st * row_real;
68 scamac_sparserow_cplx_st * row_cplx;
69 scamac_gen_work_free_ft fct_work_free;
74 #define SCAMAC_DESC_ERR(cond,conddesc) \ 78 if (desc) {scamac_string_append(&str,conddesc"\n");} \ 81 #define SCAMAC_DESC_WARN(cond,conddesc) \ 84 err=SCAMAC_EWARNING; \ 85 if (desc) {scamac_string_append(&str,"[WARNING] "conddesc"\n");} \
ScaMaC index/integer types.
ScaMaC data structure and macro definitions.