27 template <
typename T,
typename U,
typename K>
31 if constexpr (std::is_same<T, TextEncodingDict>::value &&
32 std::is_same<U, TextEncodingDict>::value) {
34 for (int64_t i = 0; i < input1.
size(); i++) {
41 if constexpr (std::is_same<T, int32_t>::value && std::is_same<U, double>::value) {
43 }
else if constexpr (std::is_same<T, double>::value && std::is_same<U, double>::value) {
45 }
else if constexpr (std::is_same<T, int32_t>::value &&
46 std::is_same<U, int32_t>::value) {
48 }
else if constexpr (std::is_same<T, double>::value &&
49 std::is_same<U, int32_t>::value) {
77 #endif // #ifndef __CUDACC__
86 for (int64_t i = 0; i < input.
size(); i++) {
102 T acc1 = 0, acc2 = 0;
103 for (int64_t i = 0; i < input.
size(); i++) {
120 template <
typename T>
124 for (int64_t i = 0; i < c; i++) {
127 for (int64_t i = 0; i < input.
size(); i++) {
128 out[i % c] += input[i];
143 template <
typename T>
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];
152 return m * input.
size();
165 #endif // #ifndef __CUDACC__
169 template <
typename T>
180 #endif // #ifndef __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;
192 for (
auto i = start; i < stop; i += step) {
200 template <
typename T>
206 while (quotient >= 1) {
207 answer[counter++] = quotient;
222 #endif // #ifndef __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;
237 for (
auto i = start; i < stop; i += step) {
238 answer1[i] = num1 + i * num2;
239 answer2[i] = num1 - i * num2;
250 for (int32_t i = 0; i < c; i++) {
251 output[i] = input_num;
256 #endif // #ifndef __CUDACC__
260 template <
typename T>
265 for (int32_t i = 0; i < c; i++) {
266 output[i] = input_num;
281 #endif // #ifndef __CUDACC__
286 ct_no_cursor_user_constant_sizer__gpu_(
const int32_t input_num,
289 int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
290 int32_t step = blockDim.x * gridDim.x;
292 for (int32_t i = start; i < c; i += step) {
293 output[i] = input_num;
298 template <
typename T>
300 ct_templated_no_cursor_user_constant_sizer__gpu_template(
const T input_num,
303 int32_t start = threadIdx.x + blockDim.x * blockIdx.x;
304 int32_t step = blockDim.x * gridDim.x;
306 for (int32_t i = start; i < c; i += step) {
307 output[i] = input_num;
314 ct_templated_no_cursor_user_constant_sizer__gpu_template(
const int32_t input_num,
318 ct_templated_no_cursor_user_constant_sizer__gpu_template(
const float input_num,
351 template <
typename T,
typename K>
356 if constexpr (std::is_same<T, int32_t>::value) {
358 }
else if constexpr (std::is_same<T, double>::value) {
435 #endif // #ifndef __CUDACC__
442 out[0] = (i > 0 ? 12345 : 54321);
475 for (
int i = 0; i < lst.
numCols(); i++) {
476 out[i + 1] = lst[i][0];
490 for (
int i = 0; i < lst.
numCols(); i++) {
491 out[i + 1] = lst[i][1];
515 const int32_t num_rows = input_arg1.
size();
517 for (int32_t r = 0; r < num_rows; ++r) {
518 out1[r] = input_arg1[r] + arg1;
519 out2[r] = input_arg2[r] + arg2;
526 template <
typename T>
530 if constexpr (std::is_same<T, int64_t>::value) {
532 }
else if constexpr (std::is_same<T, Timestamp>::value) {
533 out[0] = scalar.time;
547 template <
typename T>
550 int64_t size = input.
size();
552 for (int64_t i = 0; i < size; ++i) {
584 template <
typename T,
typename K>
591 int64_t num_cols = col_list.
numCols();
593 for (int64_t i = 0; i < num_cols; ++i) {
595 for (int64_t j = 0; j < col.
size(); ++j) {
600 out[0] = first_col[0];
602 out[0] = last_col[0];
621 template <
typename T,
typename K>
629 int64_t num_cols = col_list1.
numCols();
631 for (int64_t i = 0; i < num_cols; ++i) {
633 for (int64_t j = 0; j < col.
size(); ++j) {
638 int64_t num_cols2 = col_list2.
numCols();
640 for (int64_t i = 0; i < num_cols2; ++i) {
642 for (int64_t j = 0; j < col.
size(); ++j) {
647 if (sum + sum2 > 0) {
648 out[0] = first_col[0];
650 out[0] = last_col[0];
670 #endif // ifndef __CUDACC__
674 const int32_t multiplier,
680 template <
typename T>
683 const int32_t multiplier,
685 int32_t size = inp.
size();
686 for (
int i = 0; i < size; ++i) {
697 const int32_t multiplier,
703 const int32_t multiplier,
709 const int32_t multiplier,
715 const int32_t multiplier,
718 template <
typename T>
721 const int32_t multiplier,
723 int32_t size = inp.
size();
724 for (
int i = 0; i < size; ++i) {
735 const int32_t multiplier,
741 const int32_t multiplier,
751 int32_t size = inp.
size();
753 for (
int i = 0; i < size; ++i) {
754 std::string output_string = inp.
getString(i);
757 out[i] = concatted_id;
767 int32_t size = input1.
size();
769 for (
int i = 0; i < size; ++i) {
779 int32_t size = input1.
size();
781 for (
int i = 0; i < size; ++i) {
791 int32_t size = input1.
size();
793 for (
int i = 0; i < size; ++i) {
803 int32_t size = input1.
size();
805 for (
int i = 0; i < size; ++i) {
811 template <
typename T>
819 for (
int i = 0; i < list.
numCols(); i++) {
820 out[i + 1] = list[i][0];
DEVICE const std::string getString(int64_t index) const
void set_output_row_size(int64_t num_rows)
EXTENSION_NOINLINE_HOST void set_output_row_size(int64_t num_rows)
EXTENSION_NOINLINE_HOST int32_t ct_require_text_enc_dict__cpu_(const Column< TextEncodingDict > &input, const int64_t x, Column< int64_t > &out)
#define EXTENSION_NOINLINE
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_cursor__cpu_(const Column< int64_t > &input, int64_t y, Column< int64_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)
std::string getString() const
DEVICE int64_t size() const
NEVER_INLINE HOST int32_t ct_named_rowmul_output__cpu_template(const Column< T > &input, int32_t m, Column< T > &out)
DEVICE int64_t numCols() const
EXTENSION_NOINLINE_HOST int32_t ct_require_mgr(TableFunctionManager &mgr, const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
TEMPLATE_NOINLINE int32_t ct_test_int_default_arg__template(const Column< T > &inp, const T x, const int32_t multiplier, Column< 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 int32_t ct_test_calcite_casting_char__cpu_(TableFunctionManager &mgr, const Column< TextEncodingDict > &input1, Column< TextEncodingDict > &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)
NEVER_INLINE HOST int32_t ct_overload_scalar_test__cpu_template(const T scalar, Column< 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)
std::string suffix(SQLTypes type)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_double__cpu_(TableFunctionManager &mgr, const Column< double > &input1, Column< double > &out)
NEVER_INLINE HOST int32_t ct_named_user_const_output__cpu_template(const Column< T > &input, int32_t c, Column< T > &out)
NEVER_INLINE HOST int32_t ct_overload_column_test__cpu_template(const Column< T > &input, Column< T > &out)
NEVER_INLINE HOST int32_t ct_templated_no_cursor_user_constant_sizer__cpu_template(const T input_num, int32_t c, Column< T > &output)
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)
NEVER_INLINE HOST int32_t ct_named_const_output__cpu_template(const Column< T > &input, Column< 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_string_default_arg__cpu_(TableFunctionManager &mgr, const Column< TextEncodingDict > &inp, const TextEncodingNone &suffix, Column< TextEncodingDict > &out)
#define EXTENSION_NOINLINE_HOST
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)
NEVER_INLINE HOST int32_t ct_scalar_1_arg_runtime_sizing__cpu_template(const T num, Column< T > &answer)
EXTENSION_NOINLINE_HOST int32_t ct_require_or_str__cpu_(const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
TEMPLATE_NOINLINE int32_t ct_test_float_default_arg__template(const Column< T > &inp, const T x, const int32_t multiplier, Column< 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)
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)
NEVER_INLINE HOST int32_t ct_require_templating__cpu_template(const Column< T > &input1, const int32_t i, Column< K > &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_str_diff__cpu_(const Column< int32_t > &input1, const TextEncodingNone &i, Column< int32_t > &out)
EXTENSION_NOINLINE int32_t ct_no_arg_constant_sizing(Column< int32_t > &answer)
EXTENSION_NOINLINE_HOST int32_t ct_test_allocator(TableFunctionManager &mgr, const Column< int32_t > &input, const TextEncodingNone &t, Column< int32_t > &out)
NEVER_INLINE HOST int32_t ct_named_output__cpu_template(const Column< T > &input, Column< T > &out)
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)
DEVICE int64_t size() const
TEMPLATE_NOINLINE int32_t ct_test_calcite_casting_columnlist__template_cpu_(TableFunctionManager &mgr, const Column< T > &first, const ColumnList< T > &list, Column< T > &out)
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)
DEVICE const TextEncodingDict getOrAddTransient(const std::string &str)
void enable_output_allocations()
NEVER_INLINE HOST int32_t ct_binding_column2__cpu_template(const Column< T > &input1, const Column< U > &input2, Column< K > &out)
NEVER_INLINE HOST int32_t ct_no_arg_runtime_sizing__cpu_template(Column< 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)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_timestamp__cpu_(TableFunctionManager &mgr, const Column< Timestamp > &input1, Column< Timestamp > &out)
#define TEMPLATE_NOINLINE
EXTENSION_NOINLINE_HOST int32_t ct_require__cpu_(const Column< int32_t > &input1, const int32_t i, Column< int32_t > &out)
EXTENSION_NOINLINE int32_t ct_test_calcite_casting_bigint__cpu_(TableFunctionManager &mgr, const Column< int64_t > &input1, Column< int64_t > &out)