Skip to content

Commit a637181

Browse files
Use splicer to work around bool template param issue
1 parent a126422 commit a637181

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

src/umpire/interface/umpire_shroud.yaml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -261,48 +261,48 @@ declarations:
261261
template_suffix: _prefetcher
262262
function_suffix: ""
263263

264-
- decl: template <typename T, bool B> Allocator makeAllocator(const std::string& name, Allocator allocator, size_t initial_size, size_t block);
265-
options:
266-
F_create_generic: False
267-
cxx_template:
268-
- instantiation: <umpire::strategy::DynamicPoolList, false>
269-
format:
270-
template_suffix: _list_pool_untracked
271-
function_suffix: ""
272-
- instantiation: <umpire::strategy::QuickPool, false>
273-
format:
274-
template_suffix: _quick_pool_untracked
275-
function_suffix: ""
276-
- instantiation: <umpire::strategy::ResourceAwarePool, false>
277-
format:
278-
template_suffix: _resource_aware_pool_untracked
279-
function_suffix: ""
264+
# Untracked pool allocators - using splicer to handle bool template parameter
265+
- decl: Allocator makeAllocator_list_pool_untracked(const std::string& name, Allocator allocator, size_t initial_size, size_t block)
266+
splicer:
267+
c: |
268+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
269+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::DynamicPoolList, false>(name, *SHCXX_allocator, initial_size, block);
280270
281-
- decl: template <typename T, bool B> Allocator makeAllocator(const std::string& name, Allocator allocator, size_t object_size);
282-
options:
283-
F_create_generic: False
284-
cxx_template:
285-
- instantiation: <umpire::strategy::FixedPool, false>
286-
format:
287-
template_suffix: _fixed_pool_untracked
288-
function_suffix: ""
289-
- instantiation: <umpire::strategy::MonotonicAllocationStrategy, false>
290-
format:
291-
template_suffix: _monotonic_untracked
292-
function_suffix: ""
293-
- instantiation: <umpire::strategy::SlotPool, false>
294-
format:
295-
template_suffix: _slot_pool_untracked
296-
function_suffix: ""
271+
- decl: Allocator makeAllocator_quick_pool_untracked(const std::string& name, Allocator allocator, size_t initial_size, size_t block)
272+
splicer:
273+
c: |
274+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
275+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::QuickPool, false>(name, *SHCXX_allocator, initial_size, block);
297276
298-
- decl: template <typename T, bool B> Allocator makeAllocator(const std::string& name, Allocator allocator, size_t smallest_fixed_obj_size, size_t largest_fixed_obj_size, size_t max_initial_fixed_pool_size, size_t fixed_size_multiplier, size_t quick_pool_initial_alloc_size, size_t quick_pool_min_alloc_size, size_t quick_pool_align_bytes);
299-
options:
300-
F_create_generic: False
301-
cxx_template:
302-
- instantiation: <umpire::strategy::MixedPool, false>
303-
format:
304-
template_suffix: _mixed_pool_untracked
305-
function_suffix: ""
277+
- decl: Allocator makeAllocator_resource_aware_pool_untracked(const std::string& name, Allocator allocator, size_t initial_size, size_t block)
278+
splicer:
279+
c: |
280+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
281+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::ResourceAwarePool, false>(name, *SHCXX_allocator, initial_size, block);
282+
283+
- decl: Allocator makeAllocator_fixed_pool_untracked(const std::string& name, Allocator allocator, size_t object_size)
284+
splicer:
285+
c: |
286+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
287+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::FixedPool, false>(name, *SHCXX_allocator, object_size);
288+
289+
- decl: Allocator makeAllocator_monotonic_untracked(const std::string& name, Allocator allocator, size_t object_size)
290+
splicer:
291+
c: |
292+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
293+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::MonotonicAllocationStrategy, false>(name, *SHCXX_allocator, object_size);
294+
295+
- decl: Allocator makeAllocator_slot_pool_untracked(const std::string& name, Allocator allocator, size_t object_size)
296+
splicer:
297+
c: |
298+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
299+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::SlotPool, false>(name, *SHCXX_allocator, object_size);
300+
301+
- decl: Allocator makeAllocator_mixed_pool_untracked(const std::string& name, Allocator allocator, size_t smallest_fixed_obj_size, size_t largest_fixed_obj_size, size_t max_initial_fixed_pool_size, size_t fixed_size_multiplier, size_t quick_pool_initial_alloc_size, size_t quick_pool_min_alloc_size, size_t quick_pool_align_bytes)
302+
splicer:
303+
c: |
304+
umpire::Allocator *SHCXX_allocator = static_cast<umpire::Allocator *>(allocator.addr);
305+
SHCXX_rv = SH_this->makeAllocator<umpire::strategy::MixedPool, false>(name, *SHCXX_allocator, smallest_fixed_obj_size, largest_fixed_obj_size, max_initial_fixed_pool_size, fixed_size_multiplier, quick_pool_initial_alloc_size, quick_pool_min_alloc_size, quick_pool_align_bytes);
306306
307307
- decl: void addAlias(const std::string& name, Allocator allocator)
308308
- decl: void removeAlias(const std::string& name, Allocator allocator)

0 commit comments

Comments
 (0)