| | |
| | | string code = gpCodes[index]; |
| | | try { |
| | | clock_t start = clock(); |
| | | list<TradeData> resultList = captureLevel2TradeData(CaptureUtil::capture(index, CAPTURE_TYPE_L2), index); |
| | | data_callback(index, code, resultList, context); |
| | | cout << "时间消耗:" << clock() - start << endl; |
| | | cv::Mat mat = CaptureUtil::capture(index, CAPTURE_TYPE_L2); |
| | | list<TradeData> resultList = captureLevel2TradeData(mat, index); |
| | | long processTime = clock() - start; |
| | | data_callback(index, code, start , processTime, resultList, context); |
| | | cout << "时间消耗:" << processTime << endl; |
| | | } |
| | | catch (...) { |
| | | |
| | |
| | | } |
| | | |
| | | void L2DataCapture::setGPCode(int index, string code) { |
| | | int length = sizeof(gpCodes) / sizeof(gpCodes[0]); |
| | | if (length <= index) { |
| | | if (THS_FRAME_COUNT <= index) { |
| | | return; |
| | | } |
| | | |
| | | gpCodes[index] = code; |
| | | } |
| | | |
| | |
| | | |
| | | list<TradeData> resultList= captureLevel2TradeData(openCLExcuter[identify], oimg, identify); |
| | | |
| | | std::cout << "-------L2行情识别结束任务: threadid-" << std::this_thread::get_id() << " 序号:" << identify << " 耗时:" << clock() - starttime <<" 数据量:"<< resultList.size() << endl; |
| | | std::cout << "-------L2行情识别结束任务: threadid-" << std::this_thread::get_id() << " 序号:" << identify << " CODE:"<< gpCodes[identify] << " 耗时:" << clock() - starttime <<" 数据量:"<< resultList.size() << endl; |
| | | |
| | | return resultList; |
| | | } |