1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef CONST_H 16 #define CONST_H 17 18 #include <string> 19 #include <vector> 20 21 namespace OHOS { 22 namespace NeuralNetworkRuntime { 23 namespace Test { 24 25 const uint32_t ADD_DATA_LENGTH = 4 * sizeof(float); 26 const uint32_t AVG_INPUT_LENGTH = 9 * sizeof(float); 27 const std::vector<int32_t> TENSOR_SHAPE = {1, 2, 2, 1}; 28 const std::vector<int32_t> PARAM_INDEX = {2}; 29 const std::vector<int32_t> INPUT_INDEX = {0, 1}; 30 const std::vector<int32_t> OUTPUT_INDEX = {3}; 31 const int32_t ELEMENT_COUNT = 4; 32 33 const std::string CACHE_DIR = "./cache"; 34 const std::string CACHE_PATH = CACHE_DIR + "/0.nncache"; 35 const std::string CACHE_INFO_PATH = CACHE_DIR + "/cache_info.nncache"; 36 const uint32_t NO_DEVICE_COUNT = 0; 37 const int STRESS_COUNT = 100000; 38 const int PRINT_FREQ = 500; 39 40 } // namespace Test 41 } // namespace NeuralNetworkRuntime 42 } // namespace OHOS 43 44 #endif // CONST_H