| 3530 | } |
| 3531 | |
| 3532 | struct ggml_tensor * ggml_reshape_1d( |
| 3533 | struct ggml_context * ctx, |
| 3534 | struct ggml_tensor * a, |
| 3535 | int64_t ne0) { |
| 3536 | GGML_ASSERT(ggml_is_contiguous(a)); |
| 3537 | GGML_ASSERT(ggml_nelements(a) == ne0); |
| 3538 | |
| 3539 | const int64_t ne[1] = { ne0 }; |
| 3540 | struct ggml_tensor * result = ggml_new_tensor_impl(ctx, a->type, 1, ne, a, 0); |
| 3541 | ggml_format_name(result, "%s (reshaped)", a->name); |
| 3542 | |
| 3543 | result->op = GGML_OP_RESHAPE; |
| 3544 | result->src[0] = a; |
| 3545 | |
| 3546 | return result; |
| 3547 | } |
| 3548 | |
| 3549 | struct ggml_tensor * ggml_reshape_2d( |
| 3550 | struct ggml_context * ctx, |
no test coverage detected