-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove uses of ManagedArray::getActiveBasePointer #312
Conversation
if (size > 1) { | ||
// Bounds checking is only available with the resource manager because the ManagedArray::size() is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer true - ManagedArray::size() always works now.
bool warned = false; | ||
|
||
if (dataSize < size) { | ||
const char* dataName = CHAICallback::getName(dataRecord); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name isn't that important now that we have a backtrace.
warned = true; | ||
} | ||
|
||
if (!inPlace) { | ||
const chai::PointerRecord* outDataRecord = chai::ArrayManager::getInstance()->getPointerRecord((void *)outData.data(chai::ExecutionSpace::CPU, false)); | ||
int outDataSize = dataRecord->m_size/sizeof(T); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also note that outDataSize was actually wrong (it should have been pulled from outDataRecord).
ManagedArray::getActiveBasePointer will be removed from CHAI soon, so preparing for that update.