Skip to content

Kernel error in headerexample.cpp #318

@nazsombor

Description

@nazsombor

Hello, I'm trying to run the executable of headerexample.cpp compiled with g++ -o headerexample headerexample.cpp -lOpenCL. It prints the following error:

1 error generated.
<kernel>:10:97: error: pointer arguments to kernel functions must reside in '__global', '__constant' or '__local' address space
                              global int *output, int val, write_only pipe int outPipe, queue_t childQueue)
                                                                                                ^

First I understood it as if queue_t was a pointer type so I added global keyword in front of it, but then I got another error saying that I don't need the global keyword.

2 errors generated.
<kernel>:10:104: error: parameter may not be qualified with an address space
                              global int *output, int val, write_only pipe int outPipe, global queue_t childQueue)
                                                                                                       ^
<kernel>:10:104: error: pointer arguments to kernel functions must reside in '__global', '__constant' or '__local' address space

Thank you for your help.

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