Skip to content

Add RAJA check for dereferencing struct pointers in a RAJA loop #8

Open
@bryujin

Description

@bryujin

This would be a check to see if a RAJA lambda has captured a pointer to a struct and then dereferences it within the kernel. This is the same basic problem that we have when implicitly dereferencing members off of the "this" pointer.

So something like:

struct mystruct* mystruct_ptr = ... ;

struct mystruct mystruct_captured = ...;

RAJA::for_all (RAJA::RangeSegment(0, n, [=](int i) {
...
data[i] += mystruct_ptr->myfield; // catch this dereference

data[i] += mystruct_captured.myfield; // this shouldn't be caught since it's not a pointer dereference
...
} );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions