Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40d2d9fb9c | ||
|
|
e529e8fadb | ||
|
|
cdf9a0519d | ||
|
|
acdc6b8670 | ||
|
|
251f964c1b | ||
|
|
9937cdafd5 | ||
|
|
e31354d8da | ||
|
|
6279cb3774 | ||
|
|
fa72e7e3e0 | ||
|
|
f72efd7c61 | ||
|
|
3d4daafeb8 | ||
|
|
a99ef05d41 | ||
|
|
a7d906019a | ||
|
|
f3fe8d04c7 | ||
|
|
508ebe3deb | ||
|
|
6e6657e2f0 | ||
|
|
935a500e75 | ||
|
|
64a125b35b | ||
|
|
6754eadb00 |
+2
-2
@@ -3,8 +3,8 @@
|
||||
<br>
|
||||
The list of changes is part of the documentation:
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/docs.html#changelog">docs.html#changelog</a> (online copy)</li>
|
||||
<li><a href="docs.html#changelog">docs.html#changelog</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/docs.html#changelog">docs.html#changelog</a> (online copy)</li>
|
||||
<li><a href="docs.html#changelog">docs.html#changelog</a> (local copy)</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -19877,6 +19877,7 @@ This can also be enabled by adding <i>#define ARMA_64BIT_WORD</i> before ea
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td style="vertical-align: top;">
|
||||
<code>ARMA_DONT_CHECK_CONFORMANCE</code>
|
||||
@@ -19902,6 +19903,7 @@ Keeping the checks enabled during development and deployment greatly aids in fin
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
-->
|
||||
<tr>
|
||||
<td style="vertical-align: top;">
|
||||
<code>ARMA_MAT_PREALLOC</code>
|
||||
|
||||
+2
-1
@@ -35,6 +35,7 @@
|
||||
#include <cmath>
|
||||
#include <ctime>
|
||||
|
||||
#include <memory>
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
@@ -52,7 +53,7 @@
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
|
||||
#if !defined(ARMA_DONT_USE_STD_MUTEX)
|
||||
#if defined(ARMA_USE_STD_MUTEX)
|
||||
#include <mutex>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -3562,7 +3562,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
|
||||
//! element accessor; no bounds check
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
eT&
|
||||
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice)
|
||||
{
|
||||
return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] );
|
||||
@@ -3573,7 +3573,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
|
||||
//! element accessor; no bounds check
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
const eT&
|
||||
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice) const
|
||||
{
|
||||
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];
|
||||
|
||||
@@ -6500,7 +6500,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
|
||||
//! element accessor; no bounds check
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT&
|
||||
eT&
|
||||
Mat<eT>::operator[] (const uword in_row, const uword in_col)
|
||||
{
|
||||
return access::rw( mem[in_row + in_col*n_rows] );
|
||||
@@ -6511,7 +6511,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
|
||||
//! element accessor; no bounds check
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
const eT&
|
||||
const eT&
|
||||
Mat<eT>::operator[] (const uword in_row, const uword in_col) const
|
||||
{
|
||||
return mem[in_row + in_col*n_rows];
|
||||
|
||||
@@ -795,7 +795,7 @@ struct Proxy< CubeToMatOp<T1, op_vectorise_cube_col> >
|
||||
|
||||
static constexpr bool use_at = false;
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
static constexpr bool has_subview = true;
|
||||
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
@@ -891,7 +891,7 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
|
||||
|
||||
static constexpr bool use_at = false;
|
||||
static constexpr bool use_mp = false;
|
||||
static constexpr bool has_subview = false;
|
||||
static constexpr bool has_subview = true;
|
||||
|
||||
static constexpr bool is_row = false;
|
||||
static constexpr bool is_col = true;
|
||||
|
||||
@@ -3374,7 +3374,7 @@ SpMat<eT>::operator()(const uword i) const
|
||||
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
SpMat_MapMat_val<eT>
|
||||
SpMat_MapMat_val<eT>
|
||||
SpMat<eT>::operator[] (const uword in_row, const uword in_col)
|
||||
{
|
||||
return SpMat_MapMat_val<eT>((*this), cache, in_row, in_col);
|
||||
@@ -3384,7 +3384,7 @@ SpMat<eT>::operator()(const uword i) const
|
||||
|
||||
template<typename eT>
|
||||
arma_inline
|
||||
eT
|
||||
eT
|
||||
SpMat<eT>::operator[] (const uword in_row, const uword in_col) const
|
||||
{
|
||||
return get_value(in_row, in_col);
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define ARMA_VERSION_MAJOR 14
|
||||
#define ARMA_VERSION_MINOR 0
|
||||
#define ARMA_VERSION_PATCH 0
|
||||
#define ARMA_VERSION_PATCH 2
|
||||
#define ARMA_VERSION_NAME "Stochastic Parrot"
|
||||
|
||||
|
||||
|
||||
@@ -304,8 +304,6 @@
|
||||
#endif
|
||||
|
||||
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
|
||||
#undef ARMA_HAVE_ICC_ASSUME_ALIGNED
|
||||
#define ARMA_HAVE_ICC_ASSUME_ALIGNED
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -349,18 +349,6 @@
|
||||
#define ARMA_WARN_LEVEL 3
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_PRINT_ERRORS)
|
||||
#pragma message ("INFO: support for ARMA_DONT_PRINT_ERRORS option has been removed")
|
||||
|
||||
#if defined(ARMA_PRINT_EXCEPTIONS)
|
||||
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL and ARMA_DONT_PRINT_EXCEPTIONS options instead")
|
||||
#else
|
||||
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL option instead")
|
||||
#endif
|
||||
|
||||
#pragma message ("INFO: see the documentation for details")
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_PRINT_EXCEPTIONS)
|
||||
#undef ARMA_PRINT_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
@@ -349,18 +349,6 @@
|
||||
#define ARMA_WARN_LEVEL 3
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_PRINT_ERRORS)
|
||||
#pragma message ("INFO: support for ARMA_DONT_PRINT_ERRORS option has been removed")
|
||||
|
||||
#if defined(ARMA_PRINT_EXCEPTIONS)
|
||||
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL and ARMA_DONT_PRINT_EXCEPTIONS options instead")
|
||||
#else
|
||||
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL option instead")
|
||||
#endif
|
||||
|
||||
#pragma message ("INFO: see the documentation for details")
|
||||
#endif
|
||||
|
||||
#if defined(ARMA_DONT_PRINT_EXCEPTIONS)
|
||||
#undef ARMA_PRINT_EXCEPTIONS
|
||||
#endif
|
||||
|
||||
@@ -1062,7 +1062,7 @@ diskio::save_coord_ascii(const Mat<eT>& x, std::ostream& f)
|
||||
f.put('\n');
|
||||
}
|
||||
|
||||
// make sure it's possible to figure out the matrix size later
|
||||
// make sure it's possible to determine the matrix size
|
||||
if( (x.n_rows > 0) && (x.n_cols > 0) )
|
||||
{
|
||||
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
|
||||
@@ -1125,7 +1125,7 @@ diskio::save_coord_ascii(const Mat< std::complex<T> >& x, std::ostream& f)
|
||||
f.put('\n');
|
||||
}
|
||||
|
||||
// make sure it's possible to figure out the matrix size later
|
||||
// make sure it's possible to determine the matrix size
|
||||
if( (x.n_rows > 0) && (x.n_cols > 0) )
|
||||
{
|
||||
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
|
||||
@@ -1319,8 +1319,8 @@ diskio::save_hdf5_binary(const Mat<eT>& x, const hdf5_name& spec, std::string& e
|
||||
hid_t dataspace = H5Screate_simple(2, dims, NULL); // treat the matrix as a 2d array dataspace
|
||||
hid_t datatype = hdf5_misc::get_hdf5_type<eT>();
|
||||
|
||||
// If this returned something invalid, well, it's time to crash.
|
||||
arma_check(datatype == -1, "Mat::save(): unknown datatype for HDF5");
|
||||
// fail if we can't handle the datatype
|
||||
if(datatype == -1) { err_msg = "unknown datatype for HDF5"; return false; }
|
||||
|
||||
// MATLAB forces the users to specify a name at save time for HDF5;
|
||||
// Octave will use the default of 'dataset' unless otherwise specified.
|
||||
@@ -3065,7 +3065,7 @@ diskio::save_coord_ascii(const SpMat<eT>& x, std::ostream& f)
|
||||
}
|
||||
|
||||
|
||||
// make sure it's possible to figure out the matrix size later
|
||||
// make sure it's possible to determine the matrix size
|
||||
if( (x.n_rows > 0) && (x.n_cols > 0) )
|
||||
{
|
||||
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
|
||||
@@ -3128,7 +3128,7 @@ diskio::save_coord_ascii(const SpMat< std::complex<T> >& x, std::ostream& f)
|
||||
f.put('\n');
|
||||
}
|
||||
|
||||
// make sure it's possible to figure out the matrix size later
|
||||
// make sure it's possible to determine the matrix size
|
||||
if( (x.n_rows > 0) && (x.n_cols > 0) )
|
||||
{
|
||||
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
|
||||
@@ -4016,8 +4016,8 @@ diskio::save_hdf5_binary(const Cube<eT>& x, const hdf5_name& spec, std::string&
|
||||
hid_t dataspace = H5Screate_simple(3, dims, NULL); // treat the cube as a 3d array dataspace
|
||||
hid_t datatype = hdf5_misc::get_hdf5_type<eT>();
|
||||
|
||||
// If this returned something invalid, well, it's time to crash.
|
||||
arma_check(datatype == -1, "Cube::save(): unknown datatype for HDF5");
|
||||
// fail if we can't handle the datatype
|
||||
if(datatype == -1) { err_msg = "unknown datatype for HDF5"; return false; }
|
||||
|
||||
// MATLAB forces the users to specify a name at save time for HDF5;
|
||||
// Octave will use the default of 'dataset' unless otherwise specified.
|
||||
|
||||
@@ -614,7 +614,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
|
||||
//! element accessor; no bounds check
|
||||
template<typename oT>
|
||||
arma_inline
|
||||
oT&
|
||||
oT&
|
||||
field<oT>::operator[] (const uword in_row, const uword in_col)
|
||||
{
|
||||
return (*mem[in_row + in_col*n_rows]);
|
||||
@@ -625,7 +625,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
|
||||
//! element accessor; no bounds check
|
||||
template<typename oT>
|
||||
arma_inline
|
||||
const oT&
|
||||
const oT&
|
||||
field<oT>::operator[] (const uword in_row, const uword in_col) const
|
||||
{
|
||||
return (*mem[in_row + in_col*n_rows]);
|
||||
|
||||
@@ -272,59 +272,6 @@ accu(const T1& X)
|
||||
|
||||
|
||||
|
||||
//! explicit handling of dot product expressed as matrix multiplication
|
||||
template<typename T1, typename T2>
|
||||
arma_warn_unused
|
||||
inline
|
||||
typename T1::elem_type
|
||||
accu(const Glue<T1,T2,glue_times>& expr)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
typedef typename T1::elem_type eT;
|
||||
|
||||
if( (is_cx<eT>::no) && (resolves_to_rowvector<T1>::value && resolves_to_colvector<T2>::value) )
|
||||
{
|
||||
arma_debug_print("accu(): dot product optimisation");
|
||||
|
||||
constexpr bool proxy_is_mat = (is_Mat<typename Proxy<T1>::stored_type>::value && is_Mat<typename Proxy<T2>::stored_type>::value);
|
||||
|
||||
constexpr bool use_at = (Proxy<T1>::use_at) || (Proxy<T2>::use_at);
|
||||
|
||||
constexpr bool fast_unwrap = (partial_unwrap<T1>::is_fast && partial_unwrap<T2>::is_fast);
|
||||
|
||||
if(proxy_is_mat || use_at || fast_unwrap)
|
||||
{
|
||||
const partial_unwrap<T1> UA(expr.A);
|
||||
const partial_unwrap<T2> UB(expr.B);
|
||||
|
||||
const typename partial_unwrap<T1>::stored_type& A = UA.M;
|
||||
const typename partial_unwrap<T2>::stored_type& B = UB.M;
|
||||
|
||||
arma_conform_assert_mul_size(A, B, UA.do_trans, UB.do_trans, "matrix multiplication");
|
||||
|
||||
const eT val = op_dot::direct_dot(A.n_elem, A.memptr(), B.memptr());
|
||||
|
||||
return (UA.do_times || UB.do_times) ? (val * UA.get_val() * UB.get_val()) : val;
|
||||
}
|
||||
else
|
||||
{
|
||||
const Proxy<T1> PA(expr.A);
|
||||
const Proxy<T2> PB(expr.B);
|
||||
|
||||
arma_conform_assert_mul_size(PA.get_n_rows(), PA.get_n_cols(), PB.get_n_rows(), PB.get_n_cols(), "matrix multiplication");
|
||||
|
||||
return op_dot::apply_proxy_linear(PA,PB);
|
||||
}
|
||||
}
|
||||
|
||||
const Mat<eT> tmp(expr);
|
||||
|
||||
return arrayops::accumulate( tmp.memptr(), tmp.n_elem );
|
||||
}
|
||||
|
||||
|
||||
|
||||
//! explicit handling of multiply-and-accumulate
|
||||
template<typename T1, typename T2>
|
||||
arma_warn_unused
|
||||
|
||||
@@ -148,7 +148,7 @@ arma_inline
|
||||
bool
|
||||
memory::is_aligned(const eT* mem)
|
||||
{
|
||||
#if (defined(ARMA_HAVE_ICC_ASSUME_ALIGNED) || defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)) && !defined(ARMA_DONT_CHECK_ALIGNMENT)
|
||||
#if (defined(ARMA_HAVE_GCC_ASSUME_ALIGNED) || defined(__cpp_lib_assume_aligned)) && !defined(ARMA_DONT_CHECK_ALIGNMENT)
|
||||
{
|
||||
return (sizeof(std::size_t) >= sizeof(eT*)) ? ((std::size_t(mem) & 0x0F) == 0) : false;
|
||||
}
|
||||
@@ -168,33 +168,19 @@ arma_inline
|
||||
void
|
||||
memory::mark_as_aligned(eT*& mem)
|
||||
{
|
||||
#if defined(ARMA_HAVE_ICC_ASSUME_ALIGNED)
|
||||
{
|
||||
__assume_aligned(mem, 16);
|
||||
}
|
||||
#elif defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)
|
||||
#if defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)
|
||||
{
|
||||
mem = (eT*)__builtin_assume_aligned(mem, 16);
|
||||
}
|
||||
#elif defined(__cpp_lib_assume_aligned)
|
||||
{
|
||||
mem = (eT*)std::assume_aligned<16>(mem);
|
||||
}
|
||||
#else
|
||||
{
|
||||
arma_ignore(mem);
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: look into C++20 std::assume_aligned()
|
||||
// TODO: https://en.cppreference.com/w/cpp/memory/assume_aligned
|
||||
|
||||
// TODO: MSVC? __assume( (mem & 0x0F) == 0 );
|
||||
//
|
||||
// http://comments.gmane.org/gmane.comp.gcc.patches/239430
|
||||
// GCC __builtin_assume_aligned is similar to ICC's __assume_aligned,
|
||||
// so for lvalue first argument ICC's __assume_aligned can be emulated using
|
||||
// #define __assume_aligned(lvalueptr, align) lvalueptr = __builtin_assume_aligned (lvalueptr, align)
|
||||
//
|
||||
// http://www.inf.ethz.ch/personal/markusp/teaching/263-2300-ETH-spring11/slides/class19.pdf
|
||||
// http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/lin/index.htm
|
||||
// http://d3f8ykwhia686p.cloudfront.net/1live/intel/CompilerAutovectorizationGuide.pdf
|
||||
}
|
||||
|
||||
|
||||
@@ -204,14 +190,14 @@ arma_inline
|
||||
void
|
||||
memory::mark_as_aligned(const eT*& mem)
|
||||
{
|
||||
#if defined(ARMA_HAVE_ICC_ASSUME_ALIGNED)
|
||||
{
|
||||
__assume_aligned(mem, 16);
|
||||
}
|
||||
#elif defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)
|
||||
#if defined(ARMA_HAVE_GCC_ASSUME_ALIGNED)
|
||||
{
|
||||
mem = (const eT*)__builtin_assume_aligned(mem, 16);
|
||||
}
|
||||
#elif defined(__cpp_lib_assume_aligned)
|
||||
{
|
||||
mem = (const eT*)std::assume_aligned<16>(mem);
|
||||
}
|
||||
#else
|
||||
{
|
||||
arma_ignore(mem);
|
||||
|
||||
@@ -316,8 +316,8 @@ class gemm
|
||||
|
||||
const eT local_beta = (use_beta) ? beta : eT(0);
|
||||
|
||||
arma_debug_print( arma_str::format("blas::gemm(): trans_A = %c") % trans_A );
|
||||
arma_debug_print( arma_str::format("blas::gemm(): trans_B = %c") % trans_B );
|
||||
arma_debug_print( arma_str::format("blas::gemm(): trans_A: %c") % trans_A );
|
||||
arma_debug_print( arma_str::format("blas::gemm(): trans_B: %c") % trans_B );
|
||||
|
||||
blas::gemm<eT>
|
||||
(
|
||||
|
||||
@@ -378,7 +378,7 @@ class gemv
|
||||
const blas_int inc = blas_int(1);
|
||||
const eT local_beta = (use_beta) ? beta : eT(0);
|
||||
|
||||
arma_debug_print( arma_str::format("blas::gemv(): trans_A = %c") % trans_A );
|
||||
arma_debug_print( arma_str::format("blas::gemv(): trans_A: %c") % trans_A );
|
||||
|
||||
blas::gemv<eT>
|
||||
(
|
||||
|
||||
@@ -405,7 +405,7 @@ class herk
|
||||
|
||||
const blas_int lda = (do_trans_A) ? k : n;
|
||||
|
||||
arma_debug_print( arma_str::format("blas::herk(): trans_A = %c") % trans_A );
|
||||
arma_debug_print( arma_str::format("blas::herk(): trans_A: %c") % trans_A );
|
||||
|
||||
blas::herk<T>
|
||||
(
|
||||
|
||||
@@ -362,7 +362,7 @@ class syrk
|
||||
|
||||
const blas_int lda = (do_trans_A) ? k : n;
|
||||
|
||||
arma_debug_print( arma_str::format("blas::syrk(): trans_A = %c") % trans_A );
|
||||
arma_debug_print( arma_str::format("blas::syrk(): trans_A: %c") % trans_A );
|
||||
|
||||
blas::syrk<eT>
|
||||
(
|
||||
|
||||
@@ -525,7 +525,7 @@ subview_field<oT>::extract(field<oT>& actual_out, const subview_field<oT>& in)
|
||||
|
||||
out.set_size(n_rows, n_cols, n_slices);
|
||||
|
||||
arma_debug_print(arma_str::format("out.n_rows: %u; out.n_cols: %u; out.n_slices: %u; n.m.n_rows: %u; in.m.n_cols: %u; in.m.n_slices: %u") % out.n_rows % out.n_cols % out.n_slices % in.f.n_rows % in.f.n_cols % in.f.n_slices);
|
||||
arma_debug_print(arma_str::format("out.n_rows: %u; out.n_cols: %u; out.n_slices: %u; in.f.n_rows: %u; in.f.n_cols: %u; in.f.n_slices: %u") % out.n_rows % out.n_cols % out.n_slices % in.f.n_rows % in.f.n_cols % in.f.n_slices);
|
||||
|
||||
if(n_slices == 1)
|
||||
{
|
||||
@@ -550,7 +550,6 @@ subview_field<oT>::extract(field<oT>& actual_out, const subview_field<oT>& in)
|
||||
actual_out = out;
|
||||
delete tmp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1607,15 +1607,15 @@ subview<eT>::extract(Mat<eT>& out, const subview<eT>& in)
|
||||
{
|
||||
if(n_cols == 1) // a column vector
|
||||
{
|
||||
arma_debug_print("subview::extract(): copying col (going across rows)");
|
||||
arma_debug_print("subview::extract(): copying col");
|
||||
|
||||
// in.colptr(0) the first column of the subview, taking into account any row offset
|
||||
// in.colptr(0) is the first column of the subview, taking into account any row offset
|
||||
arrayops::copy( out.memptr(), in.colptr(0), n_rows );
|
||||
}
|
||||
else
|
||||
if(n_rows == 1) // a row vector
|
||||
{
|
||||
arma_debug_print("subview::extract(): copying row (going across columns)");
|
||||
arma_debug_print("subview::extract(): copying row)");
|
||||
|
||||
eT* out_mem = out.memptr();
|
||||
|
||||
@@ -1687,7 +1687,7 @@ subview<eT>::plus_inplace(Mat<eT>& out, const subview<eT>& in)
|
||||
{
|
||||
const eT tmp1 = X.at(row, start_col+i);
|
||||
const eT tmp2 = X.at(row, start_col+j);
|
||||
|
||||
|
||||
out_mem[i] += tmp1;
|
||||
out_mem[j] += tmp2;
|
||||
}
|
||||
@@ -1735,7 +1735,7 @@ subview<eT>::minus_inplace(Mat<eT>& out, const subview<eT>& in)
|
||||
{
|
||||
const eT tmp1 = X.at(row, start_col+i);
|
||||
const eT tmp2 = X.at(row, start_col+j);
|
||||
|
||||
|
||||
out_mem[i] -= tmp1;
|
||||
out_mem[j] -= tmp2;
|
||||
}
|
||||
@@ -1783,7 +1783,7 @@ subview<eT>::schur_inplace(Mat<eT>& out, const subview<eT>& in)
|
||||
{
|
||||
const eT tmp1 = X.at(row, start_col+i);
|
||||
const eT tmp2 = X.at(row, start_col+j);
|
||||
|
||||
|
||||
out_mem[i] *= tmp1;
|
||||
out_mem[j] *= tmp2;
|
||||
}
|
||||
@@ -1831,7 +1831,7 @@ subview<eT>::div_inplace(Mat<eT>& out, const subview<eT>& in)
|
||||
{
|
||||
const eT tmp1 = X.at(row, start_col+i);
|
||||
const eT tmp2 = X.at(row, start_col+j);
|
||||
|
||||
|
||||
out_mem[i] /= tmp1;
|
||||
out_mem[j] /= tmp2;
|
||||
}
|
||||
@@ -3361,11 +3361,22 @@ template<typename eT>
|
||||
template<typename T1>
|
||||
inline
|
||||
void
|
||||
subview_col<eT>::operator=(const Base<eT,T1>& X)
|
||||
subview_col<eT>::operator=(const Base<eT,T1>& expr)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
subview<eT>::operator=(X);
|
||||
if(is_Mat<T1>::value)
|
||||
{
|
||||
const unwrap<T1> U(expr.get_ref());
|
||||
|
||||
arma_conform_assert_same_size(subview<eT>::n_rows, uword(1), U.M.n_rows, U.M.n_cols, "copy into submatrix");
|
||||
|
||||
arrayops::copy(const_cast<eT*>(colmem), U.M.memptr(), subview<eT>::n_rows);
|
||||
}
|
||||
else
|
||||
{
|
||||
subview<eT>::operator=(expr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -822,7 +822,7 @@ struct quasi_unwrap< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
|
||||
const Mat<eT> M;
|
||||
|
||||
static constexpr bool is_const = true;
|
||||
static constexpr bool has_subview = false;
|
||||
static constexpr bool has_subview = true;
|
||||
static constexpr bool has_orig_mem = true;
|
||||
|
||||
template<typename eT2>
|
||||
|
||||
+16
-16
@@ -9,27 +9,27 @@
|
||||
<ul>
|
||||
<li>API Reference / Documentation
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/docs.html">docs.html</a> (online copy)</li>
|
||||
<li><a href="docs.html">docs.html</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/docs.html">docs.html</a> (online copy)</li>
|
||||
<li><a href="docs.html">docs.html</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Article with overview of functionality in Armadillo
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_joss_2016.pdf">armadillo_joss_2016.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_joss_2016.pdf">armadillo_joss_2016.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_joss_2016.pdf">armadillo_joss_2016.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_joss_2016.pdf">armadillo_joss_2016.pdf</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Paper with overview of sparse matrix functionality in Armadillo
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_mca_2019.pdf">armadillo_mca_2019.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_mca_2019.pdf">armadillo_mca_2019.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_mca_2019.pdf">armadillo_mca_2019.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_mca_2019.pdf">armadillo_mca_2019.pdf</a> (local copy)</li>
|
||||
<!--
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_lncs_2018.pdf">armadillo_lncs_2018.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_lncs_2018.pdf">armadillo_lncs_2018.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_lncs_2018.pdf">armadillo_lncs_2018.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_lncs_2018.pdf">armadillo_lncs_2018.pdf</a> (local copy)</li>
|
||||
-->
|
||||
</ul>
|
||||
</li>
|
||||
@@ -37,32 +37,32 @@
|
||||
<ul>
|
||||
<li>Paper with details on the linear solver in Armadillo
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_solver_2020.pdf">armadillo_solver_2020.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_solver_2020.pdf">armadillo_solver_2020.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_solver_2020.pdf">armadillo_solver_2020.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_solver_2020.pdf">armadillo_solver_2020.pdf</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Paper with details on Gaussian Mixture Models in Armadillo
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_spcs_2017.pdf">armadillo_spcs_2017.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_spcs_2017.pdf">armadillo_spcs_2017.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_spcs_2017.pdf">armadillo_spcs_2017.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_spcs_2017.pdf">armadillo_spcs_2017.pdf</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Overview technical report (old)
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_nicta_2010.pdf">armadillo_nicta_2010.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_nicta_2010.pdf">armadillo_nicta_2010.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_nicta_2010.pdf">armadillo_nicta_2010.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_nicta_2010.pdf">armadillo_nicta_2010.pdf</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>Article on integration of Armadillo with R:
|
||||
<ul>
|
||||
<li><a href="http://arma.sourceforge.net/armadillo_rcpp_2014.pdf">armadillo_rcpp_2014.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_rcpp_2014.pdf">armadillo_rcpp_2014.pdf</a> (local copy)</li>
|
||||
<li><a href="https://arma.sourceforge.net/armadillo_rcpp_2014.pdf">armadillo_rcpp_2014.pdf</a> (online copy)</li>
|
||||
<li><a href="armadillo_rcpp_2014.pdf">armadillo_rcpp_2014.pdf</a> (local copy)</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user