OmniSciDB  49c0524acb
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Array< T > Struct Template Reference

Public Member Functions

DEVICEoperator() (const std::size_t index)
 
DEVICE std::size_t getSize () const
 
DEVICE bool isNull () const
 
DEVICE constexpr T null_value ()
 

Public Attributes

T * ptr
 
std::size_t sz
 
bool is_null
 

Detailed Description

template<typename T>
struct Array< T >

Definition at line 30 of file udf_sample.cpp.

Member Function Documentation

template<typename T>
DEVICE std::size_t Array< T >::getSize ( ) const
inline

Definition at line 42 of file udf_sample.cpp.

References Array< T >::sz.

Referenced by array_sz_double(), array_sz_int32(), and array_sz_int64().

42 { return sz; }
std::size_t sz
Definition: udf_sample.cpp:32

+ Here is the caller graph for this function:

template<typename T>
DEVICE bool Array< T >::isNull ( ) const
inline

Definition at line 44 of file udf_sample.cpp.

References Array< T >::is_null.

Referenced by array_is_null_double(), array_is_null_int32(), and array_is_null_int64().

44 { return is_null; }
bool is_null
Definition: udf_sample.cpp:33

+ Here is the caller graph for this function:

template<typename T>
DEVICE constexpr T Array< T >::null_value ( )
inline

Definition at line 46 of file udf_sample.cpp.

Referenced by array_at_int32_is_null(), and array_at_int64_is_null().

46  {
47  return std::is_signed<T>::value ? std::numeric_limits<T>::min()
48  : std::numeric_limits<T>::max();
49  }

+ Here is the caller graph for this function:

template<typename T>
DEVICE T Array< T >::operator() ( const std::size_t  index)
inline

Definition at line 35 of file udf_sample.cpp.

References Array< T >::ptr, and Array< T >::sz.

35  {
36  if (index < sz)
37  return ptr[index];
38  else
39  return 0; // see array_at
40  }
std::size_t sz
Definition: udf_sample.cpp:32
T * ptr
Definition: udf_sample.cpp:31

Member Data Documentation

template<typename T>
bool Array< T >::is_null

Definition at line 33 of file udf_sample.cpp.

Referenced by Array< T >::isNull().

template<typename T>
T* Array< T >::ptr

Definition at line 31 of file udf_sample.cpp.

Referenced by Array< T >::operator()().

template<typename T>
std::size_t Array< T >::sz

Definition at line 32 of file udf_sample.cpp.

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


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