Skip to content

Allow GPU support? #8

@darsnack

Description

@darsnack

The current type for CircularArrayBuffer only allows the backing array to be an Array. Can this be relaxed to allow CuArrays (or any AbstractArray)? AFAICT scalar indexing is not introduced by the package code (meaning scalar indexing should only trigger if a user is scalar indexing in the first place).

You might also consider adding an Adapt.jl rule:

Adapt.adapt_structure(to, x::CircularArrayBuffer) =
    CircularArrayBuffer(adapt(to, x.buffer), x.first, x.nframes, x.step_size)

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