mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd: Vector initialization fixes for GCC.
This commit is contained in:
parent
7576c11897
commit
4f97dcf456
2 changed files with 5 additions and 5 deletions
|
@ -95,7 +95,7 @@ ircd::math::smax(const vector_view<T> &__restrict__ out,
|
||||||
assert(exps.size() >= in.size());
|
assert(exps.size() >= in.size());
|
||||||
|
|
||||||
for(uint i(0); i < size(in); ++i)
|
for(uint i(0); i < size(in); ++i)
|
||||||
acc[i] = {0};
|
acc[i] = D{0};
|
||||||
|
|
||||||
for(uint i(0); i < size(in); ++i)
|
for(uint i(0); i < size(in); ++i)
|
||||||
exps[i] = exp(lane_cast<D>(in[i]));
|
exps[i] = exp(lane_cast<D>(in[i]));
|
||||||
|
@ -123,7 +123,7 @@ ircd::math::smax(const vector_view<T> &__restrict__ out,
|
||||||
assert(acc.size() >= in.size());
|
assert(acc.size() >= in.size());
|
||||||
|
|
||||||
for(uint i(0); i < size(in); ++i)
|
for(uint i(0); i < size(in); ++i)
|
||||||
acc[i] = {0};
|
acc[i] = D{0};
|
||||||
|
|
||||||
for(uint i(0); i < size(in); ++i)
|
for(uint i(0); i < size(in); ++i)
|
||||||
out[i] = exp(in[i]);
|
out[i] = exp(in[i]);
|
||||||
|
|
|
@ -397,7 +397,7 @@ ircd::gpt::vocab::pre_tokenize(u8x16 (&token)[16],
|
||||||
len -= (ret[1] + off - 1) - 16;
|
len -= (ret[1] + off - 1) - 16;
|
||||||
|
|
||||||
// Pack the utf-8 codepoints into the result token
|
// Pack the utf-8 codepoints into the result token
|
||||||
token[i] = {0};
|
token[i] = u8x16{0};
|
||||||
for(uint j(0); j < cp_num; ++j)
|
for(uint j(0); j < cp_num; ++j)
|
||||||
for(uint k(0); k < rcp_len[j] && idx[j] + k < 16; ++k)
|
for(uint k(0); k < rcp_len[j] && idx[j] + k < 16; ++k)
|
||||||
token[i][idx[j] + k] = rch8[j * 4 + k];
|
token[i][idx[j] + k] = rch8[j * 4 + k];
|
||||||
|
@ -694,8 +694,8 @@ ircd::gpt::vocab::bpe_prepare(u8x16 (&out)[16][2],
|
||||||
if(idx[i] >= 16 || !in[idx[i]])
|
if(idx[i] >= 16 || !in[idx[i]])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
out[i][0] = {0};
|
out[i][0] = u8x16{0};
|
||||||
out[i][1] = {0};
|
out[i][1] = u8x16{0};
|
||||||
for(uint k(0); k < 2; ++k)
|
for(uint k(0); k < 2; ++k)
|
||||||
for(uint j(0); j < cplen[i + k] && idx[i + k] + j < 16; ++j)
|
for(uint j(0); j < cplen[i + k] && idx[i + k] + j < 16; ++j)
|
||||||
out[i][k][j] = in[idx[i + k] + j];
|
out[i][k][j] = in[idx[i + k] + j];
|
||||||
|
|
Loading…
Reference in a new issue