forked from ggml-org/llama.cpp
-
Couldn't load subscription status.
- Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefactoringroadmap
Description
Note: This issue was copied from ggml-org#4574
Original Author: @MarcusDunn
Original Issue Number: ggml-org#4574
Created: 2023-12-21T19:55:14Z
Feature Description
llama.h should prefer to use sized (always) + signed (mostly) integers.
Motivation
The integer types in llama.h right now are.
| Count | Type |
|---|---|
| 33 | int |
| 10 | int32_t |
| 24 | uint32_t |
| 2 | int64_t |
| 2 | uint64_t |
In ggml-org#4540 there was a discussion around preferences for integer types on new methods.
Avoiding int makes cross platform code simpler at essentially no cost.
Signed makes arithmetic simpler at the cost of some bits if you need something large.
Possible Implementation
- Change all
int's toint32_t - As code changes try to prefer signed integers.
We could also do some higher-impact things, but I'd take the lower-impact slower changes over a large find-and-replace.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersrefactoringroadmap