Skip to content

Commit e85ac14

Browse files
author
Martin D. Weinberg
committed
Work-around for deprecation of thrust::unary_function type
1 parent afd3328 commit e85ac14

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

include/cudaParticle.cuH

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,12 @@ extern __host__
9090
std::ostream& operator<< (std::ostream& os, const cudaParticle& p);
9191

9292
//! Functor for extracting level info from cudaParticle structures
93+
#if CUDART_VERSION < 12040
9394
struct cuPartToLevel :
9495
public thrust::unary_function<cudaParticle, unsigned int>
96+
#else
97+
struct cuPartToLevel
98+
#endif
9599
{
96100
int _t;
97101

@@ -106,8 +110,12 @@ struct cuPartToLevel :
106110
};
107111

108112
//! Functor for extracting change level info from cudaParticle structures
113+
#if CUDART_VERSION < 12040
109114
struct cuPartToChange :
110115
public thrust::unary_function<cudaParticle, thrust::pair<int, int>>
116+
#else
117+
struct cuPartToChange
118+
#endif
111119
{
112120
__host__ __device__
113121
thrust::pair<int, int> operator()(const cudaParticle& p) const

0 commit comments

Comments
 (0)