1 /* 2 * Copyright (C) 2021 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 16 #ifndef AIE_CLIENT_COMMON_H 17 #define AIE_CLIENT_COMMON_H 18 19 #include <cstring> 20 21 #include "client_executor/include/i_aie_client.inl" 22 #include "utils/aie_client_const.h" 23 #include "utils/log/aie_log.h" 24 #include "utils/utils.h" 25 26 /** 27 * Constructs ConfigInfo parameters. 28 */ 29 void GetConfigInfo(ConfigInfo &configInfo); 30 31 /** 32 * Constructs ConfigInfo parameters,including specified description. 33 */ 34 void GetConfigInfo2(ConfigInfo &configInfo, const char *description); 35 36 /** 37 * Constructs ClientInfo parameters. 38 */ 39 void GetClientInfo(ClientInfo &clientInfo); 40 41 /** 42 * Constructs AlgorithmInfo parameters. 43 */ 44 void GetSyncAlgorithmInfo(AlgorithmInfo &algorithmInfo, bool isAsync, int algorithmType); 45 46 /** 47 * Constructs DataInfo. 48 */ 49 DataInfo GetDataInfo(bool isDataInfoNull = true, const char *dataString = DATA_INFO_DEFAULT); 50 51 /** 52 * Constructs DataInfo with a big length data. 53 */ 54 DataInfo GetBigDataInfo(bool isDataInfoNull = true); 55 56 /** 57 * Release DataInfo. 58 */ 59 void FreeDataInfo(DataInfo &dataInfo); 60 61 #endif