Good to know

Generali

MPI

2.7 How would you sum up two matrices using MPI? 🔴

OpenMP

2.4 How does scheduling work in OpenMP? 🔴

2.5 Parallelize a loop which performs the element-wise product of two arrays with OpenMP 🔴

2.6 Parallelize the following for cycles: 🔴

for(int i = 2; i < N; i++) {
  A[i] = A[i - 2] + A[i] * 0.5; 
}
 
//-------------------------------
 
for(int i = 1; i < N; i++) {
  for(int j = 1; j < M; j++) {
  	d[i][j] = d[i][j-1] + d[i-1][j-1] + d[i-1][j];
  }
}

CUDA

3.6 Write a CUDA kernel that computes the product between two matrices

int temp;
out[n][m];

for i in 0..n:
	for j in 0..m:
		temp += m1[i][j] * m2[j][i]
	
		out[i][j] = temp		
	

3.7 What does it mean that memory accesses are coalesced? 🔴

3.8 What is the more convenient on GPU, Array of Structs or Struct of Arrays? 🔴