contrib : cont [no ci]
This commit is contained in:
parent
da47eb0650
commit
f44939a6eb
1 changed files with 10 additions and 7 deletions
|
@ -74,16 +74,19 @@
|
||||||
|
|
||||||
- Declare structs with `struct x {}` instead of `typedef struct x {} x`
|
- Declare structs with `struct x {}` instead of `typedef struct x {} x`
|
||||||
- In C++ code omit the `struct` keyword whenever it is not necessary
|
- In C++ code omit the `struct` keyword whenever it is not necessary
|
||||||
- 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
|
> [!NOTE]
|
||||||
|
> This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
|
||||||
|
|
||||||
```cpp
|
- 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
|
||||||
typedef struct llama_context * llama_context_t;
|
|
||||||
|
|
||||||
enum llama_pooling_type llama_pooling_type(const llama_context_t ctx);
|
```cpp
|
||||||
```
|
typedef struct llama_context * llama_context_t;
|
||||||
|
|
||||||
> [!NOTE]
|
enum llama_pooling_type llama_pooling_type(const llama_context_t ctx);
|
||||||
> This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
|
||||||
|
|
||||||
- Follow the existing code style, in case of doubt use `clang-format` to format the added code
|
- Follow the existing code style, in case of doubt use `clang-format` to format the added code
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue