GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
Array-oct.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2022-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 
27 // Include this file when instantiating the Array class with new types in
28 // projects linking to "liboctave" but not to "liboctinterp".
29 
30 #include "Array.h"
31 
32 // FIXME: Including "Array.h" will have implicitly instantiated
33 // Array<octave_idx_type>. Could that be an issue?
34 
35 #include <string>
36 #include "idx-vector.h"
37 #include "oct-cmplx.h"
38 #include "oct-inttypes-fwd.h"
39 
40 // "Protect" Array<T> instantiations that are exported by liboctave from
41 // being implicitly instantiated in compilation units including this file.
42 
43 // Declare extern templates before including "Array-base.cc" to avoid
44 // implicitly instantiating Array<octave::idx_vector>.
45 
46 // instantiated in Array-C.cc
47 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<Complex>;
48 // instantiated in Array-b.cc
49 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<bool>;
50 // instantiated in Array-ch.cc
51 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<char>;
52 // instantiated in Array-d.cc
53 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<double>;
54 // instantiated in Array-f.cc
55 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<float>;
56 // instantiated in Array-fC.cc
57 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<FloatComplex>;
58 // instantiated in Array-i.cc
59 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<signed char>;
60 // extern template class Array<short>;
61 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<int>;
62 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long>;
63 #if defined (OCTAVE_HAVE_LONG_LONG_INT)
64 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long long>;
65 #endif
66 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned char>;
67 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned short>;
68 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned int>;
69 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long>;
70 #if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
71 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long long>;
72 #endif
73 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int8>;
74 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int16>;
75 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int32>;
76 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int64>;
77 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint8>;
78 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint16>;
79 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint32>;
80 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint64>;
81 // instantiated in Array-idx-vec.cc
82 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave::idx_vector>;
83 // instantiated in Array-s.cc
84 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<short>;
85 // instantiated in Array-str.cc
86 extern template class OCTAVE_EXTERN_TEMPLATE_API Array<std::string>;
87 
88 #include "Array-base.cc"
N Dimensional Array with copy-on-write semantics.
Definition: Array.h:130