⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umc_tracelog.cpp

📁 这是在PCA下的基于IPP库示例代码例子,在网上下了IPP的库之后,设置相关参数就可以编译该代码.
💻 CPP
字号:
/*//////////////////////////////////////////////////////////////////////////////////                  INTEL CORPORATION PROPRIETARY INFORMATION//     This software is supplied under the terms of a license agreement or//     nondisclosure agreement with Intel Corporation and may not be copied//     or disclosed except in accordance with the terms of that agreement.//          Copyright(c) 2003-2005 Intel Corporation. All Rights Reserved.//*///#if defined (WIN32)#ifdef LINUX32#undef VM_STATFILE#endif // LINUX32#include "umc_tracelog.h"namespace UMC{#ifdef VM_STATFILE    TraceLogToFile::TraceLogToFile(vm_trace_atribute atr,                                        vm_char* file_name,                                        vm_char* title)    {        vm_char file_ini[128];        vm_mutex_set_invalid(&Button_enter);        vm_mutex_init(&Button_enter);        if(atr) atrib = atr;        if(file_name)log_file = vm_fopen(file_name, __VM("w"));        else {            vm_sprintf(log_name,__VM("_app.csv"));            vm_sprintf(file_ini,__VM("stat_file.ini"));            log_file = (FILE*)vm_open_logfile(log_name,file_ini,NULL);        }        if(log_file) {            vm_fprintf(log_file, __VM("%s\n"),title);            fclose(log_file);            //vm_message(__VM("Stat file was open: %s"),log_name);        } else {            //vm_message(__VM("Stat file wasn't open"));        }    }    TraceLogToFile::~TraceLogToFile()    {        if (log_file)        {    fclose(log_file);    }        log_file = NULL;        vm_mutex_destroy(&Button_enter);    }    void    TraceLogToFile::LogToFile(const vm_char *format,...)    {        vm_mutex_lock(&Button_enter);        va_list  args;        vm_char line[1024] = {0,};        va_start(args, format);        vm_vsprintf(line, format, args);        va_end(args);        if(atrib != NEVER)            vm_trace_log(atrib,line);        log_file = vm_fopen(log_name, __VM("a"));        vm_fprintf(log_file, line);        fclose(log_file);        vm_mutex_unlock(&Button_enter);    }#else    TraceLogToFile::TraceLogToFile(vm_trace_atribute atr,                                        vm_char* file_name,                                        vm_char* title)    {}    TraceLogToFile::~TraceLogToFile()    {}    void    TraceLogToFile::LogToFile(const vm_char *format,...)    {}#endif}   //  namespace UMC//#endif  //  defined (WIN32)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -