No public description PiperOrigin-RevId: 599743132
diff --git a/sim/test/BUILD b/sim/test/BUILD index b634ef2..e5d1b57 100644 --- a/sim/test/BUILD +++ b/sim/test/BUILD
@@ -136,6 +136,7 @@ "//sim:kelvin_instructions", "@com_google_absl//absl/functional:bind_front", "@com_google_absl//absl/strings", + "@com_google_absl//absl/types:span", "@com_google_googletest//:gtest_main", "@com_google_mpact-sim//mpact/sim/generic:instruction", ],
diff --git a/sim/test/kelvin_vector_instructions_test.cc b/sim/test/kelvin_vector_instructions_test.cc index 957187d..55c58a3 100644 --- a/sim/test/kelvin_vector_instructions_test.cc +++ b/sim/test/kelvin_vector_instructions_test.cc
@@ -29,6 +29,7 @@ #include "absl/functional/bind_front.h" #include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" +#include "absl/types/span.h" #include "mpact/sim/generic/instruction.h" // This file contains the tests for testing kelvin vector binary instructions. @@ -1517,8 +1518,8 @@ static std::pair<T, T> SlidepArgsGetter( bool horizontal, int index, int num_ops, int op_num, int dest_reg_sub_index, int element_index, int vd_size, bool widen_dst, int src1_widen_factor, - int vs1_size, const std::vector<T> &vs1_value, int vs2_size, bool s2_scalar, - const std::vector<T> &vs2_value, T rs2_value, bool halftype_op, + int vs1_size, absl::Span<const T> vs1_value, int vs2_size, bool s2_scalar, + absl::Span<const T> vs2_value, T rs2_value, bool halftype_op, bool vmvp_op) { assert(!s2_scalar && !halftype_op && !vmvp_op && dest_reg_sub_index == 0);
diff --git a/sim/test/kelvin_vector_instructions_test_base.h b/sim/test/kelvin_vector_instructions_test_base.h index 5e90c8c..1e874c3 100644 --- a/sim/test/kelvin_vector_instructions_test_base.h +++ b/sim/test/kelvin_vector_instructions_test_base.h
@@ -406,7 +406,7 @@ // value. template <typename T> void SetVectorRegisterValues( - const std::vector<std::tuple<std::string, Span<const T>>> &values) { + absl::Span<const std::tuple<std::string, Span<const T>>> values) { for (auto &[vreg_name, span] : values) { auto *vreg = state_->GetRegister<RVVectorRegister>(vreg_name).first; auto *db = state_->db_factory()->MakeCopyOf(vreg->data_buffer()); @@ -419,7 +419,7 @@ // Set the named registers to their corresponding value. template <typename T, typename RegisterType = RV32Register> void SetRegisterValues( - const std::vector<std::tuple<std::string, const T>> &values) { + absl::Span<const std::tuple<std::string, const T>> values) { for (auto &[reg_name, value] : values) { auto *reg = state_->GetRegister<RegisterType>(reg_name).first; auto *db = @@ -449,9 +449,9 @@ // named in the two vectors and appends them to the given instruction. void AppendVectorRegisterOperands(Instruction *inst, const uint32_t num_ops, int src1_widen_factor, int src1_reg, - const std::vector<int> &other_sources, + absl::Span<const int> other_sources, bool widen_dst, - const std::vector<int> &destinations) { + absl::Span<const int> destinations) { { std::vector<RegisterBase *> reg_vec; auto regs_count = src1_widen_factor * num_ops;