OmniSciDB  b28c0d5765
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
heavydbTypes.h File Reference
#include <cstring>
#include <limits>
#include <stdexcept>
#include <type_traits>
#include "DateTruncate.h"
#include "ExtractFromTime.h"
#include "TableFunctionMetadataType.h"
#include "Utils/FlatBuffer.h"
#include "DateAdd.h"
#include "../Shared/DateTimeParser.h"
#include "../Shared/InlineNullValues.h"
#include "../Shared/funcannotations.h"
#include "../Shared/toString.h"
#include "../StringDictionary/StringDictionaryProxy.h"
+ Include dependency graph for heavydbTypes.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TextEncodingDict
 
struct  Array< T >
 
struct  TextEncodingNone
 
struct  Timestamp
 
struct  DayTimeInterval
 
struct  YearMonthTimeInterval
 
struct  GeoPoint
 
struct  GeoMultiPoint
 
struct  GeoLineString
 
struct  GeoMultiLineString
 
struct  GeoPolygon
 Simplified core of GeoJSON Polygon coordinates definition. More...
 
struct  GeoMultiPolygon
 Simplified core of GeoJSON MultiPolygon coordinates definition. More...
 
struct  Column< T >
 
struct  Column< Array< T > >
 
struct  Column< TextEncodingDict >
 
struct  ColumnList< T >
 
struct  ColumnList< Array< T > >
 
struct  ColumnList< TextEncodingDict >
 
struct  RowFunctionManager
 
struct  TableFunctionManager
 

Namespaces

 anonymous_namespace{heavydbTypes.h}
 

Macros

#define EXTENSION_INLINE_HOST   extern "C" RUNTIME_EXPORT ALWAYS_INLINE HOST
 
#define EXTENSION_NOINLINE_HOST   extern "C" RUNTIME_EXPORT NEVER_INLINE HOST
 
#define EXTENSION_INLINE   extern "C" RUNTIME_EXPORT ALWAYS_INLINE DEVICE
 
#define EXTENSION_NOINLINE   extern "C" RUNTIME_EXPORT NEVER_INLINE DEVICE
 
#define TEMPLATE_INLINE   ALWAYS_INLINE DEVICE
 
#define TEMPLATE_NOINLINE   NEVER_INLINE DEVICE
 
#define FUNC_NAME   (std::string(__func__).substr(0, std::string(__func__).find("__")))
 
#define ERROR_STRING(MSG)
 
#define TABLE_FUNCTION_ERROR(MSG)   table_function_error(ERROR_STRING(MSG))
 
#define ERROR_MESSAGE(MSG)   error_message(ERROR_STRING(MSG))
 

Functions

EXTENSION_NOINLINE int8_t * allocate_varlen_buffer (int64_t element_count, int64_t element_size)
 
EXTENSION_NOINLINE_HOST void set_output_array_values_total_number (int32_t index, int64_t output_array_values_total_number)
 
EXTENSION_NOINLINE_HOST void set_output_row_size (int64_t num_rows)
 
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_array_values_total_number (int8_t *mgr_ptr, int32_t index, int64_t output_array_values_total_number)
 
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_row_size (int8_t *mgr_ptr, int64_t num_rows)
 
EXTENSION_NOINLINE_HOST int8_t * TableFunctionManager_get_singleton ()
 
EXTENSION_NOINLINE_HOST int32_t table_function_error (const char *message)
 
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_error_message (int8_t *mgr_ptr, const char *message)
 
EXTENSION_NOINLINE_HOST void TableFunctionManager_set_metadata (int8_t *mgr_ptr, const char *key, const uint8_t *raw_bytes, const size_t num_bytes, const TableFunctionMetadataType value_type)
 
EXTENSION_NOINLINE_HOST void TableFunctionManager_get_metadata (int8_t *mgr_ptr, const char *key, const uint8_t *&raw_bytes, size_t &num_bytes, TableFunctionMetadataType &value_type)
 
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getNewDictId (int8_t *mgr_ptr)
 
std::string TableFunctionManager_getString (int8_t *mgr_ptr, int32_t dict_id, int32_t string_id)
 
EXTENSION_NOINLINE_HOST const
char * 
TableFunctionManager_getCString (int8_t *mgr_ptr, int32_t dict_id, int32_t string_id)
 
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getOrAddTransient (int8_t *mgr_ptr, int32_t dict_id, std::string str)
 
RUNTIME_EXPORT NEVER_INLINE
HOST std::string 
RowFunctionManager_getString (int8_t *mgr_ptr, int32_t dict_id, int32_t string_id)
 
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getDictId (int8_t *mgr_ptr, size_t arg_idx)
 
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getOrAddTransient (int8_t *mgr_ptr, int32_t dict_id, std::string str)
 
template<>
DEVICE TextEncodingDict inline_null_value ()
 
template<>
DEVICE Timestamp inline_null_value ()
 
template<>
CONSTEXPR DEVICE void set_null< Timestamp > (Timestamp &t)
 
template<typename T >
TableFunctionMetadataType anonymous_namespace{heavydbTypes.h}::get_metadata_type ()
 

Macro Definition Documentation

#define ERROR_MESSAGE (   MSG)    error_message(ERROR_STRING(MSG))

Definition at line 69 of file heavydbTypes.h.

#define ERROR_STRING (   MSG)
Value:
(std::string(__FILE__).substr(std::string(__FILE__).rfind("/") + 1) + ":" + \
std::to_string(__LINE__) + " " + FUNC_NAME + ": " + MSG) \
.c_str()
std::string to_string(char const *&&v)
#define FUNC_NAME
Definition: heavydbTypes.h:62

