• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ cl函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中cl函数的典型用法代码示例。如果您正苦于以下问题:C++ cl函数的具体用法?C++ cl怎么用?C++ cl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了cl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: cl

void CTraderApi::AddToSendQueue(SRequest * pRequest)
{
	if (NULL == pRequest)
		return;

	CLock cl(&m_csList);
	bool bFind = false;

	if (!bFind)
		m_reqList.push_back(pRequest);

	if (NULL == m_hThread
		&&!m_reqList.empty())
	{
		m_bRunning = true;
		m_hThread = CreateThread(NULL,0,SendThread_TD,this,0,NULL); 
	}
}
开发者ID:fouvy,项目名称:XSpeed,代码行数:18,代码来源:TraderApi.cpp


示例2: assert

bool
manager::wait_for_next(void)
{
   client *cl((client*)pthread_getspecific(client_key));
   assert(cl != NULL);

   cl->cunits++;

   while(cl->counter <= 0) {
      if(cl->done)
         return true;
      usleep(100);
   }
   if(cl->done)
      return true;
   cl->counter--;
   return true;
}
开发者ID:ankitC,项目名称:meld,代码行数:18,代码来源:manager.cpp


示例3: cl

inline T& UMatrix2D<T>::GetValue(unsigned int x,unsigned int y)
{
#ifdef _SAFE_ACCESS_
    CheckLocker cl(GetLocker());
#endif //_SAFE_ACCESS_
    
    if(x>=nX) {
        ms=MXS_ERR_OUT_OF_INDEX;throw(this);
    } else if(y>=nY) {
        ms=MXS_ERR_OUT_OF_INDEX;throw(this);
    } else ms = MXS_OK;
    
    if(mso == MSO_XY)
        return Ptr[y*nX + x];
    else
        return Ptr[x*nY + y];
    //  return Ptr[ATF(x,y,atfN)]; 
}
开发者ID:BOuissem,项目名称:openhyperflow2d,代码行数:18,代码来源:umatrix2d.hpp


示例4: read_clique

void read_clique(vector<vector<int>> &neutral_vectors){
	ifstream cl("clique.txt");
	int count = -1;
	string c;
	while (!cl.eof())
	{
		getline(cl, c);
		count++;
	}
	cl.close();
	cl.open("clique.txt");
	vector<int> init = { -1, -1, -1, -1, -1 };
	for (int v = 0; v < count; v++){
		neutral_vectors.push_back(init);
		cl >> neutral_vectors[v][0] >> neutral_vectors[v][1] >> neutral_vectors[v][2] >> neutral_vectors[v][3] >> neutral_vectors[v][4];
	}
	cl.close();
}
开发者ID:Murony,项目名称:Cameleo,代码行数:18,代码来源:set_constructor.cpp


示例5: hs_dummy_kernel_enqueue

static
void
hs_dummy_kernel_enqueue(cl_command_queue cq,
                        uint32_t         wait_list_size,
                        cl_event const * wait_list,
                        cl_event       * event)
{
  size_t const global_work_size = 1;

  cl(EnqueueNDRangeKernel(cq,
                          hs_dummy_kernel,
                          1,
                          NULL,
                          &global_work_size,
                          NULL,
                          wait_list_size,
                          wait_list,
                          event));
}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:19,代码来源:main.c


示例6: ConstantPool

void InterpretTest::callTest()
{
	ConstantPool * pool = new ConstantPool();
	Class * cls = initClass("CallTest", pool);
	const char code1[] = 
	{
		RET_VOID
	};
	const char code2[] = 
	{
		PUSH, 0x00, 0x00,
		RET
	};
	const char code[] =
	{
		CALL, 0x01, 0x00, 0x02, 0x00, //ClassRef na pozici 1, MethodRef na pozici 2
		CALL, 0x01, 0x00, 0x03, 0x00, //ClassRef na pozici 1, MethodRef na pozici 3
		RET
	};
	Method * m = initMethod("callTest", code, sizeof(code), 0, 0, 0);
	Method * m1 = initMethod("returnVoid", code1, sizeof(code1), 0, 0, 0);
	Method * m2 = initMethod("returnInt", code2, sizeof(code2), 0, 0, 0);
	ClassLoader cl("");
	Interpret instance(&cl);
	IntConst i;
	i.value = 1;
	pool->addItem(&i, INT_CONST);//0
	ClassRef cr;
	memset(cr.name, 0x00, IDENTIFIER_LENGTH);
	sprintf(cr.name, "%s", cls->getName().c_str());
	pool->addItem(&cr, CLASS_REF);//1
	MethodRef mr;
	sprintf(mr.name, "%s", m1->getName().c_str());
	mr.params = 0;
	pool->addItem(&mr, METHOD_REF);//2
	sprintf(mr.name, "%s", m2->getName().c_str());
	pool->addItem(&mr, METHOD_REF);//3
	cls->addMethod(m);
	cls->addMethod(m1);
	cls->addMethod(m2);
	cl.addClass(cls);
	assert(1 == instance.run(cls->getName().c_str(), m->getName().c_str()));
}
开发者ID:kacurez,项目名称:MIRUN,代码行数:43,代码来源:interprettest.cpp


