Brick Library 0.1
Performance-portable stencil datalayout & codegen
|
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" |
def st.codegen.backend.base.Backend.__init__ | ( | self | ) |
Reimplemented in st.codegen.backend.asimd.BackendASIMD, st.codegen.backend.avx2.BackendAVX2, st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCuFlex, st.codegen.backend.flex.BackendFlex, st.codegen.backend.scalar.BackendScalar, st.codegen.backend.sse.BackendSSE, st.codegen.backend.asimd.BackendSVE, and st.codegen.backend.cuda.BackendCUDA.
def st.codegen.backend.base.Backend.checkConfig | ( | self | ) |
def st.codegen.backend.base.Backend.declare_reg | ( | self, | |
name, | |||
CodeBlock | block | ||
) |
def st.codegen.backend.base.Backend.declare_vec | ( | self, | |
name, | |||
CodeBlock | block | ||
) |
Reimplemented in st.codegen.backend.asimd.BackendASIMD, st.codegen.backend.asimd.BackendSVE, st.codegen.backend.avx2.BackendAVX2, st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCUDA, st.codegen.backend.cuda.BackendCuFlex, st.codegen.backend.flex.BackendFlex, st.codegen.backend.scalar.BackendScalar, and st.codegen.backend.sse.BackendSSE.
def st.codegen.backend.base.Backend.gen_lhs | ( | self, | |
Buffer | buf, | ||
List[int] | offset, | ||
rel = None , |
|||
dimrels = None |
|||
) |
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.
def st.codegen.backend.base.Backend.genStoreLoc | ( | self, | |
Grid | grid, | ||
shift, | |||
offset, | |||
rel, | |||
dimrels | |||
) |
def st.codegen.backend.base.Backend.genStoreLoop | ( | self, | |
CodeBlock | group | ||
) |
def st.codegen.backend.base.Backend.genStoreTileLoop | ( | self, | |
CodeBlock | group, | ||
dims | |||
) |
Reimplemented in st.codegen.backend.cuda.BackendCUDA, and st.codegen.backend.scalar.BackendScalar.
def st.codegen.backend.base.Backend.genVectorLoop | ( | self, | |
CodeBlock | group | ||
) |
|
static |
|
static |
def st.codegen.backend.base.Backend.merge | ( | self, | |
rego, | |||
regl, | |||
regr, | |||
dim, | |||
shift, | |||
CodeBlock | block | ||
) |
Reimplemented in st.codegen.backend.asimd.BackendASIMD, st.codegen.backend.asimd.BackendSVE, st.codegen.backend.avx2.BackendAVX2, st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCUDA, st.codegen.backend.cuda.BackendCuFlex, st.codegen.backend.flex.BackendFlex, st.codegen.backend.scalar.BackendScalar, and st.codegen.backend.sse.BackendSSE.
def st.codegen.backend.base.Backend.prequel | ( | self, | |
toplevel | |||
) |
Reimplemented in st.codegen.backend.avx512.BackendAVX512.
def st.codegen.backend.base.Backend.read_aligned | ( | self, | |
Grid | grid, | ||
offset, | |||
str | name, | ||
CodeBlock | block, | ||
rel = None |
|||
) |
Reimplemented in st.codegen.backend.asimd.BackendASIMD, st.codegen.backend.asimd.BackendSVE, st.codegen.backend.avx2.BackendAVX2, st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCUDA, st.codegen.backend.cuda.BackendCuFlex, st.codegen.backend.flex.BackendFlex, st.codegen.backend.scalar.BackendScalar, and st.codegen.backend.sse.BackendSSE.
|
static |
def st.codegen.backend.base.Backend.setCodeGen | ( | self, | |
codegen | |||
) |
Reimplemented in st.codegen.backend.cuda.BackendCUDA, and st.codegen.backend.scalar.BackendScalar.
def st.codegen.backend.base.Backend.setLayout | ( | self, | |
layout | |||
) |
def st.codegen.backend.base.Backend.store_vecbuf | ( | self, | |
vecbuf_name, | |||
reg_name, | |||
CodeBlock | block | ||
) |
Reimplemented in st.codegen.backend.asimd.BackendASIMD, st.codegen.backend.asimd.BackendSVE, st.codegen.backend.avx2.BackendAVX2, st.codegen.backend.avx512.BackendAVX512, st.codegen.backend.cuda.BackendCUDA, st.codegen.backend.cuda.BackendCuFlex, st.codegen.backend.flex.BackendFlex, st.codegen.backend.scalar.BackendScalar, and st.codegen.backend.sse.BackendSSE.
def st.codegen.backend.base.Backend.stride | ( | self, | |
dim | |||
) |
|
static |
|
static |
|
static |
st.codegen.backend.base.Backend.ALIGNED |
st.codegen.backend.base.Backend.codegen |
st.codegen.backend.base.Backend.layout |
st.codegen.backend.base.Backend.prec |
|
static |
st.codegen.backend.base.Backend.printer |
st.codegen.backend.base.Backend.STRIDE |
st.codegen.backend.base.Backend.VECLEN |