Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- octave_value arg = args (0);
- if (arg.is_bool_type ())
- {
- if (arg.is_sparse_type ())
- {
- SparseBoolMatrix v = arg.sparse_bool_matrix_value ();
- if (! error_state)
- retval = do_fun(v);
- }
- else
- {
- boolNDArray v = arg.bool_array_value ();
- if (! error_state)
- retval = do_fun(v)
- }
- }
- else if (arg.is_integer_type ())
- {
- #define DO_INT_BRANCH(INTT) \
- else if (arg.is_ ## INTT ## _type ()) \
- { \
- INTT ## NDArray v = arg.INTT ## _array_value (); \
- \
- if (! error_state) \
- retval = do_fun (v);\
- }
- if (false)
- ;
- DO_INT_BRANCH (int8)
- DO_INT_BRANCH (int16)
- DO_INT_BRANCH (int32)
- DO_INT_BRANCH (int64)
- DO_INT_BRANCH (uint8)
- DO_INT_BRANCH (uint16)
- DO_INT_BRANCH (uint32)
- DO_INT_BRANCH (uint64)
- else
- panic_impossible ();
- }
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement