Linked Questions
14 questions linked to/from Copying a struct containing pointers to CUDA device
0 votes
3 answers
7k views
Passing a struct pointer to a CUDA kernel [duplicate]
Possible Duplicate: Copying a struct containing pointers to CUDA device I have a structure of device pointers, pointing to arrays allocated on the device. like this struct mystruct{ int* dev1; ...
8 votes
1 answer
4k views
How to perform deep copying of struct with CUDA? [duplicate]
Programming with CUDA I am facing a problem trying to copy some data from host to gpu. I have 3 nested struct like these: typedef struct { char data[128]; short length; } Cell; typedef ...
3 votes
1 answer
840 views
Simple operation on Structure in CUDA : Segmentation fault [duplicate]
This is the first time I am implementing structures in CUDA. In the following program I am copying a structure to the GPU and performing a basic operation on the data, and copying back the result to ...
-2 votes
1 answer
611 views
How do I copy a single struct into __global__ memory? [duplicate]
I want to copy a set of initaliation values that every thread uses into __global__ memory. I have summarized them into a single struct. However, there are multiple problems with getting it into ...
0 votes
0 answers
63 views
Write access violation allocating memory for nested data structure on GPU using CUDA C/C++ [duplicate]
I have the following data structure: typedef struct { float var1; signed short var2; float var3[4]; float var4[3]; float var5[3]; float var6; } B; typedef struct { signed ...
2 votes
0 answers
52 views
CUDA: copy of a struct containing a double pointer [duplicate]
I have a struct which contains a double-pointer like this: struct image { int width, height; uchar** imageData; } and then Image* h_imageList = (Image*)malloc(20 * sizeof(Image)); //fill ...
0 votes
0 answers
30 views
CUDA - class member dynamic changing in __device__ function [duplicate]
I have tried to use a polynomial class in CUDA. The class definition is as follow: template<int Degree> class Polynomial{ public: float coefficients[Degree+1]; }; template<int ...
62 votes
3 answers
51k views
Structure of Arrays vs Array of Structures
From some comments that I have read in here, it is preferable to have Structure of Arrays (SoA) over Array of Structures (AoS) for parallel implementations like CUDA. If that is true, can anyone ...
1 vote
2 answers
1k views
kernel using AoS is faster than using SoA
I have two versions of a kernel that performs the same task -fill a linked cell list-, the difference between both kernels is the datatype to store particle position, the first one using a float array ...
1 vote
2 answers
2k views
Array of structs of arrays CUDA C
I'm fairly new to CUDA and i've been looking around to create and array of structs of arrays and i found a couple solutions , but none gives me a clear idea . here Harrism explained a pass by value ...
3 votes
1 answer
1k views
How to embed CUDA Texture Objects in structs?
We've successfully used the following post to help create structs that contain basic types like int *. Textures provide a nice performance boost for read-only arrays. We use many of them, which ...
2 votes
1 answer
1k views
How to create globally-accessible variable on cuda?
This is a pretty complicated question, and I'm not a native English speaker, so I'll thanks if you are patient enough to read my question. As Cuda is actually operating on two computers, it is ...
0 votes
1 answer
201 views
Parallelize code that uses struct having pointer to pointer type elements using CUDA
If I have a code which takes struct variable as input and manipulate it's elements, how can I parallelize this using CUDA? void BackpropagateLayer(NET* Net, LAYER* Upper, LAYER* Lower) { INT i,j;...