mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2025-04-21 22:30:02 +02:00
Merge branch 'main' into developer
This commit is contained in:
commit
62a14dda13
@ -35,6 +35,7 @@ file(GLOB SPHINX_SOURCE_FILES CONFIGURE_DEPENDS "src/*.rst")
|
|||||||
# src/pyRawMasterFile.rst
|
# src/pyRawMasterFile.rst
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
|
||||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||||
get_filename_component(fname ${filename} NAME)
|
get_filename_component(fname ${filename} NAME)
|
||||||
message(STATUS "Copying ${filename} to ${SPHINX_BUILD}/src/${fname}")
|
message(STATUS "Copying ${filename} to ${SPHINX_BUILD}/src/${fname}")
|
||||||
|
@ -14,6 +14,7 @@ AARE
|
|||||||
Requirements
|
Requirements
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Python API
|
:caption: Python API
|
||||||
:maxdepth: 1
|
:maxdepth: 1
|
||||||
|
@ -21,6 +21,7 @@ TODO! Add expression templates for operators
|
|||||||
|
|
||||||
namespace aare {
|
namespace aare {
|
||||||
|
|
||||||
|
|
||||||
template <typename T, int64_t Ndim = 2>
|
template <typename T, int64_t Ndim = 2>
|
||||||
class NDArray : public ArrayExpr<NDArray<T, Ndim>, Ndim> {
|
class NDArray : public ArrayExpr<NDArray<T, Ndim>, Ndim> {
|
||||||
std::array<int64_t, Ndim> shape_;
|
std::array<int64_t, Ndim> shape_;
|
||||||
@ -47,6 +48,7 @@ class NDArray : public ArrayExpr<NDArray<T, Ndim>, Ndim> {
|
|||||||
std::multiplies<>())),
|
std::multiplies<>())),
|
||||||
data_(new T[size_]) {}
|
data_(new T[size_]) {}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Construct a new NDArray object with a shape and value.
|
* @brief Construct a new NDArray object with a shape and value.
|
||||||
*
|
*
|
||||||
@ -72,6 +74,7 @@ class NDArray : public ArrayExpr<NDArray<T, Ndim>, Ndim> {
|
|||||||
: shape_(other.shape_), strides_(c_strides<Ndim>(shape_)),
|
: shape_(other.shape_), strides_(c_strides<Ndim>(shape_)),
|
||||||
size_(other.size_), data_(other.data_) {
|
size_(other.size_), data_(other.data_) {
|
||||||
other.reset(); // TODO! is this necessary?
|
other.reset(); // TODO! is this necessary?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Copy constructor
|
// Copy constructor
|
||||||
|
@ -203,6 +203,7 @@ TEST_CASE("Bitwise and on data") {
|
|||||||
REQUIRE(a(2) == 384);
|
REQUIRE(a(2) == 384);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("Elementwise operations on images") {
|
TEST_CASE("Elementwise operations on images") {
|
||||||
std::array<int64_t, 2> shape{5, 5};
|
std::array<int64_t, 2> shape{5, 5};
|
||||||
double a_val = 3.0;
|
double a_val = 3.0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user