当前位置: 首页>>代码示例>>C++>>正文


C++ DEBUGLOG函数代码示例

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


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

示例1: DEBUGLOG

void HostCOOMatrix<ValueType>::ReadFile(const std::string filename) 
{
    DEBUGLOG(this, "HostCOOMatrix::ReadFile()", "filename = " << filename, 2);
    BaseMatrix<ValueType>::ReadFile(filename);

    //Allocate matrix after reading the size from the file
    this->Allocate(this->mNRows, this->mNCols, this->mNnz);
    // Re open file
    std::ifstream mFile;
    mFile.exceptions ( std::ifstream::failbit | std::ifstream::badbit );
    mFile.open(filename);
    // Go to line 3 where the data begins

    GoToLine(mFile, 3);
    std::string line;
    std::getline(mFile, line);
    // Only check syntax on first line for performance issues
    // Checking regex in each iteration very slow
    if (!regex_match (line, std::regex("^((?:(?:[0-9][0-9]*\\s+?){2})"
                                "-?[0-9\\.]+e(?:\\+|\\-)[0-9]+)")))
    {
        std::cerr << "Bad syntax in line: 3" << std::endl;
    }
    GoToLine(mFile, 3);
    std::istringstream linestream;
    for (int index=0; index<this->mNnz; index++)
    {
        std::getline(mFile, line);
        linestream.str(line); 
        int rowInd, colInd;
        linestream >> rowInd >> colInd >> mData[index];
        mRowInd[index] = rowInd - 1;
        mColInd[index] = colInd - 1;
        linestream.clear();
        
    }
    mFile.close();
    DEBUGEND();

}
开发者ID:Msegade,项目名称:pssolver,代码行数:40,代码来源:HostCOOMatrix.cpp

示例2: FspFileNodeSetFileInfo

VOID FspFileNodeSetFileInfo(FSP_FILE_NODE *FileNode, PFILE_OBJECT CcFileObject,
    const FSP_FSCTL_FILE_INFO *FileInfo)
{
    PAGED_CODE();

    FSP_FSVOL_DEVICE_EXTENSION *FsvolDeviceExtension =
        FspFsvolDeviceExtension(FileNode->FsvolDeviceObject);
    UINT64 AllocationSize = FileInfo->AllocationSize > FileInfo->FileSize ?
        FileInfo->AllocationSize : FileInfo->FileSize;
    UINT64 AllocationUnit;

    AllocationUnit = FsvolDeviceExtension->VolumeParams.SectorSize *
        FsvolDeviceExtension->VolumeParams.SectorsPerAllocationUnit;
    AllocationSize = (AllocationSize + AllocationUnit - 1) / AllocationUnit * AllocationUnit;

    FileNode->Header.AllocationSize.QuadPart = AllocationSize;
    FileNode->Header.FileSize.QuadPart = FileInfo->FileSize;

    FileNode->FileAttributes = FileInfo->FileAttributes;
    FileNode->ReparseTag = FileInfo->ReparseTag;
    FileNode->CreationTime = FileInfo->CreationTime;
    FileNode->LastAccessTime = FileInfo->LastAccessTime;
    FileNode->LastWriteTime = FileInfo->LastWriteTime;
    FileNode->ChangeTime = FileInfo->ChangeTime;
    FileNode->InfoExpirationTime = FspExpirationTimeFromMillis(
        FsvolDeviceExtension->VolumeParams.FileInfoTimeout);
    FileNode->InfoChangeNumber++;

    if (0 != CcFileObject)
    {
        NTSTATUS Result = FspCcSetFileSizes(
            CcFileObject, (PCC_FILE_SIZES)&FileNode->Header.AllocationSize);
        if (!NT_SUCCESS(Result))
        {
            DEBUGLOG("FspCcSetFileSizes error: %s", NtStatusSym(Result));
            DEBUGBREAK_CRIT();
            CcUninitializeCacheMap(CcFileObject, 0, 0);
        }
    }
}
开发者ID:LucaBongiorni,项目名称:winfsp,代码行数:40,代码来源:file.c

示例3: s

wxSize MutIconShapeClass<T>::DoGetBestSize() const 
{
	//  wxSize s(GetWindowBorderSize()/2);
	wxSize s(0,0);
	wxSize s1(0,0);
	DEBUGLOG (other, _T("best size: %dx%d"),s.x,s.y);
//	return s;
	
	
	if (staticText) s += staticText->GetBestSize();
	DEBUGLOG (other, _T("staticText %p best size: %dx%d"),(void*)&staticText,s.x,s.y);
	if (GetIcon().IsOk()) {
		s.x = std::max (Icon.GetWidth(), s.x);
		int h = Icon.GetHeight();
		s.y += h;
	}

	if (this->GetSizer()) {
		s1 = this->GetSizer()->CalcMin();
		DEBUGLOG (other, _T("our %p sizer best size: %dx%d"),(void*)this,s1.x,s1.y);
		s.x = std::max(s.x,s1.x);
		s.y += std::max(s1.y,0);
	}

#ifdef DEBUG
	wxSize s2 = this->GetSize() - this->GetClientSize();
	s2.IncTo(wxSize(0,0));

	DEBUGLOG(gui,_T("s1: (%d,%d), maxBorderSize: (%d,%d)"),
		 s2.x,s2.y,2*maxBorderSize.x,2*maxBorderSize.y);
	mutASSERT(!maxBorderSize.x || s2.x <= 2*maxBorderSize.x);
	mutASSERT(!maxBorderSize.y || s2.y <= 2*maxBorderSize.y);
#endif

	s += maxBorderSize + maxBorderSize;
	
	// s1 = MutPanel::DoGetBestSize();
        // call to base class not needed.
	DEBUGLOG (other, _T("our %p parent best size: %dx%d"),(void*)this,s1.x,s1.y);
	
	s1.IncTo(s);

	DEBUGLOG (other, _T("our %p best size: %dx%d"),(void*)this,s.x,s.y);
	wxConstCast(this,MutIconShapeClass<T>)->SetMinSize(s1);
	this->CacheBestSize(s1);
	return s1;
}
开发者ID:BackupTheBerlios,项目名称:mutabor,代码行数:47,代码来源:IconShape.cpp

示例4: DEBUGLOG

void SCDEVICE::LateInit(void)
{
  DEBUGLOG("%s", __FUNCTION__);
  int n = CardIndex();
  if (DeviceNumber() != n)
    ERRORLOG("CardIndex - DeviceNumber mismatch! Put DVBAPI plugin first on VDR commandline!");
  softcsa = (fd_ca < 0);
  if (softcsa)
  {
    if (HasDecoder())
      INFOLOG("Card %s is a full-featured card but no ca device found!", devId);
  }
  else if (cScDevices::ForceBudget(n))
  {
    INFOLOG("Budget mode forced on card %s", devId);
    softcsa = true;
  }
  if (softcsa)
  {
    INFOLOG("Using software decryption on card %s", devId);
  }
}
开发者ID:macmenot,项目名称:vdr-plugin-dvbapi,代码行数:22,代码来源:device-tmpl.cpp

示例5: add_env_variable

static void add_env_variable( lua_State* L,  const char* key, const char* env ) 
{
    char* envdata;
    
    DEBUGLOG( "Registering env variable: %s", env );

    // Put the key onto the stack
    lua_pushstring( L, key );

    // Put the environment data onto the stack
    envdata = getenv( env );
    if ( envdata == NULL ) 
    {
        lua_pushstring( L, "" );
    }
    else 
    {
        lua_pushstring( L, envdata );
    }

    lua_settable( L, -3 );
}
开发者ID:jakobwesthoff,项目名称:lucie,代码行数:22,代码来源:superglobals.c

示例6: DEBUGLOG

