49 #define DEFINTCONVFN(name, tfrom, tto) \
52 CAST_CONV_ARG (const octave_ ## tfrom&); \
54 octave_ ## tto ## _matrix v2 = v.tto ## _array_value (); \
55 return new octave_ ## tto ## _matrix (v2); \
150 #define INT_CONV_FUNCTIONS(tfrom) \
151 DEFCONVFN2 (tfrom ## _scalar_to_int8, tfrom, scalar, int8) \
152 DEFCONVFN2 (tfrom ## _scalar_to_int16, tfrom, scalar, int16) \
153 DEFCONVFN2 (tfrom ## _scalar_to_int32, tfrom, scalar, int32) \
154 DEFCONVFN2 (tfrom ## _scalar_to_int64, tfrom, scalar, int64) \
156 DEFCONVFN2 (tfrom ## _scalar_to_uint8, tfrom, scalar, uint8) \
157 DEFCONVFN2 (tfrom ## _scalar_to_uint16, tfrom, scalar, uint16) \
158 DEFCONVFN2 (tfrom ## _scalar_to_uint32, tfrom, scalar, uint32) \
159 DEFCONVFN2 (tfrom ## _scalar_to_uint64, tfrom, scalar, uint64) \
161 DEFCONVFN2 (tfrom ## _matrix_to_int8, tfrom, matrix, int8) \
162 DEFCONVFN2 (tfrom ## _matrix_to_int16, tfrom, matrix, int16) \
163 DEFCONVFN2 (tfrom ## _matrix_to_int32, tfrom, matrix, int32) \
164 DEFCONVFN2 (tfrom ## _matrix_to_int64, tfrom, matrix, int64) \
166 DEFCONVFN2 (tfrom ## _matrix_to_uint8, tfrom, matrix, uint8) \
167 DEFCONVFN2 (tfrom ## _matrix_to_uint16, tfrom, matrix, uint16) \
168 DEFCONVFN2 (tfrom ## _matrix_to_uint32, tfrom, matrix, uint32) \
169 DEFCONVFN2 (tfrom ## _matrix_to_uint64, tfrom, matrix, uint64)
181 #define INSTALL_INT_CONV_FUNCTIONS(tfrom) \
182 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_int8_matrix, tfrom ## _scalar_to_int8) \
183 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_int16_matrix, tfrom ## _scalar_to_int16) \
184 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_int32_matrix, tfrom ## _scalar_to_int32) \
185 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_int64_matrix, tfrom ## _scalar_to_int64) \
187 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_uint8_matrix, tfrom ## _scalar_to_uint8) \
188 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_uint16_matrix, tfrom ## _scalar_to_uint16) \
189 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_uint32_matrix, tfrom ## _scalar_to_uint32) \
190 INSTALL_CONVOP (octave_ ## tfrom ## _scalar, octave_uint64_matrix, tfrom ## _scalar_to_uint64) \
192 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_int8_matrix, tfrom ## _matrix_to_int8) \
193 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_int16_matrix, tfrom ## _matrix_to_int16) \
194 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_int32_matrix, tfrom ## _matrix_to_int32) \
195 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_int64_matrix, tfrom ## _matrix_to_int64) \
197 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_uint8_matrix, tfrom ## _matrix_to_uint8) \
198 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_uint16_matrix, tfrom ## _matrix_to_uint16) \
199 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_uint32_matrix, tfrom ## _matrix_to_uint32) \
200 INSTALL_CONVOP (octave_ ## tfrom ## _matrix, octave_uint64_matrix, tfrom ## _matrix_to_uint64)
202 #define INSTALL_CONVOPS(tfrom) \
203 INSTALL_CONVOP (octave_ ## tfrom, octave_int8_matrix, tfrom ## _to_int8) \
204 INSTALL_CONVOP (octave_ ## tfrom, octave_int16_matrix, tfrom ## _to_int16) \
205 INSTALL_CONVOP (octave_ ## tfrom, octave_int32_matrix, tfrom ## _to_int32) \
206 INSTALL_CONVOP (octave_ ## tfrom, octave_int64_matrix, tfrom ## _to_int64) \
208 INSTALL_CONVOP (octave_ ## tfrom, octave_uint8_matrix, tfrom ## _to_uint8) \
209 INSTALL_CONVOP (octave_ ## tfrom, octave_uint16_matrix, tfrom ## _to_uint16) \
210 INSTALL_CONVOP (octave_ ## tfrom, octave_uint32_matrix, tfrom ## _to_uint32) \
211 INSTALL_CONVOP (octave_ ## tfrom, octave_uint64_matrix, tfrom ## _to_uint64)
#define DEFINTCONVFN(name, tfrom, tto)
#define INSTALL_INT_CONV_FUNCTIONS(tfrom)
#define INSTALL_CONVOPS(tfrom)
void install_int_conv_ops(void)
#define INT_CONV_FUNCTIONS(tfrom)
#define DEFSTRINTCONVFN(name, tto)
#define DEFCONVFN(name, tfrom, tto)
static bool scalar(const dim_vector &dims)