mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 01:22:04 +00:00
Cosmetics, fix style issues
This commit is contained in:
parent
a4ff8bb933
commit
ad0ddc936a
@ -133,7 +133,7 @@ public:
|
||||
using BaseFunctionPtr = ExecutableFunctionImplPtr;
|
||||
|
||||
template <typename ...Args>
|
||||
FunctionExecutor(Args ...args) : DefaultFunction(args...) {}
|
||||
FunctionExecutor(Args&&... args) : DefaultFunction(std::forward<Args>(args)...) {}
|
||||
|
||||
virtual void executeFunctionImpl(Block & block, const ColumnNumbers & arguments, size_t result, size_t input_rows_count) = 0;
|
||||
|
||||
@ -151,7 +151,7 @@ public:
|
||||
using BaseFunctionPtr = FunctionPtr;
|
||||
|
||||
template <typename ...Args>
|
||||
FunctionExecutor(Args ...args) : DefaultFunction(args...) {}
|
||||
FunctionExecutor(Args&&... args) : DefaultFunction(std::forward<Args>(args)...) {}
|
||||
|
||||
virtual void executeFunctionImpl(Block & block, const ColumnNumbers & arguments, size_t result, size_t input_rows_count) = 0;
|
||||
|
||||
@ -174,8 +174,8 @@ public:
|
||||
using BaseFunctionPtr = FunctionExecutor<DefaultFunction>::BaseFunctionPtr;
|
||||
|
||||
template <typename ...Params>
|
||||
FunctionPerformanceAdaptor(PerformanceAdaptorOptions options_, Params ...params)
|
||||
: FunctionExecutor<DefaultFunction>(params...)
|
||||
FunctionPerformanceAdaptor(PerformanceAdaptorOptions options_, Params&&... params)
|
||||
: FunctionExecutor<DefaultFunction>(std::forward<Params>(params)...)
|
||||
, options(std::move(options_))
|
||||
{
|
||||
if (isImplementationEnabled(DefaultFunction::getImplementationTag()))
|
||||
@ -184,15 +184,17 @@ public:
|
||||
|
||||
/// Register alternative implementation.
|
||||
template<typename Function, typename ...Params>
|
||||
void registerImplementation(TargetArch arch, Params... params) {
|
||||
void registerImplementation(TargetArch arch, Params&&... params)
|
||||
{
|
||||
if (IsArchSupported(arch) && isImplementationEnabled(Function::getImplementationTag()))
|
||||
{
|
||||
impls.emplace_back(std::make_shared<Function>(params...));
|
||||
impls.emplace_back(std::make_shared<Function>(std::forward<Params>(params)...));
|
||||
statistics.emplace_back();
|
||||
}
|
||||
}
|
||||
|
||||
bool isImplementationEnabled(const String & impl_tag) {
|
||||
bool isImplementationEnabled(const String & impl_tag)
|
||||
{
|
||||
if (!options.implementations)
|
||||
return true;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <Common/randomSeed.h>
|
||||
#include <common/unaligned.h>
|
||||
|
||||
#include <Functions/SIMDxorshift.h>
|
||||
#include <Functions/RandXorshift.h>
|
||||
|
||||
extern "C"
|
||||
{
|
@ -4,7 +4,7 @@
|
||||
|
||||
/// This file contains macros and helpers for writing platform-dependent code.
|
||||
///
|
||||
/// Macroses DECLARE_<Arch>_SPECIFIC_CODE will wrap code inside them into the
|
||||
/// Macros DECLARE_<Arch>_SPECIFIC_CODE will wrap code inside them into the
|
||||
/// namespace TargetSpecific::<Arch> and enable Arch-specific compile options.
|
||||
/// Thus, it's allowed to call functions inside these namespaces only after
|
||||
/// checking platform in runtime (see IsArchSupported() below).
|
||||
|
Loading…
Reference in New Issue
Block a user