| 5745 | // ggml_unary |
| 5746 | |
| 5747 | static struct ggml_tensor * ggml_unary_impl( |
| 5748 | struct ggml_context * ctx, |
| 5749 | struct ggml_tensor * a, |
| 5750 | enum ggml_unary_op op, |
| 5751 | bool inplace) { |
| 5752 | GGML_ASSERT(ggml_is_contiguous_1(a)); |
| 5753 | |
| 5754 | struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); |
| 5755 | |
| 5756 | ggml_set_op_params_i32(result, 0, (int32_t) op); |
| 5757 | |
| 5758 | result->op = GGML_OP_UNARY; |
| 5759 | result->src[0] = a; |
| 5760 | |
| 5761 | return result; |
| 5762 | } |
| 5763 | |
| 5764 | struct ggml_tensor * ggml_unary( |
| 5765 | struct ggml_context * ctx, |
no test coverage detected