About operators for u32x and u8x
#1
Brick 
Hi y'all

I have successfully implemented a FNV1 module but only for the attack mode 0 (dictionary).
I'm trying to write the same module for other attack modes (I'm working on -a 3 right now).

I noticed that the types u32 are turned into u32x and u8 into u8x. But when I'm trying to do something like u32x ^= u8x it fails saying "error: implicit conversions between vector types ('u32x' (aka 'uint8') and 'u8x' (aka 'uchar8')) are not permitted".

I have taken a look at the OpenCL/inc_types.h where the operations for types are defined (around line 120ish for vector size = 2 for example) and indeed there is no operator definition for XORing a u32x and a u8x.

My questions are the following : should I be looking into trying to cast my u8x into a u32x and then do the XOR ? or define the ^= operator for u32x ^= u8x ? or am I a fool and should not use u8x anyway even though FNV1 is working with bytes?

Thank you in advance.

ps : I love the post icon feature on this forum
Reply


Messages In This Thread
About operators for u32x and u8x - by tachsah - 03-04-2020, 04:29 PM
RE: About operators for u32x and u8x - by atom - 03-04-2020, 04:35 PM