cuda_array_validator
- cubie.batchsolving._utils.cuda_array_validator(instance: Any, attribute: Any, value: Any, dimensions: int | None = None) bool[source]
Validate that a value is a CUDA array with optional dimension checks.
- Parameters:
instance – Instance containing the attribute (required by attrs, unused here).
attribute – Attribute metadata supplied by attrs.
value – Value provided for validation.
dimensions – Required dimensionality when provided.
- Returns:
Truewhenvalueis a CUDA array and, if requested, has the specified number of dimensions.- Return type:
Notes
The
instanceandattributeparameters are accepted for attrs compatibility and are not used in the validation logic.