23 real** offload_array,
char* qid);
25 real** offload_array,
char* qid);
43 real** offload_array,
int** int_offload_array,
84 real** offload_array,
char* qid) {
86 #define WPATH "/wall/wall_2D_XXXXXXXXXX/"
92 f, qid, __FILE__, __LINE__) ) {
return 1;}
94 offload_data->
n = nelements;
96 *offload_array = (
real*) malloc(2 * offload_data->
n *
sizeof(
real));
100 f, qid, __FILE__, __LINE__) ) {
return 1;}
102 f, qid, __FILE__, __LINE__) ) {
return 1;}
118 real** offload_array,
char* qid) {
120 #define WPATH "/wall/wall_3D_XXXXXXXXXX/"
127 f, qid, __FILE__, __LINE__) ) {
return 1;}
128 offload_data->
n = nelements;
131 real* x1x2x3 = (
real*)malloc(3 * nelements *
sizeof(
real));
132 real* y1y2y3 = (
real*)malloc(3 * nelements *
sizeof(
real));
133 real* z1z2z3 = (
real*)malloc(3 * nelements *
sizeof(
real));
136 f, qid, __FILE__, __LINE__) ) {
return 1;}
138 f, qid, __FILE__, __LINE__) ) {
return 1;}
140 f, qid, __FILE__, __LINE__) ) {
return 1;}
145 *offload_array = (
real*)malloc(9 * nelements *
sizeof(
real));
147 for(
int i = 0; i < nelements; i++) {
148 for(
int j = 0; j < 3; j++) {
149 (*offload_array)[i*9 + j*3 + 0] = x1x2x3[3*i+j];
150 (*offload_array)[i*9 + j*3 + 1] = y1y2y3[3*i+j];
151 (*offload_array)[i*9 + j*3 + 2] = z1z2z3[3*i+j];
herr_t hdf5_find_group(hid_t loc, const char *path)
Checks if given group exists within given hdf5 file. Negative value is returned if the group doesn't ...
int hdf5_read_double(const char *var, real *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read double-valued data from ASCOT5 HDF5 file.
char * hdf5_gen_path(const char *original, char *qid, char *path)
Generate a valid path from a given template and qid.
int hdf5_read_int(const char *var, int *ptr, hid_t file, char *qid, const char *errfile, int errline)
Read int-valued data from ASCOT5 HDF5 file.
Header file for hdf5_helpers.h.
int hdf5_wall_init_offload(hid_t f, wall_offload_data *offload_data, real **offload_array, int **int_offload_array, char *qid)
Read wall data from HDF5 file.
int hdf5_wall_read_3D(hid_t f, wall_3d_offload_data *offload_data, real **offload_array, char *qid)
Read 3D wall data from HDF5 file.
int hdf5_wall_read_2D(hid_t f, wall_2d_offload_data *offload_data, real **offload_array, char *qid)
Read 2D wall data from HDF5 file.
Header file for hdf5_wall.c.
int wall_init_offload(wall_offload_data *offload_data, real **offload_array, int **int_offload_array)
Load wall data and prepare parameters.
Header file for wall_2d.c.
Header file for wall_3d.c.