@@ -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