OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SignatureTestTableFunctions.cpp File Reference
+ Include dependency graph for SignatureTestTableFunctions.cpp:

Go to the source code of this file.

Functions

template<typename T , typename U , typename K >
NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< T > &input1, const Column< U > &input2, Column< K > &out)
 
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< int32_t > &input1, const Column< int32_t > &input2, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< int32_t > &input1, const Column< double > &input2, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< double > &input1, const Column< int32_t > &input2, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< double > &input1, const Column< double > &input2, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template (const Column< TextEncodingDict > &input1, const Column< TextEncodingDict > &input2, Column< TextEncodingDict > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_named_output__cpu_template (const Column< T > &input, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_named_output__cpu_template (const Column< int32_t > &input, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_named_output__cpu_template (const Column< double > &input, Column< double > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template (const Column< T > &input, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template (const Column< int32_t > &input, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template (const Column< double > &input, Column< double > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template (const Column< T > &input, int32_t c, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template (const Column< int32_t > &input, int32_t c, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template (const Column< double > &input, int32_t c, Column< double > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template (const Column< T > &input, int32_t m, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template (const Column< int32_t > &input, int32_t m, Column< int32_t > &out)
 
template NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template (const Column< double > &input, int32_t m, Column< double > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template (Column< T > &answer)
 
template NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template (Column< int32_t > &answer)
 
EXTENSION_NOINLINE int32_t ct_no_arg_constant_sizing (Column< int32_t > &answer)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template (const T num, Column< T > &answer)
 
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template (const float num, Column< float > &answer)
 
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template (const double num, Column< double > &answer)
 
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template (const int32_t num, Column< int32_t > &answer)
 
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template (const int64_t num, Column< int64_t > &answer)
 
EXTENSION_NOINLINE int32_t ct_scalar_2_args_constant_sizing (const int64_t num1, const int64_t num2, Column< int64_t > &answer1, Column< int64_t > &answer2)
 
EXTENSION_NOINLINE_HOST int32_t ct_no_cursor_user_constant_sizer__cpu_ (const int32_t input_num, int32_t c, Column< int32_t > &output)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template (const T input_num, int32_t c, Column< T > &output)
 
template NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template (const int32_t input_num, int32_t c, Column< int32_t > &output)
 
template NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template (const float input_num, int32_t c, Column< float > &output)
 
EXTENSION_NOINLINE_HOST int32_t ct_require__cpu_ (const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_str__cpu_ (const Column< int32_t > &input1, const TextEncodingNone &s, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_mgr (TableFunctionManager &mgr, const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
 
template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_require_templating__cpu_template (const Column< T > &input1, const int32_t i, Column< K > &out)
 
template NEVER_INLINE HOST int32_t ct_require_templating__cpu_template (const Column< int > &input1, const int32_t i, Column< int > &out)
 
template NEVER_INLINE HOST int32_t ct_require_templating__cpu_template (const Column< double > &input1, const int32_t i, Column< int > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_and__cpu_ (const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_or_str__cpu_ (const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_str_diff__cpu_ (const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_text_enc_dict__cpu_ (const Column< TextEncodingDict > &input, const int64_t x, Column< int64_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_text_collist_enc_dict__cpu_ (const ColumnList< TextEncodingDict > &input, const int64_t x, Column< int64_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_require_cursor__cpu_ (const Column< int64_t > &input, int64_t y, Column< int64_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_test_allocator (TableFunctionManager &mgr, const Column< int32_t > &input, const TextEncodingNone &t, Column< int32_t > &out)
 
EXTENSION_NOINLINE int32_t ct_test_preflight_sizer (const Column< int32_t > &input, const int32_t i, const int32_t j, Column< int32_t > &out)
 
EXTENSION_NOINLINE int32_t ct_test_preflight_sizer_const (const Column< int32_t > &input, Column< int32_t > &out)
 
EXTENSION_NOINLINE int32_t ct_test_preflight_singlecursor_qe227__cpu_ (TableFunctionManager &mgr, const Column< int32_t > &col, const ColumnList< int32_t > &lst, const int x, const int y, Column< int32_t > &out)
 
EXTENSION_NOINLINE int32_t ct_test_preflight_multicursor_qe227__cpu_ (TableFunctionManager &mgr, const Column< int32_t > &col, const ColumnList< int32_t > &lst, const int x, const int y, Column< int32_t > &out)
 
EXTENSION_NOINLINE_HOST int32_t ct_scalar_named_args__cpu_ (TableFunctionManager &mgr, const int32_t arg1, const int32_t arg2, Column< int32_t > &out1, Column< int32_t > &out2)
 
EXTENSION_NOINLINE_HOST int32_t ct_cursor_named_args__cpu_ (TableFunctionManager &mgr, const Column< int32_t > &input_arg1, const Column< int32_t > &input_arg2, const int32_t arg1, const int32_t arg2, Column< int32_t > &out1, Column< int32_t > &out2)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template (const T scalar, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template (const Timestamp scalar, Column< Timestamp > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template (const int64_t scalar, Column< int64_t > &out)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< T > &input, Column< T > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< Timestamp > &input, Column< Timestamp > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< TextEncodingDict > &input, Column< TextEncodingDict > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< int64_t > &input, Column< int64_t > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< Array< TextEncodingDict >> &input, Column< Array< TextEncodingDict >> &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template (const Column< Array< int64_t >> &input, Column< Array< int64_t >> &out)
 
template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template (const Column< K > &first_col, const ColumnList< T > &col_list, const Column< K > &last_col, Column< K > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template (const Column< int64_t > &first_col, const ColumnList< int64_t > &col_list, const Column< int64_t > &last_col, Column< int64_t > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template (const Column< int64_t > &first_col, const ColumnList< double > &col_list, const Column< int64_t > &last_col, Column< int64_t > &out)
 
template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template (const Column< K > &first_col, const ColumnList< K > &col_list1, const ColumnList< T > &col_list2, const Column< T > &last_col, Column< K > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template (const Column< int64_t > &first_col, const ColumnList< int64_t > &col_list1, const ColumnList< double > &col_list2, const Column< double > &last_col, Column< int64_t > &out)
 
template NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template (const Column< int64_t > &first_col, const ColumnList< int64_t > &col_list1, const ColumnList< int64_t > &col_list2, const Column< int64_t > &last_col, Column< int64_t > &out)
 
EXTENSION_NOINLINE int32_t ct_require_range__cpu_ (const Column< int32_t > &input1, const int32_t x, const int32_t multiplier, Column< int32_t > &out)
 
template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template (const Column< T > &inp, const T x, const int32_t multiplier, Column< T > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template (const Column< int8_t > &inp, const int8_t x, const int32_t multiplier, Column< int8_t > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template (const Column< int16_t > &inp, const int16_t x, const int32_t multiplier, Column< int16_t > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template (const Column< int32_t > &inp, const int32_t x, const int32_t multiplier, Column< int32_t > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template (const Column< int64_t > &inp, const int64_t x, const int32_t multiplier, Column< int64_t > &out)
 
template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template (const Column< T > &inp, const T x, const int32_t multiplier, Column< T > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template (const Column< float > &inp, const float x, const int32_t multiplier, Column< float > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template (const Column< double > &inp, const double x, const int32_t multiplier, Column< double > &out)
 
EXTENSION_NOINLINE int32_t ct_test_string_default_arg__cpu_ (TableFunctionManager &mgr, const Column< TextEncodingDict > &inp, const TextEncodingNone &suffix, Column< TextEncodingDict > &out)
 
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_char__cpu_ (TableFunctionManager &mgr, const Column< TextEncodingDict > &input1, Column< TextEncodingDict > &out)
 
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_bigint__cpu_ (TableFunctionManager &mgr, const Column< int64_t > &input1, Column< int64_t > &out)
 
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_double__cpu_ (TableFunctionManager &mgr, const Column< double > &input1, Column< double > &out)
 
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_timestamp__cpu_ (TableFunctionManager &mgr, const Column< Timestamp > &input1, Column< Timestamp > &out)
 
template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ (TableFunctionManager &mgr, const Column< T > &first, const ColumnList< T > &list, Column< T > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ (TableFunctionManager &mgr, const Column< float > &first, const ColumnList< float > &list, Column< float > &out)
 
template TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ (TableFunctionManager &mgr, const Column< double > &first, const ColumnList< double > &list, Column< double > &out)
 

Function Documentation

template<typename T , typename U , typename K >
NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< T > &  input1,
const Column< U > &  input2,
Column< K > &  out 
)

Definition at line 28 of file SignatureTestTableFunctions.cpp.

References set_output_row_size(), and Column< T >::size().

30  {
31  if constexpr (std::is_same<T, TextEncodingDict>::value &&
32  std::is_same<U, TextEncodingDict>::value) {
33  set_output_row_size(input1.size());
34  for (int64_t i = 0; i < input1.size(); i++) {
35  out[i] = input1[i];
36  }
37  return input1.size();
38  }
39 
41  if constexpr (std::is_same<T, int32_t>::value && std::is_same<U, double>::value) {
42  out[0] = 10;
43  } else if constexpr (std::is_same<T, double>::value && std::is_same<U, double>::value) {
44  out[0] = 20;
45  } else if constexpr (std::is_same<T, int32_t>::value &&
46  std::is_same<U, int32_t>::value) {
47  out[0] = 30;
48  } else if constexpr (std::is_same<T, double>::value &&
49  std::is_same<U, int32_t>::value) {
50  out[0] = 40;
51  }
52  return 1;
53 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE int64_t size() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< int32_t > &  input1,
const Column< int32_t > &  input2,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< int32_t > &  input1,
const Column< double > &  input2,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< double > &  input1,
const Column< int32_t > &  input2,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< double > &  input1,
const Column< double > &  input2,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template ( const Column< TextEncodingDict > &  input1,
const Column< TextEncodingDict > &  input2,
Column< TextEncodingDict > &  out 
)
EXTENSION_NOINLINE_HOST int32_t ct_cursor_named_args__cpu_ ( TableFunctionManager mgr,
const Column< int32_t > &  input_arg1,
const Column< int32_t > &  input_arg2,
const int32_t  arg1,
const int32_t  arg2,
Column< int32_t > &  out1,
Column< int32_t > &  out2 
)

Definition at line 508 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size(), and Column< T >::size().

514  {
515  const int32_t num_rows = input_arg1.size();
516  mgr.set_output_row_size(num_rows);
517  for (int32_t r = 0; r < num_rows; ++r) {
518  out1[r] = input_arg1[r] + arg1;
519  out2[r] = input_arg2[r] + arg2;
520  }
521  return num_rows;
522 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const

+ Here is the call graph for this function:

template<typename T >
NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template ( const Column< T > &  input,
Column< T > &  out 
)

Definition at line 100 of file SignatureTestTableFunctions.cpp.

References Column< T >::size(), and heavydb.dtypes::T.

101  {
102  T acc1 = 0, acc2 = 0;
103  for (int64_t i = 0; i < input.size(); i++) {
104  if (i % 2 == 0) {
105  acc1 += input[i];
106  } else {
107  acc2 += input[i];
108  }
109  }
110  out[0] = acc1;
111  out[1] = acc2;
112  return 2;
113 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template ( const Column< int32_t > &  input,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template ( const Column< double > &  input,
Column< double > &  out 
)
template<typename T >
NEVER_INLINE HOST int32_t ct_named_output__cpu_template ( const Column< T > &  input,
Column< T > &  out 
)

Definition at line 82 of file SignatureTestTableFunctions.cpp.

References set_output_row_size(), Column< T >::size(), and heavydb.dtypes::T.

83  {
85  T acc = 0;
86  for (int64_t i = 0; i < input.size(); i++) {
87  acc += input[i];
88  }
89  out[0] = acc;
90  return 1;
91 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE int64_t size() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_named_output__cpu_template ( const Column< int32_t > &  input,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_named_output__cpu_template ( const Column< double > &  input,
Column< double > &  out 
)
template<typename T >
NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template ( const Column< T > &  input,
int32_t  m,
Column< T > &  out 
)

Definition at line 144 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

146  {
147  for (int64_t j = 0; j < m; j++) {
148  for (int64_t i = 0; i < input.size(); i++) {
149  out[j * input.size() + i] += input[i];
150  }
151  }
152  return m * input.size();
153 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template ( const Column< int32_t > &  input,
int32_t  m,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template ( const Column< double > &  input,
int32_t  m,
Column< double > &  out 
)
template<typename T >
NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template ( const Column< T > &  input,
int32_t  c,
Column< T > &  out 
)

Definition at line 121 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

123  {
124  for (int64_t i = 0; i < c; i++) {
125  out[i] = 0;
126  }
127  for (int64_t i = 0; i < input.size(); i++) {
128  out[i % c] += input[i];
129  }
130  return c;
131 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template ( const Column< int32_t > &  input,
int32_t  c,
Column< int32_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template ( const Column< double > &  input,
int32_t  c,
Column< double > &  out 
)
EXTENSION_NOINLINE int32_t ct_no_arg_constant_sizing ( Column< int32_t > &  answer)

Definition at line 182 of file SignatureTestTableFunctions.cpp.

182  {
183 #ifdef __CUDACC__
184  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
185  int32_t stop = static_cast<int32_t>(42);
186  int32_t step = blockDim.x * gridDim.x;
187 #else
188  auto start = 0;
189  auto stop = 42;
190  auto step = 1;
191 #endif
192  for (auto i = start; i < stop; i += step) {
193  answer[i] = 42 * i;
194  }
195  return 42;
196 }
template<typename T >
NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template ( Column< T > &  answer)

Definition at line 170 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

170  {
172  answer[0] = 42;
173  return 1;
174 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template ( Column< int32_t > &  answer)
EXTENSION_NOINLINE_HOST int32_t ct_no_cursor_user_constant_sizer__cpu_ ( const int32_t  input_num,
int32_t  c,
Column< int32_t > &  output 
)

Definition at line 247 of file SignatureTestTableFunctions.cpp.

249  {
250  for (int32_t i = 0; i < c; i++) {
251  output[i] = input_num;
252  }
253  return c;
254 }
template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template ( const Column< K > &  first_col,
const ColumnList< K > &  col_list1,
const ColumnList< T > &  col_list2,
const Column< T > &  last_col,
Column< K > &  out 
)

Definition at line 623 of file SignatureTestTableFunctions.cpp.

References ColumnList< T >::numCols(), set_output_row_size(), Column< T >::size(), and heavydb.dtypes::T.

627  {
629  int64_t num_cols = col_list1.numCols();
630  K sum = 0;
631  for (int64_t i = 0; i < num_cols; ++i) {
632  const Column<K>& col = col_list1[i];
633  for (int64_t j = 0; j < col.size(); ++j) {
634  sum += col[j];
635  }
636  }
637 
638  int64_t num_cols2 = col_list2.numCols();
639  T sum2 = 0;
640  for (int64_t i = 0; i < num_cols2; ++i) {
641  const Column<T>& col = col_list2[i];
642  for (int64_t j = 0; j < col.size(); ++j) {
643  sum2 += col[j];
644  }
645  }
646 
647  if (sum + sum2 > 0) {
648  out[0] = first_col[0];
649  } else {
650  out[0] = last_col[0];
651  }
652  return 1;
653 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE int64_t size() const
DEVICE int64_t numCols() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template ( const Column< int64_t > &  first_col,
const ColumnList< int64_t > &  col_list1,
const ColumnList< double > &  col_list2,
const Column< double > &  last_col,
Column< int64_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_list_test2__cpu_template ( const Column< int64_t > &  first_col,
const ColumnList< int64_t > &  col_list1,
const ColumnList< int64_t > &  col_list2,
const Column< int64_t > &  last_col,
Column< int64_t > &  out 
)
template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template ( const Column< K > &  first_col,
const ColumnList< T > &  col_list,
const Column< K > &  last_col,
Column< K > &  out 
)

Definition at line 586 of file SignatureTestTableFunctions.cpp.

References ColumnList< T >::numCols(), set_output_row_size(), Column< T >::size(), and heavydb.dtypes::T.

589  {
591  int64_t num_cols = col_list.numCols();
592  T sum = 0;
593  for (int64_t i = 0; i < num_cols; ++i) {
594  const Column<T>& col = col_list[i];
595  for (int64_t j = 0; j < col.size(); ++j) {
596  sum += col[j];
597  }
598  }
599  if (sum > 0) {
600  out[0] = first_col[0];
601  } else {
602  out[0] = last_col[0];
603  }
604  return 1;
605 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE int64_t size() const
DEVICE int64_t numCols() const

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template ( const Column< int64_t > &  first_col,
const ColumnList< int64_t > &  col_list,
const Column< int64_t > &  last_col,
Column< int64_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_list_test__cpu_template ( const Column< int64_t > &  first_col,
const ColumnList< double > &  col_list,
const Column< int64_t > &  last_col,
Column< int64_t > &  out 
)
template<typename T >
NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< T > &  input,
Column< T > &  out 
)

Definition at line 548 of file SignatureTestTableFunctions.cpp.

References Column< T >::isNull(), set_output_row_size(), Column< T >::setNull(), and Column< T >::size().

549  {
550  int64_t size = input.size();
551  set_output_row_size(size);
552  for (int64_t i = 0; i < size; ++i) {
553  if (input.isNull(i)) {
554  out.setNull(i);
555  } else {
556  out[i] = input[i];
557  }
558  }
559  return size;
560 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< Timestamp > &  input,
Column< Timestamp > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< TextEncodingDict > &  input,
Column< TextEncodingDict > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< int64_t > &  input,
Column< int64_t > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< Array< TextEncodingDict >> &  input,
Column< Array< TextEncodingDict >> &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template ( const Column< Array< int64_t >> &  input,
Column< Array< int64_t >> &  out 
)
template<typename T >
NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template ( const T  scalar,
Column< T > &  out 
)

Definition at line 527 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

528  {
530  if constexpr (std::is_same<T, int64_t>::value) {
531  out[0] = scalar;
532  } else if constexpr (std::is_same<T, Timestamp>::value) {
533  out[0] = scalar.time;
534  }
535  return 1;
536 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template ( const Timestamp  scalar,
Column< Timestamp > &  out 
)
template NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template ( const int64_t  scalar,
Column< int64_t > &  out 
)
EXTENSION_NOINLINE_HOST int32_t ct_require__cpu_ ( const Column< int32_t > &  input1,
const int32_t  i,
Column< int32_t > &  out 
)

Definition at line 326 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

328  {
330  out[0] = 3;
331  return 1;
332 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_and__cpu_ ( const Column< int32_t > &  input1,
const int32_t  i,
Column< int32_t > &  out 
)

Definition at line 374 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

376  {
378  out[0] = 7;
379  return 1;
380 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_cursor__cpu_ ( const Column< int64_t > &  input,
int64_t  y,
Column< int64_t > &  out 
)

Definition at line 416 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

418  {
420  out[0] = 12;
421  return 1;
422 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_mgr ( TableFunctionManager mgr,
const Column< int32_t > &  input1,
const int32_t  i,
Column< int32_t > &  out 
)

Definition at line 342 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

345  {
347  out[0] = 4;
348  return 1;
349 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_or_str__cpu_ ( const Column< int32_t > &  input1,
const TextEncodingNone i,
Column< int32_t > &  out 
)

Definition at line 382 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

384  {
386  out[0] = 8;
387  return 1;
388 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_require_range__cpu_ ( const Column< int32_t > &  input1,
const int32_t  x,
const int32_t  multiplier,
Column< int32_t > &  out 
)

Definition at line 672 of file SignatureTestTableFunctions.cpp.

675  {
676  out[0] = 0;
677  return 1;
678 }
EXTENSION_NOINLINE_HOST int32_t ct_require_str__cpu_ ( const Column< int32_t > &  input1,
const TextEncodingNone s,
Column< int32_t > &  out 
)

Definition at line 334 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

336  {
338  out[0] = 3;
339  return 1;
340 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_str_diff__cpu_ ( const Column< int32_t > &  input1,
const TextEncodingNone i,
Column< int32_t > &  out 
)

Definition at line 390 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

392  {
394  out[0] = 9;
395  return 1;
396 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template<typename T , typename K >
NEVER_INLINE HOST int32_t ct_require_templating__cpu_template ( const Column< T > &  input1,
const int32_t  i,
Column< K > &  out 
)

Definition at line 352 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

354  {
356  if constexpr (std::is_same<T, int32_t>::value) {
357  out[0] = 5;
358  } else if constexpr (std::is_same<T, double>::value) {
359  out[0] = 6.0;
360  }
361  return 1;
362 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_require_templating__cpu_template ( const Column< int > &  input1,
const int32_t  i,
Column< int > &  out 
)
template NEVER_INLINE HOST int32_t ct_require_templating__cpu_template ( const Column< double > &  input1,
const int32_t  i,
Column< int > &  out 
)
EXTENSION_NOINLINE_HOST int32_t ct_require_text_collist_enc_dict__cpu_ ( const ColumnList< TextEncodingDict > &  input,
const int64_t  x,
Column< int64_t > &  out 
)

Definition at line 408 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

410  {
412  out[0] = 11;
413  return 1;
414 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST int32_t ct_require_text_enc_dict__cpu_ ( const Column< TextEncodingDict > &  input,
const int64_t  x,
Column< int64_t > &  out 
)

Definition at line 399 of file SignatureTestTableFunctions.cpp.

References set_output_row_size().

401  {
403  out[0] = 10;
404  return 1;
405 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template<typename T >
NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template ( const T  num,
Column< T > &  answer 
)

Definition at line 202 of file SignatureTestTableFunctions.cpp.

References set_output_row_size(), and heavydb.dtypes::T.

202  {
203  T quotient = num;
205  int32_t counter{0};
206  while (quotient >= 1) {
207  answer[counter++] = quotient;
208  quotient /= 10;
209  }
210  return counter;
211 }
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)

+ Here is the call graph for this function:

template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template ( const float  num,
Column< float > &  answer 
)
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template ( const double  num,
Column< double > &  answer 
)
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template ( const int32_t  num,
Column< int32_t > &  answer 
)
template NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template ( const int64_t  num,
Column< int64_t > &  answer 
)
EXTENSION_NOINLINE int32_t ct_scalar_2_args_constant_sizing ( const int64_t  num1,
const int64_t  num2,
Column< int64_t > &  answer1,
Column< int64_t > &  answer2 
)

Definition at line 224 of file SignatureTestTableFunctions.cpp.

227  {
228 #ifdef __CUDACC__
229  int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
230  int32_t stop = static_cast<int32_t>(5);
231  int32_t step = blockDim.x * gridDim.x;
232 #else
233  auto start = 0;
234  auto stop = 5;
235  auto step = 1;
236 #endif
237  for (auto i = start; i < stop; i += step) {
238  answer1[i] = num1 + i * num2;
239  answer2[i] = num1 - i * num2;
240  }
241  return 5;
242 }
EXTENSION_NOINLINE_HOST int32_t ct_scalar_named_args__cpu_ ( TableFunctionManager mgr,
const int32_t  arg1,
const int32_t  arg2,
Column< int32_t > &  out1,
Column< int32_t > &  out2 
)

Definition at line 496 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size().

500  {
501  mgr.set_output_row_size(1);
502  out1[0] = arg1;
503  out2[0] = arg2;
504  return 1;
505 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373

+ Here is the call graph for this function:

template<typename T >
NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template ( const T  input_num,
int32_t  c,
Column< T > &  output 
)

Definition at line 262 of file SignatureTestTableFunctions.cpp.

264  {
265  for (int32_t i = 0; i < c; i++) {
266  output[i] = input_num;
267  }
268  return c;
269 }
template NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template ( const int32_t  input_num,
int32_t  c,
Column< int32_t > &  output 
)
template NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template ( const float  input_num,
int32_t  c,
Column< float > &  output 
)
EXTENSION_NOINLINE_HOST int32_t ct_test_allocator ( TableFunctionManager mgr,
const Column< int32_t > &  input,
const TextEncodingNone t,
Column< int32_t > &  out 
)

Definition at line 424 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::enable_output_allocations(), TextEncodingNone::getString(), and TableFunctionManager::set_output_row_size().

427  {
429  mgr.set_output_row_size(1);
430  TextEncodingNone t2(mgr, t.getString());
431  out[0] = 11;
432  return 1;
433 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
std::string getString() const
Definition: heavydbTypes.h:641
void enable_output_allocations()
Definition: heavydbTypes.h:381

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_calcite_casting_bigint__cpu_ ( TableFunctionManager mgr,
const Column< int64_t > &  input1,
Column< int64_t > &  out 
)

Definition at line 776 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size(), and Column< T >::size().

778  {
779  int32_t size = input1.size();
780  mgr.set_output_row_size(size);
781  for (int i = 0; i < size; ++i) {
782  out[i] = input1[i];
783  }
784  return size;
785 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_calcite_casting_char__cpu_ ( TableFunctionManager mgr,
const Column< TextEncodingDict > &  input1,
Column< TextEncodingDict > &  out 
)

Definition at line 764 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size(), and Column< TextEncodingDict >::size().

766  {
767  int32_t size = input1.size();
768  mgr.set_output_row_size(size);
769  for (int i = 0; i < size; ++i) {
770  out[i] = input1[i];
771  }
772  return size;
773 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const

+ Here is the call graph for this function:

template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ ( TableFunctionManager mgr,
const Column< T > &  first,
const ColumnList< T > &  list,
Column< T > &  out 
)

Definition at line 813 of file SignatureTestTableFunctions.cpp.

References ColumnList< T >::numCols(), TableFunctionManager::set_output_row_size(), and Column< T >::size().

816  {
817  mgr.set_output_row_size(list.numCols() + 1);
818  out[0] = first[0];
819  for (int i = 0; i < list.numCols(); i++) {
820  out[i + 1] = list[i][0];
821  }
822  return out.size();
823 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE int64_t numCols() const

+ Here is the call graph for this function:

template TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ ( TableFunctionManager mgr,
const Column< float > &  first,
const ColumnList< float > &  list,
Column< float > &  out 
)
template TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_ ( TableFunctionManager mgr,
const Column< double > &  first,
const ColumnList< double > &  list,
Column< double > &  out 
)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_double__cpu_ ( TableFunctionManager mgr,
const Column< double > &  input1,
Column< double > &  out 
)

Definition at line 788 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size(), and Column< T >::size().

790  {
791  int32_t size = input1.size();
792  mgr.set_output_row_size(size);
793  for (int i = 0; i < size; ++i) {
794  out[i] = input1[i];
795  }
796  return size;
797 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_calcite_casting_timestamp__cpu_ ( TableFunctionManager mgr,
const Column< Timestamp > &  input1,
Column< Timestamp > &  out 
)

Definition at line 800 of file SignatureTestTableFunctions.cpp.

References TableFunctionManager::set_output_row_size(), and Column< T >::size().

802  {
803  int32_t size = input1.size();
804  mgr.set_output_row_size(size);
805  for (int i = 0; i < size; ++i) {
806  out[i] = input1[i];
807  }
808  return size;
809 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const

+ Here is the call graph for this function:

template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template ( const Column< T > &  inp,
const T  x,
const int32_t  multiplier,
Column< T > &  out 
)

Definition at line 719 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

722  {
723  int32_t size = inp.size();
724  for (int i = 0; i < size; ++i) {
725  out[i] = inp[i] / x;
726  }
727 
728  return size;
729 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

template TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template ( const Column< float > &  inp,
const float  x,
const int32_t  multiplier,
Column< float > &  out 
)
template TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template ( const Column< double > &  inp,
const double  x,
const int32_t  multiplier,
Column< double > &  out 
)
template<typename T >
TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template ( const Column< T > &  inp,
const T  x,
const int32_t  multiplier,
Column< T > &  out 
)

Definition at line 681 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

684  {
685  int32_t size = inp.size();
686  for (int i = 0; i < size; ++i) {
687  out[i] = inp[i] * x;
688  }
689 
690  return size;
691 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template ( const Column< int8_t > &  inp,
const int8_t  x,
const int32_t  multiplier,
Column< int8_t > &  out 
)
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template ( const Column< int16_t > &  inp,
const int16_t  x,
const int32_t  multiplier,
Column< int16_t > &  out 
)
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template ( const Column< int32_t > &  inp,
const int32_t  x,
const int32_t  multiplier,
Column< int32_t > &  out 
)
template TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template ( const Column< int64_t > &  inp,
const int64_t  x,
const int32_t  multiplier,
Column< int64_t > &  out 
)
EXTENSION_NOINLINE int32_t ct_test_preflight_multicursor_qe227__cpu_ ( TableFunctionManager mgr,
const Column< int32_t > &  col,
const ColumnList< int32_t > &  lst,
const int  x,
const int  y,
Column< int32_t > &  out 
)

Definition at line 482 of file SignatureTestTableFunctions.cpp.

References ColumnList< T >::numCols(), TableFunctionManager::set_output_row_size(), and Column< T >::size().

487  {
488  mgr.set_output_row_size(lst.numCols() + 1);
489  out[0] = col[1];
490  for (int i = 0; i < lst.numCols(); i++) {
491  out[i + 1] = lst[i][1];
492  }
493  return out.size();
494 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE int64_t numCols() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_preflight_singlecursor_qe227__cpu_ ( TableFunctionManager mgr,
const Column< int32_t > &  col,
const ColumnList< int32_t > &  lst,
const int  x,
const int  y,
Column< int32_t > &  out 
)

Definition at line 467 of file SignatureTestTableFunctions.cpp.

References ColumnList< T >::numCols(), TableFunctionManager::set_output_row_size(), and Column< T >::size().

472  {
473  mgr.set_output_row_size(lst.numCols() + 1);
474  out[0] = col[0];
475  for (int i = 0; i < lst.numCols(); i++) {
476  out[i + 1] = lst[i][0];
477  }
478  return out.size();
479 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE int64_t numCols() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_preflight_sizer ( const Column< int32_t > &  input,
const int32_t  i,
const int32_t  j,
Column< int32_t > &  out 
)

Definition at line 448 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

451  {
452  out[0] = 123;
453  out[1] = 456;
454  return out.size();
455 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_preflight_sizer_const ( const Column< int32_t > &  input,
Column< int32_t > &  out 
)

Definition at line 457 of file SignatureTestTableFunctions.cpp.

References Column< T >::size().

458  {
459  out[0] = 789;
460  out[1] = 321;
461  return out.size();
462 }
DEVICE int64_t size() const

+ Here is the call graph for this function:

EXTENSION_NOINLINE int32_t ct_test_string_default_arg__cpu_ ( TableFunctionManager mgr,
const Column< TextEncodingDict > &  inp,
const TextEncodingNone suffix,
Column< TextEncodingDict > &  out 
)

Definition at line 747 of file SignatureTestTableFunctions.cpp.

References Column< TextEncodingDict >::getOrAddTransient(), TextEncodingNone::getString(), Column< TextEncodingDict >::getString(), TableFunctionManager::set_output_row_size(), and Column< TextEncodingDict >::size().

750  {
751  int32_t size = inp.size();
752  mgr.set_output_row_size(size);
753  for (int i = 0; i < size; ++i) {
754  std::string output_string = inp.getString(i);
755  output_string += suffix.getString();
756  const TextEncodingDict concatted_id = out.getOrAddTransient(output_string);
757  out[i] = concatted_id;
758  }
759 
760  return size;
761 }
DEVICE const std::string getString(int64_t index) const
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
std::string getString() const
Definition: heavydbTypes.h:641
DEVICE int64_t size() const
DEVICE const TextEncodingDict getOrAddTransient(const std::string &str)

+ Here is the call graph for this function: