| 8800 | // ggml_compute_forward_elu |
| 8801 | |
| 8802 | static void ggml_compute_forward_elu_f32( |
| 8803 | const struct ggml_compute_params * params, |
| 8804 | const struct ggml_tensor * src0, |
| 8805 | struct ggml_tensor * dst) { |
| 8806 | assert(params->ith == 0); |
| 8807 | assert(ggml_are_same_shape(src0, dst)); |
| 8808 | |
| 8809 | if (params->type == GGML_TASK_INIT || params->type == GGML_TASK_FINALIZE) { |
| 8810 | return; |
| 8811 | } |
| 8812 | |
| 8813 | const int n = ggml_nrows(src0); |
| 8814 | const int nc = src0->ne[0]; |
| 8815 | |
| 8816 | assert(dst->nb[0] == sizeof(float)); |
| 8817 | assert(src0->nb[0] == sizeof(float)); |
| 8818 | |
| 8819 | for (int i = 0; i < n; i++) { |
| 8820 | ggml_vec_elu_f32(nc, |
| 8821 | (float *) ((char *) dst->data + i*( dst->nb[1])), |
| 8822 | (float *) ((char *) src0->data + i*(src0->nb[1]))); |
| 8823 | } |
| 8824 | } |
| 8825 | |
| 8826 | static void ggml_compute_forward_elu( |
| 8827 | const struct ggml_compute_params * params, |
no test coverage detected