00001 00012 #ifndef __PARFUM_TOPS_CUDA___H 00013 #define __PARFUM_TOPS_CUDA___H 00014 00015 #include "ParFUM_TOPS_Types.h" 00016 00017 00018 #ifdef CUDA 00019 00023 typedef struct { 00024 unsigned node_attr_size; 00025 unsigned elem_attr_size; 00026 unsigned model_attr_size; 00027 00028 unsigned num_local_elem; 00029 unsigned num_local_node; 00030 00032 void *mAttDevice; 00033 void *ElemDataDevice; 00034 void *NodeDataDevice; 00035 int *ElemConnDevice; 00036 int *n2eConnDevice; 00037 } TopModelDevice; 00038 00039 00040 #define topElement_D_GetAttrib(m, e) (((char*)(m)->ElemDataDevice) + (e)*(m)->elem_attr_size) 00041 00042 #define topNode_D_GetAttrib(m, n) (((char*)(m)->NodeDataDevice) + (n)*(m)->node_attr_size) 00043 00044 #define topElement_D_GetNode(m, e, idx) (((m)->ElemConnDevice)[e*4 + idx]) 00045 00046 #endif 00047 #endif