Skip to main content
. 2018 Apr 20;7(2):11. doi: 10.3390/ht7020011
Algorithm 1 Extracting ordered upper triangle part of correlation matrix
Input:N×N correlation matrix S
Output: Ordered correlation array C of size N(N1)/2
 1: idx=blockDim.xblockIdx.x+threadIdx.x
 2: i=idx/N
 3: j=idx%N
 4: if i<j and i<N and j<N then
 5:  k1=i×Ni×(i+1)2+ji
 6:  k2=j×N+i
 7:  C[k11]=S[k2]
 8: end if