template class xf::hpc::rtm::Stencil3D¶
#include "stencil3d.hpp"
Overview¶
Stencil3D class defines isotrophic laplacian operation and time iterations function.
Parameters:
t_DataType | the basic wavefield datatype |
t_Order | is the spatial discretization order |
t_MaxDimZ | is the maximum dim along z-axis this kernel can process |
t_MaxDimY | is the maximum dim along y-axis this kernel can process |
t_PEZ | is the number of processing elements along z-axis |
t_PEX | is the number of processing elements along x-axis |
template < typename t_DataType, int t_Order, int t_MaxDimZ = 128, int t_MaxDimY = 128, int t_PEZ = 1, int t_PEX = 1 > class Stencil3D // direct descendants template < typename t_Domain, typename t_DataType, int t_Order, int t_MaxDimZ = 128, int t_MaxDimY = 128, int t_MaxB = 40, int t_PEZ = 1, int t_PEX = 1 > class xf::hpc::rtm::RTM3D // typedefs typedef blas::WideType <t_DataType, t_PEZ> t_DataTypeZ typedef t_DataTypeZ::t_TypeInt t_InTypeZ typedef blas::WideType <t_DataType, t_PEX> t_DataTypeX typedef t_DataTypeX::t_TypeInt t_InTypeX typedef blas::WideType <t_InTypeX, t_PEZ, t_DataTypeX::t_TypeWidth> t_WideType typedef t_WideType::t_TypeInt t_InType typedef blas::WideType <t_InType, t_NumData, t_WideType::t_TypeWidth> t_PairType typedef t_PairType::t_TypeInt t_PairInType // fields static const unsigned int t_HalfOrder static const unsigned int t_NumData static const unsigned int t_FifoDepth
Methods¶
setCoef¶
void setCoef ( const t_DataType* p_coefz, const t_DataType* p_coefy, const t_DataType* p_coefx )
setCoef set the coefficients for stencil kernel
Parameters:
p_coefz | is the coefficents along z-direction |
p_coefy | is the coefficents along y-direction |
p_coefx | is the coefficents along x-direction |
setDim¶
void setDim ( const unsigned int p_z, const unsigned int p_y, const unsigned int p_x )
setDim set the dimension of the wavefields
Parameters:
p_z | is the dimension of z-direction |
p_y | is the dimension of y-direction |
p_x | is the dimension of x-direction |
laplacian¶
propagate¶
propagate overload (1)¶
void propagate ( hls::stream <t_InType>& p_v2dt2, hls::stream <t_InType>& p_cpvt, hls::stream <t_InType>& p_i0, hls::stream <t_InType>& p_i1, hls::stream <t_InType>& p_o0, hls::stream <t_InType>& p_o1, bool p_sw = false )
propagate computes the time iteration for FDTD
Parameters:
p_v2dt2 | is the pow(v * dt, 2) |
p_cpvt | is a copy of p_v2dt2 |
p_i0 | is a stream of input wavefield |
p_i1 | is a stream of input wavefield |
p_o0 | is a stream of output wavefield |
p_o1 | is a stream of output wavefield |
p_sw | a switch to swap outptu streams |
propagate overload (2)¶
void propagate ( hls::stream <t_InType>& p_v2dt2, hls::stream <t_InType>& p_cpvt, hls::stream <t_PairInType>& p_in, hls::stream <t_PairInType>& p_out, bool p_sw = false )
propagate computes the time iteration for FDTD
Parameters:
p_v2dt2 | is the pow(v * dt, 2) |
p_cpvt | is a copy of p_v2dt2 |
p_in | is a stream of input wavefield |
p_out | is a stream of output wavefield |
p_sw | a switch to swap outptu streams |