Vector<ValueType> Vector<ValueType>::operator+(
                                const Vector<ValueType>& otherVector)
{
    DEBUGLOG( this, "Vector::operator+", "Vec =" << &otherVector, 1);
    assert(GetSize() == otherVector.GetSize());
    assert(( IsHost() && otherVector.IsHost() )|| 
            (IsDevice() && otherVector.IsDevice()) );

    Vector<ValueType> result(GetSize());

    if (pImpl == pImplHost)
        result.pImpl->Add(*(otherVector.pImpl), *pImpl);
    else if (pImpl == pImplDevice)
    {
        result.MoveToDevice();
        result.pImpl->Add(*(otherVector.pImpl), *pImpl);
    }

    DEBUGEND();
    return result;
        
}
开发者ID:Msegade,项目名称:pssolver,代码行数:22,代码来源:Vector.cpp

示例7: DEBUGLOG

App::~App()
{
  DEBUGLOG("~App;");
  delete debugger;

  delete player;

  delete app_settings;
  delete midi;
  delete audio;

  delete file_system;

  if (screen)
    SDL_FreeSurface(screen);
  if (sdlTexture)
    SDL_DestroyTexture(sdlTexture);
  if (sdlRenderer)
    SDL_DestroyRenderer(sdlRenderer);
  if(sdlWindow)
    SDL_DestroyWindow(sdlWindow);
}
开发者ID:MisterZeus,项目名称:SNES-Tracker,代码行数:22,代码来源:app.cpp

示例8: init_comms

/* Called by init_cluster() to open up the listening socket */
int init_comms(unsigned short port)
{
    struct sockaddr_in6 addr;

    sock_hash = dm_hash_create(100);
    tcp_port = port ? : DEFAULT_TCP_PORT;

    listen_fd = socket(AF_INET6, SOCK_STREAM, 0);

    if (listen_fd < 0)
    {
	return -1;
    }
    else
    {
	int one = 1;
	setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(int));
	setsockopt(listen_fd, SOL_SOCKET, SO_KEEPALIVE, &one, sizeof(int));
    }

    memset(&addr, 0, sizeof(addr)); // Bind to INADDR_ANY
    addr.sin6_family = AF_INET6;
    addr.sin6_port = htons(tcp_port);

    if (bind(listen_fd, (struct sockaddr *)&addr, sizeof(addr)) < 0)
    {
	DEBUGLOG("Can't bind to port: %s\n", strerror(errno));
	syslog(LOG_ERR, "Can't bind to port %d, is clvmd already running ?", tcp_port);
	close(listen_fd);
	return -1;
    }

    listen(listen_fd, 5);

    /* Set Close-on-exec */
    fcntl(listen_fd, F_SETFD, 1);

    return 0;
}
开发者ID:SteamMOD,项目名称:android_bootable_steam_device-mapper,代码行数:40,代码来源:tcp-comms.c

示例9: _cluster_do_node_callback

/* Call a callback for each node, so the caller knows whether it's up or down */
static int _cluster_do_node_callback(struct local_client *master_client,
				     void (*callback)(struct local_client *,
						      const char *csid, int node_up))
{
	struct dm_hash_node *hn;
	struct node_info *ninfo;
	int somedown = 0;

	dm_hash_iterate(hn, node_hash)
	{
		char csid[COROSYNC_CSID_LEN];

		ninfo = dm_hash_get_data(node_hash, hn);
		memcpy(csid, dm_hash_get_key(node_hash, hn), COROSYNC_CSID_LEN);

		DEBUGLOG("down_callback. node %d, state = %d\n", ninfo->nodeid,
			 ninfo->state);

		if (ninfo->state != NODE_DOWN)
			callback(master_client, csid, ninfo->state == NODE_CLVMD);
		if (ninfo->state != NODE_CLVMD)
			somedown = -1;
	}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:24,代码来源:clvmd-corosync.c

示例10: DEBUGLOG

SCCIAdapter::~SCCIAdapter()
{
  DEBUGLOG("%s", __FUNCTION__);

  Cancel(3);

  for (int i = 0; i < MAX_SOCKETS; i++)
  {
    if (sockets[i] > 0)
      close(sockets[i]);
    sockets[i] = 0;
  }
  ciMutex.Lock();
  delete rb;
  rb = 0;
  ciMutex.Unlock();

  if (decsa)
    delete decsa;
  if (capmt != 0)
    delete capmt;
  capmt = 0;
}
开发者ID:Yuri666,项目名称:vdr-plugin-dvbapi,代码行数:23,代码来源:SCCIAdapter.cpp

示例11: lock

bool cLiveQueue::Add(MsgPacket* p)
{
  cMutexLock lock(&m_lock);

  // in timeshift mode ?
  if(m_pause || (!m_pause && m_writefd != -1))
  {
    // write packet
    if(!p->write(m_writefd, 1000))
    {
      DEBUGLOG("Unable to write packet into timeshift ringbuffer !");
      return false;
    }

    // ring-buffer overrun ?
    off_t length = lseek(m_writefd, 0, SEEK_CUR);
    if(length >= (off_t)BufferSize)
    {
      // truncate to current position
      if(ftruncate(m_writefd, length) == 0)
        lseek(m_writefd, 0, SEEK_SET);
    }
    return true;
  }

  // queue too long ?
  if (size() > 100) {
    delete p;
    return false;
  }

  // add packet to queue
  push(p);
  m_cond.Signal();

  return true;
}
开发者ID:axmhari,项目名称:vdr-plugin-xvdr,代码行数:37,代码来源:livequeue.c

示例12: switch

	void OpenGLGraphicSystem::ProcessShader( BohgeEngine::ShaderProperty::ShaderCode sc, eastl::string& code )
	{
		Utility::RemoveTargetString( code, "precision highp float;" );
		Utility::RemoveTargetString( code, "precision mediump float;" );
		Utility::RemoveTargetString( code, "precision lowp float;" );
		Utility::RemoveTargetString( code, "highp " );
		Utility::RemoveTargetString( code, "mediump " );
		Utility::RemoveTargetString( code, "lowp " );
		code.insert(0, "#define	MAXJOINTS	128\n" );
		code.insert(0, "#define	MAXARRAYSIZE	256\n" );
		code.insert(0, "#define	_WINDOWS_\n" );
		glslopt_shader_type type;
		switch( sc )
		{
		case ShaderProperty::SC_VERTEX: type = kGlslOptShaderVertex; break;
		case ShaderProperty::SC_FRAGMENT: type = kGlslOptShaderFragment; break;
		default:ASSERT(false);
		}

		glslopt_shader* shader = glslopt_optimize( m_pGlslopt_ctx, type, code.c_str(), 0 );
		if ( glslopt_get_status(shader) )
		{
			code = glslopt_get_output( shader );
		}
		else
		{
			const char* log = glslopt_get_log( shader );
			DEBUGLOG("Can't optimize shader, caz %s\n", log );
		}
		if ( ShaderProperty::SC_VERTEX == sc )
		{
			size_t mainbegin = _FindMainFunction(code);
			_FixAttributeIndexingType( code, mainbegin );
		}
		glslopt_shader_delete( shader );
	}
开发者ID:bohge,项目名称:Bohge_Engine,代码行数:36,代码来源:OpenGLGraphicSystem.cpp

示例13: DEBUGLOG

bool cLiveStreamer::IsReady()
{
  if(m_ready)
    return true;

  bool bAllParsed = true;

  for (std::list<cTSDemuxer*>::iterator i = m_Demuxers.begin(); i != m_Demuxers.end(); i++)
  {
    /*if((*i)->IsParsed() && (*i)->GetContent() == cStreamInfo::scVIDEO) {
      bAllParsed = true;
      break;
    }*/
    if (!(*i)->IsParsed()) {
      DEBUGLOG("Stream with PID %i not parsed", (*i)->GetPID());
      bAllParsed = false;
      break;
    }
  }

  m_ready = bAllParsed;

  return bAllParsed;
}
开发者ID:magdaw736,项目名称:vdr-plugin-xvdr,代码行数:24,代码来源:livestreamer.c

示例14: DEBUGLOG

cLiveStreamer::~cLiveStreamer()
{
  DEBUGLOG("Started to delete live streamer");

  cTimeMs t;

  DEBUGLOG("Stopping streamer thread ...");
  Cancel(5);
  DEBUGLOG("Done.");

  cMutexLock lock(&m_FilterMutex);

  DEBUGLOG("Detaching");

  if(m_PatFilter != NULL && m_Device != NULL) {
    m_Device->Detach(m_PatFilter);
    delete m_PatFilter;
    m_PatFilter = NULL;
  }

  if (IsAttached()) {
    Detach();
  }

  for (std::list<cTSDemuxer*>::iterator i = m_Demuxers.begin(); i != m_Demuxers.end(); i++) {
    if ((*i) != NULL) {
      DEBUGLOG("Deleting stream demuxer for pid=%i and type=%i", (*i)->GetPID(), (*i)->GetType());
      delete (*i);
    }
  }
  m_Demuxers.clear();

  delete m_Queue;

  m_uid = 0;

  {
    cMutexLock lock(&m_DeviceMutex);
    m_Device = NULL;
  }

  DEBUGLOG("Finished to delete live streamer (took %llu ms)", t.Elapsed());
}
开发者ID:giga91,项目名称:vdr-plugin-xvdr,代码行数:43,代码来源:livestreamer.c

示例15: _init_cluster

static int _init_cluster(void)
{
	cs_error_t err;

#ifdef QUORUM_SET	/* corosync/quorum.h */
	uint32_t quorum_type;
#endif

	node_hash = dm_hash_create(100);

	err = cpg_initialize(&cpg_handle,
			     &corosync_cpg_callbacks);
	if (err != CS_OK) {
		syslog(LOG_ERR, "Cannot initialise Corosync CPG service: %d",
		       err);
		DEBUGLOG("Cannot initialise Corosync CPG service: %d", err);
		return cs_to_errno(err);
	}

#ifdef QUORUM_SET
	err = quorum_initialize(&quorum_handle,
				&quorum_callbacks,
				&quorum_type);

	if (quorum_type != QUORUM_SET) {
		syslog(LOG_ERR, "Corosync quorum service is not configured");
		DEBUGLOG("Corosync quorum service is not configured");
		return EINVAL;
	}
#else
	err = quorum_initialize(&quorum_handle,
				&quorum_callbacks);
#endif

	if (err != CS_OK) {
		syslog(LOG_ERR, "Cannot initialise Corosync quorum service: %d",
		       err);
		DEBUGLOG("Cannot initialise Corosync quorum service: %d", err);
		return cs_to_errno(err);
	}

	/* Create a lockspace for LV & VG locks to live in */
	lockspace = dlm_open_lockspace(LOCKSPACE_NAME);
	if (!lockspace) {
		lockspace = dlm_create_lockspace(LOCKSPACE_NAME, 0600);
		if (!lockspace) {
			syslog(LOG_ERR, "Unable to create DLM lockspace for CLVM: %m");
			return -1;
		}
		DEBUGLOG("Created DLM lockspace for CLVMD.\n");
	} else
		DEBUGLOG("Opened existing DLM lockspace for CLVMD.\n");

	dlm_ls_pthread_init(lockspace);
	DEBUGLOG("DLM initialisation complete\n");

	/* Connect to the clvmd group */
	strcpy((char *)cpg_group_name.value, "clvmd");
	cpg_group_name.length = strlen((char *)cpg_group_name.value);
	err = cpg_join(cpg_handle, &cpg_group_name);
	if (err != CS_OK) {
		cpg_finalize(cpg_handle);
		quorum_finalize(quorum_handle);
		dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
		syslog(LOG_ERR, "Cannot join clvmd process group");
		DEBUGLOG("Cannot join clvmd process group: %d\n", err);
		return cs_to_errno(err);
	}

	err = cpg_local_get(cpg_handle,
			    &our_nodeid);
	if (err != CS_OK) {
		cpg_finalize(cpg_handle);
		quorum_finalize(quorum_handle);
		dlm_release_lockspace(LOCKSPACE_NAME, lockspace, 1);
		syslog(LOG_ERR, "Cannot get local node id\n");
		return cs_to_errno(err);
	}
	DEBUGLOG("Our local node id is %d\n", our_nodeid);

	DEBUGLOG("Connected to Corosync\n");

	return 0;
}
开发者ID:Find7s,项目名称:Lvm_for_Android,代码行数:84,代码来源:clvmd-corosync.c


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