Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
st.codegen.backend.base.Backend Class Reference
Inheritance diagram for st.codegen.backend.base.Backend:
[legend]

Public Member Functions

def __init__ (self)
 
def setCodeGen (self, codegen)
 
def setLayout (self, layout)
 
def prequel (self, toplevel)
 
def checkConfig (self)
 
def declare_buf (self, Buffer buf, CodeBlock block)
 
def declare_gridref (self, Grid grid, CodeBlock block)
 
def stride (self, dim)
 
def declare_vecbuf (self, Grid grid, vec_shift, CodeBlock block)
 
def genVectorLoop (self, CodeBlock group)
 
def genStoreLoop (self, CodeBlock group)
 
def store (self, Buffer buf, CodeBlock group)
 
def storeTile (self, Buffer buf, CodeBlock group)
 
def genStoreLoc (self, Grid grid, shift, offset, rel, dimrels)
 
def genStoreTileLoop (self, CodeBlock group, dims)
 
def gen_lhs (self, Buffer buf, List[int] offset, rel=None, dimrels=None)
 
def gen_rhs (self, Expr comp, List[int] shift, List[int] offset, rel=None, dimrels=None)
 
def declare_reg (self, name, CodeBlock block)
 
def declare_vec (self, name, CodeBlock block)
 
def store_vecbuf (self, vecbuf_name, reg_name, CodeBlock block)
 
def merge (self, rego, regl, regr, dim, shift, CodeBlock block)
 
def read_aligned (self, Grid grid, offset, str name, CodeBlock block, rel=None)
 

Static Public Member Functions

def gridref_name (grid)
 
def vectmp_name (idx)
 
def vecbuf_name (grid, vec_shift)
 
def vecreg_name (grid, vec_shift)
 
def index_name (idx)
 
def rel_name (idx=None)
 

Public Attributes

 printer
 
 codegen
 
 prec
 
 layout
 
 STRIDE
 
 VECLEN
 
 ALIGNED
 

Static Public Attributes

str preffix = "_cg"
 

Constructor & Destructor Documentation

◆ __init__()

def st.codegen.backend.base.Backend.__init__ (   self)

Member Function Documentation

◆ checkConfig()

def st.codegen.backend.base.Backend.checkConfig (   self)

◆ declare_buf()

def st.codegen.backend.base.Backend.declare_buf (   self,
Buffer  buf,
CodeBlock  block 
)

◆ declare_gridref()

def st.codegen.backend.base.Backend.declare_gridref (   self,
Grid  grid,
CodeBlock  block 
)

◆ declare_reg()

def st.codegen.backend.base.Backend.declare_reg (   self,
  name,
CodeBlock  block 
)

◆ declare_vec()

def st.codegen.backend.base.Backend.declare_vec (   self,
  name,
CodeBlock  block 
)

◆ declare_vecbuf()

def st.codegen.backend.base.Backend.declare_vecbuf (   self,
Grid  grid,
  vec_shift,
CodeBlock  block 
)
Here is the call graph for this function:

◆ gen_lhs()

def st.codegen.backend.base.Backend.gen_lhs (   self,
Buffer  buf,
List[int]  offset,
  rel = None,
  dimrels = None 
)

◆ gen_rhs()

def st.codegen.backend.base.Backend.gen_rhs (   self,
Expr  comp,
List[int]  shift,
List[int]  offset,
  rel = None,
  dimrels = None 
)
:param comp: The expression to print
:param shift: The shift of scatter
:param offset: Scattered from
:param rel: Added offset when using loops
:return:

Reimplemented in st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCUDA, and st.codegen.backend.scalar.BackendScalar.

◆ genStoreLoc()

def st.codegen.backend.base.Backend.genStoreLoc (   self,
Grid  grid,
  shift,
  offset,
  rel,
  dimrels 
)
Here is the call graph for this function:

◆ genStoreLoop()

def st.codegen.backend.base.Backend.genStoreLoop (   self,
CodeBlock  group 
)

◆ genStoreTileLoop()

def st.codegen.backend.base.Backend.genStoreTileLoop (   self,
CodeBlock  group,
  dims 
)

Reimplemented in st.codegen.backend.cuda.BackendCUDA, and st.codegen.backend.scalar.BackendScalar.

Here is the call graph for this function:

◆ genVectorLoop()

def st.codegen.backend.base.Backend.genVectorLoop (   self,
CodeBlock  group 
)

◆ gridref_name()

def st.codegen.backend.base.Backend.gridref_name (   grid)
static

◆ index_name()

def st.codegen.backend.base.Backend.index_name (   idx)
static

◆ merge()

def st.codegen.backend.base.Backend.merge (   self,
  rego,
  regl,
  regr,
  dim,
  shift,
CodeBlock  block 
)

◆ prequel()

def st.codegen.backend.base.Backend.prequel (   self,
  toplevel 
)

◆ read_aligned()

def st.codegen.backend.base.Backend.read_aligned (   self,
Grid  grid,
  offset,
str  name,
CodeBlock  block,
  rel = None 
)

◆ rel_name()

def st.codegen.backend.base.Backend.rel_name (   idx = None)
static

◆ setCodeGen()

def st.codegen.backend.base.Backend.setCodeGen (   self,
  codegen 
)

◆ setLayout()

def st.codegen.backend.base.Backend.setLayout (   self,
  layout 
)

◆ store()

def st.codegen.backend.base.Backend.store (   self,
Buffer  buf,
CodeBlock  group 
)

Reimplemented in st.codegen.backend.cuda.BackendCUDA.

Here is the call graph for this function:

◆ store_vecbuf()

def st.codegen.backend.base.Backend.store_vecbuf (   self,
  vecbuf_name,
  reg_name,
CodeBlock  block 
)

◆ storeTile()

def st.codegen.backend.base.Backend.storeTile (   self,
Buffer  buf,
CodeBlock  group 
)

Reimplemented in st.codegen.backend.cuda.BackendCUDA.

Here is the call graph for this function:

◆ stride()

def st.codegen.backend.base.Backend.stride (   self,
  dim 
)

◆ vecbuf_name()

def st.codegen.backend.base.Backend.vecbuf_name (   grid,
  vec_shift 
)
static

◆ vecreg_name()

def st.codegen.backend.base.Backend.vecreg_name (   grid,
  vec_shift 
)
static

◆ vectmp_name()

def st.codegen.backend.base.Backend.vectmp_name (   idx)
static

Member Data Documentation

◆ ALIGNED

st.codegen.backend.base.Backend.ALIGNED

◆ codegen

st.codegen.backend.base.Backend.codegen

◆ layout

st.codegen.backend.base.Backend.layout

◆ prec

st.codegen.backend.base.Backend.prec

◆ preffix

str st.codegen.backend.base.Backend.preffix = "_cg"
static

◆ printer

st.codegen.backend.base.Backend.printer

◆ STRIDE

st.codegen.backend.base.Backend.STRIDE

◆ VECLEN

st.codegen.backend.base.Backend.VECLEN

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