From 4dcb9a220193354e4a581297422bbf0fedc87c58 Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Fri, 31 Mar 2023 03:04:13 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 520875109 --- mediapipe/framework/test_calculators.cc | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/mediapipe/framework/test_calculators.cc b/mediapipe/framework/test_calculators.cc index 3b6602978..6cb300855 100644 --- a/mediapipe/framework/test_calculators.cc +++ b/mediapipe/framework/test_calculators.cc @@ -79,8 +79,8 @@ class IntSplitterPacketGenerator : public PacketGenerator { const PacketGeneratorOptions& extendable_options, // PacketTypeSet* input_side_packets, // PacketTypeSet* output_side_packets) { - input_side_packets->Index(0).Set(); - output_side_packets->Index(0).Set>(); + input_side_packets->Index(0).Set(); + output_side_packets->Index(0).Set>(); return absl::OkStatus(); } @@ -88,11 +88,11 @@ class IntSplitterPacketGenerator : public PacketGenerator { const PacketGeneratorOptions& extendable_options, // const PacketSet& input_side_packets, // PacketSet* output_side_packets) { - uint64 value = input_side_packets.Index(0).Get(); - uint32 high = value >> 32; - uint32 low = value & 0xFFFFFFFF; + uint64_t value = input_side_packets.Index(0).Get(); + uint32_t high = value >> 32; + uint32_t low = value & 0xFFFFFFFF; output_side_packets->Index(0) = - Adopt(new std::pair(high, low)); + Adopt(new std::pair(high, low)); return absl::OkStatus(); } }; @@ -107,10 +107,10 @@ class TaggedIntSplitterPacketGenerator : public PacketGenerator { const PacketGeneratorOptions& extendable_options, // PacketTypeSet* input_side_packets, // PacketTypeSet* output_side_packets) { - input_side_packets->Index(0).Set(); - output_side_packets->Tag(kHighTag).Set(); - output_side_packets->Tag(kLowTag).Set(); - output_side_packets->Tag(kPairTag).Set>(); + input_side_packets->Index(0).Set(); + output_side_packets->Tag(kHighTag).Set(); + output_side_packets->Tag(kLowTag).Set(); + output_side_packets->Tag(kPairTag).Set>(); return absl::OkStatus(); } @@ -118,13 +118,13 @@ class TaggedIntSplitterPacketGenerator : public PacketGenerator { const PacketGeneratorOptions& extendable_options, // const PacketSet& input_side_packets, // PacketSet* output_side_packets) { - uint64 value = input_side_packets.Index(0).Get(); - uint32 high = value >> 32; - uint32 low = value & 0xFFFFFFFF; - output_side_packets->Tag(kHighTag) = Adopt(new uint32(high)); - output_side_packets->Tag(kLowTag) = Adopt(new uint32(low)); + uint64_t value = input_side_packets.Index(0).Get(); + uint32_t high = value >> 32; + uint32_t low = value & 0xFFFFFFFF; + output_side_packets->Tag(kHighTag) = Adopt(new uint32_t(high)); + output_side_packets->Tag(kLowTag) = Adopt(new uint32_t(low)); output_side_packets->Tag(kPairTag) = - Adopt(new std::pair(high, low)); + Adopt(new std::pair(high, low)); return absl::OkStatus(); } }; @@ -146,7 +146,7 @@ class RangeCalculator : public CalculatorBase { cc->Outputs().Index(0).Set(); cc->Outputs().Index(1).Set(); cc->Outputs().Index(2).Set(); - cc->InputSidePackets().Index(0).Set>(); + cc->InputSidePackets().Index(0).Set>(); return absl::OkStatus(); } @@ -207,7 +207,7 @@ class RangeCalculator : public CalculatorBase { cc->Options(); // Ensure Options() can be called here. std::tie(n_, k_) = - cc->InputSidePackets().Index(0).Get>(); + cc->InputSidePackets().Index(0).Get>(); index_ = 0; total_ = 0; @@ -488,7 +488,7 @@ class MeanAndCovarianceCalculator : public CalculatorBase { private: Eigen::VectorXd sum_vector_; Eigen::MatrixXd outer_product_sum_; - int64 num_samples_; + int64_t num_samples_; int rows_; }; REGISTER_CALCULATOR(MeanAndCovarianceCalculator);