Tuesday, 15 April 2014

c - Forced-alignment in CUDA? -


Is there a way to create a 2D array [[] [], where every [i] is forced by itself Does the CUDA align with some other data type?

I have to do something like this:

  __Shared signed letters [20] [8]; // where one [i] is connected to an 8-byte limit; Double t = * (double *) (one [2]);   

Or anything like this:

  __ shared_tyled character is a [20] [9]; // where [i] the 8-byte limit; Double t = * (double *) (one [2]);    

How about using a union?

  union My_union_type {four A [8]; Double T; }; My_union_type var [20]; Char a = var.a [2] [3]; Double t = var.t [2];   

This is not equal to your second example (because talents have told) Your example is invalid and will generate invalid code, whereas my code will include the correct alignment of 7 bytes each element but I think it's the closest to what it is asking for you.

No comments:

Post a Comment