aboutsummaryrefslogtreecommitdiffhomepage
path: root/ptx
diff options
context:
space:
mode:
authorAndrzej Janik <[email protected]>2021-06-28 01:40:35 +0200
committerAndrzej Janik <[email protected]>2021-06-28 01:40:35 +0200
commitb2a455e12e91d3b1bdc4edaa7b25a3348047be9e (patch)
tree8ed0c81404bf0cab77fc264714bc257badc6ac4d /ptx
parent196242b4104eae77249cb342d749f95c37d6ffec (diff)
downloadZLUDA-b2a455e12e91d3b1bdc4edaa7b25a3348047be9e.tar.gz
ZLUDA-b2a455e12e91d3b1bdc4edaa7b25a3348047be9e.zip
Bunch of tiny fixes and improvements
Diffstat (limited to 'ptx')
-rw-r--r--ptx/src/translate.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/ptx/src/translate.rs b/ptx/src/translate.rs
index e0b82e8..7cefdd6 100644
--- a/ptx/src/translate.rs
+++ b/ptx/src/translate.rs
@@ -1020,12 +1020,8 @@ fn emit_function_header<'a>(
kernel_info: &mut HashMap<String, KernelInfo>,
) -> Result<spirv::Word, TranslateError> {
if let ast::MethodName::Kernel(name) = func_decl.name {
- let input_args = if func_decl.shared_mem.is_none() {
- func_decl.input_arguments.as_slice()
- } else {
- &func_decl.input_arguments[0..func_decl.input_arguments.len() - 1]
- };
- let args_lens = input_args
+ let args_lens = func_decl
+ .input_arguments
.iter()
.map(|param| param.v_type.size_of())
.collect();