Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.

Commit ad7b89e

Browse files
Fix TEST_CASE("Test spir_sve_result_from_matrix", "[cinterface]")
1 parent 5a9d7d7 commit ad7b89e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

capi_test/cinterface_core.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -542,18 +542,18 @@ TEST_CASE("Test spir_sve_result_from_matrix", "[cinterface]")
542542
// Get Gauss points and weights
543543
// Note: n_segments_x and n_segments_y are the number of boundary points (n_segments + 1),
544544
// but spir_gauss_legendre_rule_piecewise_double expects the number of segments (n_segments)
545-
int nx = n_gauss * (n_segments_x - 1); // n_segments_x - 1 is the number of segments
546-
int ny = n_gauss * (n_segments_y - 1); // n_segments_y - 1 is the number of segments
545+
int nx = n_gauss * n_segments_x; // n_segments_x is the number of segments
546+
int ny = n_gauss * n_segments_y; // n_segments_y is the number of segments
547547
std::vector<double> x(nx), w_x(nx);
548548
std::vector<double> y(ny), w_y(ny);
549549

550550
int status_gauss;
551551
status_gauss = spir_gauss_legendre_rule_piecewise_double(
552-
n_gauss, segments_x.data(), n_segments_x - 1, x.data(), w_x.data(), &status_gauss); // n_segments_x - 1 is the number of segments
552+
n_gauss, segments_x.data(), n_segments_x, x.data(), w_x.data(), &status_gauss); // n_segments_x - 1 is the number of segments
553553
REQUIRE(status_gauss == SPIR_COMPUTATION_SUCCESS);
554554

555555
status_gauss = spir_gauss_legendre_rule_piecewise_double(
556-
n_gauss, segments_y.data(), n_segments_y - 1, y.data(), w_y.data(), &status_gauss); // n_segments_y - 1 is the number of segments
556+
n_gauss, segments_y.data(), n_segments_y, y.data(), w_y.data(), &status_gauss); // n_segments_y - 1 is the number of segments
557557
REQUIRE(status_gauss == SPIR_COMPUTATION_SUCCESS);
558558

559559
// Create a simple test kernel matrix

0 commit comments

Comments
 (0)