/***************************************************************************
                     FILE INFORMATION HEADER                              
                     -----------------------                                 

    a.  PROJECT NAME:       GRIFO_S7  P2813         
    b.  ITEM TYPE               
    c.  ITEM NAME:              matrix_types.h
    d.  ITEM REFERENCE:          
    e.  CURRENT VERSION:        1.1
    f.  DATE:                   3/6/97
    g.  SOURCE FILE LOCATION:   /sparc-2/library/sr3b_end/dati/common/cmn_dt/s.matrix_types.h
    h.  'C' RELEASE:            2.11
    i.  ITEM DESCRIPTION:       It contains commonly used matrix data types.
    j.  DOCUMENTATION REFERENCES:     
    k.  PROGRAMMER NAME(S):     B.Bontempi
				S.R.Curtis 
    l.  COPYRIGHT:              FIAR    
    m.  REVISION HISTORY:    07-11-01 - Baseline copied from 3B.86 R3K Metis radar version  

                                                                           
 ***************************************************************************/

#ifndef matrix_types_defined
//## attribute ::types_reverse::TopLevel.matrix_types_defined
const RhpString matrix_types_defined;

namespace legacy
{
    //#[ type mat_order
    typedef struct {
      int row, col;
    } mat_order;
    //#]
}

/* the matricies order - number of rows & columns */

namespace legacy
{
    //#[ type mat_t
    typedef struct {
      mat_order d;
      float m;                        /* the matrix address will be &(mat_t.m) */
    } mat_t;
    //#]
}

/* generic matrix */

/* Use the following macros to create a custom type: */

// Create a matrix type of order N*M, type name = T 
//#[ type MAT_CreateType
#define MAT_CreateType(T, N, M)   typedef struct {   \
                                    mat_order d; \
                                    float m[N][M];   \
                                  } T
//#]

// Create a vector type of order N, type name = T 
//#[ type MAT_CreateTypeV
#define MAT_CreateTypeV(T, N)    typedef struct {   \
                                   mat_order d; \
                                   float m[N];      \
                                 } T
//#]

/*-- Predefined matrix --*/

/*-- Added for SR3B. --*/

#endif
