Skip to content

Commit

Permalink
AddAssign/SubAssign/MulAsign/DivAssign/RemAssign
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceeri committed Aug 15, 2024
1 parent cd55bc8 commit 2dd4fc3
Show file tree
Hide file tree
Showing 35 changed files with 14,289 additions and 0 deletions.
70 changes: 70 additions & 0 deletions codegen/templates/vec.rs.tera
Original file line number Diff line number Diff line change
Expand Up @@ -2670,6 +2670,13 @@ impl DivAssign<{{ self_t }}> for {{ self_t }} {
}
}

impl DivAssign<&Self> for {{ self_t }} {
#[inline]
fn div_assign(&mut self, rhs: &Self) {
self.div_assign(*rhs)
}
}

impl Div<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
Expand Down Expand Up @@ -2739,6 +2746,13 @@ impl DivAssign<{{ scalar_t }}> for {{ self_t }} {
}
}

impl DivAssign<&{{ scalar_t }}> for {{ self_t }} {
#[inline]
fn div_assign(&mut self, rhs: &{{ scalar_t }}) {
self.div_assign(*rhs)
}
}

impl Div<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
Expand Down Expand Up @@ -2856,6 +2870,13 @@ impl MulAssign<{{ self_t }}> for {{ self_t }} {
}
}

impl MulAssign<&Self> for {{ self_t }} {
#[inline]
fn mul_assign(&mut self, rhs: &Self) {
self.mul_assign(*rhs)
}
}

impl Mul<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
Expand Down Expand Up @@ -2925,6 +2946,13 @@ impl MulAssign<{{ scalar_t }}> for {{ self_t }} {
}
}

impl MulAssign<&{{ scalar_t }}> for {{ self_t }} {
#[inline]
fn mul_assign(&mut self, rhs: &{{ scalar_t }}) {
self.mul_assign(*rhs)
}
}

impl Mul<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
Expand Down Expand Up @@ -3042,6 +3070,13 @@ impl AddAssign<{{ self_t }}> for {{ self_t }} {
}
}

impl AddAssign<&Self> for {{ self_t }} {
#[inline]
fn add_assign(&mut self, rhs: &Self) {
self.add_assign(*rhs)
}
}

impl Add<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
Expand Down Expand Up @@ -3111,6 +3146,13 @@ impl AddAssign<{{ scalar_t }}> for {{ self_t }} {
}
}

impl AddAssign<&{{ scalar_t }}> for {{ self_t }} {
#[inline]
fn add_assign(&mut self, rhs: &{{ scalar_t }}) {
self.add_assign(*rhs)
}
}

impl Add<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
Expand Down Expand Up @@ -3228,6 +3270,13 @@ impl SubAssign<{{ self_t }}> for {{ self_t }} {
}
}

impl SubAssign<&Self> for {{ self_t }} {
#[inline]
fn sub_assign(&mut self, rhs: &Self) {
self.sub_assign(*rhs)
}
}

impl Sub<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
Expand Down Expand Up @@ -3297,6 +3346,13 @@ impl SubAssign<{{ scalar_t }}> for {{ self_t }} {
}
}

impl SubAssign<&{{ scalar_t }}> for {{ self_t }} {
#[inline]
fn sub_assign(&mut self, rhs: &{{ scalar_t }}) {
self.sub_assign(*rhs)
}
}

impl Sub<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
Expand Down Expand Up @@ -3415,6 +3471,13 @@ impl RemAssign<{{ self_t }}> for {{ self_t }} {
}
}

impl RemAssign<&Self> for {{ self_t }} {
#[inline]
fn rem_assign(&mut self, rhs: &Self) {
self.rem_assign(*rhs)
}
}

impl Rem<{{ scalar_t }}> for {{ self_t }} {
type Output = Self;
#[inline]
Expand Down Expand Up @@ -3470,6 +3533,13 @@ impl RemAssign<{{ scalar_t }}> for {{ self_t }} {
}
}

impl RemAssign<&{{ scalar_t }}> for {{ self_t }} {
#[inline]
fn rem_assign(&mut self, rhs: &{{ scalar_t }}) {
self.rem_assign(*rhs)
}
}

impl Rem<{{ self_t }}> for {{ scalar_t }} {
type Output = {{ self_t }};
#[inline]
Expand Down
Loading

0 comments on commit 2dd4fc3

Please sign in to comment.