diff --git a/.clang-tidy b/.clang-tidy index 820a244182d23..9680ecfd29c7f 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -186,7 +186,7 @@ modernize-use-equals-default, -modernize-use-noexcept, modernize-use-nullptr, modernize-use-override, --modernize-use-transparent-functors, +modernize-use-transparent-functors, -modernize-use-uncaught-exceptions, performance-faster-string-find, -performance-for-range-copy, @@ -197,7 +197,7 @@ performance-inefficient-string-concatenation, -performance-move-const-arg, -performance-move-constructor-init, -performance-no-automatic-move, --performance-noexcept-move-constructor, +performance-noexcept-move-constructor, -performance-trivially-destructible, -performance-type-promotion-in-math-fn, -performance-unnecessary-copy-initialization, diff --git a/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.cc b/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.cc index 72a544f9f1013..87832c33bf7fd 100644 --- a/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.cc +++ b/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.cc @@ -78,7 +78,8 @@ DistModelDataBuf& DistModelDataBuf::operator=(const DistModelDataBuf& other) { return *this; } -DistModelDataBuf& DistModelDataBuf::operator=(DistModelDataBuf&& other) { +DistModelDataBuf& DistModelDataBuf::operator=( + DistModelDataBuf&& other) noexcept { data_ = other.data_; memory_owned_ = other.memory_owned_; length_ = other.length_; @@ -88,7 +89,7 @@ DistModelDataBuf& DistModelDataBuf::operator=(DistModelDataBuf&& other) { return *this; } -DistModelDataBuf::DistModelDataBuf(DistModelDataBuf&& other) +DistModelDataBuf::DistModelDataBuf(DistModelDataBuf&& other) noexcept : data_(other.data_), length_(other.length_), memory_owned_(other.memory_owned_) { diff --git a/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.h b/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.h index 459e609762d84..ef175aa46b03d 100644 --- a/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.h +++ b/paddle/fluid/distributed/fleet_executor/dist_model_tensor_wrapper.h @@ -61,8 +61,8 @@ class DistModelDataBuf { void Resize(size_t length); DistModelDataBuf& operator=(const DistModelDataBuf& other); - DistModelDataBuf& operator=(DistModelDataBuf&& other); - DistModelDataBuf(DistModelDataBuf&& other); + DistModelDataBuf& operator=(DistModelDataBuf&& other) noexcept; + DistModelDataBuf(DistModelDataBuf&& other) noexcept; DistModelDataBuf(const DistModelDataBuf& other); private: diff --git a/paddle/fluid/framework/ir/memory_optimize_pass/eager_deletion_pass.cc b/paddle/fluid/framework/ir/memory_optimize_pass/eager_deletion_pass.cc index ef0f6dde3d7f6..b85a88eb7e0b6 100644 --- a/paddle/fluid/framework/ir/memory_optimize_pass/eager_deletion_pass.cc +++ b/paddle/fluid/framework/ir/memory_optimize_pass/eager_deletion_pass.cc @@ -70,7 +70,7 @@ static int64_t GetMemorySize( std::accumulate(dims.begin(), dims.end(), static_cast(1), - std::multiplies()); + std::multiplies()); // NOLINT } // Split all variables in the graph into phi::DenseTensor and diff --git a/paddle/fluid/framework/ir/memory_optimize_pass/memory_reuse_pass.cc b/paddle/fluid/framework/ir/memory_optimize_pass/memory_reuse_pass.cc index 520ab133b45ed..e53687d095588 100644 --- a/paddle/fluid/framework/ir/memory_optimize_pass/memory_reuse_pass.cc +++ b/paddle/fluid/framework/ir/memory_optimize_pass/memory_reuse_pass.cc @@ -121,7 +121,7 @@ int64_t MemoryReusePass::GetMemorySize(const details::VarHandle &var) const { return std::accumulate(shapes.begin(), shapes.end(), static_cast(1), - std::multiplies()) * + std::multiplies<>()) * sizeof_dtype; } diff --git a/paddle/fluid/framework/ir/mkldnn/conv_bias_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/conv_bias_mkldnn_fuse_pass.cc index bd61d58a3b2b0..b2903a1337f3f 100644 --- a/paddle/fluid/framework/ir/mkldnn/conv_bias_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/conv_bias_mkldnn_fuse_pass.cc @@ -354,8 +354,9 @@ void ConvBiasFusePass::FuseConvBias(ir::Graph* graph, "must have same shape, but they are different: %s, %s.", conv_bias_tensor->dims(), eltwise_bias_tensor->dims())); - *conv_bias_tensor = tensor_apply_eltwise( - *conv_bias_tensor, *eltwise_bias_tensor, std::plus()); + *conv_bias_tensor = tensor_apply_eltwise(*conv_bias_tensor, + *eltwise_bias_tensor, + std::plus()); // NOLINT conv->Op()->SetOutput("Output", std::vector({eltwise_out->Name()})); diff --git a/paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc b/paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc index 1e5a1c8265f15..5cf9a973061f0 100644 --- a/paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/shuffle_channel_mkldnn_detect_pass.cc @@ -141,14 +141,15 @@ void ShuffleChannelMKLDNNDetectPass::ApplyImpl(ir::Graph* graph) const { if ((reshape1_shape[i] == unk_dim_idx) && (i != 0)) { // there is no sufficient info if (!all_positive) return; - reshape1_shape[i] = std::accumulate(x_shape1.begin(), - x_shape1.end(), - static_cast(1), - std::multiplies()) / - std::accumulate(reshape1_shape.begin(), - reshape1_shape.end(), - static_cast(-1), - std::multiplies()); + reshape1_shape[i] = + std::accumulate(x_shape1.begin(), + x_shape1.end(), + static_cast(1), + std::multiplies()) / // NOLINT + std::accumulate(reshape1_shape.begin(), + reshape1_shape.end(), + static_cast(-1), + std::multiplies()); // NOLINT break; } } @@ -160,14 +161,15 @@ void ShuffleChannelMKLDNNDetectPass::ApplyImpl(ir::Graph* graph) const { if ((reshape2_shape[i] == unk_dim_idx) && (i != 0)) { // there is no sufficient info if (!all_positive) return; - reshape2_shape[i] = std::accumulate(x_shape2.begin(), - x_shape2.end(), - static_cast(1), - std::multiplies()) / - std::accumulate(reshape2_shape.begin(), - reshape2_shape.end(), - static_cast(-1), - std::multiplies()); + reshape2_shape[i] = + std::accumulate(x_shape2.begin(), + x_shape2.end(), + static_cast(1), + std::multiplies()) / // NOLINT + std::accumulate(reshape2_shape.begin(), + reshape2_shape.end(), + static_cast(-1), + std::multiplies()); // NOLINT break; } } diff --git a/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc b/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc index 1157fdd91a07c..5d38a9c536ad1 100644 --- a/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc +++ b/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc @@ -141,14 +141,15 @@ void ShuffleChannelDetectPass::ApplyImpl(ir::Graph* graph) const { if ((reshape1_shape[i] == unk_dim_idx) && (i != 0)) { // there is no sufficient info if (!all_positive) return; - reshape1_shape[i] = std::accumulate(x_shape1.begin(), - x_shape1.end(), - static_cast(1), - std::multiplies()) / - std::accumulate(reshape1_shape.begin(), - reshape1_shape.end(), - static_cast(-1), - std::multiplies()); + reshape1_shape[i] = + std::accumulate(x_shape1.begin(), + x_shape1.end(), + static_cast(1), + std::multiplies()) / // NOLINT + std::accumulate(reshape1_shape.begin(), + reshape1_shape.end(), + static_cast(-1), + std::multiplies()); // NOLINT break; } } @@ -160,14 +161,15 @@ void ShuffleChannelDetectPass::ApplyImpl(ir::Graph* graph) const { if ((reshape2_shape[i] == unk_dim_idx) && (i != 0)) { // there is no sufficient info if (!all_positive) return; - reshape2_shape[i] = std::accumulate(x_shape2.begin(), - x_shape2.end(), - static_cast(1), - std::multiplies()) / - std::accumulate(reshape2_shape.begin(), - reshape2_shape.end(), - static_cast(-1), - std::multiplies()); + reshape2_shape[i] = + std::accumulate(x_shape2.begin(), + x_shape2.end(), + static_cast(1), + std::multiplies()) / // NOLINT + std::accumulate(reshape2_shape.begin(), + reshape2_shape.end(), + static_cast(-1), + std::multiplies()); // NOLINT break; } } diff --git a/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc b/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc index 9fe1ba1f15d02..b1f7cd5c301da 100644 --- a/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc +++ b/paddle/fluid/inference/analysis/passes/memory_optimize_pass.cc @@ -97,7 +97,7 @@ void MemoryOptimizePass::CollectLifeCycle( auto var_bytes = std::accumulate(in_shape.begin(), in_shape.end(), (int64_t)1, - std::multiplies()); + std::multiplies<>()); persis_byte += paddle::framework::SizeOfType(node->Var()->GetDataType()) * var_bytes; @@ -183,8 +183,8 @@ void MemoryOptimizePass::CollectVarMemorySize( if (v < 0) v = fake_batch_size; } - int size = std::accumulate( - shape.begin(), shape.end(), 1, std::multiplies()); + int size = + std::accumulate(shape.begin(), shape.end(), 1, std::multiplies<>()); (*space_table)[node->Var()->Name()] = size * paddle::framework::SizeOfType(node->Var()->GetDataType()); } diff --git a/paddle/fluid/inference/api/api.cc b/paddle/fluid/inference/api/api.cc index 93b88632984a8..5e6ad0dd420dc 100644 --- a/paddle/fluid/inference/api/api.cc +++ b/paddle/fluid/inference/api/api.cc @@ -40,7 +40,7 @@ int PaddleDtypeSize(PaddleDType dtype) { } } -PaddleBuf::PaddleBuf(PaddleBuf &&other) +PaddleBuf::PaddleBuf(PaddleBuf &&other) noexcept : data_(other.data_), length_(other.length_), memory_owned_(other.memory_owned_) { @@ -74,7 +74,7 @@ PaddleBuf &PaddleBuf::operator=(const PaddleBuf &other) { return *this; } -PaddleBuf &PaddleBuf::operator=(PaddleBuf &&other) { +PaddleBuf &PaddleBuf::operator=(PaddleBuf &&other) noexcept { // only the buffer with external memory can be copied data_ = other.data_; length_ = other.length_; diff --git a/paddle/fluid/inference/api/paddle_api.h b/paddle/fluid/inference/api/paddle_api.h index d03c88735deef..38f86cd792585 100644 --- a/paddle/fluid/inference/api/paddle_api.h +++ b/paddle/fluid/inference/api/paddle_api.h @@ -137,9 +137,9 @@ class PD_INFER_DECL PaddleBuf { ~PaddleBuf() { Free(); } PaddleBuf& operator=(const PaddleBuf&); - PaddleBuf& operator=(PaddleBuf&&); + PaddleBuf& operator=(PaddleBuf&&) noexcept; PaddleBuf() = default; - PaddleBuf(PaddleBuf&& other); + PaddleBuf(PaddleBuf&& other) noexcept; private: void Free(); diff --git a/paddle/fluid/operators/fused/resnet_unit_op.cc b/paddle/fluid/operators/fused/resnet_unit_op.cc index 1547f20801b56..948e8fdc9491e 100644 --- a/paddle/fluid/operators/fused/resnet_unit_op.cc +++ b/paddle/fluid/operators/fused/resnet_unit_op.cc @@ -21,10 +21,11 @@ namespace operators { // Shape of bitmask static framework::DDim GetBitmaskDims(std::vector out_shape) { int c = out_shape.back(); - int64_t nhw = - std::accumulate( - out_shape.begin(), out_shape.end(), 1, std::multiplies()) / - c; + int64_t nhw = std::accumulate(out_shape.begin(), + out_shape.end(), + 1, + std::multiplies()) / // NOLINT + c; int32_t c_int32_elems = ((c + 63) & ~63) / 32; int32_t nhw_int32_elems = ((nhw + 31) & ~31); std::vector bitmask_shape = {nhw_int32_elems, c_int32_elems, 1}; diff --git a/paddle/ir/core/op_base.cc b/paddle/ir/core/op_base.cc index 7ddc948c66a2d..6f6dca0cdc125 100644 --- a/paddle/ir/core/op_base.cc +++ b/paddle/ir/core/op_base.cc @@ -18,13 +18,13 @@ InterfaceValue::~InterfaceValue() { if (model_) free(model_); } -InterfaceValue::InterfaceValue(InterfaceValue&& val) { +InterfaceValue::InterfaceValue(InterfaceValue&& val) noexcept { type_id_ = val.type_id_; model_ = val.model_; val.model_ = nullptr; } -InterfaceValue& InterfaceValue::operator=(InterfaceValue&& val) { +InterfaceValue& InterfaceValue::operator=(InterfaceValue&& val) noexcept { swap(std::move(val)); return *this; } diff --git a/paddle/ir/core/op_base.h b/paddle/ir/core/op_base.h index bfa7705e6ff4c..1b4690f9099e9 100644 --- a/paddle/ir/core/op_base.h +++ b/paddle/ir/core/op_base.h @@ -43,9 +43,9 @@ class IR_API InterfaceValue { InterfaceValue() = default; explicit InterfaceValue(TypeId type_id) : type_id_(type_id) {} InterfaceValue(const InterfaceValue &) = delete; - InterfaceValue(InterfaceValue &&); + InterfaceValue(InterfaceValue &&) noexcept; InterfaceValue &operator=(const InterfaceValue &) = delete; - InterfaceValue &operator=(InterfaceValue &&); + InterfaceValue &operator=(InterfaceValue &&) noexcept; ~InterfaceValue(); void swap(InterfaceValue &&val) { using std::swap; diff --git a/paddle/phi/api/include/tensor.h b/paddle/phi/api/include/tensor.h index afb17f62035d1..39e6258e7e86c 100644 --- a/paddle/phi/api/include/tensor.h +++ b/paddle/phi/api/include/tensor.h @@ -96,7 +96,7 @@ class PADDLE_API Tensor final { /** * @brief Construct a new Tensor object by move */ - Tensor(Tensor&&) = default; + Tensor(Tensor&&) noexcept = default; /** * @brief Construct a new Tensor object by a TensorBase pointer @@ -522,7 +522,7 @@ class PADDLE_API Tensor final { * @param x * @return Tensor& */ - Tensor& operator=(Tensor&& x) &; + Tensor& operator=(Tensor&& x) & noexcept; /** * @brief Tensor operants diff --git a/paddle/phi/api/lib/tensor.cc b/paddle/phi/api/lib/tensor.cc index c6b055acf4e88..d43ebe846fcd8 100644 --- a/paddle/phi/api/lib/tensor.cc +++ b/paddle/phi/api/lib/tensor.cc @@ -399,7 +399,7 @@ void Tensor::reset() { Tensor &Tensor::operator=(const Tensor &x) & = default; -Tensor &Tensor::operator=(Tensor &&x) & { +Tensor &Tensor::operator=(Tensor &&x) &noexcept { impl_ = std::move(x.impl_); autograd_meta_ = std::move(x.autograd_meta_); name_ = std::move(x.name_); diff --git a/paddle/phi/backends/cpu/cpu_context.cc b/paddle/phi/backends/cpu/cpu_context.cc index d42189e00eeb8..1a3ae7ae351d6 100644 --- a/paddle/phi/backends/cpu/cpu_context.cc +++ b/paddle/phi/backends/cpu/cpu_context.cc @@ -65,9 +65,9 @@ CPUContext::CPUContext(const Place& place) CPUContext::~CPUContext() = default; -CPUContext::CPUContext(CPUContext&&) = default; +CPUContext::CPUContext(CPUContext&&) = default; // NOLINT -CPUContext& CPUContext::operator=(CPUContext&&) = default; +CPUContext& CPUContext::operator=(CPUContext&&) = default; // NOLINT Eigen::DefaultDevice* CPUContext::eigen_device() const { return impl_->GetEigenDevice(); diff --git a/paddle/phi/backends/gpu/gpu_context.cc b/paddle/phi/backends/gpu/gpu_context.cc index 20b3525ba822e..d6ce3e750f65f 100644 --- a/paddle/phi/backends/gpu/gpu_context.cc +++ b/paddle/phi/backends/gpu/gpu_context.cc @@ -814,9 +814,9 @@ struct GPUContext::Impl { thread_local AttributeMap GPUContext::Impl::dnn_attrs_ = {}; -GPUContext::GPUContext(GPUContext&&) = default; +GPUContext::GPUContext(GPUContext&&) = default; // NOLINT -GPUContext& GPUContext::operator=(GPUContext&&) = default; +GPUContext& GPUContext::operator=(GPUContext&&) = default; // NOLINT GPUContext::GPUContext(const GPUPlace& place, bool init, int stream_priority) : DeviceContext(), impl_(std::make_unique(place)) { diff --git a/paddle/phi/core/dense_tensor.cc b/paddle/phi/core/dense_tensor.cc index 89f422cfdf406..20b1da1efe39d 100644 --- a/paddle/phi/core/dense_tensor.cc +++ b/paddle/phi/core/dense_tensor.cc @@ -79,7 +79,7 @@ DenseTensor& DenseTensor::operator=(const DenseTensor& other) { return *this; } -DenseTensor& DenseTensor::operator=(DenseTensor&& other) { +DenseTensor& DenseTensor::operator=(DenseTensor&& other) noexcept { meta_ = std::move(other.meta_); std::swap(holder_, other.holder_); storage_properties_ = std::move(other.storage_properties_); diff --git a/paddle/phi/core/dense_tensor.h b/paddle/phi/core/dense_tensor.h index 6b028fda6c432..cf5803852a1fe 100644 --- a/paddle/phi/core/dense_tensor.h +++ b/paddle/phi/core/dense_tensor.h @@ -69,7 +69,7 @@ class DenseTensor : public TensorBase, /// \brief DenseTensor shallow copy assignment. DenseTensor& operator=(const DenseTensor& other); - DenseTensor& operator=(DenseTensor&& other); + DenseTensor& operator=(DenseTensor&& other) noexcept; DenseTensor(); diff --git a/paddle/phi/core/device_context.cc b/paddle/phi/core/device_context.cc index 1715c0965a799..7f636cd2a4831 100644 --- a/paddle/phi/core/device_context.cc +++ b/paddle/phi/core/device_context.cc @@ -312,12 +312,12 @@ DeviceContext::DeviceContext(const DeviceContext& other) { #endif } -DeviceContext::DeviceContext(DeviceContext&& other) { +DeviceContext::DeviceContext(DeviceContext&& other) noexcept { impl_ = std::move(other.impl_); } -DeviceContext& DeviceContext::operator=(DeviceContext&& other) = default; - +DeviceContext& DeviceContext::operator=(DeviceContext&& other) noexcept = + default; DeviceContext::~DeviceContext() = default; void DeviceContext::SetAllocator(const Allocator* allocator) { diff --git a/paddle/phi/core/device_context.h b/paddle/phi/core/device_context.h index b670392551799..e0d555fe01b3e 100644 --- a/paddle/phi/core/device_context.h +++ b/paddle/phi/core/device_context.h @@ -48,12 +48,12 @@ class PADDLE_API DeviceContext { /** * @brief Move construct. */ - DeviceContext(DeviceContext&&); + DeviceContext(DeviceContext&&) noexcept; /** * @brief Move assign operator. */ - DeviceContext& operator=(DeviceContext&&); + DeviceContext& operator=(DeviceContext&&) noexcept; /** * @brief Default destruct. diff --git a/paddle/phi/core/sparse_coo_tensor.cc b/paddle/phi/core/sparse_coo_tensor.cc index 4d34c8f1d7336..f8517fb0ff007 100644 --- a/paddle/phi/core/sparse_coo_tensor.cc +++ b/paddle/phi/core/sparse_coo_tensor.cc @@ -21,7 +21,7 @@ SparseCooTensor::SparseCooTensor() { this->SetMember(non_zero_indices, non_zero_elements, {1}, true); } -SparseCooTensor::SparseCooTensor(SparseCooTensor&& other) { // NOLINT +SparseCooTensor::SparseCooTensor(SparseCooTensor&& other) noexcept { this->non_zero_elements_ = other.non_zero_elements_; this->non_zero_indices_ = other.non_zero_indices_; this->coalesced_ = other.coalesced_; diff --git a/paddle/phi/core/sparse_coo_tensor.h b/paddle/phi/core/sparse_coo_tensor.h index 48b001cbf1620..d0759bedcf557 100644 --- a/paddle/phi/core/sparse_coo_tensor.h +++ b/paddle/phi/core/sparse_coo_tensor.h @@ -55,7 +55,7 @@ class SparseCooTensor : public TensorBase, SparseCooTensor(const SparseCooTensor& other); /// \brief move constructor - SparseCooTensor(SparseCooTensor&& other); + SparseCooTensor(SparseCooTensor&& other) noexcept; /// \brief SparseCooTensor shallow copy assignment. SparseCooTensor& operator=(const SparseCooTensor& other); diff --git a/paddle/phi/core/string_tensor.cc b/paddle/phi/core/string_tensor.cc index 29af747c55ed9..35c59c2d8d787 100644 --- a/paddle/phi/core/string_tensor.cc +++ b/paddle/phi/core/string_tensor.cc @@ -49,7 +49,7 @@ StringTensor& StringTensor::operator=(const StringTensor& other) { return *this; } -StringTensor& StringTensor::operator=(StringTensor&& other) { // NOLINT +StringTensor& StringTensor::operator=(StringTensor&& other) noexcept { meta_ = std::move(other.meta_); std::swap(holder_, other.holder_); return *this; diff --git a/paddle/phi/core/string_tensor.h b/paddle/phi/core/string_tensor.h index ccf89d88e4283..4fecd83d557cf 100644 --- a/paddle/phi/core/string_tensor.h +++ b/paddle/phi/core/string_tensor.h @@ -56,7 +56,7 @@ class StringTensor : public TensorBase, /// \brief StringTensor shallow copy assignment. StringTensor& operator=(const StringTensor& other); - StringTensor& operator=(StringTensor&& other); + StringTensor& operator=(StringTensor&& other) noexcept; /// \brief Destroy the tensor object and release exclusive resources. virtual ~StringTensor() = default; diff --git a/paddle/phi/kernels/cpu/class_center_sample_kernel.cc b/paddle/phi/kernels/cpu/class_center_sample_kernel.cc index 5693c5da72baa..d70a11c2cf185 100644 --- a/paddle/phi/kernels/cpu/class_center_sample_kernel.cc +++ b/paddle/phi/kernels/cpu/class_center_sample_kernel.cc @@ -63,7 +63,7 @@ void ClassCenterSampleKernel(const Context& dev_ctx, auto* label_ptr = label.data(); // get unique positive class center by ascending - std::set> unique_label; + std::set> unique_label; // NOLINT for (int64_t i = 0; i < numel; ++i) { unique_label.insert(label_ptr[i]); } diff --git a/paddle/phi/kernels/cpu/weighted_sample_neighbors_kernel.cc b/paddle/phi/kernels/cpu/weighted_sample_neighbors_kernel.cc index 713aad7332d63..f72f98f5cf5bd 100644 --- a/paddle/phi/kernels/cpu/weighted_sample_neighbors_kernel.cc +++ b/paddle/phi/kernels/cpu/weighted_sample_neighbors_kernel.cc @@ -63,7 +63,7 @@ void SampleWeightedNeighbors( bool return_eids) { std::priority_queue, std::vector>, - std::greater>> + std::greater>> // NOLINT min_heap; for (size_t i = 0; i < out_src.size(); i++) { float weight_key = log2(dice_distribution(rng)) * (1 / out_weight[i]);