Skip to content

Passing local arrays to injected quotes #151

@IgorErin

Description

@IgorErin

Describe the bug
Passing local data to integrated quotes causes a compilation error.
passing '__local int *' to parameter of type 'int *' changes address space of pointer int buff = buffUnitFunc (resultLocalBuffer) ;

To Reproduce
Compile this:

let someFun someOp =
        <@ fun (localBuffer: int []) ->
            let buff = (%someOp)  localBuffer.[0] localBuffer.[0]
            () @>

let kernel =
    <@ fun (ndRange: Range1D) ->
        let array = localArray<int> workGroupSize
        (%someFun <@ (+) @>) localArray @>

Expected behavior
Compilation is success.

Desktop (please complete the following information):

  • OS: Windows 11

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