Compute Library
 22.08
AuxMemoryInfo Struct Reference

Memory Info for a WorkloadTensor of Auxiliary memory type. More...

#include <IWorkload.h>

Public Member Functions

 AuxMemoryInfo ()=default
 
 AuxMemoryInfo (size_t size, size_t alignment=0) noexcept
 
 AuxMemoryInfo (AuxMemoryLifetime lifetime, size_t size, size_t alignment=0) noexcept
 

Data Fields

AuxMemoryLifetime lifetime { AuxMemoryLifetime::Temporary }
 Memory lifetime. More...
 
size_t size { 0 }
 Total memory size in bytes. More...
 
size_t alignment { 64 }
 Memory alignment in bytes. More...
 

Friends

bool operator== (const AuxMemoryInfo &info0, const AuxMemoryInfo &info1)
 

Detailed Description

Memory Info for a WorkloadTensor of Auxiliary memory type.

This communicates to the user how much additional memory is required for auxiliary tensors

Definition at line 70 of file IWorkload.h.

Constructor & Destructor Documentation

◆ AuxMemoryInfo() [1/3]

AuxMemoryInfo ( )
default

◆ AuxMemoryInfo() [2/3]

AuxMemoryInfo ( size_t  size,
size_t  alignment = 0 
)
inlinenoexcept

Definition at line 74 of file IWorkload.h.

75  : size(size),
77  {
78  }
size_t size
Total memory size in bytes.
Definition: IWorkload.h:92
size_t alignment
Memory alignment in bytes.
Definition: IWorkload.h:93

◆ AuxMemoryInfo() [3/3]

AuxMemoryInfo ( AuxMemoryLifetime  lifetime,
size_t  size,
size_t  alignment = 0 
)
inlinenoexcept

Definition at line 80 of file IWorkload.h.

81  : lifetime(lifetime),
82  size(size),
84  {
85  }
size_t size
Total memory size in bytes.
Definition: IWorkload.h:92
AuxMemoryLifetime lifetime
Memory lifetime.
Definition: IWorkload.h:91
size_t alignment
Memory alignment in bytes.
Definition: IWorkload.h:93

Friends And Related Function Documentation

◆ operator==

bool operator== ( const AuxMemoryInfo info0,
const AuxMemoryInfo info1 
)
friend

Definition at line 86 of file IWorkload.h.

87  {
88  return info0.lifetime == info1.lifetime && info0.size == info1.size && info0.alignment == info1.alignment;
89  }

Field Documentation

◆ alignment

size_t alignment { 64 }

Memory alignment in bytes.

Definition at line 93 of file IWorkload.h.

◆ lifetime

Memory lifetime.

Definition at line 91 of file IWorkload.h.

◆ size

size_t size { 0 }

Total memory size in bytes.

Definition at line 92 of file IWorkload.h.


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