Skip to content
Snippets Groups Projects
Commit 8831bce1 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed Partitioner::getOwner

parent 42e9ee46
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ public:
__cuda_callable__
static int getOwner( Index i, Index globalSize, int partitions )
{
return i * partitions / globalSize;
return min( partitions - 1, i / (globalSize / partitions) );
}
// Gets the offset of data for given rank.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment