GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
mxtypes.h
Go to the documentation of this file.
1 // DO NOT EDIT! Generated automatically by mx-mxtypes-h.sh
2 
3 ////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (C) 2001-2024 The Octave Project Developers
6 //
7 // See the file COPYRIGHT.md in the top-level directory of this
8 // distribution or <https://octave.org/copyright/>.
9 //
10 // This file is part of Octave.
11 //
12 // Octave is free software: you can redistribute it and/or modify it
13 // under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // Octave is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with Octave; see the file COPYING. If not, see
24 // <https://www.gnu.org/licenses/>.
25 //
26 ////////////////////////////////////////////////////////////////////////
27 
28 /*
29 
30 Part of this code was originally distributed as part of Octave Forge under
31 the following terms:
32 
33 Author: Paul Kienzle
34 I grant this code to the public domain.
35 2001-03-22
36 
37 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
38 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
41 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
42 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
43 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
44 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
45 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
46 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47 SUCH DAMAGE.
48 
49 */
50 
51 #if ! defined (octave_mxtypes_h)
52 #define octave_mxtypes_h 1
53 
54 #include "octave-config.h"
55 
56 typedef enum
57  {
75 }
76 mxClassID;
77 
78 typedef enum
79  {
80  mxREAL = 0,
81  mxCOMPLEX = 1
82 }
84 
85 /* Matlab uses a wide char (uint16) internally, but Octave uses plain char. */
86 /* typedef Uint16 mxChar; */
87 typedef char mxChar;
88 
89 typedef unsigned char mxLogical;
90 
91 typedef double mxDouble;
92 typedef float mxSingle;
93 
94 typedef int8_t mxInt8;
95 typedef int16_t mxInt16;
96 typedef int32_t mxInt32;
97 typedef int64_t mxInt64;
98 
99 typedef uint8_t mxUint8;
100 typedef uint16_t mxUint16;
101 typedef uint32_t mxUint32;
102 typedef uint64_t mxUint64;
103 
106 
107 /* We don't have these yet but we can define the types. */
108 typedef struct { mxInt8 real; mxInt8 imag; } mxComplexInt8;
109 typedef struct { mxInt16 real; mxInt16 imag; } mxComplexInt16;
110 typedef struct { mxInt32 real; mxInt32 imag; } mxComplexInt32;
111 typedef struct { mxInt64 real; mxInt64 imag; } mxComplexInt64;
112 
113 typedef struct { mxUint8 real; mxUint8 imag; } mxComplexUint8;
117 
118 /*
119  * FIXME: Mathworks says mwSize, mwIndex should be int generally.
120  * But on 64-bit systems, or when mex -largeArrayDims is used, it is size_t.
121  * mwSignedIndex is supposed to be ptrdiff_t. All of this is confusing.
122  * Its better to conform to the same indexing as the rest of Octave.
123  */
124 typedef int64_t mwSize;
125 typedef int64_t mwIndex;
126 typedef int64_t mwSignedIndex;
127 
128 #endif
ColumnVector real(const ComplexColumnVector &a)
Definition: dColVector.cc:137
int16_t mxInt16
Definition: mxtypes.h:95
char mxChar
Definition: mxtypes.h:87
uint64_t mxUint64
Definition: mxtypes.h:102
int32_t mxInt32
Definition: mxtypes.h:96
float mxSingle
Definition: mxtypes.h:92
mxClassID
Definition: mxtypes.h:57
@ mxFUNCTION_CLASS
Definition: mxtypes.h:74
@ mxINT8_CLASS
Definition: mxtypes.h:66
@ mxINT64_CLASS
Definition: mxtypes.h:72
@ mxUINT8_CLASS
Definition: mxtypes.h:67
@ mxUNKNOWN_CLASS
Definition: mxtypes.h:58
@ mxLOGICAL_CLASS
Definition: mxtypes.h:61
@ mxSTRUCT_CLASS
Definition: mxtypes.h:60
@ mxINT32_CLASS
Definition: mxtypes.h:70
@ mxSINGLE_CLASS
Definition: mxtypes.h:65
@ mxVOID_CLASS
Definition: mxtypes.h:63
@ mxDOUBLE_CLASS
Definition: mxtypes.h:64
@ mxUINT64_CLASS
Definition: mxtypes.h:73
@ mxCHAR_CLASS
Definition: mxtypes.h:62
@ mxUINT16_CLASS
Definition: mxtypes.h:69
@ mxCELL_CLASS
Definition: mxtypes.h:59
@ mxUINT32_CLASS
Definition: mxtypes.h:71
@ mxINT16_CLASS
Definition: mxtypes.h:68
int64_t mxInt64
Definition: mxtypes.h:97
int64_t mwIndex
Definition: mxtypes.h:125
double mxDouble
Definition: mxtypes.h:91
mxComplexity
Definition: mxtypes.h:79
@ mxREAL
Definition: mxtypes.h:80
@ mxCOMPLEX
Definition: mxtypes.h:81
uint32_t mxUint32
Definition: mxtypes.h:101
uint8_t mxUint8
Definition: mxtypes.h:99
uint16_t mxUint16
Definition: mxtypes.h:100
int8_t mxInt8
Definition: mxtypes.h:94
unsigned char mxLogical
Definition: mxtypes.h:89
int64_t mwSize
Definition: mxtypes.h:124
int64_t mwSignedIndex
Definition: mxtypes.h:126
mxDouble imag
Definition: mxtypes.h:104
mxInt16 imag
Definition: mxtypes.h:109
mxInt32 imag
Definition: mxtypes.h:110
mxInt64 imag
Definition: mxtypes.h:111
mxInt8 imag
Definition: mxtypes.h:108
mxSingle imag
Definition: mxtypes.h:105
mxUint16 imag
Definition: mxtypes.h:114
mxUint32 imag
Definition: mxtypes.h:115
mxUint64 imag
Definition: mxtypes.h:116
mxUint8 imag
Definition: mxtypes.h:113