OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ColumnList< T > Struct Template Reference

#include <heavydbTypes.h>

Public Member Functions

DEVICE ColumnList (int8_t **ptrs, const int64_t num_cols, const int64_t num_rows)
 
DEVICE int64_t size () const
 
DEVICE int64_t numCols () const
 
DEVICE Column< T > operator[] (const int index) const
 
std::string toString () const
 

Public Attributes

int8_t ** ptrs_
 
int64_t num_cols_
 
int64_t num_rows_
 

Detailed Description

template<typename T>
struct ColumnList< T >

Definition at line 988 of file heavydbTypes.h.

Constructor & Destructor Documentation

template<typename T>
DEVICE ColumnList< T >::ColumnList ( int8_t **  ptrs,
const int64_t  num_cols,
const int64_t  num_rows 
)
inline

Definition at line 993 of file heavydbTypes.h.

994  : ptrs_(ptrs), num_cols_(num_cols), num_rows_(num_rows) {}
int64_t num_rows_
Definition: heavydbTypes.h:991
int8_t ** ptrs_
Definition: heavydbTypes.h:989
int64_t num_cols_
Definition: heavydbTypes.h:990

Member Function Documentation

template<typename T>
DEVICE Column<T> ColumnList< T >::operator[] ( const int  index) const
inline

Definition at line 998 of file heavydbTypes.h.

References ColumnList< T >::num_cols_, ColumnList< T >::num_rows_, ColumnList< T >::ptrs_, and heavydb.dtypes::T.

998  {
999  if (index >= 0 && index < num_cols_)
1000  return {reinterpret_cast<T*>(ptrs_[index]), num_rows_};
1001  else
1002  return {nullptr, -1};
1003  }
int64_t num_rows_
Definition: heavydbTypes.h:991
int8_t ** ptrs_
Definition: heavydbTypes.h:989
int64_t num_cols_
Definition: heavydbTypes.h:990
template<typename T>
DEVICE int64_t ColumnList< T >::size ( ) const
inline

Definition at line 996 of file heavydbTypes.h.

References ColumnList< T >::num_rows_.

Referenced by TableFunctions_Namespace::strip_column_metadata().

996 { return num_rows_; }
int64_t num_rows_
Definition: heavydbTypes.h:991

+ Here is the caller graph for this function:

template<typename T>
std::string ColumnList< T >::toString ( ) const
inline

Definition at line 1007 of file heavydbTypes.h.

References ColumnList< T >::num_cols_, ColumnList< T >::num_rows_, ColumnList< T >::ptrs_, run_benchmark_import::result, to_string(), and typeName().

Referenced by ColumnList< Array< T > >::toString(), and ColumnList< TextEncodingDict >::toString().

1007  {
1008  std::string result = ::typeName(this) + "(ptrs=[";
1009  for (int64_t index = 0; index < num_cols_; index++) {
1010  result += ::toString(reinterpret_cast<void*>(ptrs_[index])) +
1011  (index < num_cols_ - 1 ? ", " : "");
1012  }
1013  result += "], num_cols=" + std::to_string(num_cols_) +
1014  ", num_rows=" + std::to_string(num_rows_) + ")";
1015  return result;
1016  }
int64_t num_rows_
Definition: heavydbTypes.h:991
std::string to_string(char const *&&v)
std::string toString() const
int8_t ** ptrs_
Definition: heavydbTypes.h:989
int64_t num_cols_
Definition: heavydbTypes.h:990
std::string typeName(const T *v)
Definition: toString.h:103

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation


The documentation for this struct was generated from the following file: