📄 filecache.h
字号:
/* <LIC_AMD_STD> * Copyright (C) 2003-2005 Advanced Micro Devices, Inc. All Rights Reserved. * * Unless otherwise designated in writing, this software and any related * documentation are the confidential proprietary information of AMD. * THESE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY * UNLESS OTHERWISE NOTED IN WRITING, EXPRESS OR IMPLIED WARRANTY OF ANY * KIND, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, * NONINFRINGEMENT, TITLE, FITNESS FOR ANY PARTICULAR PURPOSE AND IN NO * EVENT SHALL AMD OR ITS LICENSORS BE LIABLE FOR ANY DAMAGES WHATSOEVER. * * AMD does not assume any responsibility for any errors which may appear * in the Materials nor any responsibility to support or update the * Materials. AMD retains the right to modify the Materials at any time, * without notice, and is not obligated to provide such modified * Materials to you. AMD is not obligated to furnish, support, or make * any further information available to you. * </LIC_AMD_STD> *//* <CTL_AMD_STD> * </CTL_AMD_STD> *//* <DOC_AMD_STD> * </DOC_AMD_STD> */#ifndef _FILECACHE_H_#define _FILECACHE_H_#include <stdio.h>#ifndef CFUNC# define CFUNC#endif#if defined(OS_Linux)# include <zlib.h># define fopen gzopen# define fclose gzclose//# define fprintf gzprintftypedef gzFile CachedFILE;#elsetypedef FILE *CachedFILE;#endifextern CFUNC void CriticalSectionInit();extern CFUNC void CriticalSectionExit();// A File Cache interface. The cache keeps a bunch of files open by// name. It does not close the files until it needs to reuse the cache entry.// This works really well for the MAE instrumentation that writes output for// each macro block to a handful of different files. Without the cache, it// closes (causing flush) each file for each macro block. With the cache, the// system overhead goes way down.extern CFUNC CachedFILE FileCacheGet(const char*);extern CFUNC void FileCacheDone(CachedFILE);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -