Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e4ce67bf4 | ||
|
|
7dbe9fa6c3 | ||
|
|
7da30298dd | ||
|
|
f347a5640e | ||
|
|
c7433b6e60 | ||
|
|
e712b832e8 | ||
|
|
8a736f85a3 | ||
|
|
9f8bf056c2 | ||
|
|
b79a7e005c | ||
|
|
cae3a6a4bf | ||
|
|
fb6278f692 | ||
|
|
8622e81b8a | ||
|
|
f788d4032f |
+4
-2
@@ -381,10 +381,11 @@ else()
|
||||
set(ARMA_LIBS ${ARMA_LIBS} ${MKL_LIBRARIES})
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "*** If the MKL libraries are installed in non-standard locations such as")
|
||||
message(STATUS "*** If the MKL libraries are installed in a non-standard location such as")
|
||||
message(STATUS "*** /opt/intel/mkl, /opt/intel/composerxe/, /usr/local/intel/mkl")
|
||||
message(STATUS "*** make sure the run-time linker can find them.")
|
||||
message(STATUS "*** On Linux systems this can be done by editing /etc/ld.so.conf")
|
||||
message(STATUS "*** or specifying the location through a file in /etc/ld.so.conf.d/")
|
||||
message(STATUS "*** or modifying the LD_LIBRARY_PATH environment variable.")
|
||||
message(STATUS "")
|
||||
message(STATUS "*** On systems with SELinux enabled (eg. Fedora, RHEL),")
|
||||
@@ -419,10 +420,11 @@ else()
|
||||
endif()
|
||||
|
||||
message(STATUS "")
|
||||
message(STATUS "*** If the OpenBLAS library is installed in")
|
||||
message(STATUS "*** If the OpenBLAS library is installed in a location such as")
|
||||
message(STATUS "*** /usr/local/lib or /usr/local/lib64")
|
||||
message(STATUS "*** make sure the run-time linker can find it.")
|
||||
message(STATUS "*** On Linux systems this can be done by editing /etc/ld.so.conf")
|
||||
message(STATUS "*** or specifying the location through a file in /etc/ld.so.conf.d/")
|
||||
message(STATUS "*** or modifying the LD_LIBRARY_PATH environment variable.")
|
||||
message(STATUS "")
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ Copyright 2017-2025 Data61 / CSIRO
|
||||
13. [API Stability and Version Policy](#13-api-stability-and-version-policy)
|
||||
14. [Bug Reports and Frequently Asked Questions](#14-bug-reports-and-frequently-asked-questions)
|
||||
|
||||
15. [Related Software Using Armadillo](#15-related-software-using-armadillo)
|
||||
15. [Prohibition on Use of Large Language Models (LLMs)](#15-prohibition-on-use-of-large-language-models-llms)
|
||||
16. [Related Software Using Armadillo](#16-related-software-using-armadillo)
|
||||
|
||||
---
|
||||
|
||||
@@ -390,8 +391,8 @@ Use a web browser to view it.
|
||||
|
||||
Use of the C++11 `auto` keyword is not recommended with Armadillo objects and expressions.
|
||||
|
||||
Armadillo has a template meta-programming framework which creates short-lived temporaries
|
||||
that are not properly handled by `auto`.
|
||||
Armadillo has a template meta-programming framework which creates short-lived
|
||||
temporary objects that are not properly handled by `auto`.
|
||||
|
||||
---
|
||||
|
||||
@@ -451,7 +452,16 @@ https://arma.sourceforge.net/faq.html
|
||||
|
||||
---
|
||||
|
||||
### 15: Related Software Using Armadillo
|
||||
### 15: Prohibition on Use of Large Language Models (LLMs)
|
||||
|
||||
The Armadillo codebase has been developed entirely without the use of LLMs.
|
||||
We do not accept any code which has been created (directly or indirectly)
|
||||
with the aid of LLMs. This is due to issues with code provenance and low quality
|
||||
of LLM generated code.
|
||||
|
||||
---
|
||||
|
||||
### 16: Related Software Using Armadillo
|
||||
|
||||
* MLPACK: extensive library of machine learning algorithms
|
||||
https://mlpack.org
|
||||
|
||||
@@ -21,6 +21,15 @@ limitations under the License.
|
||||
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
|
||||
<title>Armadillo: API Documentation</title>
|
||||
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAARpJREFUOMtjYMABzFuiGYE4BohPA/FvIP6Phv8CMTcuzVxAvAGqeTYQT0HCd6AG3MSlmRWIdwNxLhY5MyC+ADVgLS4DyqAK2NDEBaAuiobKt+Ay4CZUgQRaeKwCYj8gTofKR+My4CNUQSSSWCYQT4ay+6HyprgMOADEs4BYFso3AOITQMwB5W+HGsCPMxCR2LxAfA6INZHE7gHxGwZCAOrvFUDcCsQqUKwFxP+A+CQxBpRgSTwwvIKQZm8gfgbEVkCsgYRToQZ049NsBtVshEUuA2pAAYpfoTQzEEcB8QsgtsdheA/UgFhkwV1AfBuIPwDxOyC2xeO6jVAD5kBd6gQS/AbEX4F4JRDLEwgbUHp4CsRboLETzkApAADMF8+Pl3d18QAAAABJRU5ErkJggg==">
|
||||
<script type="application/rsl+xml">
|
||||
<rsl xmlns="https://rslstandard.org/rsl">
|
||||
<content url="">
|
||||
<license>
|
||||
<prohibits type="usage">ai-train ai-input</prohibits>
|
||||
</license>
|
||||
</content>
|
||||
</rsl>
|
||||
</script>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body
|
||||
|
||||
@@ -49,7 +49,7 @@ Mat<eT>::Mat()
|
||||
, n_alloc(0)
|
||||
, vec_state(0)
|
||||
, mem_state(0)
|
||||
, mem()
|
||||
, mem(nullptr)
|
||||
{
|
||||
arma_debug_sigprint_this(this);
|
||||
}
|
||||
@@ -312,15 +312,10 @@ Mat<eT>::init_cold()
|
||||
const char* error_message = "Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD";
|
||||
#endif
|
||||
|
||||
arma_conform_check
|
||||
(
|
||||
(
|
||||
( (n_rows > ARMA_MAX_UHWORD) || (n_cols > ARMA_MAX_UHWORD) )
|
||||
? ( (double(n_rows) * double(n_cols)) > double(ARMA_MAX_UWORD) )
|
||||
: false
|
||||
),
|
||||
error_message
|
||||
);
|
||||
if( (n_rows > ARMA_MAX_UHWORD) || (n_cols > ARMA_MAX_UHWORD) )
|
||||
{
|
||||
arma_conform_check( ( (double(n_rows) * double(n_cols)) > double(ARMA_MAX_UWORD) ), error_message );
|
||||
}
|
||||
|
||||
if(n_elem <= arma_config::mat_prealloc)
|
||||
{
|
||||
@@ -383,17 +378,10 @@ Mat<eT>::init_warm(uword in_n_rows, uword in_n_cols)
|
||||
const char* error_message_4 = "Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD";
|
||||
#endif
|
||||
|
||||
arma_conform_set_error
|
||||
(
|
||||
err_state,
|
||||
err_msg,
|
||||
(
|
||||
( (in_n_rows > ARMA_MAX_UHWORD) || (in_n_cols > ARMA_MAX_UHWORD) )
|
||||
? ( (double(in_n_rows) * double(in_n_cols)) > double(ARMA_MAX_UWORD) )
|
||||
: false
|
||||
),
|
||||
error_message_4
|
||||
);
|
||||
if( (in_n_rows > ARMA_MAX_UHWORD) || (in_n_cols > ARMA_MAX_UHWORD) )
|
||||
{
|
||||
arma_conform_set_error( err_state, err_msg, ( (double(in_n_rows) * double(in_n_cols)) > double(ARMA_MAX_UWORD) ), error_message_4 );
|
||||
}
|
||||
|
||||
arma_conform_check(err_state, err_msg);
|
||||
|
||||
@@ -7580,10 +7568,40 @@ Mat<eT>::resize(const uword new_n_elem)
|
||||
{
|
||||
arma_debug_sigprint();
|
||||
|
||||
const uword new_n_rows = (vec_state == 2) ? uword(1 ) : uword(new_n_elem);
|
||||
const uword new_n_cols = (vec_state == 2) ? uword(new_n_elem) : uword(1 );
|
||||
const bool reuse_mem =
|
||||
( is_vec() && (mem_state == 0) )
|
||||
&&
|
||||
(
|
||||
( (new_n_elem <= arma_config::mat_prealloc) && (n_elem <= arma_config::mat_prealloc) && ( n_elem > 0 ) )
|
||||
|| ( (new_n_elem > arma_config::mat_prealloc) && (n_elem > arma_config::mat_prealloc) && (new_n_elem <= n_alloc) )
|
||||
);
|
||||
|
||||
return (*this).resize(new_n_rows, new_n_cols);
|
||||
if(reuse_mem)
|
||||
{
|
||||
arma_debug_print("Mat::resize(): reusing memory");
|
||||
|
||||
if(new_n_elem > n_elem)
|
||||
{
|
||||
arma_debug_print("Mat::resize(): zeroing memory");
|
||||
|
||||
eT* t_mem = (*this).memptr(); // the (n_elem > 0) check above ensures that (*this).memptr() is a valid pointer
|
||||
|
||||
for(uword ii = n_elem; ii < new_n_elem; ++ii) { t_mem[ii] = eT(0); }
|
||||
}
|
||||
|
||||
access::rw(n_rows) = (vec_state == 2) ? uword(1 ) : uword(new_n_elem);
|
||||
access::rw(n_cols) = (vec_state == 2) ? uword(new_n_elem) : uword(1 );
|
||||
access::rw(n_elem) = new_n_elem;
|
||||
}
|
||||
else
|
||||
{
|
||||
const uword new_n_rows = (vec_state == 2) ? uword(1 ) : uword(new_n_elem);
|
||||
const uword new_n_cols = (vec_state == 2) ? uword(new_n_elem) : uword(1 );
|
||||
|
||||
(*this).resize(new_n_rows, new_n_cols);
|
||||
}
|
||||
|
||||
return (*this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define ARMA_VERSION_MAJOR 15
|
||||
#define ARMA_VERSION_MINOR 2
|
||||
#define ARMA_VERSION_PATCH 2
|
||||
#define ARMA_VERSION_PATCH 3
|
||||
#define ARMA_VERSION_NAME "Medium Roast Deluxe"
|
||||
|
||||
|
||||
|
||||
@@ -153,15 +153,19 @@ op_repcube::apply_noalias(Cube<eT>& out, const Cube<eT>& X, const uword copies_p
|
||||
|
||||
if(out.is_empty()) { return; }
|
||||
|
||||
// TODO: this is a rudimentary implementation
|
||||
|
||||
const SizeCube X_size = SizeCube(X.n_rows, X.n_cols, X.n_slices);
|
||||
|
||||
for(uword s = 0; s < out.n_slices; s += X.n_slices)
|
||||
for(uword c = 0; c < out.n_cols; c += X.n_cols )
|
||||
for(uword r = 0; r < out.n_rows; r += X.n_rows )
|
||||
for(uword s=0; s < X.n_slices; ++s)
|
||||
{
|
||||
out.subcube(r, c, s, X_size) = X;
|
||||
// avoid use of Cube::slice() to prevent generating Mat objects that the user may not need
|
||||
|
||||
const Mat<eT> X_slice_s(const_cast<eT*>(X.slice_memptr(s)), X.n_rows, X.n_cols, false, true);
|
||||
Mat<eT> out_slice_s( out.slice_memptr(s) , out.n_rows, out.n_cols, false, true);
|
||||
|
||||
op_repmat::apply_noalias(out_slice_s, X_slice_s, copies_per_row, copies_per_col);
|
||||
|
||||
for(uword t=1; t < copies_per_slice; ++t)
|
||||
{
|
||||
arrayops::copy(out.slice_memptr(s + (t * X.n_slices)), out_slice_s.memptr(), out_slice_s.n_elem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ op_resize::apply_mat_inplace(Mat<eT>& A, const uword new_n_rows, const uword new
|
||||
arma_conform_check( (A.vec_state == 1) && (new_n_cols != 1), "resize(): requested size is not compatible with column vector layout" );
|
||||
arma_conform_check( (A.vec_state == 2) && (new_n_rows != 1), "resize(): requested size is not compatible with row vector layout" );
|
||||
|
||||
if(A.is_empty()) { A.zeros(new_n_rows, new_n_cols); return; }
|
||||
if( A.is_empty() || (new_n_rows == 0) || (new_n_cols == 0) ) { A.zeros(new_n_rows, new_n_cols); return; }
|
||||
|
||||
Mat<eT> B(new_n_rows, new_n_cols, arma_nozeros_indicator());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user