Skip to content

Commit

Permalink
[Fix] : invalid argument type 'simde_float16' to unary expression
Browse files Browse the repository at this point in the history
  • Loading branch information
朱季葳 authored and 朱季葳 committed Oct 16, 2023
1 parent dcea734 commit 0046c2e
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 34 deletions.
10 changes: 6 additions & 4 deletions simde/arm/neon/cadd_rot270.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ simde_float16x4_t simde_vcadd_rot270_f16(simde_float16x4_t a,
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] = simde_vaddh_f16(b_.values[2 * i + 1], a_.values[2 * i]);
r_.values[2 * i + 1] =
simde_vaddh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]);
r_.values[2 * i + 1] = simde_vaddh_f16(
simde_float16_from_float32(-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]);
}

return simde_float16x4_from_private(r_);
Expand All @@ -75,8 +76,9 @@ simde_float16x8_t simde_vcaddq_rot270_f16(simde_float16x8_t a,
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] = simde_vaddh_f16(b_.values[2 * i + 1], a_.values[2 * i]);
r_.values[2 * i + 1] =
simde_vaddh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]);
r_.values[2 * i + 1] = simde_vaddh_f16(
simde_float16_from_float32(-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]);
}

return simde_float16x8_from_private(r_);
Expand Down
8 changes: 6 additions & 2 deletions simde/arm/neon/cadd_rot90.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ simde_float16x4_t simde_vcadd_rot90_f16(simde_float16x4_t a,
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i]);
simde_vaddh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]);
r_.values[2 * i + 1] =
simde_vaddh_f16(b_.values[2 * i], a_.values[2 * i + 1]);
}
Expand All @@ -74,7 +76,9 @@ simde_float16x8_t simde_vcaddq_rot90_f16(simde_float16x8_t a,
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i]);
simde_vaddh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]);
r_.values[2 * i + 1] =
simde_vaddh_f16(b_.values[2 * i], a_.values[2 * i + 1]);
}
Expand Down
56 changes: 36 additions & 20 deletions simde/arm/neon/cmla_rot180_lane.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,16 @@ simde_float16x4_t simde_vcmla_rot180_lane_f16(simde_float16x4_t r,
SIMDE_VECTORIZE
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i]));
r_.values[2 * i + 1] += = simde_vaddh_f16(
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i + 1]) * a_.values[2 * i]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]));
}

result = simde_float16x4_from_private(r_);
Expand Down Expand Up @@ -134,12 +138,16 @@ simde_float16x8_t simde_vcmlaq_rot180_lane_f16(simde_float16x8_t r,
SIMDE_VECTORIZE
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i]));
r_.values[2 * i + 1] += = simde_vaddh_f16(
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i + 1]) * a_.values[2 * i]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]));
}

result = simde_float16x8_from_private(r_);
Expand Down Expand Up @@ -211,12 +219,16 @@ simde_float16x4_t simde_vcmla_rot180_laneq_f16(simde_float16x4_t r,
SIMDE_VECTORIZE
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i]));
r_.values[2 * i + 1] += = simde_vaddh_f16(
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i + 1]) * a_.values[2 * i]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]));
}

result = simde_float16x4_from_private(r_);
Expand Down Expand Up @@ -291,12 +303,16 @@ simde_float16x8_t simde_vcmlaq_rot180_laneq_f16(simde_float16x8_t r,
SIMDE_VECTORIZE
for (size_t i = 0; i < (sizeof(r_.values) / (2 * sizeof(r_.values[0])));
i++) {
r_.values[2 * i] =
simde_vaddh_f16(r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i]));
r_.values[2 * i + 1] += = simde_vaddh_f16(
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i + 1]) * a_.values[2 * i]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i]));
}

result = simde_float16x8_from_private(r_);
Expand Down
16 changes: 12 additions & 4 deletions simde/arm/neon/cmla_rot270_lane.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ simde_float16x4_t simde_vcmla_rot270_lane_f16(simde_float16x4_t r,
simde_vmulh_f16(b_.values[2 * i + 1], a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]));
}

result = simde_float16x4_from_private(r_);
Expand Down Expand Up @@ -138,7 +140,9 @@ simde_float16x8_t simde_vcmlaq_rot270_lane_f16(simde_float16x8_t r,
simde_vmulh_f16(b_.values[2 * i + 1], a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]));
}

result = simde_float16x8_from_private(r_);
Expand Down Expand Up @@ -215,7 +219,9 @@ simde_float16x4_t simde_vcmla_rot270_laneq_f16(simde_float16x4_t r,
simde_vmulh_f16(b_.values[2 * i + 1], a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]));
}

result = simde_float16x4_from_private(r_);
Expand Down Expand Up @@ -295,7 +301,9 @@ simde_float16x8_t simde_vcmlaq_rot270_laneq_f16(simde_float16x8_t r,
simde_vmulh_f16(b_.values[2 * i + 1], a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(-(b_.values[2 * i]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i])),
a_.values[2 * i + 1]));
}

result = simde_float16x8_from_private(r_);
Expand Down
16 changes: 12 additions & 4 deletions simde/arm/neon/cmla_rot90_lane.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ simde_float16x4_t simde_vcmla_rot90_lane_f16(simde_float16x4_t r,
i++) {
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(b_.values[2 * i], a_.values[2 * i + 1]));
Expand Down Expand Up @@ -134,7 +136,9 @@ simde_float16x8_t simde_vcmlaq_rot90_lane_f16(simde_float16x8_t r,
i++) {
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(b_.values[2 * i], a_.values[2 * i + 1]));
Expand Down Expand Up @@ -211,7 +215,9 @@ simde_float16x4_t simde_vcmla_rot90_laneq_f16(simde_float16x4_t r,
i++) {
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(b_.values[2 * i], a_.values[2 * i + 1]));
Expand Down Expand Up @@ -291,7 +297,9 @@ simde_float16x8_t simde_vcmlaq_rot90_laneq_f16(simde_float16x8_t r,
i++) {
r_.values[2 * i] = simde_vaddh_f16(
r_.values[2 * i],
simde_vmulh_f16(-(b_.values[2 * i + 1]), a_.values[2 * i + 1]));
simde_vmulh_f16(simde_float16_from_float32(
-simde_float16_to_float32(b_.values[2 * i + 1])),
a_.values[2 * i + 1]));
r_.values[2 * i + 1] = simde_vaddh_f16(
r_.values[2 * i + 1],
simde_vmulh_f16(b_.values[2 * i], a_.values[2 * i + 1]));
Expand Down

0 comments on commit 0046c2e

Please sign in to comment.