GNU Octave 10.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-2025 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
47extern template class OCTAVE_EXTERN_TEMPLATE_API Array<Complex>;
48// instantiated in Array-b.cc
49extern template class OCTAVE_EXTERN_TEMPLATE_API Array<bool>;
50// instantiated in Array-ch.cc
51extern template class OCTAVE_EXTERN_TEMPLATE_API Array<char>;
52// instantiated in Array-d.cc
53extern template class OCTAVE_EXTERN_TEMPLATE_API Array<double>;
54// instantiated in Array-f.cc
55extern template class OCTAVE_EXTERN_TEMPLATE_API Array<float>;
56// instantiated in Array-fC.cc
57extern template class OCTAVE_EXTERN_TEMPLATE_API Array<FloatComplex>;
58// instantiated in Array-i.cc
59extern template class OCTAVE_EXTERN_TEMPLATE_API Array<signed char>;
60// extern template class Array<short>;
61extern template class OCTAVE_EXTERN_TEMPLATE_API Array<int>;
62extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long>;
63#if defined (OCTAVE_HAVE_LONG_LONG_INT)
64extern template class OCTAVE_EXTERN_TEMPLATE_API Array<long long>;
65#endif
66extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned char>;
67extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned short>;
68extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned int>;
69extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long>;
70#if defined (OCTAVE_HAVE_UNSIGNED_LONG_LONG_INT)
71extern template class OCTAVE_EXTERN_TEMPLATE_API Array<unsigned long long>;
72#endif
73extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int8>;
74extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int16>;
75extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int32>;
76extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_int64>;
77extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint8>;
78extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint16>;
79extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint32>;
80extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave_uint64>;
81// instantiated in Array-idx-vec.cc
82extern template class OCTAVE_EXTERN_TEMPLATE_API Array<octave::idx_vector>;
83// instantiated in Array-s.cc
84extern template class OCTAVE_EXTERN_TEMPLATE_API Array<short>;
85// instantiated in Array-str.cc
86extern 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