Skip to content

Commit e015794

Browse files
committed
contrib : move coding guidelines to correct section [no ci]
1 parent 7637216 commit e015794

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CONTRIBUTING.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
- Avoid fancy-looking modern STL constructs, use basic `for` loops, avoid templates, keep it simple
2323
- There are no strict rules for the code style, but try to follow the patterns in the code (indentation, spaces, etc.). Vertical alignment makes things more readable and easier to batch edit
2424
- Clean-up any trailing whitespaces, use 4 spaces for indentation, brackets on the same line, `void * ptr`, `int & a`
25+
- Use sized integer types in the public API
26+
- Follow the existing code style, in case of doubt use `clang-format` to format the added code
2527
- Tensors store data in row-major order. We refer to dimension 0 as columns, 1 as rows, 2 as matrices
2628
- Matrix multiplication is unconventional: [`C = ggml_mul_mat(ctx, A, B)`](https://github.com/ggerganov/llama.cpp/blob/880e352277fc017df4d5794f0c21c44e1eae2b84/ggml.h#L1058-L1064) means $C^T = A B^T \Leftrightarrow C = B A^T.$
2729

@@ -30,7 +32,6 @@
3032
# Naming guidelines
3133

3234
- Use `snake_case` for function, variable and type names
33-
- Use sized integer types in the public API
3435
- Naming usually optimizes for common prefix (see https://github.com/ggerganov/ggml/pull/302#discussion_r1243240963)
3536

3637
```cpp
@@ -88,8 +89,6 @@
8889
> [!NOTE]
8990
> This guideline is yet to be applied to the `llama.cpp` codebase. New code should follow this guideline.
9091
91-
- Follow the existing code style, in case of doubt use `clang-format` to format the added code
92-
9392
- (TODO: abbreviations usage)
9493
9594
# Resources

0 commit comments

Comments
 (0)