Skip to content

Commit cc563ac

Browse files
committed
Move image data to host, not default device, when getting a raw pointer to data and device is not specified.
1 parent 4246af2 commit cc563ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/FAST/Data/Image.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ Image::Image(
507507
// 2D
508508
init(size.x(), size.y(), type, nrOfChannels);
509509
}
510-
copyData(DeviceManager::getInstance()->getDefaultDevice(), data);
510+
copyData(Host::getInstance(), data);
511511
}
512512

513513

@@ -563,7 +563,7 @@ Image::Image(
563563
const void* const data) : Image() {
564564

565565
init(width, height, depth, type, nrOfChannels);
566-
copyData(DeviceManager::getInstance()->getDefaultDevice(), data);
566+
copyData(Host::getInstance(), data);
567567
}
568568

569569
Image::Image(
@@ -625,7 +625,7 @@ Image::Image(
625625
const void* const data) : Image() {
626626

627627
init(width, height, type, nrOfChannels);
628-
copyData(DeviceManager::getInstance()->getDefaultDevice(), data);
628+
copyData(Host::getInstance(), data);
629629
}
630630

631631
void Image::copyData(ExecutionDevice::pointer device, const void* const data) {

0 commit comments

Comments
 (0)