SHOGUN
4.1.0
首页
相关页面
模块
类
文件
文件列表
文件成员
全部
类
命名空间
文件
函数
变量
类型定义
枚举
枚举值
友元
宏定义
组
页
src
shogun
base
Parallel.h
浏览该文件的文档.
1
/*
2
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License as published by
4
* the Free Software Foundation; either version 3 of the License, or
5
* (at your option) any later version.
6
*
7
* Written (W) 1999-2009 Soeren Sonnenburg
8
* Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
9
*/
10
11
#ifndef PARALLEL_H__
12
#define PARALLEL_H__
13
14
#include <
shogun/lib/config.h
>
15
16
#include <
shogun/lib/common.h
>
17
18
namespace
shogun
19
{
20
class
RefCount;
27
class
Parallel
28
{
29
public
:
31
Parallel
();
32
34
Parallel
(
const
Parallel
& orig);
35
37
virtual
~Parallel
();
38
42
int32_t
get_num_cpus
()
const
;
43
47
void
set_num_threads
(int32_t n);
48
52
int32_t
get_num_threads
()
const
;
53
57
int32_t
ref
();
58
62
int32_t
ref_count
()
const
;
63
67
int32_t
unref
();
68
69
private
:
71
RefCount
* m_refcount;
72
74
int32_t num_threads;
75
};
76
}
77
#endif
shogun::Parallel::set_num_threads
void set_num_threads(int32_t n)
Definition:
Parallel.cpp:56
shogun::Parallel::get_num_cpus
int32_t get_num_cpus() const
Definition:
Parallel.cpp:43
shogun::RefCount
Definition:
RefCount.h:18
shogun::Parallel::get_num_threads
int32_t get_num_threads() const
Definition:
Parallel.cpp:64
shogun::Parallel::ref
int32_t ref()
Definition:
Parallel.cpp:69
config.h
shogun::Parallel::unref
int32_t unref()
Definition:
Parallel.cpp:79
shogun::Parallel::Parallel
Parallel()
Definition:
Parallel.cpp:26
shogun::Parallel::~Parallel
virtual ~Parallel()
Definition:
Parallel.cpp:38
shogun::Parallel::ref_count
int32_t ref_count() const
Definition:
Parallel.cpp:74
shogun::Parallel
Class Parallel provides helper functions for multithreading.
Definition:
Parallel.h:27
shogun
all of classes and functions are contained in the shogun namespace
Definition:
class_list.h:18
common.h
SHOGUN
机器学习工具包 - 项目文档