HPC Magazine March 2014 - An Introduction to Performance Programming - part II.

Listing 1 - Example of array of pointers.


void matrix_sum_aop(int n, double** A, double** B) {
  for (int i = 0 ; i < n ; i++) {
    for (int j = 0 ; j < n ; j++) {
      A[i][j] += B[i][j];
    }
  }
}