#include using namespace std; #ifndef _GPU_MAGNETICFIELD_H_ #define _GPU_MAGNETICFIELD_H_ #include #define MAX_PARAMS 10 #define MAX_SECTIONS 20 typedef struct{ int section; double zmax; double zmin; double zmid; double znorm; double rmid; double rnorm; unsigned int order1; unsigned int order2; double pp[MAX_PARAMS][MAX_PARAMS]; // parameters from calibDB double cc[MAX_PARAMS][MAX_PARAMS]; // parameters matrix transformed by Chebyshev polys }BfieldSection; typedef struct{ unsigned int Nx; // number of Bx sections unsigned int Nz; // number of Bz sections BfieldSection* sections_Bx[MAX_SECTIONS]; BfieldSection* sections_Bz[MAX_SECTIONS]; }BfieldSectionList; // Routines run on host and called from host BfieldSectionList* MakeGPUResidentBfieldSectionList(BfieldSectionList *host_BfieldSectionList); BfieldSection* MakeGPUResidentBfieldSection(BfieldSection *host_BfieldSection); // Routines run on GPU device and called from host // Routines run on GPU device and called from GPU device int BfieldSectionIsInRange(BfieldSection *bfs, double z); #endif //_GPU_MAGNETICFIELD_H_