Skip to content

Commit 4e267e5

Browse files
committedNov 30, 2024·
[arccore,collections] Corrige 'guarantedAlignment()' en 'guaranteedAlignment()'.
1 parent c11c75d commit 4e267e5

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed
 

‎arccore/src/collections/arccore/collections/IMemoryAllocator.h

+9-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,14 @@ class ARCCORE_COLLECTIONS_EXPORT IMemoryAllocator
117117
*
118118
* S'il n'y a aucune garantie, retourne 0.
119119
*/
120+
virtual size_t guaranteedAlignment(MemoryAllocationArgs args) const;
121+
122+
/*!
123+
* \brief Valeur de l'alignement garanti par l'allocateur.
124+
*
125+
* \sa guaranteedAlignment()
126+
*/
127+
ARCCORE_DEPRECATED_REASON("Y2024: Use guaranteedAlignment() instead")
120128
virtual size_t guarantedAlignment(MemoryAllocationArgs args) const;
121129

122130
/*!
@@ -157,7 +165,7 @@ class ARCCORE_COLLECTIONS_EXPORT IMemoryAllocator
157165
virtual void deallocate(void* ptr) = 0;
158166
ARCCORE_DEPRECATED_REASON("Y2023: use adjustedCapacity(MemoryAllocationArgs,Int64,Int64) instead")
159167
virtual size_t adjustCapacity(size_t wanted_capacity, size_t element_size) = 0;
160-
ARCCORE_DEPRECATED_REASON("Y2023: use guarantedAlignment(MemoryAllocationArgs) instead")
168+
ARCCORE_DEPRECATED_REASON("Y2023: use guaranteedAlignment(MemoryAllocationArgs) instead")
161169
virtual size_t guarantedAlignment() = 0;
162170
};
163171

‎arccore/src/collections/arccore/collections/MemoryAllocator.cc

+11-2
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-2023 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
3+
// Copyright 2000-2024 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-
/* MemoryAllocator.cc (C) 2000-2023 */
8+
/* MemoryAllocator.cc (C) 2000-2024 */
99
/* */
1010
/* Allocateurs mémoires. */
1111
/*---------------------------------------------------------------------------*/
@@ -441,6 +441,15 @@ guarantedAlignment(MemoryAllocationArgs) const
441441
/*---------------------------------------------------------------------------*/
442442
/*---------------------------------------------------------------------------*/
443443

444+
size_t IMemoryAllocator::
445+
guaranteedAlignment(MemoryAllocationArgs args) const
446+
{
447+
return guarantedAlignment(args);
448+
}
449+
450+
/*---------------------------------------------------------------------------*/
451+
/*---------------------------------------------------------------------------*/
452+
444453
bool IMemoryAllocator3::
445454
hasRealloc() const
446455
{

‎arccore/src/collections/tests/TestArray.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ class TesterMemoryAllocatorV3
897897
size_t guarantedAlignment(MemoryAllocationArgs args) const override
898898
{
899899
_checkValid(args);
900-
return m_default_allocator.guarantedAlignment(args);
900+
return m_default_allocator.guaranteedAlignment(args);
901901
}
902902

903903
void notifyMemoryArgsChanged(MemoryAllocationArgs old_args, MemoryAllocationArgs new_args, AllocatedMemoryInfo ptr) override

0 commit comments

Comments
 (0)
Please sign in to comment.