Compute Library
 22.11
MemoryInfo Struct Reference

#include <Types.h>

Public Member Functions

 MemoryInfo ()=default
 
 MemoryInfo (int slot, size_t size, size_t alignment=0) noexcept
 
 MemoryInfo (int slot, MemoryLifetime lifetime, size_t size, size_t alignment=0) noexcept
 
bool merge (int slot, size_t new_size, size_t new_alignment=0) noexcept
 

Data Fields

int slot { ACL_UNKNOWN }
 
MemoryLifetime lifetime { MemoryLifetime::Temporary }
 
size_t size { 0 }
 
size_t alignment { 64 }
 

Detailed Description

Definition at line 96 of file Types.h.

Constructor & Destructor Documentation

◆ MemoryInfo() [1/3]

MemoryInfo ( )
default

◆ MemoryInfo() [2/3]

MemoryInfo ( int  slot,
size_t  size,
size_t  alignment = 0 
)
inlinenoexcept

Definition at line 100 of file Types.h.

◆ MemoryInfo() [3/3]

MemoryInfo ( int  slot,
MemoryLifetime  lifetime,
size_t  size,
size_t  alignment = 0 
)
inlinenoexcept

Definition at line 107 of file Types.h.

Member Function Documentation

◆ merge()

bool merge ( int  slot,
size_t  new_size,
size_t  new_alignment = 0 
)
inlinenoexcept

Definition at line 115 of file Types.h.

Referenced by CpuWinogradConv2d::configure().

116  {
117  if(slot != this->slot)
118  {
119  return false;
120  }
121 
122  size = std::max(size, new_size);
123  alignment = std::max(alignment, new_alignment);
124 
125  return true;
126  }

Field Documentation

◆ alignment

size_t alignment { 64 }

Definition at line 131 of file Types.h.

◆ lifetime

Definition at line 129 of file Types.h.

◆ size

size_t size { 0 }

Definition at line 130 of file Types.h.

◆ slot

int slot { ACL_UNKNOWN }

Definition at line 128 of file Types.h.


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