diff --git a/dependencies/sources/TinyThread++-1.1/README.txt b/dependencies/sources/TinyThread++-1.1/README.txt deleted file mode 100644 index 6b16d86886..0000000000 --- a/dependencies/sources/TinyThread++-1.1/README.txt +++ /dev/null @@ -1,130 +0,0 @@ -TinyThread++ v1.1 -================= - -http://tinythreadpp.bitsnbites.eu - - -About ------ - -TinyThread++ is a minimalist, portable, threading library for C++, intended to -make it easy to create multi threaded C++ applications. - -The library is closesly modeled after the C++11 standard, but only a subset is -implemented at the moment. - -See the documentation in the doc/html directory for more information. - - -Using TinyThread++ ------------------- - -To use TinyThread++ in your own project, just add tinythread.cpp and -tinythread.h to your project. In your own code, do: - -#include -using namespace tthread; - -If you wish to use the fast_mutex class, inlude fast_mutex.h: - -#include - - -Building the test programs --------------------------- - -From the test folder, issue one of the following commands: - -Linux, Mac OS X, OpenSolaris etc: - make (you may need to use gmake on some systems) - -Windows/MinGW: - mingw32-make - -Windows/MS Visual Studio: - nmake /f Makefile.msvc - - -History -------- - -v1.1 - 2012.05.07 - - Added thread::detach(). - -v1.0 - 2010.10.01 - - First non-beta release. - - Made mutex non-recursive (according to spec), and added recursive_mutex. - - General class, code & documentation improvements. - - Added a Makefile for MS Visual Studio. - -v0.9 - 2010.08.10 - - Added preliminary support for this_thread::sleep_for(). - -v0.8 - 2010.07.02 - - Switched from CreateThread() to _beginthreadex() for Win32 (should fix - tiny memory leaks). - - Better standards compliance and some code cleanup. - -v0.7 - 2010.05.17 - - Added this_thread::yield(). - - Replaced the non-standard number_of_processors() function with - thread::hardware_concurrency(), which is part of the C++0x draft. - - The thread::id() class is now more standards compliant (correct namespace - and comparison operators). - -v0.6 - 2010.04.28 - - Added a fast_mutex class (in fast_mutex.h). - - Made the test.cpp application compile under Mac OS X and MinGW/g++ 3.x. - -v0.5 - 2010.03.31 - - Added the thread_local keyword (support for thread-local storage). - - Added a test application to test the API (test.cpp). - - Improved the Doxygen documentation. - -v0.4 - 2010.03.27 - - Added thread::get_id() and this_thread::get_id(). - - Changed the namespace name from tinythread to tthread. - -v0.3 - 2010.03.24 - - Fixed a compiler error for fractal.cpp under MS Visual C++. - - Added colors to the fractal generator. - -v0.2 - 2010.03.23 - - Better C++0x conformance. - - Better documentation. - - New classes: - - lock_guard - - New member functions: - - thread::joinable() - - thread::native_handle() - - mutex::try_lock() - - Added a multi threaded fractal generator test application. - -v0.1 - 2010.03.21 - - Initial release. - - -License -------- - -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - diff --git a/dependencies/sources/TinyThread++-1.1/doc/Doxyfile b/dependencies/sources/TinyThread++-1.1/doc/Doxyfile deleted file mode 100644 index 9a4fd18a04..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/Doxyfile +++ /dev/null @@ -1,1510 +0,0 @@ -# Doxyfile 1.5.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = TinyThread++ - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 1.1 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, Slovene, -# Spanish, Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = NO - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 2 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it parses. -# With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this tag. -# The format is ext=language, where ext is a file extension, and language is one of -# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, -# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat -# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), -# use: inc=Fortran f=C - -EXTENSION_MAPPING = - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols - -SYMBOL_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = YES - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = YES - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. -# This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by -# doxygen. The layout file controls the global structure of the generated output files -# in an output format independent way. The create the layout file that represents -# doxygen's defaults, run doxygen with the -l option. You can optionally specify a -# file name after the option, if omitted DoxygenLayout.xml will be used as the name -# of the layout file. - -LAYOUT_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = "../source" - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. -# Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. -# The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. -# Otherwise they will link to the documentation. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER -# are set, an additional index file will be generated that can be used as input for -# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated -# HTML documentation. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace - -QHP_NAMESPACE = - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders - -QHP_VIRTUAL_FOLDER = doc - -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. -# For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see -# Qt Help Project / Custom Filters. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's -# filter section matches. -# Qt Help Project / Filter Attributes. - -QHP_SECT_FILTER_ATTRS = - -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. - -QHG_LOCATION = - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = NONE - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. -# This is useful -# if you want to understand what is going on. -# On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. -# The default size is 10pt. - -DOT_FONTSIZE = 10 - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 0 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, because dot on Windows does not -# seem to support this out of the box. Warning: Depending on the platform used, -# enabling this option may lead to badly anti-aliased labels on the edges of -# a graph (i.e. they become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Options related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/annotated.html b/dependencies/sources/TinyThread++-1.1/doc/html/annotated.html deleted file mode 100644 index a645376f60..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/annotated.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -TinyThread++: Class List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
-
Class List
-
-
-
Here are the classes, structs, unions and interfaces with brief descriptions:
- - - - - - - - - -
condition_variableCondition variable class
duration< _Rep, _Period >Duration template class
fast_mutexFast mutex class
thread::idThread ID
lock_guard< T >Lock guard class
mutexMutex class
ratio< N, D >Minimal implementation of the ratio class
recursive_mutexRecursive mutex class
threadThread class
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/bc_s.png b/dependencies/sources/TinyThread++-1.1/doc/html/bc_s.png deleted file mode 100644 index e4018628b5..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/bc_s.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classes.html b/dependencies/sources/TinyThread++-1.1/doc/html/classes.html deleted file mode 100644 index 2d6df9afc6..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classes.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -TinyThread++: Class Index - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
-
Class Index
-
-
-
C | D | F | I | L | M | R | T
- -
  C  
-
  F  
-
  L  
-
mutex (tthread)   recursive_mutex (tthread)   
condition_variable (tthread)   fast_mutex (tthread)   lock_guard (tthread)   
  R  
-
  T  
-
  D  
-
  I  
-
  M  
-
ratio (tthread)   thread (tthread)   
duration (tthread::chrono)   thread::id (tthread)   
C | D | F | I | L | M | R | T
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration-members.html deleted file mode 100644 index b6d82e6f06..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration-members.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
duration< _Rep, _Period > Member List
-
-
-This is the complete list of members for duration< _Rep, _Period >, including all inherited members. - - -
count() const duration< _Rep, _Period > [inline]
duration(const _Rep2 &r)duration< _Rep, _Period > [inline, explicit]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration.html deleted file mode 100644 index c588b6bd59..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1chrono_1_1duration.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -TinyThread++: duration< _Rep, _Period > Class Template Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
duration< _Rep, _Period > Class Template Reference
-
-
- -

Duration template class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - - -

-Public Member Functions

-template<class _Rep2 >
 duration (const _Rep2 &r)
 Construct a duration object with the given duration.
-rep count () const
 Return the value of the duration object.
-

Detailed Description

-

template<class _Rep, class _Period = ratio<1>>
-class tthread::chrono::duration< _Rep, _Period >

- -

Duration template class.

-

This class provides enough functionality to implement this_thread::sleep_for().

-

