File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
//! Raw and High level bindings to the CUDA NVPTX compiler used to compile PTX to
2
2
//! cubin files.
3
3
4
+ use std:: ffi:: c_char;
4
5
use std:: mem:: MaybeUninit ;
5
6
6
7
use cust_raw:: nvptx_compiler_sys;
@@ -101,8 +102,11 @@ impl CompilerFailure {
101
102
. to_result ( ) ?;
102
103
let size = size. assume_init ( ) ;
103
104
let mut vec = Vec :: with_capacity ( size) ;
104
- nvptx_compiler_sys:: nvPTXCompilerGetErrorLog ( self . handle , vec. as_mut_ptr ( ) as * mut i8 )
105
- . to_result ( ) ?;
105
+ nvptx_compiler_sys:: nvPTXCompilerGetErrorLog (
106
+ self . handle ,
107
+ vec. as_mut_ptr ( ) as * mut c_char ,
108
+ )
109
+ . to_result ( ) ?;
106
110
vec. set_len ( size) ;
107
111
Ok ( String :: from_utf8_lossy ( & vec) . to_string ( ) )
108
112
}
@@ -134,8 +138,11 @@ impl CompiledProgram {
134
138
. to_result ( ) ?;
135
139
let size = size. assume_init ( ) ;
136
140
let mut vec = Vec :: with_capacity ( size) ;
137
- nvptx_compiler_sys:: nvPTXCompilerGetInfoLog ( self . handle , vec. as_mut_ptr ( ) as * mut i8 )
138
- . to_result ( ) ?;
141
+ nvptx_compiler_sys:: nvPTXCompilerGetInfoLog (
142
+ self . handle ,
143
+ vec. as_mut_ptr ( ) as * mut c_char ,
144
+ )
145
+ . to_result ( ) ?;
139
146
vec. set_len ( size) ;
140
147
Ok ( String :: from_utf8_lossy ( & vec) . to_string ( ) )
141
148
}
You can’t perform that action at this time.
0 commit comments