Mercurial > jwe > octave
changeset 29664:a616f687cf63
add OCTAVE_API tag to MArray and MSparse template function declarations
* MArray.h: Add OCTAVE_API tag to the following functions:
operator += (MArray<T>&, const T&);
operator -= (MArray<T>&, const T&);
operator *= (MArray<T>&, const T&);
operator /= (MArray<T>&, const T&);
operator += (MArray<T>&, const MArray<T>&);
operator -= (MArray<T>&, const MArray<T>&);
product_eq (MArray<T>&, const MArray<T>&);
quotient_eq (MArray<T>&, const MArray<T>&);
operator + (const MArray<T>&);
operator - (const MArray<T>&);
operator + (const MArray<T>&, const T&);
operator - (const MArray<T>&, const T&);
operator * (const MArray<T>&, const T&);
operator / (const MArray<T>&, const T&);
operator + (const T&, const MArray<T>&);
operator - (const T&, const MArray<T>&);
operator * (const T&, const MArray<T>&);
operator / (const T&, const MArray<T>&);
operator + (const MArray<T>&, const MArray<T>&);
operator - (const MArray<T>&, const MArray<T>&);
quotient (const MArray<T>&, const MArray<T>&);
product (const MArray<T>&, const MArray<T>&);
* MSparse.h, MSparse.cc: Add OCTAVE_API tag to the MSparse class
declaration and to following functions:
plus_or_minus (MSparse<T>&, const MSparse<T>&, OP, const char *)
operator += (MSparse<T>&, const MSparse<T>&)
operator -= (MSparse<T>&, const MSparse<T>&)
plus_or_minus (const MSparse<T>&, const T&, OP)
operator + (const MSparse<T>&, const T&)
operator - (const MSparse<T>&, const T&)
times_or_divide (const MSparse<T>&, const T&, OP)
operator * (const MSparse<T>&, const T&)
operator / (const MSparse<T>&, const T&)
plus_or_minus (const T&, const MSparse<T>&, OP)
operator + (const T&, const MSparse<T>&)
operator - (const T&, const MSparse<T>&)
times_or_divides (const T&, const MSparse<T>&, OP)
operator * (const T&, const MSparse<T>&)
operator / (const T&, const MSparse<T>&)
plus_or_minus (const MSparse<T>&, const MSparse<T>&, OP, const char *, bool)
operator+ (const MSparse<T>&, const MSparse<T>&)
operator- (const MSparse<T>&, const MSparse<T>&)
product (const MSparse<T>&, const MSparse<T>&)
quotient (const MSparse<T>&, const MSparse<T>&)
operator + (const MSparse<T>&)
operator - (const MSparse<T>&)
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 13 May 2021 10:12:49 -0400 |
parents | 1564f617da7e |
children | 1a251fdb97af |
files | liboctave/array/MArray.h liboctave/array/MSparse.cc liboctave/array/MSparse.h |
diffstat | 3 files changed, 45 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/array/MArray.h Sun May 09 20:00:01 2021 +0200 +++ b/liboctave/array/MArray.h Thu May 13 10:12:49 2021 -0400 @@ -34,28 +34,28 @@ // forward declare template with visibility attribute template <typename T> class OCTAVE_API MArray; -template <typename T> MArray<T>& operator += (MArray<T>&, const T&); -template <typename T> MArray<T>& operator -= (MArray<T>&, const T&); -template <typename T> MArray<T>& operator *= (MArray<T>&, const T&); -template <typename T> MArray<T>& operator /= (MArray<T>&, const T&); -template <typename T> MArray<T>& operator += (MArray<T>&, const MArray<T>&); -template <typename T> MArray<T>& operator -= (MArray<T>&, const MArray<T>&); -template <typename T> MArray<T>& product_eq (MArray<T>&, const MArray<T>&); -template <typename T> MArray<T>& quotient_eq (MArray<T>&, const MArray<T>&); -template <typename T> MArray<T> operator + (const MArray<T>&); -template <typename T> MArray<T> operator - (const MArray<T>&); -template <typename T> MArray<T> operator + (const MArray<T>&, const T&); -template <typename T> MArray<T> operator - (const MArray<T>&, const T&); -template <typename T> MArray<T> operator * (const MArray<T>&, const T&); -template <typename T> MArray<T> operator / (const MArray<T>&, const T&); -template <typename T> MArray<T> operator + (const T&, const MArray<T>&); -template <typename T> MArray<T> operator - (const T&, const MArray<T>&); -template <typename T> MArray<T> operator * (const T&, const MArray<T>&); -template <typename T> MArray<T> operator / (const T&, const MArray<T>&); -template <typename T> MArray<T> operator + (const MArray<T>&, const MArray<T>&); -template <typename T> MArray<T> operator - (const MArray<T>&, const MArray<T>&); -template <typename T> MArray<T> quotient (const MArray<T>&, const MArray<T>&); -template <typename T> MArray<T> product (const MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T>& operator += (MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T>& operator -= (MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T>& operator *= (MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T>& operator /= (MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T>& operator += (MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T>& operator -= (MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T>& product_eq (MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T>& quotient_eq (MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator + (const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator - (const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator + (const MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T> operator - (const MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T> operator * (const MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T> operator / (const MArray<T>&, const T&); +template <typename T> OCTAVE_API MArray<T> operator + (const T&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator - (const T&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator * (const T&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator / (const T&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator + (const MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> operator - (const MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> quotient (const MArray<T>&, const MArray<T>&); +template <typename T> OCTAVE_API MArray<T> product (const MArray<T>&, const MArray<T>&); //! Template for N-dimensional array classes with like-type math operators. template <typename T>
--- a/liboctave/array/MSparse.cc Sun May 09 20:00:01 2021 +0200 +++ b/liboctave/array/MSparse.cc Thu May 13 10:12:49 2021 -0400 @@ -28,6 +28,7 @@ // Element by element MSparse by MSparse ops. template <typename T, typename OP> +OCTAVE_API MSparse<T>& plus_or_minus (MSparse<T>& a, const MSparse<T>& b, OP op, const char *op_name) { @@ -98,6 +99,7 @@ } template <typename T> +OCTAVE_API MSparse<T>& operator += (MSparse<T>& a, const MSparse<T>& b) { @@ -105,6 +107,7 @@ } template <typename T> +OCTAVE_API MSparse<T>& operator -= (MSparse<T>& a, const MSparse<T>& b) { @@ -114,6 +117,7 @@ // Element by element MSparse by scalar ops. template <typename T, typename OP> +OCTAVE_API MArray<T> plus_or_minus (const MSparse<T>& a, const T& s, OP op) { @@ -129,6 +133,7 @@ } template <typename T> +OCTAVE_API MArray<T> operator + (const MSparse<T>& a, const T& s) { @@ -136,6 +141,7 @@ } template <typename T> +OCTAVE_API MArray<T> operator - (const MSparse<T>& a, const T& s) { @@ -143,6 +149,7 @@ } template <typename T, typename OP> +OCTAVE_API MSparse<T> times_or_divide (const MSparse<T>& a, const T& s, OP op) { @@ -164,6 +171,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator * (const MSparse<T>& a, const T& s) { @@ -171,6 +179,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator / (const MSparse<T>& a, const T& s) { @@ -180,6 +189,7 @@ // Element by element scalar by MSparse ops. template <typename T, typename OP> +OCTAVE_API MArray<T> plus_or_minus (const T& s, const MSparse<T>& a, OP op) { @@ -195,6 +205,7 @@ } template <typename T> +OCTAVE_API MArray<T> operator + (const T& s, const MSparse<T>& a) { @@ -202,6 +213,7 @@ } template <typename T> +OCTAVE_API MArray<T> operator - (const T& s, const MSparse<T>& a) { @@ -209,6 +221,7 @@ } template <typename T, typename OP> +OCTAVE_API MSparse<T> times_or_divides (const T& s, const MSparse<T>& a, OP op) { @@ -230,6 +243,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator * (const T& s, const MSparse<T>& a) { @@ -237,6 +251,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator / (const T& s, const MSparse<T>& a) { @@ -246,6 +261,7 @@ // Element by element MSparse by MSparse ops. template <typename T, typename OP> +OCTAVE_API MSparse<T> plus_or_minus (const MSparse<T>& a, const MSparse<T>& b, OP op, const char *op_name, bool negate) @@ -365,6 +381,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator+ (const MSparse<T>& a, const MSparse<T>& b) { @@ -372,6 +389,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator- (const MSparse<T>& a, const MSparse<T>& b) { @@ -379,6 +397,7 @@ } template <typename T> +OCTAVE_API MSparse<T> product (const MSparse<T>& a, const MSparse<T>& b) { @@ -476,6 +495,7 @@ } template <typename T> +OCTAVE_API MSparse<T> quotient (const MSparse<T>& a, const MSparse<T>& b) { @@ -592,6 +612,7 @@ // Unary MSparse ops. template <typename T> +OCTAVE_API MSparse<T> operator + (const MSparse<T>& a) { @@ -599,6 +620,7 @@ } template <typename T> +OCTAVE_API MSparse<T> operator - (const MSparse<T>& a) {