IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 20, 2004, 11:39:42 AM (22 years ago)
Author:
gusciora
Message:

New macros for psCOnstants.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psConstants.h

    r2741 r2762  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-12-17 00:18:31 $
     8 *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-12-20 21:39:42 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    429429}
    430430
    431 
     431#define PS_IMAGE_PRINT_F32(NAME) \
     432printf("======== printing %s ========\n", #NAME); \
     433for (int i = 0 ; i < NAME->numRows ; i++) { \
     434    for (int j = 0 ; j < NAME->numCols ; j++) { \
     435        printf("%.2f ", NAME->data.F32[i][j]); \
     436    } \
     437    printf("\n"); \
     438}\
     439
     440#define PS_IMAGE_SET_F32(NAME, VALUE) \
     441for (int i = 0 ; i < NAME->numRows ; i++) { \
     442    for (int j = 0 ; j < NAME->numCols ; j++) { \
     443        NAME->data.F32[i][j] = VALUE; \
     444    } \
     445}\
     446
     447#define PS_IMAGE_SET_U8(NAME, VALUE) \
     448for (int i = 0 ; i < NAME->numRows ; i++) { \
     449    for (int j = 0 ; j < NAME->numCols ; j++) { \
     450        NAME->data.U8[i][j] = VALUE; \
     451    } \
     452}\
    432453
    433454/*****************************************************************************
    434455    PS_READOUT macros:
    435  *****************************************************************************/
     456*****************************************************************************/
    436457#define PS_READOUT_CHECK_NULL(NAME, RVAL) \
    437458if (NAME == NULL || NAME->image == NULL) { \
Note: See TracChangeset for help on using the changeset viewer.