IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1064


Ignore:
Timestamp:
Jun 18, 2004, 4:00:45 PM (22 years ago)
Author:
harman
Message:

Added vector-scalar function macro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c

    r1059 r1064  
    2929 *  @author Ross Harman, MHPCC
    3030 *
    31  *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    32  *  @date $Date: 2004-06-18 23:34:59 $
     31 *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     32 *  @date $Date: 2004-06-19 02:00:45 $
    3333 *
    3434 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    7979#define MAX(A,B) (((A) > (B)) ? (A) : (B))
    8080
     81#define VECTOR_SCALAR(OUT,IN1,OP,IN2,TYPE)                                                                   \
     82{                                                                                                            \
     83    int i = 0;                                                                                               \
     84    int npt = 0;                                                                                             \
     85    ps##TYPE *o = NULL;                                                                                      \
     86    ps##TYPE *i1 = NULL;                                                                                     \
     87    ps##TYPE *i2 = NULL;                                                                                     \
     88    npt  = ((psVector*)IN1)->n;                                                                              \
     89    o  = ((psVector*)OUT)->data.TYPE;                                                                        \
     90    i1 = ((psVector*)IN1)->data.TYPE;                                                                        \
     91    i2 = &((psScalar*)IN2)->data.TYPE;                                                                       \
     92    for (i=0; i < npt; i++, o++, i1++) {                                                                     \
     93        *o = OP;                                                                                             \
     94    }                                                                                                        \
     95}
    8196#define VECTOR_VECTOR(OUT,IN1,OP,IN2,TYPE)                                                                   \
    8297{                                                                                                            \
Note: See TracChangeset for help on using the changeset viewer.