Skip to content

Commit f1a4b69

Browse files
Update preprocessor directives according to guidelines
1 parent 8420640 commit f1a4b69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/llama-model-loader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ bool llama_model_loader::load_all_data(
10301030
if (byteswap != nullptr) {
10311031
byteswap(cur->data, ggml_nelements(cur) / ggml_blck_size(cur->type));
10321032
}
1033-
#endif
1033+
#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
10341034

10351035
if (check_tensors) {
10361036
validation_result.emplace_back(std::async(std::launch::async, [cur, n_size] {
@@ -1066,7 +1066,7 @@ bool llama_model_loader::load_all_data(
10661066
if (byteswap != nullptr) {
10671067
byteswap(read_buf.data(), read_buf.size() / ggml_blck_size(cur->type));
10681068
}
1069-
#endif
1069+
#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
10701070

10711071
ggml_backend_tensor_set(cur, read_buf.data(), 0, n_size);
10721072
if (check_tensors && !ggml_validate_row_data(cur->type, read_buf.data(), n_size)) {

src/unicode.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ struct unicode_cpt_flags {
5353
is_lowercase = (flags & LOWERCASE) ? 1 : 0;
5454
is_uppercase = (flags & UPPERCASE) ? 1 : 0;
5555
is_nfd = (flags & NFD) ? 1 : 0;
56-
#else
56+
#else // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
5757
#error Unexpected or undefined __BYTE_ORDER__
58-
#endif
58+
#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
5959
}
6060

6161
inline uint16_t as_uint() const {
@@ -78,9 +78,9 @@ struct unicode_cpt_flags {
7878
;
7979

8080
return result;
81-
#else
81+
#else // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
8282
#error Unexpected or undefined __BYTE_ORDER__
83-
#endif
83+
#endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
8484
}
8585

8686
inline uint16_t category_flag() const {

0 commit comments

Comments
 (0)