fix logic

This commit is contained in:
redclusive 2021-04-15 20:07:14 +03:00
parent d8af0c5a23
commit 8737c533c0
2 changed files with 4 additions and 5 deletions

View File

@ -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();

View File

@ -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)