| 4644 | // ggml_view_2d |
| 4645 | |
| 4646 | struct ggml_tensor * ggml_view_2d( |
| 4647 | struct ggml_context * ctx, |
| 4648 | struct ggml_tensor * a, |
| 4649 | int64_t ne0, |
| 4650 | int64_t ne1, |
| 4651 | size_t nb1, |
| 4652 | size_t offset) { |
| 4653 | |
| 4654 | const int64_t ne[2] = { ne0, ne1 }; |
| 4655 | |
| 4656 | struct ggml_tensor * result = ggml_view_impl(ctx, a, 2, ne, offset); |
| 4657 | |
| 4658 | result->nb[1] = nb1; |
| 4659 | result->nb[2] = result->nb[1]*ne1; |
| 4660 | result->nb[3] = result->nb[2]; |
| 4661 | |
| 4662 | return result; |
| 4663 | } |
| 4664 | |
| 4665 | // ggml_view_3d |
| 4666 |