From afd9e90a38c561440253af50486306fd8c16829d Mon Sep 17 00:00:00 2001 From: Krzysztof Rudnicki Date: Thu, 5 Dec 2024 20:24:53 +0100 Subject: [PATCH] feat: add distributed arrays to processing type --- code/tests.py | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/code/tests.py b/code/tests.py index 45b8f508..f01f1e66 100644 --- a/code/tests.py +++ b/code/tests.py @@ -26,9 +26,30 @@ def calcualte_norm_from_matrix_numpy(A, n): def solution_lib(A, b): return np.linalg.solve(A, b) -@pytest.mark.parametrize("n", [2, 5, 10, 50, 100, 300, 500, 750, 1000, 5000, 10000]) -@pytest.mark.parametrize("processing_type", [ProcessingType.SEQUENTIAL, ProcessingType.THREADS, ProcessingType.PROCESSES]) -@pytest.mark.parametrize("matrix_type", ["spd", "nemeth12", "poli3"]) +@pytest.mark.parametrize("n", [ + 2, + 5, + 10, + 50, + 100, + 300, + 500, + 750, + 1000, + 5000, + 10000 + ]) +@pytest.mark.parametrize("processing_type", [ + ProcessingType.SEQUENTIAL, + ProcessingType.THREADS, + ProcessingType.PROCESSES, + ProcessingType.DISTRIBUTED_ARRAYS + ]) +@pytest.mark.parametrize("matrix_type", [ + "spd", + "nemeth12", + "poli3" + ]) def test_richardson_vs_cg(n: int, processing_type: ProcessingType, matrix_type: str, capsys): print("matrix type: ", matrix_type) print("matrix size: ", n if matrix_type == "spd" else "fixed")