Skip to content

Commit

Permalink
Merge pull request #225 from LibRapid/test
Browse files Browse the repository at this point in the history
Test
  • Loading branch information
Pencilcaseman authored Aug 3, 2023
2 parents 948da66 + d8cfd0f commit 0ca929c
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -382,12 +382,20 @@ jobs:
with:
python-version: "3.9"

- name: Install Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
directory: "./llvm"
env: on

- name: Build Doxygen
id: build_doxygen
continue-on-error: true
run: |
git clone --recursive https://github.com/doxygen/doxygen.git
cd doxygen
git checkout Release_1_9_7
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ regex

myst-parser
sphinx-design
sphinx-favicon
sphinx-favicon==1.0.1
sphinx-autobuild
sphinx-copybutton
linkify-it-py
Expand Down
2 changes: 0 additions & 2 deletions docs/source/multiPrecision/multiPrecisionListing.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Multi-Precision Listing

---

```{doxygenclass} librapid::mpz
:members:
:protected-members:
Expand Down
19 changes: 19 additions & 0 deletions librapid/include/librapid/array/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ namespace librapid {
/// \param other Storage object to reference
void set(const Storage &other);

/// \brief Return a Storage object on the host with the same data as this Storage object
/// (mainly for use with CUDA or OpenCL)
/// \return
Storage toHostStorage() const;

/// \brief Same as `toHostStorage()` but does not necessarily copy the data
/// \return Storage object on the host
Storage toHostStorageUnsafe() const;

/// \brief Create a deep copy of this Storage object
/// \return Deep copy of this Storage object
Storage copy() const;
Expand Down Expand Up @@ -570,6 +579,16 @@ namespace librapid {
m_ownsData = other.m_ownsData;
}

template<typename T>
auto Storage<T>::toHostStorage() const -> Storage {
return copy();
}

template<typename T>
auto Storage<T>::toHostStorageUnsafe() const -> Storage {
return copy();
}

template<typename T>
auto Storage<T>::copy() const -> Storage {
Storage ret;
Expand Down

0 comments on commit 0ca929c

Please sign in to comment.