OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExtensionFunctionsTesting.hpp File Reference
#include <chrono>
#include <thread>
+ Include dependency graph for ExtensionFunctionsTesting.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CPU_DEVICE_CODE   0x637075
 
#define GPU_DEVICE_CODE   0x677075
 

Functions

EXTENSION_NOINLINE int32_t ct_device_selection_udf_any (int32_t input)
 
EXTENSION_NOINLINE_HOST int32_t ct_device_selection_udf_cpu__cpu_ (int32_t input)
 
EXTENSION_NOINLINE int32_t ct_device_selection_udf_gpu__gpu_ (int32_t input)
 
EXTENSION_NOINLINE_HOST int32_t ct_device_selection_udf_both__cpu_ (int32_t input)
 
EXTENSION_NOINLINE int32_t ct_device_selection_udf_both__gpu_ (int32_t input)
 
EXTENSION_NOINLINE int32_t ct_sleep_us__cpu_ (int64_t usec)
 

Macro Definition Documentation

#define CPU_DEVICE_CODE   0x637075
#define GPU_DEVICE_CODE   0x677075

Function Documentation

EXTENSION_NOINLINE int32_t ct_device_selection_udf_any ( int32_t  input)

Definition at line 11 of file ExtensionFunctionsTesting.hpp.

References CPU_DEVICE_CODE, and GPU_DEVICE_CODE.

11  {
12 #ifdef __CUDACC__
13  return GPU_DEVICE_CODE;
14 #else
15  return CPU_DEVICE_CODE;
16 #endif
17 }
#define CPU_DEVICE_CODE
#define GPU_DEVICE_CODE
EXTENSION_NOINLINE_HOST int32_t ct_device_selection_udf_both__cpu_ ( int32_t  input)

Definition at line 36 of file ExtensionFunctionsTesting.hpp.

References CPU_DEVICE_CODE.

36  {
37  return CPU_DEVICE_CODE;
38 }
#define CPU_DEVICE_CODE
EXTENSION_NOINLINE int32_t ct_device_selection_udf_both__gpu_ ( int32_t  input)

Definition at line 43 of file ExtensionFunctionsTesting.hpp.

References GPU_DEVICE_CODE.

43  {
44  return GPU_DEVICE_CODE;
45 }
#define GPU_DEVICE_CODE
EXTENSION_NOINLINE_HOST int32_t ct_device_selection_udf_cpu__cpu_ ( int32_t  input)

Definition at line 22 of file ExtensionFunctionsTesting.hpp.

References CPU_DEVICE_CODE.

22  {
23  return CPU_DEVICE_CODE;
24 }
#define CPU_DEVICE_CODE
EXTENSION_NOINLINE int32_t ct_device_selection_udf_gpu__gpu_ ( int32_t  input)

Definition at line 29 of file ExtensionFunctionsTesting.hpp.

References GPU_DEVICE_CODE.

29  {
30  return GPU_DEVICE_CODE;
31 }
#define GPU_DEVICE_CODE
EXTENSION_NOINLINE int32_t ct_sleep_us__cpu_ ( int64_t  usec)

Definition at line 52 of file ExtensionFunctionsTesting.hpp.

52  {
53  std::this_thread::sleep_for(std::chrono::microseconds(usec));
54  return usec;
55 }