File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ sa-solver : ${OBJ}
2222${OBJ} : ${INCLUDES}
2323
2424_kernel.h : input.cl param.h
25- echo ' const char *ocl_code = R"_mrb_( ' > $@
26- cpp $< >> $@
27- echo ' )_mrb_"; ' >> $@
25+ cpp $< ocl.code
26+ printf " \x00 " >> ocl.code
27+ xxd -i ocl.code $@
2828
2929test : sa-solver
3030 @echo Testing...
@@ -38,6 +38,6 @@ test : sa-solver
3838# different: testing/sols-100
3939
4040clean :
41- rm -f sa-solver _kernel.h * .o _temp_*
41+ rm -f sa-solver _kernel.h * .o _temp_* ocl.code
4242
4343re : clean all
Original file line number Diff line number Diff line change @@ -1292,8 +1292,8 @@ void init_and_run_opencl(uint8_t *header, size_t header_len)
12921292 const char * source ;
12931293 size_t source_len ;
12941294 //load_file("kernel.cl", &source, &source_len);
1295- source = ocl_code ;
1296- source_len = strlen (ocl_code );
1295+ source = ( char * ) ocl_code ;
1296+ source_len = strlen (( char * ) ocl_code );
12971297 program = clCreateProgramWithSource (context , 1 , (const char * * )& source ,
12981298 & source_len , & status );
12991299 if (status != CL_SUCCESS || !program )
You can’t perform that action at this time.
0 commit comments