mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-22 15:33:29 -06:00
openclKernels: optionally instantiate for float
This commit is contained in:
parent
df0a9a4055
commit
9f5bad224c
@ -35,6 +35,12 @@ foreach(CL ${CL_LIST})
|
||||
file(READ "${CL}" CL_CONTENT)
|
||||
file(APPEND ${CL_SRC_FILE} "${CL_CONTENT}")
|
||||
file(APPEND ${CL_SRC_FILE} "\)\"; \n\n")
|
||||
if(BUILD_FLOW_FLOAT_VARIANTS)
|
||||
string(REPLACE double float CL_CONTENT "${CL_CONTENT}")
|
||||
file(APPEND ${CL_SRC_FILE} "template<> const std::string OpenclKernels<float>::${FNAME}_str = R\"\( \n")
|
||||
file(APPEND ${CL_SRC_FILE} "${CL_CONTENT}")
|
||||
file(APPEND ${CL_SRC_FILE} "\)\"; \n\n")
|
||||
endif()
|
||||
|
||||
if(DEBUG_OPENCL_KERNELS_INTEL)
|
||||
execute_process(
|
||||
|
@ -561,4 +561,8 @@ void OpenclKernels<Scalar>::isaiU(cl::Buffer& diagIndex, cl::Buffer& colPointers
|
||||
|
||||
template class OpenclKernels<double>;
|
||||
|
||||
#if FLOW_INSTANTIATE_FLOAT
|
||||
template class OpenclKernels<float>;
|
||||
#endif
|
||||
|
||||
} // namespace Opm::Accelerator
|
||||
|
@ -182,6 +182,10 @@ public:
|
||||
|
||||
DECLARE_INSTANCE(double)
|
||||
|
||||
#if FLOW_INSTANTIATE_FLOAT
|
||||
DECLARE_INSTANCE(float)
|
||||
#endif
|
||||
|
||||
} // namespace Opm::Accelerator
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user