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

C++ LOG_USER函数代码示例

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

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



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

示例1: LOG_USER

void
CragStackCombiner::combine(const std::vector<Crag>& crags, Crag& crag) {

	LOG_USER(cragstackcombinerlog)
			<< "combining CRAGs, "
			<< (_requireBbOverlap ? "" : " do not ")
			<< "require bounding box overlap"
			<< std::endl;

	std::map<Crag::Node, Crag::Node> prevNodeMap;
	std::map<Crag::Node, Crag::Node> nextNodeMap;

	for (unsigned int z = 1; z < crags.size(); z++) {

		LOG_USER(cragstackcombinerlog) << "linking CRAG " << (z-1) << " and " << z << std::endl;

		if (z == 1)
			prevNodeMap = copyNodes(crags[0], crag);
		else
			prevNodeMap = nextNodeMap;

		nextNodeMap = copyNodes(crags[z], crag);

		std::vector<std::pair<Crag::Node, Crag::Node>> links = findLinks(crags[z-1], crags[z]);

		for (const auto& pair : links)
			crag.addAdjacencyEdge(
					prevNodeMap[pair.first],
					nextNodeMap[pair.second]);
	}
}
开发者ID:jni,项目名称:candidate_mc,代码行数:31,代码来源:CragStackCombiner.cpp


示例2: updateCosts

void
Oracle::operator()(
			const std::vector<double>& weights,
			double&                    value,
			std::vector<double>&       gradient) {

	updateCosts(weights);

	MultiCut::Status status = _mostViolatedMulticut.solve();

	std::stringstream filename;
	filename << "most-violated_" << std::setw(6) << std::setfill('0') << _iteration << ".tif";
	_mostViolatedMulticut.storeSolution(filename.str(), true);

	if (status != MultiCut::SolutionFound)
		UTIL_THROW_EXCEPTION(
				Exception,
				"solution not found");

	value = _constant - _mostViolatedMulticut.getValue();

	// value = E(y',w) - E(y*,w) + Δ(y',y*)
	//       = B_c - <wΦ,y*> + <Δ_l,y*> + Δ_c

	// loss   = value - B_c + <wΦ,y*>
	// margin = value - loss

	double mostViolatedEnergy = 0;
	for (Crag::NodeIt n(_crag); n != lemon::INVALID; ++n)
		if (_mostViolatedMulticut.getSelectedRegions()[n])
			mostViolatedEnergy += nodeCost(weights, _nodeFeatures[n]);
	for (Crag::EdgeIt e(_crag); e != lemon::INVALID; ++e)
		if (_mostViolatedMulticut.getMergedEdges()[e])
			mostViolatedEnergy += edgeCost(weights, _edgeFeatures[e]);

	double loss   = value - _B_c + mostViolatedEnergy;
	double margin = value - loss;

	LOG_USER(oraclelog) << "Δ(y*)         = " << loss << std::endl;
	LOG_USER(oraclelog) << "E(y') - E(y*) = " << margin << std::endl;

	accumulateGradient(gradient);

	if (optionStoreEachCurrentlyBest) {

		_currentBestMulticut.solve();

		std::stringstream filename;
		filename << "current-best_" << std::setw(6) << std::setfill('0') << _iteration << ".tif";
		_currentBestMulticut.storeSolution(filename.str(), true);
	}

	_iteration++;
}
开发者ID:jni,项目名称:candidate_mc,代码行数:54,代码来源:Oracle.cpp


示例3: arc_ocd_examine

int arc_ocd_examine(struct target *target)
{
	uint32_t status;
	struct arc32_common *arc32 = target_to_arc32(target);

	LOG_DEBUG("-");
	CHECK_RETVAL(arc_jtag_startup(&arc32->jtag_info));

	if (!target_was_examined(target)) {
		/* read ARC core info */
		if (strncmp(target_name(target), ARCEM_STR, 6) == 0) {
			arc32->processor_type = ARCEM_NUM;
			LOG_USER("Processor type: %s", ARCEM_STR);

		} else if (strncmp(target_name(target), ARC600_STR, 6) == 0) {
			arc32->processor_type = ARC600_NUM;
			LOG_USER("Processor type: %s", ARC600_STR);

		} else if (strncmp(target_name(target), ARC700_STR, 6) == 0) {
			arc32->processor_type = ARC700_NUM;
			LOG_USER("Processor type: %s", ARC700_STR);

		} else {
			LOG_WARNING(" THIS IS A UNSUPPORTED TARGET: %s", target_name(target));
		}

		CHECK_RETVAL(arc_jtag_status(&arc32->jtag_info, &status));
		if (status & ARC_JTAG_STAT_RU) {
			target->state = TARGET_RUNNING;
		} else {
			/* It is first time we examine the target, it is halted
			 * and we don't know why. Let's set debug reason,
			 * otherwise OpenOCD will complain that reason is
			 * unknown. */
			if (target->state == TARGET_UNKNOWN)
				target->debug_reason = DBG_REASON_DBGRQ;
			target->state = TARGET_HALTED;
		}

		/* Read BCRs and configure optinal registers. */
		CHECK_RETVAL(arc_regs_read_bcrs(target));
		arc_regs_build_reg_list(target);
		CHECK_RETVAL(arc32_configure(target));

		target_set_examined(target);
	}

	return ERROR_OK;
}
开发者ID:bigdinotech,项目名称:openocd,代码行数:49,代码来源:arc_ocd.c


示例4: LOG_ALL

void
ImageStackPainter::setCurrentSection(unsigned int section) {

	if (_showColored)
		return;

	if (!_stack || _stack->size() == 0 || _imagePainters.size() == 0)
		return;

	_section = std::min(section, _stack->size() - 1);

	for (unsigned int i = 0; i < _numImages; i++) {

		int imageIndex = std::max(std::min(static_cast<int>(_section) + static_cast<int>(i - _numImages/2), static_cast<int>(_stack->size()) - 1), 0);

		LOG_ALL(imagestackpainterlog) << "index for image " << i << " is " << imageIndex << std::endl;

		_imagePainters[i]->setImage((*_stack)[imageIndex]);

		if ((*_stack)[imageIndex]->getIdentifier() != "")
			LOG_USER(imagestackpainterlog) << "showing image " << (*_stack)[imageIndex]->getIdentifier() << std::endl;
	}

	util::rect<double> size = _imagePainters[0]->getSize();

	_imageHeight = size.height();

	size.minY -= _numImages/2*_imageHeight + _numImages*_gap/2;
	size.maxY += (_numImages/2 - (_numImages + 1)%2)*_imageHeight + _numImages*_gap/2;

	setSize(size);

	LOG_ALL(imagestackpainterlog) << "current section set to " << _section << std::endl;
}
开发者ID:juliabuhmann,项目名称:imageprocessing,代码行数:34,代码来源:ImageStackPainter.cpp


示例5: LOG_USER

void
MeshViewController::addMesh(float label) {

	LOG_USER(meshviewcontrollerlog) << "showing label " << label << std::endl;

	if (_meshCache.count(label)) {

		_meshes->add(label, _meshCache[label]);
		return;
	}

	typedef ExplicitVolumeLabelAdaptor<ExplicitVolume<float>> Adaptor;
	Adaptor adaptor(*_labels, label);

	sg_gui::MarchingCubes<Adaptor> marchingCubes;
	std::shared_ptr<sg_gui::Mesh> mesh = marchingCubes.generateSurface(
			adaptor,
			sg_gui::MarchingCubes<Adaptor>::AcceptAbove(0),
			optionCubeSize,
			optionCubeSize,
			optionCubeSize);
	_meshes->add(label, mesh);

	_meshCache[label] = mesh;
}
开发者ID:funkey,项目名称:tools,代码行数:25,代码来源:MeshViewController.cpp


示例6: LOG_USER

int Message_Unit::process_client_buffer(Block_Buffer &buf) {
	msg_tick_ = Time_Value::gettimeofday();

	int cid = 0;
	uint32_t len = 0;
	uint32_t msg_id = 0;
	uint32_t serial_cipher = 0;
	uint32_t msg_time_cipher = 0;

	if (buf.read_int32(cid) ||
		buf.read_uint32(len) ||
		buf.read_uint32(msg_id) ||
		buf.read_uint32(serial_cipher) ||
		buf.read_uint32(msg_time_cipher)) {

		LOG_USER("deserialize error, cid:%d len:%d msg_id:%d", cid, len, msg_id);
		monitor()->close_client_by_cid(cid, Time_Value(2), 10000101);
		return -1;
	}

	process_client_msg(msg_id, cid, buf, serial_cipher, msg_time_cipher);

	count_process_time(msg_id);

	return 0;
}
开发者ID:tidaybreak,项目名称:game-server,代码行数:26,代码来源:Message_Unit.cpp


示例7: GUARD

void Epoll_Watcher::process_timer_event(void) {
	GUARD(Mutex, mon, tq_lock_);

	if (end_flag_ == 1)
		return ;

	Event_Handler *evh = 0;

	while (1) {
		if (tq_.empty())
			break;

		if ((evh = this->tq_.top()) == 0) {
			LOG_USER("evh == 0");
			continue;
		}

		Time_Value now(Time_Value::gettimeofday());
		if (evh->get_absolute_tv() <= now) {
			this->tq_.pop();
			evh->handle_timeout(now);
			if (! (evh->get_timer_flag() & EVENT_ONCE_TIMER)) {
				now += evh->get_relative_tv();
				evh->set_tv(now);
				this->tq_.push(evh);
			} else {
				timer_set_.erase(evh);
				evh->handle_remove();
			}
		} else {
			break;
		}
	}
}
开发者ID:tidaybreak,项目名称:game-server,代码行数:34,代码来源:Epoll_Watcher.cpp


示例8: armv7m_arch_state

/** Logs summary of ARMv7-M state for a halted target. */
int armv7m_arch_state(struct target *target)
{
	struct armv7m_common *armv7m = target_to_armv7m(target);
	struct arm *arm = &armv7m->arm;
	uint32_t ctrl, sp;

	/* avoid filling log waiting for fileio reply */
	if (arm->semihosting_hit_fileio)
		return ERROR_OK;

	ctrl = buf_get_u32(arm->core_cache->reg_list[ARMV7M_CONTROL].value, 0, 32);
	sp = buf_get_u32(arm->core_cache->reg_list[ARMV7M_R13].value, 0, 32);

	LOG_USER("target halted due to %s, current mode: %s %s\n"
		"xPSR: %#8.8" PRIx32 " pc: %#8.8" PRIx32 " %csp: %#8.8" PRIx32 "%s%s",
		debug_reason_name(target),
		arm_mode_name(arm->core_mode),
		armv7m_exception_string(armv7m->exception_number),
		buf_get_u32(arm->cpsr->value, 0, 32),
		buf_get_u32(arm->pc->value, 0, 32),
		(ctrl & 0x02) ? 'p' : 'm',
		sp,
		arm->is_semihosting ? ", semihosting" : "",
		arm->is_semihosting_fileio ? " fileio" : "");

	return ERROR_OK;
}
开发者ID:IoTToolchain,项目名称:OpenOCD,代码行数:28,代码来源:armv7m.c


示例9: arm920t_arch_state

/** Logs summary of ARM920 state for a halted target. */
int arm920t_arch_state(struct target *target)
{
	static const char *state[] =
	{
		"disabled", "enabled"
	};

	struct arm920t_common *arm920t = target_to_arm920(target);
	struct arm *armv4_5;

	if (arm920t->common_magic != ARM920T_COMMON_MAGIC)
	{
		LOG_ERROR("BUG: %s", arm920_not);
		return ERROR_TARGET_INVALID;
	}

	armv4_5 = &arm920t->arm7_9_common.armv4_5_common;

	arm_arch_state(target);
	LOG_USER("MMU: %s, D-Cache: %s, I-Cache: %s",
		 state[arm920t->armv4_5_mmu.mmu_enabled],
		 state[arm920t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled],
		 state[arm920t->armv4_5_mmu.armv4_5_cache.i_cache_enabled]);

	return ERROR_OK;
}
开发者ID:RTOSkit,项目名称:openocd,代码行数:27,代码来源:arm920t.c


示例10: jim_echo

static int jim_echo(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    if (argc != 2)
        return JIM_ERR;
    const char *str = Jim_GetString(argv[1], NULL);
    LOG_USER("%s", str);
    return JIM_OK;
}
开发者ID:unnamet,项目名称:estick-jtag,代码行数:8,代码来源:command.c


示例11: avr32_ap7k_arch_state

int avr32_ap7k_arch_state(struct target *target)
{
	struct avr32_ap7k_common *ap7k = target_to_ap7k(target);

	LOG_USER("target halted due to %s, pc: 0x%8.8" PRIx32 "",
		debug_reason_name(target), ap7k->jtag.dpc);

	return ERROR_OK;
}
开发者ID:AmesianX,项目名称:openocd,代码行数:9,代码来源:avr32_ap7k.c


示例12: lakemont_arch_state

int lakemont_arch_state(struct target *t)
{
	struct x86_32_common *x86_32 = target_to_x86_32(t);

	LOG_USER("target halted due to %s at 0x%08" PRIx32 " in %s mode",
			debug_reason_name(t),
			buf_get_u32(x86_32->cache->reg_list[EIP].value, 0, 32),
			(buf_get_u32(x86_32->cache->reg_list[CR0].value, 0, 32) & CR0_PE) ? "protected" : "real");

	return ERROR_OK;
}
开发者ID:01org,项目名称:CODK-A-Flashpack,代码行数:11,代码来源:lakemont.c


示例13: LOG_USER

void
LogManager::printChannels() {

  if (LogChannel::getChannels()->size() == 0) {
    LOG_USER(out) << "No output channels for this application available." << std::endl;
    return;
  }

  std::string prevChannelName = "";

  LOG_USER(out) << std::endl << "Valid output channels are:" << std::endl << "\t";
  for (channel_it i = LogChannel::getChannels()->begin();
       i != LogChannel::getChannels()->end(); i++) {
    if ((*i)->getName() != prevChannelName) {
      LOG_USER(out) << (*i)->getName() << " ";
      prevChannelName = (*i)->getName();
    }
  }
  LOG_USER(out) << std::endl << std::endl;
}
开发者ID:funkey,项目名称:util,代码行数:20,代码来源:Logger.cpp


示例14: mips32_arch_state

int mips32_arch_state(struct target *target)
{
	struct mips32_common *mips32 = target_to_mips32(target);

	LOG_USER("target halted in %s mode due to %s, pc: 0x%8.8" PRIx32 "",
		mips_isa_strings[mips32->isa_mode],
		debug_reason_name(target),
		buf_get_u32(mips32->core_cache->reg_list[MIPS32_PC].value, 0, 32));

	return ERROR_OK;
}
开发者ID:Xplorer001,项目名称:openocd,代码行数:11,代码来源:mips32.c


示例15: zy1000_speed

int zy1000_speed(int speed)
{
	if(speed == 0)
	{
		/*0 means RCLK*/
		speed = 0;
		ZY1000_POKE(ZY1000_JTAG_BASE+0x10, 0x100);
		LOG_DEBUG("jtag_speed using RCLK");
	}
	else
	{
		if(speed > 8190 || speed < 2)
		{
			LOG_USER("valid ZY1000 jtag_speed=[8190,2]. Divisor is 64MHz / even values between 8190-2, i.e. min 7814Hz, max 32MHz");
			return ERROR_INVALID_ARGUMENTS;
		}

		LOG_USER("jtag_speed %d => JTAG clk=%f", speed, 64.0/(float)speed);
		ZY1000_POKE(ZY1000_JTAG_BASE+0x14, 0x100);
		ZY1000_POKE(ZY1000_JTAG_BASE+0x1c, speed&~1);
	}
	return ERROR_OK;
}
开发者ID:unnamet,项目名称:estick-jtag,代码行数:23,代码来源:zy1000.c


示例16: LOG_USER

void
AdjacencyAnnotator::pruneChildEdges(Crag& crag) {

	std::vector<Crag::CragEdge> siblingEdges;

	for (Crag::CragEdge e : crag.edges())
		if (isSiblingEdge(crag, e))
			siblingEdges.push_back(e);

	for (Crag::CragEdge e : siblingEdges)
		crag.erase(e);

	LOG_USER(adjacencyannotatorlog) << "pruned " << siblingEdges.size() << " child adjacency edges" << std::endl;
}
开发者ID:DaniUPC,项目名称:candidate_mc,代码行数:14,代码来源:AdjacencyAnnotator.cpp


示例17: do_resume

static int do_resume(struct target *t)
{
	/* needs proper handling later */
	t->state = TARGET_DEBUG_RUNNING;
	if (restore_context(t) != ERROR_OK)
		return ERROR_FAIL;
	if (exit_probemode(t) != ERROR_OK)
		return ERROR_FAIL;
	t->state = TARGET_RUNNING;

	t->debug_reason = DBG_REASON_NOTHALTED;
	LOG_USER("target running");

	return target_call_event_callbacks(t, TARGET_EVENT_RESUMED);
}
开发者ID:01org,项目名称:CODK-A-Flashpack,代码行数:15,代码来源:lakemont.c


示例18: recurseAdjacencies

void
AdjacencyAnnotator::propagateLeafAdjacencies(Crag& crag) {

	_numAdded = 0;
	for (Crag::CragNode n : crag.nodes())
		if (crag.isRootNode(n))
			recurseAdjacencies(crag, n);

	if (optionPruneChildEdges)
		pruneChildEdges(crag);

	LOG_USER(adjacencyannotatorlog)
			<< "added " << _numAdded << " super node adjacency edges"
			<< std::endl;
}
开发者ID:DaniUPC,项目名称:candidate_mc,代码行数:15,代码来源:AdjacencyAnnotator.cpp


示例19: arm11_arch_state

/* architecture specific status reply */
static int arm11_arch_state(struct target *target)
{
	struct arm11_common *arm11 = target_to_arm11(target);
	int retval;

	retval = arm_arch_state(target);

	/* REVISIT also display ARM11-specific MMU and cache status ... */

	if (target->debug_reason == DBG_REASON_WATCHPOINT)
		LOG_USER("Watchpoint triggered at PC %#08x",
				(unsigned) arm11->dpm.wp_pc);

	return retval;
}
开发者ID:Erguotou,项目名称:openocd-libswd,代码行数:16,代码来源:arm11.c


示例20: arm720t_arch_state

static int arm720t_arch_state(struct target *target)
{
	struct arm720t_common *arm720t = target_to_arm720(target);

	static const char *state[] = {
		"disabled", "enabled"
	};

	arm_arch_state(target);
	LOG_USER("MMU: %s, Cache: %s",
			 state[arm720t->armv4_5_mmu.mmu_enabled],
			 state[arm720t->armv4_5_mmu.armv4_5_cache.d_u_cache_enabled]);

	return ERROR_OK;
}
开发者ID:olerem,项目名称:openocd,代码行数:15,代码来源:arm720t.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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