Open-Cl:How to pass a list of objects (each object is of 256 bytes) to the kernel

Hi all,

I want to perform some computational tasks on list of some user-defined Geometry objects(containing coordinates,geometry type etc…)and each object is of 256 bytes.I am wondering How can I pass the list of these objects to the OpenCL kernel as I read somewhere even with OpenCL vector types we can only create a list of 16 byte objects.

Thanks in advance :)

Where did you read this?

I do not think this is true, you could simply create a struct that is much bigger and use it to pass the data:

struct Geometry


  uint numTriangles;

  float4 vertices[3 * 100];


__kernel void doSomething(__global struct Geometry *triangles)


  if(triangles[0].numtriangles > 0)