Skip to content

Commit 734ea77

Browse files
committed
ocl(macosx): fix CL_INVALID_BUILD_OPTIONS for gemm programs
MacOSX OpenCL compiler is very strict to whitespace issues
1 parent cca99bf commit 734ea77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/core/src/matmul.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,11 +845,11 @@ static bool ocl_gemm( InputArray matA, InputArray matB, double alpha,
845845
int vectorWidths[] = { 4, 4, 2, 2, 1, 4, cn, -1 };
846846
int kercn = ocl::checkOptimalVectorWidth(vectorWidths, B, D);
847847

848-
opts += format(" -D T=%s -D T1=%s -D WT=%s -D cn=%d -D kercn=%d -D LOCAL_SIZE=%d %s %s %s",
848+
opts += format(" -D T=%s -D T1=%s -D WT=%s -D cn=%d -D kercn=%d -D LOCAL_SIZE=%d%s%s%s",
849849
ocl::typeToStr(type), ocl::typeToStr(depth), ocl::typeToStr(CV_MAKETYPE(depth, kercn)),
850850
cn, kercn, block_size,
851-
(sizeA.width % block_size !=0) ? "-D NO_MULT" : "",
852-
haveC ? "-D HAVE_C" : "",
851+
(sizeA.width % block_size !=0) ? " -D NO_MULT" : "",
852+
haveC ? " -D HAVE_C" : "",
853853
doubleSupport ? " -D DOUBLE_SUPPORT" : "");
854854

855855
ocl::Kernel k("gemm", cv::ocl::core::gemm_oclsrc, opts);

0 commit comments

Comments
 (0)