File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 7474
7575- Declare structs with `struct x {}` instead of ` typedef struct x {} x`
7676 - In C++ code omit the ` struct ` keyword whenever it is not necessary
77- - Use the ` _t ` suffix when the types are supposed to be opaque to the user - it's not relevant to them if it is a struct or anything else
77+ > [ !NOTE]
78+ > This guideline is yet to be applied to the ` llama.cpp ` codebase. New code should follow this guideline.
7879
79- ```cpp
80- typedef struct llama_context * llama_context_t;
80+ - Use the ` _t ` suffix when a type is supposed to be opaque to the user - it's not relevant to them if it is a struct or anything else
8181
82- enum llama_pooling_type llama_pooling_type(const llama_context_t ctx);
83- ```
82+ ``` cpp
83+ typedef struct llama_context * llama_context_t;
84+
85+ enum llama_pooling_type llama_pooling_type(const llama_context_t ctx);
86+ ```
8487
85- > [!NOTE]
86- > This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
88+ > [!NOTE]
89+ > This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
8790
8891- Follow the existing code style, in case of doubt use `clang-format` to format the added code
8992
You can’t perform that action at this time.
0 commit comments