| 8020 | // ggml_compute_forward_log |
| 8021 | |
| 8022 | static void ggml_compute_forward_log_f32( |
| 8023 | const struct ggml_compute_params * params, |
| 8024 | const struct ggml_tensor * src0, |
| 8025 | struct ggml_tensor * dst) { |
| 8026 | GGML_ASSERT(params->ith == 0); |
| 8027 | GGML_ASSERT(ggml_are_same_shape(src0, dst)); |
| 8028 | |
| 8029 | if (params->type == GGML_TASK_INIT || params->type == GGML_TASK_FINALIZE) { |
| 8030 | return; |
| 8031 | } |
| 8032 | |
| 8033 | const int n = ggml_nrows(src0); |
| 8034 | const int nc = src0->ne[0]; |
| 8035 | |
| 8036 | GGML_ASSERT( dst->nb[0] == sizeof(float)); |
| 8037 | GGML_ASSERT(src0->nb[0] == sizeof(float)); |
| 8038 | |
| 8039 | for (int i = 0; i < n; i++) { |
| 8040 | ggml_vec_log_f32(nc, |
| 8041 | (float *) ((char *) dst->data + i*( dst->nb[1])), |
| 8042 | (float *) ((char *) src0->data + i*(src0->nb[1]))); |
| 8043 | } |
| 8044 | } |
| 8045 | |
| 8046 | static void ggml_compute_forward_log( |
| 8047 | const struct ggml_compute_params * params, |
no test coverage detected