OmniSciDB  04ee39c94c
RenderAllocator Class Reference

#include <RenderAllocator.h>

+ Inheritance diagram for RenderAllocator:
+ Collaboration diagram for RenderAllocator:

Public Member Functions

 RenderAllocator (int8_t *preallocated_ptr, const size_t preallocated_size, const size_t device_id, const unsigned block_size_x, const unsigned grid_size_x, const RAExecutionPolicy execution_policy=RAExecutionPolicy::Device)
 
int8_t * alloc (const size_t bytes) final
 
void markChunkComplete ()
 
size_t getCurrentChunkOffset () const
 
size_t getCurrentChunkSize () const
 
size_t getAllocatedSize () const
 
int8_t * getBasePtr () const
 
RAExecutionPolicy getExecutionPolicy () const
 
- Public Member Functions inherited from Allocator
 Allocator ()
 
virtual ~Allocator ()
 

Private Attributes

int8_t * preallocated_ptr_
 
const size_t preallocated_size_
 
const size_t device_id_
 
size_t crt_chunk_offset_bytes_
 
size_t crt_allocated_bytes_
 
std::unique_ptr< std::mutex > alloc_mtx_ptr_
 
RAExecutionPolicy execution_policy_
 

Detailed Description

Definition at line 55 of file RenderAllocator.h.

Constructor & Destructor Documentation

◆ RenderAllocator()

RenderAllocator::RenderAllocator ( int8_t *  preallocated_ptr,
const size_t  preallocated_size,
const size_t  device_id,
const unsigned  block_size_x,
const unsigned  grid_size_x,
const RAExecutionPolicy  execution_policy = RAExecutionPolicy::Device 
)

Definition at line 21 of file RenderAllocator.cpp.

References CHECK.

27  : preallocated_size_(preallocated_size), device_id_(device_id) {
28  CHECK(false);
29 }
const size_t preallocated_size_
const size_t device_id_
#define CHECK(condition)
Definition: Logger.h:187

Member Function Documentation

◆ alloc()

int8_t * RenderAllocator::alloc ( const size_t  bytes)
finalvirtual

Implements Allocator.

Definition at line 31 of file RenderAllocator.cpp.

References CHECK.

31  {
32  CHECK(false);
33  return 0;
34 }
#define CHECK(condition)
Definition: Logger.h:187

◆ getAllocatedSize()

size_t RenderAllocator::getAllocatedSize ( ) const

Definition at line 50 of file RenderAllocator.cpp.

References CHECK.

Referenced by QueryMemoryInitializer::allocateCountDistinctSet().

50  {
51  CHECK(false);
52  return 0;
53 }
#define CHECK(condition)
Definition: Logger.h:187
+ Here is the caller graph for this function:

◆ getBasePtr()

int8_t * RenderAllocator::getBasePtr ( ) const

Definition at line 55 of file RenderAllocator.cpp.

References CHECK.

55  {
56  CHECK(false);
57  return nullptr;
58 }
#define CHECK(condition)
Definition: Logger.h:187

◆ getCurrentChunkOffset()

size_t RenderAllocator::getCurrentChunkOffset ( ) const

Definition at line 40 of file RenderAllocator.cpp.

References CHECK.

40  {
41  CHECK(false);
42  return 0;
43 }
#define CHECK(condition)
Definition: Logger.h:187

◆ getCurrentChunkSize()

size_t RenderAllocator::getCurrentChunkSize ( ) const

Definition at line 45 of file RenderAllocator.cpp.

References CHECK.

45  {
46  CHECK(false);
47  return 0;
48 }
#define CHECK(condition)
Definition: Logger.h:187

◆ getExecutionPolicy()

RAExecutionPolicy RenderAllocator::getExecutionPolicy ( ) const

Definition at line 60 of file RenderAllocator.cpp.

References CHECK, and Host.

60  {
61  CHECK(false);
63 }
#define CHECK(condition)
Definition: Logger.h:187

◆ markChunkComplete()

void RenderAllocator::markChunkComplete ( )

Definition at line 36 of file RenderAllocator.cpp.

References CHECK.

36  {
37  CHECK(false);
38 }
#define CHECK(condition)
Definition: Logger.h:187

Member Data Documentation

◆ alloc_mtx_ptr_

std::unique_ptr<std::mutex> RenderAllocator::alloc_mtx_ptr_
private

Definition at line 83 of file RenderAllocator.h.

◆ crt_allocated_bytes_

size_t RenderAllocator::crt_allocated_bytes_
private

Definition at line 81 of file RenderAllocator.h.

◆ crt_chunk_offset_bytes_

size_t RenderAllocator::crt_chunk_offset_bytes_
private

Definition at line 80 of file RenderAllocator.h.

◆ device_id_

const size_t RenderAllocator::device_id_
private

Definition at line 79 of file RenderAllocator.h.

◆ execution_policy_

RAExecutionPolicy RenderAllocator::execution_policy_
private

Definition at line 85 of file RenderAllocator.h.

◆ preallocated_ptr_

int8_t* RenderAllocator::preallocated_ptr_
private

Definition at line 77 of file RenderAllocator.h.

◆ preallocated_size_

const size_t RenderAllocator::preallocated_size_
private

Definition at line 78 of file RenderAllocator.h.


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