diff --git a/cuda/cuda_model.rb b/cuda/cuda_model.rb index 92d1af38..0d49bf1d 100644 --- a/cuda/cuda_model.rb +++ b/cuda/cuda_model.rb @@ -34,8 +34,6 @@ gen_struct_map(typedefs, structs) gen_ffi_type_map(typedefs) -INIT_FUNCTIONS = /cuInit|cuDriverGetVersion|cuGetExportTable|cuDeviceGetCount|cuGetProcAddress/ - HEX_INT_TYPES.push("CUdeviceptr") class TracepointParameter @@ -286,6 +284,12 @@ def upper_snake_case(str) } EOF +register_epilogue "cuInit", < @@ -20,7 +22,37 @@ puts "#define #{CUDA_POINTER_NAMES[c]} #{c.pointer_name}" } -($cuda_commands + $cuda_exports_commands).each { |c| +($cuda_commands).each { |c| + puts <