.. index:: pair: class; xf::hpc::rtm::Stencil2D .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d: .. _cid-xf::hpc::rtm::stencil2d: template class xf::hpc::rtm::Stencil2D ====================================== .. toctree:: :hidden: .. code-block:: cpp :class: overview-code-block #include "stencil2d.hpp" Overview ~~~~~~~~ :ref:`Stencil2D ` class defines isotrophic laplacian operation and time iterations function. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - t_DataType - the basic wavefield datatype * - t_Order - the spatial discretization order * - t_MaxDim - the maximum height this kernel can process * - t_PE - the number of processing elements .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1aafe7d51e78fcaf16b736eacf4f6b8003: .. _cid-xf::hpc::rtm::stencil2d::t_widetype: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ad61918bb5b177b3fb09d0f9606080944: .. _cid-xf::hpc::rtm::stencil2d::t_intype: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a76507e7d99dcba0d582f682a5a037a0d: .. _cid-xf::hpc::rtm::stencil2d::t_pairtype: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a7a9fbf8917229d25624b7d1431f71165: .. _cid-xf::hpc::rtm::stencil2d::t_pairintype: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a378633323e4cc5761dab7fef794e744e: .. _cid-xf::hpc::rtm::stencil2d::t_numdata: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ade59769fffec6b35b90d80c82fc56a20: .. _cid-xf::hpc::rtm::stencil2d::t_halforder: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1aaf58b72dd333682e79ded18f1e497185: .. _cid-xf::hpc::rtm::stencil2d::t_fifodepth: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a39ccae485291ccac8c3a4b159819ff78: .. _cid-xf::hpc::rtm::stencil2d::stencil2d: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a355314a5eb99938bbc5ed6168771fa53: .. _cid-xf::hpc::rtm::stencil2d::laplacian: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ac09895af3fbf76c22ac0d212910d1ff0: .. _cid-xf::hpc::rtm::stencil2d::split: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a080a955adcf82838656dd6f11bf88e14: .. _cid-xf::hpc::rtm::stencil2d::calculate: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ad3a1cb8321c9a8f9d9851f6f5458afb4: .. _cid-xf::hpc::rtm::stencil2d::getx: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ab8e56369ad0a167f8cb06fad4c0fc61c: .. _cid-xf::hpc::rtm::stencil2d::getz: .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a4368cecf580ce0a763bdc48b535810ce: .. _cid-xf::hpc::rtm::stencil2d::getarea: .. ref-code-block:: cpp :class: overview-code-block template < typename t_DataType, int t_Order, int t_MaxDim = 1024, int t_PE = 1 > class Stencil2D // direct descendants template < typename t_DataType, int t_Order, int t_MaxDim = 1024, int t_MaxB = 40, int t_PE = t_Order / 2 > class :ref:`xf::hpc::rtm::RTM2D` // typedefs typedef blas::WideType t_WideType typedef t_WideType::t_TypeInt t_InType typedef blas::WideType <:ref:`t_InType`, :ref:`t_NumData`, t_WideType::t_TypeWidth> t_PairType typedef t_PairType::t_TypeInt t_PairInType // fields static const unsigned int t_NumData static const unsigned int t_HalfOrder static const unsigned int t_FifoDepth Methods ~~~~~~~ .. FunctionSection .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a28aacdcf94eb3bcff76d7179dfde7ef7: .. _cid-xf::hpc::rtm::stencil2d::setcoef: setCoef ------- .. ref-code-block:: cpp :class: title-code-block void setCoef ( const t_DataType* p_coefz, const t_DataType* p_coefx ) setCoef set the coefficients for stencil kernel .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - p_coefz - the coefficents along z-direction * - p_coefx - the coefficents along x-direction .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a75599c4041fc7041c3f0ea9c360d6080: .. _cid-xf::hpc::rtm::stencil2d::setdim: setDim ------ .. ref-code-block:: cpp :class: title-code-block void setDim ( const unsigned int p_z, const unsigned int p_x ) setDim set the dimension of the wavefields .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - p_z - the dimension of z-direction * - p_x - the dimension of x-direction .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1a0989d760fa864b06b3a2f29589ccd3ab: .. _cid-xf::hpc::rtm::stencil2d::laplacian-2: laplacian --------- laplacian overload (1) ++++++++++++++++++++++ .. ref-code-block:: cpp :class: title-code-block void laplacian ( hls::stream <:ref:`t_InType`>& p_in, hls::stream <:ref:`t_InType`>& p_pin, hls::stream <:ref:`t_InType`>& p_out ) laplacian computes the laplacian of an given wavefield .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - p_in - the input wavefield stream * - p_pin - a copy of p_in * - p_out - a stream of laplacian results .. _doxid-classxf_1_1hpc_1_1rtm_1_1_stencil2_d_1ad5c58dbcfa86ad09db8878cff5766c3e: .. _cid-xf::hpc::rtm::stencil2d::propagate: propagate --------- .. ref-code-block:: cpp :class: title-code-block void propagate ( hls::stream <:ref:`t_InType`>& p_v2dt2, hls::stream <:ref:`t_InType`>& p_cpvt, hls::stream <:ref:`t_PairInType`>& p_in, hls::stream <:ref:`t_PairInType`>& p_out, bool p_sw = false ) propagate computes the time iteration for FDTD .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - p_v2dt2 - the pow(v * dt, 2) * - p_cpvt - a copy of p_v2dt2 * - p_in - a stream of input wavefield * - p_out - a stream of output wavefield * - p_sw - a switch to swap outptu streams