| 1773 | } |
| 1774 | |
| 1775 | struct ggml_tensor * ggml_new_tensor_4d( |
| 1776 | struct ggml_context * ctx, |
| 1777 | enum ggml_type type, |
| 1778 | int64_t ne0, |
| 1779 | int64_t ne1, |
| 1780 | int64_t ne2, |
| 1781 | int64_t ne3) { |
| 1782 | const int64_t ne[4] = { ne0, ne1, ne2, ne3 }; |
| 1783 | return ggml_new_tensor(ctx, type, 4, ne); |
| 1784 | } |
| 1785 | |
| 1786 | void * ggml_new_buffer(struct ggml_context * ctx, size_t nbytes) { |
| 1787 | struct ggml_object * obj = ggml_new_object(ctx, GGML_OBJECT_TYPE_WORK_BUFFER, nbytes); |