示例7: initParserByString

void initParserByString(char * str)
{
	pSt.type = PT_STRING;

	cl();
	waitLex();

	if (pSt.srcStr != NULL)
		free(pSt.srcStr);
	pSt.srcStr = str;
	/*pSt.fileStr = NULL;*/

	if (pSt.list == NULL)
		pSt.list = newLexList();
	else
		clearLexList(pSt.list);

	initLexerByString(str);
}
开发者ID:kpoxapy,项目名称:manager-game-c,代码行数:19,代码来源:parser.c


示例8: clearParser

void clearParser()
{
	pSt.type = PT_STDIN;

	cl();
	waitLex();

	pSt.srcStr = NULL;
	/*pSt.fileStr = NULL;*/

	if (pSt.list != NULL)
	{
		clearLexList(pSt.list);
		free(pSt.list);
		pSt.list = NULL;
	}

	clearLexer();
}
开发者ID:kpoxapy,项目名称:C_university,代码行数:19,代码来源:parser.c


示例9: scanCard

  void scanCard(size_t index, HeapRegion *r) {
    // Stack allocate the DirtyCardToOopClosure instance
    HeapRegionDCTOC cl(_g1h, r, _oc,
                       CardTableModRefBS::Precise);

    // Set the "from" region in the closure.
    _oc->set_region(r);
    MemRegion card_region(_bot_shared->address_for_index(index), G1BlockOffsetSharedArray::N_words);
    MemRegion pre_gc_allocated(r->bottom(), r->scan_top());
    MemRegion mr = pre_gc_allocated.intersection(card_region);
    if (!mr.is_empty() && !_ct_bs->is_card_claimed(index)) {
      // We make the card as "claimed" lazily (so races are possible
      // but they're benign), which reduces the number of duplicate
      // scans (the rsets of the regions in the cset can intersect).
      _ct_bs->set_card_claimed(index);
      _cards_done++;
      cl.do_MemRegion(mr);
    }
  }
开发者ID:netroby,项目名称:jdk9-shenandoah-hotspot,代码行数:19,代码来源:g1RemSet.cpp


示例10: skc_raster_builder_pfn_release

static
void
skc_raster_builder_pfn_release(struct skc_raster_builder_impl * const impl)
{
  // decrement reference count
  if (--impl->raster_builder->refcount != 0)
    return;

  //
  // otherwise, dispose of the the raster builder and its impl
  //
  struct skc_runtime * const runtime = impl->runtime;

  // free the raster builder
  skc_runtime_host_perm_free(runtime,impl->raster_builder);

  // free durable/perm extents
  skc_extent_phrwg_thr1s_free(runtime,&impl->path_ids);
  skc_extent_phw1g_tdrNs_free(runtime,&impl->transforms);
  skc_extent_phw1g_tdrNs_free(runtime,&impl->clips);
  skc_extent_phw1g_tdrNs_free(runtime,&impl->fill_cmds);
  skc_extent_phrwg_tdrNs_free(runtime,&impl->raster_ids);

  // release kernels
  cl(ReleaseKernel(impl->kernels.fills_expand));
  cl(ReleaseKernel(impl->kernels.rasterize_all));

#if 0
  cl(ReleaseKernel(impl->kernels.rasterize_lines));
  cl(ReleaseKernel(impl->kernels.rasterize_quads));
  cl(ReleaseKernel(impl->kernels.rasterize_cubics));
#endif

  cl(ReleaseKernel(impl->kernels.segment));
  cl(ReleaseKernel(impl->kernels.rasters_alloc));
  cl(ReleaseKernel(impl->kernels.prefix));

  // free the impl
  skc_runtime_host_perm_free(runtime,impl);
}
开发者ID:jasonLaster,项目名称:gecko-dev,代码行数:40,代码来源:raster_builder_cl_12.c


示例11: main

int main (int argc, char *argv[] )

