派生自 development/c++

xuxiuxi
2019-03-08 c5b9ce0c0cf973575a936df3aa928d4b7a7fa7d2
QiaoJiaSystem/YoloServer/main.cpp
@@ -7,6 +7,7 @@
#include <basic/util/app/AppConfig.h>
int main(int argc, char **argv) {
    std::cout<<__DATE__<<" "<<__TIME__<<std::endl;
    SAVE_APP_ARGS;
    ENABLEGLOG(GET_STR_CONFIG("logPath").c_str());
    auto ich = Ice::initialize(argc, argv);
@@ -24,23 +25,23 @@
//    adapter->activate();
//    ich->waitForShutdown();
    if (argc < 3) {
        ERR("argc error");
        return -1;
    }
//    if (argc < 3) {
//        ERR("argc error");
//        return -1;
//    }
    int gpuindex = atoi(argv[1]);
    int poolNum = atoi(argv[2]);
    int portNum = atoi(argv[3]);
    int gpuindex = 0;
    int poolNum = 1;
    int portNum = 10003;
    appPref.setIntData("gpu.index", gpuindex);
    appPref.setFloatData("thresh.detect", 0.7);
    appPref.setFloatData("thresh.detect", 0.85);
    appPref.setIntData("poolNum", poolNum);
    IceRpcServer<YoloDetectServerI> server("yoloServer", portNum, "tcp");
    server.setMessageSizeMax(1024 * 1024 * 50);
    server.setPoolInitSize(poolNum);
    server.setPoolMaxSize(poolNum);
    server.setPoolInitSize(1);
    server.setPoolMaxSize(1);
    server.runWaitShutDown();
    return 0;
}