Skip to main content
. 2018 Apr 20;7(2):11. doi: 10.3390/ht7020011
Algorithm 3 Fast-GPU-PCC
Input:N×M matrix U of time series data
Output: Correlation array C of size N(N1)/2
1: Preprocess the fMRI data using Equation (3)
2: Copy normalized data to GPU global memory
3: B=X/2N
4: if B>N then
5:   Multiply matrix U to its transpose UT
6:   Extract upper triangle part of the matrix using Algorithm 1
7:   Transfer the correlation array to CPU
8: else
9:   i=0, N=N
10:   while i<N do
11:     Multiply rows i to i+B of matrix U to columns i to N of UT
12:     Extract the upper triangle part of correlation matrix using Algorithm 2
13:     Transfer the extracted correlations to CPU
14:     i=i+B
15:     N=NB
16:     B=X/2N
17:     if B>N then
18:       B=N
19:     end if
20:   end while
21: end if