114 Star 0 Fork 23

src-openEuler/mvapich2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-mvapich2-2.3.6-add-support-for-loongarch64.patch 1.09 KB
一键复制 编辑 原始数据 按行查看 历史
dpd 提交于 2024-04-25 15:51 . add support for loongarch64
From f9aedeaeadd84f2c5e949a148e82d2a18d1e45d8 Mon Sep 17 00:00:00 2001
From: test <test@example.com>
Date: Thu, 25 Apr 2024 07:45:52 +0000
Subject: [PATCH] mvapich2 2.3.6 add support for loongarch64
---
src/mpid/ch3/channels/common/include/mv2_clock.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/mpid/ch3/channels/common/include/mv2_clock.h b/src/mpid/ch3/channels/common/include/mv2_clock.h
index 77552c4..0ad6b43 100644
--- a/src/mpid/ch3/channels/common/include/mv2_clock.h
+++ b/src/mpid/ch3/channels/common/include/mv2_clock.h
@@ -81,6 +81,20 @@ static inline cycles_t get_cycles()
asm volatile ("mov %0=ar.itc" : "=r" (ret));
return ret;
}
+#elif defined(__loongarch64)
+typedef unsigned long cycles_t;
+static inline cycles_t get_cycles()
+{
+ int rID = 0;
+ cycles_t val = 0;
+
+ __asm__ __volatile__(
+ "rdtime.d %0, %1 \n\t"
+ : "=r"(val), "=r"(rID)
+ :
+ );
+ return val;
+}
#elif defined(__aarch64__)
typedef unsigned long cycles_t;
static inline cycles_t get_cycles()
--
2.43.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/mvapich2.git
git@gitee.com:src-openeuler/mvapich2.git
src-openeuler
mvapich2
mvapich2
master

搜索帮助