From 877dda261bb54aeb8eabf358baf0a7d28baf4325 Mon Sep 17 00:00:00 2001 From: Toby Davis Date: Wed, 2 Aug 2023 18:33:25 -0700 Subject: [PATCH 1/3] Not sure why documentation is failing --- .github/workflows/continuous-integration.yaml | 7 +++++++ docs/requirements.txt | 2 +- docs/source/multiPrecision/multiPrecisionListing.md | 2 -- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 38a7a3f24..17e73c35a 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -382,6 +382,13 @@ 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 diff --git a/docs/requirements.txt b/docs/requirements.txt index 21acd1e54..80ecac646 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -9,7 +9,7 @@ regex myst-parser sphinx-design -sphinx-favicon +sphinx-favicon==1.0.1 sphinx-autobuild sphinx-copybutton linkify-it-py diff --git a/docs/source/multiPrecision/multiPrecisionListing.md b/docs/source/multiPrecision/multiPrecisionListing.md index a0ba73920..6467e1e71 100644 --- a/docs/source/multiPrecision/multiPrecisionListing.md +++ b/docs/source/multiPrecision/multiPrecisionListing.md @@ -1,7 +1,5 @@ # Multi-Precision Listing ---- - ```{doxygenclass} librapid::mpz :members: :protected-members: From 5c35b7e4d07694e36c3ffb675bb5718a5dbd47d1 Mon Sep 17 00:00:00 2001 From: Toby Davis Date: Wed, 2 Aug 2023 22:51:54 -0700 Subject: [PATCH 2/3] Define doxygen version in attempt to fix doc build --- .github/workflows/continuous-integration.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 17e73c35a..b60fce277 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -395,6 +395,7 @@ jobs: 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" From d8cfd0ffc3f6c7170a89714e76e5e401d2e338d7 Mon Sep 17 00:00:00 2001 From: Toby Davis Date: Wed, 2 Aug 2023 23:34:12 -0700 Subject: [PATCH 3/3] Temporary function implementation --- librapid/include/librapid/array/storage.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/librapid/include/librapid/array/storage.hpp b/librapid/include/librapid/array/storage.hpp index 4717940bb..fff1fc46a 100644 --- a/librapid/include/librapid/array/storage.hpp +++ b/librapid/include/librapid/array/storage.hpp @@ -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; @@ -570,6 +579,16 @@ namespace librapid { m_ownsData = other.m_ownsData; } + template + auto Storage::toHostStorage() const -> Storage { + return copy(); + } + + template + auto Storage::toHostStorageUnsafe() const -> Storage { + return copy(); + } + template auto Storage::copy() const -> Storage { Storage ret;