Skip to content

Commit

Permalink
Reduce changes to unrelated files.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed Dec 3, 2023
1 parent 505e336 commit 3acffcc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 16 deletions.
18 changes: 12 additions & 6 deletions codegen/templates/vec.rs.tera
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

// Generated from {{template_path}} template. Edit the template, not the generated file.

{% set mask_t = "BVec" ~ dim ~ "A" %}
{% if not is_scalar %}
{% if is_scalar %}
{% set mask_t = "BVec" ~ dim %}
{% else %}
{% set is_simd = true %}
{% if is_sse2 %}
{% set simd_t = "__m128" %}
Expand All @@ -12,6 +13,11 @@
{% elif is_coresimd %}
{% set simd_t = "f32x4" %}
{% endif %}
{% set mask_t = "BVec" ~ dim ~ "A" %}
{% endif %}

{% if scalar_t == "f32" and mask_t == "BVec4" %}
{% set mask_t = "BVec4A" %}
{% endif %}

{% if scalar_t == "f32" or scalar_t == "f64" %}
Expand Down Expand Up @@ -118,16 +124,16 @@
{% set zero = "0" %}
{% endif %}

{% if mask_t == "BVec4A" and is_scalar %}
{% if mask_t == "BVec4A" and scalar_t == "f32" and is_scalar %}
#[cfg(feature = "scalar-math")]
use crate::BVec4 as BVec4A;
#[cfg(not(feature = "scalar-math"))]
use crate::BVec4A;
use crate::{
{% else %}
use crate::{{ mask_t }};
use crate::{
{{ mask_t }},
{% endif %}

use crate::{
{% if self_t != vec2_t %}
{{ vec2_t }},
{% endif %}
Expand Down
4 changes: 1 addition & 3 deletions src/f32/coresimd/vec4.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Generated from vec.rs.tera template. Edit the template, not the generated file.

use crate::BVec4A;

use crate::{coresimd::*, f32::math, Vec2, Vec3, Vec3A};
use crate::{coresimd::*, f32::math, BVec4A, Vec2, Vec3, Vec3A};

#[cfg(not(target_arch = "spirv"))]
use core::fmt;
Expand Down
1 change: 0 additions & 1 deletion src/f32/scalar/vec4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use crate::BVec4 as BVec4A;
#[cfg(not(feature = "scalar-math"))]
use crate::BVec4A;

use crate::{f32::math, Vec2, Vec3, Vec3A};

#[cfg(not(target_arch = "spirv"))]
Expand Down
4 changes: 1 addition & 3 deletions src/f32/sse2/vec4.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Generated from vec.rs.tera template. Edit the template, not the generated file.

use crate::BVec4A;

use crate::{f32::math, sse2::*, Vec2, Vec3, Vec3A};
use crate::{f32::math, sse2::*, BVec4A, Vec2, Vec3, Vec3A};

#[cfg(not(target_arch = "spirv"))]
use core::fmt;
Expand Down
4 changes: 1 addition & 3 deletions src/f32/wasm32/vec4.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Generated from vec.rs.tera template. Edit the template, not the generated file.

use crate::BVec4A;

use crate::{f32::math, wasm32::*, Vec2, Vec3, Vec3A};
use crate::{f32::math, wasm32::*, BVec4A, Vec2, Vec3, Vec3A};

#[cfg(not(target_arch = "spirv"))]
use core::fmt;
Expand Down

0 comments on commit 3acffcc

Please sign in to comment.