From 884e30e01ac423612a5be970cc74485e289c49da Mon Sep 17 00:00:00 2001 From: chudov Date: Wed, 17 Nov 2010 05:49:59 +0000 Subject: [PATCH] macros --- CUETools.Codecs.FLACCL/flac.cl | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CUETools.Codecs.FLACCL/flac.cl b/CUETools.Codecs.FLACCL/flac.cl index 43c0056..25e1904 100644 --- a/CUETools.Codecs.FLACCL/flac.cl +++ b/CUETools.Codecs.FLACCL/flac.cl @@ -20,21 +20,27 @@ #ifndef _FLACCL_KERNEL_H_ #define _FLACCL_KERNEL_H_ -#if defined(__Cedar__) || defined(__Redwood__) || defined(__Juniper__) || defined(__Cypress__) || defined(__CPU__) +#if defined(__Cedar__) || defined(__Redwood__) || defined(__Juniper__) || defined(__Cypress__) || defined(__ATI_RV770__) || defined(__ATI_RV730__) || defined(__ATI_RV710__) #define AMD -#ifdef DEBUG +#endif + +#if defined(AMD) && defined(DEBUG) #pragma OPENCL EXTENSION cl_amd_printf : enable #endif + #ifdef __CPU__ #pragma OPENCL EXTENSION cl_amd_fp64 : enable #endif + +#if __OPENCL_VERSION__ == 110 #define iclamp(a,b,c) clamp(a,b,c) #else #define iclamp(a,b,c) max(b,min(a,c)) +#endif + #ifndef M_PI_F #define M_PI_F M_PI #endif -#endif #define WARP_SIZE 32 @@ -77,6 +83,7 @@ typedef struct int coefs[32]; // fixme: should be short? } FLACCLSubframeTask; +#if 0 __kernel void clWindowRectangle(__global float* window, int windowOffset) { window[get_global_id(0)] = 1.0f; @@ -100,6 +107,7 @@ __kernel void clWindowTukey(__global float* window, int windowOffset, float p) int n = select(max(Np, Np2), tid, tid <= Np); window[tid] = 0.5f - 0.5f * cos(M_PI_F * n / Np); } +#endif __kernel void clStereoDecorr( __global int4 *samples,