This commit is contained in:
chudov
2010-11-17 05:49:59 +00:00
parent 987d48a2bd
commit 884e30e01a

View File

@@ -20,21 +20,27 @@
#ifndef _FLACCL_KERNEL_H_ #ifndef _FLACCL_KERNEL_H_
#define _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 #define AMD
#ifdef DEBUG #endif
#if defined(AMD) && defined(DEBUG)
#pragma OPENCL EXTENSION cl_amd_printf : enable #pragma OPENCL EXTENSION cl_amd_printf : enable
#endif #endif
#ifdef __CPU__ #ifdef __CPU__
#pragma OPENCL EXTENSION cl_amd_fp64 : enable #pragma OPENCL EXTENSION cl_amd_fp64 : enable
#endif #endif
#if __OPENCL_VERSION__ == 110
#define iclamp(a,b,c) clamp(a,b,c) #define iclamp(a,b,c) clamp(a,b,c)
#else #else
#define iclamp(a,b,c) max(b,min(a,c)) #define iclamp(a,b,c) max(b,min(a,c))
#endif
#ifndef M_PI_F #ifndef M_PI_F
#define M_PI_F M_PI #define M_PI_F M_PI
#endif #endif
#endif
#define WARP_SIZE 32 #define WARP_SIZE 32
@@ -77,6 +83,7 @@ typedef struct
int coefs[32]; // fixme: should be short? int coefs[32]; // fixme: should be short?
} FLACCLSubframeTask; } FLACCLSubframeTask;
#if 0
__kernel void clWindowRectangle(__global float* window, int windowOffset) __kernel void clWindowRectangle(__global float* window, int windowOffset)
{ {
window[get_global_id(0)] = 1.0f; 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); int n = select(max(Np, Np2), tid, tid <= Np);
window[tid] = 0.5f - 0.5f * cos(M_PI_F * n / Np); window[tid] = 0.5f - 0.5f * cos(M_PI_F * n / Np);
} }
#endif
__kernel void clStereoDecorr( __kernel void clStereoDecorr(
__global int4 *samples, __global int4 *samples,