Skip to content

Allow return or return nothing in kernels #443

@eschnett

Description

@eschnett

I use JuliaFormatter to format my source code. This adds explicit return statements. This leads to

ERROR: LoadError: Return statement not permitted in a kernel function sum2_kernel!

even if the return statement is just return nothing.

At the same time, ending a kernel with an expression (which is equivalent to a return statement) is allowed.

Could this check be changed to allow only empty return or return nothing statements?

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