| 5144 | // ggml_fill |
| 5145 | |
| 5146 | static struct ggml_tensor * ggml_fill_impl( |
| 5147 | struct ggml_context * ctx, |
| 5148 | struct ggml_tensor * a, |
| 5149 | float c, |
| 5150 | bool inplace) { |
| 5151 | GGML_ASSERT(a->type == GGML_TYPE_F32); |
| 5152 | GGML_ASSERT(ggml_is_contiguous(a)); |
| 5153 | |
| 5154 | struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); |
| 5155 | |
| 5156 | ggml_set_op_params_f32(result, 0, c); |
| 5157 | |
| 5158 | result->op = GGML_OP_FILL; |
| 5159 | result->src[0] = a; |
| 5160 | |
| 5161 | return result; |
| 5162 | } |
| 5163 | |
| 5164 | struct ggml_tensor * ggml_fill( |
| 5165 | struct ggml_context * ctx, |
no test coverage detected