Skip to content

Navigation Menu

Sign in
Sign up

Introducing Module::load_from_bytes() #58

Open

Description

It's currently possible to directly embed a CUDA module via Module::load_from_string(). It is using a CStr, which is meant for a list on nul-terminated bytes (strings) and not for binary data.

Hence I propose introducing Module::load_from_bytes(), which does the same thing, the only difference will be that the input will be a byte slice &[u8]. You can then use the include_bytes! macro to include the module.

I would even remove the Module::load_from_string() and only have Module:load_from_bytes(), but I'd leave this decision to the maintainers.

I'm happy to do a PR, if that's a feature that would be accepted.

Activity

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

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      AltStyle によって変換されたページ (->オリジナル) /