aboutsummaryrefslogtreecommitdiff
path: root/seqwish-paryfor-riscv.diff
diff options
context:
space:
mode:
authorEfraim Flashner2023-09-20 16:03:50 +0300
committerEfraim Flashner2023-09-20 16:08:25 +0300
commita599c69673da59fc129ceefffb73f8958f3d82f0 (patch)
tree51a7a243903663d1e70a76ae400d815a8d46a15b /seqwish-paryfor-riscv.diff
parentbfd4ccbbe6ad79ff9a02ca6c8656914f1fc4c414 (diff)
downloadguix-bioinformatics-a599c69673da59fc129ceefffb73f8958f3d82f0.tar.gz
seqwish: Update to 0.7.9.
Diffstat (limited to 'seqwish-paryfor-riscv.diff')
-rw-r--r--seqwish-paryfor-riscv.diff20
1 files changed, 20 insertions, 0 deletions
diff --git a/seqwish-paryfor-riscv.diff b/seqwish-paryfor-riscv.diff
new file mode 100644
index 0000000..cecf806
--- /dev/null
+++ b/seqwish-paryfor-riscv.diff
@@ -0,0 +1,20 @@
+diff --git a/deps/paryfor/paryfor.hpp b/deps/paryfor/paryfor.hpp
+index b8ced09..0536580 100644
+--- a/deps/paryfor/paryfor.hpp
++++ b/deps/paryfor/paryfor.hpp
+@@ -51,6 +51,15 @@ static inline void spin_loop_pause() noexcept {
+ }
+ } // namespace atomic_queue
+ } // namespace paryfor
++#elif defined(__riscv) && (__riscv_xlen == 64)
++namespace paryfor {
++namespace atomic_queue {
++constexpr int CACHE_LINE_SIZE = 64;
++static inline void spin_loop_pause() noexcept {
++ asm volatile ("nop" ::: "memory");
++}
++}
++}
+ #else
+ #error "Unknown CPU architecture."
+ #endif