double* pProcRows;
double* pProcResult;
int RowNum;
double Start, Finish, Duration;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &ProcNum);
MPI_Comm_rank(MPI_COMM_WORLD, &ProcRank);
// Xotirani ajratish va dastlabki ma’lumotlarni initsializatsiyalash
ProcessInitialization(pMatrix, pVector, pResult, pProcRows,
pProcResult, Size, RowNum);
// Jarayonlar oʻrtasida manba ma’lumotlarini taqsimlash
DataDistribution(pMatrix, pProcRows, pVector, Size, RowNum);
// Matritsa-vektorni koʻpaytirishning parallel bajarilishi
ParallelResultCalculation(pProcRows, pVector, pProcResult,
Size, RowNum);
// Barcha jarayonlar boʻyicha olingan vektorni yigʻish
Do'stlaringiz bilan baham: |