Skip to content

[C++] Add example of writing a user-defined compute kernel #174

Open

Description

@wjones127
No description provided.

Activity

  1. drin commented on Jun 30, 2022

    @drin

    I have something that I think would work as an initial pass for this. I have a recipe here:

    https://github.com/drin/cookbooks/tree/mainline/arrow/add-compute-fn
    

    What would be the best way to move the recipe into this repo to submit a PR? I formatted the directory to be self-contained, but looking at other recipes in this repo, it seems like it's preferred to keep code mostly self-contained within a single source file.

    Is there a preference on how to clearly distinguish what is necessary in the header file?

    After some suggestions I can prepare an initial PR.

  2. wjones127 commented on Jul 6, 2022

    @wjones127
    MemberAuthor

    I think the cookbook approach is to just show the minimal necessary code within the source file, and not necessarily show how one might separate declarations into headers.

    Personally, I think it would be helpful to have two examples:

    1. In the cookbook, just show the minimal source code necessary in one file to write, register, and call a compute kernel.
    2. In a separate repo, show a full project structure for writing compute kernels in a C++ project. Bonus points if it shows how to make Python bindings that can register with PyArrow's compute registry (and similarly with the R package and others).
  3. drin commented on Jul 7, 2022

    @drin

    Thanks! (1) sounds easily doable. For (2), I guess the repo where I have it now (drin/cookbooks.git) is a reasonable place to keep it. I'll try to expand with python bindings. I'll see about how to do R bindings in the near-ish future.

  4. drin commented on Jul 8, 2022

    @drin

    Created a draft PR: #227

  5. drin commented on Jul 8, 2022

    @drin

    decided to just mark it ready for review. not sure there's any need to keep it as a draft

  6. added 2 commits that reference this issue on Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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