SHOGUN  v3.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Parallel.h
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or modify
00003  * it under the terms of the GNU General Public License as published by
00004  * the Free Software Foundation; either version 3 of the License, or
00005  * (at your option) any later version.
00006  *
00007  * Written (W) 1999-2009 Soeren Sonnenburg
00008  * Copyright (C) 1999-2009 Fraunhofer Institute FIRST and Max-Planck-Society
00009  */
00010 
00011 #ifndef PARALLEL_H__
00012 #define PARALLEL_H__
00013 
00014 #include <shogun/lib/config.h>
00015 #include <shogun/lib/common.h>
00016 #include <shogun/io/SGIO.h>
00017 
00018 namespace shogun
00019 {
00020 class RefCount;
00027 class Parallel
00028 {
00029 public:
00031     Parallel();
00032 
00034     Parallel(const Parallel& orig);
00035 
00037     virtual ~Parallel();
00038 
00042     int32_t get_num_cpus() const;
00043 
00047     void set_num_threads(int32_t n);
00048 
00052     int32_t get_num_threads() const;
00053 
00057     int32_t ref();
00058 
00062     int32_t ref_count() const;
00063 
00067     int32_t unref();
00068 
00069 private:
00071     RefCount* m_refcount;
00072 
00074     int32_t num_threads;
00075 };
00076 }
00077 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

SHOGUN Machine Learning Toolbox - Documentation