Skip to content

Should OpenCL C have a memcpy? #1555

@karolherbst

Description

@karolherbst

At the moment the OpenCL C spec states:

Of these, only memcpy is strictly correct in C99. Since OpenCL does not provide memcpy, other methods are needed.

Should we provide a type generic (for all OpenCL C scalars and vector types?) memcpy in OpenCL C? In SPIR-V we have OpCopyMemory and OpCopyMemorySized?

I think I'd prefer to provide a higher level function to developers rather than them trying to implement memcpy with loops or something that are fundamentally more difficult to optimize and more difficult to reason about pointer alignments.

Should we have a memcpy extension for this?

Should we have a memcpy_aligned version where developers can specify explicit pointer alignment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions