Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-hexagon/htp/htp-vtcm.h # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-hexagon / htp / htp-vtcm.h` 19 lines ยท 684 bytes Raw Blame History 1 #ifndef HTP_VTCM_H 2 #define HTP_VTCM_H 3 4 #include 5 #include 6 7 static inline uint8_t *vtcm_seq_alloc(uint8_t **vtcm_ptr, size_t size) { 8 uint8_t *p = *vtcm_ptr; 9 *vtcm_ptr += size; 10 return p; 11 } 12 13 #define VTCM_LAYOUT_ALLOC(off, field, sz) do { (L)->field = (off); (off) += (sz); } while (0) 14 #define VTCM_LAYOUT_ALLOC_OPTIONAL(off, field, sz, cond) do { if (cond) { VTCM_LAYOUT_ALLOC(off, field, sz); } else { (L)->field = 0; } } while (0) 15 16 #define VTCM_LAYOUT_PTR(type, base, offset) ((type *)((uint8_t *)(base) + (offset))) 17 #define VTCM_LAYOUT_PTR_OPTIONAL(type, base, offset, cond) ((cond) ? VTCM_LAYOUT_PTR(type, base, offset) : NULL) 18 19 #endif // HTP_VTCM_H