()
| 912 | } |
| 913 | |
| 914 | public void run() |
| 915 | { |
| 916 | //Computing Q |
| 917 | { |
| 918 | //We are computing Q' in what we are treating as the column major order, which represents Q in row major order, which is what we want! |
| 919 | for(int j = 0+threadID; j < Q.cols(); j+=LogicalCores) |
| 920 | { |
| 921 | double[] Q_j = Q.matrix[j]; |
| 922 | double y = 0;//y = vk dot A_j |
| 923 | for (int i = k; i < Q.cols(); i++) |
| 924 | y += vk[i] * Q_j[i]; |
| 925 | |
| 926 | y *= TwoOverBeta; |
| 927 | for (int i = k; i < Q.rows(); i++) |
| 928 | { |
| 929 | Q_j[i] -= y*vk[i]; |
| 930 | } |
| 931 | } |
| 932 | } |
| 933 | |
| 934 | //First run of loop removed, as it will be setting zeros. More accurate to just set them ourselves |
| 935 | if(k < N && threadID == 0) |
| 936 | { |
| 937 | qrUpdateRFirstIteration(A, k, vk, TwoOverBeta, M); |
| 938 | } |
| 939 | //The rest of the normal look |
| 940 | for(int j = k+1+threadID; j < N; j+=LogicalCores) |
| 941 | { |
| 942 | double[] A_j = A.matrix[j]; |
| 943 | double y = 0;//y = vk dot A_j |
| 944 | for(int i = k; i < A.cols(); i++) |
| 945 | y += vk[i]*A_j[i]; |
| 946 | |
| 947 | y *= TwoOverBeta; |
| 948 | for(int i = k; i < M; i++) |
| 949 | A_j[i] -= y*vk[i]; |
| 950 | } |
| 951 | latch.countDown(); |
| 952 | } |
| 953 | |
| 954 | } |
| 955 |
nothing calls this directly
no test coverage detected