Skip to content

Commit cc1cebd

Browse files
Fixed clash between identity in thrust since thrust static version removal. (#359)
1 parent 4f61f17 commit cc1cebd

File tree

6 files changed

+5
-15
lines changed

6 files changed

+5
-15
lines changed

include/cusp/detail/device/detail/coo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void coo_add(const Matrix1& A,
9191
{
9292
typedef typename Matrix2::value_type ValueType;
9393

94-
coo_elementwise_transform_simple(A, B, C, amgx::thrust::identity<ValueType>());
94+
coo_elementwise_transform_simple(A, B, C, identity_function<ValueType>());
9595
}
9696

9797
template <typename Matrix1,

include/cusp/detail/device/generalized_spmv/dia.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ void __spmv_dia(const cusp::dia_matrix<IndexType,ValueType,cusp::device_memory>&
122122
amgx::thrust::raw_pointer_cast(&dia.diagonal_offsets[0]) + base,
123123
amgx::thrust::raw_pointer_cast(&dia.values.values[0]) + base * stride,
124124
x, y,
125-
amgx::thrust::identity<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
125+
identity_function<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
126126
}
127127

128128
if (UseCache)

include/cusp/detail/device/generalized_spmv/ell.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void __spmv_ell(const cusp::ell_matrix<IndexType,ValueType,cusp::device_memory>&
9393
amgx::thrust::raw_pointer_cast(&ell.column_indices.values[0]),
9494
amgx::thrust::raw_pointer_cast(&ell.values.values[0]),
9595
x, y,
96-
amgx::thrust::identity<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
96+
identity_function<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
9797

9898
if (UseCache)
9999
unbind_x(x);

include/cusp/detail/functional.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,3 @@ template<typename T>
3333
} // end namespace detail
3434
} // end namespace cusp
3535

36-
// Add identity to amgx::thrust namespace for backward compatibility
37-
namespace amgx
38-
{
39-
namespace thrust
40-
{
41-
template<typename T>
42-
using identity = cusp::detail::identity_function<T>;
43-
}
44-
}
45-

include/cusp/detail/host/multiply.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void multiply(const Matrix& A,
119119
typedef typename Vector2::value_type ValueType;
120120

121121
cusp::detail::host::spmv_ell(A.ell, B, C);
122-
cusp::detail::host::spmv_coo(A.coo, B, C, amgx::thrust::identity<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
122+
cusp::detail::host::spmv_coo(A.coo, B, C, identity_function<ValueType>(), amgx::thrust::multiplies<ValueType>(), amgx::thrust::plus<ValueType>());
123123
}
124124

125125
////////////////////////////////////////

include/cusp/graph/detail/maximal_independent_set.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ void compute_mis_states(const size_t k,
231231
//
232232
// // map old indices into subgraph indices
233233
// cusp::array1d<IndexType, MemorySpace> index_map(N);
234-
// amgx::thrust::transform_exclusive_scan(retained_nodes.begin(), retained_nodes.end(), index_map.begin(), amgx::thrust::identity<IndexType>(), IndexType(0), amgx::thrust::plus<IndexType>());
234+
// amgx::thrust::transform_exclusive_scan(retained_nodes.begin(), retained_nodes.end(), index_map.begin(), identity_function<IndexType>(), IndexType(0), amgx::thrust::plus<IndexType>());
235235
//
236236
// std::cout << "index map\n";
237237
// cusp::print(index_map);

0 commit comments

Comments
 (0)