GNU Octave 11.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 
Loading...
Searching...
No Matches
Array-oct.cc
Go to the documentation of this file.
1////////////////////////////////////////////////////////////////////////
2//
3// Copyright (C) 2022-2026 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-base.h"
31
32// FIXME: Including "Array-base.h" will have implicitly instantiated
33// Array<octave_idx_type>. Could that be an issue?
34
35#if ! defined (OCTAVE_EXTERN_TEMPLATE_ARRAY)
36// guard against double extern template declarations
37#define OCTAVE_EXTERN_TEMPLATE_ARRAY
38
39#include <string>
40#include "idx-vector.h"
41#include "oct-cmplx.h"
42#include "oct-inttypes-fwd.h"
43
44// "Protect" Array<T> instantiations that are exported by liboctave from
45// being implicitly instantiated in compilation units including this file.
46
47// Declare extern templates before including "Array-base.cc" to avoid
48// implicitly instantiating Array<octave::idx_vector>.
49
50// instantiated in Array-C.cc
51extern template class OCTAVE_EXTERN_TEMPLATE_API Array<Complex>;
52// instantiated in Array-b.cc
53extern template class OCTAVE_EXTERN_TEMPLATE_API Array<bool>;
54// instantiated in Array-ch.cc
55extern template class OCTAVE_EXTERN_TEMPLATE_API Array<char>;
56// instantiated in Array-d.cc
57extern template class OCTAVE_EXTERN_TEMPLATE_API Array<double>;
58// instantiated in Array-f.cc
59extern template class OCTAVE_EXTERN_TEMPLATE_API Array<float>;
60// instantiated in Array-fC.cc
61extern template class OCTAVE_EXTERN_TEMPLATE_API Array<FloatComplex>;
62// instantiated in Array-i.cc
63extern template class OCTAVE_EXTERN_TEMPLATE_API Array<signed char>;
64// extern template class Array<short>;
65extern template class OCTAVE_EXTERN_TEMPLATE_API Array<int>;
66extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long>;
67#if defined (OCTAVE_HAVE_LONG_LONG_INT)
68extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long long>;
69#endif
70extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned char>;
71extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned short>;
72extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned int>;
73extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long>;
74#if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
75extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long long>;
76#endif
77extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int8>;
78extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int16>;
79extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int32>;
80extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int64>;
81extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint8>;
82extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint16>;
83extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint32>;
84extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint64>;
85// instantiated in Array-idx-vec.cc
86extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave::idx_vector>;
87// instantiated in Array-s.cc
88extern template class OCTAVE_EXTERN_TEMPLATE_API Array<short>;
89// instantiated in Array-str.cc
90extern template class OCTAVE_EXTERN_TEMPLATE_API Array<std::string>;
91// instantiated in Array-voidp.cc
92extern template class OCTAVE_EXTERN_TEMPLATE_API Array<void *>;
93
94#endif // OCTAVE_EXTERN_TEMPLATE_ARRAY
95
96#include "Array-base.cc"
N Dimensional Array with copy-on-write semantics.
Definition Array-base.h:130