aboutsummaryrefslogtreecommitdiff
path: root/seqwish-paryfor-riscv.diff
diff options
context:
space:
mode:
authorShepherd on Tux022024-06-20 08:37:15 -0500
committerShepherd on Tux022024-06-20 08:37:15 -0500
commitfe5fd5cb23907f8e37edafda96bafa608a3e0e7f (patch)
tree0b4cec2038dde07fe26f1c6882369f36a9545a19 /seqwish-paryfor-riscv.diff
parentf0f8dc84eca7088177797f84db05314537615c77 (diff)
parent0362ee068a39ce9a5fd6f0fba9cd5586211f07f1 (diff)
downloadguix-bioinformatics-fe5fd5cb23907f8e37edafda96bafa608a3e0e7f.tar.gz
Merge branch 'master' of /home/git/public/guix-bioinformatics
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