OmniSciDB  c0231cc57d
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VarlenOutputInfo Struct Reference

#include <ResultSetStorage.h>

Public Member Functions

int8_t * computeCpuOffset (const int64_t gpu_offset_address) const
 

Public Attributes

int64_t gpu_start_address
 
int8_t * cpu_buffer_ptr
 

Detailed Description

Definition at line 89 of file ResultSetStorage.h.

Member Function Documentation

int8_t * VarlenOutputInfo::computeCpuOffset ( const int64_t  gpu_offset_address) const

Definition at line 41 of file ResultSetStorage.cpp.

References CHECK_GE, cpu_buffer_ptr, and gpu_start_address.

41  {
42  const auto gpu_start_address_ptr = reinterpret_cast<int8_t*>(gpu_start_address);
43  const auto gpu_offset_address_ptr = reinterpret_cast<int8_t*>(gpu_offset_address);
44  if (gpu_offset_address_ptr == 0) {
45  return 0;
46  }
47  const auto offset_bytes =
48  static_cast<int64_t>(gpu_offset_address_ptr - gpu_start_address_ptr);
49  CHECK_GE(offset_bytes, int64_t(0));
50  return cpu_buffer_ptr + offset_bytes;
51 }
#define CHECK_GE(x, y)
Definition: Logger.h:235

Member Data Documentation

int8_t* VarlenOutputInfo::cpu_buffer_ptr

Definition at line 91 of file ResultSetStorage.h.

Referenced by computeCpuOffset().

int64_t VarlenOutputInfo::gpu_start_address

Definition at line 90 of file ResultSetStorage.h.

Referenced by computeCpuOffset().


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