Skip to content

Conversation

@cliffburdick
Copy link
Collaborator

@cliffburdick cliffburdick commented Aug 27, 2025

  • Replace template-based Storage with unified Storage class
  • Remove inheritance requirement from pmr_allocator_interface
  • Implement pure duck typing - users just need allocate()/deallocate() methods
  • Add SFINAE detection for both allocator objects and pointers
  • Support owning/non-owning constructors with optional custom allocators
  • Eliminate dynamic allocation overhead for common allocator cases
  • Maintain backward compatibility with legacy sparse tensor types
  • Add comprehensive unit tests for duck-typed allocator system
  • Organize tests in new test/00_misc/ directory following MatX conventions

This provides maximum flexibility while removing inheritance requirements and virtual function overhead. Users can now implement any allocator without inheriting from base classes - if it has allocate() and deallocate() methods, it works automatically via SFINAE detection.

Closes #1043 #48

- Replace template-based Storage with unified Storage<T> class
- Remove inheritance requirement from pmr_allocator_interface
- Implement pure duck typing - users just need allocate()/deallocate() methods
- Add SFINAE detection for both allocator objects and pointers
- Support owning/non-owning constructors with optional custom allocators
- Eliminate dynamic allocation overhead for common allocator cases
- Maintain backward compatibility with legacy sparse tensor types
- Add comprehensive unit tests for duck-typed allocator system
- Organize tests in new test/00_misc/ directory following MatX conventions

This provides maximum flexibility while removing inheritance requirements
and virtual function overhead. Users can now implement any allocator
without inheriting from base classes - if it has allocate() and
deallocate() methods, it works automatically via SFINAE detection.
@copy-pr-bot
Copy link

copy-pr-bot bot commented Aug 27, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

/build

@cliffburdick
Copy link
Collaborator Author

Passing CI but issue with the coverage uploading at the end.

@cliffburdick cliffburdick merged commit ee27472 into main Sep 24, 2025
1 check failed
@cliffburdick cliffburdick deleted the storage_refector branch September 24, 2025 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Remove allocator from the template type

2 participants