| 3635 | // ggml_view_2d |
| 3636 | |
| 3637 | struct ggml_tensor * ggml_view_2d( |
| 3638 | struct ggml_context * ctx, |
| 3639 | struct ggml_tensor * a, |
| 3640 | int64_t ne0, |
| 3641 | int64_t ne1, |
| 3642 | size_t nb1, |
| 3643 | size_t offset) { |
| 3644 | const int64_t ne[2] = { ne0, ne1 }; |
| 3645 | |
| 3646 | struct ggml_tensor * result = ggml_view_impl(ctx, a, 2, ne, offset); |
| 3647 | |
| 3648 | result->nb[1] = nb1; |
| 3649 | result->nb[2] = result->nb[1]*ne1; |
| 3650 | result->nb[3] = result->nb[2]; |
| 3651 | |
| 3652 | return result; |
| 3653 | } |
| 3654 | |
| 3655 | // ggml_view_3d |
| 3656 |