Home
last modified time | relevance | path

Searched refs:ScopedMmap (Results 1 – 12 of 12) sorted by relevance

/external/libtextclassifier/native/utils/memory/
Dmmap.h117 class ScopedMmap {
119 explicit ScopedMmap(const std::string &filename) in ScopedMmap() function
122 explicit ScopedMmap(int fd) : handle_(MmapFile(fd)) {} in ScopedMmap() function
124 ScopedMmap(int fd, int segment_offset, int segment_size) in ScopedMmap() function
127 ~ScopedMmap() { in ~ScopedMmap()
/external/libtextclassifier/native/lang_id/common/file/
Dmmap.h116 class ScopedMmap {
118 explicit ScopedMmap(const std::string &filename) in ScopedMmap() function
121 explicit ScopedMmap(FileDescriptorOrHandle fd) : handle_(MmapFile(fd)) {} in ScopedMmap() function
123 explicit ScopedMmap(FileDescriptorOrHandle fd, size_t offset_in_bytes, in ScopedMmap() function
127 ~ScopedMmap() { in ~ScopedMmap()
Dfile-utils.cc35 ScopedMmap scoped_mmap(filename); in GetFileContent()
Dfile-utils.h63 ScopedMmap scoped_mmap(filename); in ReadProtoFromFile()
/external/libtextclassifier/native/actions/
Dactions_jni.cc377 JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetLocalesFromMmap()
389 jint GetVersionFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetVersionFromMmap()
402 JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetNameFromMmap()
536 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
537 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
546 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
547 new libtextclassifier3::ScopedMmap(fd, offset, size)); in TC3_JNI_METHOD()
556 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
557 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
566 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
[all …]
Dactions-suggestions.cc131 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap, const UniLib* unilib, in FromScopedMmap()
157 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap, in FromScopedMmap()
187 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap; in FromFileDescriptor()
189 mmap.reset(new libtextclassifier3::ScopedMmap(fd, offset, size)); in FromFileDescriptor()
191 mmap.reset(new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
201 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap; in FromFileDescriptor()
203 mmap.reset(new libtextclassifier3::ScopedMmap(fd, offset, size)); in FromFileDescriptor()
205 mmap.reset(new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
214 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in FromFileDescriptor()
215 new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
[all …]
Dactions-suggestions.h60 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap,
65 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap,
235 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap_;
287 ScopedMmap mmap(path); in VisitActionsModel()
/external/libtextclassifier/native/lang_id/fb_model/
Dmodel-provider-from-fb.cc37 : scoped_mmap_(new ScopedMmap(filename)) { in ModelProviderFromFlatbuffer()
47 : scoped_mmap_(new ScopedMmap(fd)) { in ModelProviderFromFlatbuffer()
57 : scoped_mmap_(new ScopedMmap(fd, offset, size)) { in ModelProviderFromFlatbuffer()
Dmodel-provider-from-fb.h93 const std::unique_ptr<ScopedMmap> scoped_mmap_;
/external/libtextclassifier/native/annotator/
Dannotator_jni.cc441 JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetLocalesFromMmap()
454 jint GetVersionFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetVersionFromMmap()
467 JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetNameFromMmap()
911 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
912 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
920 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
921 new libtextclassifier3::ScopedMmap(fd, offset, size)); in TC3_JNI_METHOD()
929 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
930 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
936 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
[all …]
Dannotator.h119 std::unique_ptr<ScopedMmap>* mmap, const UniLib* unilib = nullptr,
122 std::unique_ptr<ScopedMmap>* mmap, std::unique_ptr<UniLib> unilib,
162 bool InitializePersonNameEngineFromScopedMmap(const ScopedMmap& mmap);
510 std::unique_ptr<ScopedMmap> mmap_;
595 ScopedMmap mmap(path); in VisitAnnotatorModel()
Dannotator.cc198 std::unique_ptr<ScopedMmap>* mmap, const UniLib* unilib, in FromScopedMmap()
226 std::unique_ptr<ScopedMmap>* mmap, std::unique_ptr<UniLib> unilib, in FromScopedMmap()
256 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd, offset, size)); in FromFileDescriptor()
263 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd, offset, size)); in FromFileDescriptor()
269 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd)); in FromFileDescriptor()
276 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd)); in FromFileDescriptor()
283 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(path)); in FromPath()
290 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(path)); in FromPath()
671 const ScopedMmap& mmap) { in InitializePersonNameEngineFromScopedMmap()
682 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(path)); in InitializePersonNameEngineFromPath()
[all …]