(shape_arg, layout_arg, expected_strides)
| 381 | ], |
| 382 | ) |
| 383 | def test_tensor_reshape_strided(shape_arg, layout_arg, expected_strides): |
| 384 | tensor = cvcuda.Tensor((10, 10, 3), np.uint8, layout="HWC") |
| 385 | assert tensor.cuda().strides == (32, 3, 1) # strided rows |
| 386 | |
| 387 | new_tensors = [ |
| 388 | tensor.reshape(shape_arg, layout=layout_arg), |
| 389 | cvcuda.reshape(tensor, shape_arg, layout=layout_arg), |
| 390 | ] |
| 391 | for new_tensor in new_tensors: |
| 392 | assert new_tensor.cuda().strides == expected_strides |
| 393 | |
| 394 | |
| 395 | @t.mark.parametrize( |