Changeset 2e63915 for tests/array-collections/boxed.main.cfa
- Timestamp:
- Jan 3, 2025, 5:07:43 PM (3 weeks ago)
- Branches:
- master
- Children:
- 8893ad4
- Parents:
- 2a32118
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/array-collections/boxed.main.cfa
r2a32118 r2e63915 366 366 SHOW_ACCESS_1D(42) 367 367 } 368 char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 368 char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 369 (void) vart; 369 370 printf("------- 13%s (communication, mono-poly direct, by param T[]): char x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 370 371 char x[ 42 ] INITARR; … … 373 374 return 0p; 374 375 } 375 bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) { 376 bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) { 377 (void) vart; 376 378 printf("------- 13%s (communication, mono-poly direct, by param T[]): bigun x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 377 379 bigun x[ 42 ] INITARR; … … 383 385 // ---------- 14, comm, MPD, PARR 384 386 385 forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) { 387 forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) { 386 388 T * x = *temp; 387 389 SHOW_ACCESS_1D(42) 388 390 } 389 double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 391 double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 392 (void) vart; 390 393 printf("------- 13%s (communication, mono-poly direct, by param T(*)[*]): double x[42], expecting %zd-byte elems\n", tcid, expectedElmSz); 391 394 double x[ 42 ] INITARR; … … 397 400 // ---------- 15, operators 398 401 399 forall( T* ) void access_15 ( size_t expectedElmSz,T x[] ) {402 forall( T* ) void access_15 ( T x[] ) { 400 403 // correctness of x and ?[?] established by earlier tests 401 404 T * x5 = & x[5]; … … 414 417 415 418 ptrdiff_t expPos5 = x5 - x; 416 419 // ptrdiff_t expNeg5 = x - x5; 417 420 418 421 printf( "?-? +ve off by %zd\n", ((ptrdiff_t) 5) - expPos5 ); … … 421 424 422 425 forall( T ) T * allocAndAccess_15 ( size_t expectedElmSz, const char * tcid, const char * vart ) { 426 (void) expectedElmSz; 423 427 printf("------- 15%s (operators): T x[42], expecting T=%s, got sizeof(T)=%zd, expecting %zd-byte elems\n", tcid, vart, sizeof(T), expectedElmSz); 424 428 T x[ 42 ] INITARR; 425 429 // bookends unused 426 access_15( expectedElmSz,x );430 access_15( x ); 427 431 return 0p; 428 432 }
Note: See TracChangeset
for help on using the changeset viewer.