mirror of
https://github.com/matrix-construct/construct
synced 2025-03-13 21:10:32 +01:00
ircd::simt: Use native_sqrt(); minor cleanup / named statement.
This commit is contained in:
parent
d733fe8ef9
commit
55004f054a
2 changed files with 3 additions and 2 deletions
|
@ -40,7 +40,8 @@ ircd_simt_math_mean_f4lldr(__local float4 *const buf,
|
|||
{
|
||||
const float
|
||||
sum = ircd_simt_reduce_add_f4(buf[li]),
|
||||
res = sum / (ln * 4);
|
||||
div = ln * 4,
|
||||
res = sum / div;
|
||||
|
||||
buf[li] = res;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ ircd_simt_math_norm_f4lldr(__local float4 *const out,
|
|||
|
||||
const float4
|
||||
epsilon = 0.00001f,
|
||||
s = sqrt(tmp[li] + epsilon);
|
||||
s = native_sqrt(tmp[li] + epsilon);
|
||||
|
||||
out[li] = sub_mean / s;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue