Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rofirrim authored and kito-cheng committed May 22, 2024
1 parent 22b2e23 commit 94a2860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/rvv-intrinsic-examples.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,15 @@ void reduce_rvv(double *a, double *b, double *result_sum, int *result_count,
// Compute a mask whose enabled elements will correspond to the
// elements of a that are not 42.
vbool64_t mask = __riscv_vmfne_vf_f64m1_b64(vec_a, 42, vl);
vbool64_t mask = __riscv_vmfne_vf_f64m1_b64(vec_a, 42.0, vl);
// for all e in [0..vl)
// vec_s[e] ← vec_s[e] + vec_a[e] * vec_b[e], if mask[e] is enabled
// vec_s[e] , otherwise (mask undisturbed)
vec_s = __riscv_vfmacc_vv_f64m1_tumu(mask, vec_s, vec_a, vec_b, vl);
// Adds to count the number of elements in mask that are enabled.
count = count + __riscv_vcpop_m_b64(mask, vl);
count += __riscv_vcpop_m_b64(mask, vl);
}
vfloat64m1_t vec_sum;
Expand Down

0 comments on commit 94a2860

Please sign in to comment.