Skip to content

Conversation

@bwyma
Copy link
Contributor

@bwyma bwyma commented Oct 14, 2024

Modify the local_accessor printer to display data as a linear index from a decorated pointer. This is necessary to retain the address space qualifier.

A simple array printer was added to print local memory like a vector. The array printer limits the elements displayed based on GDB's print options to avoid displaying large data sets. This can be adjusted in GDB:

(gdb) p -elements 4 -- local_accessor_1d
$1 = sycl::local_accessor range 10 = {0, 1, 2, 3...}

(gdb) show print elements
Limit on string chars or array elements to print is 200.

Modify the local_accessor printer to display data as a linear index from a
decorated pointer. This is necessary to retain the address space qualifier.

A simple array printer was added to print local memory like a vector.  The
array printer limits the elements displayed based on GDB's print options to
avoid displaying large data sets. This can be adjusted in GDB:

    (gdb) p -elements 4 -- local_accessor_1d
    $1 = sycl::local_accessor range 10 = {0, 1, 2, 3...}

    (gdb) show print elements
    Limit on string chars or array elements to print is 200.
@bwyma bwyma marked this pull request as ready for review October 14, 2024 19:25
@bwyma bwyma requested a review from a team as a code owner October 14, 2024 19:25
@bwyma
Copy link
Contributor Author

bwyma commented Oct 21, 2024

@intel/llvm-gatekeepers Please merge. Thank you!

@steffenlarsen steffenlarsen merged commit 759a818 into intel:sycl Oct 21, 2024
1 check passed
@bwyma bwyma deleted the sycl-slm-printer-fix branch May 29, 2025 16:41
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.

3 participants