The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable-members.html deleted file mode 100644 index 0037928541..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
condition_variable Member List
-
-
-This is the complete list of members for condition_variable, including all inherited members. - - - - - -
condition_variable()condition_variable [inline]
notify_all()condition_variable [inline]
notify_one()condition_variable [inline]
wait(_mutexT &aMutex)condition_variable [inline]
~condition_variable()condition_variable [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable.html deleted file mode 100644 index 3dab780e31..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1condition__variable.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - -TinyThread++: condition_variable Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
condition_variable Class Reference
-
-
- -

Condition variable class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - - - - - - - - -

-Public Member Functions

condition_variable ()
 Constructor.
~condition_variable ()
 Destructor.
template<class _mutexT >
void wait (_mutexT &aMutex)
 Wait for the condition.
void notify_one ()
 Notify one thread that is waiting for the condition.
void notify_all ()
 Notify all threads that are waiting for the condition.
-

Detailed Description

-

Condition variable class.

-

This is a signalling object for synchronizing the execution flow for several threads. Example usage:

-
 // Shared data and associated mutex and condition variable objects
- int count;
- mutex m;
- condition_variable cond;
-
- // Wait for the counter to reach a certain number
- void wait_counter(int targetCount)
- {
-   lock_guard<mutex> guard(m);
-   while(count < targetCount)
-     cond.wait(m);
- }
-
- // Increment the counter, and notify waiting threads
- void increment()
- {
-   lock_guard<mutex> guard(m);
-   ++ count;
-   cond.notify_all();
- }
-

Member Function Documentation

- -
-
- - - - - - - -
void notify_all () [inline]
-
-
- -

Notify all threads that are waiting for the condition.

-

All threads that are blocked waiting for this condition variable will be woken up.

-
Note:
Only threads that started waiting prior to this call will be woken up.
- -
-
- -
-
- - - - - - - -
void notify_one () [inline]
-
-
- -

Notify one thread that is waiting for the condition.

-

If at least one thread is blocked waiting for this condition variable, one will be woken up.

-
Note:
Only threads that started waiting prior to this call will be woken up.
- -
-
- -
-
- - - - - - - - -
void wait (_mutexT & aMutex) [inline]
-
-
- -

Wait for the condition.

-

The function will block the calling thread until the condition variable is woken by notify_one(), notify_all() or a spurious wake up.

-
Parameters:
- - -
[in]aMutexA mutex that will be unlocked when the wait operation starts, an locked again as soon as the wait operation is finished.
-
-
- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex-members.html deleted file mode 100644 index 9c88072913..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
fast_mutex Member List
-
-
-This is the complete list of members for fast_mutex, including all inherited members. - - - - - -
fast_mutex()fast_mutex [inline]
lock()fast_mutex [inline]
try_lock()fast_mutex [inline]
unlock()fast_mutex [inline]
~fast_mutex()fast_mutex [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex.html deleted file mode 100644 index 07c2520c7d..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1fast__mutex.html +++ /dev/null @@ -1,148 +0,0 @@ - - - - -TinyThread++: fast_mutex Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
fast_mutex Class Reference
-
-
- -

Fast mutex class. - More...

- -

#include <fast_mutex.h>

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

fast_mutex ()
 Constructor.
~fast_mutex ()
 Destructor.
void lock ()
 Lock the mutex.
bool try_lock ()
 Try to lock the mutex.
void unlock ()
 Unlock the mutex.
-

Detailed Description

-

Fast mutex class.

-

This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. It is similar to the tthread::mutex class, but instead of using system level functions, it is implemented as an atomic spin lock with very low CPU overhead.

-

The fast_mutex class is NOT compatible with the condition_variable class (however, it IS compatible with the lock_guard class). It should also be noted that the fast_mutex class typically does not provide as accurate thread scheduling as a the standard mutex class does.

-

Because of the limitations of the class, it should only be used in situations where the mutex needs to be locked/unlocked very frequently.

-
Note:
The "fast" version of this class relies on inline assembler language, which is currently only supported for 32/64-bit Intel x86/AMD64 and PowerPC architectures on a limited number of compilers (GNU g++ and MS Visual C++). For other architectures/compilers, system functions are used instead.
-

Member Function Documentation

- -
-
- - - - - - - -
void lock () [inline]
-
-
- -

Lock the mutex.

-

The method will block the calling thread until a lock on the mutex can be obtained. The mutex remains locked until unlock() is called.

-
See also:
lock_guard
- -
-
- -
-
- - - - - - - -
bool try_lock () [inline]
-
-
- -

Try to lock the mutex.

-

The method will try to lock the mutex. If it fails, the function will return immediately (non-blocking).

-
Returns:
true if the lock was acquired, or false if the lock could not be acquired.
- -
-
- -
-
- - - - - - - -
void unlock () [inline]
-
-
- -

Unlock the mutex.

-

If any threads are waiting for the lock on this mutex, one of them will be unblocked.

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard-members.html deleted file mode 100644 index 6a240b5724..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard-members.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
lock_guard< T > Member List
-
-
-This is the complete list of members for lock_guard< T >, including all inherited members. - - -
lock_guard(mutex_type &aMutex)lock_guard< T > [inline, explicit]
~lock_guard()lock_guard< T > [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard.html deleted file mode 100644 index 27860ebe04..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1lock__guard.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - -TinyThread++: lock_guard< T > Class Template Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
lock_guard< T > Class Template Reference
-
-
- -

Lock guard class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - -

-Public Member Functions

lock_guard (mutex_type &aMutex)
 The constructor locks the mutex.
~lock_guard ()
 The destructor unlocks the mutex.
-

Detailed Description

-

template<class T>
-class tthread::lock_guard< T >

- -

Lock guard class.

-

The constructor locks the mutex, and the destructor unlocks the mutex, so the mutex will automatically be unlocked when the lock guard goes out of scope. Example usage:

-
 mutex m;
- int counter;
-
- void increment()
- {
-   lock_guard<mutex> guard(m);
-   ++ counter;
- }
-

The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex-members.html deleted file mode 100644 index 387f3f136c..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
mutex Member List
-
-
-This is the complete list of members for mutex, including all inherited members. - - - - - -
lock()mutex [inline]
mutex()mutex [inline]
try_lock()mutex [inline]
unlock()mutex [inline]
~mutex()mutex [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex.html deleted file mode 100644 index ffc7d0ca4e..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1mutex.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - -TinyThread++: mutex Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
mutex Class Reference
-
-
- -

Mutex class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

mutex ()
 Constructor.
~mutex ()
 Destructor.
void lock ()
 Lock the mutex.
bool try_lock ()
 Try to lock the mutex.
void unlock ()
 Unlock the mutex.
-

Detailed Description

-

Mutex class.

-

This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. The mutex is non-recursive (i.e. a program may deadlock if the thread that owns a mutex object calls lock() on that object).

-
See also:
recursive_mutex
-

Member Function Documentation

- -
-
- - - - - - - -
void lock () [inline]
-
-
- -

Lock the mutex.

-

The method will block the calling thread until a lock on the mutex can be obtained. The mutex remains locked until unlock() is called.

-
See also:
lock_guard
- -
-
- -
-
- - - - - - - -
bool try_lock () [inline]
-
-
- -

Try to lock the mutex.

-

The method will try to lock the mutex. If it fails, the function will return immediately (non-blocking).

-
Returns:
true if the lock was acquired, or false if the lock could not be acquired.
- -
-
- -
-
- - - - - - - -
void unlock () [inline]
-
-
- -

Unlock the mutex.

-

If any threads are waiting for the lock on this mutex, one of them will be unblocked.

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio-members.html deleted file mode 100644 index 6f7bab3199..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio-members.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
ratio< N, D > Member List
-
-
-This is the complete list of members for ratio< N, D >, including all inherited members. -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio.html deleted file mode 100644 index 954be4f375..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1ratio.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - -TinyThread++: ratio< N, D > Class Template Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
ratio< N, D > Class Template Reference
-
-
- -

Minimal implementation of the ratio class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- -
-

Detailed Description

-

template<__intmax_t N, __intmax_t D = 1>
-class tthread::ratio< N, D >

- -

Minimal implementation of the ratio class.

-

This class provides enough functionality to implement some basic chrono classes.

-

The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex-members.html deleted file mode 100644 index 59f0df2bd8..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex-members.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
recursive_mutex Member List
-
-
-This is the complete list of members for recursive_mutex, including all inherited members. - - - - - -
lock()recursive_mutex [inline]
recursive_mutex()recursive_mutex [inline]
try_lock()recursive_mutex [inline]
unlock()recursive_mutex [inline]
~recursive_mutex()recursive_mutex [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex.html deleted file mode 100644 index 08e502b1e2..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1recursive__mutex.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - -TinyThread++: recursive_mutex Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
recursive_mutex Class Reference
-
-
- -

Recursive mutex class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - - - - - - - -

-Public Member Functions

recursive_mutex ()
 Constructor.
~recursive_mutex ()
 Destructor.
void lock ()
 Lock the mutex.
bool try_lock ()
 Try to lock the mutex.
void unlock ()
 Unlock the mutex.
-

Detailed Description

-

Recursive mutex class.

-

This is a mutual exclusion object for synchronizing access to shared memory areas for several threads. The mutex is recursive (i.e. a thread may lock the mutex several times, as long as it unlocks the mutex the same number of times).

-
See also:
mutex
-

Member Function Documentation

- -
-
- - - - - - - -
void lock () [inline]
-
-
- -

Lock the mutex.

-

The method will block the calling thread until a lock on the mutex can be obtained. The mutex remains locked until unlock() is called.

-
See also:
lock_guard
- -
-
- -
-
- - - - - - - -
bool try_lock () [inline]
-
-
- -

Try to lock the mutex.

-

The method will try to lock the mutex. If it fails, the function will return immediately (non-blocking).

-
Returns:
true if the lock was acquired, or false if the lock could not be acquired.
- -
-
- -
-
- - - - - - - -
void unlock () [inline]
-
-
- -

Unlock the mutex.

-

If any threads are waiting for the lock on this mutex, one of them will be unblocked.

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread-members.html deleted file mode 100644 index 8e7b3ce269..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread-members.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
thread Member List
-
-
-This is the complete list of members for thread, including all inherited members. - - - - - - - - - -
detach()thread
get_id() const thread
hardware_concurrency()thread [static]
join()thread
joinable() const thread
native_handle()thread [inline]
thread()thread [inline]
thread(void(*aFunction)(void *), void *aArg)thread
~thread()thread
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread.html deleted file mode 100644 index 980e92ce36..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - -TinyThread++: thread Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
thread Class Reference
-
-
- -

Thread class. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

class  id
 Thread ID. More...

-Public Member Functions

 thread ()
 Default constructor.
 thread (void(*aFunction)(void *), void *aArg)
 Thread starting constructor.
 ~thread ()
 Destructor.
void join ()
 Wait for the thread to finish (join execution flows).
bool joinable () const
 Check if the thread is joinable.
void detach ()
 Detach from the thread.
-id get_id () const
 Return the thread ID of a thread object.
native_handle_type native_handle ()
 Get the native handle for this thread.

-Static Public Member Functions

static unsigned hardware_concurrency ()
 Determine the number of threads which can possibly execute concurrently.
-

Detailed Description

-

Thread class.

-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
thread () [inline]
-
-
- -

Default constructor.

-

Construct a thread object without an associated thread of execution (i.e. non-joinable).

- -
-
- -
-
- - - - - - - - - - - - - - - - - - -
thread (void(*)(void *) aFunction,
void * aArg 
)
-
-
- -

Thread starting constructor.

-

Construct a thread object with a new thread of execution.

-
Parameters:
- - - -
[in]aFunctionA function pointer to a function of type: void fun(void * arg)
[in]aArgArgument to the thread function.
-
-
-
Note:
This constructor is not fully compatible with the standard C++ thread class. It is more similar to the pthread_create() (POSIX) and CreateThread() (Windows) functions.
- -
-
- -
-
- - - - - - - -
~thread ()
-
-
- -

Destructor.

-
Note:
If the thread is joinable upon destruction, std::terminate() will be called, which terminates the process. It is always wise to do join() before deleting a thread object.
- -
-
-

Member Function Documentation

- -
-
- - - - - - - -
void detach ()
-
-
- -

Detach from the thread.

-

After calling detach(), the thread object is no longer assicated with a thread of execution (i.e. it is not joinable). The thread continues execution without the calling thread blocking, and when the thread ends execution, any owned resources are released.

- -
-
- -
-
- - - - - - - -
static unsigned hardware_concurrency () [static]
-
-
- -

Determine the number of threads which can possibly execute concurrently.

-

This function is useful for determining the optimal number of threads to use for a task.

-
Returns:
The number of hardware thread contexts in the system.
-
Note:
If this value is not defined, the function returns zero (0).
- -
-
- -
-
- - - - - - - -
void join ()
-
-
- -

Wait for the thread to finish (join execution flows).

-

After calling join(), the thread object is no longer associated with a thread of execution (i.e. it is not joinable, and you may not join with it nor detach from it).

- -
-
- -
-
- - - - - - - -
bool joinable () const
-
-
- -

Check if the thread is joinable.

-

A thread object is joinable if it has an associated thread of execution.

- -
-
- -
-
- - - - - - - -
native_handle_type native_handle () [inline]
-
-
- -

Get the native handle for this thread.

-
Note:
Under Windows, this is a HANDLE, and under POSIX systems, this is a pthread_t.
- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id-members.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id-members.html deleted file mode 100644 index 2d0b8bfe54..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id-members.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - -TinyThread++: Member List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
-
thread::id Member List
-
-
-This is the complete list of members for thread::id, including all inherited members. - -
id()thread::id [inline]
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id.html b/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id.html deleted file mode 100644 index b56ef924ea..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/classtthread_1_1thread_1_1id.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - -TinyThread++: thread::id Class Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
thread::id Class Reference
-
-
- -

Thread ID. - More...

- -

#include <tinythread.h>

- -

List of all members.

- - - - -

-Public Member Functions

 id ()
 Default constructor.
-

Detailed Description

-

Thread ID.

-

The thread ID is a unique identifier for each thread.

-
See also:
thread::get_id()
-

Constructor & Destructor Documentation

- -
-
- - - - - - - -
id () [inline]
-
-
- -

Default constructor.

-

The default constructed ID is that of thread without a thread of execution.

- -
-
-
The documentation for this class was generated from the following file: -
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/closed.png b/dependencies/sources/TinyThread++-1.1/doc/html/closed.png deleted file mode 100644 index b7d4bd9fef..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/closed.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.css b/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.css deleted file mode 100644 index 74445fe1fe..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.css +++ /dev/null @@ -1,835 +0,0 @@ -/* The standard CSS for doxygen */ - -body, table, div, p, dl { - font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; - font-size: 12px; -} - -/* @group Heading Levels */ - -h1 { - font-size: 150%; -} - -.title { - font-size: 150%; - font-weight: bold; - margin: 10px 2px; -} - -h2 { - font-size: 120%; -} - -h3 { - font-size: 100%; -} - -dt { - font-weight: bold; -} - -div.multicol { - -moz-column-gap: 1em; - -webkit-column-gap: 1em; - -moz-column-count: 3; - -webkit-column-count: 3; -} - -p.startli, p.startdd, p.starttd { - margin-top: 2px; -} - -p.endli { - margin-bottom: 0px; -} - -p.enddd { - margin-bottom: 4px; -} - -p.endtd { - margin-bottom: 2px; -} - -/* @end */ - -caption { - font-weight: bold; -} - -span.legend { - font-size: 70%; - text-align: center; -} - -h3.version { - font-size: 90%; - text-align: center; -} - -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - padding: 2px; -} - -div.qindex, div.navpath { - width: 100%; - line-height: 140%; -} - -div.navtab { - margin-right: 15px; -} - -/* @group Link Styling */ - -a { - color: #3D578C; - font-weight: normal; - text-decoration: none; -} - -.contents a:visited { - color: #4665A2; -} - -a:hover { - text-decoration: underline; -} - -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #ffffff; - border: 1px double #869DCA; -} - -.contents a.qindexHL:visited { - color: #ffffff; -} - -a.el { - font-weight: bold; -} - -a.elRef { -} - -a.code { - color: #4665A2; -} - -a.codeRef { - color: #4665A2; -} - -/* @end */ - -dl.el { - margin-left: -1cm; -} - -.fragment { - font-family: monospace, fixed; - font-size: 105%; -} - -pre.fragment { - border: 1px solid #C4CFE5; - background-color: #FBFCFD; - padding: 4px 6px; - margin: 4px 8px 4px 2px; - overflow: auto; - word-wrap: break-word; - font-size: 9pt; - line-height: 125%; -} - -div.ah { - background-color: black; - font-weight: bold; - color: #ffffff; - margin-bottom: 3px; - margin-top: 3px; - padding: 0.2em; - border: solid thin #333; - border-radius: 0.5em; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - box-shadow: 2px 2px 3px #999; - -webkit-box-shadow: 2px 2px 3px #999; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; - background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); -} - -div.groupHeader { - margin-left: 16px; - margin-top: 12px; - font-weight: bold; -} - -div.groupText { - margin-left: 16px; - font-style: italic; -} - -body { - background: white; - color: black; - margin: 0; -} - -div.contents { - margin-top: 10px; - margin-left: 10px; - margin-right: 5px; -} - -td.indexkey { - background-color: #EBEFF6; - font-weight: bold; - border: 1px solid #C4CFE5; - margin: 2px 0px 2px 0; - padding: 2px 10px; -} - -td.indexvalue { - background-color: #EBEFF6; - border: 1px solid #C4CFE5; - padding: 2px 10px; - margin: 2px 0px; -} - -tr.memlist { - background-color: #EEF1F7; -} - -p.formulaDsp { - text-align: center; -} - -img.formulaDsp { - -} - -img.formulaInl { - vertical-align: middle; -} - -div.center { - text-align: center; - margin-top: 0px; - margin-bottom: 0px; - padding: 0px; -} - -div.center img { - border: 0px; -} - -address.footer { - text-align: right; - padding-right: 12px; -} - -img.footer { - border: 0px; - vertical-align: middle; -} - -/* @group Code Colorization */ - -span.keyword { - color: #008000 -} - -span.keywordtype { - color: #604020 -} - -span.keywordflow { - color: #e08000 -} - -span.comment { - color: #800000 -} - -span.preprocessor { - color: #806020 -} - -span.stringliteral { - color: #002080 -} - -span.charliteral { - color: #008080 -} - -span.vhdldigit { - color: #ff00ff -} - -span.vhdlchar { - color: #000000 -} - -span.vhdlkeyword { - color: #700070 -} - -span.vhdllogic { - color: #ff0000 -} - -/* @end */ - -/* -.search { - color: #003399; - font-weight: bold; -} - -form.search { - margin-bottom: 0px; - margin-top: 0px; -} - -input.search { - font-size: 75%; - color: #000080; - font-weight: normal; - background-color: #e8eef2; -} -*/ - -td.tiny { - font-size: 75%; -} - -.dirtab { - padding: 4px; - border-collapse: collapse; - border: 1px solid #A3B4D7; -} - -th.dirtab { - background: #EBEFF6; - font-weight: bold; -} - -hr { - height: 0px; - border: none; - border-top: 1px solid #4A6AAA; -} - -hr.footer { - height: 1px; -} - -/* @group Member Descriptions */ - -table.memberdecls { - border-spacing: 0px; - padding: 0px; -} - -.mdescLeft, .mdescRight, -.memItemLeft, .memItemRight, -.memTemplItemLeft, .memTemplItemRight, .memTemplParams { - background-color: #F9FAFC; - border: none; - margin: 4px; - padding: 1px 0 0 8px; -} - -.mdescLeft, .mdescRight { - padding: 0px 8px 4px 8px; - color: #555; -} - -.memItemLeft, .memItemRight, .memTemplParams { - border-top: 1px solid #C4CFE5; -} - -.memItemLeft, .memTemplItemLeft { - white-space: nowrap; -} - -.memItemRight { - width: 100%; -} - -.memTemplParams { - color: #4665A2; - white-space: nowrap; -} - -/* @end */ - -/* @group Member Details */ - -/* Styles for detailed member documentation */ - -.memtemplate { - font-size: 80%; - color: #4665A2; - font-weight: normal; - margin-left: 9px; -} - -.memnav { - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; - margin: 2px; - margin-right: 15px; - padding: 2px; -} - -.mempage { - width: 100%; -} - -.memitem { - padding: 0; - margin-bottom: 10px; - margin-right: 5px; -} - -.memname { - white-space: nowrap; - font-weight: bold; - margin-left: 6px; -} - -.memproto { - border-top: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 6px 0px 6px 0px; - color: #253555; - font-weight: bold; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - /* opera specific markup */ - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - border-top-right-radius: 8px; - border-top-left-radius: 8px; - /* firefox specific markup */ - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - -moz-border-radius-topright: 8px; - -moz-border-radius-topleft: 8px; - /* webkit specific markup */ - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - -webkit-border-top-right-radius: 8px; - -webkit-border-top-left-radius: 8px; - background-image:url('nav_f.png'); - background-repeat:repeat-x; - background-color: #E2E8F2; - -} - -.memdoc { - border-bottom: 1px solid #A8B8D9; - border-left: 1px solid #A8B8D9; - border-right: 1px solid #A8B8D9; - padding: 2px 5px; - background-color: #FBFCFD; - border-top-width: 0; - /* opera specific markup */ - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; - box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - /* firefox specific markup */ - -moz-border-radius-bottomleft: 8px; - -moz-border-radius-bottomright: 8px; - -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; - background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); - /* webkit specific markup */ - -webkit-border-bottom-left-radius: 8px; - -webkit-border-bottom-right-radius: 8px; - -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); - background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); -} - -.paramkey { - text-align: right; -} - -.paramtype { - white-space: nowrap; -} - -.paramname { - color: #602020; - white-space: nowrap; -} -.paramname em { - font-style: normal; -} - -.params, .retval, .exception, .tparams { - border-spacing: 6px 2px; -} - -.params .paramname, .retval .paramname { - font-weight: bold; - vertical-align: top; -} - -.params .paramtype { - font-style: italic; - vertical-align: top; -} - -.params .paramdir { - font-family: "courier new",courier,monospace; - vertical-align: top; -} - - - - -/* @end */ - -/* @group Directory (tree) */ - -/* for the tree view */ - -.ftvtree { - font-family: sans-serif; - margin: 0px; -} - -/* these are for tree view when used as main index */ - -.directory { - font-size: 9pt; - font-weight: bold; - margin: 5px; -} - -.directory h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -/* -The following two styles can be used to replace the root node title -with an image of your choice. Simply uncomment the next two styles, -specify the name of your image and be sure to set 'height' to the -proper pixel height of your image. -*/ - -/* -.directory h3.swap { - height: 61px; - background-repeat: no-repeat; - background-image: url("yourimage.gif"); -} -.directory h3.swap span { - display: none; -} -*/ - -.directory > h3 { - margin-top: 0; -} - -.directory p { - margin: 0px; - white-space: nowrap; -} - -.directory div { - display: none; - margin: 0px; -} - -.directory img { - vertical-align: -30%; -} - -/* these are for tree view when not used as main index */ - -.directory-alt { - font-size: 100%; - font-weight: bold; -} - -.directory-alt h3 { - margin: 0px; - margin-top: 1em; - font-size: 11pt; -} - -.directory-alt > h3 { - margin-top: 0; -} - -.directory-alt p { - margin: 0px; - white-space: nowrap; -} - -.directory-alt div { - display: none; - margin: 0px; -} - -.directory-alt img { - vertical-align: -30%; -} - -/* @end */ - -div.dynheader { - margin-top: 8px; -} - -address { - font-style: normal; - color: #2A3D61; -} - -table.doxtable { - border-collapse:collapse; -} - -table.doxtable td, table.doxtable th { - border: 1px solid #2D4068; - padding: 3px 7px 2px; -} - -table.doxtable th { - background-color: #374F7F; - color: #FFFFFF; - font-size: 110%; - padding-bottom: 4px; - padding-top: 5px; - text-align:left; -} - -.tabsearch { - top: 0px; - left: 10px; - height: 36px; - background-image: url('tab_b.png'); - z-index: 101; - overflow: hidden; - font-size: 13px; -} - -.navpath ul -{ - font-size: 11px; - background-image:url('tab_b.png'); - background-repeat:repeat-x; - height:30px; - line-height:30px; - color:#8AA0CC; - border:solid 1px #C2CDE4; - overflow:hidden; - margin:0px; - padding:0px; -} - -.navpath li -{ - list-style-type:none; - float:left; - padding-left:10px; - padding-right:15px; - background-image:url('bc_s.png'); - background-repeat:no-repeat; - background-position:right; - color:#364D7C; -} - -.navpath li.navelem a -{ - height:32px; - display:block; - text-decoration: none; - outline: none; -} - -.navpath li.navelem a:hover -{ - color:#6884BD; -} - -.navpath li.footer -{ - list-style-type:none; - float:right; - padding-left:10px; - padding-right:15px; - background-image:none; - background-repeat:no-repeat; - background-position:right; - color:#364D7C; - font-size: 8pt; -} - - -div.summary -{ - float: right; - font-size: 8pt; - padding-right: 5px; - width: 50%; - text-align: right; -} - -div.summary a -{ - white-space: nowrap; -} - -div.ingroups -{ - font-size: 8pt; - padding-left: 5px; - width: 50%; - text-align: left; -} - -div.ingroups a -{ - white-space: nowrap; -} - -div.header -{ - background-image:url('nav_h.png'); - background-repeat:repeat-x; - background-color: #F9FAFC; - margin: 0px; - border-bottom: 1px solid #C4CFE5; -} - -div.headertitle -{ - padding: 5px 5px 5px 10px; -} - -dl -{ - padding: 0 0 0 10px; -} - -dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug -{ - border-left:4px solid; - padding: 0 0 0 6px; -} - -dl.note -{ - border-color: #D0C000; -} - -dl.warning, dl.attention -{ - border-color: #FF0000; -} - -dl.pre, dl.post, dl.invariant -{ - border-color: #00D000; -} - -dl.deprecated -{ - border-color: #505050; -} - -dl.todo -{ - border-color: #00C0E0; -} - -dl.test -{ - border-color: #3030E0; -} - -dl.bug -{ - border-color: #C08050; -} - -#projectlogo -{ - text-align: center; - vertical-align: bottom; - border-collapse: separate; -} - -#projectlogo img -{ - border: 0px none; -} - -#projectname -{ - font: 300% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 2px 0px; -} - -#projectbrief -{ - font: 120% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#projectnumber -{ - font: 50% Tahoma, Arial,sans-serif; - margin: 0px; - padding: 0px; -} - -#titlearea -{ - padding: 0px; - margin: 0px; - width: 100%; - border-bottom: 1px solid #5373B4; -} - -.image -{ - text-align: center; -} - -.dotgraph -{ - text-align: center; -} - -.mscgraph -{ - text-align: center; -} - -.caption -{ - font-weight: bold; -} - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.png b/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.png deleted file mode 100644 index 635ed52fce..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/doxygen.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h.html b/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h.html deleted file mode 100644 index 015aee0757..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - -TinyThread++: fast_mutex.h File Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
- -
-
fast_mutex.h File Reference
-
-
-
#include <pthread.h>
-
-

Go to the source code of this file.

- - - - - - - -

-

-

-Classes

class  fast_mutex
 Fast mutex class. More...

-Namespaces

namespace  tthread
 

Main name space for TinyThread++.

-
-

Detailed Description

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h_source.html b/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h_source.html deleted file mode 100644 index 54a8d499e1..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/fast__mutex_8h_source.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - -TinyThread++: fast_mutex.h Source File - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
fast_mutex.h
-
-
-Go to the documentation of this file.
00001 /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
-00002 Copyright (c) 2010-2012 Marcus Geelnard
-00003 
-00004 This software is provided 'as-is', without any express or implied
-00005 warranty. In no event will the authors be held liable for any damages
-00006 arising from the use of this software.
-00007 
-00008 Permission is granted to anyone to use this software for any purpose,
-00009 including commercial applications, and to alter it and redistribute it
-00010 freely, subject to the following restrictions:
-00011 
-00012     1. The origin of this software must not be misrepresented; you must not
-00013     claim that you wrote the original software. If you use this software
-00014     in a product, an acknowledgment in the product documentation would be
-00015     appreciated but is not required.
-00016 
-00017     2. Altered source versions must be plainly marked as such, and must not be
-00018     misrepresented as being the original software.
-00019 
-00020     3. This notice may not be removed or altered from any source
-00021     distribution.
-00022 */
-00023 
-00024 #ifndef _FAST_MUTEX_H_
-00025 #define _FAST_MUTEX_H_
-00026 
-00028 
-00029 // Which platform are we on?
-00030 #if !defined(_TTHREAD_PLATFORM_DEFINED_)
-00031   #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
-00032     #define _TTHREAD_WIN32_
-00033   #else
-00034     #define _TTHREAD_POSIX_
-00035   #endif
-00036   #define _TTHREAD_PLATFORM_DEFINED_
-00037 #endif
-00038 
-00039 // Check if we can support the assembly language level implementation (otherwise
-00040 // revert to the system API)
-00041 #if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || \
-00042     (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || \
-00043     (defined(__GNUC__) && (defined(__ppc__)))
-00044   #define _FAST_MUTEX_ASM_
-00045 #else
-00046   #define _FAST_MUTEX_SYS_
-00047 #endif
-00048 
-00049 #if defined(_TTHREAD_WIN32_)
-00050   #ifndef WIN32_LEAN_AND_MEAN
-00051     #define WIN32_LEAN_AND_MEAN
-00052     #define __UNDEF_LEAN_AND_MEAN
-00053   #endif
-00054   #include <windows.h>
-00055   #ifdef __UNDEF_LEAN_AND_MEAN
-00056     #undef WIN32_LEAN_AND_MEAN
-00057     #undef __UNDEF_LEAN_AND_MEAN
-00058   #endif
-00059 #else
-00060   #ifdef _FAST_MUTEX_ASM_
-00061     #include <sched.h>
-00062   #else
-00063     #include <pthread.h>
-00064   #endif
-00065 #endif
-00066 
-00067 namespace tthread {
-00068 
-00088 class fast_mutex {
-00089   public:
-00091 #if defined(_FAST_MUTEX_ASM_)
-00092     fast_mutex() : mLock(0) {}
-00093 #else
-00094     fast_mutex()
-00095     {
-00096   #if defined(_TTHREAD_WIN32_)
-00097       InitializeCriticalSection(&mHandle);
-00098   #elif defined(_TTHREAD_POSIX_)
-00099       pthread_mutex_init(&mHandle, NULL);
-00100   #endif
-00101     }
-00102 #endif
-00103 
-00104 #if !defined(_FAST_MUTEX_ASM_)
-00105 
-00106     ~fast_mutex()
-00107     {
-00108   #if defined(_TTHREAD_WIN32_)
-00109       DeleteCriticalSection(&mHandle);
-00110   #elif defined(_TTHREAD_POSIX_)
-00111       pthread_mutex_destroy(&mHandle);
-00112   #endif
-00113     }
-00114 #endif
-00115 
-00120     inline void lock()
-00121     {
-00122 #if defined(_FAST_MUTEX_ASM_)
-00123       bool gotLock;
-00124       do {
-00125         gotLock = try_lock();
-00126         if(!gotLock)
-00127         {
-00128   #if defined(_TTHREAD_WIN32_)
-00129           Sleep(0);
-00130   #elif defined(_TTHREAD_POSIX_)
-00131           sched_yield();
-00132   #endif
-00133         }
-00134       } while(!gotLock);
-00135 #else
-00136   #if defined(_TTHREAD_WIN32_)
-00137       EnterCriticalSection(&mHandle);
-00138   #elif defined(_TTHREAD_POSIX_)
-00139       pthread_mutex_lock(&mHandle);
-00140   #endif
-00141 #endif
-00142     }
-00143 
-00149     inline bool try_lock()
-00150     {
-00151 #if defined(_FAST_MUTEX_ASM_)
-00152       int oldLock;
-00153   #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-00154       asm volatile (
-00155         "movl $1,%%eax\n\t"
-00156         "xchg %%eax,%0\n\t"
-00157         "movl %%eax,%1\n\t"
-00158         : "=m" (mLock), "=m" (oldLock)
-00159         :
-00160         : "%eax", "memory"
-00161       );
-00162   #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
-00163       int *ptrLock = &mLock;
-00164       __asm {
-00165         mov eax,1
-00166         mov ecx,ptrLock
-00167         xchg eax,[ecx]
-00168         mov oldLock,eax
-00169       }
-00170   #elif defined(__GNUC__) && (defined(__ppc__))
-00171       int newLock = 1;
-00172       asm volatile (
-00173         "\n1:\n\t"
-00174         "lwarx  %0,0,%1\n\t"
-00175         "cmpwi  0,%0,0\n\t"
-00176         "bne-   2f\n\t"
-00177         "stwcx. %2,0,%1\n\t"
-00178         "bne-   1b\n\t"
-00179         "isync\n"
-00180         "2:\n\t"
-00181         : "=&r" (oldLock)
-00182         : "r" (&mLock), "r" (newLock)
-00183         : "cr0", "memory"
-00184       );
-00185   #endif
-00186       return (oldLock == 0);
-00187 #else
-00188   #if defined(_TTHREAD_WIN32_)
-00189       return TryEnterCriticalSection(&mHandle) ? true : false;
-00190   #elif defined(_TTHREAD_POSIX_)
-00191       return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
-00192   #endif
-00193 #endif
-00194     }
-00195 
-00199     inline void unlock()
-00200     {
-00201 #if defined(_FAST_MUTEX_ASM_)
-00202   #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-00203       asm volatile (
-00204         "movl $0,%%eax\n\t"
-00205         "xchg %%eax,%0\n\t"
-00206         : "=m" (mLock)
-00207         :
-00208         : "%eax", "memory"
-00209       );
-00210   #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
-00211       int *ptrLock = &mLock;
-00212       __asm {
-00213         mov eax,0
-00214         mov ecx,ptrLock
-00215         xchg eax,[ecx]
-00216       }
-00217   #elif defined(__GNUC__) && (defined(__ppc__))
-00218       asm volatile (
-00219         "sync\n\t"  // Replace with lwsync where possible?
-00220         : : : "memory"
-00221       );
-00222       mLock = 0;
-00223   #endif
-00224 #else
-00225   #if defined(_TTHREAD_WIN32_)
-00226       LeaveCriticalSection(&mHandle);
-00227   #elif defined(_TTHREAD_POSIX_)
-00228       pthread_mutex_unlock(&mHandle);
-00229   #endif
-00230 #endif
-00231     }
-00232 
-00233   private:
-00234 #if defined(_FAST_MUTEX_ASM_)
-00235     int mLock;
-00236 #else
-00237   #if defined(_TTHREAD_WIN32_)
-00238     CRITICAL_SECTION mHandle;
-00239   #elif defined(_TTHREAD_POSIX_)
-00240     pthread_mutex_t mHandle;
-00241   #endif
-00242 #endif
-00243 };
-00244 
-00245 }
-00246 
-00247 #endif // _FAST_MUTEX_H_
-00248 
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/files.html b/dependencies/sources/TinyThread++-1.1/doc/html/files.html deleted file mode 100644 index 37606ab3ee..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/files.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -TinyThread++: File List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
-
File List
-
-
-
Here is a list of all documented files with brief descriptions:
- - -
fast_mutex.h [code]
tinythread.h [code]
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/functions.html b/dependencies/sources/TinyThread++-1.1/doc/html/functions.html deleted file mode 100644 index 525f03dbc0..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/functions.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - -TinyThread++: Class Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - - -
-
-
Here is a list of all documented class members with links to the class documentation for each member:
- -

- c -

- - -

- d -

- - -

- f -

- - -

- g -

- - -

- h -

    -
  • hardware_concurrency() -: thread -
  • -
- - -

- i -

- - -

- j -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- r -

- - -

- t -

- - -

- u -

- - -

- w -

- - -

- ~ -

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/functions_func.html b/dependencies/sources/TinyThread++-1.1/doc/html/functions_func.html deleted file mode 100644 index 0a857d76be..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/functions_func.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - -TinyThread++: Class Members - Functions - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - - -
-
-  - -

- c -

- - -

- d -

- - -

- f -

- - -

- g -

- - -

- h -

    -
  • hardware_concurrency() -: thread -
  • -
- - -

- i -

- - -

- j -

- - -

- l -

- - -

- m -

- - -

- n -

- - -

- r -

- - -

- t -

- - -

- u -

- - -

- w -

- - -

- ~ -

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/globals.html b/dependencies/sources/TinyThread++-1.1/doc/html/globals.html deleted file mode 100644 index 48c36b66fe..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/globals.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -TinyThread++: File Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
Here is a list of all documented file members with links to the documentation:
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/globals_defs.html b/dependencies/sources/TinyThread++-1.1/doc/html/globals_defs.html deleted file mode 100644 index 0214043b96..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/globals_defs.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -TinyThread++: File Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/index.html b/dependencies/sources/TinyThread++-1.1/doc/html/index.html deleted file mode 100644 index 98dc4f7abf..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/index.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -TinyThread++: TinyThread++ API Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- -
-
-
-
TinyThread++ API Reference
-
-
-

-Introduction

-

TinyThread++ is a minimal, portable implementation of basic threading classes for C++.

-

They closely mimic the functionality and naming of the C++11 standard, and should be easily replaceable with the corresponding std:: variants.

-

-Portability

-

The Win32 variant uses the native Win32 API for implementing the thread classes, while for other systems, the POSIX threads API (pthread) is used.

-

-Classes

-

In order to mimic the threading API of the C++11 standard, subsets of several classes are provided. The fundamental classes are:

- -

-Miscellaneous

-

The following special keywords are available: thread_local.

-

For more detailed information (including additional classes), browse the different sections of this documentation. A good place to start is: tinythread.h.

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers.html deleted file mode 100644 index aea89953d8..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - -TinyThread++: Namespace Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
Here is a list of all documented namespace members with links to the namespaces they belong to:
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_func.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_func.html deleted file mode 100644 index d3e73a09d0..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_func.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - -TinyThread++: Namespace Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_type.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_type.html deleted file mode 100644 index c27f09fdab..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacemembers_type.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -TinyThread++: Namespace Members - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespaces.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespaces.html deleted file mode 100644 index fed6924611..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespaces.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - -TinyThread++: Namespace List - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
-
Namespace List
-
-
-
Here is a list of all documented namespaces with brief descriptions:
- - - -
tthreadMain name space for TinyThread++
tthread::chronoMinimal implementation of the chrono namespace
tthread::this_threadThe namespace this_thread provides methods for dealing with the calling thread
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread.html deleted file mode 100644 index 8b8df2ac19..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - -TinyThread++: tthread Namespace Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
- -
-
tthread Namespace Reference
-
-
- -

Main name space for TinyThread++. -More...

- - - - -

-

- - -

-

- - - - - - - - - - - - - - - -

-Namespaces

namespace  chrono
 

Minimal implementation of the chrono namespace.

-
namespace  this_thread
 

The namespace this_thread provides methods for dealing with the calling thread.

-

-Classes

class  fast_mutex
 Fast mutex class. More...
class  mutex
 Mutex class. More...
class  recursive_mutex
 Recursive mutex class. More...
class  lock_guard
 Lock guard class. More...
class  condition_variable
 Condition variable class. More...
class  thread
 Thread class. More...
class  ratio
 Minimal implementation of the ratio class. More...
-

Detailed Description

-

Main name space for TinyThread++.

-

This namespace is more or less equivalent to the std namespace for the C++11 thread classes. For instance, the tthread::mutex class corresponds to the std::mutex class.

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1chrono.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1chrono.html deleted file mode 100644 index 4cf9ff7d83..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1chrono.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -TinyThread++: tthread::chrono Namespace Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
tthread::chrono Namespace Reference
-
-
- -

Minimal implementation of the chrono namespace. -More...

- - - - - - - - - - - - - - - - - -

-Classes

class  duration
 Duration template class. More...

-Typedefs

-typedef duration< __intmax_t,
-ratio< 1, 1000000000 > > 
nanoseconds
 Duration with the unit nanoseconds.
-typedef duration< __intmax_t,
-ratio< 1, 1000000 > > 
microseconds
 Duration with the unit microseconds.
-typedef duration< __intmax_t,
-ratio< 1, 1000 > > 
milliseconds
 Duration with the unit milliseconds.
-typedef duration< __intmax_t > seconds
 Duration with the unit seconds.
-typedef duration< __intmax_t,
-ratio< 60 > > 
minutes
 Duration with the unit minutes.
-typedef duration< __intmax_t,
-ratio< 3600 > > 
hours
 Duration with the unit hours.
-

Detailed Description

-

Minimal implementation of the chrono namespace.

-

The chrono namespace provides types for specifying time intervals.

-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1this__thread.html b/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1this__thread.html deleted file mode 100644 index 9ea6c7e243..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/namespacetthread_1_1this__thread.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - -TinyThread++: tthread::this_thread Namespace Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - - -
-
- -
-
tthread::this_thread Namespace Reference
-
-
- -

The namespace this_thread provides methods for dealing with the calling thread. -More...

- - - - - - - - - -

-Functions

-thread::id get_id ()
 Return the thread ID of the calling thread.
void yield ()
 Yield execution to another thread.
template<class _Rep , class _Period >
void sleep_for (const chrono::duration< _Rep, _Period > &aTime)
 Blocks the calling thread for a period of time.
-

Detailed Description

-

The namespace this_thread provides methods for dealing with the calling thread.

-

Function Documentation

- -
-
- - - - - - - - -
void tthread::this_thread::sleep_for (const chrono::duration< _Rep, _Period > & aTime)
-
-
- -

Blocks the calling thread for a period of time.

-
Parameters:
- - -
[in]aTimeMinimum time to put the thread to sleep. Example usage:
 // Sleep for 100 milliseconds
- this_thread::sleep_for(chrono::milliseconds(100));
-
-
-
-
Note:
Supported duration types are: nanoseconds, microseconds, milliseconds, seconds, minutes and hours.
- -
-
- -
-
- - - - - - - -
void tthread::this_thread::yield () [inline]
-
-
- -

Yield execution to another thread.

-

Offers the operating system the opportunity to schedule another thread that is ready to run on the current processor.

- -
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/nav_f.png b/dependencies/sources/TinyThread++-1.1/doc/html/nav_f.png deleted file mode 100644 index 1b07a16207..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/nav_f.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/nav_h.png b/dependencies/sources/TinyThread++-1.1/doc/html/nav_h.png deleted file mode 100644 index 01f5fa6a59..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/nav_h.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/open.png b/dependencies/sources/TinyThread++-1.1/doc/html/open.png deleted file mode 100644 index 7b35d2c2c3..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/open.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tab_a.png b/dependencies/sources/TinyThread++-1.1/doc/html/tab_a.png deleted file mode 100644 index 2d99ef23fe..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/tab_a.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tab_b.png b/dependencies/sources/TinyThread++-1.1/doc/html/tab_b.png deleted file mode 100644 index b2c3d2be3c..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/tab_b.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tab_h.png b/dependencies/sources/TinyThread++-1.1/doc/html/tab_h.png deleted file mode 100644 index c11f48f19b..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/tab_h.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tab_s.png b/dependencies/sources/TinyThread++-1.1/doc/html/tab_s.png deleted file mode 100644 index 978943ac80..0000000000 Binary files a/dependencies/sources/TinyThread++-1.1/doc/html/tab_s.png and /dev/null differ diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tabs.css b/dependencies/sources/TinyThread++-1.1/doc/html/tabs.css deleted file mode 100644 index 21920562a8..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/tabs.css +++ /dev/null @@ -1,59 +0,0 @@ -.tabs, .tabs2, .tabs3 { - background-image: url('tab_b.png'); - width: 100%; - z-index: 101; - font-size: 13px; -} - -.tabs2 { - font-size: 10px; -} -.tabs3 { - font-size: 9px; -} - -.tablist { - margin: 0; - padding: 0; - display: table; -} - -.tablist li { - float: left; - display: table-cell; - background-image: url('tab_b.png'); - line-height: 36px; - list-style: none; -} - -.tablist a { - display: block; - padding: 0 20px; - font-weight: bold; - background-image:url('tab_s.png'); - background-repeat:no-repeat; - background-position:right; - color: #283A5D; - text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); - text-decoration: none; - outline: none; -} - -.tabs3 .tablist a { - padding: 0 10px; -} - -.tablist a:hover { - background-image: url('tab_h.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); - text-decoration: none; -} - -.tablist li.current a { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); -} diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h.html b/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h.html deleted file mode 100644 index 902cdd8cbe..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - -TinyThread++: tinythread.h File Reference - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
- -
-
tinythread.h File Reference
-
-
-
#include <pthread.h>
-#include <signal.h>
-#include <sched.h>
-#include <unistd.h>
-#include <ostream>
-
-

Go to the source code of this file.

- - - - - - - - - - - - - - - - - - - - - -

-

- - -

-

- - -

-

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-Classes

class  mutex
 Mutex class. More...
class  recursive_mutex
 Recursive mutex class. More...
class  lock_guard< T >
 Lock guard class. More...
class  condition_variable
 Condition variable class. More...
class  thread
 Thread class. More...
class  thread::id
 Thread ID. More...
class  ratio< N, D >
 Minimal implementation of the ratio class. More...
class  duration< _Rep, _Period >
 Duration template class. More...

-Namespaces

namespace  tthread
 

Main name space for TinyThread++.

-
namespace  tthread::chrono
 

Minimal implementation of the chrono namespace.

-
namespace  tthread::this_thread
 

The namespace this_thread provides methods for dealing with the calling thread.

-

-Defines

-#define TINYTHREAD_VERSION_MAJOR   1
 TinyThread++ version (major number).
-#define TINYTHREAD_VERSION_MINOR   1
 TinyThread++ version (minor number).
-#define TINYTHREAD_VERSION   (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)
 TinyThread++ version (full version).
#define thread_local
 Thread local storage keyword.

-Typedefs

-typedef duration< __intmax_t,
-ratio< 1, 1000000000 > > 
nanoseconds
 Duration with the unit nanoseconds.
-typedef duration< __intmax_t,
-ratio< 1, 1000000 > > 
microseconds
 Duration with the unit microseconds.
-typedef duration< __intmax_t,
-ratio< 1, 1000 > > 
milliseconds
 Duration with the unit milliseconds.
-typedef duration< __intmax_t > seconds
 Duration with the unit seconds.
-typedef duration< __intmax_t,
-ratio< 60 > > 
minutes
 Duration with the unit minutes.
-typedef duration< __intmax_t,
-ratio< 3600 > > 
hours
 Duration with the unit hours.

-Functions

-thread::id get_id ()
 Return the thread ID of the calling thread.
void yield ()
 Yield execution to another thread.
template<class _Rep , class _Period >
void sleep_for (const chrono::duration< _Rep, _Period > &aTime)
 Blocks the calling thread for a period of time.
-

Detailed Description

-

Define Documentation

- -
-
- - - - -
#define thread_local
-
-
- -

Thread local storage keyword.

-

A variable that is declared with the thread_local keyword makes the value of the variable local to each thread (known as thread-local storage, or TLS). Example usage:

-
 // This variable is local to each thread.
- thread_local int variable;
-
Note:
The thread_local keyword is a macro that maps to the corresponding compiler directive (e.g. __declspec(thread)). While the C++11 standard allows for non-trivial types (e.g. classes with constructors and destructors) to be declared with the thread_local keyword, most pre-C++11 compilers only allow for trivial types (e.g. int). So, to guarantee portable code, only use trivial types for thread local storage.
-
-This directive is currently not supported on Mac OS X (it will give a compiler error), since compile-time TLS is not supported in the Mac OS X executable format. Also, some older versions of MinGW (before GCC 4.x) do not support this directive.
- -
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h_source.html b/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h_source.html deleted file mode 100644 index fb13c3410b..0000000000 --- a/dependencies/sources/TinyThread++-1.1/doc/html/tinythread_8h_source.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - -TinyThread++: tinythread.h Source File - - - - - -
-
- - - - - - -
-
TinyThread++ 1.1
-
-
- - -
-
-
tinythread.h
-
-
-Go to the documentation of this file.
00001 /* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*-
-00002 Copyright (c) 2010-2012 Marcus Geelnard
-00003 
-00004 This software is provided 'as-is', without any express or implied
-00005 warranty. In no event will the authors be held liable for any damages
-00006 arising from the use of this software.
-00007 
-00008 Permission is granted to anyone to use this software for any purpose,
-00009 including commercial applications, and to alter it and redistribute it
-00010 freely, subject to the following restrictions:
-00011 
-00012     1. The origin of this software must not be misrepresented; you must not
-00013     claim that you wrote the original software. If you use this software
-00014     in a product, an acknowledgment in the product documentation would be
-00015     appreciated but is not required.
-00016 
-00017     2. Altered source versions must be plainly marked as such, and must not be
-00018     misrepresented as being the original software.
-00019 
-00020     3. This notice may not be removed or altered from any source
-00021     distribution.
-00022 */
-00023 
-00024 #ifndef _TINYTHREAD_H_
-00025 #define _TINYTHREAD_H_
-00026 
-00057 
-00058 // Which platform are we on?
-00059 #if !defined(_TTHREAD_PLATFORM_DEFINED_)
-00060   #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__)
-00061     #define _TTHREAD_WIN32_
-00062   #else
-00063     #define _TTHREAD_POSIX_
-00064   #endif
-00065   #define _TTHREAD_PLATFORM_DEFINED_
-00066 #endif
-00067 
-00068 // Platform specific includes
-00069 #if defined(_TTHREAD_WIN32_)
-00070   #ifndef WIN32_LEAN_AND_MEAN
-00071     #define WIN32_LEAN_AND_MEAN
-00072     #define __UNDEF_LEAN_AND_MEAN
-00073   #endif
-00074   #include <windows.h>
-00075   #ifdef __UNDEF_LEAN_AND_MEAN
-00076     #undef WIN32_LEAN_AND_MEAN
-00077     #undef __UNDEF_LEAN_AND_MEAN
-00078   #endif
-00079 #else
-00080   #include <pthread.h>
-00081   #include <signal.h>
-00082   #include <sched.h>
-00083   #include <unistd.h>
-00084 #endif
-00085 
-00086 // Generic includes
-00087 #include <ostream>
-00088 
-00090 #define TINYTHREAD_VERSION_MAJOR 1
-00091 
-00092 #define TINYTHREAD_VERSION_MINOR 1
-00093 
-00094 #define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR)
-00095 
-00096 // Do we have a fully featured C++11 compiler?
-00097 #if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L))
-00098   #define _TTHREAD_CPP11_
-00099 #endif
-00100 
-00101 // ...at least partial C++11?
-00102 #if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__)
-00103   #define _TTHREAD_CPP11_PARTIAL_
-00104 #endif
-00105 
-00106 // Macro for disabling assignments of objects.
-00107 #ifdef _TTHREAD_CPP11_PARTIAL_
-00108   #define _TTHREAD_DISABLE_ASSIGNMENT(name) \
-00109       name(const name&) = delete; \
-00110       name& operator=(const name&) = delete;
-00111 #else
-00112   #define _TTHREAD_DISABLE_ASSIGNMENT(name) \
-00113       name(const name&); \
-00114       name& operator=(const name&);
-00115 #endif
-00116 
-00137 
-00138 #if !defined(_TTHREAD_CPP11_) && !defined(thread_local)
-00139  #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__)
-00140   #define thread_local __thread
-00141  #else
-00142   #define thread_local __declspec(thread)
-00143  #endif
-00144 #endif
-00145 
-00146 
-00151 namespace tthread {
-00152 
-00159 class mutex {
-00160   public:
-00162     mutex()
-00163 #if defined(_TTHREAD_WIN32_)
-00164       : mAlreadyLocked(false)
-00165 #endif
-00166     {
-00167 #if defined(_TTHREAD_WIN32_)
-00168       InitializeCriticalSection(&mHandle);
-00169 #else
-00170       pthread_mutex_init(&mHandle, NULL);
-00171 #endif
-00172     }
-00173 
-00175     ~mutex()
-00176     {
-00177 #if defined(_TTHREAD_WIN32_)
-00178       DeleteCriticalSection(&mHandle);
-00179 #else
-00180       pthread_mutex_destroy(&mHandle);
-00181 #endif
-00182     }
-00183 
-00188     inline void lock()
-00189     {
-00190 #if defined(_TTHREAD_WIN32_)
-00191       EnterCriticalSection(&mHandle);
-00192       while(mAlreadyLocked) Sleep(1000); // Simulate deadlock...
-00193       mAlreadyLocked = true;
-00194 #else
-00195       pthread_mutex_lock(&mHandle);
-00196 #endif
-00197     }
-00198 
-00204     inline bool try_lock()
-00205     {
-00206 #if defined(_TTHREAD_WIN32_)
-00207       bool ret = (TryEnterCriticalSection(&mHandle) ? true : false);
-00208       if(ret && mAlreadyLocked)
-00209       {
-00210         LeaveCriticalSection(&mHandle);
-00211         ret = false;
-00212       }
-00213       return ret;
-00214 #else
-00215       return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
-00216 #endif
-00217     }
-00218 
-00222     inline void unlock()
-00223     {
-00224 #if defined(_TTHREAD_WIN32_)
-00225       mAlreadyLocked = false;
-00226       LeaveCriticalSection(&mHandle);
-00227 #else
-00228       pthread_mutex_unlock(&mHandle);
-00229 #endif
-00230     }
-00231 
-00232     _TTHREAD_DISABLE_ASSIGNMENT(mutex)
-00233 
-00234   private:
-00235 #if defined(_TTHREAD_WIN32_)
-00236     CRITICAL_SECTION mHandle;
-00237     bool mAlreadyLocked;
-00238 #else
-00239     pthread_mutex_t mHandle;
-00240 #endif
-00241 
-00242     friend class condition_variable;
-00243 };
-00244 
-00251 class recursive_mutex {
-00252   public:
-00254     recursive_mutex()
-00255     {
-00256 #if defined(_TTHREAD_WIN32_)
-00257       InitializeCriticalSection(&mHandle);
-00258 #else
-00259       pthread_mutexattr_t attr;
-00260       pthread_mutexattr_init(&attr);
-00261       pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-00262       pthread_mutex_init(&mHandle, &attr);
-00263 #endif
-00264     }
-00265 
-00267     ~recursive_mutex()
-00268     {
-00269 #if defined(_TTHREAD_WIN32_)
-00270       DeleteCriticalSection(&mHandle);
-00271 #else
-00272       pthread_mutex_destroy(&mHandle);
-00273 #endif
-00274     }
-00275 
-00280     inline void lock()
-00281     {
-00282 #if defined(_TTHREAD_WIN32_)
-00283       EnterCriticalSection(&mHandle);
-00284 #else
-00285       pthread_mutex_lock(&mHandle);
-00286 #endif
-00287     }
-00288 
-00294     inline bool try_lock()
-00295     {
-00296 #if defined(_TTHREAD_WIN32_)
-00297       return TryEnterCriticalSection(&mHandle) ? true : false;
-00298 #else
-00299       return (pthread_mutex_trylock(&mHandle) == 0) ? true : false;
-00300 #endif
-00301     }
-00302 
-00306     inline void unlock()
-00307     {
-00308 #if defined(_TTHREAD_WIN32_)
-00309       LeaveCriticalSection(&mHandle);
-00310 #else
-00311       pthread_mutex_unlock(&mHandle);
-00312 #endif
-00313     }
-00314 
-00315     _TTHREAD_DISABLE_ASSIGNMENT(recursive_mutex)
-00316 
-00317   private:
-00318 #if defined(_TTHREAD_WIN32_)
-00319     CRITICAL_SECTION mHandle;
-00320 #else
-00321     pthread_mutex_t mHandle;
-00322 #endif
-00323 
-00324     friend class condition_variable;
-00325 };
-00326 
-00341 
-00342 template <class T>
-00343 class lock_guard {
-00344   public:
-00345     typedef T mutex_type;
-00346 
-00347     lock_guard() : mMutex(0) {}
-00348 
-00350     explicit lock_guard(mutex_type &aMutex)
-00351     {
-00352       mMutex = &aMutex;
-00353       mMutex->lock();
-00354     }
-00355 
-00357     ~lock_guard()
-00358     {
-00359       if(mMutex)
-00360         mMutex->unlock();
-00361     }
-00362 
-00363   private:
-00364     mutex_type * mMutex;
-00365 };
-00366 
-00392 class condition_variable {
-00393   public:
-00395 #if defined(_TTHREAD_WIN32_)
-00396     condition_variable();
-00397 #else
-00398     condition_variable()
-00399     {
-00400       pthread_cond_init(&mHandle, NULL);
-00401     }
-00402 #endif
-00403 
-00405 #if defined(_TTHREAD_WIN32_)
-00406     ~condition_variable();
-00407 #else
-00408     ~condition_variable()
-00409     {
-00410       pthread_cond_destroy(&mHandle);
-00411     }
-00412 #endif
-00413 
-00419     template <class _mutexT>
-00420     inline void wait(_mutexT &aMutex)
-00421     {
-00422 #if defined(_TTHREAD_WIN32_)
-00423       // Increment number of waiters
-00424       EnterCriticalSection(&mWaitersCountLock);
-00425       ++ mWaitersCount;
-00426       LeaveCriticalSection(&mWaitersCountLock);
-00427 
-00428       // Release the mutex while waiting for the condition (will decrease
-00429       // the number of waiters when done)...
-00430       aMutex.unlock();
-00431       _wait();
-00432       aMutex.lock();
-00433 #else
-00434       pthread_cond_wait(&mHandle, &aMutex.mHandle);
-00435 #endif
-00436     }
-00437 
-00443 #if defined(_TTHREAD_WIN32_)
-00444     void notify_one();
-00445 #else
-00446     inline void notify_one()
-00447     {
-00448       pthread_cond_signal(&mHandle);
-00449     }
-00450 #endif
-00451 
-00457 #if defined(_TTHREAD_WIN32_)
-00458     void notify_all();
-00459 #else
-00460     inline void notify_all()
-00461     {
-00462       pthread_cond_broadcast(&mHandle);
-00463     }
-00464 #endif
-00465 
-00466     _TTHREAD_DISABLE_ASSIGNMENT(condition_variable)
-00467 
-00468   private:
-00469 #if defined(_TTHREAD_WIN32_)
-00470     void _wait();
-00471     HANDLE mEvents[2];                  
-00472     unsigned int mWaitersCount;         
-00473     CRITICAL_SECTION mWaitersCountLock; 
-00474 #else
-00475     pthread_cond_t mHandle;
-00476 #endif
-00477 };
-00478 
-00479 
-00481 class thread {
-00482   public:
-00483 #if defined(_TTHREAD_WIN32_)
-00484     typedef HANDLE native_handle_type;
-00485 #else
-00486     typedef pthread_t native_handle_type;
-00487 #endif
-00488 
-00489     class id;
-00490 
-00494     thread() : mHandle(0), mNotAThread(true)
-00495 #if defined(_TTHREAD_WIN32_)
-00496     , mWin32ThreadID(0)
-00497 #endif
-00498     {}
-00499 
-00508     thread(void (*aFunction)(void *), void * aArg);
-00509 
-00514     ~thread();
-00515 
-00520     void join();
-00521 
-00524     bool joinable() const;
-00525 
-00531     void detach();
-00532 
-00534     id get_id() const;
-00535 
-00539     inline native_handle_type native_handle()
-00540     {
-00541       return mHandle;
-00542     }
-00543 
-00549     static unsigned hardware_concurrency();
-00550 
-00551     _TTHREAD_DISABLE_ASSIGNMENT(thread)
-00552 
-00553   private:
-00554     native_handle_type mHandle;   
-00555     mutable mutex mDataMutex;     
-00556     bool mNotAThread;             
-00557 #if defined(_TTHREAD_WIN32_)
-00558     unsigned int mWin32ThreadID;  
-00559 #endif
-00560 
-00561     // This is the internal thread wrapper function.
-00562 #if defined(_TTHREAD_WIN32_)
-00563     static unsigned WINAPI wrapper_function(void * aArg);
-00564 #else
-00565     static void * wrapper_function(void * aArg);
-00566 #endif
-00567 };
-00568 
-00572 class thread::id {
-00573   public:
-00577     id() : mId(0) {};
-00578 
-00579     id(unsigned long int aId) : mId(aId) {};
-00580 
-00581     id(const id& aId) : mId(aId.mId) {};
-00582 
-00583     inline id & operator=(const id &aId)
-00584     {
-00585       mId = aId.mId;
-00586       return *this;
-00587     }
-00588 
-00589     inline friend bool operator==(const id &aId1, const id &aId2)
-00590     {
-00591       return (aId1.mId == aId2.mId);
-00592     }
-00593 
-00594     inline friend bool operator!=(const id &aId1, const id &aId2)
-00595     {
-00596       return (aId1.mId != aId2.mId);
-00597     }
-00598 
-00599     inline friend bool operator<=(const id &aId1, const id &aId2)
-00600     {
-00601       return (aId1.mId <= aId2.mId);
-00602     }
-00603 
-00604     inline friend bool operator<(const id &aId1, const id &aId2)
-00605     {
-00606       return (aId1.mId < aId2.mId);
-00607     }
-00608 
-00609     inline friend bool operator>=(const id &aId1, const id &aId2)
-00610     {
-00611       return (aId1.mId >= aId2.mId);
-00612     }
-00613 
-00614     inline friend bool operator>(const id &aId1, const id &aId2)
-00615     {
-00616       return (aId1.mId > aId2.mId);
-00617     }
-00618 
-00619     inline friend std::ostream& operator <<(std::ostream &os, const id &obj)
-00620     {
-00621       os << obj.mId;
-00622       return os;
-00623     }
-00624 
-00625   private:
-00626     unsigned long int mId;
-00627 };
-00628 
-00629 
-00630 // Related to <ratio> - minimal to be able to support chrono.
-00631 typedef long long __intmax_t;
-00632 
-00635 template <__intmax_t N, __intmax_t D = 1> class ratio {
-00636   public:
-00637     static double _as_double() { return double(N) / double(D); }
-00638 };
-00639 
-00642 namespace chrono {
-00645   template <class _Rep, class _Period = ratio<1> > class duration {
-00646     private:
-00647       _Rep rep_;
-00648     public:
-00649       typedef _Rep rep;
-00650       typedef _Period period;
-00651 
-00653       template <class _Rep2>
-00654         explicit duration(const _Rep2& r) : rep_(r) {};
-00655 
-00657       rep count() const
-00658       {
-00659         return rep_;
-00660       }
-00661   };
-00662 
-00663   // Standard duration types.
-00664   typedef duration<__intmax_t, ratio<1, 1000000000> > nanoseconds; 
-00665   typedef duration<__intmax_t, ratio<1, 1000000> > microseconds;   
-00666   typedef duration<__intmax_t, ratio<1, 1000> > milliseconds;      
-00667   typedef duration<__intmax_t> seconds;                            
-00668   typedef duration<__intmax_t, ratio<60> > minutes;                
-00669   typedef duration<__intmax_t, ratio<3600> > hours;                
-00670 }
-00671 
-00674 namespace this_thread {
-00676   thread::id get_id();
-00677 
-00681   inline void yield()
-00682   {
-00683 #if defined(_TTHREAD_WIN32_)
-00684     Sleep(0);
-00685 #else
-00686     sched_yield();
-00687 #endif
-00688   }
-00689 
-00699   template <class _Rep, class _Period> void sleep_for(const chrono::duration<_Rep, _Period>& aTime)
-00700   {
-00701 #if defined(_TTHREAD_WIN32_)
-00702     Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5));
-00703 #else
-00704     usleep(int(double(aTime.count()) * (1000000.0 * _Period::_as_double()) + 0.5));
-00705 #endif
-00706   }
-00707 }
-00708 
-00709 }
-00710 
-00711 // Define/macro cleanup
-00712 #undef _TTHREAD_DISABLE_ASSIGNMENT
-00713 
-00714 #endif // _TINYTHREAD_H_
-
-
- - - diff --git a/dependencies/sources/TinyThread++-1.1/source/fast_mutex.h b/dependencies/sources/TinyThread++-1.1/source/fast_mutex.h deleted file mode 100644 index 4d4b7cc431..0000000000 --- a/dependencies/sources/TinyThread++-1.1/source/fast_mutex.h +++ /dev/null @@ -1,248 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#ifndef _FAST_MUTEX_H_ -#define _FAST_MUTEX_H_ - -/// @file - -// Which platform are we on? -#if !defined(_TTHREAD_PLATFORM_DEFINED_) - #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__) - #define _TTHREAD_WIN32_ - #else - #define _TTHREAD_POSIX_ - #endif - #define _TTHREAD_PLATFORM_DEFINED_ -#endif - -// Check if we can support the assembly language level implementation (otherwise -// revert to the system API) -#if (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) || \ - (defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))) || \ - (defined(__GNUC__) && (defined(__ppc__))) - #define _FAST_MUTEX_ASM_ -#else - #define _FAST_MUTEX_SYS_ -#endif - -#if defined(_TTHREAD_WIN32_) - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #define __UNDEF_LEAN_AND_MEAN - #endif - #include - #ifdef __UNDEF_LEAN_AND_MEAN - #undef WIN32_LEAN_AND_MEAN - #undef __UNDEF_LEAN_AND_MEAN - #endif -#else - #ifdef _FAST_MUTEX_ASM_ - #include - #else - #include - #endif -#endif - -namespace tthread { - -/// Fast mutex class. -/// This is a mutual exclusion object for synchronizing access to shared -/// memory areas for several threads. It is similar to the tthread::mutex class, -/// but instead of using system level functions, it is implemented as an atomic -/// spin lock with very low CPU overhead. -/// -/// The \c fast_mutex class is NOT compatible with the \c condition_variable -/// class (however, it IS compatible with the \c lock_guard class). It should -/// also be noted that the \c fast_mutex class typically does not provide -/// as accurate thread scheduling as a the standard \c mutex class does. -/// -/// Because of the limitations of the class, it should only be used in -/// situations where the mutex needs to be locked/unlocked very frequently. -/// -/// @note The "fast" version of this class relies on inline assembler language, -/// which is currently only supported for 32/64-bit Intel x86/AMD64 and -/// PowerPC architectures on a limited number of compilers (GNU g++ and MS -/// Visual C++). -/// For other architectures/compilers, system functions are used instead. -class fast_mutex { - public: - /// Constructor. -#if defined(_FAST_MUTEX_ASM_) - fast_mutex() : mLock(0) {} -#else - fast_mutex() - { - #if defined(_TTHREAD_WIN32_) - InitializeCriticalSection(&mHandle); - #elif defined(_TTHREAD_POSIX_) - pthread_mutex_init(&mHandle, NULL); - #endif - } -#endif - -#if !defined(_FAST_MUTEX_ASM_) - /// Destructor. - ~fast_mutex() - { - #if defined(_TTHREAD_WIN32_) - DeleteCriticalSection(&mHandle); - #elif defined(_TTHREAD_POSIX_) - pthread_mutex_destroy(&mHandle); - #endif - } -#endif - - /// Lock the mutex. - /// The method will block the calling thread until a lock on the mutex can - /// be obtained. The mutex remains locked until \c unlock() is called. - /// @see lock_guard - inline void lock() - { -#if defined(_FAST_MUTEX_ASM_) - bool gotLock; - do { - gotLock = try_lock(); - if(!gotLock) - { - #if defined(_TTHREAD_WIN32_) - Sleep(0); - #elif defined(_TTHREAD_POSIX_) - sched_yield(); - #endif - } - } while(!gotLock); -#else - #if defined(_TTHREAD_WIN32_) - EnterCriticalSection(&mHandle); - #elif defined(_TTHREAD_POSIX_) - pthread_mutex_lock(&mHandle); - #endif -#endif - } - - /// Try to lock the mutex. - /// The method will try to lock the mutex. If it fails, the function will - /// return immediately (non-blocking). - /// @return \c true if the lock was acquired, or \c false if the lock could - /// not be acquired. - inline bool try_lock() - { -#if defined(_FAST_MUTEX_ASM_) - int oldLock; - #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - asm volatile ( - "movl $1,%%eax\n\t" - "xchg %%eax,%0\n\t" - "movl %%eax,%1\n\t" - : "=m" (mLock), "=m" (oldLock) - : - : "%eax", "memory" - ); - #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) - int *ptrLock = &mLock; - __asm { - mov eax,1 - mov ecx,ptrLock - xchg eax,[ecx] - mov oldLock,eax - } - #elif defined(__GNUC__) && (defined(__ppc__)) - int newLock = 1; - asm volatile ( - "\n1:\n\t" - "lwarx %0,0,%1\n\t" - "cmpwi 0,%0,0\n\t" - "bne- 2f\n\t" - "stwcx. %2,0,%1\n\t" - "bne- 1b\n\t" - "isync\n" - "2:\n\t" - : "=&r" (oldLock) - : "r" (&mLock), "r" (newLock) - : "cr0", "memory" - ); - #endif - return (oldLock == 0); -#else - #if defined(_TTHREAD_WIN32_) - return TryEnterCriticalSection(&mHandle) ? true : false; - #elif defined(_TTHREAD_POSIX_) - return (pthread_mutex_trylock(&mHandle) == 0) ? true : false; - #endif -#endif - } - - /// Unlock the mutex. - /// If any threads are waiting for the lock on this mutex, one of them will - /// be unblocked. - inline void unlock() - { -#if defined(_FAST_MUTEX_ASM_) - #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - asm volatile ( - "movl $0,%%eax\n\t" - "xchg %%eax,%0\n\t" - : "=m" (mLock) - : - : "%eax", "memory" - ); - #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) - int *ptrLock = &mLock; - __asm { - mov eax,0 - mov ecx,ptrLock - xchg eax,[ecx] - } - #elif defined(__GNUC__) && (defined(__ppc__)) - asm volatile ( - "sync\n\t" // Replace with lwsync where possible? - : : : "memory" - ); - mLock = 0; - #endif -#else - #if defined(_TTHREAD_WIN32_) - LeaveCriticalSection(&mHandle); - #elif defined(_TTHREAD_POSIX_) - pthread_mutex_unlock(&mHandle); - #endif -#endif - } - - private: -#if defined(_FAST_MUTEX_ASM_) - int mLock; -#else - #if defined(_TTHREAD_WIN32_) - CRITICAL_SECTION mHandle; - #elif defined(_TTHREAD_POSIX_) - pthread_mutex_t mHandle; - #endif -#endif -}; - -} - -#endif // _FAST_MUTEX_H_ - diff --git a/dependencies/sources/TinyThread++-1.1/source/tinythread.cpp b/dependencies/sources/TinyThread++-1.1/source/tinythread.cpp deleted file mode 100644 index 690eceea1a..0000000000 --- a/dependencies/sources/TinyThread++-1.1/source/tinythread.cpp +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#include -#include "tinythread.h" - -#if defined(_TTHREAD_POSIX_) - #include - #include -#elif defined(_TTHREAD_WIN32_) - #include -#endif - - -namespace tthread { - -//------------------------------------------------------------------------------ -// condition_variable -//------------------------------------------------------------------------------ -// NOTE 1: The Win32 implementation of the condition_variable class is based on -// the corresponding implementation in GLFW, which in turn is based on a -// description by Douglas C. Schmidt and Irfan Pyarali: -// http://www.cs.wustl.edu/~schmidt/win32-cv-1.html -// -// NOTE 2: Windows Vista actually has native support for condition variables -// (InitializeConditionVariable, WakeConditionVariable, etc), but we want to -// be portable with pre-Vista Windows versions, so TinyThread++ does not use -// Vista condition variables. -//------------------------------------------------------------------------------ - -#if defined(_TTHREAD_WIN32_) - #define _CONDITION_EVENT_ONE 0 - #define _CONDITION_EVENT_ALL 1 -#endif - -#if defined(_TTHREAD_WIN32_) -condition_variable::condition_variable() : mWaitersCount(0) -{ - mEvents[_CONDITION_EVENT_ONE] = CreateEvent(NULL, FALSE, FALSE, NULL); - mEvents[_CONDITION_EVENT_ALL] = CreateEvent(NULL, TRUE, FALSE, NULL); - InitializeCriticalSection(&mWaitersCountLock); -} -#endif - -#if defined(_TTHREAD_WIN32_) -condition_variable::~condition_variable() -{ - CloseHandle(mEvents[_CONDITION_EVENT_ONE]); - CloseHandle(mEvents[_CONDITION_EVENT_ALL]); - DeleteCriticalSection(&mWaitersCountLock); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::_wait() -{ - // Wait for either event to become signaled due to notify_one() or - // notify_all() being called - int result = WaitForMultipleObjects(2, mEvents, FALSE, INFINITE); - - // Check if we are the last waiter - EnterCriticalSection(&mWaitersCountLock); - -- mWaitersCount; - bool lastWaiter = (result == (WAIT_OBJECT_0 + _CONDITION_EVENT_ALL)) && - (mWaitersCount == 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we are the last waiter to be notified to stop waiting, reset the event - if(lastWaiter) - ResetEvent(mEvents[_CONDITION_EVENT_ALL]); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::notify_one() -{ - // Are there any waiters? - EnterCriticalSection(&mWaitersCountLock); - bool haveWaiters = (mWaitersCount > 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we have any waiting threads, send them a signal - if(haveWaiters) - SetEvent(mEvents[_CONDITION_EVENT_ONE]); -} -#endif - -#if defined(_TTHREAD_WIN32_) -void condition_variable::notify_all() -{ - // Are there any waiters? - EnterCriticalSection(&mWaitersCountLock); - bool haveWaiters = (mWaitersCount > 0); - LeaveCriticalSection(&mWaitersCountLock); - - // If we have any waiting threads, send them a signal - if(haveWaiters) - SetEvent(mEvents[_CONDITION_EVENT_ALL]); -} -#endif - - -//------------------------------------------------------------------------------ -// POSIX pthread_t to unique thread::id mapping logic. -// Note: Here we use a global thread safe std::map to convert instances of -// pthread_t to small thread identifier numbers (unique within one process). -// This method should be portable across different POSIX implementations. -//------------------------------------------------------------------------------ - -#if defined(_TTHREAD_POSIX_) -static thread::id _pthread_t_to_ID(const pthread_t &aHandle) -{ - static mutex idMapLock; - static std::map idMap; - static unsigned long int idCount(1); - - lock_guard guard(idMapLock); - if(idMap.find(aHandle) == idMap.end()) - idMap[aHandle] = idCount ++; - return thread::id(idMap[aHandle]); -} -#endif // _TTHREAD_POSIX_ - - -//------------------------------------------------------------------------------ -// thread -//------------------------------------------------------------------------------ - -/// Information to pass to the new thread (what to run). -struct _thread_start_info { - void (*mFunction)(void *); ///< Pointer to the function to be executed. - void * mArg; ///< Function argument for the thread function. - thread * mThread; ///< Pointer to the thread object. -}; - -// Thread wrapper function. -#if defined(_TTHREAD_WIN32_) -unsigned WINAPI thread::wrapper_function(void * aArg) -#elif defined(_TTHREAD_POSIX_) -void * thread::wrapper_function(void * aArg) -#endif -{ - // Get thread startup information - _thread_start_info * ti = (_thread_start_info *) aArg; - - try - { - // Call the actual client thread function - ti->mFunction(ti->mArg); - } - catch(...) - { - // Uncaught exceptions will terminate the application (default behavior - // according to C++11) - std::terminate(); - } - - // The thread is no longer executing - lock_guard guard(ti->mThread->mDataMutex); - ti->mThread->mNotAThread = true; - - // The thread is responsible for freeing the startup information - delete ti; - - return 0; -} - -thread::thread(void (*aFunction)(void *), void * aArg) -{ - // Serialize access to this thread structure - lock_guard guard(mDataMutex); - - // Fill out the thread startup information (passed to the thread wrapper, - // which will eventually free it) - _thread_start_info * ti = new _thread_start_info; - ti->mFunction = aFunction; - ti->mArg = aArg; - ti->mThread = this; - - // The thread is now alive - mNotAThread = false; - - // Create the thread -#if defined(_TTHREAD_WIN32_) - mHandle = (HANDLE) _beginthreadex(0, 0, wrapper_function, (void *) ti, 0, &mWin32ThreadID); -#elif defined(_TTHREAD_POSIX_) - if(pthread_create(&mHandle, NULL, wrapper_function, (void *) ti) != 0) - mHandle = 0; -#endif - - // Did we fail to create the thread? - if(!mHandle) - { - mNotAThread = true; - delete ti; - } -} - -thread::~thread() -{ - if(joinable()) - std::terminate(); -} - -void thread::join() -{ - if(joinable()) - { -#if defined(_TTHREAD_WIN32_) - WaitForSingleObject(mHandle, INFINITE); - CloseHandle(mHandle); -#elif defined(_TTHREAD_POSIX_) - pthread_join(mHandle, NULL); -#endif - } -} - -bool thread::joinable() const -{ - mDataMutex.lock(); - bool result = !mNotAThread; - mDataMutex.unlock(); - return result; -} - -void thread::detach() -{ - mDataMutex.lock(); - if(!mNotAThread) - { -#if defined(_TTHREAD_WIN32_) - CloseHandle(mHandle); -#elif defined(_TTHREAD_POSIX_) - pthread_detach(mHandle); -#endif - mNotAThread = true; - } - mDataMutex.unlock(); -} - -thread::id thread::get_id() const -{ - if(!joinable()) - return id(); -#if defined(_TTHREAD_WIN32_) - return id((unsigned long int) mWin32ThreadID); -#elif defined(_TTHREAD_POSIX_) - return _pthread_t_to_ID(mHandle); -#endif -} - -unsigned thread::hardware_concurrency() -{ -#if defined(_TTHREAD_WIN32_) - SYSTEM_INFO si; - GetSystemInfo(&si); - return (int) si.dwNumberOfProcessors; -#elif defined(_SC_NPROCESSORS_ONLN) - return (int) sysconf(_SC_NPROCESSORS_ONLN); -#elif defined(_SC_NPROC_ONLN) - return (int) sysconf(_SC_NPROC_ONLN); -#else - // The standard requires this function to return zero if the number of - // hardware cores could not be determined. - return 0; -#endif -} - - -//------------------------------------------------------------------------------ -// this_thread -//------------------------------------------------------------------------------ - -thread::id this_thread::get_id() -{ -#if defined(_TTHREAD_WIN32_) - return thread::id((unsigned long int) GetCurrentThreadId()); -#elif defined(_TTHREAD_POSIX_) - return _pthread_t_to_ID(pthread_self()); -#endif -} - -} diff --git a/dependencies/sources/TinyThread++-1.1/source/tinythread.h b/dependencies/sources/TinyThread++-1.1/source/tinythread.h deleted file mode 100644 index aed7b5856b..0000000000 --- a/dependencies/sources/TinyThread++-1.1/source/tinythread.h +++ /dev/null @@ -1,714 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#ifndef _TINYTHREAD_H_ -#define _TINYTHREAD_H_ - -/// @file -/// @mainpage TinyThread++ API Reference -/// -/// @section intro_sec Introduction -/// TinyThread++ is a minimal, portable implementation of basic threading -/// classes for C++. -/// -/// They closely mimic the functionality and naming of the C++11 standard, and -/// should be easily replaceable with the corresponding std:: variants. -/// -/// @section port_sec Portability -/// The Win32 variant uses the native Win32 API for implementing the thread -/// classes, while for other systems, the POSIX threads API (pthread) is used. -/// -/// @section class_sec Classes -/// In order to mimic the threading API of the C++11 standard, subsets of -/// several classes are provided. The fundamental classes are: -/// @li tthread::thread -/// @li tthread::mutex -/// @li tthread::recursive_mutex -/// @li tthread::condition_variable -/// @li tthread::lock_guard -/// @li tthread::fast_mutex -/// -/// @section misc_sec Miscellaneous -/// The following special keywords are available: #thread_local. -/// -/// For more detailed information (including additional classes), browse the -/// different sections of this documentation. A good place to start is: -/// tinythread.h. - -// Which platform are we on? -#if !defined(_TTHREAD_PLATFORM_DEFINED_) - #if defined(_WIN32) || defined(__WIN32__) || defined(__WINDOWS__) - #define _TTHREAD_WIN32_ - #else - #define _TTHREAD_POSIX_ - #endif - #define _TTHREAD_PLATFORM_DEFINED_ -#endif - -// Platform specific includes -#if defined(_TTHREAD_WIN32_) - #ifndef WIN32_LEAN_AND_MEAN - #define WIN32_LEAN_AND_MEAN - #define __UNDEF_LEAN_AND_MEAN - #endif - #include - #ifdef __UNDEF_LEAN_AND_MEAN - #undef WIN32_LEAN_AND_MEAN - #undef __UNDEF_LEAN_AND_MEAN - #endif -#else - #include - #include - #include - #include -#endif - -// Generic includes -#include - -/// TinyThread++ version (major number). -#define TINYTHREAD_VERSION_MAJOR 1 -/// TinyThread++ version (minor number). -#define TINYTHREAD_VERSION_MINOR 1 -/// TinyThread++ version (full version). -#define TINYTHREAD_VERSION (TINYTHREAD_VERSION_MAJOR * 100 + TINYTHREAD_VERSION_MINOR) - -// Do we have a fully featured C++11 compiler? -#if (__cplusplus > 199711L) || (defined(__STDCXX_VERSION__) && (__STDCXX_VERSION__ >= 201001L)) - #define _TTHREAD_CPP11_ -#endif - -// ...at least partial C++11? -#if defined(_TTHREAD_CPP11_) || defined(__GXX_EXPERIMENTAL_CXX0X__) || defined(__GXX_EXPERIMENTAL_CPP0X__) - #define _TTHREAD_CPP11_PARTIAL_ -#endif - -// Macro for disabling assignments of objects. -#ifdef _TTHREAD_CPP11_PARTIAL_ - #define _TTHREAD_DISABLE_ASSIGNMENT(name) \ - name(const name&) = delete; \ - name& operator=(const name&) = delete; -#else - #define _TTHREAD_DISABLE_ASSIGNMENT(name) \ - name(const name&); \ - name& operator=(const name&); -#endif - -/// @def thread_local -/// Thread local storage keyword. -/// A variable that is declared with the @c thread_local keyword makes the -/// value of the variable local to each thread (known as thread-local storage, -/// or TLS). Example usage: -/// @code -/// // This variable is local to each thread. -/// thread_local int variable; -/// @endcode -/// @note The @c thread_local keyword is a macro that maps to the corresponding -/// compiler directive (e.g. @c __declspec(thread)). While the C++11 standard -/// allows for non-trivial types (e.g. classes with constructors and -/// destructors) to be declared with the @c thread_local keyword, most pre-C++11 -/// compilers only allow for trivial types (e.g. @c int). So, to guarantee -/// portable code, only use trivial types for thread local storage. -/// @note This directive is currently not supported on Mac OS X (it will give -/// a compiler error), since compile-time TLS is not supported in the Mac OS X -/// executable format. Also, some older versions of MinGW (before GCC 4.x) do -/// not support this directive. -/// @hideinitializer - -#if !defined(_TTHREAD_CPP11_) && !defined(thread_local) - #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__SUNPRO_CC) || defined(__IBMCPP__) - #define thread_local __thread - #else - #define thread_local __declspec(thread) - #endif -#endif - - -/// Main name space for TinyThread++. -/// This namespace is more or less equivalent to the @c std namespace for the -/// C++11 thread classes. For instance, the tthread::mutex class corresponds to -/// the std::mutex class. -namespace tthread { - -/// Mutex class. -/// This is a mutual exclusion object for synchronizing access to shared -/// memory areas for several threads. The mutex is non-recursive (i.e. a -/// program may deadlock if the thread that owns a mutex object calls lock() -/// on that object). -/// @see recursive_mutex -class mutex { - public: - /// Constructor. - mutex() -#if defined(_TTHREAD_WIN32_) - : mAlreadyLocked(false) -#endif - { -#if defined(_TTHREAD_WIN32_) - InitializeCriticalSection(&mHandle); -#else - pthread_mutex_init(&mHandle, NULL); -#endif - } - - /// Destructor. - ~mutex() - { -#if defined(_TTHREAD_WIN32_) - DeleteCriticalSection(&mHandle); -#else - pthread_mutex_destroy(&mHandle); -#endif - } - - /// Lock the mutex. - /// The method will block the calling thread until a lock on the mutex can - /// be obtained. The mutex remains locked until @c unlock() is called. - /// @see lock_guard - inline void lock() - { -#if defined(_TTHREAD_WIN32_) - EnterCriticalSection(&mHandle); - while(mAlreadyLocked) Sleep(1000); // Simulate deadlock... - mAlreadyLocked = true; -#else - pthread_mutex_lock(&mHandle); -#endif - } - - /// Try to lock the mutex. - /// The method will try to lock the mutex. If it fails, the function will - /// return immediately (non-blocking). - /// @return @c true if the lock was acquired, or @c false if the lock could - /// not be acquired. - inline bool try_lock() - { -#if defined(_TTHREAD_WIN32_) - bool ret = (TryEnterCriticalSection(&mHandle) ? true : false); - if(ret && mAlreadyLocked) - { - LeaveCriticalSection(&mHandle); - ret = false; - } - return ret; -#else - return (pthread_mutex_trylock(&mHandle) == 0) ? true : false; -#endif - } - - /// Unlock the mutex. - /// If any threads are waiting for the lock on this mutex, one of them will - /// be unblocked. - inline void unlock() - { -#if defined(_TTHREAD_WIN32_) - mAlreadyLocked = false; - LeaveCriticalSection(&mHandle); -#else - pthread_mutex_unlock(&mHandle); -#endif - } - - _TTHREAD_DISABLE_ASSIGNMENT(mutex) - - private: -#if defined(_TTHREAD_WIN32_) - CRITICAL_SECTION mHandle; - bool mAlreadyLocked; -#else - pthread_mutex_t mHandle; -#endif - - friend class condition_variable; -}; - -/// Recursive mutex class. -/// This is a mutual exclusion object for synchronizing access to shared -/// memory areas for several threads. The mutex is recursive (i.e. a thread -/// may lock the mutex several times, as long as it unlocks the mutex the same -/// number of times). -/// @see mutex -class recursive_mutex { - public: - /// Constructor. - recursive_mutex() - { -#if defined(_TTHREAD_WIN32_) - InitializeCriticalSection(&mHandle); -#else - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&mHandle, &attr); -#endif - } - - /// Destructor. - ~recursive_mutex() - { -#if defined(_TTHREAD_WIN32_) - DeleteCriticalSection(&mHandle); -#else - pthread_mutex_destroy(&mHandle); -#endif - } - - /// Lock the mutex. - /// The method will block the calling thread until a lock on the mutex can - /// be obtained. The mutex remains locked until @c unlock() is called. - /// @see lock_guard - inline void lock() - { -#if defined(_TTHREAD_WIN32_) - EnterCriticalSection(&mHandle); -#else - pthread_mutex_lock(&mHandle); -#endif - } - - /// Try to lock the mutex. - /// The method will try to lock the mutex. If it fails, the function will - /// return immediately (non-blocking). - /// @return @c true if the lock was acquired, or @c false if the lock could - /// not be acquired. - inline bool try_lock() - { -#if defined(_TTHREAD_WIN32_) - return TryEnterCriticalSection(&mHandle) ? true : false; -#else - return (pthread_mutex_trylock(&mHandle) == 0) ? true : false; -#endif - } - - /// Unlock the mutex. - /// If any threads are waiting for the lock on this mutex, one of them will - /// be unblocked. - inline void unlock() - { -#if defined(_TTHREAD_WIN32_) - LeaveCriticalSection(&mHandle); -#else - pthread_mutex_unlock(&mHandle); -#endif - } - - _TTHREAD_DISABLE_ASSIGNMENT(recursive_mutex) - - private: -#if defined(_TTHREAD_WIN32_) - CRITICAL_SECTION mHandle; -#else - pthread_mutex_t mHandle; -#endif - - friend class condition_variable; -}; - -/// Lock guard class. -/// The constructor locks the mutex, and the destructor unlocks the mutex, so -/// the mutex will automatically be unlocked when the lock guard goes out of -/// scope. Example usage: -/// @code -/// mutex m; -/// int counter; -/// -/// void increment() -/// { -/// lock_guard guard(m); -/// ++ counter; -/// } -/// @endcode - -template -class lock_guard { - public: - typedef T mutex_type; - - lock_guard() : mMutex(0) {} - - /// The constructor locks the mutex. - explicit lock_guard(mutex_type &aMutex) - { - mMutex = &aMutex; - mMutex->lock(); - } - - /// The destructor unlocks the mutex. - ~lock_guard() - { - if(mMutex) - mMutex->unlock(); - } - - private: - mutex_type * mMutex; -}; - -/// Condition variable class. -/// This is a signalling object for synchronizing the execution flow for -/// several threads. Example usage: -/// @code -/// // Shared data and associated mutex and condition variable objects -/// int count; -/// mutex m; -/// condition_variable cond; -/// -/// // Wait for the counter to reach a certain number -/// void wait_counter(int targetCount) -/// { -/// lock_guard guard(m); -/// while(count < targetCount) -/// cond.wait(m); -/// } -/// -/// // Increment the counter, and notify waiting threads -/// void increment() -/// { -/// lock_guard guard(m); -/// ++ count; -/// cond.notify_all(); -/// } -/// @endcode -class condition_variable { - public: - /// Constructor. -#if defined(_TTHREAD_WIN32_) - condition_variable(); -#else - condition_variable() - { - pthread_cond_init(&mHandle, NULL); - } -#endif - - /// Destructor. -#if defined(_TTHREAD_WIN32_) - ~condition_variable(); -#else - ~condition_variable() - { - pthread_cond_destroy(&mHandle); - } -#endif - - /// Wait for the condition. - /// The function will block the calling thread until the condition variable - /// is woken by @c notify_one(), @c notify_all() or a spurious wake up. - /// @param[in] aMutex A mutex that will be unlocked when the wait operation - /// starts, an locked again as soon as the wait operation is finished. - template - inline void wait(_mutexT &aMutex) - { -#if defined(_TTHREAD_WIN32_) - // Increment number of waiters - EnterCriticalSection(&mWaitersCountLock); - ++ mWaitersCount; - LeaveCriticalSection(&mWaitersCountLock); - - // Release the mutex while waiting for the condition (will decrease - // the number of waiters when done)... - aMutex.unlock(); - _wait(); - aMutex.lock(); -#else - pthread_cond_wait(&mHandle, &aMutex.mHandle); -#endif - } - - /// Notify one thread that is waiting for the condition. - /// If at least one thread is blocked waiting for this condition variable, - /// one will be woken up. - /// @note Only threads that started waiting prior to this call will be - /// woken up. -#if defined(_TTHREAD_WIN32_) - void notify_one(); -#else - inline void notify_one() - { - pthread_cond_signal(&mHandle); - } -#endif - - /// Notify all threads that are waiting for the condition. - /// All threads that are blocked waiting for this condition variable will - /// be woken up. - /// @note Only threads that started waiting prior to this call will be - /// woken up. -#if defined(_TTHREAD_WIN32_) - void notify_all(); -#else - inline void notify_all() - { - pthread_cond_broadcast(&mHandle); - } -#endif - - _TTHREAD_DISABLE_ASSIGNMENT(condition_variable) - - private: -#if defined(_TTHREAD_WIN32_) - void _wait(); - HANDLE mEvents[2]; ///< Signal and broadcast event HANDLEs. - unsigned int mWaitersCount; ///< Count of the number of waiters. - CRITICAL_SECTION mWaitersCountLock; ///< Serialize access to mWaitersCount. -#else - pthread_cond_t mHandle; -#endif -}; - - -/// Thread class. -class thread { - public: -#if defined(_TTHREAD_WIN32_) - typedef HANDLE native_handle_type; -#else - typedef pthread_t native_handle_type; -#endif - - class id; - - /// Default constructor. - /// Construct a @c thread object without an associated thread of execution - /// (i.e. non-joinable). - thread() : mHandle(0), mNotAThread(true) -#if defined(_TTHREAD_WIN32_) - , mWin32ThreadID(0) -#endif - {} - - /// Thread starting constructor. - /// Construct a @c thread object with a new thread of execution. - /// @param[in] aFunction A function pointer to a function of type: - /// void fun(void * arg) - /// @param[in] aArg Argument to the thread function. - /// @note This constructor is not fully compatible with the standard C++ - /// thread class. It is more similar to the pthread_create() (POSIX) and - /// CreateThread() (Windows) functions. - thread(void (*aFunction)(void *), void * aArg); - - /// Destructor. - /// @note If the thread is joinable upon destruction, @c std::terminate() - /// will be called, which terminates the process. It is always wise to do - /// @c join() before deleting a thread object. - ~thread(); - - /// Wait for the thread to finish (join execution flows). - /// After calling @c join(), the thread object is no longer associated with - /// a thread of execution (i.e. it is not joinable, and you may not join - /// with it nor detach from it). - void join(); - - /// Check if the thread is joinable. - /// A thread object is joinable if it has an associated thread of execution. - bool joinable() const; - - /// Detach from the thread. - /// After calling @c detach(), the thread object is no longer assicated with - /// a thread of execution (i.e. it is not joinable). The thread continues - /// execution without the calling thread blocking, and when the thread - /// ends execution, any owned resources are released. - void detach(); - - /// Return the thread ID of a thread object. - id get_id() const; - - /// Get the native handle for this thread. - /// @note Under Windows, this is a @c HANDLE, and under POSIX systems, this - /// is a @c pthread_t. - inline native_handle_type native_handle() - { - return mHandle; - } - - /// Determine the number of threads which can possibly execute concurrently. - /// This function is useful for determining the optimal number of threads to - /// use for a task. - /// @return The number of hardware thread contexts in the system. - /// @note If this value is not defined, the function returns zero (0). - static unsigned hardware_concurrency(); - - _TTHREAD_DISABLE_ASSIGNMENT(thread) - - private: - native_handle_type mHandle; ///< Thread handle. - mutable mutex mDataMutex; ///< Serializer for access to the thread private data. - bool mNotAThread; ///< True if this object is not a thread of execution. -#if defined(_TTHREAD_WIN32_) - unsigned int mWin32ThreadID; ///< Unique thread ID (filled out by _beginthreadex). -#endif - - // This is the internal thread wrapper function. -#if defined(_TTHREAD_WIN32_) - static unsigned WINAPI wrapper_function(void * aArg); -#else - static void * wrapper_function(void * aArg); -#endif -}; - -/// Thread ID. -/// The thread ID is a unique identifier for each thread. -/// @see thread::get_id() -class thread::id { - public: - /// Default constructor. - /// The default constructed ID is that of thread without a thread of - /// execution. - id() : mId(0) {}; - - id(unsigned long int aId) : mId(aId) {}; - - id(const id& aId) : mId(aId.mId) {}; - - inline id & operator=(const id &aId) - { - mId = aId.mId; - return *this; - } - - inline friend bool operator==(const id &aId1, const id &aId2) - { - return (aId1.mId == aId2.mId); - } - - inline friend bool operator!=(const id &aId1, const id &aId2) - { - return (aId1.mId != aId2.mId); - } - - inline friend bool operator<=(const id &aId1, const id &aId2) - { - return (aId1.mId <= aId2.mId); - } - - inline friend bool operator<(const id &aId1, const id &aId2) - { - return (aId1.mId < aId2.mId); - } - - inline friend bool operator>=(const id &aId1, const id &aId2) - { - return (aId1.mId >= aId2.mId); - } - - inline friend bool operator>(const id &aId1, const id &aId2) - { - return (aId1.mId > aId2.mId); - } - - inline friend std::ostream& operator <<(std::ostream &os, const id &obj) - { - os << obj.mId; - return os; - } - - private: - unsigned long int mId; -}; - - -// Related to - minimal to be able to support chrono. -typedef long long __intmax_t; - -/// Minimal implementation of the @c ratio class. This class provides enough -/// functionality to implement some basic @c chrono classes. -template <__intmax_t N, __intmax_t D = 1> class ratio { - public: - static double _as_double() { return double(N) / double(D); } -}; - -/// Minimal implementation of the @c chrono namespace. -/// The @c chrono namespace provides types for specifying time intervals. -namespace chrono { - /// Duration template class. This class provides enough functionality to - /// implement @c this_thread::sleep_for(). - template > class duration { - private: - _Rep rep_; - public: - typedef _Rep rep; - typedef _Period period; - - /// Construct a duration object with the given duration. - template - explicit duration(const _Rep2& r) : rep_(r) {}; - - /// Return the value of the duration object. - rep count() const - { - return rep_; - } - }; - - // Standard duration types. - typedef duration<__intmax_t, ratio<1, 1000000000> > nanoseconds; ///< Duration with the unit nanoseconds. - typedef duration<__intmax_t, ratio<1, 1000000> > microseconds; ///< Duration with the unit microseconds. - typedef duration<__intmax_t, ratio<1, 1000> > milliseconds; ///< Duration with the unit milliseconds. - typedef duration<__intmax_t> seconds; ///< Duration with the unit seconds. - typedef duration<__intmax_t, ratio<60> > minutes; ///< Duration with the unit minutes. - typedef duration<__intmax_t, ratio<3600> > hours; ///< Duration with the unit hours. -} - -/// The namespace @c this_thread provides methods for dealing with the -/// calling thread. -namespace this_thread { - /// Return the thread ID of the calling thread. - thread::id get_id(); - - /// Yield execution to another thread. - /// Offers the operating system the opportunity to schedule another thread - /// that is ready to run on the current processor. - inline void yield() - { -#if defined(_TTHREAD_WIN32_) - Sleep(0); -#else - sched_yield(); -#endif - } - - /// Blocks the calling thread for a period of time. - /// @param[in] aTime Minimum time to put the thread to sleep. - /// Example usage: - /// @code - /// // Sleep for 100 milliseconds - /// this_thread::sleep_for(chrono::milliseconds(100)); - /// @endcode - /// @note Supported duration types are: nanoseconds, microseconds, - /// milliseconds, seconds, minutes and hours. - template void sleep_for(const chrono::duration<_Rep, _Period>& aTime) - { -#if defined(_TTHREAD_WIN32_) - Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5)); -#else - usleep(int(double(aTime.count()) * (1000000.0 * _Period::_as_double()) + 0.5)); -#endif - } -} - -} - -// Define/macro cleanup -#undef _TTHREAD_DISABLE_ASSIGNMENT - -#endif // _TINYTHREAD_H_ diff --git a/dependencies/sources/TinyThread++-1.1/test/Makefile b/dependencies/sources/TinyThread++-1.1/test/Makefile deleted file mode 100644 index 45afcd36b5..0000000000 --- a/dependencies/sources/TinyThread++-1.1/test/Makefile +++ /dev/null @@ -1,101 +0,0 @@ -#----------------------------------------------------------------------------------------- -# Makefile for GCC & gmake (Linux, Windows/MinGW, OpenSolaris, etc). -#----------------------------------------------------------------------------------------- -# Copyright (c) 2010-2012 Marcus Geelnard -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# -# 3. This notice may not be removed or altered from any source -# distribution. -#----------------------------------------------------------------------------------------- - -# A simple hack to check if we are on Windows or not (i.e. are we using mingw32-make?) -ifeq ($(findstring mingw32, $(MAKE)), mingw32) -WINDOWS=1 -endif - -# Compiler settings -CPP = g++ -CPPFLAGS = -W -O3 -c -I../source -LFLAGS = -LIBS = - -# Non-windows systems need pthread -ifndef WINDOWS -LIBS += -lpthread -endif - -# MinGW32 GCC 4.5 link problem fix -ifdef WINDOWS -ifeq ($(findstring 4.5.,$(shell g++ -dumpversion)), 4.5.) -LFLAGS += -static-libstdc++ -static-libgcc -endif -endif - -# Misc. system commands -ifdef WINDOWS -RM = del /Q -else -RM = rm -f -endif - -# File endings -ifdef WINDOWS -EXE = .exe -else -EXE = -endif - -# Object files for the hello program -HELLO_OBJS = hello.o - -# Object files for the test program -TEST_OBJS = test.o - -# Object files for the hello program -FRACAL_OBJS = fractal.o - -# TinyThread++ object files -TINYTHREAD_OBJS = tinythread.o - -all: hello$(EXE) test$(EXE) fractal$(EXE) - -clean: - $(RM) hello$(EXE) test$(EXE) fractal$(EXE) $(HELLO_OBJS) $(TEST_OBJS) $(FRACAL_OBJS) $(TINYTHREAD_OBJS) fractal.tga - - -test$(EXE): $(TEST_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) -o $@ $(TEST_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -hello$(EXE): $(HELLO_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) -o $@ $(HELLO_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -fractal$(EXE): $(FRACAL_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) -o $@ $(FRACAL_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -%.o: %.cpp - $(CPP) $(CPPFLAGS) $< - -%.o: ../source/%.cpp - $(CPP) $(CPPFLAGS) $< - -# Dependencies -hello.o: hello.cpp ../source/tinythread.h -test.o: test.cpp ../source/tinythread.h ../source/fast_mutex.h -fractal.o: fractal.cpp ../source/tinythread.h -tinythread.o: ../source/tinythread.cpp ../source/tinythread.h - diff --git a/dependencies/sources/TinyThread++-1.1/test/Makefile.msvc b/dependencies/sources/TinyThread++-1.1/test/Makefile.msvc deleted file mode 100644 index a4cc1f3100..0000000000 --- a/dependencies/sources/TinyThread++-1.1/test/Makefile.msvc +++ /dev/null @@ -1,78 +0,0 @@ -#----------------------------------------------------------------------------------------- -# Makefile for Microsoft Visual Studio C++ -# Usage: nmake /f Makefile.msvc -#----------------------------------------------------------------------------------------- -# Copyright (c) 2010-2012 Marcus Geelnard -# -# This software is provided 'as-is', without any express or implied -# warranty. In no event will the authors be held liable for any damages -# arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, -# including commercial applications, and to alter it and redistribute it -# freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not -# claim that you wrote the original software. If you use this software -# in a product, an acknowledgment in the product documentation would be -# appreciated but is not required. -# -# 2. Altered source versions must be plainly marked as such, and must not be -# misrepresented as being the original software. -# -# 3. This notice may not be removed or altered from any source -# distribution. -#----------------------------------------------------------------------------------------- - -# Compiler settings -CPP = cl -CPPFLAGS = /nologo /W2 /O2 /c /I../source /EHsc -LFLAGS = /nologo /EHsc -LIBS = - -# Misc. system commands -RM = del /Q - -# File endings -EXE = .exe - -# Object files for the hello program -HELLO_OBJS = hello.obj - -# Object files for the test program -TEST_OBJS = test.obj - -# Object files for the hello program -FRACAL_OBJS = fractal.obj - -# TinyThread++ object files -TINYTHREAD_OBJS = tinythread.obj - -all: hello$(EXE) test$(EXE) fractal$(EXE) - -clean: - $(RM) hello$(EXE) test$(EXE) fractal$(EXE) $(HELLO_OBJS) $(TEST_OBJS) $(FRACAL_OBJS) $(TINYTHREAD_OBJS) - - -test$(EXE): $(TEST_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) /Fe$@ $(TEST_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -hello$(EXE): $(HELLO_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) /Fe$@ $(HELLO_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -fractal$(EXE): $(FRACAL_OBJS) $(TINYTHREAD_OBJS) - $(CPP) $(LFLAGS) /Fe$@ $(FRACAL_OBJS) $(TINYTHREAD_OBJS) $(LIBS) - -# Dependencies -hello.obj: hello.cpp ../source/tinythread.h - $(CPP) $(CPPFLAGS) hello.cpp - -test.obj: test.cpp ../source/tinythread.h ../source/fast_mutex.h - $(CPP) $(CPPFLAGS) test.cpp - -fractal.obj: fractal.cpp ../source/tinythread.h - $(CPP) $(CPPFLAGS) fractal.cpp - -tinythread.obj: ../source/tinythread.cpp ../source/tinythread.h - $(CPP) $(CPPFLAGS) ../source/tinythread.cpp - diff --git a/dependencies/sources/TinyThread++-1.1/test/fractal.cpp b/dependencies/sources/TinyThread++-1.1/test/fractal.cpp deleted file mode 100644 index a01ec454bd..0000000000 --- a/dependencies/sources/TinyThread++-1.1/test/fractal.cpp +++ /dev/null @@ -1,261 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#include -#include -#include -#include -#include -#include -#include - -using namespace std; -using namespace tthread; - - -// Mandelbrot fractal settings -#define MAND_MID_RE -0.69795 -#define MAND_MID_IM -0.34865 -#define MAND_SIZE 0.003 -#define MAND_MAX_ITER 4000 -#define MAND_RESOLUTION 1024 - - -/// BGR pixel class. -class Pixel { - public: - Pixel() : b(0), g(0), r(0) {} - - Pixel(unsigned char red, unsigned char green, unsigned char blue) - { - b = blue; - g = green; - r = red; - } - - unsigned char b, g, r; -}; - -/// Simple 2D BGR image class. -class Image { - public: - /// Create a new image with the dimensions aWidth x aHeight. - Image(int aWidth, int aHeight) - { - mData = new Pixel[aWidth * aHeight]; - mWidth = aWidth; - mHeight = aHeight; - } - - ~Image() - { - delete mData; - } - - /// Write the image to a TGA file. - void WriteToTGAFile(const char * aFileName) - { - // Prepare TGA file header - unsigned char header[18] = {0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0}; - header[12] = mWidth & 255; // Image width (16 bits) - header[13] = (mWidth >> 8) & 255; // -"- - header[14] = mHeight & 255; // Image width (16 bits) - header[15] = (mHeight >> 8) & 255; // -"- - - // Write output file - ofstream f(aFileName, ios_base::out | ios_base::binary); - f.write((const char *) header, 18); - f.write((const char *) mData, (mWidth * mHeight) * 3); - } - - Pixel& operator[](const int idx) - { - return mData[idx]; - } - - inline int Width() const - { - return mWidth; - } - - inline int Height() const - { - return mHeight; - } - - private: - int mWidth; ///< Image width. - int mHeight; ///< Image height. - Pixel * mData; ///< Data pointer. -}; - -/// The RowDispatcher class manages the "job pool" for the fractal -/// calculation threads. -class RowDispatcher { - public: - RowDispatcher(Image * aImage) : mNextRow(0) - { - mImage = aImage; - } - - Image * GetImage() - { - return mImage; - } - - int NextRow() - { - lock_guard guard(mMutex); - if(mNextRow >= mImage->Height()) - return -1; - int result = mNextRow; - ++ mNextRow; - return result; - } - - private: - mutex mMutex; - int mNextRow; - Image * mImage; -}; - -// Core iteration function -Pixel Iterate(const double &cre, const double &cim, int aIterMax) -{ - double zre = 0.0; - double zim = 0.0; - int n = 0; - double absZSqr = 0.0; - while((absZSqr < 4.0) && (n < aIterMax)) - { - double tmp = zre * zre - zim * zim + cre; - zim = 2.0 * zre * zim + cim; - zre = tmp; - absZSqr = zre * zre + zim * zim; - ++ n; - } - if(n >= aIterMax) - return Pixel(0,0,0); - else - { - double nSmooth = n + 1 - log(log(sqrt(absZSqr))) / log(2.0); - return Pixel( - (unsigned char)(128.0 - 127.0 * cos(0.02 * nSmooth + 0.3)), - (unsigned char)(128.0 - 127.0 * cos(0.016 * nSmooth + 1.2)), - (unsigned char)(128.0 - 127.0 * cos(0.013 * nSmooth + 2.6)) - ); - } -} - -// Calculation thread -void CalcThread(void * arg) -{ - RowDispatcher * dispatcher = (RowDispatcher *) arg; - Image * img = dispatcher->GetImage(); - - // Set min/max interval for the fractal set - double xMin = MAND_MID_RE - MAND_SIZE * 0.5; - double yMin = MAND_MID_IM - MAND_SIZE * 0.5; - double xMax = MAND_MID_RE + MAND_SIZE * 0.5; - double yMax = MAND_MID_IM + MAND_SIZE * 0.5; - - // Set step size (distance between two adjacent pixels) - double xStep = (xMax - xMin) / img->Width(); - double yStep = (yMax - yMin) / img->Height(); - - // Until no more rows to process... - while(true) - { - // Get the next row to calculate - int y = dispatcher->NextRow(); - - // Done? - if(y < 0) - break; - - // Generate one row of the image - Pixel * line = &(*img)[y * img->Width()]; - double cim = y * yStep + yMin; - double cre = xMin; - for(int x = 0; x < img->Width(); ++ x) - { - *line ++ = Iterate(cre, cim, MAND_MAX_ITER); - cre += xStep; - } - } -} - -int main(int argc, char **argv) -{ - // Show some information about this program... - cout << "This is a small multi threaded Mandelbrot fractal generator." << endl; - cout << endl; - cout << "The program will generate a " << MAND_RESOLUTION << "x" << MAND_RESOLUTION << " image, using one calculation thread per" << endl; - cout << "processor core. The result is written to a TGA format image, \"fractal.tga\"." << endl; - cout << endl; - cout << "Type \"" << argv[0] << " -st\" to force single threaded operation." << endl; - cout << endl; - - // Check arguments - bool singleThreaded = false; - if((argc >= 2) && (string(argv[1]) == string("-st"))) - singleThreaded = true; - - // Init image and row dispatcher - Image img(MAND_RESOLUTION, MAND_RESOLUTION); - RowDispatcher dispatcher(&img); - - // Determine the number of calculation threads to use - int numThreads; - if(!singleThreaded) - { - numThreads = thread::hardware_concurrency(); - if(numThreads < 1) - numThreads = 1; - } - else - numThreads = 1; - - // Start calculation threads (we run one thread on each processor core) - cout << "Running " << numThreads << " calculation thread(s)..." << flush; - list threadList; - for(int i = 0; i < numThreads; ++ i) - { - thread * t = new thread(CalcThread, (void *) &dispatcher); - threadList.push_back(t); - } - - // Wait for the threads to complete... - for(list::iterator i = threadList.begin(); i != threadList.end(); ++ i) - { - thread * t = *i; - t->join(); - delete t; - } - cout << "done!" << endl; - - // Write the final image to a file - cout << "Writing final image..." << flush; - img.WriteToTGAFile("fractal.tga"); - cout << "done!" << endl; -} diff --git a/dependencies/sources/TinyThread++-1.1/test/hello.cpp b/dependencies/sources/TinyThread++-1.1/test/hello.cpp deleted file mode 100644 index adf42ec5df..0000000000 --- a/dependencies/sources/TinyThread++-1.1/test/hello.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#include -#include - -using namespace std; -using namespace tthread; - - -// This is the child thread function -void HelloThread(void * aArg) -{ - cout << "Hello world!" << endl; -} - -// This is the main program (i.e. the main thread) -int main() -{ - // Start the child thread - thread t(HelloThread, 0); - - // Wait for the thread to finish - t.join(); -} diff --git a/dependencies/sources/TinyThread++-1.1/test/test.cpp b/dependencies/sources/TinyThread++-1.1/test/test.cpp deleted file mode 100644 index 947dca587c..0000000000 --- a/dependencies/sources/TinyThread++-1.1/test/test.cpp +++ /dev/null @@ -1,286 +0,0 @@ -/* -*- mode: c++; tab-width: 2; indent-tabs-mode: nil; -*- -Copyright (c) 2010-2012 Marcus Geelnard - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -*/ - -#include -#include -#include -#include - -using namespace std; -using namespace tthread; - -// HACK: Mac OS X and early MinGW do not support thread-local storage -#if defined(__APPLE__) || (defined(__MINGW32__) && (__GNUC__ < 4)) - #define NO_TLS -#endif - - -// Thread local storage variable -#ifndef NO_TLS -thread_local int gLocalVar; -#endif - -// Mutex + global count variable -mutex gMutex; -fast_mutex gFastMutex; -int gCount; - -// Condition variable -condition_variable gCond; - -// Thread function: Thread ID -void ThreadIDs(void * aArg) -{ - cout << " My thread id is " << this_thread::get_id() << "." << endl; -} - -#ifndef NO_TLS -// Thread function: Thread-local storage -void ThreadTLS(void * aArg) -{ - gLocalVar = 2; - cout << " My gLocalVar is " << gLocalVar << "." << endl; -} -#endif - -// Thread function: Mutex locking -void ThreadLock(void * aArg) -{ - for(int i = 0; i < 10000; ++ i) - { - lock_guard lock(gMutex); - ++ gCount; - } -} - -// Thread function: Mutex locking -void ThreadLock2(void * aArg) -{ - for(int i = 0; i < 10000; ++ i) - { - lock_guard lock(gFastMutex); - ++ gCount; - } -} - -// Thread function: Condition notifier -void ThreadCondition1(void * aArg) -{ - lock_guard lock(gMutex); - -- gCount; - gCond.notify_all(); -} - -// Thread function: Condition waiter -void ThreadCondition2(void * aArg) -{ - cout << " Wating..." << flush; - lock_guard lock(gMutex); - while(gCount > 0) - { - cout << "." << flush; - gCond.wait(gMutex); - } - cout << "." << endl; -} - -// Thread function: Yield -void ThreadYield(void * aArg) -{ - // Yield... - this_thread::yield(); -} - -// Thread function: Detach -void ThreadDetach(void * aArg) -{ - // We don't do anything much, just sleep a little... - this_thread::sleep_for(chrono::milliseconds(100)); -} - - -// This is the main program (i.e. the main thread) -int main() -{ - // Test 1: Show number of CPU cores in the system - cout << "PART I: Info" << endl; - cout << " Number of processor cores: " << thread::hardware_concurrency() << endl; - - // Test 2: thread IDs - cout << endl << "PART II: Thread IDs" << endl; - { - // Show the main thread ID - cout << " Main thread id is " << this_thread::get_id() << "." << endl; - - // Start a bunch of child threads - only run a single thread at a time - thread t1(ThreadIDs, 0); - t1.join(); - thread t2(ThreadIDs, 0); - t2.join(); - thread t3(ThreadIDs, 0); - t3.join(); - thread t4(ThreadIDs, 0); - t4.join(); - } - - // Test 3: thread local storage - cout << endl << "PART III: Thread local storage" << endl; -#ifndef NO_TLS - { - // Clear the TLS variable (it should keep this value after all threads are - // finished). - gLocalVar = 1; - cout << " Main gLocalVar is " << gLocalVar << "." << endl; - - // Start a child thread that modifies gLocalVar - thread t1(ThreadTLS, 0); - t1.join(); - - // Check if the TLS variable has changed - if(gLocalVar == 1) - cout << " Main gLocalID was not changed by the child thread - OK!" << endl; - else - cout << " Main gLocalID was changed by the child thread - FAIL!" << endl; - } -#else - cout << " TLS is not supported on this platform..." << endl; -#endif - - // Test 4: mutex locking - cout << endl << "PART IV: Mutex locking (100 threads x 10000 iterations)" << endl; - { - // Clear the global counter. - gCount = 0; - - // Start a bunch of child threads - list threadList; - for(int i = 0; i < 100; ++ i) - threadList.push_back(new thread(ThreadLock, 0)); - - // Wait for the threads to finish - list::iterator it; - for(it = threadList.begin(); it != threadList.end(); ++ it) - { - thread * t = *it; - t->join(); - delete t; - } - - // Check the global count - cout << " gCount = " << gCount << endl; - } - - // Test 5: fast_mutex locking - cout << endl << "PART V: Fast mutex locking (100 threads x 10000 iterations)" << endl; - { - // Clear the global counter. - gCount = 0; - - // Start a bunch of child threads - list threadList; - for(int i = 0; i < 100; ++ i) - threadList.push_back(new thread(ThreadLock2, 0)); - - // Wait for the threads to finish - list::iterator it; - for(it = threadList.begin(); it != threadList.end(); ++ it) - { - thread * t = *it; - t->join(); - delete t; - } - - // Check the global count - cout << " gCount = " << gCount << endl; - } - - // Test 6: condition variable - cout << endl << "PART VI: Condition variable (40 + 1 threads)" << endl; - { - // Set the global counter to the number of threads to run. - gCount = 40; - - // Start the waiting thread (it will wait for gCount to reach zero). - thread t1(ThreadCondition2, 0); - - // Start a bunch of child threads (these will decrease gCount by 1 when they - // finish) - list threadList; - for(int i = 0; i < 40; ++ i) - threadList.push_back(new thread(ThreadCondition1, 0)); - - // Wait for the waiting thread to finish - t1.join(); - - // Wait for the other threads to finish - list::iterator it; - for(it = threadList.begin(); it != threadList.end(); ++ it) - { - thread * t = *it; - t->join(); - delete t; - } - } - - // Test 7: yield - cout << endl << "PART VII: Yield (40 + 1 threads)" << endl; - { - // Start a bunch of child threads - list threadList; - for(int i = 0; i < 40; ++ i) - threadList.push_back(new thread(ThreadYield, 0)); - - // Yield... - this_thread::yield(); - - // Wait for the threads to finish - list::iterator it; - for(it = threadList.begin(); it != threadList.end(); ++ it) - { - thread * t = *it; - t->join(); - delete t; - } - } - - // Test 8: sleep - cout << endl << "PART VIII: Sleep (10 x 100 ms)" << endl; - { - // Sleep... - cout << " Sleeping" << flush; - for(int i = 0; i < 10; ++ i) - { - this_thread::sleep_for(chrono::milliseconds(100)); - cout << "." << flush; - } - cout << endl; - } - - // Test 9: detach - cout << endl << "PART IX: Detach" << endl; - { - thread t(ThreadDetach, 0); - t.detach(); - cout << " Detached from thread." << endl; - } -} diff --git a/makefiles/Makefile.unix b/makefiles/Makefile.unix index ffe65ac131..fdb1e36647 100644 --- a/makefiles/Makefile.unix +++ b/makefiles/Makefile.unix @@ -41,8 +41,6 @@ GFLAGS_INC = -I$(UNIX_GFLAGS_DIR)/include PROTOBUF_INC = -I$(UNIX_PROTOBUF_DIR)/include # This is needed to find sparse hash containers. SPARSEHASH_INC = -I$(UNIX_SPARSEHASH_DIR)/include -# Tinythread -THREAD_INC = -I$(OR_ROOT)dependencies/sources/TinyThread++-1.1/source # Define UNIX_CLP_DIR if unset and if UNIX_CBC_DIR is set. ifdef UNIX_CBC_DIR @@ -262,8 +260,9 @@ ifeq ($(PLATFORM),MACOSX) FLEX = dependencies/install/bin/flex endif # MAC OS X -CFLAGS = $(DEBUG) -I$(INC_DIR) -I$(EX_DIR) -I$(GEN_DIR) $(GFLAGS_INC) $(ARCH) $(THREAD_INC) \ - -Wno-deprecated $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(SLM_INC) $(GUROBI_INC) -DUSE_GLOP $(SPARSEHASH_INC) +CFLAGS = $(DEBUG) -I$(INC_DIR) -I$(EX_DIR) -I$(GEN_DIR) $(GFLAGS_INC) $(ARCH) \ + -Wno-deprecated $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) \ + $(SCIP_INC) $(SLM_INC) $(GUROBI_INC) -DUSE_GLOP $(SPARSEHASH_INC) JNIFLAGS = $(JNIDEBUG) -I$(INC_DIR) -I$(EX_DIR) -I$(GEN_DIR) $(GFLAGS_INC) $(ARCH) \ -Wno-deprecated $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(SLM_INC) $(GUROBI_INC) -DUSE_GLOP diff --git a/makefiles/Makefile.win b/makefiles/Makefile.win index 94ce2f7703..c86778e848 100644 --- a/makefiles/Makefile.win +++ b/makefiles/Makefile.win @@ -47,8 +47,6 @@ GFLAGS_INC = /I$(WINDOWS_GFLAGS_DIR)\\include /DGFLAGS_DLL_DECL= /DGFLAGS_DLL_DE ZLIB_INC = /I$(WINDOWS_ZLIB_DIR)\\include PROTOBUF_INC = /I$(WINDOWS_PROTOBUF_DIR)\\include SPARSEHASH_INC = /I$(WINDOWS_SPARSEHASH_DIR)\\include -# Tinythread -THREAD_INC = /I$(OR_ROOT)dependencies\\sources\\TinyThread++-1.1\\source PYTHON_VERSION = $(WINDOWS_PYTHON_VERSION) PYTHON_INC=/I$(WINDOWS_PYTHON_PATH)\\include @@ -126,9 +124,10 @@ JAVAC_BIN="$(WINDOWS_JDK_DIR)/bin/javac" JAVA_BIN="$(WINDOWS_JDK_DIR)/bin/java" JAR_BIN="$(WINDOWS_JDK_DIR)/bin/jar" -CFLAGS= -nologo $(SYSCFLAGS) $(DEBUG) /I$(INC_DIR) /I$(EX_DIR) /I$(GEN_DIR) $(GFLAGS_INC) $(ZLIB_INC) $(THREAD_INC) $(MINISAT_INC)\ - $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(SLM_INC) $(GUROBI_INC) /DUSE_GLOP /D__WIN32__ \ - $(SPARSEHASH_INC) +CFLAGS= -nologo $(SYSCFLAGS) $(DEBUG) /I$(INC_DIR) /I$(EX_DIR) /I$(GEN_DIR) \ + $(GFLAGS_INC) $(ZLIB_INC) $(MINISAT_INC) $(PROTOBUF_INC) $(CBC_INC) \ + $(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(SLM_INC) $(GUROBI_INC) /DUSE_GLOP \ + /D__WIN32__ $(SPARSEHASH_INC) JNIFLAGS=$(CFLAGS) $(JAVA_INC) DYNAMIC_GFLAGS_LNK = $(WINDOWS_GFLAGS_DIR)\\lib\\libgflags.lib STATIC_GFLAGS_LNK = $(WINDOWS_GFLAGS_DIR)\\lib\\libgflags.lib diff --git a/src/base/mutex.cc b/src/base/mutex.cc index e222f51dcc..ac4592adf5 100644 --- a/src/base/mutex.cc +++ b/src/base/mutex.cc @@ -11,21 +11,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tinythread.h" // NOLINT +#include + #include "base/mutex.h" -#include "tinythread.cpp" namespace operations_research { -Mutex::Mutex() : real_mutex_(new tthread::mutex) {} +Mutex::Mutex() {} Mutex::~Mutex() {} -void Mutex::Lock() { real_mutex_->lock(); } -void Mutex::Unlock() { real_mutex_->unlock(); } -bool Mutex::TryLock() { return real_mutex_->try_lock(); } -tthread::mutex* Mutex::RealMutex() const { return real_mutex_.get(); } +void Mutex::Lock() { real_mutex_.lock(); } +void Mutex::Unlock() { real_mutex_.unlock(); } +bool Mutex::TryLock() { return real_mutex_.try_lock(); } -CondVar::CondVar() : real_condition_(new tthread::condition_variable) {} +CondVar::CondVar() {} CondVar::~CondVar() {} -void CondVar::Wait(Mutex* const mu) { real_condition_->wait(*mu->RealMutex()); } -void CondVar::Signal() { real_condition_->notify_one(); } -void CondVar::SignalAll() { real_condition_->notify_all(); } +void CondVar::Wait(Mutex* const mu) { + std::unique_lock mutex_lock(mu->real_mutex_); + real_condition_.wait(mutex_lock); +} +void CondVar::Signal() { real_condition_.notify_one(); } +void CondVar::SignalAll() { real_condition_.notify_all(); } } // namespace operations_research diff --git a/src/base/mutex.h b/src/base/mutex.h index a3f7a5b053..1fc9ca2492 100644 --- a/src/base/mutex.h +++ b/src/base/mutex.h @@ -14,13 +14,16 @@ #ifndef OR_TOOLS_BASE_MUTEX_H_ #define OR_TOOLS_BASE_MUTEX_H_ +#include +#include + #include "base/macros.h" -#include "base/scoped_ptr.h" -namespace tthread { + +namespace std { class condition_variable; class mutex; class thread; -} // namespace tthread +} // std namespace operations_research { class Mutex { @@ -30,16 +33,18 @@ class Mutex { void Lock(); void Unlock(); bool TryLock(); - tthread::mutex* RealMutex() const; + + friend class CondVar; private: - scoped_ptr real_mutex_; + std::mutex real_mutex_; DISALLOW_COPY_AND_ASSIGN(Mutex); }; class MutexLock { public: explicit MutexLock(Mutex* const mutex) : mutex_(mutex) { + this->mutex_->Lock(); } @@ -59,7 +64,7 @@ class CondVar { void SignalAll(); private: - scoped_ptr real_condition_; + std::condition_variable real_condition_; DISALLOW_COPY_AND_ASSIGN(CondVar); }; diff --git a/src/base/synchronization.h b/src/base/synchronization.h index 75b2ffd2e5..44d6c37e50 100644 --- a/src/base/synchronization.h +++ b/src/base/synchronization.h @@ -14,8 +14,10 @@ #ifndef OR_TOOLS_BASE_SYNCHRONIZATION_H_ #define OR_TOOLS_BASE_SYNCHRONIZATION_H_ +#include +#include + #include "base/logging.h" -#include "base/mutex.h" namespace operations_research { class Barrier { @@ -24,15 +26,15 @@ class Barrier { : num_to_block_(num_threads), num_to_exit_(num_threads) {} bool Block() { - MutexLock l(&this->lock_); + std::unique_lock mutex_lock(mutex_); this->num_to_block_--; CHECK_GE(this->num_to_block_, 0); if (num_to_block_ > 0) { while (num_to_block_ > 0) { - condition_.Wait(&lock_); + condition_.wait(mutex_lock); } } else { - condition_.SignalAll(); + condition_.notify_all(); } this->num_to_exit_--; CHECK_GE(this->num_to_exit_, 0); @@ -40,8 +42,8 @@ class Barrier { } private: - Mutex lock_; - CondVar condition_; + std::mutex mutex_; + std::condition_variable condition_; int num_to_block_; int num_to_exit_; DISALLOW_COPY_AND_ASSIGN(Barrier); diff --git a/src/base/threadpool.cc b/src/base/threadpool.cc index 298573e36c..1344537cae 100644 --- a/src/base/threadpool.cc +++ b/src/base/threadpool.cc @@ -11,10 +11,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tinythread.h" // NOLINT -#include "base/macros.h" -#include "base/mutex.h" -#include "base/synchronization.h" #include "base/threadpool.h" namespace operations_research { @@ -25,44 +21,34 @@ void RunWorker(void* data) { work->Run(); work = thread_pool->GetNextTask(); } - thread_pool->StopOnFinalBarrier(); } ThreadPool::ThreadPool(const std::string& prefix, int num_workers) : num_workers_(num_workers), waiting_to_finish_(false), - started_(false), - final_barrier_(new Barrier(num_workers + 1)) {} + started_(false) {} ThreadPool::~ThreadPool() { if (started_) { - mutex_.Lock(); + std::unique_lock mutex_lock(mutex_); waiting_to_finish_ = true; - condition_.SignalAll(); - mutex_.Unlock(); - StopOnFinalBarrier(); + mutex_lock.unlock(); + condition_.notify_all(); for (int i = 0; i < num_workers_; ++i) { - all_workers_[i]->join(); - delete all_workers_[i]; + all_workers_[i].join(); } } } -void ThreadPool::StopOnFinalBarrier() { - if (final_barrier_->Block()) { - final_barrier_.reset(NULL); - } -} - void ThreadPool::StartWorkers() { started_ = true; for (int i = 0; i < num_workers_; ++i) { - all_workers_.push_back(new tthread::thread(&RunWorker, this)); + all_workers_.push_back(std::thread(&RunWorker, this)); } } Closure* ThreadPool::GetNextTask() { - MutexLock lock(&mutex_); + std::unique_lock lock(mutex_); for (;;) { if (!tasks_.empty()) { Closure* const task = tasks_.front(); @@ -72,17 +58,18 @@ Closure* ThreadPool::GetNextTask() { if (waiting_to_finish_) { return NULL; } else { - condition_.Wait(&mutex_); + condition_.wait(lock); } } return NULL; } void ThreadPool::Add(Closure* const closure) { - MutexLock lock(&mutex_); + std::unique_lock lock(mutex_); tasks_.push_back(closure); if (started_) { - condition_.SignalAll(); + lock.unlock(); + condition_.notify_one(); } } } // namespace operations_research diff --git a/src/base/threadpool.h b/src/base/threadpool.h index 31b93ba874..10ad261ac5 100644 --- a/src/base/threadpool.h +++ b/src/base/threadpool.h @@ -14,16 +14,19 @@ #ifndef OR_TOOLS_BASE_THREADPOOL_H_ #define OR_TOOLS_BASE_THREADPOOL_H_ +#include #include +#include #include #include +#include #include "base/callback.h" #include "base/macros.h" #include "base/logging.h" #include "base/mutex.h" -#include "base/scoped_ptr.h" #include "base/synchronization.h" +#include "base/unique_ptr.h" namespace operations_research { class ThreadPool { @@ -33,18 +36,16 @@ class ThreadPool { void StartWorkers(); void Add(Closure* const closure); - void StopOnFinalBarrier(); Closure* GetNextTask(); private: const int num_workers_; std::list tasks_; - Mutex mutex_; - CondVar condition_; + std::mutex mutex_; + std::condition_variable condition_; bool waiting_to_finish_; bool started_; - scoped_ptr final_barrier_; - std::vector all_workers_; + std::vector all_workers_; }; } // namespace operations_research #endif // OR_TOOLS_BASE_THREADPOOL_H_