diff --git a/kalyshev_yan_lab_6/README.md b/kalyshev_yan_lab_6/README.md index d1291ec..c5c8d57 100644 --- a/kalyshev_yan_lab_6/README.md +++ b/kalyshev_yan_lab_6/README.md @@ -18,3 +18,5 @@ ``` docker compose up -d ``` + +Видео можно посмотреть по ссылке: [видео](https://zyzf.space/s/CjaXNQDkoPp9GzC). diff --git a/kalyshev_yan_lab_6/images/result.png b/kalyshev_yan_lab_6/images/result.png index c692309..124468c 100644 Binary files a/kalyshev_yan_lab_6/images/result.png and b/kalyshev_yan_lab_6/images/result.png differ diff --git a/kalyshev_yan_lab_6/main.py b/kalyshev_yan_lab_6/main.py index 23df401..ac42cb4 100644 --- a/kalyshev_yan_lab_6/main.py +++ b/kalyshev_yan_lab_6/main.py @@ -26,11 +26,6 @@ def determinant(matrix): return det -# Пример использования -A = np.random.rand(100, 100) -print(determinant(A)) - - def _determinant_parallel_chunk(args): matrix, start_row, end_row = args n = matrix.shape[0] @@ -69,12 +64,8 @@ def determinant_parallel(matrix, num_processes=None): return det -# Пример использования -A = np.random.rand(100, 100) -print(determinant_parallel(A, num_processes=4)) - sizes = [100, 300, 500] -num_processes = 12 +NUM_PROCESSES = 12 for size in sizes: A = np.random.rand(size, size) @@ -83,7 +74,7 @@ for size in sizes: seq_time = time.time() - start_time start_time = time.time() - det_par = determinant_parallel(A, num_processes=num_processes) + det_par = determinant_parallel(A, num_processes=NUM_PROCESSES) par_time = time.time() - start_time print(