From 425edfcdd49a4fa49d480f1b078c55dba4709e29 Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Fri, 7 May 2021 18:22:09 +0200 Subject: Simplify typing --- zluda_dump/src/lib.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'zluda_dump/src/lib.rs') diff --git a/zluda_dump/src/lib.rs b/zluda_dump/src/lib.rs index 4ea449c..f168930 100644 --- a/zluda_dump/src/lib.rs +++ b/zluda_dump/src/lib.rs @@ -191,7 +191,10 @@ unsafe fn record_module_image(module: CUmodule, image: &str) { unsafe fn try_dump_module_image(image: &str) -> Result<(), Box> { let mut dump_path = get_dump_dir()?; - dump_path.push(format!("module_{:04}.ptx", MODULES.as_ref().unwrap().len() - 1)); + dump_path.push(format!( + "module_{:04}.ptx", + MODULES.as_ref().unwrap().len() - 1 + )); let mut file = File::create(dump_path)?; file.write_all(image.as_bytes())?; Ok(()) @@ -217,10 +220,15 @@ unsafe fn to_str(image: *const T) -> Option<&'static str> { fn directive_to_kernel(dir: &ast::Directive) -> Option<(String, Vec)> { match dir { ast::Directive::Method(ast::Function { - func_directive: ast::MethodDecl::Kernel { name, in_args }, + func_directive: + ast::MethodDeclaration { + name: ast::MethodName::Kernel(name), + input_arguments, + .. + }, .. }) => { - let arg_sizes = in_args + let arg_sizes = input_arguments .iter() .map(|arg| ast::Type::from(arg.v_type.clone()).size_of()) .collect(); -- cgit v1.2.3