11-30-2021, 01:32 PM
- Can someone tell me how to write the following function(in inc_common.cl)
- DECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)
- with C language
- DECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)
- {
- u32 r = 0;
- asm volatile ("V_PERM_B32 %0, %1, %2, %3;" : "=v"(r) : "v"(b), "v"(a), "v"(c));
- return r;
- }
- DECLSPEC u32 hc_byte_perm_S (const u32 a, const u32 b, const int c)
- {
- u32 r = 0;
- asm volatile ("prmt.b32 %0, %1, %2, %3;" : "=r"(r) : "r"(a), "r"(b), "r"(c));
- return r;
- }
- I not familiar with GPU asm