Home
last modified time | relevance | path

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

/external/libtextclassifier/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/lang_id/common/file/
Dmmap.h97 class ScopedMmap {
99 explicit ScopedMmap(const string &filename) in ScopedMmap() function
102 explicit ScopedMmap(int fd) in ScopedMmap() function
105 ~ScopedMmap() { in ~ScopedMmap()
Dfile-utils.cc33 ScopedMmap scoped_mmap(filename); in GetFileContent()
Dfile-utils.h62 ScopedMmap scoped_mmap(filename); in ReadProtoFromFile()
/external/libtextclassifier/annotator/
Dannotator_jni.cc357 jstring GetLocalesFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetLocalesFromMmap()
369 jint GetVersionFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetVersionFromMmap()
381 jstring GetNameFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetNameFromMmap()
650 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
651 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
659 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
660 new libtextclassifier3::ScopedMmap(fd, offset, size)); in TC3_JNI_METHOD()
666 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
667 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
675 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
[all …]
Dannotator.h193 std::unique_ptr<ScopedMmap>* mmap, const UniLib* unilib = nullptr,
196 std::unique_ptr<ScopedMmap>* mmap, std::unique_ptr<UniLib> unilib,
282 Annotator(std::unique_ptr<ScopedMmap>* mmap, const Model* model,
284 Annotator(std::unique_ptr<ScopedMmap>* mmap, const Model* model,
485 std::unique_ptr<ScopedMmap> mmap_;
553 ScopedMmap mmap(path); in VisitAnnotatorModel()
Dannotator.cc128 std::unique_ptr<ScopedMmap>* mmap, const UniLib* unilib, in FromScopedMmap()
152 std::unique_ptr<ScopedMmap>* mmap, std::unique_ptr<UniLib> unilib, in FromScopedMmap()
178 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd, offset, size)); in FromFileDescriptor()
185 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd, offset, size)); in FromFileDescriptor()
191 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd)); in FromFileDescriptor()
198 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(fd)); in FromFileDescriptor()
205 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(path)); in FromPath()
212 std::unique_ptr<ScopedMmap> mmap(new ScopedMmap(path)); in FromPath()
216 Annotator::Annotator(std::unique_ptr<ScopedMmap>* mmap, const Model* model, in Annotator()
227 Annotator::Annotator(std::unique_ptr<ScopedMmap>* mmap, const Model* model, in Annotator()
/external/libtextclassifier/actions/
Dactions_jni.cc268 jstring GetLocalesFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetLocalesFromMmap()
280 jint GetVersionFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetVersionFromMmap()
292 jstring GetNameFromMmap(JNIEnv* env, libtextclassifier3::ScopedMmap* mmap) { in GetNameFromMmap()
391 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
392 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
398 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
399 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
405 const std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in TC3_JNI_METHOD()
406 new libtextclassifier3::ScopedMmap(fd)); in TC3_JNI_METHOD()
Dactions-suggestions.cc103 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap, const UniLib* unilib, in FromScopedMmap()
129 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap, in FromScopedMmap()
159 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap; in FromFileDescriptor()
161 mmap.reset(new libtextclassifier3::ScopedMmap(fd, offset, size)); in FromFileDescriptor()
163 mmap.reset(new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
173 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap; in FromFileDescriptor()
175 mmap.reset(new libtextclassifier3::ScopedMmap(fd, offset, size)); in FromFileDescriptor()
177 mmap.reset(new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
186 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap( in FromFileDescriptor()
187 new libtextclassifier3::ScopedMmap(fd)); in FromFileDescriptor()
[all …]
Dactions-suggestions.h60 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap,
65 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap,
263 std::unique_ptr<libtextclassifier3::ScopedMmap> mmap_;
308 ScopedMmap mmap(path); in VisitActionsModel()
/external/libtextclassifier/lang_id/fb_model/
Dmodel-provider-from-fb.cc33 : scoped_mmap_(new ScopedMmap(filename)) { in ModelProviderFromFlatbuffer()
42 : scoped_mmap_(new ScopedMmap(fd)) { in ModelProviderFromFlatbuffer()
Dmodel-provider-from-fb.h90 const std::unique_ptr<ScopedMmap> scoped_mmap_;