This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Tiny Parallel Library | |
* | |
* The library implements following parallel algorithms that its | |
* interface are compatible with Intel TBB and Microsoft PPL. | |
* - parallel_for_each(first,last,func) | |
* - parallel_for(first,last,func) | |
* - parallel_invoke(f1,f2,...) (up to 4 args) | |
*/ | |
#ifndef TINYPL_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <mutex> | |
#include <condition_variable> | |
// binary semaphore | |
class binsem { | |
public: | |
explicit binsem(int init_count = count_max) | |
: count_(init_count) {} | |
// P-operation / acquire |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C11 <threads.h> emulation library | |
* | |
* (C) Copyright yohhoy 2012. | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
*/ | |
#ifndef EMULATED_THREADS_H_INCLUDED_ | |
#define EMULATED_THREADS_H_INCLUDED_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Mockup implementation of Threading Building Blocks(TBB) library | |
* | |
* (C) Copyright yohhoy 2012. | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
* | |
* Support: | |
* - Range concept (except `blocked_range3d') | |
* - Parallel algorithms (except `pipeline'/`parallel_pipeline') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* libfiber.hpp | |
* | |
* (C) Copyright yohhoy 2012. | |
* Distributed under the Boost Software License, Version 1.0. | |
* (See copy at http://www.boost.org/LICENSE_1_0.txt) | |
*/ | |
#ifndef LIBFIBER_HPP_INCLUDED_ | |
#define LIBFIBER_HPP_INCLUDED_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* example for "libfiber.hpp" - 2生産者-3消費者デモ | |
*/ | |
#include <iostream> | |
#include <vector> | |
#include <boost/circular_buffer.hpp> | |
#include "libfiber.hpp" | |
// 上限付きFIFOキュー |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#define PROCESS (std::cout<<"do"<<std::endl) | |
//#define PROCESS (throw 42) | |
//-------------------------------- | |
#ifdef TEST1 | |
#include <boost/shared_ptr.hpp> | |
#include <boost/thread.hpp> | |
class X { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
#include <memory> | |
#include <functional> // bad_function_call | |
#include <utility> | |
#include <type_traits> | |
namespace detail { | |
// index_tuple<size_t...>, make_indices<E,S> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* OLE Drag and Drop module | |
* | |
* Copyright(c) 2001 yoh(yohhoy) | |
*/ | |
#define STRICT | |
#define NONAMELESSUNION | |
#define COBJMACROS | |
#include <windows.h> | |
#include "oledd.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute VB_Name = "mdlMain" | |
Option Explicit | |
' | |
' tricky.bas | |
' | |
' Copyright(c) 2001 yoh(yohhoy) | |
' | |
' Win32API | |
Private Type WNDCLASS |
OlderNewer