Skip to content

Commit

Permalink
fix cuda test
Browse files Browse the repository at this point in the history
  • Loading branch information
montythind committed Oct 2, 2024
1 parent 03a8105 commit 0904e97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/cuda/solver/test_cuda_rosenbrock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void testNormalizedErrorConst()
y_new.CopyToDevice();
errors.CopyToDevice();

double error = gpu_solver.solver_.NormalizedError(y_old, y_new, errors, state);
double error = gpu_solver.solver_.NormalizedError(y_old, y_new, errors);

auto expected_error = 0.0;
for (size_t i = 0; i < state.state_size_; ++i)
Expand Down Expand Up @@ -192,7 +192,7 @@ void testNormalizedErrorDiff()
y_new.CopyToDevice();
errors.CopyToDevice();

double computed_error = gpu_solver.solver_.NormalizedError(y_old, y_new, errors, state);
double computed_error = gpu_solver.solver_.NormalizedError(y_old, y_new, errors);

auto relative_error =
std::abs(computed_error - expected_error) / std::max(std::abs(computed_error), std::abs(expected_error));
Expand Down

0 comments on commit 0904e97

Please sign in to comment.