Skip to content

Commit

Permalink
rename copy_sign -> copysign to match stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
shiinamiyuki committed Oct 18, 2023
1 parent d5bf1f0 commit 794318e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion luisa_compute/src/lang/ops/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ impl_ops_trait!([X: Linear] FloatMulAddExpr[FloatMulAddThis] for Expr<X> where [
});

impl_ops_trait!([X: Linear] FloatCopySignExpr[FloatCopySignThis] for Expr<X> 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<X> where [X::Scalar: Floating] {
Expand Down
4 changes: 2 additions & 2 deletions luisa_compute/src/lang/ops/spread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ where
Expr<T::Join>: FloatCopySignThis,
{
type Output = Expr<T::Join>;
fn copy_sign(self, sign: S) -> Self::Output {
Expr::<T::Join>::_copy_sign(Self::lift_self(self), Self::lift_other(sign))
fn copysign(self, sign: S) -> Self::Output {
Expr::<T::Join>::_copysign(Self::lift_self(self), Self::lift_other(sign))
}
}
impl<T, S> FloatStepExpr<S> for T
Expand Down
2 changes: 1 addition & 1 deletion luisa_compute/src/lang/ops/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ ops_trait!(FloatMulAddExpr<A, B>[FloatMulAddThis] {
});

ops_trait!(FloatCopySignExpr<T>[FloatCopySignThis] {
fn copy_sign[_copy_sign](self, sign: T);
fn copysign[_copysign](self, sign: T);
});

ops_trait!(FloatStepExpr<T>[FloatStepThis] {
Expand Down

0 comments on commit 794318e

Please sign in to comment.