📄 bfmacros.h
字号:
const int *_subbox_lo = (b).loVect();
const int *_subbox_len = (b).size().getVect();
const int *_bx_lo = (bx).loVect();
T* _th_p = dataPtr(ns);
const T* _x_p = (x).dataPtr(nss);
for(int _n = 0; _n < (nc); ++_n) {
int nR = _n + ns; nR += 0;
int n##x##R = _n + nss; n##x##R += 0;
T *_th_pp = _th_p
+ ((_subbox_lo[0] - _th_plo[0])
+ _n * _th_plen[0]);
const T *_x_pp = _x_p
+ ((_bx_lo[0] - _x_plo[0])
+ _n * _x_plen[0]);
for(int _i = 0; _i < _subbox_len[0]; ++_i, ++_th_pp) {
int iR = _i + _subbox_lo[0]; iR += 0;
int i##x##R = _i + _bx_lo[0]; i##x##R += 0;
T &thisR = * _th_pp; const T & x##R = _x_pp[_i];
#define ForAllThisBNNXCBNYCBN(T,b,ns,nc,x,bx,nsx,y,by,nsy)
{
assert((ns) >= 0 && (ns) + (nc) <= nComp());
assert((nsx) >= 0 && (nsx) + (nc) <= (x).nComp());
assert((nsy) >= 0 && (nsy) + (nc) <= (y).nComp());
Box _subbox_ = box();
_subbox_ &= b;
assert((bx).sameSize(_subbox_));
assert((by).sameSize(_subbox_));
if(!_subbox_.isEmpty()) {
const int *_th_plo = loVect();
const int *_th_plen = size();
const int *_x_plo = (x).loVect();
const int *_x_plen = (x).size();
const int *_y_plo = (y).loVect();
const int *_y_plen = (y).size();
const int *_subbox_lo = _subbox_.loVect();
const int *_subbox_len = _subbox_.size().getVect();
const int *_bx_lo = (bx).loVect();
const int *_by_lo = (by).loVect();
T* _th_p = dataPtr(ns);
const T* _x_p = (x).dataPtr(nsx);
const T* _y_p = (y).dataPtr(nsy);
for(int _n = 0; _n < (nc); ++_n) {
int nR = _n + ns; nR += 0;
int n##x##R = _n + nsx; n##x##R += 0;
int n##y##R = _n + nsy; n##y##R += 0;
T *_th_pp = _th_p
+ ((_subbox_lo[0] - _th_plo[0])
+ _n * _th_plen[0]);
const T *_x_pp = _x_p
+ ((_bx_lo[0] - _x_plo[0])
+ _n * _x_plen[0]);
const T *_y_pp = _y_p
+ ((_by_lo[0] - _y_plo[0])
+ _n * _y_plen[0]);
for(int _i = 0; _i < _subbox_len[0]; ++_i, ++_th_pp) {
int iR = _i + _subbox_lo[0]; iR += 0;
int i##x##R = _i + _bx_lo[0]; i##x##R += 0;
int i##y##R = _i + _by_lo[0]; i##y##R += 0;
T &thisR = * _th_pp;
const T & x##R = _x_pp[_i];
const T & y##R = _y_pp[_i];
#define ForAllRevXBNYCBNNN(T,x,bx,nsx,y,by,nsy,nc,ri)
{
assert((nsx) >= 0 && (nsx) + (nc) <= (x).nComp());
assert((nsy) >= 0 && (nsy) + (nc) <= (y).nComp());
assert((x).contains(bx));
assert((y).contains(by));
assert((bx).sameSize(by));
const int *_x_plo = (x).loVect();
const int *_x_plen = (x).size();
const int *_y_plo = (y).loVect();
const int *_y_plen = (y).size();
const int *_len = (bx).size().getVect();
const int *_bx_lo = (bx).loVect();
const int *_by_lo = (by).loVect();
T* _x_p = (x).dataPtr(nsx);
const T* _y_p = (y).dataPtr(nsy);
for(int _n = 0; _n < (nc); ++_n) {
int n##x##R = _n + nsx; n##x##R += 0;
int n##y##R = _n + nsy; n##y##R += 0;
int _ix = 0;
T *_x_pp = _x_p
+ ((_bx_lo[0] - _x_plo[0]) + _len[0] - 1
+ _n * _x_plen[0]);
const T *_y_pp = _y_p
+ ((_by_lo[0] - _y_plo[0])
+ _n * _y_plen[0]);
for(int _i = 0; _i < _len[0]; ++_i, --_ix) {
T & x##R = _x_pp[_ix];
const T & y##R = _y_pp[_i];
#define EndForTX }}}}
#define EndFor }}}
#define EndForPencil }}
#elif (CH_SPACEDIM == 2)
#define ForAllThisCPencil(T,b,ns,nc)
{
assert(contains(b));
assert((ns) >= 0 && (ns) + (nc) <= nComp());
const int *_th_plo = loVect();
const int *_th_plen = size();
const int *_b_lo = (b).loVect();
const int *_b_len = (b).size().getVect();
const T* _th_p = dptr;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -