aboutsummaryrefslogtreecommitdiffhomepage
path: root/zluda/src/impl/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'zluda/src/impl/mod.rs')
-rw-r--r--zluda/src/impl/mod.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/zluda/src/impl/mod.rs b/zluda/src/impl/mod.rs
index e0d19ae..1335ef6 100644
--- a/zluda/src/impl/mod.rs
+++ b/zluda/src/impl/mod.rs
@@ -20,6 +20,10 @@ pub mod function;
#[cfg_attr(not(windows), path = "os_unix.rs")]
pub(crate) mod os;
pub(crate) mod module;
+pub(crate) mod context;
+pub(crate) mod memory;
+pub(crate) mod link;
+pub(crate) mod pointer;
#[cfg(debug_assertions)]
pub fn unimplemented() -> CUresult {
@@ -31,6 +35,19 @@ pub fn unimplemented() -> CUresult {
CUresult::CUDA_ERROR_NOT_SUPPORTED
}
+#[macro_export]
+macro_rules! hip_call {
+ ($expr:expr) => {
+ #[allow(unused_unsafe)]
+ {
+ let err = unsafe { $expr };
+ if err != hip_runtime_sys::hipError_t::hipSuccess {
+ return Result::Err(err);
+ }
+ }
+ };
+}
+
pub trait HasLivenessCookie: Sized {
const COOKIE: usize;
const LIVENESS_FAIL: CUresult;