summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWouter Deconinck <wdconinc@gmail.com>2023-06-08 11:53:02 -0500
committerGitHub <noreply@github.com>2023-06-08 09:53:02 -0700
commit4ae1a73d54b33bc4876535422d3f3bf3d9641c51 (patch)
tree95e30f1c7067a71d1380203d0380e9cc39660ffa
parentf29aab0d038c7ce022b9ca9508df77468dfd9d27 (diff)
downloadspack-4ae1a73d54b33bc4876535422d3f3bf3d9641c51.tar.gz
spack-4ae1a73d54b33bc4876535422d3f3bf3d9641c51.tar.bz2
spack-4ae1a73d54b33bc4876535422d3f3bf3d9641c51.tar.xz
spack-4ae1a73d54b33bc4876535422d3f3bf3d9641c51.zip
(r-rcpp)ensmallen: new package (#38249)
* ensmallen: new package ensmallen is a high-quality C++ library for non-linear numerical optimization. * r-rcppensmallen: new package --------- Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
-rw-r--r--var/spack/repos/builtin/packages/ensmallen/package.py31
-rw-r--r--var/spack/repos/builtin/packages/r-rcppensmallen/package.py20
2 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/ensmallen/package.py b/var/spack/repos/builtin/packages/ensmallen/package.py
new file mode 100644
index 0000000000..213e14b51f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/ensmallen/package.py
@@ -0,0 +1,31 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class Ensmallen(CMakePackage):
+ """ensmallen is a high-quality C++ library for non-linear numerical
+ optimization.
+
+ ensmallen provides many types of optimizers that can be used for
+ virtually any numerical optimization task. This includes gradient
+ descent techniques, gradient-free optimizers, and constrained
+ optimization. ensmallen also allows optional callbacks to customize
+ the optimization process."""
+
+ homepage = "https://ensmallen.org"
+ url = "https://github.com/mlpack/ensmallen/archive/refs/tags/2.19.1.tar.gz"
+
+ version("2.19.1", sha256="f36ad7f08b0688d2a8152e1c73dd437c56ed7a5af5facf65db6ffd977b275b2e")
+
+ variant("openmp", default=True, description="Use OpenMP for parallelization")
+
+ depends_on("cmake@3.3.2:")
+ depends_on("armadillo@9.800.0:")
+
+ def cmake_args(self):
+ args = [self.define_from_variant("USE_OPENMP", "openmp")]
+ return args
diff --git a/var/spack/repos/builtin/packages/r-rcppensmallen/package.py b/var/spack/repos/builtin/packages/r-rcppensmallen/package.py
new file mode 100644
index 0000000000..c4c1fb3a0e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/r-rcppensmallen/package.py
@@ -0,0 +1,20 @@
+# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class RRcppensmallen(RPackage):
+ """Rcpp integration for the Ensmallen templated C++ mathematical optimization library."""
+
+ cran = "RcppEnsmallen"
+
+ version(
+ "0.2.19.0.1", sha256="b4a9bde4dde309a52a47b56790389ecab14fe64066098d2a38b1b588ba3d8631"
+ )
+
+ depends_on("r@3.3.0:", type=("build", "run"))
+ depends_on("r-rcpp", type=("build", "run"))
+ depends_on("r-rcpparmadillo@0.9.800.0.0:", type=("build", "run"))