Default values for struct, float, float3 & float4

Discussion created by spectral on Sep 29, 2010
Latest reply on Oct 1, 2010 by MicahVillmow


I would like to know if in a OpenCL kernel I must initialize my structures values, float, float3 & float4 values ?

By example,

struct Color { float r; float g; float b; };

Color col;

col.r = col.g. = col.b = 0.f;

Or there is some better ways to perform this ?