llama : split unicodedata.cpp from unicode.cpp
This commit is contained in:
parent
b80c0af078
commit
e5ddf2fcdd
5 changed files with 1430 additions and 1404 deletions
|
@ -1165,6 +1165,7 @@ add_library(llama
|
|||
llama.h
|
||||
unicode.h
|
||||
unicode.cpp
|
||||
unicodedata.cpp
|
||||
)
|
||||
|
||||
target_include_directories(llama PUBLIC .)
|
||||
|
|
2
Makefile
2
Makefile
|
@ -663,7 +663,7 @@ ggml-backend.o: ggml-backend.c ggml.h ggml-backend.h
|
|||
ggml-quants.o: ggml-quants.c ggml.h ggml-quants.h ggml-common.h
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
unicode.o: unicode.cpp unicode.h
|
||||
unicode.o: unicode.cpp unicodedata.cpp unicode.h unicodedata.h
|
||||
$(CXX) $(CXXFLAGS) -c $< -o $@
|
||||
|
||||
OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o unicode.o
|
||||
|
|
1407
unicode.cpp
1407
unicode.cpp
File diff suppressed because it is too large
Load diff
1409
unicodedata.cpp
Normal file
1409
unicodedata.cpp
Normal file
File diff suppressed because it is too large
Load diff
15
unicodedata.h
Normal file
15
unicodedata.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_digit;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_letter;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_whitespace;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_accent_mark;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_punctuation;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_symbol;
|
||||
extern const std::vector<std::pair<uint32_t, uint32_t>> unicode_ranges_control;
|
||||
extern const std::multimap<uint32_t, uint32_t> unicode_map_nfd;
|
Loading…
Add table
Add a link
Reference in a new issue