1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-11 07:17:58 +00:00

Set cl_amd_media_ops with the BITALIGN flag and allow non-bitselect devices to build.

This commit is contained in:
ckolivas 2012-02-10 10:47:39 +11:00 committed by Con Kolivas
parent e6cf96adfa
commit 604b2f7645

View File

@ -13,19 +13,24 @@
typedef uint u; typedef uint u;
#endif #endif
#ifdef BFI_INT #ifdef BITALIGN
#pragma OPENCL EXTENSION cl_amd_media_ops : enable #pragma OPENCL EXTENSION cl_amd_media_ops : enable
#define Ch(x, y, z) amd_bytealign(x, y, z) #ifdef BFI_INT
#define Ma(x, y, z) amd_bytealign(z ^ x, y, x) #define Ch(x, y, z) amd_bytealign(x, y, z)
#else #define Ma(x, y, z) amd_bytealign(z ^ x, y, x)
#define Ch(x, y, z) bitselect(z, y, x)
#if defined(VECTORS2) || defined(VECTORS4) || defined(VECTORS8)
// GCN - VEC2 or VEC4
#define Ma(z, x, y) bitselect(z, y, z ^ x)
#else #else
// GCN - no VEC #define Ch(x, y, z) bitselect(z, y, x)
#define Ma(z, x, y) Ch(z ^ x, y, x) #if defined(VECTORS2) || defined(VECTORS4) || defined(VECTORS8)
// GCN - VEC2 or VEC4
#define Ma(z, x, y) bitselect(z, y, z ^ x)
#else
// GCN - no VEC
#define Ma(z, x, y) Ch(z ^ x, y, x)
#endif
#endif #endif
#else //BITALIGN
#define Ch(x, y, z) (z ^ (x & (y ^ z)))
#define Ma(x, y, z) ((x & z) | (y & (x | z)))
#endif #endif
#ifdef GOFFSET #ifdef GOFFSET