Skip to content

Commit 6e51694

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 6e51694

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

arcane/src/arcane/accelerator/GenericSorter.h

Lines changed: 3 additions & 8 deletions
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
/*---------------------------------------------------------------------------*/
@@ -134,8 +134,6 @@ namespace Arcane::Accelerator
134134
/*---------------------------------------------------------------------------*/
135135
/*!
136136
* \brief Algorithme générique de tri sur accélérateur.
137-
*
138-
* \warning API en cours de développement. Ne pas utiliser en dehors d'Arcane
139137
*/
140138
class GenericSorter
141139
: private impl::GenericSorterBase
@@ -166,10 +164,7 @@ class GenericSorter
166164
if (output.size() < nb_item)
167165
ARCANE_FATAL("Output size '{0}' is smaller than input size '{1}'",
168166
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);
167+
gf.apply(*base_ptr, nb_item, input.data(), output.data(), std::less<DataType>{});
173168
}
174169
};
175170

0 commit comments

Comments
 (0)