| 3090 | } |
| 3091 | |
| 3092 | struct ggml_tensor * ggml_get_tensor(struct ggml_context * ctx, const char * name) { |
| 3093 | struct ggml_object * obj = ctx->objects_begin; |
| 3094 | |
| 3095 | char * const mem_buffer = ctx->mem_buffer; |
| 3096 | |
| 3097 | while (obj != NULL) { |
| 3098 | if (obj->type == GGML_OBJECT_TENSOR) { |
| 3099 | struct ggml_tensor * cur = (struct ggml_tensor *)(mem_buffer + obj->offs); |
| 3100 | if (strcmp(cur->name, name) == 0) { |
| 3101 | return cur; |
| 3102 | } |
| 3103 | } |
| 3104 | |
| 3105 | obj = obj->next; |
| 3106 | } |
| 3107 | |
| 3108 | return NULL; |
| 3109 | } |
| 3110 | |
| 3111 | //////////////////////////////////////////////////////////////////////////////// |
| 3112 |
no outgoing calls
no test coverage detected