Fix style

This commit is contained in:
Dmitrii Kovalkov 2020-05-20 18:44:01 +02:00
parent cfc87767c5
commit d4a8d91789
3 changed files with 10 additions and 11 deletions

View File

@ -76,7 +76,8 @@ void RandImpl::execute(char * output, size_t size)
/// It is guaranteed (by PaddedPODArray) that we can overwrite up to 15 bytes after end.
}
namespace {
namespace
{
// The array of random numbers from 'head -c8 /dev/urandom | xxd -p'.
// Can be used for creating seeds for random generators.
@ -103,11 +104,11 @@ void RandVecImpl<VecSize>::execute(char * output, size_t size)
static_assert(VecSize <= random_numbers.size());
using VecUInt64 = UInt64x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
if (size == 0)
return;
char * end = output + size;
constexpr int safe_overwrite = 15;
@ -157,11 +158,11 @@ void RandVecImpl2<VecSize>::execute(char * output, size_t size)
static_assert(2 * VecSize <= random_numbers.size());
using VecUInt64 = UInt64x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
if (size == 0)
return;
char * end = output + size;
constexpr int safe_overwrite = 15;
@ -218,11 +219,11 @@ void RandVecImpl4<VecSize>::execute(char * output, size_t size)
static_assert(4 * VecSize <= random_numbers.size());
using VecUInt64 = UInt64x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
using VecUInt32 = UInt32x<VecSize>;
if (size == 0)
return;
char * end = output + size;
constexpr int safe_overwrite = 15;

View File

@ -124,13 +124,11 @@ public:
if constexpr (UseMultitargetCode)
{
// vec impl 4
selector.registerImplementation<TargetArch::AVX2,
FunctionRandomImpl<TargetSpecific::AVX2::RandVecImpl4<4>, ToType, Name>>();
selector.registerImplementation<TargetArch::AVX512F,
FunctionRandomImpl<TargetSpecific::AVX512F::RandVecImpl4<8>, ToType, Name>>();
}
}

View File

@ -177,7 +177,7 @@ public:
implementations[id]->executeImpl(block, arguments, result, input_rows_count);
else
implementations[id]->execute(block, arguments, result, input_rows_count);
watch.stop();
// TODO(dakovalkov): Calculate something more informative.