Skip to content

[C++][Compute] Dispatch* should examine options as well as input types #28824

@asfimport

Description

@asfimport

Function::Dispatch* should have access to options as well as argument types.

This will allow kernel authors to write kernels which are specific to certain configurations of options. Otherwise we may be leaving performance on the table when for example a function's output could be contiguously preallocated, but only for the default FunctionOptions. Currently the author would have no choice but to choose the lowest-common-denominator flags for the kernel.

In another vein, "cast" is currently a MetaFunction instead of a ScalarFunction since it derives its output type from CastOptions. This requires a special case in Expressions since Expressions can only represent calls to scalar functions. Ideally a function which is semantically scalar like "cast" wouldn't need to resort to using a MetaFunction for dispatch

See also: #10547 (comment)

Reporter: Ben Kietzman / @bkietz

Related issues:

Note: This issue was originally created as ARROW-13122. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions