OmniSciDB  b24e664e58
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TableFunctions.hpp File Reference
+ Include dependency graph for TableFunctions.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXTENSION_INLINE   extern "C" ALWAYS_INLINE DEVICE
 
#define EXTENSION_NOINLINE   extern "C" NEVER_INLINE DEVICE
 

Functions

EXTENSION_NOINLINE int32_t row_copier (double *input_col, int *copy_multiplier, const int64_t *input_row_count_ptr, int64_t *output_row_count, double *output_buffer)
 

Macro Definition Documentation

#define EXTENSION_INLINE   extern "C" ALWAYS_INLINE DEVICE

Definition at line 19 of file TableFunctions.hpp.

#define EXTENSION_NOINLINE   extern "C" NEVER_INLINE DEVICE

Definition at line 20 of file TableFunctions.hpp.

Function Documentation

EXTENSION_NOINLINE int32_t row_copier ( double *  input_col,
int *  copy_multiplier,
const int64_t *  input_row_count_ptr,
int64_t *  output_row_count,
double *  output_buffer 
)

Definition at line 41 of file TableFunctions.hpp.

45  {
46 #ifdef __CUDACC__
47  return row_copier_kernel(
48  input_col, copy_multiplier, *input_row_count_ptr, output_row_count, output_buffer);
49 #else
50  // Copy the input buffer to the output, duplicating according to copy_multiplier
51  const auto input_row_count = *input_row_count_ptr;
52 
53  for (auto i = 0; i < input_row_count; i++) {
54  for (int c = 0; c < *copy_multiplier; c++) {
55  output_buffer[i + (c * input_row_count)] = input_col[i];
56  }
57  }
58 
59  *output_row_count = (*copy_multiplier) * input_row_count;
60  return 0;
61 #endif
62 }