diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2023-04-25 10:02:00 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2023-04-25 10:02:00 +0000 |
commit | 438040b0d0fe3eda6ef425d9dc0857c56a77d4d2 (patch) | |
tree | 47b343d9f635f5694734e3d615b32239f5570bfb /searchcore | |
parent | a286bc2846a5af4001559acfb6a4c1d9d4a9209b (diff) |
Avoid old style cast
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/shared_threading_service_config.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/shared_threading_service_config.cpp b/searchcore/src/vespa/searchcore/proton/server/shared_threading_service_config.cpp index 9530b638ee2..c1802b40deb 100644 --- a/searchcore/src/vespa/searchcore/proton/server/shared_threading_service_config.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/shared_threading_service_config.cpp @@ -28,7 +28,7 @@ namespace { uint32_t derive_shared_threads(const ProtonConfig& cfg, const HwInfo::Cpu& cpu_info) { - uint32_t scaled_cores = (uint32_t)std::ceil(cpu_info.cores() * cfg.feeding.concurrency); + uint32_t scaled_cores = uint32_t(std::ceil(cpu_info.cores() * cfg.feeding.concurrency)); // We need at least 1 guaranteed free worker in order to ensure progress. return std::max(scaled_cores, uint32_t(cfg.flush.maxconcurrent + 1u)); @@ -42,8 +42,8 @@ derive_warmup_threads(const HwInfo::Cpu& cpu_info) { uint32_t derive_field_writer_threads(const ProtonConfig& cfg, const HwInfo::Cpu& cpu_info) { - uint32_t scaled_cores = (size_t)std::ceil(cpu_info.cores() * cfg.feeding.concurrency); - uint32_t field_writer_threads = std::max(scaled_cores, (uint32_t)cfg.indexing.threads); + uint32_t scaled_cores = size_t(std::ceil(cpu_info.cores() * cfg.feeding.concurrency)); + uint32_t field_writer_threads = std::max(scaled_cores, uint32_t(cfg.indexing.threads)); // Originally we used at least 3 threads for writing fields: // - index field inverter // - index field writer |