Skip to content

Commit

Permalink
Fix incorrect copy cases: src==dst and UM
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale committed Nov 1, 2017
1 parent d4d79ad commit d7d0d5f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/ArrayManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,22 @@ void ArrayManager::resetTouch(PointerRecord* pointer_record) {

void ArrayManager::move(PointerRecord* record, ExecutionSpace space)
{

umpire::ResourceManager& rm = umpire::ResourceManager::getInstance();

if ( space == NONE ) {
return;
}

std::cout << "Last space: " << record->m_last_space << std::endl;
#if defined(CHAI_ENABLE_UM)
if (record->m_last_space == UM) {
return;
}
#endif

if (space == record->m_last_space) {
return;
}

void* src_pointer = record->m_pointers[record->m_last_space];
void* dst_pointer = record->m_pointers[space];

Expand Down

0 comments on commit d7d0d5f

Please sign in to comment.