Type conversion in opencl -


i want convert 'unsigned char' 'uchar16'. @ first, direct convert it, run error.

uchar16* out; unsigned char ciphertext[16]; /* *  */ out[0] = (uchar16)(ciphertext[0], ciphertext[1], ciphertext[2], ciphertext[3],          ciphertext[4], ciphertext[5], ciphertext[6], ciphertext[7],          ciphertext[8], ciphertext[9], ciphertext[10], ciphertext[11],          ciphertext[12], ciphertext[13], ciphertext[14], ciphertext[15]); 

when use real value instead of variable, runs.

out[0] = (uchar16)(0x2b, 0x7e, 0x15, 0x16,      0x28, 0xae, 0xd2, 0xa6,      0xab, 0xf7, 0x15, 0x88,      0x09, 0xcf, 0x4f, 0x3c); 

i searched in google , stackoverflow, , did not find answer.

for vector conversion in opencl there suite of functions:

convert_desttype(sourcetype) 

see point 6.2.3 of standard (v1.2). in case be:

uchar16 out = convert_uchar16(ciphertext); 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -