#include using std::cin;
using std::cout;
using std::endl;
struct matrixArgs
{
int *pMatrixLineA;
int *pMatrixLineB;
int *pResult;
int matrixLineCount;
};
void *calculate(void *arg)
{
matrixArgs *args = (matrixArgs*) arg;
*(args->pResult) = 0;
for (int i = 0; i < args->matrixLineCount; i++)
{
*(args->pResult) += (*(args->pMatrixLineA + i))
* (*(args->pMatrixLineB + i));
}
pthread_exit(NULL);
}
int main()
{
cout<>i[j]))
{
cin.clear();
while (cin.get() != '\n') continue;
cout<>(*(pMatrixA + j))))
{
cin.clear();
while (cin.get() != '\n') continue;
cout<>(*(pMatrixB + (j / i[2] + (j % i[2]) * i[0])))))
{
cin.clear();
while (cin.get() != '\n') continue;
cout
pMatrixArgsCurrent->pMatrixLineA = pMatrixA + (j * i[0]);
pMatrixArgsCurrent->pMatrixLineB = pMatrixB + (k * i[0]);
pMatrixArgsCurrent->pResult = pMatrixResult + (j * i[2] + k);
rc = pthread_create(pPthread + (j * i[2] + k),
&attr,
calculate,
(void*) pMatrixArgsCurrent);
if (rc)
{
cout<