Small code simplication
This commit is contained in:
parent
7d9ababee5
commit
7456ae8bc5
@ -112,10 +112,7 @@ class ReduceTest : public ClientLibraryTestBase {
|
|||||||
std::unique_ptr<GlobalData> input_global_data =
|
std::unique_ptr<GlobalData> input_global_data =
|
||||||
client_->TransferToServer(input_literal).ConsumeValueOrDie();
|
client_->TransferToServer(input_literal).ConsumeValueOrDie();
|
||||||
|
|
||||||
float expected = 0.0;
|
float expected = absl::c_accumulate(input_data, 0.0f);
|
||||||
for (float item : input_data) {
|
|
||||||
expected += item;
|
|
||||||
}
|
|
||||||
ComputeAndCompareR0<float>(&builder, expected, {input_global_data.get()},
|
ComputeAndCompareR0<float>(&builder, expected, {input_global_data.get()},
|
||||||
ErrorSpec(0.001));
|
ErrorSpec(0.001));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user