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/hex-bitmap.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 / hex-bitmap.h` 24 lines ยท 634 bytes Raw Blame History 1 #ifndef HEX_BITMAP_H 2 #define HEX_BITMAP_H 3 4 #include 5 #include 6 #include 7 8 static inline void bitmap_set(uint32_t * bitmap, uint32_t idx) { 9 bitmap[idx / 32] |= (1U << (idx % 32)); 10 } 11 12 static inline void bitmap_clear(uint32_t * bitmap, uint32_t idx) { 13 bitmap[idx / 32] &= ~(1U << (idx % 32)); 14 } 15 16 static inline bool bitmap_test(const uint32_t * bitmap, uint32_t idx) { 17 return (bitmap[idx / 32] & (1U << (idx % 32))) != 0; 18 } 19 20 static inline void bitmap_reset(uint32_t * bitmap, size_t size_in_bits) { 21 memset(bitmap, 0, ((size_in_bits + 31) / 32) * sizeof(uint32_t)); 22 } 23 24 #endif // HEX_BITMAP_H