{
  ODABAClient      uti_client(argc > 1 ? argv[1] : NULL,"WorkSpace",argv[0],APT_Console);
  CommandLine      cl(NULL);
  char             tree_opt[3];
  logical          term = NO;
BEGINSEQ

  CSUtilityHandle  uti_handle(uti_client,"WorkSpace",argc > 1 ? argv[1] : NULL,argv[0],APT_Console);
  
  std::cout << std::endl << "Running Workspace Utility ..." << std::endl;
  std::cout.flush();
  
  if ( CheckRuntimeParms(argc,argv,4,7) )            ERROR
  if ( uti_handle.sdbures->SetupVariables(argv[2]) ) ERROR

  cl.InputFromArguments(argc,argv);
  
  *tree_opt = 0;
  if ( cl.GetOption('T') || cl.GetOption('t') )  
    strcpy(tree_opt,"-T");
    
  if ( UWorkspace(uti_handle,cl.Parm(2),cl.Parm(3),cl.Parm(4),tree_opt) )
                                                     ERROR
  
  std::cout << std::endl << argv[3] << " Workspace terminated successfully." << std::endl;
  std::cout.flush();


RECOVER

  std::cout << std::endl << (argc > 3 ? argv[3] : "")    << " Workspace"
       << (argc > 3 ? "" : " Utility") << " terminated with errors. See error log for details." << std::endl;
  std::cout.flush();
  term = YES;

ENDSEQ

  uti_client.ShutDown();
  return(term);
}
开发者ID:BackupTheBerlios,项目名称:openaqua-svn,代码行数:42,代码来源:WorkSpace.cpp


示例12: QString

QString CardOCR::suit(const QImage * img_wb, const QImage * img)
{
   if ((img_wb->width() != img->width()) ||
      (img_wb->height() != img->height()))
      return QString();

   const int w = img->width();
   const int h = img->height();
   
   QRgb clMinValue;
   qreal minVal = 1.0;
   for (int x = 0; x < w; ++x)
   {
      for (int y = 0; y < h; ++y)
      {
         QRgb rgb_wb = img_wb->pixel(x, y);
         //рассматриваем только черные точки
         if (rgb_wb == qRgb(0, 0, 0))
         {
            QRgb rgb = img->pixel(x, y);
            QColor cl(rgb);
            if (cl.valueF() < minVal)
            {
               minVal = cl.valueF();
               clMinValue = rgb;
               //qDebug() << x << y;
            }
         }
      }
   }
   
   if (isRed(clMinValue))
      return "h";
   else if (isBlue(clMinValue))
      return "d";
   else if (isGreen(clMinValue))
      return "c";
   else
      return "s";

   return QString();
}
开发者ID:lazyrun,项目名称:pokerbot,代码行数:42,代码来源:CardOCR.cpp


示例13: BuildJoinSpecs

void JoinCommand :: BuildJoinSpecs( const string & js ) {

	if ( js == "" ) {
		CSVTHROW( "No join specified with " << FLAG_COLS << " flag" );
	}

	ALib::CommaList cl( js );
	for ( unsigned int i = 0; i < cl.Size(); i++ ) {
		vector <string> cols;
		if ( ALib::Split( cl.At(i), ':', cols ) != 2 ) {
			CSVTHROW( "Invalid join specification: " << cl.At(i) );
		}
		int c1 = ALib::ToInteger( cols[0], "Invalid column: " + cols[0] );
		int c2 = ALib::ToInteger( cols[1], "Invalid column: " + cols[1] );
		if ( c1 < 1 || c2 < 1 ) {
			CSVTHROW( "Invalid join specfication: " << cl.At(i) );
		}
		mJoinSpecs.push_back( std::make_pair( c1 - 1, c2 - 1 ) );
	}
}
开发者ID:bminossi,项目名称:csvfix,代码行数:20,代码来源:csved_join.cpp


示例14: cl

void VCCueList_Test::keySequences()
{
    QWidget w;

    VCCueList cl(&w, m_doc);
    cl.setNextKeySequence(QKeySequence(keySequenceB));
    QCOMPARE(cl.nextKeySequence(), QKeySequence(keySequenceB));
    QCOMPARE(cl.previousKeySequence(), QKeySequence());
    QCOMPARE(cl.playbackKeySequence(), QKeySequence());

    cl.setPreviousKeySequence(QKeySequence(keySequenceA));
    QCOMPARE(cl.nextKeySequence(), QKeySequence(keySequenceB));
    QCOMPARE(cl.previousKeySequence(), QKeySequence(keySequenceA));
    QCOMPARE(cl.playbackKeySequence(), QKeySequence());

    cl.setPlaybackKeySequence(QKeySequence(keySequenceD));
    QCOMPARE(cl.nextKeySequence(), QKeySequence(keySequenceB));
    QCOMPARE(cl.previousKeySequence(), QKeySequence(keySequenceA));
    QCOMPARE(cl.playbackKeySequence(), QKeySequence(keySequenceD));
}
开发者ID:PML369,项目名称:qlcplus,代码行数:20,代码来源:vccuelist_test.cpp


