Skip to content

Add benchmarking - #304

Draft
saeedelsayed wants to merge 3 commits into
alpaka-group:devfrom
saeedelsayed:dev
Draft

Add benchmarking#304
saeedelsayed wants to merge 3 commits into
alpaka-group:devfrom
saeedelsayed:dev

Conversation

@saeedelsayed

Copy link
Copy Markdown
Contributor

No description provided.

@chillenzer
chillenzer marked this pull request as draft June 22, 2026 15:24
Comment on lines +127 to +137
auto allocArray
= [] ALPAKA_FN_ACC(Acc const& acc, int x, Allocator::AllocatorHandle allocHandle)
{
arA<Acc> = static_cast<int**>(allocHandle.malloc(acc, sizeof(int*) * x));
};

auto freeArray
= [] ALPAKA_FN_ACC(Acc const& acc, Allocator::AllocatorHandle allocHandle)
{
allocHandle.free(acc, arA<Acc>);
};

@chillenzer chillenzer Jun 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is approach is not ideal as this taints our nice and clean heap. Better handle the necessary memory externally with allocBuf (see "Allocate a buffer in device memory")

auto bufDevice = allocBuf<DataType, Idx>(device, extent);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants