From 794318eb7bd6eb5d17bf4fd554324d256ef47e5d Mon Sep 17 00:00:00 2001 From: Xiaochun Tong Date: Wed, 18 Oct 2023 00:35:59 -0400 Subject: [PATCH] rename copy_sign -> copysign to match stdlib --- luisa_compute/src/lang/ops/impls.rs | 2 +- luisa_compute/src/lang/ops/spread.rs | 4 ++-- luisa_compute/src/lang/ops/traits.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/luisa_compute/src/lang/ops/impls.rs b/luisa_compute/src/lang/ops/impls.rs index 7c444a7..c91c88a 100644 --- a/luisa_compute/src/lang/ops/impls.rs +++ b/luisa_compute/src/lang/ops/impls.rs @@ -333,7 +333,7 @@ impl_ops_trait!([X: Linear] FloatMulAddExpr[FloatMulAddThis] for Expr where [ }); impl_ops_trait!([X: Linear] FloatCopySignExpr[FloatCopySignThis] for Expr where [X::Scalar: Floating] { - fn copy_sign[_copy_sign](self, sign) { Func::Copysign.call2(self, sign) } + fn copysign[_copysign](self, sign) { Func::Copysign.call2(self, sign) } }); impl_ops_trait!([X: Linear] FloatStepExpr[FloatStepThis] for Expr where [X::Scalar: Floating] { diff --git a/luisa_compute/src/lang/ops/spread.rs b/luisa_compute/src/lang/ops/spread.rs index 3c583d3..26db436 100644 --- a/luisa_compute/src/lang/ops/spread.rs +++ b/luisa_compute/src/lang/ops/spread.rs @@ -292,8 +292,8 @@ where Expr: FloatCopySignThis, { type Output = Expr; - fn copy_sign(self, sign: S) -> Self::Output { - Expr::::_copy_sign(Self::lift_self(self), Self::lift_other(sign)) + fn copysign(self, sign: S) -> Self::Output { + Expr::::_copysign(Self::lift_self(self), Self::lift_other(sign)) } } impl FloatStepExpr for T diff --git a/luisa_compute/src/lang/ops/traits.rs b/luisa_compute/src/lang/ops/traits.rs index 49c61e8..690a718 100644 --- a/luisa_compute/src/lang/ops/traits.rs +++ b/luisa_compute/src/lang/ops/traits.rs @@ -301,7 +301,7 @@ ops_trait!(FloatMulAddExpr[FloatMulAddThis] { }); ops_trait!(FloatCopySignExpr[FloatCopySignThis] { - fn copy_sign[_copy_sign](self, sign: T); + fn copysign[_copysign](self, sign: T); }); ops_trait!(FloatStepExpr[FloatStepThis] {