Skip to content
Snippets Groups Projects
Commit 47f3a152 authored by Heinz-Bernd Eggenstein's avatar Heinz-Bernd Eggenstein
Browse files

Merge branch 'override_cl_compile_options' into 'master'

allow to override default OpenCL compile options by defining CLFFT_COMPILE_OPTIONS macro

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