You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -469,8 +474,8 @@ class GpuProcessingTask<U>::GpuProcessingTaskImpl {
469
474
470
475
public:
471
476
472
-
GpuProcessingTaskImpl(const PixelData<ImgType> &inputImage, const APRParameters ¶meters, int maxLevel) :
473
-
cudaDevID(0), // used for now only in testing new ideas, ideally we should discover CPU/GPU architecture and assing corrct GPU to correct CPU which involves also correct memory allocation and thread affinity....
477
+
GpuProcessingTaskImpl(const PixelData<ImgType> &inputImage, const APRParameters ¶meters, int maxLevel, int gpuCudaId) :
478
+
cudaDevID(gpuCudaId), // used for now only in testing new ideas, ideally we should discover CPU/GPU architecture and assing corrct GPU to correct CPU which involves also correct memory allocation and thread affinity....
474
479
cudaerr(cudaSetDevice(cudaDevID)),
475
480
iCpuImage(inputImage),
476
481
iStream(cudaStream.get()),
@@ -574,6 +579,8 @@ public:
574
579
returnstd::move(lacs);
575
580
}
576
581
582
+
intgetCudaDeviceID() const { return cudaDevID; }
583
+
577
584
voidsendDataToGpu() {
578
585
cudaSetDevice(cudaDevID);
579
586
// Set it and copy first before copying the image
@@ -652,8 +659,8 @@ public:
652
659
};
653
660
654
661
template <typename ImgType>
655
-
GpuProcessingTask<ImgType>::GpuProcessingTask(const PixelData<ImgType> &image, const APRParameters ¶meters, int maxLevel)
0 commit comments