/// This class is a wrapper class that exist merely because the /// parameters in the DMagneticFieldMapParameterized are in the /// "protected" section and therefore cannot be accessed from /// outside of the class. /// /// Since it is here though, when the object is constructed, it /// automatically makes a copy of the parameters in the C-style /// data structures and copies them into the GPU memory space. #include using namespace jana; #include "GPU_MagneticField.h" class DMagneticFieldMapParameterizedGPU:public DMagneticFieldMapParameterized{ public: DMagneticFieldMapParameterizedGPU(JCalibration *jcalib):DMagneticFieldMapParameterized(jcalib) { // Create a BfieldSectionList on the host machine that // contains the constants in bfield. host_BfieldSectionList.Nx = sections_Bx.size(); host_BfieldSectionList.Nz = sections_Bz.size(); for(unsigned int i=0; isection = s.section; s_c->zmax = s.zmax; s_c->zmin = s.zmin; s_c->zmid = s.zmid; s_c->znorm = s.znorm; s_c->rmid = s.rmid; s_c->rnorm = s.rnorm; s_c->order1 = s.order1; s_c->order2 = s.order2; for(unsigned int j=0; jpp[j][k] = s.pp[j][k]; } } for(unsigned int j=0; jcc[j][k] = s.cc[j][k]; } } } // Copy BfieldSectionList to GPU cout<<"Copying parameterized B-field map to GPU ..."<