OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsTesting.hpp
Go to the documentation of this file.
1 /*
2 
3  Compile-time UDFs. Used in RBC: rbc/tests/test_omnisci_device_selection.py
4 
5  */
6 
7 #define CPU_DEVICE_CODE 0x637075 // 'cpu' in hex
8 #define GPU_DEVICE_CODE 0x677075 // 'gpu' in hex
9 
11 int32_t ct_device_selection_udf_any(int32_t input) {
12 #ifdef __CUDACC__
13  return GPU_DEVICE_CODE;
14 #else
15  return CPU_DEVICE_CODE;
16 #endif
17 }
18 
20 int32_t ct_device_selection_udf_cpu__cpu_(int32_t input) {
21  return CPU_DEVICE_CODE;
22 }
23 
25 int32_t ct_device_selection_udf_gpu__gpu_(int32_t input) {
26  return GPU_DEVICE_CODE;
27 }
28 
30 int32_t ct_device_selection_udf_both__cpu_(int32_t input) {
31  return CPU_DEVICE_CODE;
32 }
33 
35 int32_t ct_device_selection_udf_both__gpu_(int32_t input) {
36  return GPU_DEVICE_CODE;
37 }
38 
39 #undef CPU_DEVICE_CODE
40 #undef GPU_DEVICE_CODE
EXTENSION_NOINLINE int32_t ct_device_selection_udf_both__gpu_(int32_t input)
#define CPU_DEVICE_CODE
#define EXTENSION_NOINLINE
Definition: OmniSciTypes.h:28
EXTENSION_NOINLINE int32_t ct_device_selection_udf_gpu__gpu_(int32_t input)
#define GPU_DEVICE_CODE
EXTENSION_NOINLINE int32_t ct_device_selection_udf_both__cpu_(int32_t input)
EXTENSION_NOINLINE int32_t ct_device_selection_udf_any(int32_t input)
EXTENSION_NOINLINE int32_t ct_device_selection_udf_cpu__cpu_(int32_t input)