0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-02 10:08:56 +02:00

ircd: Various fixes / cleanup.

This commit is contained in:
Jason Volk 2019-08-06 21:41:14 -07:00
parent 0501b52d31
commit f7dbe8afe2
3 changed files with 10 additions and 13 deletions

View file

@ -703,12 +703,13 @@ ircd::info::dump_cpu_info()
#if defined(__i386__) or defined(__x86_64__)
log::info
{
"%s mmx:%b sse:%b sse2:%b sse3:%b sse4.1:%b avx:%b avx2:%b",
"%s mmx:%b sse:%b sse2:%b sse3:%b ssse3:%b sse4.1:%b sse4.2:%b avx:%b avx2:%b",
hardware::x86::vendor,
hardware::x86::mmx,
hardware::x86::sse,
hardware::x86::sse2,
hardware::x86::sse3,
hardware::x86::ssse3,
hardware::x86::sse4_1,
hardware::x86::sse4_2,
hardware::x86::avx,

View file

@ -702,10 +702,7 @@ const
static const m::event::fetch::opts fopts
{
m::event::keys::include
{
"sender"
}
m::event::keys::include {"sender"}
};
const m::room::state tokens{m::user::tokens, &fopts};

View file

@ -42,6 +42,11 @@ ircd::tolower(const mutable_buffer &out,
const string_view &in)
noexcept
{
const auto stop
{
std::next(begin(in), std::min(size(in), size(out)))
};
const __m128i *src_
{
reinterpret_cast<const __m128i *>(begin(in))
@ -52,12 +57,7 @@ noexcept
reinterpret_cast<__m128i *>(begin(out))
};
const auto stop
{
std::next(begin(in), std::min(size(in), size(out)))
};
while(reinterpret_cast<const char *>(src_) + sizeof(__m128i) < stop)
while(reinterpret_cast<const char *>(src_) + sizeof(__m128i) < stop)
{
const __m128i lit_A1 { _mm_set1_epi8('A' - 1) };
const __m128i lit_Z1 { _mm_set1_epi8('Z' + 1) };
@ -68,8 +68,7 @@ noexcept
const __m128i mask { _mm_and_si128(gte_A, lte_Z) };
const __m128i ctrl_mask { _mm_and_si128(mask, addend) };
const __m128i result { _mm_add_epi8(src, ctrl_mask) };
_mm_storeu_si128(dst++, result);
_mm_storeu_si128(dst++, result);
}
const auto end{std::transform