示例15: cl

void NR::bcucof(Vec_I_DP &y, Vec_I_DP &y1, Vec_I_DP &y2, Vec_I_DP &y12,
	const DP d1, const DP d2, Mat_O_DP &c)
{
	static int wt_d[16*16]=
		{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,
		-3, 0, 0, 3, 0, 0, 0, 0,-2, 0, 0,-1, 0, 0, 0, 0,
		2, 0, 0,-2, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0,
		0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
		0, 0, 0, 0,-3, 0, 0, 3, 0, 0, 0, 0,-2, 0, 0,-1,
		0, 0, 0, 0, 2, 0, 0,-2, 0, 0, 0, 0, 1, 0, 0, 1,
		-3, 3, 0, 0,-2,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0,-3, 3, 0, 0,-2,-1, 0, 0,
		9,-9, 9,-9, 6, 3,-3,-6, 6,-6,-3, 3, 4, 2, 1, 2,
		-6, 6,-6, 6,-4,-2, 2, 4,-3, 3, 3,-3,-2,-1,-1,-2,
		2,-2, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
		0, 0, 0, 0, 0, 0, 0, 0, 2,-2, 0, 0, 1, 1, 0, 0,
		-6, 6,-6, 6,-3,-3, 3, 3,-4, 4, 2,-2,-2,-2,-1,-1,
		4,-4, 4,-4, 2, 2,-2,-2, 2,-2,-2, 2, 1, 1, 1, 1};
	int l,k,j,i;
	DP xx,d1d2;
	Vec_DP cl(16),x(16);
	static Mat_INT wt(wt_d,16,16);

	d1d2=d1*d2;
	for (i=0;i<4;i++) {
		x[i]=y[i];
		x[i+4]=y1[i]*d1;
		x[i+8]=y2[i]*d2;
		x[i+12]=y12[i]*d1d2;
	}
	for (i=0;i<16;i++) {
		xx=0.0;
		for (k=0;k<16;k++) xx += wt[i][k]*x[k];
		cl[i]=xx;
	}
	l=0;
	for (i=0;i<4;i++)
		for (j=0;j<4;j++) c[i][j]=cl[l++];
}
开发者ID:1040003585,项目名称:LearnedCandCPP,代码行数:41,代码来源:bcucof.cpp


示例16: maxHue

int maxHue(const QImage & img)
{
   QMap<int, int> hueGist;
   QMap<int, int> hueGray;

   const int width = img.width();
   const int height = img.height();
   for (int x = 0; x < width; ++x)
   {
      for (int y = 0; y < height; ++y)
      {
         QRgb rgb = img.pixel(x, y);
         QColor cl(rgb);
         if (cl.red() > 200 && cl.green() > 200 && cl.blue() > 200)
            continue;
         
         int gr = qGray(rgb);
         //int hu = cl.hue();
         //if (hu != -1)
         //   hueGist[hu]++;
         hueGray[gr]++;
      }
   }
   //qDebug() << hueGist;
   //qDebug() << hueGray;

   int maxHueCount = 0;
   int maxHueValue = 0;
   int maxGray = 0;
   foreach (int hue, hueGray.keys())
   {
      if (hueGray[hue] > maxHueCount)
      {
         maxHueCount = hueGray[hue];
         maxHueValue = hue;
         maxGray = hueGray[hue];
      }
   }
   return maxHueValue;
   //return maxGray;
}
开发者ID:lazyrun,项目名称:pokerbot,代码行数:41,代码来源:ImageProc.cpp


示例17: main

int main()
{
	boost::asio::io_service ios;
	IpcClient cl(ios, "127.0.0.1", 7171);
	ios.run();
	bool read = true;
	std::function<void(const std::string& s)> a = boost::bind(PrintPayload, _1);
	std::string test{ "sendinc async+wait on read" };
	while (read)
	{
		char x;
		x = getchar();
		switch (x)
		{
		case 'q':
			read = false;
			break;
		case 'h':
			PrintHelp();
			break;
		case 'w':
			std::cout << "sendinc symple async" << std::endl;
			cl.SendAsyncString("sendinc symple async");
			break;
		case 'e':
			std::cout << test << std::endl;
			cl.SendAsyncString(test, &a);//[&](const std::string& s)->void{std::cout << "payload: " << s << std::endl; }
			break;
		case 'r':

			break;
		case 't':

			break;
		default:
			std::cout << "problem" << std::endl;
			break;
		}
	}
	getchar();
}
开发者ID:alex529,项目名称:ipcCom,代码行数:41,代码来源:1442849143$main.cpp


