Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/array-collections/boxed.main.cfa

    r2e63915 rfd4df379  
    366366    SHOW_ACCESS_1D(42)
    367367}
    368 char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) {
    369     (void) vart;
     368char * allocAndAccess_13 ( size_t expectedElmSz, const char * tcid, const char * vart ) {
    370369    printf("------- 13%s (communication, mono-poly direct, by param T[]): char x[42], expecting %zd-byte elems\n", tcid, expectedElmSz);
    371370    char x[ 42 ] INITARR;
     
    374373    return 0p;
    375374}
    376 bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) {
    377     (void) vart;
     375bigun * allocAndAccess_13( size_t expectedElmSz, const char * tcid, const char * vart ) {
    378376    printf("------- 13%s (communication, mono-poly direct, by param T[]): bigun x[42], expecting %zd-byte elems\n", tcid, expectedElmSz);
    379377    bigun x[ 42 ] INITARR;
     
    385383// ---------- 14, comm, MPD, PARR
    386384
    387 forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) {
     385forall( T* ) void access_14 ( size_t expectedElmSz, T (*temp)[42] ) { 
    388386    T * x = *temp;
    389387    SHOW_ACCESS_1D(42)
    390388}
    391 double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) {
    392     (void) vart;
     389double * allocAndAccess_14 ( size_t expectedElmSz, const char * tcid, const char * vart ) {
    393390    printf("------- 13%s (communication, mono-poly direct, by param T(*)[*]): double x[42], expecting %zd-byte elems\n", tcid, expectedElmSz);
    394391    double x[ 42 ] INITARR;
     
    400397// ---------- 15, operators
    401398
    402 forall( T* ) void access_15 ( T x[] ) {
     399forall( T* ) void access_15 ( size_t expectedElmSz, T x[] ) {
    403400    // correctness of x and ?[?] established by earlier tests
    404401    T * x5 = & x[5];
     
    417414
    418415    ptrdiff_t expPos5 = x5 - x;
    419 //  ptrdiff_t expNeg5 = x - x5;
     416    ptrdiff_t expNeg5 = x - x5;
    420417
    421418    printf( "?-? +ve off by %zd\n", ((ptrdiff_t) 5) - expPos5 );
     
    424421
    425422forall( T ) T * allocAndAccess_15 ( size_t expectedElmSz, const char * tcid, const char * vart ) {
    426     (void) expectedElmSz;
    427423    printf("------- 15%s (operators): T x[42], expecting T=%s, got sizeof(T)=%zd, expecting %zd-byte elems\n", tcid, vart, sizeof(T), expectedElmSz);
    428424    T x[ 42 ] INITARR;
    429425    // bookends unused
    430     access_15( x );
     426    access_15( expectedElmSz, x );
    431427    return 0p;
    432428}
Note: See TracChangeset for help on using the changeset viewer.