mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-09-10 11:36:42 +00:00
Use implicit FromCuda for library::get_module (#439)
This commit is contained in:
parent
8c23ef1ded
commit
f192dd317a
1 changed files with 3 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
use super::{module, ZludaObject, FromCuda};
|
use super::{module, ZludaObject};
|
||||||
use cuda_types::cuda::*;
|
use cuda_types::cuda::*;
|
||||||
use hip_runtime_sys::*;
|
use hip_runtime_sys::*;
|
||||||
|
|
||||||
|
@ -40,9 +40,8 @@ pub(crate) unsafe fn unload(library: CUlibrary) -> CUresult {
|
||||||
|
|
||||||
pub(crate) unsafe fn get_module(
|
pub(crate) unsafe fn get_module(
|
||||||
out: &mut CUmodule,
|
out: &mut CUmodule,
|
||||||
library: CUlibrary,
|
library: &Library,
|
||||||
) -> CUresult {
|
) -> CUresult {
|
||||||
let lib: &Library = FromCuda::from_cuda(&library)?;
|
*out = module::Module{base: library.base}.wrap();
|
||||||
*out = module::Module{base: lib.base}.wrap();
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue