IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2005, 12:28:08 PM (21 years ago)
Author:
desonia
Message:

Bug #403 -- implemented and tested non-square matrix multiply.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/dataManip/tst_psMatrix05.c

    r3682 r4160  
    1010*  @author  Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
    13 *  @date  $Date: 2005-04-07 20:27:42 $
     12*  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
     13*  @date  $Date: 2005-06-08 22:28:08 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5050    psImage *inImage232 = NULL;
    5151
    52     double truthMatrix[3][3] = {{ 8.000000, 20.000000},
    53                                 {-4.000000, 11.000000}};
    54 
    55 
    56 
     52    double truthMatrix[3][3] = {{  0.0, 52.0},
     53                                {-14.0, 51.0}};
    5754
    5855    // Test A - Create input and output images
    5956    printPositiveTestHeader(stdout, "psMatrix", "Create input and output images");
    6057    outImage = (psImage*) psImageAlloc(2, 2, PS_TYPE_F64);
    61     inImage1 = (psImage*) psImageAlloc(2, 2, PS_TYPE_F64);
    62     inImage2 = (psImage*) psImageAlloc(2, 2, PS_TYPE_F64);
     58    inImage1 = (psImage*) psImageAlloc(3, 2, PS_TYPE_F64);
     59    inImage2 = (psImage*) psImageAlloc(2, 3, PS_TYPE_F64);
    6360    inImage1->data.F64[0][0] = 2;
    6461    inImage1->data.F64[0][1] = 3;
     62    inImage1->data.F64[0][2] = 4;
    6563    inImage1->data.F64[1][0] = -1;
    6664    inImage1->data.F64[1][1] = 2;
     65    inImage1->data.F64[1][2] = 5;
    6766    inImage2->data.F64[0][0] = 4;
    6867    inImage2->data.F64[0][1] = 1;
    6968    inImage2->data.F64[1][0] = 0;
    7069    inImage2->data.F64[1][1] = 6;
     70    inImage2->data.F64[2][0] = -2;
     71    inImage2->data.F64[2][1] = 8;
    7172    outImage32 = (psImage*)psImageAlloc(2, 2, PS_TYPE_F32);
    72     inImage132 = (psImage*)psImageAlloc(2, 2, PS_TYPE_F32);
    73     inImage232 = (psImage*)psImageAlloc(2, 2, PS_TYPE_F32);
     73    inImage132 = (psImage*)psImageAlloc(3, 2, PS_TYPE_F32);
     74    inImage232 = (psImage*)psImageAlloc(2, 3, PS_TYPE_F32);
    7475    inImage132->data.F32[0][0] = 2;
    7576    inImage132->data.F32[0][1] = 3;
     77    inImage132->data.F32[0][2] = 4;
    7678    inImage132->data.F32[1][0] = -1;
    7779    inImage132->data.F32[1][1] = 2;
     80    inImage132->data.F32[1][2] = 5;
    7881    inImage232->data.F32[0][0] = 4;
    7982    inImage232->data.F32[0][1] = 1;
    8083    inImage232->data.F32[1][0] = 0;
    8184    inImage232->data.F32[1][1] = 6;
     85    inImage232->data.F32[2][0] = -2;
     86    inImage232->data.F32[2][1] = 8;
    8287    printFooter( stdout, "psMatrix", "Create input and output images", true );
    8388
Note: See TracChangeset for help on using the changeset viewer.