Skip to content

Commit d63211f

Browse files
committed
Import next changes SHA[beb928035, 8aa440482]
1 parent b5b876d commit d63211f

File tree

101 files changed

+1759
-879
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1759
-879
lines changed

3rd_party/hypre/src/IJ_mv/IJMatrix_parcsr_device.c

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ hypre_IJMatrixSetAddValuesParCSRDevice( hypre_IJMatrix *matrix,
214214
return hypre_error_flag;
215215
}
216216

217-
#if defined(HYPRE_USING_SYCL)
218217
template<typename T1, typename T2>
219218
struct hypre_IJMatrixAssembleFunctor
219+
#if defined(HYPRE_USING_SYCL)
220220
{
221221
typedef std::tuple<T1, T2> Tuple;
222222

@@ -227,9 +227,6 @@ struct hypre_IJMatrixAssembleFunctor
227227
}
228228
};
229229
#else
230-
template<typename T1, typename T2>
231-
struct hypre_IJMatrixAssembleFunctor : public
232-
thrust::binary_function< thrust::tuple<T1, T2>, thrust::tuple<T1, T2>, thrust::tuple<T1, T2> >
233230
{
234231
typedef thrust::tuple<T1, T2> Tuple;
235232

@@ -315,15 +312,16 @@ hypre_IJMatrixAssembleSortAndReduce1(HYPRE_Int N0, HYPRE_BigInt *I0, HYPRE_Big
315312

316313
*N1 = std::get<0>(new_end.first.base()) - I;
317314
#else
318-
HYPRE_THRUST_CALL(
319-
exclusive_scan_by_key,
320-
make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0 + N0, J0 + N0))),
321-
make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0, J0))),
322-
make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
323-
make_reverse_iterator(thrust::device_pointer_cast<char>(X) + N0),
324-
char(0),
325-
thrust::equal_to< thrust::tuple<HYPRE_BigInt, HYPRE_BigInt> >(),
326-
thrust::maximum<char>() );
315+
HYPRE_THRUST_CALL(
316+
exclusive_scan_by_key,
317+
thrust::make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0 + N0, J0 + N0))),
318+
thrust::make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0, J0))),
319+
thrust::make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
320+
thrust::make_reverse_iterator(thrust::device_pointer_cast<char>(X) + N0),
321+
char(0),
322+
thrust::equal_to<thrust::tuple<HYPRE_BigInt, HYPRE_BigInt>>(),
323+
thrust::maximum<char>()
324+
);
327325

328326
HYPRE_THRUST_CALL(replace_if, A0, A0 + N0, X, thrust::identity<char>(), 0.0);
329327

@@ -347,9 +345,9 @@ hypre_IJMatrixAssembleSortAndReduce1(HYPRE_Int N0, HYPRE_BigInt *I0, HYPRE_Big
347345
return hypre_error_flag;
348346
}
349347

350-
#if defined(HYPRE_USING_SYCL)
351348
template<typename T1, typename T2>
352349
struct hypre_IJMatrixAssembleFunctor2
350+
#if defined(HYPRE_USING_SYCL)
353351
{
354352
typedef std::tuple<T1, T2> Tuple;
355353

@@ -364,9 +362,6 @@ struct hypre_IJMatrixAssembleFunctor2
364362
}
365363
};
366364
#else
367-
template<typename T1, typename T2>
368-
struct hypre_IJMatrixAssembleFunctor2 : public
369-
thrust::binary_function< thrust::tuple<T1, T2>, thrust::tuple<T1, T2>, thrust::tuple<T1, T2> >
370365
{
371366
typedef thrust::tuple<T1, T2> Tuple;
372367

@@ -484,13 +479,14 @@ hypre_IJMatrixAssembleSortAndReduce3(HYPRE_Int N0, HYPRE_BigInt *I0, HYPRE_Big
484479
#else
485480
/* output in X0: 0: keep, 1: zero-out */
486481
HYPRE_THRUST_CALL(
487-
inclusive_scan_by_key,
488-
make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0 + N0, J0 + N0))),
489-
make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0, J0))),
490-
make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
491-
make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
492-
thrust::equal_to< thrust::tuple<HYPRE_BigInt, HYPRE_BigInt> >(),
493-
thrust::maximum<char>() );
482+
inclusive_scan_by_key,
483+
thrust::make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0 + N0, J0 + N0))),
484+
thrust::make_reverse_iterator(thrust::make_zip_iterator(thrust::make_tuple(I0, J0))),
485+
thrust::make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
486+
thrust::make_reverse_iterator(thrust::device_pointer_cast<char>(X0) + N0),
487+
thrust::equal_to<thrust::tuple<HYPRE_BigInt, HYPRE_BigInt>>(),
488+
thrust::maximum<char>()
489+
);
494490

