OmniSciDB  04ee39c94c
MediumGpuBufferMemory Class Reference
+ Inheritance diagram for MediumGpuBufferMemory:
+ Collaboration diagram for MediumGpuBufferMemory:

Public Member Functions

void SetUp () override
 
void TearDown () override
 

Private Attributes

size_t max_mem_allocation_state_
 
bool allow_cpu_retry_state_
 

Detailed Description

Definition at line 211 of file BumpAllocatorTest.cpp.

Member Function Documentation

◆ SetUp()

void MediumGpuBufferMemory::SetUp ( )
inlineoverride

Definition at line 213 of file BumpAllocatorTest.cpp.

References CPU, g_allow_cpu_retry, g_max_memory_allocation_size, anonymous_namespace{BumpAllocatorTest.cpp}::g_num_gpus, QueryRunner::QueryRunner::get(), run_multiple_agg(), QueryRunner::QueryRunner::runDDLStatement(), and to_string().

213  {
214  const std::string drop_table_stmt{"DROP TABLE IF EXISTS test;"};
215  QR::get()->runDDLStatement(drop_table_stmt);
216  const std::string create_table_stmt{
217  "CREATE TABLE test (x INT, y BIGINT) WITH (FRAGMENT_SIZE=32);"};
218  QR::get()->runDDLStatement(create_table_stmt);
219 
220  // Insert enough data to just barely overflow
221  for (size_t i = 0; i < 64 * g_num_gpus; i++) {
222  const std::string insert_stmt{"INSERT INTO test VALUES (" + std::to_string(i) +
223  ", " + std::to_string(i) + ");"};
225  }
226 
229 
230  // CPU retry off to disable automatic punt to CPU
232  g_allow_cpu_retry = false;
233  }
bool g_allow_cpu_retry
Definition: Execute.cpp:72
std::string to_string(char const *&&v)
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
size_t g_max_memory_allocation_size
Definition: Execute.cpp:92
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:

◆ TearDown()

void MediumGpuBufferMemory::TearDown ( )
inlineoverride

Definition at line 235 of file BumpAllocatorTest.cpp.

References g_allow_cpu_retry, anonymous_namespace{BumpAllocatorTest.cpp}::g_keep_data, g_max_memory_allocation_size, QueryRunner::QueryRunner::get(), and QueryRunner::QueryRunner::runDDLStatement().

235  {
236  if (!g_keep_data) {
237  const std::string drop_table_stmt{"DROP TABLE IF EXISTS test;"};
238  QR::get()->runDDLStatement(drop_table_stmt);
239  }
240 
242 
244  }
bool g_allow_cpu_retry
Definition: Execute.cpp:72
virtual void runDDLStatement(const std::string &)
static QueryRunner * get()
Definition: QueryRunner.h:115
size_t g_max_memory_allocation_size
Definition: Execute.cpp:92
+ Here is the call graph for this function:

Member Data Documentation

◆ allow_cpu_retry_state_

bool MediumGpuBufferMemory::allow_cpu_retry_state_
private

Definition at line 248 of file BumpAllocatorTest.cpp.

◆ max_mem_allocation_state_

size_t MediumGpuBufferMemory::max_mem_allocation_state_
private

Definition at line 247 of file BumpAllocatorTest.cpp.


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