comparison src/OPERATORS/op-double-conv.cc @ 4901:35bfb4e0b96b

[project @ 2004-06-14 18:33:02 by jwe]
author jwe
date Mon, 14 Jun 2004 18:33:02 +0000
parents
children d894b803ccb5
comparison
equal deleted inserted replaced
4900:cf470c996819 4901:35bfb4e0b96b
1 /*
2
3 Copyright (C) 2004 John W. Eaton
4
5 This file is part of Octave.
6
7 Octave is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by the
9 Free Software Foundation; either version 2, or (at your option) any
10 later version.
11
12 Octave is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
21 */
22
23 #if defined (__GNUG__) && defined (USE_PRAGMA_INTERFACE_IMPLEMENTATION)
24 #pragma implementation
25 #endif
26
27 #ifdef HAVE_CONFIG_H
28 #include <config.h>
29 #endif
30
31 #include "gripes.h"
32 #include "oct-obj.h"
33 #include "ov.h"
34 #include "ov-int8.h"
35 #include "ov-int16.h"
36 #include "ov-int32.h"
37 #include "ov-int64.h"
38 #include "ov-uint8.h"
39 #include "ov-uint16.h"
40 #include "ov-uint32.h"
41 #include "ov-uint64.h"
42 #include "ov-scalar.h"
43 #include "ov-re-mat.h"
44 #include "ov-typeinfo.h"
45 #include "ops.h"
46
47 // conversion ops
48
49 DEFDBLCONVFN (int8_matrix_to_double_matrix, int8_matrix, int8_array)
50 DEFDBLCONVFN (int16_matrix_to_double_matrix, int16_matrix, int16_array)
51 DEFDBLCONVFN (int32_matrix_to_double_matrix, int32_matrix, int32_array)
52 DEFDBLCONVFN (int64_matrix_to_double_matrix, int64_matrix, int64_array)
53
54 DEFDBLCONVFN (uint8_matrix_to_double_matrix, uint8_matrix, uint8_array)
55 DEFDBLCONVFN (uint16_matrix_to_double_matrix, uint16_matrix, uint16_array)
56 DEFDBLCONVFN (uint32_matrix_to_double_matrix, uint32_matrix, uint32_array)
57 DEFDBLCONVFN (uint64_matrix_to_double_matrix, uint64_matrix, uint64_array)
58
59 DEFDBLCONVFN (int8_scalar_to_double_matrix, int8_scalar, int8_array)
60 DEFDBLCONVFN (int16_scalar_to_double_matrix, int16_scalar, int16_array)
61 DEFDBLCONVFN (int32_scalar_to_double_matrix, int32_scalar, int32_array)
62 DEFDBLCONVFN (int64_scalar_to_double_matrix, int64_scalar, int64_array)
63
64 DEFDBLCONVFN (uint8_scalar_to_double_matrix, uint8_scalar, uint8_array)
65 DEFDBLCONVFN (uint16_scalar_to_double_matrix, uint16_scalar, uint16_array)
66 DEFDBLCONVFN (uint32_scalar_to_double_matrix, uint32_scalar, uint32_array)
67 DEFDBLCONVFN (uint64_scalar_to_double_matrix, uint64_scalar, uint64_array)
68
69 DEFDBLCONVFN (double_scalar_to_double_matrix, scalar, array)
70
71 void
72 install_double_conv_ops (void)
73 {
74 INSTALL_CONVOP (octave_int8_matrix, octave_matrix, int8_matrix_to_double_matrix);
75 INSTALL_CONVOP (octave_int16_matrix, octave_matrix, int16_matrix_to_double_matrix);
76 INSTALL_CONVOP (octave_int32_matrix, octave_matrix, int32_matrix_to_double_matrix);
77 INSTALL_CONVOP (octave_int64_matrix, octave_matrix, int64_matrix_to_double_matrix);
78
79 INSTALL_CONVOP (octave_uint8_matrix, octave_matrix, uint8_matrix_to_double_matrix);
80 INSTALL_CONVOP (octave_uint16_matrix, octave_matrix, uint16_matrix_to_double_matrix);
81 INSTALL_CONVOP (octave_uint32_matrix, octave_matrix, uint32_matrix_to_double_matrix);
82 INSTALL_CONVOP (octave_uint64_matrix, octave_matrix, uint64_matrix_to_double_matrix);
83
84 INSTALL_CONVOP (octave_int8_scalar, octave_matrix, int8_scalar_to_double_matrix);
85 INSTALL_CONVOP (octave_int16_scalar, octave_matrix, int16_scalar_to_double_matrix);
86 INSTALL_CONVOP (octave_int32_scalar, octave_matrix, int32_scalar_to_double_matrix);
87 INSTALL_CONVOP (octave_int64_scalar, octave_matrix, int64_scalar_to_double_matrix);
88
89 INSTALL_CONVOP (octave_uint8_scalar, octave_matrix, uint8_scalar_to_double_matrix);
90 INSTALL_CONVOP (octave_uint16_scalar, octave_matrix, uint16_scalar_to_double_matrix);
91 INSTALL_CONVOP (octave_uint32_scalar, octave_matrix, uint32_scalar_to_double_matrix);
92 INSTALL_CONVOP (octave_uint64_scalar, octave_matrix, uint64_scalar_to_double_matrix);
93
94 INSTALL_CONVOP (octave_scalar, octave_matrix, double_scalar_to_double_matrix);
95 }
96
97 /*
98 ;;; Local Variables: ***
99 ;;; mode: C++ ***
100 ;;; End: ***
101 */