AnsweredAssumed Answered

alignment of vector types

Question asked by firespot on Aug 9, 2014
Latest reply on Aug 13, 2014 by jammyamerica



Consider an array of ints to be read using vector types:


__kernel void someKernel(__global int const * values)


int8 A = *((__global int8 const *) (values)); // no issues I suppose

int8 B = *((__global int8 const *) (values+ 1)); // alignment catch?



I guess the first access is always ok. Is the second also always ok, or can one be hit by alignment issues, e.g. if an int8 vector type is always assumed to be properly aligned on a 4*8 = 32 bytes boundary at access?