mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd::simt: Use defined epsilon for normalization smoothing for now.
This commit is contained in:
parent
95c4e0af52
commit
d817536e23
2 changed files with 9 additions and 6 deletions
|
@ -25,15 +25,17 @@ ircd_simt_math_norm_f4lldr(__local float4 *const out,
|
|||
ircd_simt_math_mean_f4lldr(tmp, ln, li);
|
||||
|
||||
const float4
|
||||
sub_mean = in[li] - tmp[li];
|
||||
sub_mean = in[li] - tmp[li],
|
||||
sub_mean_sqr = pow(sub_mean, 2);
|
||||
|
||||
tmp[li] = pow(sub_mean, 2);
|
||||
ircd_simt_math_mean_f4lldr(tmp, ln, li);
|
||||
out[li] = sub_mean_sqr;
|
||||
ircd_simt_math_mean_f4lldr(out, ln, li);
|
||||
|
||||
const float4
|
||||
epsilon = 0.00001f,
|
||||
s = native_sqrt(tmp[li] + epsilon);
|
||||
epsilon = FLT_EPSILON,
|
||||
s = native_sqrt(out[li] + epsilon),
|
||||
res = sub_mean / s;
|
||||
|
||||
out[li] = sub_mean / s;
|
||||
out[li] = res;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -66,6 +66,7 @@ ircd_simt_sort_idx16_flldr(__local ushort *const idx,
|
|||
const uint ln,
|
||||
const uint li)
|
||||
{
|
||||
#pragma clang loop unroll(disable)
|
||||
for(uint up = 1; up < ln; up <<= 1)
|
||||
{
|
||||
const bool
|
||||
|
|
Loading…
Reference in a new issue