<#part sign=pgpmime> On Tue, 6 Mar 2012 17:24:39 +0100, Sqoox85 <sqoo...@gmail.com> wrote: > Hi Andreas, > > So, is it possible to define static member data inside a struct in CUDA? > For example: > ------------------------------------------------------------------------------------------- > typedef struct _cuobject{ > static cuType* type; > > __host__ __device__ _cuobject(){ > //type = NULL; > if(type == NULL){ > > cuType cuobjecttype = { > cuObject_compare, > }; > type = &cuobjecttype; > } > } > } cuObject; > ------------------------------------------------------------------------------------------- > > If so, I could declare statically a cuobjecttype directly inside the struct > without thinking about allocate it in pycuda code, but > It give me an error. It say that in "if(type==NULL)" type is not > defined.
Can you copy and paste a) a full code snippet and b) the complete error message? Andreas _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda