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 74
74
75
75
- Declare structs with `struct x {}` instead of ` typedef struct x {} x`
76
76
- 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.
78
79
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
81
81
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
+ ```
84
87
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.
87
90
88
91
- Follow the existing code style, in case of doubt use `clang-format` to format the added code
89
92
You can’t perform that action at this time.
0 commit comments