OmniSciDB  c0231cc57d
 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 854 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 859 of file heavydbTypes.h.

860  : ptrs_(ptrs), num_cols_(num_cols), num_rows_(num_rows) {}
int64_t num_rows_
Definition: heavydbTypes.h:857
int8_t ** ptrs_
Definition: heavydbTypes.h:855
int64_t num_cols_
Definition: heavydbTypes.h:856

Member Function Documentation

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

Definition at line 864 of file heavydbTypes.h.

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

864  {
865  if (index >= 0 && index < num_cols_)
866  return {reinterpret_cast<T*>(ptrs_[index]), num_rows_};
867  else
868  return {nullptr, -1};
869  }
int64_t num_rows_
Definition: heavydbTypes.h:857
int8_t ** ptrs_
Definition: heavydbTypes.h:855
int64_t num_cols_
Definition: heavydbTypes.h:856
template<typename T>
DEVICE int64_t ColumnList< T >::size ( ) const
inline

Definition at line 862 of file heavydbTypes.h.

References ColumnList< T >::num_rows_.

Referenced by TableFunctions_Namespace::strip_column_metadata().

862 { return num_rows_; }
int64_t num_rows_
Definition: heavydbTypes.h:857

+ Here is the caller graph for this function:

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

Definition at line 873 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().

873  {
874  std::string result = ::typeName(this) + "(ptrs=[";
875  for (int64_t index = 0; index < num_cols_; index++) {
876  result += ::toString(reinterpret_cast<void*>(ptrs_[index])) +
877  (index < num_cols_ - 1 ? ", " : "");
878  }
879  result += "], num_cols=" + std::to_string(num_cols_) +
880  ", num_rows=" + std::to_string(num_rows_) + ")";
881  return result;
882  }
int64_t num_rows_
Definition: heavydbTypes.h:857
std::string to_string(char const *&&v)
std::string toString() const
Definition: heavydbTypes.h:873
int8_t ** ptrs_
Definition: heavydbTypes.h:855
int64_t num_cols_
Definition: heavydbTypes.h:856
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: