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

C++ detect函数代码示例

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

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



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

示例1: detect

float  BoardDetector::detect(const cv::Mat &im)throw (cv::Exception)
{
    _mdetector.detect(im,_vmarkers);

    float res;

    if (_camParams.isValid())
        res=detect(_vmarkers,_bconf,_boardDetected,_camParams.CameraMatrix,_camParams.Distorsion,_markerSize);
    else res=detect(_vmarkers,_bconf,_boardDetected);
    return res;
}
开发者ID:Ingener74,项目名称:Augmented-Reality-Tests,代码行数:11,代码来源:boarddetector.cpp


示例2: get_libname

void get_libname(void){
  if(detect()==CPU_LOONGSON3A) {
    printf("loongson3a\n");
  }else if(detect()==CPU_LOONGSON3B) {
    printf("loongson3b\n");
  }else{
#ifdef __mips64
  printf("mips64\n");
#else
  printf("mips32\n");
#endif
  }
}
开发者ID:Fulguritus,项目名称:OpenBLAS,代码行数:13,代码来源:cpuid_mips.c


示例3: get_libname

void get_libname(void){
  if(detect()==CPU_LOONGSON3A) {
    printf("loongson3a\n");
  }else if(detect()==CPU_LOONGSON3B) {
    printf("loongson3b\n");
  }else if(detect()==CPU_I6400) {
    printf("i6400\n");
  }else if(detect()==CPU_P6600) {
    printf("p6600\n");
  }else{
    printf("mips64\n");
  }
}
开发者ID:ChinaQuants,项目名称:OpenBLAS,代码行数:13,代码来源:cpuid_mips64.c


示例4: get_subarchitecture

void get_subarchitecture(void){
  if(detect()==CPU_LOONGSON3A) {
    printf("LOONGSON3A");
  }else if(detect()==CPU_LOONGSON3B){
    printf("LOONGSON3B");
  }else if(detect()==CPU_I6400){
    printf("I6400");
  }else if(detect()==CPU_P6600){
    printf("P6600");
  }else{
    printf("SICORTEX");
  }
}
开发者ID:ChinaQuants,项目名称:OpenBLAS,代码行数:13,代码来源:cpuid_mips64.c


示例5: biz_dialer

/*
 * Dial up on a BIZCOMP Model 1022 with either
 * 	tone dialing (mod = "V")
 *	pulse dialing (mod = "W")
 */
static int
biz_dialer(char *num, char *mod)
{
	int connected = 0;
	char cbuf[40];

	if (boolean(value(VERBOSE)))
		printf("\nstarting call...");
	/*
	 * Disable auto-answer and configure for tone/pulse
	 *  dialing
	 */
	if (cmd("\02K\r")) {
		printf("can't initialize bizcomp...");
		return (0);
	}
	strcpy(cbuf, "\02.\r");
	cbuf[1] = *mod;
	if (cmd(cbuf)) {
		printf("can't set dialing mode...");
		return (0);
	}
	strcpy(cbuf, "\02D");
	strcat(cbuf, num);
	strcat(cbuf, "\r");
	write(FD, cbuf, strlen(cbuf));
	if (!detect("7\r")) {
		printf("can't get dial tone...");
		return (0);
	}
	if (boolean(value(VERBOSE)))
		printf("ringing...");
	/*
	 * The reply from the BIZCOMP should be:
	 *	2 \r or 7 \r	failure
	 *	1 \r		success
	 */
	connected = detect("1\r");
#if ACULOG
	if (timeout) {
		char line[80];

		sprintf(line, "%d second dial timeout",
			number(value(DIALTIMEOUT)));
		logent(value(HOST), num, "biz1022", line);
	}
#endif
	if (timeout)
		biz22_disconnect();	/* insurance */
	return (connected);
}
开发者ID:wan721,项目名称:DragonFlyBSD,代码行数:56,代码来源:biz22.c


示例6: _bTrace_

// ---------------------------------------------------------------------------
// 
// -----------
bool bXMapCloneDetector::process(int msg, void* prm){
_bTrace_("bXMapCloneDetector::process()",true);	
	switch(msg){
        case kExtProcessCallFromIntf:
            return(detect(&_prm));
            break;
        case kExtProcessCallWithParams:
            return(detect((clonedetector_prm*)prm));
            break;
        default:
            break;
	}
	return(true);
}
开发者ID:CarteBlancheConseil,项目名称:Instances,代码行数:17,代码来源:bXMapCloneDetector.cpp


示例7: get_cpuconfig

void get_cpuconfig(void){
  if(detect()==CPU_LOONGSON3A) {
    printf("#define LOONGSON3A\n");
    printf("#define L1_DATA_SIZE 65536\n");
    printf("#define L1_DATA_LINESIZE 32\n");
    printf("#define L2_SIZE 512488\n");
    printf("#define L2_LINESIZE 32\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 4\n");
  }else if(detect()==CPU_LOONGSON3B){
    printf("#define LOONGSON3B\n");
    printf("#define L1_DATA_SIZE 65536\n");
    printf("#define L1_DATA_LINESIZE 32\n");
    printf("#define L2_SIZE 512488\n");
    printf("#define L2_LINESIZE 32\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 4\n");
  }else if(detect()==CPU_I6400){
    printf("#define I6400\n");
    printf("#define L1_DATA_SIZE 65536\n");
    printf("#define L1_DATA_LINESIZE 32\n");
    printf("#define L2_SIZE 1048576\n");
    printf("#define L2_LINESIZE 32\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 8\n");
  }else if(detect()==CPU_P6600){
    printf("#define P6600\n");
    printf("#define L1_DATA_SIZE 65536\n");
    printf("#define L1_DATA_LINESIZE 32\n");
    printf("#define L2_SIZE 1048576\n");
    printf("#define L2_LINESIZE 32\n");
    printf("#define DTB_DEFAULT_ENTRIES 64\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 8\n");
  }else{
    printf("#define SICORTEX\n");
    printf("#define L1_DATA_SIZE 32768\n");
    printf("#define L1_DATA_LINESIZE 32\n");
    printf("#define L2_SIZE 512488\n");
    printf("#define L2_LINESIZE 32\n");
    printf("#define DTB_DEFAULT_ENTRIES 32\n");
    printf("#define DTB_SIZE 4096\n");
    printf("#define L2_ASSOCIATIVE 8\n");
  }
}
开发者ID:ChinaQuants,项目名称:OpenBLAS,代码行数:48,代码来源:cpuid_mips64.c


示例8: detect

bool TCompiler::detectCallDepth(TIntermNode* inputRoot, TInfoSink& inputInfoSink, bool limitCallStackDepth)
{
    DetectCallDepth detect(inputInfoSink, limitCallStackDepth, maxCallStackDepth);
    inputRoot->traverse(&detect);
    switch (detect.detectCallDepth())
    {
      case DetectCallDepth::kErrorNone:
        return true;
      case DetectCallDepth::kErrorMissingMain:
        inputInfoSink.info.prefix(EPrefixError);
        inputInfoSink.info << "Missing main()";
        return false;
      case DetectCallDepth::kErrorRecursion:
        inputInfoSink.info.prefix(EPrefixError);
        inputInfoSink.info << "Function recursion detected";
        return false;
      case DetectCallDepth::kErrorMaxDepthExceeded:
        inputInfoSink.info.prefix(EPrefixError);
        inputInfoSink.info << "Function call stack too deep";
        return false;
      default:
        UNREACHABLE();
        return false;
    }
}
开发者ID:merckhung,项目名称:libui,代码行数:25,代码来源:Compiler.cpp


示例9: detect

bool HeadSetDetect::threadLoop()
{ 
    int state = detect(); //do not hold lock;
    Mutex::Autolock _l(mLock);
    if(mActive == false)
    {
       if(mFd >=0)
       {
           close(mFd); //close socket
           mFd = -1;
       }
       LOGD("thread to exit");
       return false;
    }
    //SXLOGV("threadLoop:state=%d",state);
    if(state != -1)
    {
        bool on= headsetConnect(state);
        if(mOn != on )
        {  
            mCblk(mObserver,on);
            mOn = on; 
        }
    }
    LOGD_IF(state == -1,"detect other event");
  return true;
}
开发者ID:AwaisKing,项目名称:mt6577_aosp_source,代码行数:27,代码来源:HeadSetDetect.cpp


示例10: has_placement

 bool has_placement(
     box2d<double> const& box,
     double margin,
     Keys const & keys)
 {
     return detect(keys, box, margin);
 }
开发者ID:mapycz,项目名称:mapnik,代码行数:7,代码来源:collision_cache.hpp


示例11: uio_get_addr

int romloader_dpm_device_linux_uio::Open(void)
{
	int iResult;


	iResult = this->uio_get_name();
	if( iResult==0 )
	{
		iResult = this->uio_probe();
		if( iResult==0 )
		{
			iResult = uio_get_addr();
			if( iResult==0 )
			{
				iResult = uio_get_size();
				if( iResult==0 )
				{
					iResult = uio_map_dpm();
					if( iResult==0 )
					{
						/* Try to identify the netX DPM. */
						iResult = detect();
					}
				}
			}
		}
	}

	return iResult;
}
开发者ID:muhkuh-sys,项目名称:org.muhkuh.lua-lua51-romloader,代码行数:30,代码来源:romloader_dpm_device_linux_uio.cpp


示例12: main

int main()
{
    struct node *head = create();
    detect(head);
    //display(head);
    return 0;
}
开发者ID:satts1,项目名称:Detect-Loop-In-LinkedList,代码行数:7,代码来源:program.c


示例13: process_core_task

int process_core_task(void)
{
    int rtn = 0;

    //have_recent_added = 0;
    rtn = getRecentAddedFromAnyhost(config.anyhost); /* open anyhost */
    if( -1 == rtn){
        addInfoLog(2, "getRecentAddedFromAnyhost error(there are errors in anyhost file)  and exit");
    }
    //?õ?Ҫ??????????
    rtn = getDetectOrigin(config.confFilename); /* open domain.conf */
    if (-1 == rtn) {
        addInfoLog(2, "getDetectOrigin error(there are errors in domain.conf file)  and exit");
        return -1;
    }
    //rtn = checkRepeatRecordFromDomainConf();    /* 检查是否有集中探测,我这里不需要 */
    //????????
    rtn = detect(config.timer);
    if (-1 == rtn) {
        addInfoLog(2, "detectOrigin error and exit");
        return -1;
    }
    modifyUsedTime();
    copySameIPDetectRes();
    addResultLog();
    //write detect result
    rtn = write_anyhost_file();
    return rtn;
}
开发者ID:selecli,项目名称:squid,代码行数:29,代码来源:main.c


示例14: main

int main(int argc, char **argv) {
    CvCapture *capture;
    IplImage  *frame;
    int       key;
    char      *filename = "usb.xml"; // Change to the name of classifier

    cascade = (CvHaarClassifierCascade *) cvLoad(filename, 0, 0, 0);
    storage = cvCreateMemStorage(0);
    capture = cvCaptureFromCAM(0);

    // Check
    // assert(cascade && storage && capture);

    cvNamedWindow("video", 1);

    while(1) {
        frame = cvQueryFrame(capture);
        detect(frame);
        key = cvWaitKey(50);
    }

    cvReleaseImage(&frame);
    cvReleaseCapture(&capture);
    cvDestroyWindow("video");
    cvReleaseHaarClassifierCascade(&cascade);
    cvReleaseMemStorage(&storage);

    return 0;
}
开发者ID:ChromoZoneX,项目名称:opencv-object-recognition,代码行数:29,代码来源:cv_objectdetect.c


示例15: get_subarchitecture

void get_subarchitecture(void){
  if(detect()==CPU_LOONGSON3A) {
    printf("LOONGSON3A");
  }else{
    printf("SICORTEX");
  }
}
开发者ID:firelf,项目名称:OpenBLAS,代码行数:7,代码来源:cpuid_mips.c


示例16: deferred

