Skip to content

Commit 18d1cff

Browse files
committed
cuda: Fix wrong write combined flag
The buffer sent to CUDA needs write combined flag. The buffer send to the user does not need this. This flag made Registration::apply() very slow in its memory read.
1 parent 3f994b1 commit 18d1cff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cuda_depth_packet_processor.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ private:
535535
bool allocate_cuda(Buffer *b, size_t size)
536536
{
537537
unsigned int flags = cudaHostAllocPortable;
538-
if (!input)
538+
if (input)
539539
flags |= cudaHostAllocWriteCombined;
540540
CHECK_CUDA(cudaHostAlloc(&b->data, size, flags));
541541
b->length = 0;

0 commit comments

Comments
 (0)