File tree 3 files changed +15
-3
lines changed
librapid/include/librapid/core
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,8 @@ if (${SKBUILD})
140
140
set (LIBRAPID_USE_CUDA ON )
141
141
set (LIBRAPID_USE_OPENCL ON )
142
142
set (LIBRAPID_NATIVE_ARCH ON )
143
+ else ()
144
+ set (LIBRAPID_NO_ALWAYS_INLINE ON ) # Reduce compile memory
143
145
endif ()
144
146
145
147
set (LIBRAPID_USE_OMP ON )
@@ -339,7 +341,7 @@ if (LIBRAPID_USE_OPENCL)
339
341
340
342
# Define CL_HPP_TARGET_OPENCL_VERSION to the version of OpenCL being used
341
343
message (STATUS "[ LIBRAPID ] OpenCL Version: ${OpenCL_VERSION_MAJOR}${OpenCL_VERSION_MINOR} 0" )
342
- set (OpenCLVersion ${OpenCL_VERSION_MAJOR} ${OpenCL_VERSION_MINOR} 0)
344
+ set (OpenCLVersion ${OpenCL_VERSION_MAJOR}${OpenCL_VERSION_MINOR} 0)
343
345
target_compile_definitions (${module_name} PUBLIC CL_HPP_TARGET_OPENCL_VERSION=${OpenCLVersion} )
344
346
target_compile_definitions (${module_name} PUBLIC CL_HPP_MINIMUM_OPENCL_VERSION=${OpenCLVersion} )
345
347
Original file line number Diff line number Diff line change 2
2
#define LIBRAPID_CORE_GNU_CONFIG_HPP
3
3
4
4
#define LIBRAPID_INLINE inline
5
- #define LIBRAPID_ALWAYS_INLINE inline __attribute__ ((always_inline))
5
+
6
+ #if defined(LIBRAPID_NO_ALWAYS_INLINE)
7
+ # define LIBRAPID_ALWAYS_INLINE inline
8
+ #else
9
+ # define LIBRAPID_ALWAYS_INLINE inline __attribute__ ((always_inline))
10
+ #endif
6
11
7
12
#if defined(LIBRAPID_ENABLE_ASSERT)
8
13
Original file line number Diff line number Diff line change 2
2
#define LIBRAPID_CORE_MSVC_CONFIG_HPP
3
3
4
4
#define LIBRAPID_INLINE inline
5
- #define LIBRAPID_ALWAYS_INLINE inline __forceinline
5
+
6
+ #if defined(LIBRAPID_NO_ALWAYS_INLINE)
7
+ # define LIBRAPID_ALWAYS_INLINE inline
8
+ #else
9
+ # define LIBRAPID_ALWAYS_INLINE inline __forceinline
10
+ #endif
6
11
7
12
#if defined(LIBRAPID_ENABLE_ASSERT)
8
13
You can’t perform that action at this time.
0 commit comments