From 89a93e3c9c585a9ee2e97816de721bc7dbde4097 Mon Sep 17 00:00:00 2001 From: Praneet Rathi <prrathi10@gmail.com> Date: Fri, 17 Jan 2025 22:37:54 -0600 Subject: [PATCH] cu --- hercules_cg/src/gpu.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hercules_cg/src/gpu.rs b/hercules_cg/src/gpu.rs index 0c69544b..2151dc0d 100644 --- a/hercules_cg/src/gpu.rs +++ b/hercules_cg/src/gpu.rs @@ -419,7 +419,9 @@ namespace cg = cooperative_groups; } // Pull primitive return to a pointer parameter if self.types[self.return_type_id.idx()].is_primitive() { - write!(w, ", ")?; + if !first_param { + write!(w, ", ")?; + } write!( w, "{} __restrict__ ret", @@ -1907,7 +1909,7 @@ extern \"C\" {} {}(", if ret_primitive { ret_type.clone() } else { "void".to_str _ => "sinh", }, Intrinsic::Sqrt => match ty { - Type::Float32 => "__sqrtf", + Type::Float32 => "sqrtf", ty if ty.is_signed() || ty.is_unsigned() => "isqrt", _ => "sqrt", }, -- GitLab