Mercurial > octave-nkf
annotate libinterp/operators/op-double-conv.cc @ 20595:c1a6c31ac29a
eliminate more simple uses of error_state
* ov-classdef.cc: Eliminate simple uses of error_state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 06 Oct 2015 00:20:02 -0400 |
parents | 4197fc428c7d |
children |
rev | line source |
---|---|
4901 | 1 /* |
2 | |
19731
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
17787
diff
changeset
|
3 Copyright (C) 2004-2015 John W. Eaton |
4901 | 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 | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
4901 | 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 | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
4901 | 20 |
21 */ | |
22 | |
23 #ifdef HAVE_CONFIG_H | |
24 #include <config.h> | |
25 #endif | |
26 | |
27 #include "gripes.h" | |
28 #include "oct-obj.h" | |
29 #include "ov.h" | |
30 #include "ov-int8.h" | |
31 #include "ov-int16.h" | |
32 #include "ov-int32.h" | |
33 #include "ov-int64.h" | |
34 #include "ov-uint8.h" | |
35 #include "ov-uint16.h" | |
36 #include "ov-uint32.h" | |
37 #include "ov-uint64.h" | |
5002 | 38 #include "ov-bool.h" |
39 #include "ov-bool-mat.h" | |
5164 | 40 #include "ov-re-sparse.h" |
41 #include "ov-bool-sparse.h" | |
5032 | 42 #include "ov-range.h" |
4901 | 43 #include "ov-scalar.h" |
44 #include "ov-re-mat.h" | |
5032 | 45 #include "ov-str-mat.h" |
4901 | 46 #include "ov-typeinfo.h" |
47 #include "ops.h" | |
48 | |
49 // conversion ops | |
50 | |
51 DEFDBLCONVFN (int8_matrix_to_double_matrix, int8_matrix, int8_array) | |
52 DEFDBLCONVFN (int16_matrix_to_double_matrix, int16_matrix, int16_array) | |
53 DEFDBLCONVFN (int32_matrix_to_double_matrix, int32_matrix, int32_array) | |
54 DEFDBLCONVFN (int64_matrix_to_double_matrix, int64_matrix, int64_array) | |
55 | |
56 DEFDBLCONVFN (uint8_matrix_to_double_matrix, uint8_matrix, uint8_array) | |
57 DEFDBLCONVFN (uint16_matrix_to_double_matrix, uint16_matrix, uint16_array) | |
58 DEFDBLCONVFN (uint32_matrix_to_double_matrix, uint32_matrix, uint32_array) | |
59 DEFDBLCONVFN (uint64_matrix_to_double_matrix, uint64_matrix, uint64_array) | |
60 | |
61 DEFDBLCONVFN (int8_scalar_to_double_matrix, int8_scalar, int8_array) | |
62 DEFDBLCONVFN (int16_scalar_to_double_matrix, int16_scalar, int16_array) | |
63 DEFDBLCONVFN (int32_scalar_to_double_matrix, int32_scalar, int32_array) | |
64 DEFDBLCONVFN (int64_scalar_to_double_matrix, int64_scalar, int64_array) | |
65 | |
66 DEFDBLCONVFN (uint8_scalar_to_double_matrix, uint8_scalar, uint8_array) | |
67 DEFDBLCONVFN (uint16_scalar_to_double_matrix, uint16_scalar, uint16_array) | |
68 DEFDBLCONVFN (uint32_scalar_to_double_matrix, uint32_scalar, uint32_array) | |
69 DEFDBLCONVFN (uint64_scalar_to_double_matrix, uint64_scalar, uint64_array) | |
70 | |
5002 | 71 DEFDBLCONVFN (bool_matrix_to_double_matrix, bool_matrix, bool_array) |
72 DEFDBLCONVFN (bool_scalar_to_double_matrix, bool, bool_array) | |
73 | |
5164 | 74 DEFDBLCONVFN (sparse_matrix_to_double_matrix, sparse_matrix, array) |
75 DEFDBLCONVFN (sparse_bool_matrix_to_double_matrix, sparse_bool_matrix, array) | |
76 | |
5032 | 77 DEFDBLCONVFN (range_to_double_matrix, range, array) |
78 | |
5992 | 79 DEFSTRDBLCONVFN(char_matrix_str_to_double_matrix, char_matrix_str) |
80 DEFSTRDBLCONVFN(char_matrix_sq_str_to_double_matrix, char_matrix_sq_str) | |
5032 | 81 |
4901 | 82 DEFDBLCONVFN (double_scalar_to_double_matrix, scalar, array) |
83 | |
84 void | |
85 install_double_conv_ops (void) | |
86 { | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
87 INSTALL_CONVOP (octave_int8_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
88 int8_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
89 INSTALL_CONVOP (octave_int16_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
90 int16_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
91 INSTALL_CONVOP (octave_int32_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
92 int32_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
93 INSTALL_CONVOP (octave_int64_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
94 int64_matrix_to_double_matrix); |
4901 | 95 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
96 INSTALL_CONVOP (octave_uint8_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
97 uint8_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
98 INSTALL_CONVOP (octave_uint16_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
99 uint16_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
100 INSTALL_CONVOP (octave_uint32_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
101 uint32_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
102 INSTALL_CONVOP (octave_uint64_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
103 uint64_matrix_to_double_matrix); |
4901 | 104 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
105 INSTALL_CONVOP (octave_int8_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
106 int8_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
107 INSTALL_CONVOP (octave_int16_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
108 int16_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
109 INSTALL_CONVOP (octave_int32_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
110 int32_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
111 INSTALL_CONVOP (octave_int64_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
112 int64_scalar_to_double_matrix); |
4901 | 113 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
114 INSTALL_CONVOP (octave_uint8_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
115 uint8_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
116 INSTALL_CONVOP (octave_uint16_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
117 uint16_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
118 INSTALL_CONVOP (octave_uint32_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
119 uint32_scalar_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
120 INSTALL_CONVOP (octave_uint64_scalar, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
121 uint64_scalar_to_double_matrix); |
4901 | 122 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
123 INSTALL_CONVOP (octave_bool_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
124 bool_matrix_to_double_matrix); |
5002 | 125 INSTALL_CONVOP (octave_bool, octave_matrix, bool_scalar_to_double_matrix); |
126 | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
127 INSTALL_CONVOP (octave_sparse_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
128 sparse_matrix_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
129 INSTALL_CONVOP (octave_sparse_bool_matrix, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
130 sparse_bool_matrix_to_double_matrix); |
5164 | 131 |
5032 | 132 INSTALL_CONVOP (octave_range, octave_matrix, range_to_double_matrix); |
133 | |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
134 INSTALL_CONVOP (octave_char_matrix_str, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
135 char_matrix_str_to_double_matrix); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
136 INSTALL_CONVOP (octave_char_matrix_sq_str, octave_matrix, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
137 char_matrix_sq_str_to_double_matrix); |
5032 | 138 |
4901 | 139 INSTALL_CONVOP (octave_scalar, octave_matrix, double_scalar_to_double_matrix); |
140 } |