示例18: init_params

bool init_params(int argc, char** argv, po::variables_map* cfg) {
	po::options_description cl("\nPerforms bm25-based batch retrieval based on Ture's SIGIR'12 models for a set of queries on a document tf collection coming from STDIN.\nCommand Line Options");
	cl.add_options()
			("queries,q", po::value<string>(), "* File containing Queries")
			("dftable,d", po::value<string>(), "* table containing the df values")
			("K,k", po::value<int>(), "* Keep track of K-best documents per query. (Number of results per query)")
			("N,n", po::value<double>(), "Number of documents in collection (for idf calculation)")
			("avg_len,a", po::value<double>(), "* Average length of documents (required for BM25)")
			("run-id,r", po::value<string>()->default_value("1"), "run id shown in the output")
			("show-empty-results",po::value<bool>()->zero_tokens(), "set this if you want to include dummy output for proper scoring (default false)");

	po::store(parse_command_line(argc, argv, cl), *cfg);
	po::notify(*cfg);

	if(!cfg->count("queries") || !cfg->count("K") || !cfg->count("dftable") || !cfg->count("avg_len")) {
		cerr << cl << endl;
		return false;
	}

	return true;
}
开发者ID:fhieber,项目名称:cdec,代码行数:21,代码来源:clir.cpp


示例19: parent

void VCCueList_Test::modeChange()
{
    QWidget w;
    VCFrame parent(&w, m_doc);
    VCCueList cl(&parent, m_doc);
    Chaser* c = createChaser(m_doc);
    cl.setChaser(c->id());

    m_doc->setMode(Doc::Operate);
    // QCOMPARE(m_doc->masterTimer()->m_dmxSourceList.size(), 1);
    // QCOMPARE(m_doc->masterTimer()->m_dmxSourceList[0], &cl);
    // QVERIFY(cl.m_runner == NULL);
    QVERIFY(cl.m_tree->isEnabled() == true);

    // cl.createRunner();

    m_doc->setMode(Doc::Design);
    QCOMPARE(m_doc->masterTimer()->m_dmxSourceList.size(), 0);
    // QVERIFY(cl.m_runner == NULL);
    QVERIFY(cl.m_tree->isEnabled() == false);
}
开发者ID:PML369,项目名称:qlcplus,代码行数:21,代码来源:vccuelist_test.cpp


示例20: strcpy

int CTraderApi::ReqOrderAction(CUstpFtdcOrderField *pOrder, int count, OrderIDType* pOutput)
{
	if (nullptr == m_pApi)
		return 0;

	CUstpFtdcOrderActionField body = {0};

	strcpy(body.BrokerID, pOrder->BrokerID);
	strcpy(body.InvestorID, pOrder->InvestorID);
	strcpy(body.UserID, pOrder->UserID);

	///报单引用
	strcpy(body.UserOrderLocalID, pOrder->UserOrderLocalID);

	///交易所代码
	strcpy(body.ExchangeID,pOrder->ExchangeID);
	///报单编号
	strcpy(body.OrderSysID,pOrder->OrderSysID);
	///操作标志
	body.ActionFlag = USTP_FTDC_AF_Delete;

	int nRet = 0;
	{
		lock_guard<mutex> cl(m_csOrderRef);
		sprintf(body.UserOrderActionLocalID, "%012lld", m_nMaxOrderRef);
		++m_nMaxOrderRef;
		nRet = m_pApi->ReqOrderAction(&body, ++m_lRequestID);
		if (nRet < 0)
		{
			sprintf(m_orderAction_Id, "%d", nRet);
		}
		else
		{
			memset(m_orderAction_Id, 0, sizeof(OrderIDType));
		}
	}
	strncpy((char*)pOutput, m_orderAction_Id, sizeof(OrderIDType));

	return nRet;
}
开发者ID:AlexTaylorTsang,项目名称:QuantBox_XAPI,代码行数:40,代码来源:TraderApi.cpp



注:本文中的cl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ cl2osc函数代码示例发布时间:2022-05-30
下一篇:
C++ ckfree函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap