aboutsummaryrefslogtreecommitdiff
path: root/seqwish-paryfor-riscv.diff
blob: cecf806c00e97dc46344859bb965d231b5dabb88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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