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

Go to the source code of this file.

Macros

#define INSTANTIATE_CT_COPY(T)
 
#define INSTANTIATE_CT_CONCAT(T)
 
#define INSTANTIATE_CT_CONCAT2(T)
 
#define INSTANTIATE_CT_CONCAT3(T)
 

Functions

template<typename T >
NEVER_INLINE HOST int32_t ct_copy__generic_cpu_template (TableFunctionManager &mgr, const Column< T > &inputs, Column< T > &outputs)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic_cpu_template (TableFunctionManager &mgr, const Column< T > &input1, const Column< T > &input2, Column< T > &outputs)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic2_cpu_template (TableFunctionManager &mgr, const Column< T > &input1, const T &input2, Column< T > &output)
 
template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic3_cpu_template (TableFunctionManager &mgr, const T &input1, const Column< T > &input2, Column< T > &output)
 

Macro Definition Documentation

#define INSTANTIATE_CT_CONCAT (   T)
Value:
const Column<T>& input1, \
const Column<T>& input2, \
Column<T>& outputs);
#define HOST
#define NEVER_INLINE
NEVER_INLINE HOST int32_t ct_concat__generic_cpu_template(TableFunctionManager &mgr, const Column< T > &input1, const Column< T > &input2, Column< T > &outputs)

Definition at line 81 of file FlatBufferTableFunctions.cpp.

#define INSTANTIATE_CT_CONCAT2 (   T)
Value:
const Column<T>& input1, \
const T& input2, \
Column<T>& outputs);
#define HOST
NEVER_INLINE HOST int32_t ct_concat__generic2_cpu_template(TableFunctionManager &mgr, const Column< T > &input1, const T &input2, Column< T > &output)
#define NEVER_INLINE

Definition at line 110 of file FlatBufferTableFunctions.cpp.

#define INSTANTIATE_CT_CONCAT3 (   T)
Value:
const T& input1, \
const Column<T>& input2, \
Column<T>& outputs);
NEVER_INLINE HOST int32_t ct_concat__generic3_cpu_template(TableFunctionManager &mgr, const T &input1, const Column< T > &input2, Column< T > &output)
#define HOST
#define NEVER_INLINE

Definition at line 140 of file FlatBufferTableFunctions.cpp.

#define INSTANTIATE_CT_COPY (   T)
Value:
TableFunctionManager& mgr, const Column<T>& inputs, Column<T>& outputs);
NEVER_INLINE HOST int32_t ct_copy__generic_cpu_template(TableFunctionManager &mgr, const Column< T > &inputs, Column< T > &outputs)
#define HOST
#define NEVER_INLINE

Definition at line 44 of file FlatBufferTableFunctions.cpp.

Function Documentation

template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic2_cpu_template ( TableFunctionManager mgr,
const Column< T > &  input1,
const T &  input2,
Column< T > &  output 
)

Definition at line 91 of file FlatBufferTableFunctions.cpp.

94  {
95  auto size = input1.size();
97  input1.getNofValues() + size * input2.size());
98  mgr.set_output_row_size(size);
99  for (int64_t i = 0; i < size; i++) {
100  if (input1.isNull(i) || input2.isNull()) {
101  output.setNull(i);
102  } else {
103  output[i] = input1[i];
104  output[i] += input2;
105  }
106  }
107  return size;
108 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
Definition: heavydbTypes.h:367
template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic3_cpu_template ( TableFunctionManager mgr,
const T &  input1,
const Column< T > &  input2,
Column< T > &  output 
)

Definition at line 121 of file FlatBufferTableFunctions.cpp.

124  {
125  auto size = input2.size();
127  input2.getNofValues() + size * input1.size());
128  mgr.set_output_row_size(size);
129  for (int64_t i = 0; i < size; i++) {
130  if (input2.isNull(i) || input1.isNull()) {
131  output.setNull(i);
132  } else {
133  output[i] = input1;
134  output[i] += input2[i];
135  }
136  }
137  return size;
138 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
Definition: heavydbTypes.h:367
template<typename T >
NEVER_INLINE HOST int32_t ct_concat__generic_cpu_template ( TableFunctionManager mgr,
const Column< T > &  input1,
const Column< T > &  input2,
Column< T > &  outputs 
)

Definition at line 56 of file FlatBufferTableFunctions.cpp.

59  {
60  auto size = input1.size();
62  input1.getNofValues() + input2.getNofValues());
63  mgr.set_output_row_size(size);
64  for (int64_t i = 0; i < size; i++) {
65  if (input1.isNull(i)) {
66  if (input2.isNull(i)) {
67  outputs.setNull(i);
68  } else {
69  outputs[i] = input2[i];
70  }
71  } else if (input2.isNull(i)) {
72  outputs[i] = input1[i];
73  } else {
74  outputs[i] = input1[i];
75  outputs.concatItem(i, input2[i]);
76  }
77  }
78  return size;
79 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
Definition: heavydbTypes.h:367
template<typename T >
NEVER_INLINE HOST int32_t ct_copy__generic_cpu_template ( TableFunctionManager mgr,
const Column< T > &  inputs,
Column< T > &  outputs 
)

Definition at line 28 of file FlatBufferTableFunctions.cpp.

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

30  {
31  auto size = inputs.size();
32  mgr.set_output_item_values_total_number(0, inputs.getNofValues());
33  mgr.set_output_row_size(size);
34  for (int64_t i = 0; i < size; i++) {
35  if (inputs.isNull(i)) {
36  outputs.setNull(i);
37  } else {
38  outputs[i] = inputs[i];
39  }
40  }
41  return size;
42 }
void set_output_row_size(int64_t num_rows)
Definition: heavydbTypes.h:373
DEVICE int64_t size() const
DEVICE bool isNull(int64_t index) const
DEVICE void setNull(int64_t index)
void set_output_item_values_total_number(int32_t index, int64_t output_item_values_total_number)
Definition: heavydbTypes.h:367

+ Here is the call graph for this function: