50 sfp1(field, base0, bound0, stride0, docomm);
66 sfp2(field, base0, bound0, stride0, base1, bound1, stride1, docomm);
84 sfp3(field, base0, bound0, stride0, base1, bound1, stride1,
85 base2, bound2, stride2, docomm);
100 sfp1(field, base0, bound0, stride0, docomm);
120 sfp2(field, base0, bound0, stride0, base1, bound1, stride1, docomm);
144 sfp3(field, base0, bound0, stride0, base1, bound1, stride1,
145 base2, bound2, stride2, docomm);
184 sfp1(field, i, i, 1, docomm);
193 sfp2(field, i, i, 1, j, j, 1, docomm);
202 sfp3(field, i, i, 1, j, j, 1, k, k, 1, docomm);
209 int ibase,
int ibound,
int istride,
bool docomm) {
216 bool okParameters =
true;
220 if (ibase < first0) {
221 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
222 <<
") < lowest index value (= " << first0 <<
")" <<
endl;
223 okParameters =
false;
225 if (ibound > last0) {
226 (*FldDbgInform) <<
"sfp() error: ibound (= " << ibound
227 <<
") > highest index value (= " << last0 <<
")" <<
endl;
228 okParameters =
false;
231 (*FldDbgInform) <<
"sfp() error: istride < 0 not implemented yet." <<
endl;
232 okParameters =
false;
234 if (ibound < ibase) {
235 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
236 <<
") > ibound (= " << ibound <<
") not implemented yet." <<
endl;
237 okParameters =
false;
241 if ( (ibound - ibase) != 0 ) {
242 (*FldDbgInform) <<
"sfp() error: istride = 0 but (ibound - ibase) = "
243 << (ibound - ibase) <<
endl;
244 okParameters =
false;
262 int ibase,
int ibound,
int istride,
263 int jbase,
int jbound,
int jstride,
bool docomm) {
268 bool okParameters =
true;
272 if (ibase < first0) {
273 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
274 <<
") < lowest index value (= " << first0 <<
")" <<
endl;
275 okParameters =
false;
277 if (ibound > last0) {
278 (*FldDbgInform) <<
"sfp() error: ibound (= " << ibound
279 <<
") > highest index value (= " << last0 <<
")" <<
endl;
280 okParameters =
false;
283 (*FldDbgInform) <<
"sfp() error: istride < 0 not implemented yet." <<
endl;
284 okParameters =
false;
286 if (ibound < ibase) {
287 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
288 <<
") > ibound (= " << ibound <<
") not implemented yet." <<
endl;
289 okParameters =
false;
293 if ( (ibound - ibase) != 0 ) {
294 (*FldDbgInform) <<
"sfp() error: istride = 0 but (ibound - ibase) = "
295 << (ibound - ibase) <<
endl;
296 okParameters =
false;
304 if (jbase < first1) {
305 (*FldDbgInform) <<
"sfp() error: jbase (= " << jbase
306 <<
") < lowest index value (= " << first1 <<
")" <<
endl;
307 okParameters =
false;
309 if (jbound > last1) {
310 (*FldDbgInform) <<
"sfp() error: jbound (= " << jbound
311 <<
") > highest index value (= " << last1 <<
")" <<
endl;
312 okParameters =
false;
315 (*FldDbgInform) <<
"sfp() error: jstride < 0 not implemented yet." <<
endl;
316 okParameters =
false;
318 if (jbound < jbase) {
319 (*FldDbgInform) <<
"sfp() error: jbase (= " << jbase
320 <<
") > jbound (= " << jbound <<
") not implemented yet." <<
endl;
321 okParameters =
false;
325 if ( (jbound - jbase) != 0 ) {
326 (*FldDbgInform) <<
"sfp() error: jstride = 0 but (jbound - jbase) = "
327 << (jbound - jbase) <<
endl;
328 okParameters =
false;
346 int ibase,
int ibound,
int istride,
347 int jbase,
int jbound,
int jstride,
348 int kbase,
int kbound,
int kstride,
bool docomm) {
353 bool okParameters =
true;
357 if (ibase < first0) {
358 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
359 <<
") < lowest index value (= " << first0 <<
")" <<
endl;
360 okParameters =
false;
362 if (ibound > last0) {
363 (*FldDbgInform) <<
"sfp() error: ibound (= " << ibound
364 <<
") > highest index value (= " << last0 <<
")" <<
endl;
365 okParameters =
false;
368 (*FldDbgInform) <<
"sfp() error: istride < 0 not implemented yet." <<
endl;
369 okParameters =
false;
371 if (ibound < ibase) {
372 (*FldDbgInform) <<
"sfp() error: ibase (= " << ibase
373 <<
") > ibound (= " << ibound <<
") not implemented yet." <<
endl;
374 okParameters =
false;
378 if ( (ibound - ibase) != 0 ) {
379 (*FldDbgInform) <<
"sfp() error: istride = 0 but (ibound - ibase) = "
380 << (ibound - ibase) <<
endl;
381 okParameters =
false;
389 if (jbase < first1) {
390 (*FldDbgInform) <<
"sfp() error: jbase (= " << jbase
391 <<
") < lowest index value (= " << first1 <<
")" <<
endl;
392 okParameters =
false;
394 if (jbound > last1) {
395 (*FldDbgInform) <<
"sfp() error: jbound (= " << jbound
396 <<
") > highest index value (= " << last1 <<
")" <<
endl;
397 okParameters =
false;
400 (*FldDbgInform) <<
"sfp() error: jstride < 0 not implemented yet." <<
endl;
401 okParameters =
false;
403 if (jbound < jbase) {
404 (*FldDbgInform) <<
"sfp() error: jbase (= " << jbase
405 <<
") > jbound (= " << jbound <<
") not implemented yet." <<
endl;
406 okParameters =
false;
410 if ( (jbound - jbase) != 0 ) {
411 (*FldDbgInform) <<
"sfp() error: jstride = 0 but (jbound - jbase) = "
412 << (jbound - jbase) <<
endl;
413 okParameters =
false;
421 if (kbase < first2) {
422 (*FldDbgInform) <<
"sfp() error: kbase (= " << kbase
423 <<
") < lowest index value (= " << first2 <<
")" <<
endl;
424 okParameters =
false;
426 if (kbound > last2) {
427 (*FldDbgInform) <<
"sfp() error: kbound (= " << kbound
428 <<
") > highest index value (= " << last2 <<
")" <<
endl;
429 okParameters =
false;
432 (*FldDbgInform) <<
"sfp() error: kstride < 0 not implemented yet." <<
endl;
433 okParameters =
false;
435 if (kbound < kbase) {
436 (*FldDbgInform) <<
"sfp() error: kbase (= " << kbase
437 <<
") > kbound (= " << jbound <<
") not implemented yet." <<
endl;
438 okParameters =
false;
442 if ( (kbound - kbase) != 0 ) {
443 (*FldDbgInform) <<
"sfp() error: kstride = 0 but (kbound - kbase) = "
444 << (kbound - kbase) <<
endl;
445 okParameters =
false;
453 Index(kbase,kbound,kstride));
466template<
class T,
unsigned Dim >
472 int ibase,ibound,istride,jbase,jbound,jstride,kbase,kbound,kstride;
486 (*FldDbgInform) <<
"~~~~~~~~ field slice ("
487 << ibase <<
":" << ibound <<
":" << istride <<
", "
488 << jbase <<
":" << jbound <<
":" << jstride <<
", "
489 << kbase <<
":" << kbound <<
":" << kstride <<
") "
490 <<
"~~~~~~~~" <<
endl;
499 (*FldDbgInform) <<
"****************************************"
500 <<
"***************************************" <<
endl;
501 (*FldDbgInform) <<
"********* vnode = " << icount++ <<
" *********"
503 (*FldDbgInform) <<
"****************************************"
504 <<
"***************************************" <<
endl;
505 (*FldDbgInform) <<
"Owned = " <<
endl << Owned <<
endl;
508 int n0 = ldf->
size(0);
511 int ifirst = Owned[0].first() - F.
leftGuard(0)*istride;
512 int ilast = Owned[0].last() + F.
rightGuard(0);
513 (*FldDbgInform) <<
"- - - - - - - - - - - - - - - - - - - - - - - - - "
514 <<
"I = " << ifirst <<
":" << ilast <<
":"
522 << lf_bi.
offset(i0) <<
" ";
524 (*FldDbgInform) <<
endl;
526 }
else if (
Dim==2 ) {
527 int n0 = ldf->
size(0);
528 int n1 = ldf->
size(1);
534 int ifirst = Owned[0].first() - F.
leftGuard(0)*istride;
535 int ilast = Owned[0].last() + F.
rightGuard(0);
536 int jfirst = Owned[1].first();
538 int jlast = Owned[1].last();
541 for (
int i1=l1; i1<r1; ++i1) {
543 if ((j < jfirst) || (j > jlast)) {
544 if ((j < jbase) || (j > jbound)) {
546 <<
"--------------------------------global guard------";
549 <<
"---------------------------------------guard------";
553 <<
"--------------------------------------------------";
555 (*FldDbgInform) <<
"- - - - - - - - - - - - - - - - - - - - - - - - - "
556 <<
"I = " << ifirst <<
":" << ilast <<
":"
564 << lf_bi.
offset(i0,i1) <<
" ";
566 (*FldDbgInform) <<
endl;
568 (*FldDbgInform) <<
endl;
570 }
else if (
Dim==3 ) {
571 int n0 = ldf->
size(0);
572 int n1 = ldf->
size(1);
573 int n2 = ldf->
size(2);
582 int ifirst = Owned[0].first() - F.
leftGuard(0)*istride;
583 int ilast = Owned[0].last() + F.
rightGuard(0);
584 int jfirst = Owned[1].first();
586 int jlast = Owned[1].last();
589 int kfirst = Owned[2].first();
591 int klast = Owned[2].last();
594 for (
int i2=l2; i2<r2; ++i2) {
596 if ((k < kfirst) || (k > klast)) {
597 if ((k < kbase) || (k > kbound)) {
599 <<
"================================global guard======";
602 <<
"=======================================guard======";
606 <<
"==================================================";
608 (*FldDbgInform) <<
"K = " << k <<
endl;
609 for (
int i1=l1; i1<r1; ++i1) {
611 if ((j < jfirst) || (j > jlast)) {
612 if ((j < jbase) || (j > jbound)) {
614 <<
"--------------------------------global guard------";
617 <<
"---------------------------------------guard------";
621 <<
"--------------------------------------------------";
623 (*FldDbgInform) <<
"J = " << j <<
endl;
625 <<
"- - - - - - - - - - - - - - - - - - - - - - - - - "
626 <<
"I = " << ifirst <<
":" << ilast <<
":" << istride <<
endl;
633 << lf_bi.
offset(i0,i1,i2) <<
" ";
635 (*FldDbgInform) <<
endl;
637 (*FldDbgInform) <<
endl;
639 (*FldDbgInform) <<
endl;
642 ERRORMSG(
" can not write for larger than three dimensions " <<
endl);
void setInform(Inform &inform)
void fp1(BareField< T, 1U > &field, bool docomm)
void sfp1(BareField< T, 1U > &field, int ibase, int ibound, int istride, bool docomm)
void agfp2(BareField< T, 2U > &field)
void agfp3(BareField< T, 3U > &field)
void ggfp3(BareField< T, 3U > &field, bool docomm)
void efp1(BareField< T, 1U > &field, int i, bool docomm)
void sfp2(BareField< T, 2U > &field, int ibase, int ibound, int istride, int jbase, int jbound, int jstride, bool docomm)
void ggfp1(BareField< T, 1U > &field, bool docomm)
void agfp1(BareField< T, 1U > &field)
void FieldDebugWriteb(BareField< T, Dim > &F)
void sfp3(BareField< T, 3U > &field, int ibase, int ibound, int istride, int jbase, int jbound, int jstride, int kbase, int kbound, int kstride, bool docomm)
void efp3(BareField< T, 3U > &field, int i, int j, int k, bool docomm)
void fp3(BareField< T, 3U > &field, bool docomm)
void fp2(BareField< T, 2U > &field, bool docomm)
void ggfp2(BareField< T, 2U > &field, bool docomm)
void efp2(BareField< T, 2U > &field, int i, int j, bool docomm)
Inform & endl(Inform &inf)
unsigned rightGuard(unsigned d) const
const NDIndex< Dim > & getDomain() const
ac_id_larray::const_iterator const_iterator_if
Layout_t & getLayout() const
unsigned leftGuard(unsigned d) const
const NDIndex< Dim > & getOwned() const
int size(unsigned d) const
const iterator & begin() const
const NDIndex< Dim > & getDomain() const
void print(BareField< T, Dim > &, const NDIndex< Dim > &, Inform &, bool=true)