static void deferred(pony_ctx_t* ctx, detector_t* d)
{
  d->since_deferred++;

  if(d->since_deferred < d->next_deferred)
    return;

  d->attempted++;

  bool found = false;
  size_t i = HASHMAP_BEGIN;
  view_t* view;

  while((view = ponyint_viewmap_next(&d->deferred, &i)) != NULL)
  {
    assert(view->deferred == true);
    ponyint_viewmap_removeindex(&d->deferred, i);
    view->deferred = false;

    if(!detect(ctx, d, view))
      break;

    found = true;
  }

  if(found)
  {
    if(d->next_deferred > d->min_deferred)
      d->next_deferred >>= 1;
  } else {
    if(d->next_deferred < d->max_deferred)
开发者ID:cyisfor,项目名称:ponyc,代码行数:31,代码来源:cycle.c


示例17: search_and_destroy

list search_and_destroy(element e, list l)
{
	list r = l;
	if (l == NULL)
		return NULL;
	if (detect(e, l) == false)
		return l;
	list tmp = l;
	if (IsEqual(head(l), e) == true)
	{
		l = DelFirst(l);
		return l;
	}
	while (llenght(l) != 1)
	{
		if (IsEqual(head(tail(l)), e) == true)
		{
			DeleteElement(l->next->value);
			tmp = l->next;
			l->next = l->next->next;
			free(tmp);
			return r;
		}
		l = tail(l);
	}
	return NULL;
}
开发者ID:LeoMirots,项目名称:Lists,代码行数:27,代码来源:list.c


示例18: initpcibios

void initpcibios() {
    if(detect() == OK) {



    }
}
开发者ID:prabuinet,项目名称:spos,代码行数:7,代码来源:pcibios.c


示例19: switch

bool compositor::enabled() {
  switch(detect()) {
  case Compositor::Metacity: return enabled_metacity();
  case Compositor::Xfwm4: return enabled_xfwm4();
  default: return false;
  }
}
开发者ID:quequotion,项目名称:higan-qq,代码行数:7,代码来源:compositor.hpp


示例20: py_detect

static PyObject * py_detect (PyObject * self, PyObject * args) { // {{{
	PyObject        * err = NULL;
	char            * text;
	size_t            inlen;
	int               argc;

	DetectObj       * obj;
	PyObject        * dict;
	PyObject        * prop;

	if ( ! PyArg_ParseTuple (args, "s#|O", &text, &inlen, &err) )
		return NULL;

	argc = PyTuple_Size (args);

	if ( err != NULL ) {
		if ( ! PyList_Check (err) ) {
			PyErr_SetString (ErrorObject, "3th argument is must PyLis");
			return NULL;
		}
	}

	if ( (obj = detect_obj_init ()) == NULL ) {
		if ( argc > 1 ) {
			PyObject * value = PyString_FromString ("Memory allocation failed");
			PyList_Append (err, value);
			Py_DECREF (value);
		}
		return Py_None;
	}

#ifdef CHARDET_BINARY_SAFE
	if ( detect_r (text, inlen, &obj) == CHARDET_OUT_OF_MEMORY )
#else
	if ( detect (text, &obj) == CHARDET_OUT_OF_MEMORY )
#endif
	{
		if ( argc > 1 ) {
			PyObject * value = PyString_FromString ("On handle processing, occured out of memory");
			PyList_Append (err, value);
			Py_DECREF (value);
		}
		detect_obj_free (&obj);
		return Py_None;
	}

	dict = PyDict_New ();

	prop = Py_BuildValue ("s", obj->encoding);
	PyDict_SetItemString (dict, "encoding", prop);
	Py_DECREF (prop);

	prop = Py_BuildValue ("f", obj->confidence);
	PyDict_SetItemString (dict, "confidence", prop);
	Py_DECREF (prop);

	detect_obj_free (&obj);

	return dict;
} // }}}
开发者ID:Joungkyun,项目名称:python-chardet,代码行数:60,代码来源:chardet.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ determine_dirtyable_memory函数代码示例发布时间:2022-05-30
下一篇:
C++ details函数代码示例发布时间: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