IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 24, 2013, 12:18:50 PM (13 years ago)
Author:
eugene
Message:

change stack.type to an enum with sensible names; add support for binary functions of the form a(x,y); add support for the trinary operator a ? b : c (does not yet support sufficiently flexible cases for the types of a, b, c)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/Ohana/src/opihi/include/dvomath.h

    r33662 r36151  
    5555} Buffer;
    5656
     57typedef enum {
     58  ST_NONE,
     59  ST_LEFT,
     60  ST_RIGHT,
     61  ST_COMMA,
     62  ST_TRINARY,
     63  ST_OR,
     64  ST_AND,
     65  ST_LOGIC,
     66  ST_BITWISE,
     67  ST_ADD,
     68  ST_TIMES,
     69  ST_POWER,
     70  ST_UNARY,
     71  ST_BINARY,
     72
     73  ST_VALUE,
     74  ST_SCALAR_INT,
     75  ST_SCALAR_FLT,
     76  ST_VECTOR,
     77  ST_VECTOR_TMP,
     78  ST_MATRIX,
     79  ST_MATRIX_TMP,
     80
     81  ST_STRING,
     82  ST_STRING_TMP,
     83} StackVarType;
     84
    5785typedef struct {                        /* math stack structure */
    5886  char   *name;
    59   char    type;
     87  StackVarType type;
    6088  Buffer *buffer;
    6189  Vector *vector;
     
    77105void          delete_stack          PROTO((StackVar *stack, int Nstack));
    78106void          clear_stack           PROTO((StackVar *stack));
    79 void          assign_stack          PROTO((StackVar *stack, char *name, int type));
     107void          assign_stack          PROTO((StackVar *stack, char *name, StackVarType type));
     108
     109int           SSS_trinary           PROTO((StackVar *OUT, StackVar *V1, StackVar *V2, StackVar *V3, char *op));
     110int           VVV_trinary           PROTO((StackVar *OUT, StackVar *V1, StackVar *V2, StackVar *V3, char *op));
     111int           MMM_trinary           PROTO((StackVar *OUT, StackVar *V1, StackVar *V2, StackVar *V3, char *op));
    80112
    81113int           VV_binary             PROTO((StackVar *OUT, StackVar *V1, StackVar *V2, char *op));
Note: See TracChangeset for help on using the changeset viewer.