mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-06 07:32:27 +00:00
Merge branch 'feature-quantileBfloat16' of github.com:RedClusive/ClickHouse into feature-quantileBfloat16
This commit is contained in:
commit
6aee43f323
@ -67,12 +67,11 @@ struct Bfloat16Histogram
|
|||||||
buf.read(reinterpret_cast<char *>(array.data()), size * sizeof(array[0]));
|
buf.read(reinterpret_cast<char *>(array.data()), size * sizeof(array[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
Float32 quantile(const Float64 & level)
|
||||||
T quantile(const Float64 & level)
|
|
||||||
{
|
{
|
||||||
if (array.empty())
|
if (array.empty())
|
||||||
{
|
{
|
||||||
return onEmpty<T>();
|
return onEmpty<Value>();
|
||||||
}
|
}
|
||||||
sortIfNeeded();
|
sortIfNeeded();
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ struct QuantileBfloat16Histogram
|
|||||||
|
|
||||||
Value get(Float64 level)
|
Value get(Float64 level)
|
||||||
{
|
{
|
||||||
return data.template quantile<Value>(level);
|
return data.quantile(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void getMany(const Float64 * levels, const size_t * indices, size_t size, Value * result)
|
void getMany(const Float64 * levels, const size_t * indices, size_t size, Value * result)
|
||||||
@ -53,7 +53,7 @@ struct QuantileBfloat16Histogram
|
|||||||
}
|
}
|
||||||
|
|
||||||
Float64 getFloat(Float64 level) {
|
Float64 getFloat(Float64 level) {
|
||||||
return data.template quantile<Float64>(level);
|
return data.quantile(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
void getManyFloat(const Float64 * levels, const size_t * indices, size_t size, Float64 * result)
|
void getManyFloat(const Float64 * levels, const size_t * indices, size_t size, Float64 * result)
|
||||||
|
Loading…
Reference in New Issue
Block a user