X-Git-Url: https://www.flypig.org.uk/git/?a=blobdiff_plain;f=OpenCL%2Ftypes_ocl.c;h=98ed8b99248508c6ad0f2a9d8c528c5f62e89ae2;hb=7cbce12ea706baef43eede0e84f50975f6957ab3;hp=dfd3fd61077af78cb17db9199e899343b9107a5a;hpb=082b1504b186caa2763681fa5520986c80d32bbf;p=hashcat.git diff --git a/OpenCL/types_ocl.c b/OpenCL/types_ocl.c index dfd3fd6..98ed8b9 100644 --- a/OpenCL/types_ocl.c +++ b/OpenCL/types_ocl.c @@ -196,10 +196,6 @@ static inline u32 rotl32_S (const u32 a, const u32 n) static inline u64 rotr64_S (const u64 a, const u32 n) { - #if (DEVICE_TYPE == DEVICE_TYPE_GPU) - - #ifdef cl_amd_media_ops - const u32 a0 = h32_from_64_S (a); const u32 a1 = l32_from_64_S (a); @@ -208,18 +204,6 @@ static inline u64 rotr64_S (const u64 a, const u32 n) const u64 r = hl32_to_64_S (t0, t1); - #else - - const u64 r = rotate (a, (u64) 64 - n); - - #endif - - #else - - const u64 r = rotate (a, (u64) 64 - n); - - #endif - return r; } @@ -260,10 +244,6 @@ static inline u32x rotl32 (const u32x a, const u32 n) static inline u64x rotr64 (const u64x a, const u32 n) { - #if (DEVICE_TYPE == DEVICE_TYPE_GPU) - - #ifdef cl_amd_media_ops - const u32x a0 = h32_from_64 (a); const u32x a1 = l32_from_64 (a); @@ -272,18 +252,6 @@ static inline u64x rotr64 (const u64x a, const u32 n) const u64x r = hl32_to_64 (t0, t1); - #else - - const u64x r = rotate (a, (u64) 64 - n); - - #endif - - #else - - const u64x r = rotate (a, (u64) 64 - n); - - #endif - return r; } @@ -294,34 +262,12 @@ static inline u64x rotl64 (const u64x a, const u32 n) static inline u32 __bfe (const u32 a, const u32 b, const u32 c) { - #ifdef cl_amd_media_ops2 - return amd_bfe (a, b, c); - - #else - - #define BIT(x) (1 << (x)) - #define BIT_MASK(x) (BIT (x) - 1) - #define BFE(x,y,z) (((x) >> (y)) & BIT_MASK (z)) - - return BFE (a, b, c); - - #endif } static inline u32 amd_bytealign_S (const u32 a, const u32 b, const u32 c) { - #ifdef cl_amd_media_ops - return amd_bytealign (a, b, c); - - #else - - const u64 tmp = ((((u64) a) << 32) | ((u64) b)) >> ((c & 3) * 8); - - return (u32) (tmp); - - #endif } #endif