#include #include #include "D3Vector.h" #ifndef __WIRELOC_CU__ #define __WIRELOC_CU__ struct Wire //Storage will be (Xo, Yo, Zo, X, Y, Z, magnitude) { float x,y,z,i,j,k,L; int id; D3Vector sdir, tdir, udir, origin; //void *ptr; }; __device__ __constant__ Wire *a_dd; //Wire definition array void printWire(Wire *tempH); // Kernel that executes on the CUDA device __global__ void returnWire(Wire *a, int y) { *a = a_dd[y]; //a->ptr = (void*)a_dd; } void printWire(Wire *tempH) { printf("%d\n", tempH->id); printf("%f\n", tempH->x); printf("%f\n", tempH->y); printf("%f\n", tempH->z); printf("%f\n", tempH->i); printf("%f\n", tempH->j); printf("%f\n", tempH->k); printf("%f\n\n", tempH->L); //printf("0x%x\n", tempH->ptr); } #endif //__WIRELOC_CU__