Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/NVIDIA/thrust.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--thrust/system/cuda/detail/fill.h5
-rw-r--r--thrust/system/cuda/detail/for_each.h5
-rw-r--r--thrust/system/cuda/detail/parallel_for.h4
-rw-r--r--thrust/system/cuda/detail/swap_ranges.h5
-rw-r--r--thrust/system/cuda/detail/tabulate.h5
-rw-r--r--thrust/system/cuda/detail/transform.h10
-rw-r--r--thrust/system/cuda/detail/uninitialized_copy.h5
-rw-r--r--thrust/system/cuda/detail/uninitialized_fill.h5
8 files changed, 3 insertions, 41 deletions
diff --git a/thrust/system/cuda/detail/fill.h b/thrust/system/cuda/detail/fill.h
index 00037935..80ea6859 100644
--- a/thrust/system/cuda/detail/fill.h
+++ b/thrust/system/cuda/detail/fill.h
@@ -71,11 +71,6 @@ fill_n(execution_policy<Derived>& policy,
value),
count);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "fill_n: failed to synchronize"
- );
-
return first + count;
} // func fill_n
diff --git a/thrust/system/cuda/detail/for_each.h b/thrust/system/cuda/detail/for_each.h
index 03f82aca..6378f3de 100644
--- a/thrust/system/cuda/detail/for_each.h
+++ b/thrust/system/cuda/detail/for_each.h
@@ -81,11 +81,6 @@ namespace cuda_cub {
for_each_f<Input, wrapped_t>(first, wrapped_op),
count);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "for_each: failed to synchronize"
- );
-
return first + count;
}
diff --git a/thrust/system/cuda/detail/parallel_for.h b/thrust/system/cuda/detail/parallel_for.h
index c547cd97..43c3297a 100644
--- a/thrust/system/cuda/detail/parallel_for.h
+++ b/thrust/system/cuda/detail/parallel_for.h
@@ -161,7 +161,9 @@ parallel_for(execution_policy<Derived> &policy,
THRUST_CDP_DISPATCH(
(cudaStream_t stream = cuda_cub::stream(policy);
cudaError_t status = __parallel_for::parallel_for(count, f, stream);
- cuda_cub::throw_on_error(status, "parallel_for failed");),
+ cuda_cub::throw_on_error(status, "parallel_for failed");
+ status = cuda_cub::synchronize_optional(policy);
+ cuda_cub::throw_on_error(status, "parallel_for: failed to synchronize");),
// CDP sequential impl:
(for (Size idx = 0; idx != count; ++idx)
{
diff --git a/thrust/system/cuda/detail/swap_ranges.h b/thrust/system/cuda/detail/swap_ranges.h
index 932ff3f9..8f9e4fa8 100644
--- a/thrust/system/cuda/detail/swap_ranges.h
+++ b/thrust/system/cuda/detail/swap_ranges.h
@@ -92,11 +92,6 @@ swap_ranges(execution_policy<Derived> &policy,
ItemsIt2>(first1, first2),
num_items);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "swap_ranges: failed to synchronize"
- );
-
return first2 + num_items;
}
diff --git a/thrust/system/cuda/detail/tabulate.h b/thrust/system/cuda/detail/tabulate.h
index f8f90e31..67edb857 100644
--- a/thrust/system/cuda/detail/tabulate.h
+++ b/thrust/system/cuda/detail/tabulate.h
@@ -76,11 +76,6 @@ tabulate(execution_policy<Derived>& policy,
cuda_cub::parallel_for(policy,
functor_t(first, tabulate_op),
count);
-
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "tabulate: failed to synchronize"
- );
}
} // namespace cuda_cub
diff --git a/thrust/system/cuda/detail/transform.h b/thrust/system/cuda/detail/transform.h
index 7766b31d..3cf171a4 100644
--- a/thrust/system/cuda/detail/transform.h
+++ b/thrust/system/cuda/detail/transform.h
@@ -232,11 +232,6 @@ namespace __transform {
predicate),
num_items);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "transform: failed to synchronize"
- );
-
return result + num_items;
}
@@ -278,11 +273,6 @@ namespace __transform {
predicate),
num_items);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "transform: failed to synchronize"
- );
-
return result + num_items;
}
diff --git a/thrust/system/cuda/detail/uninitialized_copy.h b/thrust/system/cuda/detail/uninitialized_copy.h
index f906c659..f21b7c0d 100644
--- a/thrust/system/cuda/detail/uninitialized_copy.h
+++ b/thrust/system/cuda/detail/uninitialized_copy.h
@@ -87,11 +87,6 @@ uninitialized_copy_n(execution_policy<Derived> &policy,
functor_t(first, result),
count);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "uninitialized_copy_n: failed to synchronize"
- );
-
return result + count;
}
diff --git a/thrust/system/cuda/detail/uninitialized_fill.h b/thrust/system/cuda/detail/uninitialized_fill.h
index 88d47284..96b97020 100644
--- a/thrust/system/cuda/detail/uninitialized_fill.h
+++ b/thrust/system/cuda/detail/uninitialized_fill.h
@@ -85,11 +85,6 @@ uninitialized_fill_n(execution_policy<Derived>& policy,
functor_t(first, x),
count);
- cuda_cub::throw_on_error(
- cuda_cub::synchronize_optional(policy)
- , "uninitialized_fill_n: failed to synchronize"
- );
-
return first + count;
}