Creates an untyped device array of the specified shape. Args: shape (Tuple[int]): The initial shape of the buffer, in units of bytes. For example, a shape of ``(4, 4)`` would allocate a 16 byte array. Returns: DeviceA
(shape)
| 373 | |
| 374 | @staticmethod |
| 375 | def raw(shape): |
| 376 | """ |
| 377 | Creates an untyped device array of the specified shape. |
| 378 | |
| 379 | Args: |
| 380 | shape (Tuple[int]): |
| 381 | The initial shape of the buffer, in units of bytes. |
| 382 | For example, a shape of ``(4, 4)`` would allocate a 16 byte array. |
| 383 | |
| 384 | Returns: |
| 385 | DeviceArray: The raw device array. |
| 386 | """ |
| 387 | return DeviceArray(shape=shape, dtype=np.byte) |
| 388 | |
| 389 | def resize(self, shape): |
| 390 | """ |