2 3 4 9
Vektorni matritsaga gorizantal lenta(satr) bo’ylab ko’paytiruvchi C++ tilidagi
funksiya quyidagichabbo’ladi:
ParallelResultCalculation(double* pMatrix, double* pVector, double*
pResult, intSize)
{
int i, j;
#pragma omp paralell for private (j)
for (i=0; i
{ for (j=0; j
pResult[i] +=pMatrix[i*Size+j]*pVector[j];
}
}
Vektorni matritsaga vertikal lenta (ustun) bo’ylab ko’paytiruvchi C++ tilidagi
funksiya quyidagicha bo’ladi:
ParallelResultCalculation(double* pMatrix, double* pVector, double* pResult,
Dostları ilə paylaş: