From 92cbfd81199208f79d1644469c1514fe91ba0e2e Mon Sep 17 00:00:00 2001
From: Kenneth Moreland <morelandkd@ornl.gov>
Date: Fri, 17 Apr 2026 15:34:17 -0400
Subject: [PATCH] Fix issues when compiling with Cuda 13.2

Header files for thrust components like distance and pair need
to be explicitly included.
---
 viskores/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h | 2 ++
 viskores/exec/cuda/internal/ExecutionPolicy.h            | 1 +
 2 files changed, 3 insertions(+)

diff --git a/viskores/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h b/viskores/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h
index 121b866829..aa9f672e0a 100644
--- a/viskores/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h
+++ b/viskores/cont/cuda/internal/DeviceAdapterAlgorithmCuda.h
@@ -57,7 +57,9 @@ VISKORES_THIRDPARTY_PRE_INCLUDE
 #include <thrust/binary_search.h>
 #include <thrust/copy.h>
 #include <thrust/count.h>
+#include <thrust/distance.h>
 #include <thrust/iterator/counting_iterator.h>
+#include <thrust/pair.h>
 #include <thrust/scan.h>
 #include <thrust/sort.h>
 #include <thrust/system/cpp/memory.h>
diff --git a/viskores/exec/cuda/internal/ExecutionPolicy.h b/viskores/exec/cuda/internal/ExecutionPolicy.h
index e837560d1d..183ed0a4c0 100644
--- a/viskores/exec/cuda/internal/ExecutionPolicy.h
+++ b/viskores/exec/cuda/internal/ExecutionPolicy.h
@@ -25,6 +25,7 @@
 #include <viskores/exec/cuda/internal/ThrustPatches.h>
 VISKORES_THIRDPARTY_PRE_INCLUDE
 #include <thrust/execution_policy.h>
+#include <thrust/pair.h>
 #include <thrust/sort.h>
 #include <thrust/system/cuda/execution_policy.h>
 #include <thrust/system/cuda/memory.h>
