Lines Matching refs:modelCache
317 const std::vector<ndk::ScopedFileDescriptor>& modelCache, in saveModelToCache() argument
328 modelCache, dataCache, cacheToken, preparedModelCallback); in saveModelToCache()
369 void prepareModelFromCache(const std::vector<ndk::ScopedFileDescriptor>& modelCache, in prepareModelFromCache() argument
378 kNoDeadline, modelCache, dataCache, cacheToken, preparedModelCallback); in prepareModelFromCache()
394 kNoDeadline, modelCache, dataCache, cacheToken, preparedModelCallback); in prepareModelFromCache()
417 void verifyModelPreparationBehaviour(const std::vector<ndk::ScopedFileDescriptor>& modelCache, in verifyModelPreparationBehaviour() argument
425 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in verifyModelPreparationBehaviour()
435 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in verifyModelPreparationBehaviour()
491 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
492 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
494 saveModelToCache(model, modelCache, dataCache); in TEST_P()
501 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
502 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
504 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in TEST_P()
532 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
533 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
538 for (uint32_t i = 0; i < modelCache.size(); i++) { in TEST_P()
539 ASSERT_EQ(write(modelCache[i].get(), &placeholderBytes, sizeof(placeholderBytes)), in TEST_P()
546 saveModelToCache(model, modelCache, dataCache); in TEST_P()
553 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
554 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
559 for (uint32_t i = 0; i < modelCache.size(); i++) { in TEST_P()
560 ASSERT_GE(read(modelCache[i].get(), &placeholderByte, 1), 0); in TEST_P()
565 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in TEST_P()
592 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
595 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
599 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
604 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
609 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
613 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
617 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
622 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
627 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
630 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
634 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
639 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
644 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
648 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
652 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
657 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
669 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
670 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
672 saveModelToCache(model, modelCache, dataCache); in TEST_P()
677 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
679 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
683 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
688 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
691 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
695 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
700 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
702 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
706 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
711 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
714 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
718 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
732 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
734 createCacheFds(mModelCache, modelCacheMode, &modelCache); in TEST_P()
738 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
743 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
748 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
750 createCacheFds(mModelCache, modelCacheMode, &modelCache); in TEST_P()
754 saveModelToCache(model, modelCache, dataCache, &preparedModel); in TEST_P()
759 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
773 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
774 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
776 saveModelToCache(model, modelCache, dataCache); in TEST_P()
781 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
783 createCacheFds(mModelCache, modelCacheMode, &modelCache); in TEST_P()
787 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
792 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
794 createCacheFds(mModelCache, modelCacheMode, &modelCache); in TEST_P()
797 verifyModelPreparationBehaviour(modelCache, dataCache, &model, testModel); in TEST_P()
847 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
848 createCacheFds(modelCacheMul, AccessMode::READ_WRITE, &modelCache); in TEST_P()
850 saveModelToCache(modelMul, modelCache, dataCache); in TEST_P()
860 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
861 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
866 saveModelToCache(modelAdd, modelCache, dataCache); in TEST_P()
874 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
875 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
877 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in TEST_P()
910 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
911 createCacheFds(modelCacheMul, AccessMode::READ_WRITE, &modelCache); in TEST_P()
913 saveModelToCache(modelMul, modelCache, dataCache); in TEST_P()
923 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
924 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
926 saveModelToCache(modelAdd, modelCache, dataCache); in TEST_P()
933 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
934 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
939 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status, in TEST_P()
973 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
974 createCacheFds(modelCacheMul, AccessMode::READ_WRITE, &modelCache); in TEST_P()
976 saveModelToCache(modelMul, modelCache, dataCache); in TEST_P()
984 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
985 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
987 saveModelToCache(modelAdd, modelCache, dataCache); in TEST_P()
997 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in TEST_P() local
998 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in TEST_P()
1000 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status); in TEST_P()
1088 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in testCorruptedCache() local
1089 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in testCorruptedCache()
1091 saveModelToCache(model, modelCache, dataCache); in testCorruptedCache()
1102 std::vector<ndk::ScopedFileDescriptor> modelCache, dataCache; in testCorruptedCache() local
1103 createCacheFds(mModelCache, AccessMode::READ_WRITE, &modelCache); in testCorruptedCache()
1105 prepareModelFromCache(modelCache, dataCache, &preparedModel, &status); in testCorruptedCache()