Skip to content

Commit

Permalink
Fix issue #110
Browse files Browse the repository at this point in the history
  • Loading branch information
crtrott committed Oct 26, 2017
1 parent 57efa08 commit e95db26
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/batched/KokkosBatched_LU_Team_Internal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace KokkosBatched {
// inv_alpha11 = 1.0/A(p,p),
alpha11 = A[p*as0+p*as1],
*__restrict__ a12t = A+(p )*as0+(p+1)*as1;

ValueType
*__restrict__ a21 = A+(p+1)*as0+(p )*as1,
*__restrict__ A22 = A+(p+1)*as0+(p+1)*as1;
Expand Down Expand Up @@ -102,15 +102,17 @@ namespace KokkosBatched {
ValueType *__restrict__ AA) {
const int tsize = member.team_size();
const int mb = mbAlgo;
const int nb = ((jb-mb) + (ib-mb))/tsize + ((jb-mb) + (ib-mb))%tsize > 0;
const int nb = ((jb-mb) + (ib-mb)) > 0?
((jb-mb) + (ib-mb))/tsize + (((jb-mb) + (ib-mb))%tsize > 0):
1;
const int kb = ib < jb ? ib : jb;

for (int p=0;p<kb;p+=mb) {
const int pb = (p+mb) > kb ? (kb-p) : mb;

// diagonal block
ValueType *__restrict__ Ap = AA+p*as0+p*as1;

// lu on a block
member.team_barrier();
if (member.team_rank() == 0)
Expand Down

0 comments on commit e95db26

Please sign in to comment.