Skip to content

Commit e33279a

Browse files
committed
Merge upstream changes
2 parents 38b8a98 + 4300bd2 commit e33279a

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Compiler/Template/CodegenC.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4926,7 +4926,7 @@ template simulationParModelicaKernelsFile(String filePrefix, list<Function> func
49264926
let()= System.tmpTickResetIndex(0,20) /* parfor index */
49274927

49284928
<<
4929-
#include "OCLRuntimeUtil.cl"
4929+
#include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
49304930

49314931
// ParModelica Parallel Function headers.
49324932
<%functionHeadersParModelica(filePrefix, functions)%>

Compiler/Template/CodegenCFunctions.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3254,7 +3254,7 @@ template functionsParModelicaKernelsFile(String filePrefix, Option<Function> mai
32543254
let()= System.tmpTickResetIndex(0,20) /* parfor index */
32553255

32563256
<<
3257-
#include "OCLRuntimeUtil.cl"
3257+
#include <ParModelica/explicit/openclrt/OCLRuntimeUtil.cl>
32583258

32593259
// ParModelica Parallel Function headers.
32603260
<%functionHeadersParModelica(filePrefix, functions)%>

SimulationRuntime/ParModelica/explicit/openclrt/Makefile.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ HOST_SHORT = @host_short@
33

44
OPENMODELICA_INC=$(TOP_BUILDDIR)/include/omc/c/
55
PARMODELICAEXPOCL_INC=$(OPENMODELICA_INC)/ParModelica/explicit/openclrt/
6+
OPENMODELICA_BUILTIN_DIR=$(TOP_BUILDDIR)/lib/omc
67
OPENMODELICA_LIB=$(TOP_BUILDDIR)/lib/$(HOST_SHORT)/omc
78
OPENMODELICA_BIN=$(TOP_BUILDDIR)/bin/
89

@@ -24,7 +25,7 @@ transfer: libOMOCLRuntime.a
2425
$(COPY) omc_ocl_common_header.h $(PARMODELICAEXPOCL_INC)
2526
$(COPY) omc_ocl_memory_ops.h $(PARMODELICAEXPOCL_INC)
2627
$(COPY) libOMOCLRuntime.a $(OPENMODELICA_LIB)
27-
$(COPY) ParModelicaBuiltin.mo $(OPENMODELICA_LIB)
28+
$(COPY) ParModelicaBuiltin.mo $(OPENMODELICA_BUILTIN_DIR)
2829
$(COPY) OCLRuntimeUtil.cl $(PARMODELICAEXPOCL_INC)
2930

3031
Makefile: Makefile.in

SimulationRuntime/ParModelica/explicit/openclrt/omc_ocl_util.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,12 @@ void ocl_initialize(){
213213
}
214214

215215
gettimeofday(&t2, NULL);
216+
217+
#if BE_OCL_VERBOSE
216218
elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms
217219
elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms
218220
printf ("\tOpenCL initialization : %lf ms\n", elapsedTime);
221+
#endif
219222

220223
setenv("CUDA_CACHE_DISABLE", "1", 1);
221224
}
@@ -465,9 +468,12 @@ void ocl_execute_kernel(cl_kernel kernel){
465468

466469

467470
gettimeofday(&t2, NULL);
471+
#if BE_OCL_VERBOSE
468472
elapsedTime = (t2.tv_sec - t1.tv_sec) * 1000.0; // sec to ms
469473
elapsedTime += (t2.tv_usec - t1.tv_usec) / 1000.0; // us to ms
470474
printf ("\tKernel Execution : %lf ms\n", elapsedTime);
475+
#endif
476+
471477

472478
if(err) exit(1);
473479

0 commit comments

Comments
 (0)