Brick Library  0.1
Performance-portable stencil datalayout & codegen
Public Types | Public Member Functions | Public Attributes | List of all members
BrickInfo< dims > Struct Template Reference

Metadata related to bricks. More...

#include <brick.h>

Inheritance diagram for BrickInfo< dims >:
[legend]
Collaboration diagram for BrickInfo< dims >:
[legend]

Public Types

typedef unsigned(* adjlist)[static_power< 3, dims >::value]
 Adjacency list type. More...
 

Public Member Functions

 BrickInfo (unsigned nbricks)
 Creating an empty metadata consisting of the specified number of bricks. More...
 
BrickStorage allocate (long step)
 Allocate a new brick storage BrickStorage::allocate() More...
 
BrickStorage mmap_alloc (long step)
 Allocate a new brick storage BrickStorage::mmap_alloc(long, long) More...
 
BrickStorage mmap_alloc (long step, void *mmap_fd, size_t offset)
 Allocate a new brick storage BrickStorage::mmap_alloc(long, long, void*, size_t) More...
 

Public Attributes

adjlist adj
 Adjacency list. More...
 
unsigned nbricks
 Number of bricks in this list. More...
 

Detailed Description

template<unsigned dims>
struct BrickInfo< dims >

Metadata related to bricks.

Template Parameters
dimsIt stores the adjacency list used by the computation. One of this data structure can be shared among multiple bricks. In fact, for computation to succeed, it will require having the same adjacencies for all participating bricks.

Each index of the adjacency list will indicate the memory location in the BrickStorage.

Metadata can be used to allocate storage with minimal effort. It is recommended to build the metadata before creating the storage.

Member Typedef Documentation

◆ adjlist

template<unsigned dims>
typedef unsigned(* BrickInfo< dims >::adjlist)[static_power< 3, dims >::value]

Adjacency list type.

Constructor & Destructor Documentation

◆ BrickInfo()

template<unsigned dims>
BrickInfo< dims >::BrickInfo ( unsigned  nbricks)
inlineexplicit

Creating an empty metadata consisting of the specified number of bricks.

Parameters
nbricksnumber of bricks

Member Function Documentation

◆ allocate()

template<unsigned dims>
BrickStorage BrickInfo< dims >::allocate ( long  step)
inline

Allocate a new brick storage BrickStorage::allocate()

◆ mmap_alloc() [1/2]

template<unsigned dims>
BrickStorage BrickInfo< dims >::mmap_alloc ( long  step)
inline

Allocate a new brick storage BrickStorage::mmap_alloc(long, long)

◆ mmap_alloc() [2/2]

template<unsigned dims>
BrickStorage BrickInfo< dims >::mmap_alloc ( long  step,
void *  mmap_fd,
size_t  offset 
)
inline

Member Data Documentation

◆ adj

template<unsigned dims>
adjlist BrickInfo< dims >::adj

Adjacency list.

◆ nbricks

template<unsigned dims>
unsigned BrickInfo< dims >::nbricks

Number of bricks in this list.


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