Skip to content
Snippets Groups Projects
Commit 278b5999 authored by Bernd Machenschalk's avatar Bernd Machenschalk
Browse files

allow to override default OpenCL compile options by defining CLFFT_COMPILE_OPTIONS macro

parent a9efa1be
No related branches found
No related tags found
1 merge request!6allow to override default OpenCL compile options by defining CLFFT_COMPILE_OPTIONS macro
......@@ -72,6 +72,10 @@
#include <cmath>
#include <limits.h>
#ifndef CLFFT_COMPILE_OPTIONS
#define CLFFT_COMPILE_OPTIONS "-cl-mad-enable -cl-single-precision-constant"
#endif
using namespace std;
extern void getKernelWorkDimensions(cl_fft_plan *plan, cl_fft_kernel_info *kernelInfo, cl_int *batchSize, size_t *gWorkItems, size_t *lWorkItems);
......@@ -434,7 +438,7 @@ patch_kernel_source:
err = clGetDeviceInfo(devices[i], CL_DEVICE_TYPE, sizeof(device_type), &device_type, NULL);
ERR_MACRO(err);
err = clBuildProgram(plan->program, 1, &devices[i], "-cl-mad-enable -cl-single-precision-constant", NULL, NULL);
err = clBuildProgram(plan->program, 1, &devices[i], CLFFT_COMPILE_OPTIONS, NULL, NULL);
if (err != CL_SUCCESS)
{
char *build_log;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment