Changeset 36399
- Timestamp:
- Dec 17, 2013, 10:28:08 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20131211/Ohana/src/opihi
- Files:
-
- 1 added
- 4 edited
-
cmd.data/Makefile (modified) (1 diff)
-
cmd.data/cast.c (added)
-
cmd.data/init.c (modified) (2 diffs)
-
lib.shell/convert_to_RPN.c (modified) (1 diff)
-
lib.shell/stack_math.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20131211/Ohana/src/opihi/cmd.data/Makefile
r36375 r36399 25 25 $(SRC)/book.$(ARCH).o \ 26 26 $(SRC)/book_commands.$(ARCH).o \ 27 $(SRC)/cast.$(ARCH).o \ 27 28 $(SRC)/center.$(ARCH).o \ 28 29 $(SRC)/clear.$(ARCH).o \ -
branches/eam_branches/ipp-20131211/Ohana/src/opihi/cmd.data/init.c
r36375 r36399 10 10 int center PROTO((int, char **)); 11 11 int parity PROTO((int, char **)); 12 int cast PROTO((int, char **)); 12 13 int circstats PROTO((int, char **)); 13 14 int clear PROTO((int, char **)); … … 164 165 {1, "buffers", list_buffers, "list the currently allocated buffers (images)"}, 165 166 {1, "center", center, "center image on coords"}, 167 {1, "cast", cast, "cast input vector to specified type"}, 166 168 {1, "circstats", circstats, "circular statistics"}, 167 169 {1, "clear", clear, "erase plot"}, -
branches/eam_branches/ipp-20131211/Ohana/src/opihi/lib.shell/convert_to_RPN.c
r36375 r36399 30 30 if (!strcmp (argv[i], "abs")) { type = ST_UNARY; goto gotit; } 31 31 if (!strcmp (argv[i], "int")) { type = ST_UNARY; goto gotit; } 32 if (!strcmp (argv[i], "floor")) { type = ST_UNARY; goto gotit; } 33 if (!strcmp (argv[i], "round")) { type = ST_UNARY; goto gotit; } 34 if (!strcmp (argv[i], "ceil")) { type = ST_UNARY; goto gotit; } 35 if (!strcmp (argv[i], "rint")) { type = ST_UNARY; goto gotit; } 32 36 if (!strcmp (argv[i], "exp")) { type = ST_UNARY; goto gotit; } 33 37 if (!strcmp (argv[i], "ten")) { type = ST_UNARY; goto gotit; } -
branches/eam_branches/ipp-20131211/Ohana/src/opihi/lib.shell/stack_math.c
r36375 r36399 1123 1123 if (!strcmp (op, "abs")) S_FUNC(fabs(M1), ST_SCALAR_INT); 1124 1124 if (!strcmp (op, "int")) S_FUNC((long long)(M1), ST_SCALAR_INT); 1125 if (!strcmp (op, "floor")) S_FUNC(floor (M1), ST_SCALAR_FLT); 1126 if (!strcmp (op, "ceil")) S_FUNC(ceil (M1), ST_SCALAR_FLT); 1127 if (!strcmp (op, "rint")) S_FUNC(nearbyint (M1), ST_SCALAR_FLT); 1125 1128 if (!strcmp (op, "exp")) S_FUNC(exp (M1), ST_SCALAR_FLT); 1126 1129 if (!strcmp (op, "ten")) S_FUNC(pow (10.0,M1), ST_SCALAR_FLT); … … 1202 1205 if (!strcmp (op, "abs")) V_FUNC(fabs(*M1), ST_SCALAR_INT); 1203 1206 if (!strcmp (op, "int")) V_FUNC((long long)(*M1), ST_SCALAR_INT); 1207 if (!strcmp (op, "floor")) V_FUNC(floor (*M1), ST_SCALAR_FLT); 1208 if (!strcmp (op, "ceil")) V_FUNC(ceil (*M1), ST_SCALAR_FLT); 1209 if (!strcmp (op, "rint")) V_FUNC(nearbyint (*M1), ST_SCALAR_FLT); 1204 1210 if (!strcmp (op, "exp")) V_FUNC(exp(*M1), ST_SCALAR_FLT); 1205 1211 if (!strcmp (op, "ten")) V_FUNC(pow(10.0,*M1), ST_SCALAR_FLT); … … 1273 1279 if (!strcmp (op, "abs")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = fabs(*M1); }} 1274 1280 if (!strcmp (op, "int")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = (opihi_flt)(long long)(*M1); }} 1281 1282 if (!strcmp (op, "floor")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = floor (*M1); }} 1283 if (!strcmp (op, "ceil")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = ceil (*M1); }} 1284 if (!strcmp (op, "rint")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = nearbyint (*M1); }} 1285 1275 1286 if (!strcmp (op, "exp")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = exp(*M1); }} 1276 1287 if (!strcmp (op, "ten")) { for (i = 0; i < Nx*Ny; i++, out++, M1++) { *out = pow(10.0,*M1); }}
Note:
See TracChangeset
for help on using the changeset viewer.
