SHOGUN
3.2.1
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
lib
RefCount.h
浏览该文件的文档.
1
#ifdef HAVE_CXX11_ATOMIC
2
#include <atomic>
3
#endif
4
5
#include <
shogun/lib/common.h
>
6
#include <
shogun/lib/Lock.h
>
7
8
#ifndef _REFCOUNT__H__
9
#define _REFCOUNT__H__
10
11
namespace
shogun
12
{
16
class
RefCount
17
{
18
public
:
23
RefCount
(int32_t ref_start=0) :
rc
(ref_start) {}
24
29
int32_t
ref
();
30
35
int32_t
unref
();
36
41
int32_t
ref_count
();
42
44
#ifdef HAVE_CXX11_ATOMIC
45
volatile
std::atomic<int>
rc
;
46
#else
47
int32_t
rc
;
48
50
CLock
lock
;
51
#endif
52
};
53
}
54
55
#endif //_REFCOUNT__H__
SHOGUN
机器学习工具包 - 项目文档