Skip to content

refactor(core): Split array.py - separate GPUArray and memory management #146

@m96-chan

Description

@m96-chan

Problem

src/pygpukit/core/array.py is 741 lines with GPUArray class and memory management mixed.

Current State

src/pygpukit/core/
└── array.py  (741 lines)

Proposed Structure

src/pygpukit/core/
├── array.py             (GPUArray class only, ~400 lines)
├── memory.py            (memory allocation, transfer)
├── dtype.py             (dtype handling, conversions)
└── factory.py           (array creation: zeros, empty, from_numpy)

Benefits

  • GPUArray class cleaner
  • Memory management isolated
  • Easier to swap memory backends
  • Better testability

Related

  • Core infrastructure refactoring

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