Skip to content

Commit 2e36d52

Browse files
committed
Fix incorrect usage of constexpr and redundant const casts
Replaced `constexpr` with `const` for `kCount` in the performance test to align with proper usage. Removed the unnecessary `const` cast in the functional test for cleaner and more accurate type handling.
1 parent 1579663 commit 2e36d52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tasks/example/tests/functional/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class NesterovARunFuncTests : public ppc::util::BaseRunFuncTests<InType, OutType
4444
}
4545

4646
TestType params = std::get<ppc::util::GTestParamIndex::kTestParams>(GetParam());
47-
const auto k_count = static_cast<const std::vector<int>::size_type>(((width + height) / std::get<0>(params)) *
47+
const auto k_count = static_cast<std::vector<int>::size_type>(((width + height) / std::get<0>(params)) *
4848
std::stoi(std::get<1>(params)));
4949
input_data_ = InType(k_count * k_count, 0);
5050
for (std::vector<int>::size_type i = 0; i < k_count; i++) {

tasks/example/tests/performance/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
namespace nesterov_a_test_task {
2020

2121
class ExampleRunPerfTest : public ppc::util::BaseRunPerfTests<InType, OutType> {
22-
static constexpr std::vector<int>::size_type kCount = 400;
22+
const std::vector<int>::size_type kCount = 400;
2323
InType input_data_;
2424

2525
void SetUp() override {

0 commit comments

Comments
 (0)