Definition at line 64 of file heavydbTypes.h.

#define EXTENSION_INLINE   extern "C" RUNTIME_EXPORT ALWAYS_INLINE DEVICE

Definition at line 51 of file heavydbTypes.h.

#define EXTENSION_INLINE_HOST   extern "C" RUNTIME_EXPORT ALWAYS_INLINE HOST

Definition at line 48 of file heavydbTypes.h.

#define EXTENSION_NOINLINE   extern "C" RUNTIME_EXPORT NEVER_INLINE DEVICE

Definition at line 52 of file heavydbTypes.h.

#define EXTENSION_NOINLINE_HOST   extern "C" RUNTIME_EXPORT NEVER_INLINE HOST

Definition at line 49 of file heavydbTypes.h.

#define FUNC_NAME   (std::string(__func__).substr(0, std::string(__func__).find("__")))

Definition at line 62 of file heavydbTypes.h.

#define TABLE_FUNCTION_ERROR (   MSG)    table_function_error(ERROR_STRING(MSG))

Definition at line 68 of file heavydbTypes.h.

Referenced by column_list_safe_row_sum__cpu_template(), and ct_sleep1__cpu_().

#define TEMPLATE_INLINE   ALWAYS_INLINE DEVICE

Definition at line 53 of file heavydbTypes.h.

#define TEMPLATE_NOINLINE   NEVER_INLINE DEVICE

Definition at line 54 of file heavydbTypes.h.

Function Documentation

EXTENSION_NOINLINE int8_t* allocate_varlen_buffer ( int64_t  element_count,
int64_t  element_size 
)

Referenced by Array< T >::Array(), and TextEncodingNone::TextEncodingNone().

+ Here is the caller graph for this function:

template<>
DEVICE TextEncodingDict inline_null_value ( )
inline

Definition at line 177 of file heavydbTypes.h.

References TextEncodingDict::value.

177  {
178 #ifndef __CUDACC__
179  return TextEncodingDict(inline_int_null_value<int32_t>());
180 #else
181  TextEncodingDict null_val;
182  null_val.value = inline_int_null_value<int32_t>();
183  return null_val;
184 #endif
185 }
template<>
DEVICE Timestamp inline_null_value ( )
inline

Definition at line 456 of file heavydbTypes.h.

456  {
457  return Timestamp(inline_int_null_value<int64_t>());
458 }
EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getDictId ( int8_t *  mgr_ptr,
size_t  arg_idx 
)

Referenced by RowFunctionManager::getDictId().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST int32_t RowFunctionManager_getOrAddTransient ( int8_t *  mgr_ptr,
int32_t  dict_id,
std::string  str 
)

Referenced by RowFunctionManager::getOrAddTransient().

+ Here is the caller graph for this function:

RUNTIME_EXPORT NEVER_INLINE HOST std::string RowFunctionManager_getString ( int8_t *  mgr_ptr,
int32_t  dict_id,
int32_t  string_id 
)

Referenced by RowFunctionManager::getString().

+ Here is the caller graph for this function:

template<>
CONSTEXPR DEVICE void set_null< Timestamp > ( Timestamp t)
inline

Definition at line 970 of file heavydbTypes.h.

References set_null().

970  {
971  set_null(t.time);
972 }
int64_t time
Definition: heavydbTypes.h:306
CONSTEXPR DEVICE void set_null(T &value)

+ Here is the call graph for this function:

EXTENSION_NOINLINE_HOST void set_output_array_values_total_number ( int32_t  index,
int64_t  output_array_values_total_number 
)
EXTENSION_NOINLINE_HOST int32_t table_function_error ( const char *  message)
EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_error_message ( int8_t *  mgr_ptr,
const char *  message 
)

Referenced by TableFunctionManager::error_message().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST void TableFunctionManager_get_metadata ( int8_t *  mgr_ptr,
const char *  key,
const uint8_t *&  raw_bytes,
size_t &  num_bytes,
TableFunctionMetadataType value_type 
)

Referenced by TableFunctionManager::get_metadata().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST int8_t* TableFunctionManager_get_singleton ( )

Referenced by TableFunctionManager::get_singleton().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST const char* TableFunctionManager_getCString ( int8_t *  mgr_ptr,
int32_t  dict_id,
int32_t  string_id 
)

Referenced by TableFunctionManager::getCString().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getNewDictId ( int8_t *  mgr_ptr)

Referenced by TableFunctionManager::getNewDictId().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST int32_t TableFunctionManager_getOrAddTransient ( int8_t *  mgr_ptr,
int32_t  dict_id,
std::string  str 
)

Referenced by TableFunctionManager::getOrAddTransient().

+ Here is the caller graph for this function:

std::string TableFunctionManager_getString ( int8_t *  mgr_ptr,
int32_t  dict_id,
int32_t  string_id 
)

Referenced by TableFunctionManager::getString().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST void TableFunctionManager_set_metadata ( int8_t *  mgr_ptr,
const char *  key,
const uint8_t *  raw_bytes,
const size_t  num_bytes,
const TableFunctionMetadataType  value_type 
)

Referenced by TableFunctionManager::set_metadata().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_array_values_total_number ( int8_t *  mgr_ptr,
int32_t  index,
int64_t  output_array_values_total_number 
)

Referenced by TableFunctionManager::set_output_array_values_total_number().

+ Here is the caller graph for this function:

EXTENSION_NOINLINE_HOST void TableFunctionManager_set_output_row_size ( int8_t *  mgr_ptr,
int64_t  num_rows 
)

Referenced by TableFunctionManager::set_output_row_size().

+ Here is the caller graph for this function: