mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-04-20 08:24:44 +00:00
Have an implementation for vprintf
This commit is contained in:
parent
ccf3c02ac1
commit
04a411fe22
4 changed files with 13 additions and 4 deletions
|
@ -76,8 +76,8 @@ You should install most recent run-time an developer driver packages as outlined
|
|||
If you are building on Linux you must also symlink (or rename) the ZLUDA output binaries after ZLUDA build finishes:
|
||||
```
|
||||
ln -s libnvcuda.so target/release/libcuda.so
|
||||
ln -s libcuda.so target/release/libcuda.so.1
|
||||
ln -s libnvidia-ml.so target/release/libnvml.so
|
||||
ln -s libnvcuda.so target/release/libcuda.so.1
|
||||
ln -s libnvml.so target/release/libnvidia-ml.so
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
|
Binary file not shown.
|
@ -335,3 +335,10 @@ void FUNC(__assertfail)(
|
|||
__attribute__((unused)) __private ulong* charSize
|
||||
) {
|
||||
}
|
||||
|
||||
uint FUNC(vprintf)(
|
||||
__attribute__((unused)) __generic void* format,
|
||||
__attribute__((unused)) __generic void* valist
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1163,9 +1163,11 @@ fn translate_function<'input, 'a>(
|
|||
) -> Result<Option<Function<'input>>, TranslateError> {
|
||||
let import_as = match &f.func_directive {
|
||||
ast::MethodDeclaration {
|
||||
name: ast::MethodName::Func("__assertfail"),
|
||||
name: ast::MethodName::Func(func_name),
|
||||
..
|
||||
} => Some("__zluda_ptx_impl____assertfail".to_owned()),
|
||||
} if *func_name == "__assertfail" || *func_name == "vprintf" => {
|
||||
Some([ZLUDA_PTX_PREFIX, func_name].concat())
|
||||
}
|
||||
_ => None,
|
||||
};
|
||||
let (str_resolver, fn_resolver, fn_decl) = id_defs.start_fn(&f.func_directive)?;
|
||||
|
|
Loading…
Add table
Reference in a new issue