Skip to content

Commit 2f6bb87

Browse files
[arcane,accelerator] Utilise 'std::less' pour la comparaison dans 'GenericSorter'.
L'utilisation d'une lambda avec 'ARCCORE_HOST_DEVICE' fait planter la compilation avec certaines combinaisons de GCC/NVCC.
1 parent 5624a23 commit 2f6bb87

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arcane/src/arcane/accelerator/GenericSorter.h

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
22
//-----------------------------------------------------------------------------
3-
// Copyright 2000-2024 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
3+
// Copyright 2000-2025 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
44
// See the top-level COPYRIGHT file for details.
55
// SPDX-License-Identifier: Apache-2.0
66
//-----------------------------------------------------------------------------
77
/*---------------------------------------------------------------------------*/
8-
/* GenericSorter.h (C) 2000-2024 */
8+
/* GenericSorter.h (C) 2000-2025 */
99
/* */
1010
/* Algorithme de tri. */
1111
/*---------------------------------------------------------------------------*/
@@ -166,10 +166,7 @@ class GenericSorter
166166
if (output.size() < nb_item)
167167
ARCANE_FATAL("Output size '{0}' is smaller than input size '{1}'",
168168
output.size(), nb_item);
169-
auto compare_lambda = [] ARCCORE_HOST_DEVICE(const DataType& a, const DataType& b) {
170-
return a < b;
171-
};
172-
gf.apply(*base_ptr, nb_item, input.data(), output.data(), compare_lambda);
169+
gf.apply(*base_ptr, nb_item, input.data(), output.data(), std::less<DataType>{});
173170
}
174171
};
175172

0 commit comments

Comments
 (0)