Hi all,
I am kind of curious about the 24 bit integer and 24 bit integer operations. On the OpenCL spec doc talk about 24 bit integer but I don't see any datatype keyword for it. Can someone delight me about this stuff?
Additionally, what happens to the CHAR(8bit) and SHORT(16bit) operations? Are they natively supported or they will be executed as a 32 bit operations? or as 24 bit operations?
Thank you,
Roto
Originally posted by: MicahVillmow currently 8/16 bit operations utilize the 32bit operations at the hardware level. Also the only 24bit ops are in the math library.
Thank you Micah. Can you tell me the way to declare 24 bit integer(i.e. keyword)?
Originally posted by: MicahVillmow There are no 24bit integers, there are only functions that do 24bit operations. see MUL24 and MAD24
So I still have to declare my variables as 32bit integers, e.x: int x,y and then the operation mul24(x,y) will take only 24 least significant bits of x and y and feed to the 24-bit multiplier?
If my above assumption is right and also assume that my graphic card natively support 24 bit MUL24(x,y) which is faster than the regular 32 bit multiplication operation (x*y). Then should I use MULT24(x,y) for the 8/16 bit variables for faster performance?
Thank you,
Roto
Does 8/16 bit variables also take 32 bits at memory level? I.e. does a char take 4 bytes of memory?
What about char[4]? Or char4?
one char/short will IMHO take whole 32bit GPR. but in RAM it will take only one/two bytes.
thanks.