495491
HYPRE_THRUST_CALL(replace_if, A0, A0 + N0, X0, thrust::identity<char>(), 0.0);
496492

3rd_party/hypre/src/IJ_mv/IJVector_parcsr_device.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
* hypre_IJVectorAssembleFunctor
2222
*--------------------------------------------------------------------*/
2323

24-
#if defined(HYPRE_USING_SYCL)
2524
template<typename T1, typename T2>
2625
struct hypre_IJVectorAssembleFunctor
26+
#if defined(HYPRE_USING_SYCL)
2727
{
2828
typedef std::tuple<T1, T2> Tuple;
2929

@@ -34,9 +34,6 @@ struct hypre_IJVectorAssembleFunctor
3434
}
3535
};
3636
#else
37-
template<typename T1, typename T2>
38-
struct hypre_IJVectorAssembleFunctor : public
39-
thrust::binary_function< thrust::tuple<T1, T2>, thrust::tuple<T1, T2>, thrust::tuple<T1, T2> >
4037
{
4138
typedef thrust::tuple<T1, T2> Tuple;
4239

3rd_party/hypre/src/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3369,7 +3369,7 @@ hypre_using_memory_tracker=no
33693369

33703370
hypre_test_using_host=no
33713371

3372-
hypre_cxxstd=11
3372+
hypre_cxxstd=17
33733373

33743374
hypre_using_magma=no
33753375
hypre_user_gave_magma_inc=no
@@ -10828,7 +10828,7 @@ printf "%s\n" "#define HYPRE_USING_HIP 1" >>confdefs.h
1082810828
HYPRE_CUDA_GENCODE="`echo ${HYPRE_CUDA_GENCODE}|sed 's/,$//'`"
1082910829
fi
1083010830

10831-
HIPCXXFLAGS="-x hip -std=c++14 ${HIPCXXFLAGS}"
10831+
HIPCXXFLAGS="-x hip -std=c++${hypre_cxxstd} ${HIPCXXFLAGS}"
1083210832

1083310833
if test x"$hypre_using_debug" == x"yes"
1083410834
then :

3rd_party/hypre/src/parcsr_ls/ams.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -495,11 +495,7 @@ HYPRE_Int hypre_ParCSRMatrixFixZeroRows(hypre_ParCSRMatrix *A)
495495
*--------------------------------------------------------------------------*/
496496

497497
#if defined(HYPRE_USING_GPU)
498-
#if defined(HYPRE_USING_SYCL)
499498
struct l1_norm_op1
500-
#else
501-
struct l1_norm_op1 : public thrust::binary_function<HYPRE_Complex, HYPRE_Complex, HYPRE_Complex>
502-
#endif
503499
{
504500
__host__ __device__
505501
HYPRE_Complex operator()(const HYPRE_Complex &x, const HYPRE_Complex &y) const
@@ -510,11 +506,7 @@ struct l1_norm_op1 : public thrust::binary_function<HYPRE_Complex, HYPRE_Complex
510506
#endif
511507

512508
#if defined(HYPRE_USING_GPU)
513-
#if defined(HYPRE_USING_SYCL)
514509
struct l1_norm_op6
515-
#else
516-
struct l1_norm_op6 : public thrust::binary_function<HYPRE_Complex, HYPRE_Complex, HYPRE_Complex>
517-
#endif
518510
{
519511
__host__ __device__
520512
HYPRE_Complex operator()(const HYPRE_Complex &d, const HYPRE_Complex &l) const

3rd_party/hypre/src/parcsr_ls/par_lr_restr_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ hypre_BoomerAMGBuildRestrNeumannAIR_assembleRdiag( hypre_DeviceItem &item,
455455
}
456456

457457
#if !defined(HYPRE_USING_SYCL)
458-
struct setTo1minus1 : public thrust::unary_function<HYPRE_Int, HYPRE_Int>
458+
struct setTo1minus1
459459
{
460460
__host__ __device__ HYPRE_Int operator()(const HYPRE_Int &x) const
461461
{

3rd_party/hypre/src/parcsr_ls/par_mgr_device.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,7 @@
1919
#if defined (HYPRE_USING_GPU)
2020

2121
template<typename T>
22-
#if defined(HYPRE_USING_SYCL)
2322
struct functor
24-
#else
25-
struct functor : public thrust::binary_function<T, T, T>
26-
#endif
2723
{
2824
T scale;
2925

3rd_party/hypre/src/parcsr_ls/par_mod_multi_interp_device.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ struct globalC_functor
5151
};
5252
#else
5353
template<typename T>
54-
struct tuple_plus : public
55-
thrust::binary_function<thrust::tuple<T, T>, thrust::tuple<T, T>, thrust::tuple<T, T> >
54+
struct tuple_plus
5655
{
5756
__host__ __device__
5857
thrust::tuple<T, T> operator()( const thrust::tuple<T, T> & x1, const thrust::tuple<T, T> & x2)
@@ -63,8 +62,7 @@ struct tuple_plus : public
6362
};
6463

6564
template<typename T>
66-
struct tuple_minus : public
67-
thrust::binary_function<thrust::tuple<T, T>, thrust::tuple<T, T>, thrust::tuple<T, T> >
65+
struct tuple_minus
6866
{
6967
__host__ __device__
7068
thrust::tuple<T, T> operator()( const thrust::tuple<T, T> & x1, const thrust::tuple<T, T> & x2)
@@ -74,8 +72,7 @@ struct tuple_minus : public
7472
}
7573
};
7674

77-
struct local_equal_plus_constant : public
78-
thrust::binary_function<HYPRE_BigInt, HYPRE_BigInt, HYPRE_BigInt>
75+
struct local_equal_plus_constant
7976
{
8077
HYPRE_BigInt _value;
8178

@@ -86,7 +83,7 @@ struct local_equal_plus_constant : public
8683
};
8784

8885
/* transform from local C index to global C index */
89-
struct globalC_functor : public thrust::unary_function<HYPRE_Int, HYPRE_BigInt>
86+
struct globalC_functor
9087
{
9188
HYPRE_BigInt C_first;
9289

3rd_party/hypre/src/parcsr_mv/par_csr_fffc_device.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ typedef thrust::tuple<HYPRE_Int, HYPRE_Int> Tuple;
2121
/* transform from local F/C index to global F/C index,
2222
* where F index "x" are saved as "-x-1"
2323
*/
24-
#if defined(HYPRE_USING_SYCL)
2524
struct FFFC_functor
26-
#else
27-
struct FFFC_functor : public thrust::unary_function<Tuple, HYPRE_BigInt>
28-
#endif
2925
{
3026
HYPRE_BigInt CF_first[2];
3127

@@ -48,11 +44,7 @@ struct FFFC_functor : public thrust::unary_function<Tuple, HYPRE_BigInt>
4844

4945
/* this predicate selects A^s_{FF} */
5046
template<typename T>
51-
#if defined(HYPRE_USING_SYCL)
5247
struct FF_pred
53-
#else
54-
struct FF_pred : public thrust::unary_function<Tuple, bool>
55-
#endif
5648
{
5749
HYPRE_Int option;
5850
HYPRE_Int *row_CF_marker;
@@ -86,11 +78,7 @@ struct FF_pred : public thrust::unary_function<Tuple, bool>
8678

8779
/* this predicate selects A^s_{FC} */
8880
template<typename T>
89-
#if defined(HYPRE_USING_SYCL)
9081
struct FC_pred
91-
#else
92-
struct FC_pred : public thrust::unary_function<Tuple, bool>
93-
#endif
9482
{
9583
HYPRE_Int *row_CF_marker;
9684
T *col_CF_marker;
@@ -113,11 +101,7 @@ struct FC_pred : public thrust::unary_function<Tuple, bool>
113101

114102
/* this predicate selects A^s_{CF} */
115103
template<typename T>
116-
#if defined(HYPRE_USING_SYCL)
117104
struct CF_pred
118-
#else
119-
struct CF_pred : public thrust::unary_function<Tuple, bool>
120-
#endif
121105
{
122106
HYPRE_Int *row_CF_marker;
123107
T *col_CF_marker;
@@ -140,11 +124,7 @@ struct CF_pred : public thrust::unary_function<Tuple, bool>
140124

141125
/* this predicate selects A^s_{CC} */
142126
template<typename T>
143-
#if defined(HYPRE_USING_SYCL)
144127
struct CC_pred
145-
#else
146-
struct CC_pred : public thrust::unary_function<Tuple, bool>
147-
#endif
148128
{
149129
HYPRE_Int *row_CF_marker;
150130
T *col_CF_marker;
@@ -166,11 +146,7 @@ struct CC_pred : public thrust::unary_function<Tuple, bool>
166146
};
167147

168148
/* this predicate selects A^s_{C,:} */
169-
#if defined(HYPRE_USING_SYCL)
170149
struct CX_pred
171-
#else
172-
struct CX_pred : public thrust::unary_function<Tuple, bool>
173-
#endif
174150
{
175151
HYPRE_Int *row_CF_marker;
176152

@@ -191,11 +167,7 @@ struct CX_pred : public thrust::unary_function<Tuple, bool>
191167

192168
/* this predicate selects A^s_{:,C} */
193169
template<typename T>
194-
#if defined(HYPRE_USING_SYCL)
195170
struct XC_pred
196-
#else
197-
struct XC_pred : public thrust::unary_function<Tuple, bool>
198-
#endif
199171
{
200172
T *col_CF_marker;
201173

3rd_party/hypre/src/parcsr_mv/par_csr_triplemat_device.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
* option == 2, T = HYPRE_Int,
1818
*/
1919
template<HYPRE_Int option, typename T>
20-
#if defined(HYPRE_USING_SYCL)
2120
struct RAP_functor
22-
#else
23-
struct RAP_functor : public thrust::unary_function<HYPRE_Int, T>
24-
#endif
2521
{
2622
HYPRE_Int num_col;
2723
T first_col;

3rd_party/hypre/src/seq_mv/csr_matop_device.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,7 @@ hypre_CSRMatrixSplitDevice_core( HYPRE_Int job,
698698
std::not_fn(pred1) );
699699
hypre_assert( std::get<0>(new_end.base()) == B_ext_offd_ii + B_ext_offd_nnz );
700700
#else
701+
701702
auto new_end = HYPRE_THRUST_CALL(
702703
copy_if,
703704
thrust::make_zip_iterator(thrust::make_tuple(B_ext_ii, B_ext_bigj,
@@ -1865,7 +1866,7 @@ struct Int2Unequal
18651866
};
18661867
#else
18671868
typedef thrust::tuple<HYPRE_Int, HYPRE_Int> Int2;
1868-
struct Int2Unequal : public thrust::unary_function<Int2, bool>
1869+
struct Int2Unequal
18691870
{
18701871
__host__ __device__
18711872
bool operator()(const Int2& t) const
@@ -2086,8 +2087,7 @@ struct cabsfirst_greaterthan_second_pred
20862087
}
20872088
};
20882089
#else
2089-
struct cabsfirst_greaterthan_second_pred : public
2090-
thrust::unary_function<thrust::tuple<HYPRE_Complex, HYPRE_Real>, bool>
2090+
struct cabsfirst_greaterthan_second_pred
20912091
{
20922092
__host__ __device__
20932093
bool operator()(const thrust::tuple<HYPRE_Complex, HYPRE_Real>& t) const
@@ -2346,11 +2346,7 @@ hypre_CSRMatrixDiagMatrixFromMatrixDevice(hypre_CSRMatrix *A, HYPRE_Int type)
23462346
* adj_functor (Used in hypre_CSRMatrixPermuteDevice)
23472347
*--------------------------------------------------------------------------*/
23482348

2349-
#if defined(HYPRE_USING_SYCL)
23502349
struct adj_functor
2351-
#else
2352-
struct adj_functor : public thrust::unary_function<HYPRE_Int, HYPRE_Int>
2353-
#endif
23542350
{
23552351
HYPRE_Int *ia_;
23562352

0 commit comments

Comments
 (0)