From: Matthias Maier Date: Mon, 15 Apr 2013 12:10:47 +0000 (+0000) Subject: Bump tbb to version newest version X-Git-Tag: v8.0.0~710 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b3c9a8836d5f9b33662f512de7c3d46268595d0;p=dealii.git Bump tbb to version newest version git-svn-id: https://svn.dealii.org/trunk@29275 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/bundled/CMakeLists.txt b/deal.II/bundled/CMakeLists.txt index 70983ef9f7..2ea64b407b 100644 --- a/deal.II/bundled/CMakeLists.txt +++ b/deal.II/bundled/CMakeLists.txt @@ -74,7 +74,7 @@ IF(NOT CMAKE_SYSTEM_NAME MATCHES "CYGWIN") OPTION(DEAL_II_FORCE_BUNDLED_THREADS "Always use the bundled tbb library instead of an external one." OFF) - SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb30_104oss") + SET(TBB_FOLDER "${CMAKE_SOURCE_DIR}/bundled/tbb41_20130401oss") ENDIF() IF(FEATURE_THREADS_BUNDLED_CONFIGURED) diff --git a/deal.II/bundled/README.bundled b/deal.II/bundled/README.bundled index b197064855..27756772dc 100644 --- a/deal.II/bundled/README.bundled +++ b/deal.II/bundled/README.bundled @@ -42,6 +42,18 @@ A full version of the tbb project can be downloaded at http://threadingbuildingblocks.org/. +./tbb41_20130401oss +============== + +Contains parts of the Intel Threading Building Blocks library copyrighted +by the respective authors and licensed under the GNU General Public License +(GPL) Version 2.0 with a runtime exception. See tbb41_20130401oss/COPYING +or http://threadingbuildingblocks.org/. + +A full version of the tbb project can be downloaded at +http://threadingbuildingblocks.org/. + + ./umfpack (UMFPACK 5.0.2, AMD 2.2, UFCONFIG) ========= diff --git a/deal.II/bundled/tbb41_20130401oss/CHANGES b/deal.II/bundled/tbb41_20130401oss/CHANGES new file mode 100644 index 0000000000..ae58f2a838 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/CHANGES @@ -0,0 +1,1433 @@ +------------------------------------------------------------------------ +The list of most significant changes made over time in +Intel(R) Threading Bulding Blocks (Intel(R) TBB). +------------------------------------------------------------------------ + +Intel TBB 4.1 Update 3 +TBB_INTERFACE_VERSION == 6103 + +Changes (w.r.t. Intel TBB 4.1 Update 2): + +- Binary files for Android* applications were added to the Linux* OS + package. +- Binary files for Windows Store* applications were added to the + Windows* OS package. +- Exact exception propagation (exception_ptr) support on Linux OS is + now turned on by default for GCC 4.4 and higher. +- Stopped implicit use of large memory pages by tbbmalloc (Linux-only). + Now use of large pages must be explicitly enabled with + scalable_allocation_mode() function or TBB_MALLOC_USE_HUGE_PAGES + environment variable. + +Community Preview Features: + +- Extended Class task_arena constructor and method initialize() to + allow some concurrency to be reserved strictly for application + threads. +- New methods terminate() and is_active() were added to class + task_arena. + +Bugs fixed: + +- Fixed initialization of hashing helper constant in the hash + containers. +- Fixed possible stalls in concurrent invocations of + task_arena::execute() when no worker thread is available to make + progress. +- Fixed incorrect calculation of hardware concurrency in the presence + of inactive processor groups, particularly on systems running + Windows* 8 and Windows* Server 2012. + +Open-source contributions integrated: + +- The fix for the GUI examples on OS X* systems by Raf Schietekat. +- Moved some power-of-2 calculations to functions to improve readability + by Raf Schietekat. +- C++11/Clang support improvements by arcata. +- ARM* platform isolation layer by Steve Capper, Leif Lindholm, Leo Lara + (ARM). + +------------------------------------------------------------------------ +Intel TBB 4.1 Update 2 +TBB_INTERFACE_VERSION == 6102 + +Changes (w.r.t. Intel TBB 4.1 Update 1): + +- Objects up to 128 MB are now cached by the tbbmalloc. Previously + the threshold was 8MB. Objects larger than 128 MB are still + processed by direct OS calls. +- concurrent_unordered_multiset and concurrent_unordered_multimap + have been added, based on Microsoft* PPL prototype. +- Ability to value-initialize a tbb::atomic variable on construction + in C++11, with const expressions properly supported. + +Community Preview Features: + +- Added a possibility to wait until all worker threads terminate. + This is necessary before calling fork() from an application. + +Bugs fixed: + +- Fixed data race in tbbmalloc that might lead to memory leaks + for large object allocations. +- Fixed task_arena::enqueue() to use task_group_context of target arena. +- Improved implementation of 64 bit atomics on ia32. + +------------------------------------------------------------------------ +Intel TBB 4.1 Update 1 +TBB_INTERFACE_VERSION == 6101 + +Changes (w.r.t. Intel TBB 4.1): + +- concurrent_vector class now supports initialization/assignment + via C++11 initializer list feature (std::initializer_list) +- Added implementation of the platform isolation layer based on + Intel compiler atomic built-ins; it is supposed to work on + any platform supported by compiler version 12.1 and newer. +- Using GetNativeSystemInfo() instead of GetSystemInfo() to support + more than 32 processors for 32-bit applications under WOW64. +- The following form of parallel_for: + parallel_for(first, last, [step,] f[, context]) now accepts an + optional partitioner parameter after the function f. + +Backward-incompatible API changes: + +- The library no longer injects tuple in to namespace std. + In previous releases, tuple was injected into namespace std by + flow_graph.h when std::tuple was not available. In this release, + flow_graph.h now uses tbb::flow::tuple. On platforms where + std::tuple is available, tbb::flow::tuple is typedef'ed to + std::tuple. On all other platforms, tbb::flow::tuple provides + a subset of the functionality defined by std::tuple. Users of + flow_graph.h may need to change their uses of std::tuple to + tbb::flow::tuple to ensure compatibility with non-C++11 compliant + compilers. + +Bugs fixed: + +- Fixed local observer to be able to override propagated CPU state and + to provide correct value of task_arena::current_slot() in callbacks. + +------------------------------------------------------------------------ +Intel TBB 4.1 +TBB_INTERFACE_VERSION == 6100 + +Changes (w.r.t. Intel TBB 4.0 Update 5): + +- _WIN32_WINNT must be set to 0x0501 or greater in order to use TBB + on Microsoft* Windows*. +- parallel_deterministic_reduce template function is fully supported. +- TBB headers can be used with C++0x/C++11 mode (-std=c++0x) of GCC + and Intel(R) Compiler. +- C++11 std::make_exception_ptr is used where available, instead of + std::copy_exception from earlier C++0x implementations. +- Improvements in the TBB allocator to reduce extra memory consumption. +- Partial refactoring of the task scheduler data structures. +- TBB examples allow more flexible specification of the thread number, + including arithmetic and geometric progression. + +Bugs fixed: + +- On Linux & OS X*, pre-built TBB binaries do not yet support exact + exception propagation via C++11 exception_ptr. To prevent run time + errors, by default TBB headers disable exact exception propagation + even if the C++ implementation provides exception_ptr. + +Community Preview Features: + +- Added: class task_arena, for work submission by multiple application + threads with thread-independent control of concurrency level. +- Added: task_scheduler_observer can be created as local to a master + thread, to observe threads that work on behalf of that master. + Local observers may have new on_scheduler_leaving() callback. + +------------------------------------------------------------------------ +Intel TBB 4.0 Update 5 +TBB_INTERFACE_VERSION == 6005 + +Changes (w.r.t. Intel TBB 4.0 Update 4): + +- Parallel pipeline optimization (directly storing small objects in the + interstage data buffers) limited to trivially-copyable types for + C++11 and a short list of types for earlier compilers. +- _VARIADIC_MAX switch is honored for TBB tuple implementation + and flow::graph nodes based on tuple. +- Support of Cocoa framework was added to the GUI examples on OS X* + systems. + +Bugs fixed: + +- Fixed a tv_nsec overflow bug in condition_variable::wait_for. +- Fixed execution order of enqueued tasks with different priorities. +- Fixed a bug with task priority changes causing lack of progress + for fire-and-forget tasks when TBB was initialized to use 1 thread. +- Fixed duplicate symbol problem when linking multiple compilation + units that include flow_graph.h on VC 10. + +------------------------------------------------------------------------ +Intel TBB 4.0 Update 4 +TBB_INTERFACE_VERSION == 6004 + +Changes (w.r.t. Intel TBB 4.0 Update 3): + +- The TBB memory allocator transparently supports large pages on Linux. +- A new flow_graph example, logic_sim, was added. +- Support for DirectX* 9 was added to GUI examples. + +Community Preview Features: + +- Added: aggregator, a new concurrency control mechanism. + +Bugs fixed: + +- The abort operation on concurrent_bounded_queue now leaves the queue + in a reusable state. If a bad_alloc or bad_last_alloc exception is + thrown while the queue is recovering from an abort, that exception + will be reported instead of user_abort on the thread on which it + occurred, and the queue will not be reusable. +- Steal limiting heuristic fixed to avoid premature stealing disabling + when large amount of __thread data is allocated on thread stack. +- Fixed a low-probability leak of arenas in the task scheduler. +- In STL-compatible allocator classes, the method construct() was fixed + to comply with C++11 requirements. +- Fixed a bug that prevented creation of fixed-size memory pools + smaller than 2M. +- Significantly reduced the amount of warnings from various compilers. + +Open-source contributions integrated: + +- Multiple improvements by Raf Schietekat. +- Basic support for Clang on OS X* by Blas Rodriguez Somoza. +- Fixes for warnings and corner-case bugs by Blas Rodriguez Somoza + and Edward Lam. + +------------------------------------------------------------------------ +Intel TBB 4.0 Update 3 +TBB_INTERFACE_VERSION == 6003 + +Changes (w.r.t. Intel TBB 4.0 Update 2): + +- Modifications to the low-level API for memory pools: + added support for aligned allocations; + pool policies reworked to allow backward-compatible extensions; + added a policy to not return memory space till destruction; + pool_reset() does not return memory space anymore. +- Class tbb::flow::graph_iterator added to iterate over all nodes + registered with a graph instance. +- multioutput_function_node has been renamed multifunction_node. + multifunction_node and split_node are now fully-supported features. +- For the tagged join node, the policy for try_put of an item with + already existing tag has been defined: the item will be rejected. +- Matching the behavior on Windows, on other platforms the optional + shared libraries (libtbbmalloc, libirml) now are also searched + only in the directory where libtbb is located. +- The platform isolation layer based on GCC built-ins is extended. + +Backward-incompatible API changes: + +- a graph reference parameter is now required to be passed to the + constructors of the following flow graph nodes: overwrite_node, + write_once_node, broadcast_node, and the CPF or_node. +- the following tbb::flow node methods and typedefs have been renamed: + Old New + join_node and or_node: + inputs() -> input_ports() + input_ports_tuple_type -> input_ports_type + multifunction_node and split_node: + ports_type -> output_ports_type + +Bugs fixed: + +- Not all logical processors were utilized on systems with more than + 64 cores split by Windows into several processor groups. + +------------------------------------------------------------------------ +Intel TBB 4.0 Update 2 commercial-aligned release +TBB_INTERFACE_VERSION == 6002 + +Changes (w.r.t. Intel TBB 4.0 Update 1 commercial-aligned release): + +- concurrent_bounded_queue now has an abort() operation that releases + threads involved in pending push or pop operations. The released + threads will receive a tbb::user_abort exception. +- Added Community Preview Feature: concurrent_lru_cache container, + a concurrent implementation of LRU (least-recently-used) cache. + +Bugs fixed: + +- fixed a race condition in the TBB scalable allocator. +- concurrent_queue counter wraparound bug was fixed, which occurred when + the number of push and pop operations exceeded ~>4 billion on IA32. +- fixed races in the TBB scheduler that could put workers asleep too + early, especially in presense of affinitized tasks. + +------------------------------------------------------------------------ +Intel TBB 4.0 Update 1 commercial-aligned release +TBB_INTERFACE_VERSION == 6000 (forgotten to increment) + +Changes (w.r.t. Intel TBB 4.0 commercial-aligned release): + +- Memory leaks fixed in binpack example. +- Improvements and fixes in the TBB allocator. + +------------------------------------------------------------------------ +Intel TBB 4.0 commercial-aligned release +TBB_INTERFACE_VERSION == 6000 + +Changes (w.r.t. Intel TBB 3.0 Update 8 commercial-aligned release): + +- concurrent_priority_queue is now a fully supported feature. + Capacity control methods were removed. +- Flow graph is now a fully supported feature. +- A new memory backend has been implemented in the TBB allocator. + It can reuse freed memory for both small and large objects, and + returns unused memory blocks to the OS more actively. +- Improved partitioning algorithms for parallel_for and parallel_reduce + to better handle load imbalance. +- The convex_hull example has been refactored for reproducible + performance results. +- The major interface version has changed from 5 to 6. + Deprecated interfaces might be removed in future releases. + +Community Preview Features: + +- Added: serial subset, i.e. sequential implementations of TBB generic + algorithms (currently, only provided for parallel_for). +- Preview of new flow graph nodes: + or_node (accepts multiple inputs, forwards each input separately + to all successors), + split_node (accepts tuples, and forwards each element of a tuple + to a corresponding successor), and + multioutput_function_node (accepts one input, and passes the input + and a tuple of output ports to the function body to support outputs + to multiple successors). +- Added: memory pools for more control on memory source, grouping, + and collective deallocation. + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 8 commercial-aligned release +TBB_INTERFACE_VERSION == 5008 + +Changes (w.r.t. Intel TBB 3.0 Update 7 commercial-aligned release): + +- Task priorities become an official feature of TBB, + not community preview as before. +- Atomics API extended, and implementation refactored. +- Added task::set_parent() method. +- Added concurrent_unordered_set container. + +Open-source contributions integrated: + +- PowerPC support by Raf Schietekat. +- Fix of potential task pool overrun and other improvements + in the task scheduler by Raf Schietekat. +- Fix in parallel_for_each to work with std::set in Visual* C++ 2010. + +Community Preview Features: + +- Graph community preview feature was renamed to flow graph. + Multiple improvements in the implementation. + Binpack example was added for the feature. +- A number of improvements to concurrent_priority_queue. + Shortpath example was added for the feature. +- TBB runtime loaded functionality was added (Windows*-only). + It allows to specify which versions of TBB should be used, + as well as to set directories for the library search. +- parallel_deterministic_reduce template function was added. + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 7 commercial-aligned release +TBB_INTERFACE_VERSION == 5006 (forgotten to increment) + +Changes (w.r.t. Intel TBB 3.0 Update 6 commercial-aligned release): + +- Added implementation of the platform isolation layer based on + GCC atomic built-ins; it is supposed to work on any platform + where GCC has these built-ins. + +Community Preview Features: + +- Graph's dining_philosophers example added. +- A number of improvements to graph and concurrent_priority_queue. + + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 6 commercial-aligned release +TBB_INTERFACE_VERSION == 5006 + +Changes (w.r.t. Intel TBB 3.0 Update 5 commercial-aligned release): + +- Added Community Preview feature: task and task group priority, and + Fractal example demonstrating it. +- parallel_pipeline optimized for data items of small and large sizes. +- Graph's join_node is now parametrized with a tuple of up to 10 types. +- Improved performance of concurrent_priority_queue. + +Open-source contributions integrated: + +- Initial NetBSD support by Aleksej Saushev. + +Bugs fixed: + +- Failure to enable interoperability with Intel(R) Cilk(tm) Plus runtime + library, and a crash caused by invoking the interoperability layer + after one of the libraries was unloaded. +- Data race that could result in concurrent_unordered_map structure + corruption after call to clear() method. +- Stack corruption caused by PIC version of 64-bit CAS compiled by Intel + compiler on Linux. +- Inconsistency of exception propagation mode possible when application + built with Microsoft* Visual Studio* 2008 or earlier uses TBB built + with Microsoft* Visual Studio* 2010. +- Affinitizing master thread to a subset of available CPUs after TBB + scheduler was initialized tied all worker threads to the same CPUs. +- Method is_stolen_task() always returned 'false' for affinitized tasks. +- write_once_node and overwrite_node did not immediately send buffered + items to successors + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 5 commercial-aligned release +TBB_INTERFACE_VERSION == 5005 + +Changes (w.r.t. Intel TBB 3.0 Update 4 commercial-aligned release): + +- Added Community Preview feature: graph. +- Added automatic propagation of master thread FPU settings to + TBB worker threads. +- Added a public function to perform a sequentially consistent full + memory fence: tbb::atomic_fence() in tbb/atomic.h. + +Bugs fixed: + +- Data race that could result in scheduler data structures corruption + when using fire-and-forget tasks. +- Potential referencing of destroyed concurrent_hash_map element after + using erase(accessor&A) method with A acquired as const_accessor. +- Fixed a correctness bug in the convex hull example. + +Open-source contributions integrated: + +- Patch for calls to internal::atomic_do_once() by Andrey Semashev. + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 4 commercial-aligned release +TBB_INTERFACE_VERSION == 5004 + +Changes (w.r.t. Intel TBB 3.0 Update 3 commercial-aligned release): + +- Added Community Preview feature: concurrent_priority_queue. +- Fixed library loading to avoid possibility for remote code execution, + see http://www.microsoft.com/technet/security/advisory/2269637.mspx. +- Added support of more than 64 cores for appropriate Microsoft* + Windows* versions. For more details, see + http://msdn.microsoft.com/en-us/library/dd405503.aspx. +- Default number of worker threads is adjusted in accordance with + process affinity mask. + +Bugs fixed: + +- Calls of scalable_* functions from inside the allocator library + caused issues if the functions were overridden by another module. +- A crash occurred if methods run() and wait() were called concurrently + for an empty tbb::task_group (1736). +- The tachyon example exhibited build problems associated with + bug 554339 on Microsoft* Visual Studio* 2010. Project files were + modified as a partial workaround to overcome the problem. See + http://connect.microsoft.com/VisualStudio/feedback/details/554339. + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 3 commercial-aligned release +TBB_INTERFACE_VERSION == 5003 + +Changes (w.r.t. Intel TBB 3.0 Update 2 commercial-aligned release): + +- cache_aligned_allocator class reworked to use scalable_aligned_malloc. +- Improved performance of count() and equal_range() methods + in concurrent_unordered_map. +- Improved implementation of 64-bit atomic loads and stores on 32-bit + platforms, including compilation with VC 7.1. +- Added implementation of atomic operations on top of OSAtomic API + provided by OS X*. +- Removed gratuitous try/catch blocks surrounding thread function calls + in tbb_thread. +- Xcode* projects were added for sudoku and game_of_life examples. +- Xcode* projects were updated to work without TBB framework. + +Bugs fixed: + +- Fixed a data race in task scheduler destruction that on rare occasion + could result in memory corruption. +- Fixed idle spinning in thread bound filters in tbb::pipeline (1670). + +Open-source contributions integrated: + +- MinGW-64 basic support by brsomoza (partially). +- Patch for atomic.h by Andrey Semashev. +- Support for AIX & GCC on PowerPC by Giannis Papadopoulos. +- Various improvements by Raf Schietekat. + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 2 commercial-aligned release +TBB_INTERFACE_VERSION == 5002 + +Changes (w.r.t. Intel TBB 3.0 Update 1 commercial-aligned release): + +- Destructor of tbb::task_group class throws missing_wait exception + if there are tasks running when it is invoked. +- Interoperability layer with Intel Cilk Plus runtime library added + to protect TBB TLS in case of nested usage with Intel Cilk Plus. +- Compilation fix for dependent template names in concurrent_queue. +- Memory allocator code refactored to ease development and maintenance. + +Bugs fixed: + +- Improved interoperability with other Intel software tools on Linux in + case of dynamic replacement of memory allocator (1700) +- Fixed install issues that prevented installation on + Mac OS* X 10.6.4 (1711). + +------------------------------------------------------------------------ +Intel TBB 3.0 Update 1 commercial-aligned release +TBB_INTERFACE_VERSION == 5000 (forgotten to increment) + +Changes (w.r.t. Intel TBB 3.0 commercial-aligned release): + +- Decreased memory fragmentation by allocations bigger than 8K. +- Lazily allocate worker threads, to avoid creating unnecessary stacks. + +Bugs fixed: + +- TBB allocator used much more memory than malloc (1703) - see above. +- Deadlocks happened in some specific initialization scenarios + of the TBB allocator (1701, 1704). +- Regression in enumerable_thread_specific: excessive requirements + for object constructors. +- A bug in construction of parallel_pipeline filters when body instance + was a temporary object. +- Incorrect usage of memory fences on PowerPC and XBOX360 platforms. +- A subtle issue in task group context binding that could result + in cancelation signal being missed by nested task groups. +- Incorrect construction of concurrent_unordered_map if specified + number of buckets is not power of two. +- Broken count() and equal_range() of concurrent_unordered_map. +- Return type of postfix form of operator++ for hash map's iterators. + +------------------------------------------------------------------------ +Intel TBB 3.0 commercial-aligned release +TBB_INTERFACE_VERSION == 5000 + +Changes (w.r.t. Intel TBB 2.2 Update 3 commercial-aligned release): + +- All open-source-release changes down to TBB 2.2 U3 below + were incorporated into this release. + +------------------------------------------------------------------------ +20100406 open-source release + +Changes (w.r.t. 20100310 open-source release): + +- Added support for Microsoft* Visual Studio* 2010, including binaries. +- Added a PDF file with recommended Design Patterns for TBB. +- Added parallel_pipeline function and companion classes and functions + that provide a strongly typed lambda-friendly pipeline interface. +- Reworked enumerable_thread_specific to use a custom implementation of + hash map that is more efficient for ETS usage models. +- Added example for class task_group; see examples/task_group/sudoku. +- Removed two examples, as they were long outdated and superceded: + pipeline/text_filter (use pipeline/square); + parallel_while/parallel_preorder (use parallel_do/parallel_preorder). +- PDF documentation updated. +- Other fixes and changes in code, tests, and examples. + +Bugs fixed: + +- Eliminated build errors with MinGW32. +- Fixed post-build step and other issues in VS projects for examples. +- Fixed discrepancy between scalable_realloc and scalable_msize that + caused crashes with malloc replacement on Windows. + +------------------------------------------------------------------------ +20100310 open-source release + +Changes (w.r.t. Intel TBB 2.2 Update 3 commercial-aligned release): + +- Version macros changed in anticipation of a future release. +- Directory structure aligned with Intel(R) C++ Compiler; + now TBB binaries reside in //[bin|lib] + (in TBB 2.x, it was [bin|lib]//). +- Visual Studio projects changed for examples: instead of separate set + of files for each VS version, now there is single 'msvs' directory + that contains workspaces for MS C++ compiler (_cl.sln) and + Intel C++ compiler (_icl.sln). Works with VS 2005 and above. +- The name versioning scheme for backward compatibility was improved; + now compatibility-breaking changes are done in a separate namespace. +- Added concurrent_unordered_map implementation based on a prototype + developed in Microsoft for a future version of PPL. +- Added PPL-compatible writer-preference RW lock (reader_writer_lock). +- Added TBB_IMPLEMENT_CPP0X macro to control injection of C++0x names + implemented in TBB into namespace std. +- Added almost-C++0x-compatible std::condition_variable, plus a bunch + of other C++0x classes required by condition_variable. +- With TBB_IMPLEMENT_CPP0X, tbb_thread can be also used as std::thread. +- task.cpp was split into several translation units to structure + TBB scheduler sources layout. Static data layout and library + initialization logic were also updated. +- TBB scheduler reworked to prevent master threads from stealing + work belonging to other masters. +- Class task was extended with enqueue() method, and slightly changed + semantics of methods spawn() and destroy(). For exact semantics, + refer to TBB Reference manual. +- task_group_context now allows for destruction by non-owner threads. +- Added TBB_USE_EXCEPTIONS macro to control use of exceptions in TBB + headers. It turns off (i.e. sets to 0) automatically if specified + compiler options disable exception handling. +- TBB is enabled to run on top of Microsoft's Concurrency Runtime + on Windows* 7 (via our worker dispatcher known as RML). +- Removed old unused busy-waiting code in concurrent_queue. +- Described the advanced build & test options in src/index.html. +- Warning level for GCC raised with -Wextra and a few other options. +- Multiple fixes and improvements in code, tests, examples, and docs. + +Open-source contributions integrated: + +- Xbox support by Roman Lut (Deep Shadows), though further changes are + required to make it working; e.g. post-2.1 entry points are missing. +- "Eventcount" by Dmitry Vyukov evolved into concurrent_monitor, + an internal class used in the implementation of concurrent_queue. + +------------------------------------------------------------------------ +Intel TBB 2.2 Update 3 commercial-aligned release +TBB_INTERFACE_VERSION == 4003 + +Changes (w.r.t. Intel TBB 2.2 Update 2 commercial-aligned release): + +- PDF documentation updated. + +Bugs fixed: + +- concurrent_hash_map compatibility issue exposed on Linux in case + two versions of the container were used by different modules. +- enforce 16 byte stack alignment for consistence with GCC; required + to work correctly with 128-bit variables processed by SSE. +- construct() methods of allocator classes now use global operator new. + +------------------------------------------------------------------------ +Intel TBB 2.2 Update 2 commercial-aligned release +TBB_INTERFACE_VERSION == 4002 + +Changes (w.r.t. Intel TBB 2.2 Update 1 commercial-aligned release): + +- parallel_invoke and parallel_for_each now take function objects + by const reference, not by value. +- Building TBB with /MT is supported, to avoid dependency on particular + versions of Visual C++* runtime DLLs. TBB DLLs built with /MT + are located in vc_mt directory. +- Class critical_section introduced. +- Improvements in exception support: new exception classes introduced, + all exceptions are thrown via an out-of-line internal method. +- Improvements and fixes in the TBB allocator and malloc replacement, + including robust memory identification, and more reliable dynamic + function substitution on Windows*. +- Method swap() added to class tbb_thread. +- Methods rehash() and bucket_count() added to concurrent_hash_map. +- Added support for Visual Studio* 2010 Beta2. No special binaries + provided, but CRT-independent DLLs (vc_mt) should work. +- Other fixes and improvements in code, tests, examples, and docs. + +Open-source contributions integrated: + +- The fix to build 32-bit TBB on Mac OS* X 10.6. +- GCC-based port for SPARC Solaris by Michailo Matijkiw, with use of + earlier work by Raf Schietekat. + +Bugs fixed: + +- 159 - TBB build for PowerPC* running Mac OS* X. +- 160 - IBM* Java segfault if used with TBB allocator. +- crash in concurrent_queue (1616). + +------------------------------------------------------------------------ +Intel TBB 2.2 Update 1 commercial-aligned release +TBB_INTERFACE_VERSION == 4001 + +Changes (w.r.t. Intel TBB 2.2 commercial-aligned release): + +- Incorporates all changes from open-source releases below. +- Documentation was updated. +- TBB scheduler auto-initialization now covers all possible use cases. +- concurrent_queue: made argument types of sizeof used in paddings + consistent with those actually used. +- Memory allocator was improved: supported corner case of user's malloc + calling scalable_malloc (non-Windows), corrected processing of + memory allocation requests during tbb memory allocator startup + (Linux). +- Windows malloc replacement has got better support for static objects. +- In pipeline setups that do not allow actual parallelism, execution + by a single thread is guaranteed, idle spinning eliminated, and + performance improved. +- RML refactoring and clean-up. +- New constructor for concurrent_hash_map allows reserving space for + a number of items. +- Operator delete() added to the TBB exception classes. +- Lambda support was improved in parallel_reduce. +- gcc 4.3 warnings were fixed for concurrent_queue. +- Fixed possible initialization deadlock in modules using TBB entities + during construction of global static objects. +- Copy constructor in concurrent_hash_map was fixed. +- Fixed a couple of rare crashes in the scheduler possible before + in very specific use cases. +- Fixed a rare crash in the TBB allocator running out of memory. +- New tests were implemented, including test_lambda.cpp that checks + support for lambda expressions. +- A few other small changes in code, tests, and documentation. + +------------------------------------------------------------------------ +20090809 open-source release + +Changes (w.r.t. Intel TBB 2.2 commercial-aligned release): + +- Fixed known exception safety issues in concurrent_vector. +- Better concurrency of simultaneous grow requests in concurrent_vector. +- TBB allocator further improves performance of large object allocation. +- Problem with source of text relocations was fixed on Linux +- Fixed bugs related to malloc replacement under Windows +- A few other small changes in code and documentation. + +------------------------------------------------------------------------ +Intel TBB 2.2 commercial-aligned release +TBB_INTERFACE_VERSION == 4000 + +Changes (w.r.t. Intel TBB 2.1 U4 commercial-aligned release): + +- Incorporates all changes from open-source releases below. +- Architecture folders renamed from em64t to intel64 and from itanium + to ia64. +- Major Interface version changed from 3 to 4. Deprecated interfaces + might be removed in future releases. +- Parallel algorithms that use partitioners have switched to use + the auto_partitioner by default. +- Improved memory allocator performance for allocations bigger than 8K. +- Added new thread-bound filters functionality for pipeline. +- New implementation of concurrent_hash_map that improves performance + significantly. +- A few other small changes in code and documentation. + +------------------------------------------------------------------------ +20090511 open-source release + +Changes (w.r.t. previous open-source release): + +- Basic support for MinGW32 development kit. +- Added tbb::zero_allocator class that initializes memory with zeros. + It can be used as an adaptor to any STL-compatible allocator class. +- Added tbb::parallel_for_each template function as alias to parallel_do. +- Added more overloads for tbb::parallel_for. +- Added support for exact exception propagation (can only be used with + compilers that support C++0x std::exception_ptr). +- tbb::atomic template class can be used with enumerations. +- mutex, recursive_mutex, spin_mutex, spin_rw_mutex classes extended + with explicit lock/unlock methods. +- Fixed size() and grow_to_at_least() methods of tbb::concurrent_vector + to provide space allocation guarantees. More methods added for + compatibility with std::vector, including some from C++0x. +- Preview of a lambda-friendly interface for low-level use of tasks. +- scalable_msize function added to the scalable allocator (Windows only). +- Rationalized internal auxiliary functions for spin-waiting and backoff. +- Several tests undergo decent refactoring. + +Changes affecting backward compatibility: + +- Improvements in concurrent_queue, including limited API changes. + The previous version is deprecated; its functionality is accessible + via methods of the new tbb::concurrent_bounded_queue class. +- grow* and push_back methods of concurrent_vector changed to return + iterators; old semantics is deprecated. + +------------------------------------------------------------------------ +Intel TBB 2.1 Update 4 commercial-aligned release +TBB_INTERFACE_VERSION == 3016 + +Changes (w.r.t. Intel TBB 2.1 U3 commercial-aligned release): + +- Added tests for aligned memory allocations and malloc replacement. +- Several improvements for better bundling with Intel(R) C++ Compiler. +- A few other small changes in code and documentaion. + +Bugs fixed: + +- 150 - request to build TBB examples with debug info in release mode. +- backward compatibility issue with concurrent_queue on Windows. +- dependency on VS 2005 SP1 runtime libraries removed. +- compilation of GUI examples under Xcode* 3.1 (1577). +- On Windows, TBB allocator classes can be instantiated with const types + for compatibility with MS implementation of STL containers (1566). + +------------------------------------------------------------------------ +20090313 open-source release + +Changes (w.r.t. 20081109 open-source release): + +- Includes all changes introduced in TBB 2.1 Update 2 & Update 3 + commercial-aligned releases (see below for details). +- Added tbb::parallel_invoke template function. It runs up to 10 + user-defined functions in parallel and waits for them to complete. +- Added a special library providing ability to replace the standard + memory allocation routines in Microsoft* C/C++ RTL (malloc/free, + global new/delete, etc.) with the TBB memory allocator. + Usage details are described in include/tbb/tbbmalloc_proxy.h file. +- Task scheduler switched to use new implementation of its core + functionality (deque based task pool, new structure of arena slots). +- Preview of Microsoft* Visual Studio* 2005 project files for + building the library is available in build/vsproject folder. +- Added tests for aligned memory allocations and malloc replacement. +- Added parallel_for/game_of_life.net example (for Windows only) + showing TBB usage in a .NET application. +- A number of other fixes and improvements to code, tests, makefiles, + examples and documents. + +Bugs fixed: + +- The same list as in TBB 2.1 Update 4 right above. + +------------------------------------------------------------------------ +Intel TBB 2.1 Update 3 commercial-aligned release +TBB_INTERFACE_VERSION == 3015 + +Changes (w.r.t. Intel TBB 2.1 U2 commercial-aligned release): + +- Added support for aligned allocations to the TBB memory allocator. +- Added a special library to use with LD_PRELOAD on Linux* in order to + replace the standard memory allocation routines in C/C++ with the + TBB memory allocator. +- Added null_mutex and null_rw_mutex: no-op classes interface-compliant + to other TBB mutexes. +- Improved performance of parallel_sort, to close most of the serial gap + with std::sort, and beat it on 2 and more cores. +- A few other small changes. + +Bugs fixed: + +- the problem where parallel_for hanged after exception throw + if affinity_partitioner was used (1556). +- get rid of VS warnings about mbstowcs deprecation (1560), + as well as some other warnings. +- operator== for concurrent_vector::iterator fixed to work correctly + with different vector instances. + +------------------------------------------------------------------------ +Intel TBB 2.1 Update 2 commercial-aligned release +TBB_INTERFACE_VERSION == 3014 + +Changes (w.r.t. Intel TBB 2.1 U1 commercial-aligned release): + +- Incorporates all open-source-release changes down to TBB 2.1 U1, + except for: + - 20081019 addition of enumerable_thread_specific; +- Warning level for Microsoft* Visual C++* compiler raised to /W4 /Wp64; + warnings found on this level were cleaned or suppressed. +- Added TBB_runtime_interface_version API function. +- Added new example: pipeline/square. +- Added exception handling and cancellation support + for parallel_do and pipeline. +- Added copy constructor and [begin,end) constructor to concurrent_queue. +- Added some support for beta version of Intel(R) Parallel Amplifier. +- Added scripts to set environment for cross-compilation of 32-bit + applications on 64-bit Linux with Intel(R) C++ Compiler. +- Fixed semantics of concurrent_vector::clear() to not deallocate + internal arrays. Fixed compact() to perform such deallocation later. +- Fixed the issue with atomic when T is incomplete type. +- Improved support for PowerPC* Macintosh*, including the fix + for a bug in masked compare-and-swap reported by a customer. +- As usual, a number of other improvements everywhere. + +------------------------------------------------------------------------ +20081109 open-source release + +Changes (w.r.t. previous open-source release): + +- Added new serial out of order filter for tbb::pipeline. +- Fixed the issue with atomic::operator= reported at the forum. +- Fixed the issue with using tbb::task::self() in task destructor + reported at the forum. +- A number of other improvements to code, tests, makefiles, examples + and documents. + +Open-source contributions integrated: +- Changes in the memory allocator were partially integrated. + +------------------------------------------------------------------------ +20081019 open-source release + +Changes (w.r.t. previous open-source release): + +- Introduced enumerable_thread_specific. This new class provides a + wrapper around native thread local storage as well as iterators and + ranges for accessing the thread local copies (1533). +- Improved support for Intel(R) Threading Analysis Tools + on Intel(R) 64 architecture. +- Dependency from Microsoft* CRT was integrated to the libraries using + manifests, to avoid issues if called from code that uses different + version of Visual C++* runtime than the library. +- Introduced new defines TBB_USE_ASSERT, TBB_USE_DEBUG, + TBB_USE_PERFORMANCE_WARNINGS, TBB_USE_THREADING_TOOLS. +- A number of other improvements to code, tests, makefiles, examples + and documents. + +Open-source contributions integrated: + +- linker optimization: /incremental:no . + +------------------------------------------------------------------------ +20080925 open-source release + +Changes (w.r.t. previous open-source release): + +- Same fix for a memory leak in the memory allocator as in TBB 2.1 U1. +- Improved support for lambda functions. +- Fixed more concurrent_queue issues reported at the forum. +- A number of other improvements to code, tests, makefiles, examples + and documents. + +------------------------------------------------------------------------ +Intel TBB 2.1 Update 1 commercial-aligned release +TBB_INTERFACE_VERSION == 3013 + +Changes (w.r.t. Intel TBB 2.1 commercial-aligned release): + +- Fixed small memory leak in the memory allocator. +- Incorporates all open-source-release changes since TBB 2.1, + except for: + - 20080825 changes for parallel_do; + +------------------------------------------------------------------------ +20080825 open-source release + +Changes (w.r.t. previous open-source release): + +- Added exception handling and cancellation support for parallel_do. +- Added default HashCompare template argument for concurrent_hash_map. +- Fixed concurrent_queue.clear() issues due to incorrect assumption + about clear() being private method. +- Added the possibility to use TBB in applications that change + default calling conventions (Windows* only). +- Many improvements to code, tests, examples, makefiles and documents. + +Bugs fixed: + +- 120, 130 - memset declaration missed in concurrent_hash_map.h + +------------------------------------------------------------------------ +20080724 open-source release + +Changes (w.r.t. previous open-source release): + +- Inline assembly for atomic operations improved for gcc 4.3 +- A few more improvements to the code. + +------------------------------------------------------------------------ +20080709 open-source release + +Changes (w.r.t. previous open-source release): + +- operator=() was added to the tbb_thread class according to + the current working draft for std::thread. +- Recognizing SPARC* in makefiles for Linux* and Sun Solaris*. + +Bugs fixed: + +- 127 - concurrent_hash_map::range fixed to split correctly. + +Open-source contributions integrated: + +- fix_set_midpoint.diff by jyasskin +- SPARC* support in makefiles by Raf Schietekat + +------------------------------------------------------------------------ +20080622 open-source release + +Changes (w.r.t. previous open-source release): + +- Fixed a hang that rarely happened on Linux + during deinitialization of the TBB scheduler. +- Improved support for Intel(R) Thread Checker. +- A few more improvements to the code. + +------------------------------------------------------------------------ +Intel TBB 2.1 commercial-aligned release +TBB_INTERFACE_VERSION == 3011 + +Changes (w.r.t. Intel TBB 2.0 U3 commercial-aligned release): + +- All open-source-release changes down to, and including, TBB 2.0 below, + were incorporated into this release. + +------------------------------------------------------------------------ +20080605 open-source release + +Changes (w.r.t. previous open-source release): + +- Explicit control of exported symbols by version scripts added on Linux. +- Interfaces polished for exception handling & algorithm cancellation. +- Cache behavior improvements in the scalable allocator. +- Improvements in text_filter, polygon_overlay, and other examples. +- A lot of other stability improvements in code, tests, and makefiles. +- First release where binary packages include headers/docs/examples, so + binary packages are now self-sufficient for using TBB. + +Open-source contributions integrated: + +- atomics patch (partially). +- tick_count warning patch. + +Bugs fixed: + +- 118 - fix for boost compatibility. +- 123 - fix for tbb_machine.h. + +------------------------------------------------------------------------ +20080512 open-source release + +Changes (w.r.t. previous open-source release): + +- Fixed a problem with backward binary compatibility + of debug Linux builds. +- Sun* Studio* support added. +- soname support added on Linux via linker script. To restore backward + binary compatibility, *.so -> *.so.2 softlinks should be created. +- concurrent_hash_map improvements - added few new forms of insert() + method and fixed precondition and guarantees of erase() methods. + Added runtime warning reporting about bad hash function used for + the container. Various improvements for performance and concurrency. +- Cancellation mechanism reworked so that it does not hurt scalability. +- Algorithm parallel_do reworked. Requirement for Body::argument_type + definition removed, and work item argument type can be arbitrarily + cv-qualified. +- polygon_overlay example added. +- A few more improvements to code, tests, examples and Makefiles. + +Open-source contributions integrated: + +- Soname support patch for Bugzilla #112. + +Bugs fixed: + +- 112 - fix for soname support. + +------------------------------------------------------------------------ +Intel TBB 2.0 U3 commercial-aligned release (package 017, April 20, 2008) + +Corresponds to commercial 019 (for Linux*, 020; for Mac OS* X, 018) +packages. + +Changes (w.r.t. Intel TBB 2.0 U2 commercial-aligned release): + +- Does not contain open-source-release changes below; this release is + only a minor update of TBB 2.0 U2. +- Removed spin-waiting in pipeline and concurrent_queue. +- A few more small bug fixes from open-source releases below. + +------------------------------------------------------------------------ +20080408 open-source release + +Changes (w.r.t. previous open-source release): + +- count_strings example reworked: new word generator implemented, hash + function replaced, and tbb_allocator is used with std::string class. +- Static methods of spin_rw_mutex were replaced by normal member + functions, and the class name was versioned. +- tacheon example was renamed to tachyon. +- Improved support for Intel(R) Thread Checker. +- A few more minor improvements. + +Open-source contributions integrated: + +- Two sets of Sun patches for IA Solaris support. + +------------------------------------------------------------------------ +20080402 open-source release + +Changes (w.r.t. previous open-source release): + +- Exception handling and cancellation support for tasks and algorithms + fully enabled. +- Exception safety guaranties defined and fixed for all concurrent + containers. +- User-defined memory allocator support added to all concurrent + containers. +- Performance improvement of concurrent_hash_map, spin_rw_mutex. +- Critical fix for a rare race condition during scheduler + initialization/de-initialization. +- New methods added for concurrent containers to be closer to STL, + as well as automatic filters removal from pipeline + and __TBB_AtomicAND function. +- The volatile keyword dropped from where it is not really needed. +- A few more minor improvements. + +------------------------------------------------------------------------ +20080319 open-source release + +Changes (w.r.t. previous open-source release): + +- Support for gcc version 4.3 was added. +- tbb_thread class, near compatible with std::thread expected in C++0x, + was added. + +Bugs fixed: + +- 116 - fix for compilation issues with gcc version 4.2.1. +- 120 - fix for compilation issues with gcc version 4.3. + +------------------------------------------------------------------------ +20080311 open-source release + +Changes (w.r.t. previous open-source release): + +- An enumerator added for pipeline filter types (serial vs. parallel). +- New task_scheduler_observer class introduced, to observe when + threads start and finish interacting with the TBB task scheduler. +- task_scheduler_init reverted to not use internal versioned class; + binary compatibility guaranteed with stable releases only. +- Various improvements to code, tests, examples and Makefiles. + +------------------------------------------------------------------------ +20080304 open-source release + +Changes (w.r.t. previous open-source release): + +- Task-to-thread affinity support, previously kept under a macro, + now fully legalized. +- Work-in-progress on cache_aligned_allocator improvements. +- Pipeline really supports parallel input stage; it's no more serialized. +- Various improvements to code, tests, examples and Makefiles. + +Bugs fixed: + +- 119 - fix for scalable_malloc sometimes failing to return a big block. +- TR575 - fixed a deadlock occurring on Windows in startup/shutdown + under some conditions. + +------------------------------------------------------------------------ +20080226 open-source release + +Changes (w.r.t. previous open-source release): + +- Introduced tbb_allocator to select between standard allocator and + tbb::scalable_allocator when available. +- Removed spin-waiting in pipeline and concurrent_queue. +- Improved performance of concurrent_hash_map by using tbb_allocator. +- Improved support for Intel(R) Thread Checker. +- Various improvements to code, tests, examples and Makefiles. + +------------------------------------------------------------------------ +Intel TBB 2.0 U2 commercial-aligned release (package 017, February 14, 2008) + +Corresponds to commercial 017 (for Linux*, 018; for Mac OS* X, 016) +packages. + +Changes (w.r.t. Intel TBB 2.0 U1 commercial-aligned release): + +- Does not contain open-source-release changes below; this release is + only a minor update of TBB 2.0 U1. +- Add support for Microsoft* Visual Studio* 2008, including binary + libraries and VS2008 projects for examples. +- Use SwitchToThread() not Sleep() to yield threads on Windows*. +- Enhancements to Doxygen-readable comments in source code. +- A few more small bug fixes from open-source releases below. + +Bugs fixed: + +- TR569 - Memory leak in concurrent_queue. + +------------------------------------------------------------------------ +20080207 open-source release + +Changes (w.r.t. previous open-source release): + +- Improvements and minor fixes in VS2008 projects for examples. +- Improvements in code for gating worker threads that wait for work, + previously consolidated under #if IMPROVED_GATING, now legalized. +- Cosmetic changes in code, examples, tests. + +Bugs fixed: + +- 113 - Iterators and ranges should be convertible to their const + counterparts. +- TR569 - Memory leak in concurrent_queue. + +------------------------------------------------------------------------ +20080122 open-source release + +Changes (w.r.t. previous open-source release): + +- Updated examples/parallel_for/seismic to improve the visuals and to + use the affinity_partitioner (20071127 and forward) for better + performance. +- Minor improvements to unittests and performance tests. + +------------------------------------------------------------------------ +20080115 open-source release + +Changes (w.r.t. previous open-source release): + +- Cleanup, simplifications and enhancements to the Makefiles for + building the libraries (see build/index.html for high-level + changes) and the examples. +- Use SwitchToThread() not Sleep() to yield threads on Windows*. +- Engineering work-in-progress on exception safety/support. +- Engineering work-in-progress on affinity_partitioner for + parallel_reduce. +- Engineering work-in-progress on improved gating for worker threads + (idle workers now block in the OS instead of spinning). +- Enhancements to Doxygen-readable comments in source code. + +Bugs fixed: + +- 102 - Support for parallel build with gmake -j +- 114 - /Wp64 build warning on Windows*. + +------------------------------------------------------------------------ +20071218 open-source release + +Changes (w.r.t. previous open-source release): + +- Full support for Microsoft* Visual Studio* 2008 in open-source. + Binaries for vc9/ will be available in future stable releases. +- New recursive_mutex class. +- Full support for 32-bit PowerMac including export files for builds. +- Improvements to parallel_do. + +------------------------------------------------------------------------ +20071206 open-source release + +Changes (w.r.t. previous open-source release): + +- Support for Microsoft* Visual Studio* 2008 in building libraries + from source as well as in vc9/ projects for examples. +- Small fixes to the affinity_partitioner first introduced in 20071127. +- Small fixes to the thread-stack size hook first introduced in 20071127. +- Engineering work in progress on concurrent_vector. +- Engineering work in progress on exception behavior. +- Unittest improvements. + +------------------------------------------------------------------------ +20071127 open-source release + +Changes (w.r.t. previous open-source release): + +- Task-to-thread affinity support (affinity partitioner) first appears. +- More work on concurrent_vector. +- New parallel_do algorithm (function-style version of parallel while) + and parallel_do/parallel_preorder example. +- New task_scheduler_init() hooks for getting default_num_threads() and + for setting thread stack size. +- Support for weak memory consistency models in the code base. +- Futex usage in the task scheduler (Linux). +- Started adding 32-bit PowerMac support. +- Intel(R) 9.1 compilers are now the base supported Intel(R) compiler + version. +- TBB libraries added to link line automatically on Microsoft Windows* + systems via #pragma comment linker directives. + +Open-source contributions integrated: + +- FreeBSD platform support patches. +- AIX weak memory model patch. + +Bugs fixed: + +- 108 - Removed broken affinity.h reference. +- 101 - Does not build on Debian Lenny (replaced arch with uname -m). + +------------------------------------------------------------------------ +20071030 open-source release + +Changes (w.r.t. previous open-source release): + +- More work on concurrent_vector. +- Better support for building with -Wall -Werror (or not) as desired. +- A few fixes to eliminate extraneous warnings. +- Begin introduction of versioning hooks so that the internal/API + version is tracked via TBB_INTERFACE_VERSION. The newest binary + libraries should always work with previously-compiled code when- + ever possible. +- Engineering work in progress on using futex inside the mutexes (Linux). +- Engineering work in progress on exception behavior. +- Engineering work in progress on a new parallel_do algorithm. +- Unittest improvements. + +------------------------------------------------------------------------ +20070927 open-source release + +Changes (w.r.t. Intel TBB 2.0 U1 commercial-aligned release): + +- Minor update to TBB 2.0 U1 below. +- Begin introduction of new concurrent_vector interfaces not released + with TBB 2.0 U1. + +------------------------------------------------------------------------ +Intel TBB 2.0 U1 commercial-aligned release (package 014, October 1, 2007) + +Corresponds to commercial 014 (for Linux*, 016) packages. + +Changes (w.r.t. Intel TBB 2.0 commercial-aligned release): + +- All open-source-release changes down to, and including, TBB 2.0 + below, were incorporated into this release. +- Made a number of changes to the officially supported OS list: + Added Linux* OSs: + Asianux* 3, Debian* 4.0, Fedora Core* 6, Fedora* 7, + Turbo Linux* 11, Ubuntu* 7.04; + Dropped Linux* OSs: + Asianux* 2, Fedora Core* 4, Haansoft* Linux 2006 Server, + Mandriva/Mandrake* 10.1, Miracle Linux* 4.0, + Red Flag* DC Server 5.0; + Only Mac OS* X 10.4.9 (and forward) and Xcode* tool suite 2.4.1 (and + forward) are now supported. +- Commercial installers on Linux* fixed to recommend the correct + binaries to use in more cases, with less unnecessary warnings. +- Changes to eliminate spurious build warnings. + +Open-source contributions integrated: + +- Two small header guard macro patches; it also fixed bug #94. +- New blocked_range3d class. + +Bugs fixed: + +- 93 - Removed misleading comments in task.h. +- 94 - See above. + +------------------------------------------------------------------------ +20070815 open-source release + +Changes: + +- Changes to eliminate spurious build warnings. +- Engineering work in progress on concurrent_vector allocator behavior. +- Added hooks to use the Intel(R) compiler code coverage tools. + +Open-source contributions integrated: + +- Mac OS* X build warning patch. + +Bugs fixed: + +- 88 - Fixed TBB compilation errors if both VS2005 and Windows SDK are + installed. + +------------------------------------------------------------------------ +20070719 open-source release + +Changes: + +- Minor update to TBB 2.0 commercial-aligned release below. +- Changes to eliminate spurious build warnings. + +------------------------------------------------------------------------ +Intel TBB 2.0 commercial-aligned release (package 010, July 19, 2007) + +Corresponds to commercial 010 (for Linux*, 012) packages. + +- TBB open-source debut release. + +------------------------------------------------------------------------ +Intel TBB 1.1 commercial release (April 10, 2007) + +Changes (w.r.t. Intel TBB 1.0 commercial release): + +- auto_partitioner which offered an automatic alternative to specifying + a grain size parameter to estimate the best granularity for tasks. +- The release was added to the Intel(R) C++ Compiler 10.0 Pro. + +------------------------------------------------------------------------ +Intel TBB 1.0 Update 2 commercial release + +Changes (w.r.t. Intel TBB 1.0 Update 1 commercial release): + +- Mac OS* X 64-bit support added. +- Source packages for commercial releases introduced. + +------------------------------------------------------------------------ +Intel TBB 1.0 Update 1 commercial-aligned release + +Changes (w.r.t. Intel TBB 1.0 commercial release): + +- Fix for critical package issue on Mac OS* X. + +------------------------------------------------------------------------ +Intel TBB 1.0 commercial release (August 29, 2006) + +Changes (w.r.t. Intel TBB 1.0 beta commercial release): + +- New namespace (and compatibility headers for old namespace). + Namespaces are tbb and tbb::internal and all classes are in the + underscore_style not the WindowsStyle. +- New class: scalable_allocator (and cache_aligned_allocator using that + if it exists). +- Added parallel_for/tacheon example. +- Removed C-style casts from headers for better C++ compliance. +- Bug fixes. +- Documentation improvements. +- Improved performance of the concurrent_hash_map class. +- Upgraded parallel_sort() to support STL-style random-access iterators + instead of just pointers. +- The Windows vs7_1 directories renamed to vs7.1 in examples. +- New class: spin version of reader-writer lock. +- Added push_back() interface to concurrent_vector(). + +------------------------------------------------------------------------ +Intel TBB 1.0 beta commercial release + +Initial release. + +Features / APIs: + +- Concurrent containers: ConcurrentHashTable, ConcurrentVector, + ConcurrentQueue. +- Parallel algorithms: ParallelFor, ParallelReduce, ParallelScan, + ParallelWhile, Pipeline, ParallelSort. +- Support: AlignedSpace, BlockedRange (i.e., 1D), BlockedRange2D +- Task scheduler with multi-master support. +- Atomics: read, write, fetch-and-store, fetch-and-add, compare-and-swap. +- Locks: spin, reader-writer, queuing, OS-wrapper. +- Memory allocation: STL-style memory allocator that avoids false + sharing. +- Timers. + +Tools Support: +- Intel(R) Thread Checker 3.0. +- Intel(R) Thread Profiler 3.0. + +Documentation: +- First Use Documents: README.txt, INSTALL.txt, Release_Notes.txt, + Doc_Index.html, Getting_Started.pdf, Tutorial.pdf, Reference.pdf. +- Class hierarchy HTML pages (Doxygen). +- Tree of index.html pages for navigating the installed package, esp. + for the examples. + +Examples: +- One for each of these TBB features: ConcurrentHashTable, ParallelFor, + ParallelReduce, ParallelWhile, Pipeline, Task. +- Live copies of examples from Getting_Started.pdf. +- TestAll example that exercises every class and header in the package + (i.e., a "liveness test"). +- Compilers: see Release_Notes.txt. +- APIs: OpenMP, WinThreads, Pthreads. + +Packaging: +- Package for Windows installs IA-32 and EM64T bits. +- Package for Linux installs IA-32, EM64T and IPF bits. +- Package for Mac OS* X installs IA-32 bits. +- All packages support Intel(R) software setup assistant (ISSA) and + install-time FLEXlm license checking. +- ISSA support allows license file to be specified directly in case of + no Internet connection or problems with IRC or serial #s. +- Linux installer allows root or non-root, RPM or non-RPM installs. +- FLEXlm license servers (for those who need floating/counted licenses) + are provided separately on Intel(R) Premier. + +------------------------------------------------------------------------ +Intel and Cilk are registered trademarks or trademarks of Intel Corporation or its +subsidiaries in the United States and other countries. + +* Other names and brands may be claimed as the property of others. diff --git a/deal.II/bundled/tbb41_20130401oss/COPYING b/deal.II/bundled/tbb41_20130401oss/COPYING new file mode 100644 index 0000000000..5af6ed874d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/COPYING @@ -0,0 +1,353 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. +---------------- END OF Gnu General Public License ---------------- + +The source code of Threading Building Blocks is distributed under version 2 +of the GNU General Public License, with the so-called "runtime exception," +as follows (or see any header or implementation file): + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. diff --git a/deal.II/bundled/tbb41_20130401oss/Makefile b/deal.II/bundled/tbb41_20130401oss/Makefile new file mode 100644 index 0000000000..8616ffc78a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/Makefile @@ -0,0 +1,88 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +tbb_root?=. +include $(tbb_root)/build/common.inc +.PHONY: default all tbb tbbmalloc tbbproxy test examples + +#workaround for non-depend targets tbb and tbbmalloc which both depend on version_string.ver +#According to documentation submakes should run in parallel +.NOTPARALLEL: tbb tbbmalloc tbbproxy + +default: tbb tbbmalloc $(if $(use_proxy),tbbproxy) + +all: tbb tbbmalloc tbbproxy test examples + +tbb: mkdir + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root) + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root) + +tbbmalloc: mkdir + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root) + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root) + +tbbproxy: mkdir + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy tbb_root=$(tbb_root) + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy tbb_root=$(tbb_root) + +test: tbb tbbmalloc $(if $(use_proxy),tbbproxy) + -$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test tbb_root=$(tbb_root) + -$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) + -$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test tbb_root=$(tbb_root) + -$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) + +rml: mkdir + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root) + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.rml cfg=release tbb_root=$(tbb_root) + + +examples: tbb tbbmalloc + $(MAKE) -C examples -r -f Makefile tbb_root=.. release test + +.PHONY: clean clean_examples mkdir info + +clean: clean_examples + $(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL)) + $(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL)) + $(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL)) + $(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL)) + @echo clean done + +clean_examples: + $(shell $(MAKE) -s -i -r -C examples -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL)) + +mkdir: + $(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL)) + $(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL)) + @echo Created $(work_dir)_release and ..._debug directories + +info: + @echo OS: $(tbb_os) + @echo arch=$(arch) + @echo compiler=$(compiler) + @echo runtime=$(runtime) + @echo tbb_build_prefix=$(tbb_build_prefix) + diff --git a/deal.II/bundled/tbb41_20130401oss/README b/deal.II/bundled/tbb41_20130401oss/README new file mode 100644 index 0000000000..67ab8ad2e0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/README @@ -0,0 +1,11 @@ +Threading Building Blocks - README + +See index.html for directions and documentation. + +If source is present (./Makefile and src/ directories), +type 'gmake' in this directory to build and test. + +See examples/index.html for runnable examples and directions. + +See http://threadingbuildingblocks.org for full documentation +and software information. diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/index.html b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/index.html new file mode 100644 index 0000000000..855518abd0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/index.html @@ -0,0 +1,24 @@ + + + +

Overview

+This directory contains the examples referenced by the Intel® Threading Building Blocks Getting Started Guide. + +

Directories

+
+
sub_string_finder +
Finds largest matching substrings. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile new file mode 100644 index 0000000000..167ed03066 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile @@ -0,0 +1,85 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=sub_string_finder_extended +ARGS= +LIGHT_PROG=sub_string_finder + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(offload), mic) +override CXXFLAGS += -opt-report-phase:offload -D__TBB_MIC_OFFLOAD=1 +endif + +ifeq (,$(filter icc icpc,$(CXX))) +TBBLIB = -ltbb +TBBLIB_DEBUG = -ltbb_debug +else +TBBLIB = -tbb +TBBLIB_DEBUG = -ltbb_debug +ifeq ($(offload), mic) +TBBLIB_DEBUG += -offload-option,mic,ld,"-ltbb_debug -L${TBBROOT}/lib/mic/" +endif +endif + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp +ifeq ($(offload),) + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp $(TBBLIB) $(LIBS) + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp $(TBBLIB) $(LIBS) +endif + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp $(TBBLIB) $(LIBS) + +debug: *.cpp +ifeq ($(offload),) + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o sub_string_finder sub_string_finder.cpp $(TBBLIB_DEBUG) $(LIBS) + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o sub_string_finder_pretty sub_string_finder_pretty.cpp $(TBBLIB_DEBUG) $(LIBS) +endif + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o sub_string_finder_extended sub_string_finder_extended.cpp $(TBBLIB_DEBUG) $(LIBS) + +clean: + $(RM) sub_string_finder sub_string_finder_extended sub_string_finder_pretty *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +light_test: + ./$(LIGHT_PROG) $(ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile.windows new file mode 100644 index 0000000000..39a49ac361 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/Makefile.windows @@ -0,0 +1,58 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs examples. +PROG=sub_string_finder_extended +ARGS= +LIGHT_PROG=sub_string_finder + +# The C++ compiler options +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) sub_string_finder.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder.exe + $(CXX) sub_string_finder_extended.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe + $(CXX) sub_string_finder_pretty.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe +debug: compiler_check + $(CXX) sub_string_finder.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder.exe + $(CXX) sub_string_finder_extended.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_extended.exe + $(CXX) sub_string_finder_pretty.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:sub_string_finder_pretty.exe +clean: + @cmd.exe /C del sub_string_finder*.exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +light_test: + $(LIGHT_PROG) $(ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/index.html b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/index.html new file mode 100644 index 0000000000..1015526731 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/index.html @@ -0,0 +1,67 @@ + + + +

Overview

+
+
A simple example that uses the parallel_for template in a substring matching program. For each position +in a string, the program displays the length of the largest matching substring elsewhere in the string. +The program also displays the location of a largest match for each position. Consider the string "babba" +as an example. Starting at position 0, "ba" is the largest substring with a match elsewhere in the +string (position 3). +
The code located in the sub_string_finder_extended.cpp file +demonstrates offload programming for Intel® Many Integrated Core (Intel® MIC) Architecture (see build instructions). +
+ +

Files

+
+
sub_string_finder.cpp +
The example as it appears in the Getting Started Guide. +
sub_string_finder_extended.cpp +
An example similar to the one in the Getting Started Guide, but with an added sequential + implementation, and with an offload region added that can be executed on Intel® MIC Architecture based coprocessor. + The three implementations are timed, by using tick_count, + and the speedup of the parallel version and + the speedup of the parallel version and, if applicable, the offload version is calculated and displayed. +
sub_string_finder_pretty.cpp +
An example similar to the one in the Getting Started Guide, but with more attractive printing of the results. +
Makefile +
Makefile for building example. +
+ +

Directories

+
+
msvs +
Contains Microsoft* Visual Studio* 2005 workspace for building and running the example (Windows* systems only). +
xcode +
Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
+ +

To Build

+General build directions can be found here. + +

Usage

+
+
sub_string_finder +
Runs the example as it appears in the Getting Started Guide. +
sub_string_finder_pretty +
Runs the similar example with more attractive printing of the results. +
sub_string_finder_extended +
Runs the example extended with a sequential implementation and an offload region that can be executed on Intel® MIC Architecture based coprocessor. +
To run a short version of this example, e.g., for use with Intel® Threading Tools: +
Build a debug version of the sub_string_finder_pretty example + (see the build directions). +
Run it, e.g., sub_string_finder_pretty. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.icproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.icproj new file mode 100644 index 0000000000..fb1bb7529c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.vcproj new file mode 100644 index 0000000000..97cc62e62c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder.vcproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_cl.sln new file mode 100644 index 0000000000..0054e4ff8f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_cl.sln @@ -0,0 +1,50 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sub_string_finder", "sub_string_finder.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A2525}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sub_string_finder_extended", "sub_string_finder_extended.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A2526}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sub_string_finder_pretty", "sub_string_finder_pretty.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A2524}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A26B588D-97F7-4466-9672-8A7E3173FBA1}" + ProjectSection(SolutionItems) = preProject + ..\index.html = ..\index.html + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.icproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.icproj new file mode 100644 index 0000000000..576e47390f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.vcproj new file mode 100644 index 0000000000..05175b27ca --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_extended.vcproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_icl.sln new file mode 100644 index 0000000000..5dcab35fe2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_icl.sln @@ -0,0 +1,74 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "sub_string_finder", "sub_string_finder.icproj", "{3929DD8E-420D-4360-BCBA-3C14C674EFC7}" +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "sub_string_finder_extended", "sub_string_finder_extended.icproj", "{BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}" +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "sub_string_finder_pretty", "sub_string_finder_pretty.icproj", "{8ADCDB85-B3E0-4376-9378-0C349F9E6140}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A26B588D-97F7-4466-9672-8A7E3173FBA1}" + ProjectSection(SolutionItems) = preProject + ..\index.html = ..\index.html + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Debug|Win32.ActiveCfg = Debug|Win32 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Debug|Win32.Build.0 = Debug|Win32 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Debug|x64.ActiveCfg = Debug|x64 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Debug|x64.Build.0 = Debug|x64 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Release|Win32.ActiveCfg = Release|Win32 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Release|Win32.Build.0 = Release|Win32 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Release|x64.ActiveCfg = Release|x64 + {3929DD8E-420D-4360-BCBA-3C14C674EFC7}.Release|x64.Build.0 = Release|x64 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Debug|Win32.ActiveCfg = Debug|Win32 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Debug|Win32.Build.0 = Debug|Win32 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Debug|x64.ActiveCfg = Debug|x64 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Debug|x64.Build.0 = Debug|x64 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Release|Win32.ActiveCfg = Release|Win32 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Release|Win32.Build.0 = Release|Win32 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Release|x64.ActiveCfg = Release|x64 + {BFF3077B-EB9A-4AF5-998B-7C1BA757C06F}.Release|x64.Build.0 = Release|x64 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Debug|Win32.ActiveCfg = Debug|Win32 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Debug|Win32.Build.0 = Debug|Win32 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Debug|x64.ActiveCfg = Debug|x64 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Debug|x64.Build.0 = Debug|x64 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Release|Win32.ActiveCfg = Release|Win32 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Release|Win32.Build.0 = Release|Win32 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Release|x64.ActiveCfg = Release|x64 + {8ADCDB85-B3E0-4376-9378-0C349F9E6140}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2525}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2526}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2524}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.icproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.icproj new file mode 100644 index 0000000000..a303820285 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.vcproj new file mode 100644 index 0000000000..527a11bb6f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/msvs/sub_string_finder_pretty.vcproj @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp new file mode 100644 index 0000000000..9dc3cccb61 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder.cpp @@ -0,0 +1,85 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include +#include +#include "tbb/parallel_for.h" +#include "tbb/blocked_range.h" + +using namespace tbb; +using namespace std; +static const size_t N = 23; + +class SubStringFinder { + const string str; + size_t *max_array; + size_t *pos_array; +public: + void operator() ( const blocked_range& r ) const { + for ( size_t i = r.begin(); i != r.end(); ++i ) { + size_t max_size = 0, max_pos = 0; + for (size_t j = 0; j < str.size(); ++j) + if (j != i) { + size_t limit = str.size()-max(i,j); + for (size_t k = 0; k < limit; ++k) { + if (str[i + k] != str[j + k]) break; + if (k > max_size) { + max_size = k; + max_pos = j; + } + } + } + max_array[i] = max_size; + pos_array[i] = max_pos; + } + } + SubStringFinder(string &s, size_t *m, size_t *p) : + str(s), max_array(m), pos_array(p) { } +}; + +int main() { + + string str[N] = { string("a"), string("b") }; + for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2]; + string &to_scan = str[N-1]; + size_t num_elem = to_scan.size(); + + size_t *max = new size_t[num_elem]; + size_t *pos = new size_t[num_elem]; + + parallel_for(blocked_range(0, num_elem ), + SubStringFinder( to_scan, max, pos ) ); + + for (size_t i = 0; i < num_elem; ++i) + cout << " " << max[i] << "(" << pos[i] << ")" << endl; + delete[] pos; + delete[] max; + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp new file mode 100644 index 0000000000..f7945d850e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_extended.cpp @@ -0,0 +1,171 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (push,target(mic)) +#endif // __TBB_MIC_OFFLOAD + +#include +#include +#include + +#include "tbb/parallel_for.h" +#include "tbb/blocked_range.h" +#include "tbb/tick_count.h" + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (pop) + +class __declspec(target(mic)) SubStringFinder; +#endif // __TBB_MIC_OFFLOAD + +using namespace tbb; +using namespace std; +static const size_t N = 22; + +void SerialSubStringFinder ( const string &str, size_t *max_array, size_t *pos_array) { + for ( size_t i = 0; i < str.size(); ++i ) { + size_t max_size = 0, max_pos = 0; + for (size_t j = 0; j < str.size(); ++j) + if (j != i) { + size_t limit = str.size()-( i > j ? i : j ); + for (size_t k = 0; k < limit; ++k) { + if (str[i + k] != str[j + k]) break; + if (k > max_size) { + max_size = k; + max_pos = j; + } + } + } + max_array[i] = max_size; + pos_array[i] = max_pos; + } +} + +class SubStringFinder { + const string str; + size_t *max_array; + size_t *pos_array; + public: + void operator() ( const blocked_range& r ) const { + for ( size_t i = r.begin(); i != r.end(); ++i ) { + size_t max_size = 0, max_pos = 0; + for (size_t j = 0; j < str.size(); ++j) + if (j != i) { + size_t limit = str.size()-( i > j ? i : j ); + for (size_t k = 0; k < limit; ++k) { + if (str[i + k] != str[j + k]) break; + if (k > max_size) { + max_size = k; + max_pos = j; + } + } + } + max_array[i] = max_size; + pos_array[i] = max_pos; + } + } + SubStringFinder(string &s, size_t *m, size_t *p) : + str(s), max_array(m), pos_array(p) { } +}; + +int main(int argc, char *argv[]) { + + + string str[N] = { string("a"), string("b") }; + for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2]; + string &to_scan = str[N-1]; + size_t num_elem = to_scan.size(); + + size_t *max = new size_t[num_elem]; + size_t *max2 = new size_t[num_elem]; + size_t *pos = new size_t[num_elem]; + size_t *pos2 = new size_t[num_elem]; + cout << " Done building string." << endl; + + + tick_count serial_t0 = tick_count::now(); + SerialSubStringFinder(to_scan, max2, pos2); + tick_count serial_t1 = tick_count::now(); + cout << " Done with serial version." << endl; + + tick_count parallel_t0 = tick_count::now(); + parallel_for(blocked_range(0, num_elem, 100), + SubStringFinder( to_scan, max, pos ) ); + tick_count parallel_t1 = tick_count::now(); + cout << " Done with parallel version." << endl; + + for (size_t i = 0; i < num_elem; ++i) { + if (max[i] != max2[i] || pos[i] != pos2[i]) { + cout << "ERROR: Serial and Parallel Results are Different!" << endl; + } + } + cout << " Done validating results." << endl; + + cout << "Serial version ran in " << (serial_t1 - serial_t0).seconds() << " seconds" << endl + << "Parallel version ran in " << (parallel_t1 - parallel_t0).seconds() << " seconds" << endl + << "Resulting in a speedup of " << (serial_t1 - serial_t0).seconds() / (parallel_t1 - parallel_t0).seconds() << endl; + +#if __TBB_MIC_OFFLOAD + // Do offloadable version. Do the timing on host. + size_t *max3 = new size_t[num_elem]; + size_t *pos3 = new size_t[num_elem]; + tick_count parallel_tt0 = tick_count::now(); + const char* to_scan_str = to_scan.c_str(); // Offload the string as a char array. + #pragma offload target(mic) in(num_elem) in(to_scan_str:length(num_elem)) out(max3,pos3:length(num_elem)) + { + string to_scan(to_scan_str, num_elem); // Reconstruct the string in offloadable region. + // Suboptimal performance because of making a copy from to_scan_str at creating to_scan. + parallel_for(blocked_range(0, num_elem, 100), + SubStringFinder( to_scan, max3, pos3 ) ); + } + tick_count parallel_tt1 = tick_count::now(); + cout << " Done with offloadable version." << endl; + + // Do validation of offloadable results on host. + for (size_t i = 0; i < num_elem; ++i) { + if (max3[i] != max2[i] || pos3[i] != pos2[i]) { + cout << "ERROR: Serial and Offloadable Results are Different!" << endl; + } + } + cout << " Done validating offloadable results." << endl; + + cout << "Offloadable version ran in " << (parallel_tt1 - parallel_tt0).seconds() << " seconds" << endl + << "Resulting in a speedup of " << (serial_t1 - serial_t0).seconds() / (parallel_tt1 - parallel_tt0).seconds() << " of offloadable version" << endl; + + delete[] max3; + delete[] pos3; +#endif // __TBB_MIC_OFFLOAD + + delete[] max; + delete[] pos; + delete[] max2; + delete[] pos2; + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp new file mode 100644 index 0000000000..dc5eeb3f76 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/sub_string_finder_pretty.cpp @@ -0,0 +1,98 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include +#include + +#include "tbb/parallel_for.h" +#include "tbb/blocked_range.h" + +using namespace tbb; +static const size_t N = 9; + +class SubStringFinder { + const std::string str; + size_t *max_array; + size_t *pos_array; + public: + void operator() ( const blocked_range& r ) const { + for ( size_t i = r.begin(); i != r.end(); ++i ) { + size_t max_size = 0, max_pos = 0; + for (size_t j = 0; j < str.size(); ++j) + if (j != i) { + size_t limit = str.size()-( i > j ? i : j ); + for (size_t k = 0; k < limit; ++k) { + if (str[i + k] != str[j + k]) break; + if (k+1 > max_size) { + max_size = k+1; + max_pos = j; + } + } + } + max_array[i] = max_size; + pos_array[i] = max_pos; + } + } + SubStringFinder(std::string &s, size_t *m, size_t *p) : + str(s), max_array(m), pos_array(p) { } +}; + +int main(int argc, char *argv[]) { + + + std::string str[N] = { std::string("a"), std::string("b") }; + for (size_t i = 2; i < N; ++i) str[i] = str[i-1]+str[i-2]; + std::string &to_scan = str[N-1]; + size_t num_elem = to_scan.size(); + std::cout << "String to scan: " << to_scan << std::endl; + + size_t *max = new size_t[num_elem]; + size_t *pos = new size_t[num_elem]; + + parallel_for(blocked_range(0, num_elem, 100), + SubStringFinder( to_scan, max, pos ) ); + + for (size_t i = 0; i < num_elem; ++i) { + for (size_t j = 0; j < num_elem; ++j) { + if (j >= i && j < i + max[i]) std::cout << "_"; + else std::cout << " "; + } + std::cout << std::endl << to_scan << std::endl; + + for (size_t j = 0; j < num_elem; ++j) { + if (j >= pos[i] && j < pos[i] + max[i]) std::cout << "*"; + else std::cout << " "; + } + std::cout << std::endl; + } + delete[] max; + delete[] pos; + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..9e28b39399 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/GettingStarted/sub_string_finder/xcode/sub_string_finder.xcodeproj/project.pbxproj @@ -0,0 +1,573 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A1F593A60B8F042A00073279 /* sub_string_finder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* sub_string_finder.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594120B8F1E0C00073279 /* sub_string_finder_pretty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F594110B8F1E0C00073279 /* sub_string_finder_pretty.cpp */; }; + A1F594130B8F1E1700073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594160B8F1E8000073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594240B8F1F5F00073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594250B8F1F6800073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594270B8F1F8100073279 /* sub_string_finder_extended.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F594260B8F1F8100073279 /* sub_string_finder_extended.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594140B8F1E2D00073279 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F594160B8F1E8000073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F5941D0B8F1F2D00073279 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F594250B8F1F6800073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8DD76F6C0486A84900D96B5E /* sub_string_finder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sub_string_finder; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* sub_string_finder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sub_string_finder.cpp; path = ../sub_string_finder.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; + A1F5940A0B8F1D8E00073279 /* sub_string_finder_pretty */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sub_string_finder_pretty; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F594110B8F1E0C00073279 /* sub_string_finder_pretty.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sub_string_finder_pretty.cpp; path = ../sub_string_finder_pretty.cpp; sourceTree = SOURCE_ROOT; }; + A1F5941B0B8F1F0900073279 /* sub_string_finder_extended */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = sub_string_finder_extended; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F594260B8F1F8100073279 /* sub_string_finder_extended.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = sub_string_finder_extended.cpp; path = ../sub_string_finder_extended.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594080B8F1D8E00073279 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F594130B8F1E1700073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594190B8F1F0900073279 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F594240B8F1F5F00073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* sub_string_finder */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = sub_string_finder; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A1F594260B8F1F8100073279 /* sub_string_finder_extended.cpp */, + A1F594110B8F1E0C00073279 /* sub_string_finder_pretty.cpp */, + A1F593A50B8F042A00073279 /* sub_string_finder.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* sub_string_finder */, + A1F5940A0B8F1D8E00073279 /* sub_string_finder_pretty */, + A1F5941B0B8F1F0900073279 /* sub_string_finder_extended */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* sub_string_finder */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "sub_string_finder" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = sub_string_finder; + productInstallPath = "$(HOME)/bin"; + productName = sub_string_finder; + productReference = 8DD76F6C0486A84900D96B5E /* sub_string_finder */; + productType = "com.apple.product-type.tool"; + }; + A1F594090B8F1D8E00073279 /* sub_string_finder_pretty */ = { + isa = PBXNativeTarget; + buildConfigurationList = A1F5940C0B8F1DB600073279 /* Build configuration list for PBXNativeTarget "sub_string_finder_pretty" */; + buildPhases = ( + A1F594070B8F1D8E00073279 /* Sources */, + A1F594080B8F1D8E00073279 /* Frameworks */, + A1F594140B8F1E2D00073279 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = sub_string_finder_pretty; + productName = sub_string_finder_pretty; + productReference = A1F5940A0B8F1D8E00073279 /* sub_string_finder_pretty */; + productType = "com.apple.product-type.tool"; + }; + A1F5941A0B8F1F0900073279 /* sub_string_finder_extended */ = { + isa = PBXNativeTarget; + buildConfigurationList = A1F5941F0B8F1F4E00073279 /* Build configuration list for PBXNativeTarget "sub_string_finder_extended" */; + buildPhases = ( + A1F594180B8F1F0900073279 /* Sources */, + A1F594190B8F1F0900073279 /* Frameworks */, + A1F5941D0B8F1F2D00073279 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = sub_string_finder_extended; + productName = sub_string_finder_extended; + productReference = A1F5941B0B8F1F0900073279 /* sub_string_finder_extended */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "sub_string_finder" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* sub_string_finder */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + A1F5941A0B8F1F0900073279 /* sub_string_finder_extended */, + A1F594090B8F1D8E00073279 /* sub_string_finder_pretty */, + 8DD76F620486A84900D96B5E /* sub_string_finder */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* sub_string_finder.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594070B8F1D8E00073279 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F594120B8F1E0C00073279 /* sub_string_finder_pretty.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594180B8F1F0900073279 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F594270B8F1F8100073279 /* sub_string_finder_extended.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; + A1F5940D0B8F1DB600073279 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_pretty; + ZERO_LINK = NO; + }; + name = Debug; + }; + A1F5940E0B8F1DB600073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_pretty; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F5940F0B8F1DB600073279 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_pretty; + ZERO_LINK = NO; + }; + name = Release; + }; + A1F594100B8F1DB600073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_pretty; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F594200B8F1F4E00073279 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_extended; + ZERO_LINK = NO; + }; + name = Debug; + }; + A1F594210B8F1F4E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_extended; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F594220B8F1F4E00073279 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_extended; + ZERO_LINK = NO; + }; + name = Release; + }; + A1F594230B8F1F4E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = sub_string_finder_extended; + ZERO_LINK = NO; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "sub_string_finder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "sub_string_finder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A1F5940C0B8F1DB600073279 /* Build configuration list for PBXNativeTarget "sub_string_finder_pretty" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1F5940D0B8F1DB600073279 /* Debug */, + A1F5940E0B8F1DB600073279 /* Debug64 */, + A1F5940F0B8F1DB600073279 /* Release */, + A1F594100B8F1DB600073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A1F5941F0B8F1F4E00073279 /* Build configuration list for PBXNativeTarget "sub_string_finder_extended" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1F594200B8F1F4E00073279 /* Debug */, + A1F594210B8F1F4E00073279 /* Debug64 */, + A1F594220B8F1F4E00073279 /* Release */, + A1F594230B8F1F4E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/Makefile new file mode 100644 index 0000000000..571783dfd4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/Makefile @@ -0,0 +1,156 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# This file should be always located and called in $(tbb_root)/examples + +# Usage: +# make [all] [clean] [release] [debug] [test] +# executes specified targets for all examples. +# make {example's dir}/{target} +# calls specified example with specified target. +# For instance: make task/tree_sum/all + +tbb_root?=.. +BUILDING_PHASE:=0 +include ../build/common.inc + +#check, if tbb_root is not absolute path (the filter keeps only /* paths) +ifeq ($(filter /% $(SLASH)%, $(subst :, ,$(tbb_root)) ),) + # also changes related variables like work_dir + override tbb_root := $(CWD)$(SLASH).. + export TBBROOT := $(tbb_root) +endif + +ifeq ($(tbb_os),windows) + ifeq ($(UNIXMODE),1) + EXAMPLE_MAKEFILE = Makefile + EXAMPLES = $(wildcard */*/$(EXAMPLE_MAKEFILE)) + ifeq ($(compiler),gcc) + override CXXFLAGS += -Wl,--enable-auto-import + endif + export CPATH := $(CPATH);$(tbb_root)/include + export LIBRARY_PATH := $(LIBRARY_PATH);$(work_dir)_release;$(work_dir)_debug + export RM = cmd /C del /Q /F + else + EXAMPLE_MAKEFILE = Makefile.windows + EXAMPLES = $(wildcard */*/$(EXAMPLE_MAKEFILE)) + EXAMPLE_MAKEFILE := $(if $(EXAMPLES),Makefile.windows,Makefile) + export INCLUDE := $(tbb_root)$(SLASH)include;$(INCLUDE) + export LIB := $(work_dir)_release;$(work_dir)_debug;$(LIB) + endif + work_dir := $(subst /,$(SLASH),$(work_dir)) + export PATH := $(work_dir)_release;$(work_dir)_debug;$(PATH) + export TBB_ARCH_PLATFORM = $(arch)\$(runtime) + export TBB_TARGET_ARCH = $(arch) +else + EXAMPLE_MAKEFILE = Makefile + EXAMPLES := $(wildcard */*/$(EXAMPLE_MAKEFILE)) + # platform-specific settings + ifeq ($(arch),ia64) + override CXXFLAGS += $(PIC_KEY) + endif + ifeq ($(subst suncc,gcc,$(compiler)),gcc) + ifeq ($(compiler),suncc) + override CXXFLAGS += -I$(tbb_root)$(SLASH)include -library=stlport4 -M$(tbb_root)/build/suncc.map.pause -erroff=unassigned,attrskipunsup,badargtype2w,badbinaryopw,wbadasg,wvarhidemem,wbadinit + endif + ifeq ($(arch),intel64) + override CXXFLAGS += -m64 + endif + ifeq ($(arch),ia32) + override CXXFLAGS += -m32 + endif + ifeq ($(arch),ppc64) + override CXXFLAGS += -m64 + endif + ifeq ($(arch),ppc32) + override CXXFLAGS += -m32 + endif + ifeq ($(arch),sparc) + override CXXFLAGS += -mcpu=v9 -m64 + endif + endif + ifeq ($(compiler),xl) + # -qsuppress=1540-0198 suppresses warnings like "1540-0198 (W) The omitted keyword "private" is assumed for base class "no_copy"." + # -qsuppress=1540-1401 suppresses warnings like "1540-1401 (I) An unknown "pragma ivdep" is specified." + override CXXFLAGS += -I$(tbb_root)$(SLASH)include -qsuppress=1540-0198:1540-1401 -L$(work_dir)_release -L$(work_dir)_debug + ifeq ($(arch),intel64) + override CXXFLAGS += -q64 + endif + ifeq ($(arch),ia32) + override CXXFLAGS += -q32 + endif + ifeq ($(arch),ppc64) + override CXXFLAGS += -q64 + endif + ifeq ($(arch),ppc32) + override CXXFLAGS += -q32 + endif + endif + ifeq ($(tbb_os),macos) + export DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):$(work_dir)_release:$(work_dir)_debug + else + export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):$(work_dir)_release:$(work_dir)_debug + ifeq ($(offload),mic) + mic_path=$(tbb_build_dir)$(SLASH)$(tbb_mic_build_prefix) + export MIC_LIBRARY_PATH := $(mic_path)_release:$(mic_path)_debug:$(MIC_LIBRARY_PATH) + export MIC_LD_LIBRARY_PATH := $(mic_path)_release:$(mic_path)_debug:$(MIC_LD_LIBRARY_PATH) + else + # -L necessary for non-native compilers which don't search $LIBRARY_PATH + override CXXFLAGS += -L$(work_dir)_release -L$(work_dir)_debug + endif + endif + export LIBS + export LIBRARY_PATH := $(LIBRARY_PATH):$(work_dir)_release:$(work_dir)_debug + export CPATH := $(CPATH):$(tbb_root)/include +endif + +COMMON_TARGETS := all clean release debug test perf_build perf_run +# list of directories of examples +EXAMPLES_DIRS := $(foreach T,$(EXAMPLES),$(dir $(T))) +# targets to explicitly call example have format: {example's dir}/{example's target} +EXAMPLES_TARGETS := $(foreach T,$(COMMON_TARGETS),$(addsuffix $(T),$(EXAMPLES_DIRS))) + +.PHONY: $(COMMON_TARGETS) $(EXAMPLES_TARGETS) + +.DEFAULT: all + +# execute standard targets for all examples +$(COMMON_TARGETS):: % : $(addsuffix %,$(EXAMPLES_DIRS)) + +# proxy rule for calling appropriate example +$(EXAMPLES_TARGETS):: + @echo -------------------------------------------------- + -$(MAKE) target="$(target)" SHELL=$(SHELL) -C $(@D) -f $(EXAMPLE_MAKEFILE) $(notdir $@) CXX="$(CPLUS)" CXXFLAGS="$(CXXFLAGS)" + +printenv: +ifeq ($(tbb_os),windows) + @cmd /C set PATH + @cmd /C set LIB + @cmd /C set INCLUDE +else + @env | grep PATH +endif + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/copy_libraries.bat b/deal.II/bundled/tbb41_20130401oss/examples/common/copy_libraries.bat new file mode 100644 index 0000000000..561b966515 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/copy_libraries.bat @@ -0,0 +1,74 @@ +@echo off +REM +REM Copyright 2005-2013 Intel Corporation. All Rights Reserved. +REM +REM This file is part of Threading Building Blocks. +REM +REM Threading Building Blocks is free software; you can redistribute it +REM and/or modify it under the terms of the GNU General Public License +REM version 2 as published by the Free Software Foundation. +REM +REM Threading Building Blocks is distributed in the hope that it will be +REM useful, but WITHOUT ANY WARRANTY; without even the implied warranty +REM of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with Threading Building Blocks; if not, write to the Free Software +REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +REM +REM As a special exception, you may use this file as part of a free software +REM library without restriction. Specifically, if other files instantiate +REM templates or use macros or inline functions from this file, or you compile +REM this file and link it with other files to produce an executable, this +REM file does not by itself cause the resulting executable to be covered by +REM the GNU General Public License. This exception does not however +REM invalidate any other reasons why the executable file might be covered by +REM the GNU General Public License. +REM + +:: Getting parameters +if ("%1") == ("") goto error +if ("%2") == ("") goto error +if ("%3") == ("") goto error +set arch=%1 +if ("%2") == ("debug") set postfix=_debug +set output_dir=%3 + +:: Optional 4th parameter to set install root +if ("%4") NEQ ("") set TBBROOT=%4 +:: Actually we can set install root by ourselves +if ("%TBBROOT%") == ("") set TBBROOT=%~d0%~p0..\..\ + +:: Getting vs folders in case vc_mt binaries are not provided +if ("%VS90COMNTOOLS%") NEQ ("") set vc_dir=vc9 +if ("%VS100COMNTOOLS%") NEQ ("") set vc_dir=vc10 +if ("%VS110COMNTOOLS%") NEQ ("") set vc_dir=vc11 + +:: Are we standalone/oss or inside compiler? +if exist "%TBBROOT%\bin\%arch%\vc9\tbb%postfix%.dll" set interim_path=bin\%arch% +if exist "%TBBROOT%\..\redist\%arch%\tbb\vc9\tbb%postfix%.dll" set interim_path=..\redist\%arch%\tbb +if ("%interim_path%") == ("") goto error + +:: Do we provide vc_mt binaries? +if exist "%TBBROOT%\%interim_path%\vc_mt\tbb%postfix%.dll" set vc_dir=vc_mt +if ("%vc_dir%") == ("") goto error + +:: We know everything we wanted and there are no errors +:: Copying binaries + +copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb%postfix%.dll" "%output_dir%" +copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb%postfix%.pdb" "%output_dir%" +copy "%TBBROOT%\%interim_path%\%vc_dir%\tbbmalloc%postfix%.dll" "%output_dir%" +copy "%TBBROOT%\%interim_path%\%vc_dir%\tbbmalloc%postfix%.pdb" "%output_dir%" +if exist "%TBBROOT%\%interim_path%\%vc_dir%\tbb_preview%postfix%.dll" copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb_preview%postfix%.dll" "%output_dir%" +if exist "%TBBROOT%\%interim_path%\%vc_dir%\tbb_preview%postfix%.pdb" copy "%TBBROOT%\%interim_path%\%vc_dir%\tbb_preview%postfix%.pdb" "%output_dir%" + +goto end +:error +echo Error occurred in libraries copying during post-build step. +exit /B 1 + +:end +exit /B 0 + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.gmake b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.gmake new file mode 100644 index 0000000000..f4a6ad2419 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.gmake @@ -0,0 +1,82 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# The C++ compiler +#CXX=g++ + +# detecting MS Windows (for MinGW support) +ifeq ($(OS), Windows_NT) +RM = cmd /C del /Q /F +RD = cmd /C rmdir +UI = con +EXE = $(NAME)$(SUFFIX).exe + +else +RM = rm -f +RD = rmdir -r + +# detecting 64-bit platform +arch ?= $(shell uname -m) +# Possible values of interest: intel64 x86_64 amd64 ia64 ppc64 sparc sparc64 +x64 ?= $(findstring 64,$(subst sparc,sparc64,$(arch))) + +# detecting UI ("mac", "x" or "con") +ifeq ($(shell uname),Darwin) +UI ?= mac +else +UI ?= $(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libX11.so -o -f /usr/lib$(x64)/libX11.so ] && echo x || echo con") +endif + +ifeq ($(UI),x) +EXE = $(NAME)$(SUFFIX) +UI_CXXFLAGS += -I/usr/X11R6/include +LIBS += -lpthread -L/usr/X11R6/lib$(x64) -lX11 +# detect if libXext can be found +ifeq ($(shell sh -c "[ -f /usr/X11R6/lib$(x64)/libXext.so -o -f /usr/lib$(x64)/libXext.so ] && echo 0"),0) +LIBS += -lXext +else # no libXext +UI_CXXFLAGS += -DX_NOSHMEM +endif # libXext + +else # ! X +ifeq ($(UI),mac) +CXX_UI?=g++ +LIBS += -framework OpenGL -framework Foundation -framework Cocoa +MACUISOURCES = ../../common/gui/xcode/tbbExample/OpenGLView.m ../../common/gui/xcode/tbbExample/main.m ../../common/gui/xcode/tbbExample/tbbAppDelegate.m +MACUIOBJS = OpenGLView.o main.o tbbAppDelegate.o +APPRES = $(NAME)$(SUFFIX).app/Contents/Resources +EXE = $(NAME)$(SUFFIX).app/Contents/MacOS/$(NAME)$(SUFFIX) + +else # ! Mac +UI = con +EXE = $(NAME)$(SUFFIX) +ifeq (file,$(origin UI)) +$(info Note: no graphics output capability detected; building for console output.) +endif + +endif # Mac +endif # X +endif # Windows vs. other diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.win b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.win new file mode 100644 index 0000000000..3ebbb4524a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/Makefile.win @@ -0,0 +1,82 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Per-build Makefile rules (for recursive $(MAKE) calls from Makefile) + +# Base compile/link options +MYCXXFLAGS = /nologo /EHsc /Zc:forScope /D WIN32 /D _MBCS /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLFLAGS = /link /incremental:no /fixed:no $(LFLAGS) +CXXFLAGS_NDEBUG = /MD /O2 /Ot /Gy /D NDEBUG +CXXFLAGS_DEBUG = /MDd /Od /Zi /D _DEBUG + +# Specify library directory for Direct X SDK +DDLIB_DIR=$(DXSDK_DIR)\lib\$(XARCH:AMD64=x64) + +# Input and output files +#SOURCE = v +#RCNAME = specified externaly +#EXE = ^ +# defaults on XARCH = x86 +UISRC = ../../common/gui/$(UI)video.cpp + +default: + +build_echo: + -@echo Building$(DEBUG) $(EXE) with UI=$(UI) XARCH=$(XARCH) + +build_one: build_echo build_$(UI)$(DEBUG) + +build_con: $(SOURCE) $(UISRC) compiler_check + $(CXX) $(CXXFLAGS_NDEBUG) $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) /subsystem:console /OUT:$(EXE) + @cmd.exe /C del *.obj + +build_con_debug: $(SOURCE) $(UISRC) compiler_check + $(CXX) $(CXXFLAGS_DEBUG) $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) /debug /subsystem:console /OUT:$(EXE) + @cmd.exe /C del *.obj + +build_gdi: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check + $(CXX) $(CXXFLAGS_NDEBUG) /D _WINDOWS $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) msvs/$(RCNAME).res /subsystem:windows /machine:$(XARCH) /OUT:$(EXE) + @cmd.exe /C del *.obj + +build_gdi_debug: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check + $(CXX) $(CXXFLAGS_DEBUG) /D _WINDOWS $(MYCXXFLAGS) $(SOURCE) $(UISRC) $(MYLFLAGS) msvs/$(RCNAME).res /debug /subsystem:windows /machine:$(XARCH) /OUT:$(EXE) + @cmd.exe /C del *.obj + +build_dd: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check + -@echo Using DirectX SDK from "$(DDLIB_DIR)" + $(CXX) $(CXXFLAGS_NDEBUG) /D _WINDOWS $(MYCXXFLAGS) /I "$(DXSDK_DIR)\include" $(SOURCE) $(UISRC) $(MYLFLAGS) /LIBPATH:"$(DDLIB_DIR)" msvs/$(RCNAME).res /subsystem:windows /machine:$(XARCH) /OUT:$(EXE) + @cmd.exe /C del *.obj + +build_dd_debug: $(SOURCE) $(UISRC) msvs/$(RCNAME).res compiler_check + -@echo Using DirectX SDK from "$(DDLIB_DIR)" + $(CXX) $(CXXFLAGS_DEBUG) /D _WINDOWS $(MYCXXFLAGS) /I "$(DXSDK_DIR)\include" $(SOURCE) $(UISRC) $(MYLFLAGS) /LIBPATH:"$(DDLIB_DIR)" msvs/$(RCNAME).res /debug /subsystem:windows /machine:$(XARCH) /OUT:$(EXE) + @cmd.exe /C del *.obj + +msvs/$(RCNAME).res: + rc /r msvs/$(RCNAME) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/convideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/convideo.cpp new file mode 100644 index 0000000000..74501c7696 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/convideo.cpp @@ -0,0 +1,138 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "video.h" +#include +#include + +unsigned int * g_pImg = 0; +int g_sizex, g_sizey; +static video *g_video = 0; +static int g_fps = 0; + +#if _WIN32 || _WIN64 + +static DWORD g_msec = 0; +#ifdef _WINDOWS +HINSTANCE video::win_hInstance = 0; +int video::win_iCmdShow = 0; +void video::win_set_class(WNDCLASSEX &wcex) { } +void video::win_load_accelerators(int idc) { } +#endif //_WINDOWS + +#else + +#include +#include +struct timeval g_time; + +#endif //_WIN32||_WIN64 + +video::video() + : red_mask(0xff0000), red_shift(16), green_mask(0xff00), + green_shift(8), blue_mask(0xff), blue_shift(0), depth(24) +{ + assert(g_video == 0); + g_video = this; title = "Video"; updating = calc_fps = false; +} + +bool video::init_window(int x, int y) +{ + g_sizex = x; g_sizey = y; + g_pImg = new unsigned int[x*y]; + running = true; + return false; +} + +bool video::init_console() +{ + running = true; + return true; +} + +void video::terminate() +{ + if(calc_fps) { + double fps = g_fps; +#if _WIN32 || _WIN64 + fps /= (GetTickCount()-g_msec)/1000.0; +#else + struct timezone tz; struct timeval end_time; gettimeofday(&end_time, &tz); + fps /= (end_time.tv_sec+1.0*end_time.tv_usec/1000000.0) - (g_time.tv_sec+1.0*g_time.tv_usec/1000000.0); +#endif + printf("%s: %.1f fps\n", title, fps); + } + g_video = 0; running = false; + if(g_pImg) { delete[] g_pImg; g_pImg = 0; } +} + +video::~video() +{ + if(g_video) terminate(); +} + +//! Count and display FPS count in titlebar +bool video::next_frame() +{ + if(calc_fps){ + if(!g_fps) { +#if _WIN32 || _WIN64 + g_msec = GetTickCount(); +#else + struct timezone tz; gettimeofday(&g_time, &tz); +#endif + } + g_fps++; + } + return running; +} + +//! Do standard loop +void video::main_loop() +{ + on_process(); +} + +//! Change window title +void video::show_title() +{ +} + +///////////////////////////////////////////// public methods of video class /////////////////////// + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) + : start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(24), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() {} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/d2dvideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/d2dvideo.cpp new file mode 100644 index 0000000000..109bb735f3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/d2dvideo.cpp @@ -0,0 +1,209 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// common Windows parts +#include "winvideo.h" + +// and another headers +#include +#include +#include +#if _DXSDK_PRODUCT_MAJOR < 9 +#error DXSDK Version 9 and above required. +#endif +#include +#include +#pragma comment(lib, "d2d1.lib") + +ID2D1Factory *m_pD2DFactory; +ID2D1HwndRenderTarget *m_pRenderTarget; +ID2D1Bitmap *m_pBitmap; +D2D1_SIZE_U bitmapSize; + +HANDLE g_hVSync; + +#include +#pragma comment(lib, "DxErr.lib") + +//! Create a dialog box and tell the user what went wrong +bool DisplayError(LPSTR lpstrErr, HRESULT hres) +{ + if(hres != S_OK){ + static bool InError = false; + int retval = 0; + if (!InError) + { + InError = true; + const char *message = hres?DXGetErrorString(hres):0; + retval = MessageBoxA(g_hAppWnd, lpstrErr, hres?message:"Error!", MB_OK|MB_ICONERROR); + InError = false; + } + } + return false; +} + +void DrawBitmap() +{ + HRESULT hr = S_OK; + if (m_pRenderTarget) { + m_pRenderTarget->BeginDraw(); + if (m_pBitmap) + hr = m_pBitmap->CopyFromMemory(NULL,(BYTE*)g_pImg, 4*g_sizex); + DisplayError( "DrawBitmap error", hr ); + m_pRenderTarget->DrawBitmap(m_pBitmap); + m_pRenderTarget->EndDraw(); + } + return; +} + +inline void mouse(int k, LPARAM lParam) +{ + int x = (int)LOWORD(lParam); + int y = (int)HIWORD(lParam); + RECT rc; + GetClientRect(g_hAppWnd, &rc); + g_video->on_mouse( x*g_sizex/(rc.right - rc.left), y*g_sizey/(rc.bottom - rc.top), k ); +} + +//! Win event processing function +LRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + switch (iMsg) + { + case WM_MOVE: + // Check to make sure our window exists before we tell it to repaint. + // This will fail the first time (while the window is being created). + if (hwnd) { + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 0L; + + case WM_SIZE: + case WM_PAINT: + if( g_video->running && g_video->updating ) { + DrawBitmap(); + Sleep(0); + } + break; + // Proccess all mouse and keyboard events + case WM_LBUTTONDOWN: mouse( 1, lParam ); break; + case WM_LBUTTONUP: mouse(-1, lParam ); break; + case WM_RBUTTONDOWN: mouse( 2, lParam ); break; + case WM_RBUTTONUP: mouse(-2, lParam ); break; + case WM_MBUTTONDOWN: mouse( 3, lParam ); break; + case WM_MBUTTONUP: mouse(-3, lParam ); break; + case WM_CHAR: g_video->on_key( (int)wParam); break; + + // some useless stuff + case WM_ERASEBKGND: return 1; // keeps erase-background events from happening, reduces chop + case WM_DISPLAYCHANGE: return 0; + + // Now, shut down the window... + case WM_DESTROY: PostQuitMessage(0); return 0; + } + // call user defined proc, if exists + return g_pUserProc? g_pUserProc(hwnd, iMsg, wParam, lParam) : DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +bool video::init_window(int sizex, int sizey) +{ + assert(win_hInstance != 0); + g_sizex = sizex; g_sizey = sizey; + if (!WinInit(win_hInstance, win_iCmdShow, gWndClass, title, false)) { + DisplayError("Unable to initialize the program's window."); + return false; + } + ShowWindow(g_hAppWnd, SW_SHOW); + g_pImg = new unsigned int[sizex*sizey]; + + HRESULT hr = S_OK; + + hr = D2D1CreateFactory(D2D1_FACTORY_TYPE_SINGLE_THREADED, &m_pD2DFactory); + // Create a Direct2D render target. + if (SUCCEEDED(hr) && !m_pRenderTarget){ + RECT rc; + GetClientRect(g_hAppWnd, &rc); + + bitmapSize = D2D1::SizeU( + rc.right - rc.left, + rc.bottom - rc.top + ); + + hr = m_pD2DFactory->CreateHwndRenderTarget( + D2D1::RenderTargetProperties(), + D2D1::HwndRenderTargetProperties(g_hAppWnd, bitmapSize), + &m_pRenderTarget + ); + if (SUCCEEDED(hr) && !m_pBitmap){ + D2D1_PIXEL_FORMAT pixelFormat = D2D1::PixelFormat( + DXGI_FORMAT_B8G8R8A8_UNORM, + D2D1_ALPHA_MODE_IGNORE + ); + D2D1_BITMAP_PROPERTIES bitmapProperties; + bitmapProperties.pixelFormat = pixelFormat; + m_pRenderTarget->GetDpi( &bitmapProperties.dpiX, &bitmapProperties.dpiY ); + m_pRenderTarget->CreateBitmap(bitmapSize,bitmapProperties,&m_pBitmap); + m_pRenderTarget->DrawBitmap(m_pBitmap); + } + } + + running = true; + return true; +} + +void video::terminate() +{ + if (m_pBitmap) m_pBitmap->Release(); + if (m_pRenderTarget) m_pRenderTarget->Release(); + if (m_pD2DFactory) m_pD2DFactory->Release(); + g_video = 0; running = false; + if(g_pImg) { delete[] g_pImg; g_pImg = 0; } +} + +//////////// drawing area constructor & destructor ///////////// + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) +: start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(24), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() +{ + if(g_video->updating) { + RECT r; + r.left = start_x; r.right = start_x + size_x; + r.top = start_y; r.bottom = start_y + size_y; + InvalidateRect(g_hAppWnd, &r, false); + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/ddvideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/ddvideo.cpp new file mode 100644 index 0000000000..10000f167c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/ddvideo.cpp @@ -0,0 +1,589 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// common Windows parts +#include "winvideo.h" + +#include +#if _DXSDK_PRODUCT_MAJOR >= 9 +// new implementation based on Direct2D +#include "d2dvideo.cpp" +#else // _DXSDK_PRODUCT_MAJOR >= 9 + +// and another headers +#include +#include +#include + +#pragma comment(lib, "ddraw.lib") +#pragma comment(lib, "dxguid.lib") + +LPDIRECTDRAW7 g_pDD = NULL; // DirectDraw object +LPDIRECTDRAWSURFACE7 g_pDDSPrimary = NULL;// DirectDraw primary surface +LPDIRECTDRAWSURFACE7 g_pDDSBack = NULL; // DirectDraw back surface +LPDIRECTDRAWSURFACE7 g_pDDSOverlay = NULL;// DirectDraw overlay surface +LPDIRECTDRAWCLIPPER g_pClipper = NULL; // DirectDraw clipping struct +DDOVERLAYFX g_OverlayFX; // DirectDraw overlay effects struct +DDCAPS g_DDCaps; // DirectDraw hardware capabilities struct +DWORD g_OverlayFlags = 0; // DirectDraw overlay flags variable +DWORD g_dwXRatio, + g_dwYRatio; // The ratios between the src and dst rects +RECT g_rcSrc = {0, 0, 0, 0}, + g_rcDst = {0, 0, 0, 0}; +HANDLE g_hVSync; + +// check for new DX SDK (8 & 9) +#ifdef DDSCAPS_PRIMARYSURFACELEFT +#include +#pragma comment(lib, "dxerr8.lib") +#else +// old SDK (7) +#include +#pragma comment(lib, "d3dx.lib") +#endif + +//! Create a dialog box and tell the user what went wrong +bool DisplayError(LPSTR lpstrErr, HRESULT hres) +{ + static bool InError = false; + int retval = 0; + if (!InError) + { + InError = true; +#ifdef DDSCAPS_PRIMARYSURFACELEFT + const char *message = hres?DXGetErrorString8A(hres):0; +#else + char message[256]; if(hres) D3DXGetErrorString(hres, 256, message); +#endif + retval = MessageBoxA(g_hAppWnd, lpstrErr, hres?message:"Error!", MB_OK|MB_ICONERROR); + InError = false; + } + return false; +} + +//! Releases the overlay surface +void DestroyOverlay() +{ + if (g_pClipper) + g_pClipper->Release(); + if (g_pDDSOverlay) { + g_pImg = 0; LPDIRECTDRAWSURFACE7 pDDSOverlay(g_pDDSOverlay); + g_pDDSOverlay = NULL; + YIELD_TO_THREAD(); + pDDSOverlay->Release(); // be sure nobody uses old value + } +} + +//! Releases the primary surface +void DestroyPrimary() +{ + if (g_pDDSPrimary) + { + g_pDDSPrimary->Release(); + g_pDDSPrimary = NULL; + } +} + +//! Releases core DirectDraw objects +void DestroyDDraw() +{ + DestroyPrimary(); + // Release the DDraw object + if (g_pDD) { + LPDIRECTDRAW7 pDD(g_pDD); // be sure nobody uses old value + g_pDD = NULL; Sleep(1); pDD->Release(); + } +} + +//! Checks and corrects all boundries for alignment and stretching +void CheckBoundries(void) +{ + // Make sure the coordinates fulfill the stretching requirements. Often + // the hardware will require a certain ammount of stretching to do + // overlays. This stretch factor is held in dwMinOverlayStretch as the + // stretch factor multiplied by 1000 (to keep an accuracy of 3 decimal places). + if ((g_DDCaps.dwCaps & DDCAPS_OVERLAYSTRETCH) && (g_DDCaps.dwMinOverlayStretch) + && (g_dwXRatio < g_DDCaps.dwMinOverlayStretch)) + { + g_rcDst.right = 2 * GetSystemMetrics(SM_CXSIZEFRAME) + g_rcDst.left + (g_sizex + * (g_DDCaps.dwMinOverlayStretch + 1)) / 1000; + SetWindowTextA(g_hAppWnd, "Window is too small!"); + } + else if ((g_DDCaps.dwCaps & DDCAPS_OVERLAYSTRETCH) && (g_DDCaps.dwMaxOverlayStretch) + && (g_dwXRatio > g_DDCaps.dwMaxOverlayStretch)) + { + g_rcDst.right = 2 * GetSystemMetrics(SM_CXSIZEFRAME) + g_rcDst.left + (g_sizey + * (g_DDCaps.dwMaxOverlayStretch + 999)) / 1000; + SetWindowTextA(g_hAppWnd, "Window is too large!"); + } + else if(!g_video->calc_fps) SetWindowText(g_hAppWnd, g_video->title); + + // Recalculate the ratio's for the upcoming calculations + g_dwXRatio = (g_rcDst.right - g_rcDst.left) * 1000 / (g_rcSrc.right - g_rcSrc.left); + g_dwYRatio = (g_rcDst.bottom - g_rcDst.top) * 1000 / (g_rcSrc.bottom - g_rcSrc.top); + + // Check to make sure we're within the screen's boundries, if not then fix + // the problem by adjusting the source rectangle which we draw from. + if (g_rcDst.left < 0) + { + g_rcSrc.left = -g_rcDst.left * 1000 / g_dwXRatio; + g_rcDst.left = 0; + } + if (g_rcDst.right > GetSystemMetrics(SM_CXSCREEN)) + { + g_rcSrc.right = g_sizex - ((g_rcDst.right - GetSystemMetrics(SM_CXSCREEN)) * 1000 / g_dwXRatio); + g_rcDst.right = GetSystemMetrics(SM_CXSCREEN); + } + if (g_rcDst.bottom > GetSystemMetrics(SM_CYSCREEN)) + { + g_rcSrc.bottom = g_sizey - ((g_rcDst.bottom - GetSystemMetrics(SM_CYSCREEN)) * 1000 / g_dwYRatio); + g_rcDst.bottom = GetSystemMetrics(SM_CYSCREEN); + } + // I don't know how useful this is... but just in case someone can do it - here's the check. + if (g_rcDst.top < 0) + { + g_rcSrc.top = -g_rcDst.top * 1000 / g_dwYRatio; + g_rcDst.top = 0; + } + + // Make sure the coordinates fulfill the alignment requirements + // these expressions (x & -y) just do alignment by dropping low order bits... + // so to round up, we add first, then truncate. + if ((g_DDCaps.dwCaps & DDCAPS_ALIGNBOUNDARYSRC) && g_DDCaps.dwAlignBoundarySrc) + g_rcSrc.left = (g_rcSrc.left + g_DDCaps.dwAlignBoundarySrc / 2) & -(signed) + (g_DDCaps.dwAlignBoundarySrc); + if ((g_DDCaps.dwCaps & DDCAPS_ALIGNSIZESRC) && g_DDCaps.dwAlignSizeSrc) + g_rcSrc.right = g_rcSrc.left + (g_rcSrc.right - g_rcSrc.left + g_DDCaps.dwAlignSizeSrc + / 2) & -(signed) (g_DDCaps.dwAlignSizeSrc); + if ((g_DDCaps.dwCaps & DDCAPS_ALIGNBOUNDARYDEST) && g_DDCaps.dwAlignBoundaryDest) + g_rcDst.left = (g_rcDst.left + g_DDCaps.dwAlignBoundaryDest / 2) & -(signed) + (g_DDCaps.dwAlignBoundaryDest); + if ((g_DDCaps.dwCaps & DDCAPS_ALIGNSIZEDEST) && g_DDCaps.dwAlignSizeDest) + g_rcDst.right = g_rcDst.left + (g_rcDst.right - g_rcDst.left) & -(signed) (g_DDCaps.dwAlignSizeDest); +} + +//! Get translated by system color value +DWORD DDColorMatch(IDirectDrawSurface7 * pdds, COLORREF rgb) +{ + COLORREF rgbT; + HDC hdc; + DWORD dw = CLR_INVALID; + DDSURFACEDESC2 ddsd; + HRESULT hres; + + // Use GDI SetPixel to color match for us + if (rgb != CLR_INVALID && pdds->GetDC(&hdc) == DD_OK) { + rgbT = GetPixel(hdc, 0, 0); // Save current pixel value + SetPixel(hdc, 0, 0, rgb); // Set our value + pdds->ReleaseDC(hdc); + } + // Now lock the surface so we can read back the converted color + ddsd.dwSize = sizeof(ddsd); + while ((hres = pdds->Lock(NULL, &ddsd, 0, NULL)) == DDERR_WASSTILLDRAWING) + YIELD_TO_THREAD(); + if (hres == DD_OK) { + dw = *(DWORD *) ddsd.lpSurface; // Get DWORD + if (ddsd.ddpfPixelFormat.dwRGBBitCount < 32) + dw &= (1 << ddsd.ddpfPixelFormat.dwRGBBitCount) - 1; // Mask it to bpp + pdds->Unlock(NULL); + } + else return DisplayError("Can't lock primary surface", hres); + // Now put the color that was there back. + if (rgb != CLR_INVALID && pdds->GetDC(&hdc) == DD_OK) { + SetPixel(hdc, 0, 0, rgbT); + pdds->ReleaseDC(hdc); + } + return dw; +} + +//! Load the bitmap and copy it to the overlay surface +bool DrawOverlay() +{ + HRESULT hRet; // This is where we put return values from DirectDraw. + DDSURFACEDESC2 surfDesc; + // Setup structure + memset(&surfDesc, 0, sizeof(surfDesc)); surfDesc.dwSize = sizeof(surfDesc); + + hRet = g_pDDSOverlay->Lock(NULL, &surfDesc, DDLOCK_SURFACEMEMORYPTR | DDLOCK_NOSYSLOCK | DDLOCK_WRITEONLY, NULL); + if (hRet != DD_OK || surfDesc.lpSurface == NULL) + return DisplayError("Can't lock overlay surface", hRet); + else { + g_pImg = (unsigned int *)surfDesc.lpSurface; + //g_pDDSOverlay->Unlock(NULL); is not needed? + } + // Setup effects structure + memset(&g_OverlayFX, 0, sizeof(g_OverlayFX)); g_OverlayFX.dwSize = sizeof(g_OverlayFX); + // Setup overlay flags. + g_OverlayFlags = DDOVER_SHOW; + // Check for destination color keying capability + if ((g_DDCaps.dwCKeyCaps & DDCKEYCAPS_DESTOVERLAY) && ((g_DDCaps.dwCaps & DDCAPS_OVERLAYCANTCLIP) || (g_DDCaps.dwCKeyCaps & DDCKEYCAPS_NOCOSTOVERLAY) )) + { + // If so, we'll use it to clip the bitmap when other windows go on top + // of us. Just for the record - this color range for color keying (the + // high/low values) are not heavily supported right now, so for almost + // all cards, just use the same color for both. + g_OverlayFX.dckDestColorkey.dwColorSpaceLowValue = + g_OverlayFX.dckDestColorkey.dwColorSpaceHighValue = DDColorMatch(g_pDDSPrimary, RGBKEY); + g_OverlayFlags |= DDOVER_DDFX | DDOVER_KEYDESTOVERRIDE; + } else { + // If not, we'll setup a clipper for the window. This will fix the + // problem on a few video cards - but the ones that don't shouldn't care. + hRet = g_pDD->CreateClipper(0, &g_pClipper, NULL); + if (hRet != DD_OK) + return DisplayError("Can't create clipper", hRet); + hRet = g_pClipper->SetHWnd(0, g_hAppWnd); + if (hRet != DD_OK) + return DisplayError("Can't attach clipper", hRet); + hRet = g_pDDSPrimary->SetClipper(g_pClipper); + if (hRet != DD_OK) + return DisplayError("Can't set clipper", hRet); + } + return true; +} + +//! Init the primary surface +bool DDPrimaryInit() +{ + HRESULT hRet; + DDSURFACEDESC2 ddsd; // A surface description structure + + // Create the primary surface. The primary surface is the full screen - + // since we're a windowed app - we'll just write to the portion of the + // screen within our window. + memset(&ddsd, 0, sizeof(ddsd)); // Set all fields of struct to 0 and set .dwSize to + ddsd.dwSize = sizeof(ddsd); // Sizeof the variable - these two steps required for most DDraw structs + ddsd.dwFlags = DDSD_CAPS; // Set flags for variables we're using... + ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; // Set the variables we said we would in dwFlags + hRet = g_pDD->CreateSurface(&ddsd, &g_pDDSPrimary, NULL); + if (hRet != DD_OK) + return DisplayError("Can't create primary surface", hRet); + return true; +} + +//! Init DirectDraw Stuff +bool DDInit() +{ + HRESULT hRet; + g_rcSrc.right = g_sizex; + g_rcSrc.bottom = g_sizey; + + hRet = DirectDrawCreateEx(NULL, (VOID**)&g_pDD, IID_IDirectDraw7, NULL); + if (hRet != DD_OK) + return DisplayError("Can't create DirectDraw7 instance", hRet); + + // Set cooperation level with other windows to be normal (ie. not full screen) + // You MUST set the cooperation level to be SOMETHING, for windowed apps use + // DDSCL_NORMAL, for full screen use: DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN. + hRet = g_pDD->SetCooperativeLevel(g_hAppWnd, DDSCL_NORMAL); + if (hRet != DD_OK) + return DisplayError("Can't set cooperative level", hRet); + return DDPrimaryInit(); +} + +//! Setup the overlay object +bool DDOverlayInit() +{ + // Get hardware's CAPabilitieS + memset(&g_DDCaps, 0, sizeof(g_DDCaps)); + g_DDCaps.dwSize = sizeof(g_DDCaps); + if (g_pDD->GetCaps(&g_DDCaps, 0)) + return DisplayError("Can't get capabilities"); + + // Make sure it supports overlays + if (!(g_DDCaps.dwCaps & DDCAPS_OVERLAY)) + return DisplayError("Hardware doesn't support overlays"); + + //DO NOT Make sure it supports stretching (scaling) + //if (!(g_DDCaps.dwCaps & DDCAPS_OVERLAYSTRETCH)) return false; + + DDSURFACEDESC2 ddsd; // DirectDraw surface descriptor + HRESULT hRet; // I'm not even going to try... + // The pixel formats that we want the surface to be in + DDPIXELFORMAT ddpfOverlayFormats[] = { + {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 32, 0xFF0000, 0x0FF00, 0x0000FF, 0}, // 32-bit RGB + {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x007C00, 0x003e0, 0x00001F, 0}, // 16-bit RGB 5:5:5 + {sizeof(DDPIXELFORMAT), DDPF_RGB, 0, 16, 0x00F800, 0x007e0, 0x00001F, 0}, // 16-bit RGB 5:6:5 + {sizeof(DDPIXELFORMAT), DDPF_FOURCC, mmioFOURCC('U','Y','V','Y'), 16, 0, 0, 0, 0}, // UYVY + {sizeof(DDPIXELFORMAT), DDPF_FOURCC, mmioFOURCC('Y','4','2','2'), 16, 0, 0, 0, 0}, // the same as UYVY + {sizeof(DDPIXELFORMAT), DDPF_FOURCC, mmioFOURCC('Y','U','Y','2'), 16, 0, 0, 0, 0}, // YUY2 is unsupported color-space here + {0}}; + + // Setup the overlay surface's attributes in the surface descriptor + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + ddsd.ddsCaps.dwCaps = DDSCAPS_OVERLAY | g_DDCaps.ddsCaps.dwCaps&DDSCAPS_VIDEOMEMORY; + ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; + ddsd.dwBackBufferCount = 0; + ddsd.dwWidth = g_sizex; + ddsd.dwHeight = g_sizey; + for(int format = 0; ddpfOverlayFormats[format].dwSize; format++) { + ddsd.ddpfPixelFormat = ddpfOverlayFormats[format]; + // Attempt to create the surface with theses settings + hRet = g_pDD->CreateSurface(&ddsd, &g_pDDSOverlay, NULL); + if(hRet == DD_OK) break; + } + if (hRet != DD_OK) + return DisplayError("Can't create appropriate overlay surface", hRet); + return true; +} + +inline void mouse(int k, LPARAM lParam) +{ + int x = (int)LOWORD(lParam), y = (int)HIWORD(lParam); + g_video->on_mouse( x*g_sizex/(g_rcDst.right - g_rcDst.left), + y*g_sizey/(g_rcDst.bottom - g_rcDst.top), k); +} + +LRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + PAINTSTRUCT ps; // Structure for the paint message + POINT p = {0, 0}; // Translation point for the window's client region + HRESULT hRet; + + switch (iMsg) + { + case WM_MOVE: + // Make sure we're not moving to be minimized - because otherwise + // our ratio varialbes (g_dwXRatio and g_dwYRatio) will end up + // being 0, and once we hit CheckBoundries it divides by 0. + if (!IsIconic(hwnd)) + { + g_rcSrc.left = 0; + g_rcSrc.right = g_sizex; + g_rcSrc.top = 0; + g_rcSrc.bottom = g_sizey; + GetClientRect(hwnd, &g_rcDst); + g_dwXRatio = (g_rcDst.right - g_rcDst.left) * 1000 / + (g_rcSrc.right - g_rcSrc.left); + g_dwYRatio = (g_rcDst.bottom - g_rcDst.top) * 1000 / + (g_rcSrc.bottom - g_rcSrc.top); + ClientToScreen(hwnd, &p); + g_rcDst.left = p.x; + g_rcDst.top = p.y; + g_rcDst.bottom += p.y; + g_rcDst.right += p.x; + CheckBoundries(); + } + else + // Else, hide the overlay... just in case we can't do + // destination color keying, this will pull the overlay + // off of the screen for the user. + if (g_pDDSOverlay && g_pDDSPrimary) + g_pDDSOverlay->UpdateOverlay(NULL, g_pDDSPrimary, NULL, DDOVER_HIDE, NULL); + // Check to make sure our window exists before we tell it to + // repaint. This will fail the first time (while the window is being created). + if (hwnd) + { + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 0L; + + case WM_SIZE: + // Another check for the minimization action. This check is + // quicker though... + if (wParam != SIZE_MINIMIZED) + { + GetClientRect(hwnd, &g_rcDst); + ClientToScreen(hwnd, &p); + g_rcDst.left = p.x; + g_rcDst.top = p.y; + g_rcDst.bottom += p.y; + g_rcDst.right += p.x; + g_rcSrc.left = 0; + g_rcSrc.right = g_sizex; + g_rcSrc.top = 0; + g_rcSrc.bottom = g_sizey; + // Here we multiply by 1000 to preserve 3 decimal places in the + // division opperation (we picked 1000 to be on the same order + // of magnitude as the stretch factor for easier comparisons) + g_dwXRatio = (g_rcDst.right - g_rcDst.left) * 1000 / + (g_rcSrc.right - g_rcSrc.left); + g_dwYRatio = (g_rcDst.bottom - g_rcDst.top) * 1000 / + (g_rcSrc.bottom - g_rcSrc.top); + CheckBoundries(); + } + return 0L; + + case WM_PAINT: + BeginPaint(hwnd, &ps); + // Check the primary surface to see if it's lost - if so you can + // pretty much bet that the other surfaces are also lost - thus + // restore EVERYTHING! If we got our surfaces stolen by a full + // screen app - then we'll destroy our primary - and won't be able + // to initialize it again. When we get our next paint message (the + // full screen app closed for example) we'll want to try to reinit + // the surfaces again - that's why there is a check for + // g_pDDSPrimary == NULL. The other option, is that our program + // went through this process, could init the primary again, but it + // couldn't init the overlay, that's why there's a third check for + // g_pDDSOverlay == NULL. Make sure that the check for + // !g_pDDSPrimary is BEFORE the IsLost call - that way if the + // pointer is NULL (ie. !g_pDDSPrimary is TRUE) - the compiler + // won't try to evaluate the IsLost function (which, since the + // g_pDDSPrimary surface is NULL, would be bad...). + if (!g_pDDSPrimary || (g_pDDSPrimary->IsLost() != DD_OK) || + (g_pDDSOverlay == NULL)) + { + DestroyOverlay(); + DestroyPrimary(); + if (DDPrimaryInit()) + if (DDOverlayInit()) + if (!DrawOverlay()) + DestroyOverlay(); + } + // UpdateOverlay is how we put the overlay on the screen. + if (g_pDDSOverlay && g_pDDSPrimary && g_video->updating) + { + hRet = g_pDDSOverlay->UpdateOverlay(&g_rcSrc, g_pDDSPrimary, + &g_rcDst, g_OverlayFlags, + &g_OverlayFX); +#ifdef _DEBUG + if(hRet != DD_OK) DisplayError("Can't update overlay", hRet); +#endif + } + EndPaint(hwnd, &ps); + return 0L; + + // process mouse and keyboard events + case WM_LBUTTONDOWN: mouse(1, lParam); break; + case WM_LBUTTONUP: mouse(-1, lParam); break; + case WM_RBUTTONDOWN: mouse(2, lParam); break; + case WM_RBUTTONUP: mouse(-2, lParam); break; + case WM_MBUTTONDOWN: mouse(3, lParam); break; + case WM_MBUTTONUP: mouse(-3, lParam); break; + case WM_CHAR: g_video->on_key(wParam); break; + + case WM_DISPLAYCHANGE: return 0L; + + case WM_DESTROY: + // Now, shut down the window... + PostQuitMessage(0); + return 0L; + } + return g_pUserProc? g_pUserProc(hwnd, iMsg, wParam, lParam) : DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +DWORD WINAPI thread_vsync(LPVOID lpParameter) +{ + BOOL vblank = false; + while(g_video && g_video->running) { + while(!vblank && g_video && g_video->running) { + YIELD_TO_THREAD(); + LPDIRECTDRAW7 pDD(g_pDD); + if(pDD) pDD->GetVerticalBlankStatus(&vblank); + } + LPDIRECTDRAWSURFACE7 pDDSOverlay(g_pDDSOverlay); + if(pDDSOverlay) pDDSOverlay->UpdateOverlay(&g_rcSrc, g_pDDSPrimary, &g_rcDst, g_OverlayFlags | DDOVER_REFRESHALL, &g_OverlayFX); + do { + Sleep(1); + LPDIRECTDRAW7 pDD(g_pDD); + if(pDD) pDD->GetVerticalBlankStatus(&vblank); + } while(vblank && g_video && g_video->running); + while(g_video && !g_video->updating && g_video->running) Sleep(10); + } + return 0; +} + +///////////////////////////////////////////// public methods of video class /////////////////////// + +inline void mask2bits(unsigned int mask, color_t &save, depth_t &shift) +{ + save = mask; if(!mask) { shift = 8; return; } + shift = 0; while(!(mask&1)) ++shift, mask >>= 1; + int bits = 0; while(mask&1) ++bits, mask >>= 1; + shift += bits - 8; +} + +bool video::init_window(int sizex, int sizey) +{ + assert(win_hInstance != 0); + g_sizex = sizex; g_sizey = sizey; + if( !WinInit(win_hInstance, win_iCmdShow, gWndClass, title, false) ) + return DisplayError("Unable to initialize the program's window."); + running = true; + if( !DDInit() ) { + DestroyDDraw(); + goto fail; + } + if( !DDOverlayInit() || !DrawOverlay() ) { + DestroyOverlay(); + DestroyDDraw(); + goto fail; + } + DDPIXELFORMAT PixelFormat; memset(&PixelFormat, 0, sizeof(PixelFormat)); PixelFormat.dwSize = sizeof(PixelFormat); + g_pDDSOverlay->GetPixelFormat(&PixelFormat); + mask2bits(PixelFormat.dwRBitMask, red_mask, red_shift); + mask2bits(PixelFormat.dwGBitMask, green_mask, green_shift); + mask2bits(PixelFormat.dwBBitMask, blue_mask, blue_shift); + if(PixelFormat.dwFlags == DDPF_RGB) + depth = depth_t(PixelFormat.dwRGBBitCount); + else depth = -depth_t(PixelFormat.dwFourCC); + for(int i = 0, e = sizex * sizey * PixelFormat.dwRGBBitCount / 32, c = get_color(0, 0, 0); i < e; i++) + g_pImg[i] = c; // clear surface + ShowWindow(g_hAppWnd, SW_SHOW); + g_hVSync = CreateThread ( + NULL, // LPSECURITY_ATTRIBUTES security_attrs + 0, // SIZE_T stacksize + (LPTHREAD_START_ROUTINE) thread_vsync, + this, // argument + 0, 0); + SetPriorityClass(g_hVSync, IDLE_PRIORITY_CLASS); // questionable + return true; +fail: + g_pImg = new unsigned int[g_sizex * g_sizey]; + return false; +} + +void video::terminate() +{ + running = false; + DestroyOverlay(); + if(WaitForSingleObject(g_hVSync, 100) == WAIT_TIMEOUT) TerminateThread(g_hVSync, 0); + CloseHandle(g_hVSync); + DestroyDDraw(); + if(g_pImg) delete[] g_pImg; + g_pImg = 0; g_video = 0; +} +//////////// drawing area constructor & destructor ///////////// + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) +: start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(g_video->depth), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(ptr32); assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() +{ +} + +#endif //_DXSDK_PRODUCT_MAJOR >= 9 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/dxcheck.bat b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/dxcheck.bat new file mode 100644 index 0000000000..231805dbc4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/dxcheck.bat @@ -0,0 +1,36 @@ +@echo off +REM +REM Copyright 2005-2013 Intel Corporation. All Rights Reserved. +REM +REM This file is part of Threading Building Blocks. +REM +REM Threading Building Blocks is free software; you can redistribute it +REM and/or modify it under the terms of the GNU General Public License +REM version 2 as published by the Free Software Foundation. +REM +REM Threading Building Blocks is distributed in the hope that it will be +REM useful, but WITHOUT ANY WARRANTY; without even the implied warranty +REM of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +REM GNU General Public License for more details. +REM +REM You should have received a copy of the GNU General Public License +REM along with Threading Building Blocks; if not, write to the Free Software +REM Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +REM +REM As a special exception, you may use this file as part of a free software +REM library without restriction. Specifically, if other files instantiate +REM templates or use macros or inline functions from this file, or you compile +REM this file and link it with other files to produce an executable, this +REM file does not by itself cause the resulting executable to be covered by +REM the GNU General Public License. This exception does not however +REM invalidate any other reasons why the executable file might be covered by +REM the GNU General Public License. +REM +if "%DXSDK_DIR%"=="" goto error_no_DXSDK +goto end + +:error_no_DXSDK +echo DirectX SDK Check : error : This example requires the DirectX SDK. Either (re)-install the DirectX SDK, or set the DXSDK_DIR environment variable to indicate where it is installed. + +:end + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/gdivideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/gdivideo.cpp new file mode 100644 index 0000000000..9c50595e91 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/gdivideo.cpp @@ -0,0 +1,154 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// common Windows parts +#include "winvideo.h" +// include GDI+ headers +#include +// and another headers +#include + +// tag linking library +#pragma comment(lib, "gdiplus.lib") + +// global specific variables +Gdiplus::Bitmap * g_pBitmap; // main drawing bitmap +ULONG_PTR gdiplusToken; +Gdiplus::GdiplusStartupInput gdiplusStartupInput;// GDI+ + +//! display system error +bool DisplayError(LPSTR lpstrErr, HRESULT hres) +{ + static bool InError = false; + int retval = 0; + if (!InError) + { + InError = true; + LPCSTR lpMsgBuf; + if(!hres) hres = GetLastError(); + FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, hres, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL ); + retval = MessageBox(g_hAppWnd, lpstrErr, lpMsgBuf, MB_OK|MB_ICONERROR); + LocalFree( (HLOCAL)lpMsgBuf ); + InError = false; + } + return false; +} + +//! Win event processing function +LRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam) +{ + switch (iMsg) + { + case WM_MOVE: + // Check to make sure our window exists before we tell it to repaint. + // This will fail the first time (while the window is being created). + if (hwnd) { + InvalidateRect(hwnd, NULL, FALSE); + UpdateWindow(hwnd); + } + return 0L; + + case WM_PAINT: + { + PAINTSTRUCT ps; + Gdiplus::Graphics graphics( BeginPaint(hwnd, &ps) ); + // redraw just requested area. This call is as fast as simple DrawImage() call. + if(g_video->updating) graphics.DrawImage(g_pBitmap, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.left, ps.rcPaint.top, + ps.rcPaint.right, ps.rcPaint.bottom, Gdiplus::UnitPixel); + EndPaint(hwnd, &ps); + } + return 0L; + + // Proccess all mouse and keyboard events + case WM_LBUTTONDOWN: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), 1); break; + case WM_LBUTTONUP: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), -1); break; + case WM_RBUTTONDOWN: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), 2); break; + case WM_RBUTTONUP: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), -2); break; + case WM_MBUTTONDOWN: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), 3); break; + case WM_MBUTTONUP: g_video->on_mouse( (int)LOWORD(lParam), (int)HIWORD(lParam), -3); break; + case WM_CHAR: g_video->on_key( (int)wParam); break; + + // some useless stuff + case WM_ERASEBKGND: return 1; // keeps erase-background events from happening, reduces chop + case WM_DISPLAYCHANGE: return 0; + + // Now, shut down the window... + case WM_DESTROY: PostQuitMessage(0); return 0; + } + // call user defined proc, if exists + return g_pUserProc? g_pUserProc(hwnd, iMsg, wParam, lParam) : DefWindowProc(hwnd, iMsg, wParam, lParam); +} + +///////////// video functions //////////////// + +bool video::init_window(int sizex, int sizey) +{ + assert(win_hInstance != 0); + g_sizex = sizex; g_sizey = sizey; + if (!WinInit(win_hInstance, win_iCmdShow, gWndClass, title, true)) { + DisplayError("Unable to initialize the program's window."); + return false; + } + ShowWindow(g_hAppWnd, SW_SHOW); + Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); + g_pImg = new unsigned int[sizex*sizey]; + g_pBitmap = new Gdiplus::Bitmap(g_sizex, g_sizey, 4*g_sizex, PixelFormat32bppRGB, (BYTE*)g_pImg ); + running = true; + return true; +} + +void video::terminate() +{ + if(g_pBitmap) { delete g_pBitmap; g_pBitmap = 0; } + Gdiplus::GdiplusShutdown(gdiplusToken); + g_video = 0; running = false; + if(g_pImg) { delete[] g_pImg; g_pImg = 0; } +} + +//////////// drawing area constructor & destructor ///////////// + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) +: start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(24), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() +{ + if(g_video->updating) { + RECT r; + r.left = start_x; r.right = start_x + size_x; + r.top = start_y; r.bottom = start_y + size_y; + InvalidateRect(g_hAppWnd, &r, false); + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/macvideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/macvideo.cpp new file mode 100644 index 0000000000..7fe7542a3d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/macvideo.cpp @@ -0,0 +1,166 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "video.h" +#include +#include +#include +#include + +unsigned int* g_pImg = 0; +int g_sizex=0, g_sizey=0; +static video *g_video = 0; +static int g_fps = 0; +char *window_title=NULL; +#define WINDOW_TITLE_SIZE 256 +int cocoa_update=0; + +#include +#include +struct timeval g_time; + +video::video() + : red_mask(0xff0000), red_shift(16), green_mask(0xff00), + green_shift(8), blue_mask(0xff), blue_shift(0), depth(24) +{ + assert(g_video == 0); + g_video = this; title = "Video"; cocoa_update=1; updating = true; calc_fps = false; +} + +bool video::init_window(int x, int y) +{ + g_sizex = x; g_sizey = y; + g_pImg = new unsigned int[x*y]; + if( window_title==NULL ) + window_title = (char*)malloc(WINDOW_TITLE_SIZE); + strncpy( window_title, title, WINDOW_TITLE_SIZE-1 ); + running = true; + return true; +} + +bool video::init_console() +{ + running = true; + return true; +} + +void video::terminate() +{ + if(calc_fps) { + double fps = g_fps; + struct timezone tz; struct timeval end_time; gettimeofday(&end_time, &tz); + fps /= (end_time.tv_sec+1.0*end_time.tv_usec/1000000.0) - (g_time.tv_sec+1.0*g_time.tv_usec/1000000.0); + printf("%s: %.1f fps\n", title, fps); + } + g_video = 0; running = false; + if(g_pImg) { delete[] g_pImg; g_pImg = 0; } +} + +video::~video() +{ + if(g_video) terminate(); +} + +//! Count and display FPS count in titlebar +bool video::next_frame() +{ + if(calc_fps){ + if(!g_fps) { + struct timezone tz; gettimeofday(&g_time, &tz); + } + g_fps++; + } + struct timezone tz; struct timeval now_time; gettimeofday(&now_time, &tz); + double sec=((now_time.tv_sec+1.0*now_time.tv_usec/1000000.0) - (g_time.tv_sec+1.0*g_time.tv_usec/1000000.0)); + if( sec>1 ){ + if(calc_fps) { + memcpy(&g_time, &now_time, sizeof(g_time)); + int fps; + fps = g_fps/sec; + cocoa_update = (int)updating; + snprintf(window_title,WINDOW_TITLE_SIZE, "%s%s: %d fps", title, updating?"":" (no updating)", int(fps)); + g_fps=0; + } + } + return running; +} + + +void* thread_func(void*) +{ + g_video->on_process(); + exit(EXIT_SUCCESS); +} + +extern "C" void on_mouse_func(int x, int y, int k) +{ + g_video->on_mouse(x, y, k); + return; +} + +extern "C" void on_key_func(int x) +{ + g_video->on_key(x); + return; +} + +extern "C" int cocoa_main( int argc, char *argv[] ); +//! Do standard loop +void video::main_loop() +{ + pthread_t handle; + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_create(&handle,&attr,&thread_func,(void*)NULL); + pthread_detach(handle); + cocoa_main( NULL, NULL ); +} + +//! Change window title +void video::show_title() +{ + strncpy( window_title, title, WINDOW_TITLE_SIZE ); + return; +} + +///////////////////////////////////////////// public methods of video class /////////////////////// + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) + : start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(24), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() +{ + //nothing to do, updating via timer in cocoa part. +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/video.h b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/video.h new file mode 100644 index 0000000000..e04158d24a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/video.h @@ -0,0 +1,244 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __VIDEO_H__ +#define __VIDEO_H__ + +#include +#if _MSC_VER +#include // for uintptr_t +#else +#include // for uintptr_t +#endif +#if _WIN32 || _WIN64 +#include +#else +#include +#endif + +typedef unsigned int color_t; +typedef unsigned char colorcomp_t; +typedef signed char depth_t; + +//! Class for getting access to drawing memory +class drawing_memory +{ +#ifdef __TBB_MIC_OFFLOAD + // The address is kept as uintptr_t since + // the compiler could not offload a pointer +#endif + uintptr_t my_address; +public: + depth_t pixel_depth; + int sizex, sizey; + //! Get drawing memory + inline char* get_address() const { return reinterpret_cast(my_address); } + //! Get drawing memory size + inline int get_size() const { return ((pixel_depth>16) ? 4:2) * sizex * sizey; } + //! Set drawing memory + inline void set_address(char *mem) { my_address = reinterpret_cast(mem); } + + friend class drawing_area; + friend class video; +}; + +//! Simple proxy class for managing of different video systems +class video +{ + //! colorspace information + depth_t depth, red_shift, green_shift, blue_shift; + color_t red_mask, green_mask, blue_mask; + friend class drawing_area; + +public: + //! Constructor + video(); + //! Destructor + ~video(); + //! member to set window name + const char *title; + //! true is enable to show fps + bool calc_fps; + //! if true: on windows fork processing thread for on_process(), on non-windows note that next_frame() is called concurrently. + bool threaded; + //! true while running within main_loop() + bool running; + //! if true, do gui updating + bool updating; + //! initialize graphical video system + bool init_window(int sizex, int sizey); + //! initialize console. returns true if console is available + bool init_console(); + //! terminate video system + void terminate(); + //! Do standard event & processing loop. Use threaded = true to separate event/updating loop from frame processing + void main_loop(); + //! Process next frame + bool next_frame(); + //! Change window title + void show_title(); + //! translate RGB components into packed type + inline color_t get_color(colorcomp_t red, colorcomp_t green, colorcomp_t blue) const; + //! Get drawing memory descriptor + inline drawing_memory get_drawing_memory() const; + + //! code of the ESCape key + static const int esc_key = 27; + //! Mouse events handler. + virtual void on_mouse(int x, int y, int key) { } + //! Mouse events handler. + virtual void on_key(int key) { } + //! Main processing loop. Redefine with your own + virtual void on_process() { while(next_frame()); } + +#ifdef _WINDOWS + //! Windows specific members + //! if VIDEO_WINMAIN isn't defined then set this just before init() by arguments of WinMain + static HINSTANCE win_hInstance; static int win_iCmdShow; + //! optionally call it just before init() to set own. Use ascii strings convention + void win_set_class(WNDCLASSEX &); + //! load and set accelerator table from resources + void win_load_accelerators(int idc); +#endif +}; + +//! Drawing class +class drawing_area +{ + const size_t base_index, max_index, index_stride; + const depth_t pixel_depth; + unsigned int * const ptr32; + size_t index; +public: + const int start_x, start_y, size_x, size_y; + //! constructors + drawing_area(int x, int y, int sizex, int sizey); + inline drawing_area(int x, int y, int sizex, int sizey, const drawing_memory &dmem); + //! destructor + inline ~drawing_area(); + //! update the image + void update(); + //! set current position. local_x could be bigger then size_x + inline void set_pos(int local_x, int local_y); + //! put pixel in current position with incremental address calculating to next right pixel + inline void put_pixel(color_t color); + //! draw pixel at position by packed color + void set_pixel(int localx, int localy, color_t color) + { set_pos(localx, localy); put_pixel(color); } +}; + +extern int g_sizex; +extern int g_sizey; +extern unsigned int *g_pImg; + +inline drawing_memory video::get_drawing_memory() const +{ + drawing_memory dmem; + dmem.pixel_depth = depth; + dmem.my_address = reinterpret_cast(g_pImg); + dmem.sizex = g_sizex; + dmem.sizey = g_sizey; + return dmem; +} + +inline color_t video::get_color(colorcomp_t red, colorcomp_t green, colorcomp_t blue) const +{ + if(red_shift == 16) // only for depth == 24 && red_shift > blue_shift + return (red<<16) | (green<<8) | blue; + else if(depth >= 24) + return (red< 0) { + register depth_t bs = blue_shift, rs = red_shift; + if(blue_shift < 0) blue >>= -bs, bs = 0; + else /*red_shift < 0*/ red >>= -rs, rs = 0; + return (red<2^16 + u = (2048 + (blue << 3) - (y >> 5)) >> 4; // (limit->2^12)>>4 + v = (2048 + (red << 3) - (y >> 5)) >> 4; + y = y >> 8; + return u | (y << 8) | (v << 16) | (y << 24); + } +} + +inline drawing_area::drawing_area(int x, int y, int sizex, int sizey, const drawing_memory &dmem) + : start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(dmem.pixel_depth), + base_index(y*dmem.sizex + x), max_index(dmem.sizex*dmem.sizey), index_stride(dmem.sizex), + ptr32(reinterpret_cast(dmem.my_address)) +{ + assert(x < dmem.sizex); assert(y < dmem.sizey); + assert(x+sizex <= dmem.sizex); assert(y+sizey <= dmem.sizey); + + index = base_index; // current index +} + +inline void drawing_area::set_pos(int local_x, int local_y) +{ + index = base_index + local_x + local_y*index_stride; +} + +inline void drawing_area::put_pixel(color_t color) +{ + assert(index < max_index); + if(pixel_depth > 16) ptr32[index++] = color; + else if(pixel_depth > 0) + ((unsigned short*)ptr32)[index++] = (unsigned short)color; + else { // UYVY colorspace + if(index&1) color >>= 16; + ((unsigned short*)ptr32)[index++] = (unsigned short)color; + } +} + +inline drawing_area::~drawing_area() +{ +#if ! __TBB_DEFINE_MIC + update(); +#endif +} + +#if defined(_WINDOWS) && (defined(VIDEO_WINMAIN) || defined(VIDEO_WINMAIN_ARGS) ) +#include +//! define WinMain for subsystem:windows. +#ifdef VIDEO_WINMAIN_ARGS +int main(int, char *[]); +#else +int main(); +#endif +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, PSTR szCmdLine, int iCmdShow) +{ + video::win_hInstance = hInstance; video::win_iCmdShow = iCmdShow; +#ifdef VIDEO_WINMAIN_ARGS + return main(__argc, __argv); +#else + return main(); +#endif +} +#endif + +#endif// __VIDEO_H__ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/winvideo.h b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/winvideo.h new file mode 100644 index 0000000000..2c66c6655a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/winvideo.h @@ -0,0 +1,291 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/////// Common internal implementation of Windows-specific stuff ////////////// +/////// Must be the first included header ////////////// + +#ifndef __WINVIDEO_H__ +#define __WINVIDEO_H__ + +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE +#endif +// Check that the target Windows version has all API calls requried. +#ifndef _WIN32_WINNT +# define _WIN32_WINNT 0x0400 +#endif +#if _WIN32_WINNT<0x0400 +# define YIELD_TO_THREAD() Sleep(0) +#else +# define YIELD_TO_THREAD() SwitchToThread() +#endif +#include "video.h" +#include +#include +#include +#include + +#pragma comment(lib, "gdi32.lib") +#pragma comment(lib, "user32.lib") + +// maximum mumber of lines the output console should have +static const WORD MAX_CONSOLE_LINES = 500; +const COLORREF RGBKEY = RGB(8, 8, 16); // at least 8 for 16-bit palette +HWND g_hAppWnd; // The program's window handle +HANDLE g_handles[2] = {0,0};// thread and wake up event +unsigned int * g_pImg = 0; // drawing memory +int g_sizex, g_sizey; +static video * g_video = 0; +WNDPROC g_pUserProc = 0; +HINSTANCE video::win_hInstance = 0; +int video::win_iCmdShow = 0; +static WNDCLASSEX * gWndClass = 0; +static HACCEL hAccelTable = 0; +static DWORD g_msec = 0; +static int g_fps = 0, g_updates = 0, g_skips = 0; + +bool DisplayError(LPSTR lpstrErr, HRESULT hres = 0); // always returns false +LRESULT CALLBACK InternalWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam); + +//! Create window +bool WinInit(HINSTANCE hInstance, int nCmdShow, WNDCLASSEX *uwc, const char *title, bool fixedsize) +{ + WNDCLASSEX wndclass; // Our app's windows class + if(uwc) { + memcpy(&wndclass, uwc, sizeof(wndclass)); + g_pUserProc = uwc->lpfnWndProc; + } else { + memset(&wndclass, 0, sizeof(wndclass)); + wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); + wndclass.lpszClassName = title; + } + wndclass.cbSize = sizeof(wndclass); + wndclass.hInstance = hInstance; + wndclass.lpfnWndProc = InternalWndProc; + wndclass.style |= CS_HREDRAW | CS_VREDRAW; + wndclass.hbrBackground = CreateSolidBrush(RGBKEY); + + if( !RegisterClassExA(&wndclass) ) return false; + int xaddend = GetSystemMetrics(fixedsize?SM_CXFIXEDFRAME:SM_CXFRAME)*2; + int yaddend = GetSystemMetrics(fixedsize?SM_CYFIXEDFRAME:SM_CYFRAME)*2 + GetSystemMetrics(SM_CYCAPTION); + if(wndclass.lpszMenuName) yaddend += GetSystemMetrics(SM_CYMENU); + + // Setup the new window's physical parameters - and tell Windows to create it + g_hAppWnd = CreateWindowA(wndclass.lpszClassName, // Window class name + title, // Window caption + !fixedsize ? WS_OVERLAPPEDWINDOW : // Window style + WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_MINIMIZEBOX, + CW_USEDEFAULT, // Initial x pos: use default placement + 0, // Initial y pos: not used here + g_sizex+xaddend,// Initial x size + g_sizey+yaddend,// Initial y size + NULL, // parent window handle + NULL, // window menu handle + hInstance, // program instance handle + NULL); // Creation parameters + return g_hAppWnd != NULL; +} + +//! create console window with redirection +static bool RedirectIOToConsole(void) +{ + int hConHandle; size_t lStdHandle; + CONSOLE_SCREEN_BUFFER_INFO coninfo; + FILE *fp; + // allocate a console for this app + AllocConsole(); + + // set the screen buffer to be big enough to let us scroll text + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); + coninfo.dwSize.Y = MAX_CONSOLE_LINES; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); + + // redirect unbuffered STDOUT to the console + lStdHandle = (size_t)GetStdHandle(STD_OUTPUT_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + if(hConHandle <= 0) return false; + fp = _fdopen( hConHandle, "w" ); + *stdout = *fp; + setvbuf( stdout, NULL, _IONBF, 0 ); + + // redirect unbuffered STDERR to the console + lStdHandle = (size_t)GetStdHandle(STD_ERROR_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + if(hConHandle > 0) { + fp = _fdopen( hConHandle, "w" ); + *stderr = *fp; + setvbuf( stderr, NULL, _IONBF, 0 ); + } + + // redirect unbuffered STDIN to the console + lStdHandle = (size_t)GetStdHandle(STD_INPUT_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + if(hConHandle > 0) { + fp = _fdopen( hConHandle, "r" ); + *stdin = *fp; + setvbuf( stdin, NULL, _IONBF, 0 ); + } + + // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog + // point to console as well + std::ios::sync_with_stdio(); + return true; +} + + +video::video() + : red_mask(0xff0000), red_shift(16), green_mask(0xff00), + green_shift(8), blue_mask(0xff), blue_shift(0), depth(24) +{ + assert(g_video == 0); + g_video = this; title = "Video"; running = threaded = calc_fps = false; updating = true; +} + +//! optionally call it just before init() to set own +void video::win_set_class(WNDCLASSEX &wcex) +{ + gWndClass = &wcex; +} + +void video::win_load_accelerators(int idc) +{ + hAccelTable = LoadAccelerators(win_hInstance, MAKEINTRESOURCE(idc)); +} + +bool video::init_console() +{ + if(RedirectIOToConsole()) { + if(!g_pImg && g_sizex && g_sizey) + g_pImg = new unsigned int[g_sizex * g_sizey]; + if(g_pImg) running = true; + return true; + } + return false; +} + +video::~video() +{ + if(g_video) terminate(); +} + +DWORD WINAPI thread_video(LPVOID lpParameter) +{ + video *v = (video*)lpParameter; + v->on_process(); + return 0; +} + +static bool loop_once(video *v) +{ + // screen update notify + if(int updates = g_updates) { + g_updates = 0; + if(g_video->updating) { g_skips += updates-1; g_fps++; } + else g_skips += updates; + UpdateWindow(g_hAppWnd); + } + // update fps + DWORD msec = GetTickCount(); + if(v->calc_fps && msec >= g_msec+1000) { + double sec = (msec - g_msec)/1000.0; + char buffer[256], n = _snprintf(buffer, 128, "%s: %d fps", v->title, int(double(g_fps + g_skips)/sec)); + if(g_skips) _snprintf(buffer+n, 128, " - %d skipped = %d updates", int(g_skips/sec), int(g_fps/sec)); + SetWindowTextA(g_hAppWnd, buffer); + g_msec = msec; g_skips = g_fps = 0; + } + // event processing, including painting + MSG msg; + if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)){ + if( msg.message == WM_QUIT ) { v->running = false; return false; } + if( !hAccelTable || !TranslateAccelerator(msg.hwnd, hAccelTable, &msg) ){ + TranslateMessage(&msg); + DispatchMessage(&msg); + } + return true; // try again + } + return false; +} + +//! Do standard event loop +void video::main_loop() +{ + // let Windows draw and unroll the window + InvalidateRect(g_hAppWnd, 0, false); + g_msec = GetTickCount(); // let's stay for 0,5 sec + while(g_msec + 500 > GetTickCount()) { loop_once(this); Sleep(1); } + g_msec = GetTickCount(); + // now, start main process + if(threaded) { + g_handles[0] = CreateThread ( + NULL, // LPSECURITY_ATTRIBUTES security_attrs + 0, // SIZE_T stacksize + (LPTHREAD_START_ROUTINE) thread_video, + this, // argument + 0, 0); + if(!g_handles[0]) { DisplayError("Can't create thread"); return; } + else // harmless race is possible here + g_handles[1] = CreateEvent(NULL, false, false, NULL); + while(running) { + while(loop_once(this)); + YIELD_TO_THREAD(); // give time for processing when running on single CPU + DWORD r = MsgWaitForMultipleObjects(2, g_handles, false, INFINITE, QS_ALLINPUT^QS_MOUSEMOVE); + if(r == WAIT_OBJECT_0) break; // thread terminated + } + running = false; + if(WaitForSingleObject(g_handles[0], 3000) == WAIT_TIMEOUT){ + // there was not enough time for graceful shutdown, killing the example with code 1. + exit(1); + } + if(g_handles[0]) CloseHandle(g_handles[0]); + if(g_handles[1]) CloseHandle(g_handles[1]); + g_handles[0] = g_handles[1] = 0; + } + else on_process(); +} + +//! Refresh screen picture +bool video::next_frame() +{ + if(!running) return false; + g_updates++; // Fast but inaccurate counter. The data race here is benign. + if(!threaded) while(loop_once(this)); + else if(g_handles[1]) { + SetEvent(g_handles[1]); + YIELD_TO_THREAD(); + } + return true; +} + +//! Change window title +void video::show_title() +{ + if(g_hAppWnd) + SetWindowTextA(g_hAppWnd, title); +} + +#endif //__WINVIDEO_H__ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/Info.plist b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/Info.plist new file mode 100644 index 0000000000..b2b5e0469a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/Info.plist @@ -0,0 +1,59 @@ + + + + + BuildMachineOSBuild + 11D50d + CFBundleDevelopmentRegion + en + CFBundleDisplayName + + CFBundleExecutable + tbbExample + CFBundleIdentifier + Intel.tbbExample + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + tbbExample + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + 4E1019 + DTPlatformVersion + GM + DTSDKBuild + 11D50a + DTSDKName + macosx10.7 + DTXcode + 0431 + DTXcodeBuild + 4E1019 + LSApplicationCategoryType + public.app-category.business + LSEnvironment + + DYLD_LIBRARY_PATH + Contents/Resources:.:../Resources:/tmp:$DYLD_LIBRARY_PATH + LIBRARY_PATH + Contents/Resources:.:../:/tmp:$DYLD_LIBRARY_PATH + + LSMinimumSystemVersion + 10.7 + NSHumanReadableCopyright + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.h b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.h new file mode 100644 index 0000000000..eddfbb2c80 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.h @@ -0,0 +1,44 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#import +#import + +@interface OpenGLView : NSOpenGLView{ + NSTimer *timer; +} + +@property (nonatomic,retain) NSTimer *timer; + +- (void) drawRect:(NSRect)start; +- (void) mouseDown:(NSEvent *)theEvent; +- (void) keyDown:(NSEvent *)theEvent; +- (BOOL) acceptsFirstResponder; +- (void) viewDidEndLiveResize; + +@end diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.m b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.m new file mode 100644 index 0000000000..fdd5d0d330 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/OpenGLView.m @@ -0,0 +1,93 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#import "OpenGLView.h" +#import +#import "tbbAppDelegate.h" + +// defined in macvideo.cpp +extern char* window_title; +extern int cocoa_update; +extern int g_sizex, g_sizey; +extern unsigned int *g_pImg; +void on_mouse_func(int x, int y, int k); +void on_key_func(int x); + +@implementation OpenGLView + +@synthesize timer; + +- (void) drawRect:(NSRect)start +{ + glWindowPos2i(0, (int)self.visibleRect.size.height); + glPixelZoom( (float)self.visibleRect.size.width /(float)g_sizex, + -(float)self.visibleRect.size.height/(float)g_sizey); + glDrawPixels(g_sizex, g_sizey, GL_BGRA_EXT, GL_UNSIGNED_INT_8_8_8_8_REV, g_pImg); + glFlush(); + + timer = [NSTimer scheduledTimerWithTimeInterval:0.03 target:self selector:@selector(update_window) userInfo:nil repeats:YES]; +} + +-(void) update_window{ + if( cocoa_update ) [self setNeedsDisplay:YES]; // TODO also clear cocoa_update? + if( window_title ) [_window setTitle:[NSString stringWithFormat:@"%s", window_title]]; +} + +-(void) keyDown:(NSEvent *)theEvent{ + on_key_func([theEvent.characters characterAtIndex:0]); +} + +-(void) mouseDown:(NSEvent *)theEvent{ + // mouse event for seismic and fractal + NSPoint point= theEvent.locationInWindow; + const int x = (int)point.x; + const int y = (int)point.y; + NSRect rect = self.visibleRect; + on_mouse_func(x*g_sizex/(int)rect.size.width,((int)rect.size.height-y)*g_sizey/(int)rect.size.height,1); + [self setNeedsDisplay:YES]; +} + +- (BOOL) acceptsFirstResponder +{ + return YES; +} + +- (void) rightMouseDown:(NSEvent *)theEvent +{ + return; +} + +-(void) viewDidEndLiveResize +{ + NSRect rect = self.visibleRect; + const int x=(int)rect.size.width; + const int y=(int)rect.size.height; + [_window setTitle:[NSString stringWithFormat:@"X=%d Y=%d", x,y]]; +} + +@end diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/PkgInfo b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/PkgInfo new file mode 100644 index 0000000000..bd04210fb4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings new file mode 100644 index 0000000000..477b28ff8f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.nib b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.nib new file mode 100644 index 0000000000..bbcd0057ed Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.nib differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib new file mode 100644 index 0000000000..14faab363f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/en.lproj/MainMenu.xib @@ -0,0 +1,291 @@ + + + + 1070 + 11D50d + 2182 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2182 + + + NSWindowTemplate + NSView + NSMenu + NSMenuItem + NSCustomObject + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + tbbExample + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + tbbExample + + + + Quit tbbExample + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + _NSMainMenu + + + 15 + 2 + {{100, 100}, {480, 360}} + 1148718080 + tbbExample + NSWindow + + + + + 4352 + {480, 360} + + + 2 + {1, 9} + {1, 1} + + {{0, 0}, {1280, 1002}} + {10000000000000, 10000000000000} + YES + + + tbbAppDelegate + + + NSFontManager + + + + + + + terminate: + + + + 449 + + + + delegate + + + + 495 + + + + window + + + + 532 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + 56 + + + + + + + + 57 + + + + + + + + 136 + + + + + 371 + + + + + + + + 372 + + + + + 420 + + + + + 494 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{380, 496}, {480, 360}} + + OpenGLView + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 539 + + + + + OpenGLView + NSOpenGLView + + IBProjectSource + ./Classes/OpenGLView.h + + + + tbbAppDelegate + NSObject + + saveAction: + id + + + saveAction: + + saveAction: + id + + + + window + NSWindow + + + window + + window + NSWindow + + + + IBProjectSource + ./Classes/tbbAppDelegate.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + YES + 3 + + {11, 11} + {10, 3} + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/main.m b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/main.m new file mode 100644 index 0000000000..303cea46dc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/main.m @@ -0,0 +1,34 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#import + +int cocoa_main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h new file mode 100644 index 0000000000..7c8c32e22f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.h @@ -0,0 +1,43 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// +// Created by Xcode* 4.3.2 +// + +#import + +@interface tbbAppDelegate : NSObject { + __unsafe_unretained NSWindow *_window; +} + +@property (assign) IBOutlet NSWindow *window; + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender; + +@end diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m new file mode 100644 index 0000000000..e6e65e953e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbAppDelegate.m @@ -0,0 +1,59 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// +// Created by Xcode* 4.3.2 +// + +#import "tbbAppDelegate.h" +#import + +@implementation tbbAppDelegate + +@synthesize window = _window; + +//declared in macvideo.cpp file +extern int g_sizex, g_sizey; + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + // Insert code here to initialize your application + NSRect windowSize; + windowSize.size.height = g_sizey; + windowSize.size.width = g_sizex; + windowSize.origin=_window.frame.origin; + [_window setFrame:windowSize display:YES]; + +} + +- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *) sender +{ + return YES; +} + +@end diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist new file mode 100644 index 0000000000..ed40bbc3cf --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + Intel.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + LSEnvironment + + DYLD_LIBRARY_PATH + Contents/Resources:.:../Resources:/tmp:$DYLD_LIBRARY_PATH + LIBRARY_PATH + Contents/Resources:.:../:/tmp:$DYLD_LIBRARY_PATH + + CFBundleDisplayName + + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.business + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch new file mode 100644 index 0000000000..0dd49f06cd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xcode/tbbExample/tbbExample-Prefix.pch @@ -0,0 +1,35 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// +// Prefix header for all source files of the 'tbbExample' target in the 'tbbExample' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xvideo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xvideo.cpp new file mode 100644 index 0000000000..0378b6ffe4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/gui/xvideo.cpp @@ -0,0 +1,387 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Uncomment next line to disable shared memory features if you do not have libXext +// (http://www.xfree86.org/current/mit-shm.html) +//#define X_NOSHMEM + +// Note that it may happen that the build environment supports the shared-memory extension +// (so there's no build-time reason to disable the relevant code by defining X_NOSHMEM), +// but that using shared memory still fails at run time. +// This situation will (ultimately) cause the error handler set by XSetErrorHandler() +// to be invoked with XErrorEvent::minor_code==X_ShmAttach. The code below tries to make +// such a determination at XShmAttach() time, which seems plausible, but unfortunately +// it has also been observed in a specific environment that the error may be reported +// at a later time instead, even after video::init_window() has returned. +// It is not clear whether this may happen in that way in any environment where it might +// depend on the kind of display, e.g., local vs. over "ssh -X", so #define'ing X_NOSHMEM +// may not always be the appropriate solution, therefore an environment variable +// has been introduced to disable shared memory at run time. +// A diagnostic has been added to advise the user about possible workarounds. +// X_ShmAttach macro was changed to 1 due to recent changes to X11/extensions/XShm.h header. + +#include "video.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef X_NOSHMEM +#include +#include +#include +#include + +static XShmSegmentInfo shmseginfo; +static Pixmap pixmap = 0; +static bool already_called_X_ShmAttach = false; +static bool already_advised_about_NOSHMEM_workarounds = false; +static const char* NOSHMEM_env_var_name = "TBB_EXAMPLES_X_NOSHMEM"; +#endif +static char *display_name = NULL; +static Display *dpy = NULL; +static Screen *scrn; +static Visual *vis; +static Colormap cmap; +static GC gc; +static Window win, rootW; +static int dispdepth = 0; +static XGCValues xgcv; +static XImage *ximage; +static int x_error = 0; +static int vidtype = 3; +int g_sizex, g_sizey; +static video *g_video = 0; +unsigned int *g_pImg = 0; +static int g_fps = 0; +struct timeval g_time; +static pthread_mutex_t g_mutex = PTHREAD_MUTEX_INITIALIZER; +Atom _XA_WM_DELETE_WINDOW = 0;// like in Xatom.h + +///////////////////////////////////////////// public methods of video class /////////////////////// + +video::video() +{ + assert(g_video == 0); + g_video = this; title = "Video"; calc_fps = running = false; updating = true; +} + +inline void mask2bits(unsigned int mask, unsigned int &save, depth_t &shift) +{ + save = mask; if(!mask) { shift = dispdepth/3; return; } + shift = 0; while(!(mask&1)) ++shift, mask >>= 1; + int bits = 0; while(mask&1) ++bits, mask >>= 1; + shift += bits - 8; +} + +int xerr_handler(Display* dpy_, XErrorEvent *error) +{ + x_error = error->error_code; + if(g_video) g_video->running = false; +#ifndef X_NOSHMEM + if (error->minor_code==1/*X_ShmAttach*/ && already_called_X_ShmAttach && !already_advised_about_NOSHMEM_workarounds) + { + char err[256]; XGetErrorText(dpy_, x_error, err, 255); + fprintf(stderr, "Warning: Can't attach shared memory to display: %s (%d)\n", err, x_error); + fprintf(stderr, "If you are seeing a black output window, try setting %s environment variable to 1" + " to disable shared memory extensions (0 to re-enable, other values undefined)," + " or rebuilding with X_NOSHMEM defined in " __FILE__ "\n", NOSHMEM_env_var_name); + already_advised_about_NOSHMEM_workarounds = true; + } +#else + (void) dpy_; // warning prevention +#endif + return 0; +} + +bool video::init_window(int xsize, int ysize) +{ + { //enclose local variables before fail label + g_sizex = xsize; g_sizey = ysize; + + // Open the display + if (!dpy) { + dpy = XOpenDisplay(display_name); + if (!dpy) { + fprintf(stderr, "Can't open X11 display %s\n", XDisplayName(display_name)); + goto fail; + } + } + int theScreen = DefaultScreen(dpy); + scrn = ScreenOfDisplay(dpy, theScreen); + dispdepth = DefaultDepth(dpy, theScreen); + XVisualInfo vinfo; + if (!( (dispdepth >= 15 && dispdepth <= 32 && XMatchVisualInfo(dpy, theScreen, dispdepth, TrueColor, &vinfo) ) + || XMatchVisualInfo(dpy, theScreen, 24, TrueColor, &vinfo) + || XMatchVisualInfo(dpy, theScreen, 32, TrueColor, &vinfo) + || XMatchVisualInfo(dpy, theScreen, 16, TrueColor, &vinfo) + || XMatchVisualInfo(dpy, theScreen, 15, TrueColor, &vinfo) + )) { + fprintf(stderr, "Display has no appropriate True Color visual\n"); + goto fail; + } + vis = vinfo.visual; + depth = dispdepth = vinfo.depth; + mask2bits(vinfo.red_mask, red_mask, red_shift); + mask2bits(vinfo.green_mask, green_mask, green_shift); + mask2bits(vinfo.blue_mask, blue_mask, blue_shift); + rootW = RootWindow(dpy, theScreen); + cmap = XCreateColormap(dpy, rootW, vis, AllocNone); + XSetWindowAttributes attrs; + attrs.backing_store = Always; + attrs.colormap = cmap; + attrs.event_mask = StructureNotifyMask|KeyPressMask|ButtonPressMask|ButtonReleaseMask; + attrs.background_pixel = BlackPixelOfScreen(scrn); + attrs.border_pixel = WhitePixelOfScreen(scrn); + win = XCreateWindow(dpy, rootW, + 0, 0, xsize, ysize, 2, + dispdepth, InputOutput, vis, + CWBackingStore | CWColormap | CWEventMask | + CWBackPixel | CWBorderPixel, + &attrs); + if(!win) { + fprintf(stderr, "Can't create the window\n"); + goto fail; + } + XSizeHints sh; + sh.flags = PSize | PMinSize | PMaxSize; + sh.width = sh.min_width = sh.max_width = xsize; + sh.height = sh.min_height = sh.max_height = ysize; + XSetStandardProperties( dpy, win, g_video->title, g_video->title, None, NULL, 0, &sh ); + _XA_WM_DELETE_WINDOW = XInternAtom(dpy, "WM_DELETE_WINDOW", false); + XSetWMProtocols(dpy, win, &_XA_WM_DELETE_WINDOW, 1); + gc = XCreateGC(dpy, win, 0L, &xgcv); + XMapRaised(dpy, win); + XFlush(dpy); +#ifdef X_FULLSYNC + XSynchronize(dpy, true); +#endif + XSetErrorHandler(xerr_handler); + + int imgbytes = xsize*ysize*(dispdepth<=16?2:4); + const char *vidstr; +#ifndef X_NOSHMEM + int major, minor, pixmaps; + if(XShmQueryExtension(dpy) && + XShmQueryVersion(dpy, &major, &minor, &pixmaps)) + { // Shared memory + if(NULL!=getenv(NOSHMEM_env_var_name) && 0!=strcmp("0",getenv(NOSHMEM_env_var_name))) { + goto generic; + } + shmseginfo.shmid = shmget(IPC_PRIVATE, imgbytes, IPC_CREAT|0777); + if(shmseginfo.shmid < 0) { + fprintf(stderr, "Warning: Can't get shared memory: %s\n", strerror(errno)); + goto generic; + } + g_pImg = (unsigned int*)(shmseginfo.shmaddr = (char*)shmat(shmseginfo.shmid, 0, 0)); + if(g_pImg == (unsigned int*)-1) { + fprintf(stderr, "Warning: Can't attach to shared memory: %s\n", strerror(errno)); + shmctl(shmseginfo.shmid, IPC_RMID, NULL); + goto generic; + } + shmseginfo.readOnly = false; + if(!XShmAttach(dpy, &shmseginfo) || x_error) { + char err[256]; XGetErrorText(dpy, x_error, err, 255); + fprintf(stderr, "Warning: Can't attach shared memory to display: %s (%d)\n", err, x_error); + shmdt(shmseginfo.shmaddr); shmctl(shmseginfo.shmid, IPC_RMID, NULL); + goto generic; + } + already_called_X_ShmAttach = true; + +#ifndef X_NOSHMPIX + if(pixmaps && XShmPixmapFormat(dpy) == ZPixmap) + { // Pixmaps + vidtype = 2; vidstr = "X11 shared memory pixmap"; + pixmap = XShmCreatePixmap(dpy, win, (char*)g_pImg, &shmseginfo, xsize, ysize, dispdepth); + XSetWindowBackgroundPixmap(dpy, win, pixmap); + } else +#endif//!X_NOSHMPIX + { // Standard + vidtype = 1; vidstr = "X11 shared memory"; + ximage = XShmCreateImage(dpy, vis, dispdepth, + ZPixmap, 0, &shmseginfo, xsize, ysize); + if(!ximage) { + fprintf(stderr, "Can't create the shared image\n"); + goto fail; + } + assert(ximage->bytes_per_line == xsize*(dispdepth<=16?2:4)); + ximage->data = shmseginfo.shmaddr; + } + } else +#endif + { +#ifndef X_NOSHMEM +generic: +#endif + vidtype = 0; vidstr = "generic X11"; + g_pImg = new unsigned int[imgbytes/sizeof(int)]; + ximage = XCreateImage(dpy, vis, dispdepth, ZPixmap, 0, (char*)g_pImg, xsize, ysize, 32, imgbytes/ysize); + if(!ximage) { + fprintf(stderr, "Can't create the image\n"); + goto fail; + } + } + printf("Note: using %s with %s visual for %d-bit color depth\n", vidstr, vis==DefaultVisual(dpy, theScreen)?"default":"non-default", dispdepth); + running = true; + return true; + } // end of enclosing local variables +fail: + terminate(); init_console(); + return false; +} + +bool video::init_console() +{ + if(!g_pImg && g_sizex && g_sizey) { + dispdepth = 24; red_shift = 16; vidtype = 3; // fake video + g_pImg = new unsigned int[g_sizex*g_sizey]; + running = true; + } + return true; +} + +void video::terminate() +{ + running = false; + if(dpy) { + vidtype = 3; // stop video + if(threaded) { pthread_mutex_lock(&g_mutex); pthread_mutex_unlock(&g_mutex); } + if(ximage) { XDestroyImage(ximage); ximage = 0; g_pImg = 0; } // it frees g_pImg for vidtype == 0 +#ifndef X_NOSHMEM + if(pixmap) XFreePixmap(dpy, pixmap); + if(shmseginfo.shmaddr) { XShmDetach(dpy, &shmseginfo); shmdt(shmseginfo.shmaddr); g_pImg = 0; } + if(shmseginfo.shmid >= 0) shmctl(shmseginfo.shmid, IPC_RMID, NULL); +#endif + if(gc) XFreeGC(dpy, gc); + if(win) XDestroyWindow(dpy, win); + XCloseDisplay(dpy); dpy = 0; + } + if(g_pImg) { delete[] g_pImg; g_pImg = 0; } // if was allocated for console mode +} + +video::~video() +{ + if(g_video) terminate(); + g_video = 0; +} + +//! Do standard event loop +void video::main_loop() +{ + struct timezone tz; gettimeofday(&g_time, &tz); + on_process(); +} + +//! Check for pending events once +bool video::next_frame() +{ + if(!running) return false; + //! try acquire mutex if threaded code, returns on failure + if(vidtype == 3 || threaded && pthread_mutex_trylock(&g_mutex)) + return running; + //! Refresh screen picture + g_fps++; +#ifndef X_NOSHMPIX + if(vidtype == 2 && updating) XClearWindow(dpy, win); +#endif + while( XPending(dpy) ) { + XEvent report; XNextEvent(dpy, &report); + switch( report.type ) { + case ClientMessage: + if(report.xclient.format != 32 || report.xclient.data.l[0] != _XA_WM_DELETE_WINDOW) break; + case DestroyNotify: + running = false; + case KeyPress: + on_key( XLookupKeysym(&report.xkey, 0) ); break; + case ButtonPress: + on_mouse( report.xbutton.x, report.xbutton.y, report.xbutton.button ); break; + case ButtonRelease: + on_mouse( report.xbutton.x, report.xbutton.y, -report.xbutton.button ); break; + } + } + struct timezone tz; struct timeval now_time; gettimeofday(&now_time, &tz); + double sec = (now_time.tv_sec+1.0*now_time.tv_usec/1000000.0) - (g_time.tv_sec+1.0*g_time.tv_usec/1000000.0); + if(sec > 1) { + memcpy(&g_time, &now_time, sizeof(g_time)); + if(calc_fps) { + double fps = g_fps; g_fps = 0; + char buffer[256]; snprintf(buffer, 256, "%s%s: %d fps", title, updating?"":" (no updating)", int(fps/sec)); + XStoreName(dpy, win, buffer); + } +#ifndef X_FULLSYNC + XSync(dpy, false); // It is often better then using XSynchronize(dpy, true) +#endif//X_FULLSYNC + } + if(threaded) pthread_mutex_unlock(&g_mutex); + return true; +} + +//! Change window title +void video::show_title() +{ + if(vidtype < 3) + XStoreName(dpy, win, title); +} + +drawing_area::drawing_area(int x, int y, int sizex, int sizey) + : start_x(x), start_y(y), size_x(sizex), size_y(sizey), pixel_depth(dispdepth), + base_index(y*g_sizex + x), max_index(g_sizex*g_sizey), index_stride(g_sizex), ptr32(g_pImg) +{ + assert(x < g_sizex); assert(y < g_sizey); + assert(x+sizex <= g_sizex); assert(y+sizey <= g_sizey); + + index = base_index; // current index +} + +void drawing_area::update() +{ + if(!g_video->updating) return; +#ifndef X_NOSHMEM + switch(vidtype) { + case 0: +#endif + pthread_mutex_lock(&g_mutex); + if(vidtype == 0) XPutImage(dpy, win, gc, ximage, start_x, start_y, start_x, start_y, size_x, size_y); + pthread_mutex_unlock(&g_mutex); +#ifndef X_NOSHMEM + break; + case 1: + pthread_mutex_lock(&g_mutex); + if(vidtype == 1) XShmPutImage(dpy, win, gc, ximage, start_x, start_y, start_x, start_y, size_x, size_y, false); + pthread_mutex_unlock(&g_mutex); + break; + /*case 2: make it in next_frame(); break;*/ + } +#endif +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/index.html b/deal.II/bundled/tbb41_20130401oss/examples/common/index.html new file mode 100644 index 0000000000..e184adc1c1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/index.html @@ -0,0 +1,39 @@ + + + +

Overview

+This directory contains common code that is used in the Intel® Threading Building Blocks examples. + +

+This code is not intended to be used directly. It is incorporated automatically by the examples that need it. +

+ +

Directories

+
+
gui +
GUI code for examples that have graphical user interfaces. Currently supports: +
    +
  • GDI+*, DirectDraw*, Direct2D* (Windows* systems) +
  • OpenGL* (Mac OS* X systems) +
  • X window (Linux* or Mac OS* X systems) +
+ See the examples that use the GUI + (tachyon and seismic) + for more details. +
+
+
utility +
common driver code for examples. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/utility/fast_random.h b/deal.II/bundled/tbb41_20130401oss/examples/common/utility/fast_random.h new file mode 100644 index 0000000000..b3d2b83dff --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/utility/fast_random.h @@ -0,0 +1,90 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef FAST_RANDOM_H_ +#define FAST_RANDOM_H_ +namespace utility{ +//------------------------------------------------------------------------ +// FastRandom +//------------------------------------------------------------------------ + +namespace internal{ + size_t GetPrime ( size_t seed ); +} + +//! A fast random number generator. +/** Uses linear congruential method. */ +class FastRandom { + size_t x, a; +public: + //! Get a random number. + unsigned short get() { + return get(x); + } + //! Get a random number for the given seed; update the seed for next use. + unsigned short get( size_t& seed ) { + unsigned short r = (unsigned short)(seed>>16); + seed = seed*a+1; + return r; + } + //! Construct a random number generator. + FastRandom( size_t seed ) { + x = seed*internal::GetPrime(seed); + a = internal::GetPrime(x); + } +}; +} + +namespace utility { +namespace internal{ +//! Table of primes used by fast random-number generator (FastRandom). + static const unsigned Primes[] = { + 0x9e3779b1, 0xffe6cc59, 0x2109f6dd, 0x43977ab5, + 0xba5703f5, 0xb495a877, 0xe1626741, 0x79695e6b, + 0xbc98c09f, 0xd5bee2b3, 0x287488f9, 0x3af18231, + 0x9677cd4d, 0xbe3a6929, 0xadc6a877, 0xdcf0674b, + 0xbe4d6fe9, 0x5f15e201, 0x99afc3fd, 0xf3f16801, + 0xe222cfff, 0x24ba5fdb, 0x0620452d, 0x79f149e3, + 0xc8b93f49, 0x972702cd, 0xb07dd827, 0x6c97d5ed, + 0x085a3d61, 0x46eb5ea7, 0x3d9910ed, 0x2e687b5b, + 0x29609227, 0x6eb081f1, 0x0954c4e1, 0x9d114db9, + 0x542acfa9, 0xb3e6bd7b, 0x0742d917, 0xe9f3ffa7, + 0x54581edb, 0xf2480f45, 0x0bb9288f, 0xef1affc7, + 0x85fa0ca7, 0x3ccc14db, 0xe6baf34b, 0x343377f7, + 0x5ca19031, 0xe6d9293b, 0xf0a9f391, 0x5d2e980b, + 0xfc411073, 0xc3749363, 0xb892d829, 0x3549366b, + 0x629750ad, 0xb98294e5, 0x892d9483, 0xc235baf3, + 0x3d2402a3, 0x6bdef3c9, 0xbec333cd, 0x40c9520f + }; + size_t GetPrime ( size_t seed ) { + return Primes[seed%(sizeof(Primes)/sizeof(Primes[0]))]; + } +} +} + +#endif /* FAST_RANDOM_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/common/utility/utility.h b/deal.II/bundled/tbb41_20130401oss/examples/common/utility/utility.h new file mode 100644 index 0000000000..4dc4391eb7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/common/utility/utility.h @@ -0,0 +1,475 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef UTILITY_H_ +#define UTILITY_H_ +#include +#include +#include +#include +#include +#include +#include +#include +#include +//TODO: for C++11 mode replace usage of auto_ptr with unique_ptr +#include +#include + +namespace utility{ + namespace internal{ + //TODO: add tcs + template + dest_type& string_to(std::string const& s, dest_type& result){ + std::stringstream stream(s); + stream>>result; + if ((!stream)||(stream.fail())){ + throw std::invalid_argument("error converting string \""+std::string(s)+"\""); + } + return result; + } + + template + dest_type string_to(std::string const& s){ + dest_type result; + return string_to(s,result); + } + + + template + struct is_bool { bool static value(){return false;}}; + template<> + struct is_bool { bool static value(){return true;}}; + + class type_base { + type_base& operator=(const type_base&); + public: + const std::string name; + const std::string description; + + type_base (std::string name, std::string description) : name(name), description(description) {} + virtual void parse_and_store (const std::string & s)=0; + virtual std::string value() const =0; + virtual std::auto_ptr clone()const =0; + virtual ~type_base(){} + }; + template + class type_impl : public type_base { + private: + type_impl& operator=(const type_impl&); + typedef bool(*validating_function_type)(const type&); + private: + type & target; + validating_function_type validating_function; + public: + type_impl(std::string name, std::string description, type & target, validating_function_type validating_function = NULL) + : type_base (name,description), target(target),validating_function(validating_function) + {}; + void parse_and_store (const std::string & s){ + try{ + const bool is_bool = internal::is_bool::value(); + if (is_bool &&(s.empty())){ + //to avoid directly assigning true + //(as it will impose additional layer of indirection) + //so, simply pass it as string + internal::string_to("1",target); + }else { + internal::string_to(s,target); + } + }catch(std::invalid_argument& ){ + std::stringstream str; + str + <<"\""< clone()const { + return std::auto_ptr(new type_impl(*this)); + } + }; + + class argument{ + private: + std::auto_ptr p_type; + bool matched_; + public: + argument(argument const& other): p_type(other.p_type.get() ? other.p_type->clone():std::auto_ptr()),matched_(other.matched_){} + argument& operator=(argument a){ + this->swap(a); + return *this; + } + void swap(argument& other){ + std::auto_ptr tmp; tmp=p_type; p_type=other.p_type; other.p_type=tmp; + std::swap(matched_,other.matched_); + } + template + argument(std::string name, std::string description, type& dest, bool(*validating_function)(const type&)= NULL) + :p_type(new type_impl(name,description,dest,validating_function)) + ,matched_(false) + {} + std::string value()const{ + return p_type->value(); + } + std::string name()const{ + return p_type->name; + } + std::string description() const{ + return p_type->description; + } + void parse_and_store(const std::string & s){ + p_type->parse_and_store(s); + matched_=true; + } + bool is_matched() const{return matched_;} + }; + } + class cli_argument_pack{ + typedef std::map args_map_type; + typedef std::vector args_display_order_type; + typedef std::vector positional_arg_names_type; + private: + args_map_type args_map; + args_display_order_type args_display_order; + positional_arg_names_type positional_arg_names; + std::set bool_args_names; + private: + void add_arg(internal::argument const& a){ + std::pair result = args_map.insert(std::make_pair(a.name(),a)); + if (!result.second){ + throw std::invalid_argument("argument with name: \""+a.name()+"\" already registered"); + } + args_display_order.push_back(a.name()); + } + public: + template + cli_argument_pack& arg(type& dest,std::string const& name, std::string const& description, bool(*validate)(const type &)= NULL){ + internal::argument a(name,description,dest,validate); + add_arg(a); + if (internal::is_bool::value()){ + bool_args_names.insert(name); + } + return *this; + } + + //Positional means that argument name can be omitted in actual CL + //only key to match values for parameters with + template + cli_argument_pack& positional_arg(type& dest,std::string const& name, std::string const& description, bool(*validate)(const type &)= NULL){ + internal::argument a(name,description,dest,validate); + add_arg(a); + if (internal::is_bool::value()){ + bool_args_names.insert(name); + } + positional_arg_names.push_back(name); + return *this; + } + + void parse(int argc, char const* argv[]){ + { + std::size_t current_positional_index=0; + for (int j=1;jis_matched()){ + throw std::invalid_argument(std::string("several values specified for: \"")+pa->name()+"\" argument"); + } + pa->parse_and_store(argument_value); + } + } + } + std::string usage_string(const std::string& binary_name)const{ + std::string command_line_params; + std::string summary_description; + + for (args_display_order_type::const_iterator it = args_display_order.begin();it!=args_display_order.end();++it){ + const bool is_bool = (0!=bool_args_names.count((*it))); + args_map_type::const_iterator argument_it = args_map.find(*it); + //TODO: probably use of smarter assert would help here + assert(argument_it!=args_map.end()/*&&"args_display_order and args_map are out of sync"*/); + if (argument_it==args_map.end()){ + throw std::logic_error("args_display_order and args_map are out of sync"); + } + const internal::argument & a = (*argument_it).second; + command_line_params +=" [" + a.name() + (is_bool ?"":"=value")+ "]"; + summary_description +=" " + a.name() + " - " + a.description() +" ("+a.value() +")" + "\n"; + } + + std::string positional_arg_cl; + for (positional_arg_names_type::const_iterator it = positional_arg_names.begin();it!=positional_arg_names.end();++it){ + positional_arg_cl +=" ["+(*it); + } + for (std::size_t i=0;i(previous+step); + } + int step_function_multiply(int previous,double multiply){ + return static_cast(previous*multiply); + } + typedef int (* step_function_ptr_type)(int,double); + struct step_function_descriptor { + char mnemonic; + step_function_ptr_type function; + public: + step_function_descriptor(char a_mnemonic, step_function_ptr_type a_function) : mnemonic(a_mnemonic), function(a_function) {} + private: + void operator=(step_function_descriptor const&); + }; + + step_function_descriptor step_function_descriptors[] = { + step_function_descriptor('*',step_function_multiply), + step_function_descriptor('+',step_function_plus) + }; + + template + inline size_t array_length(const T(&)[N]) + { + return N; + } + + struct thread_range_step { + step_function_ptr_type step_function; + double step_function_argument; + + thread_range_step ( step_function_ptr_type step_function_, double step_function_argument_) + :step_function(step_function_),step_function_argument(step_function_argument_) + { + if (!step_function_) + throw std::invalid_argument("step_function for thread range step should not be NULL"); + } + int operator()(int previous)const { + return step_function(previous,step_function_argument); + } + friend std::istream& operator>>(std::istream& input_stream, thread_range_step& step){ + char function_char; + double function_argument; + input_stream>>function_char >> function_argument; + size_t i = 0; + for ( ;(i < array_length(step_function_descriptors)) && step_function_descriptors[i].mnemonic != function_char; ++i ); + if (i >= array_length(step_function_descriptors)){ + throw std::invalid_argument("step_function for thread range step should be known"); + } + step.step_function = step_function_descriptors[i].function; + step.step_function_argument = function_argument; + return input_stream; + } + }; + } + struct thread_number_range{ + int (*auto_number_of_threads)(); + int first; + int last; + + internal::thread_range_step step; + + thread_number_range( int (*auto_number_of_threads_)(),int low_=1, int high_=-1 + , internal::thread_range_step step_ = internal::thread_range_step(internal::step_function_plus,1) + ) + : auto_number_of_threads(auto_number_of_threads_), first(low_), last((high_>-1) ? high_ : auto_number_of_threads_()) + ,step(step_) + { + if (first>last){ + throw std::invalid_argument(""); + } + } + friend std::istream& operator>>(std::istream& i, thread_number_range& range){ + try{ + std::string s; + i>>s; + struct string_to_number_of_threads{ + int auto_value; + string_to_number_of_threads(int auto_value_):auto_value(auto_value_){} + int operator()(const std::string & value)const{ + int result=0; + if (value=="auto"){ + result = auto_value; + } + else{ + internal::string_to(value,result); + } + return result; + } + }; + string_to_number_of_threads string_to_number_of_threads(range.auto_number_of_threads()); + int low =0; + int high=0; + std::size_t semicolon = s.find(':'); + if (semicolon == std::string::npos ){ + high= (low = string_to_number_of_threads(s)); + }else { + //it is a range + std::size_t second_semicolon = s.find(':',semicolon+1); + + low = string_to_number_of_threads(std::string(s, 0, semicolon)); //not copying the ':' char + high = string_to_number_of_threads(std::string(s, semicolon+1, second_semicolon - (semicolon+1))); //not copying the ':' chars + if (second_semicolon != std::string::npos){ + internal::string_to(std::string(s,second_semicolon + 1),range.step); + } + } + range = thread_number_range(range.auto_number_of_threads,low,high,range.step); + }catch(std::invalid_argument&){ + i.setstate(std::ios::failbit); + } + return i; + } + + friend std::ostream& operator<<(std::ostream& o, thread_number_range const& range){ + using namespace internal; + size_t i = 0; + for ( ;(i < array_length(step_function_descriptors)) && step_function_descriptors[i].function != range.step.step_function; ++i ); + if (i >= array_length(step_function_descriptors)){ + throw std::invalid_argument("step_function for thread range step should be known"); + } + o< +namespace utility{ + inline void report_elapsed_time(double seconds){ + std::cout << "elapsed time : "< +namespace utility{ + inline void parse_cli_arguments(int argc, const char* argv[], utility::cli_argument_pack cli_pack){ + bool show_help = false; + cli_pack.arg(show_help,"-h","show this message"); + + bool invalid_input=false; + try { + cli_pack.parse(argc,argv); + }catch(std::exception& e){ + std::cerr + <<"error occurred while parsing command line."<(argv), cli_pack); + } +} +#endif /* UTILITY_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile new file mode 100644 index 0000000000..62e969160b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile @@ -0,0 +1,65 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=count_strings +ARGS= +PERF_RUN_ARGS=auto 10000000 silent + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile.windows new file mode 100644 index 0000000000..38535a904f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/Makefile.windows @@ -0,0 +1,59 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Count_Strings +ARGS= +PERF_RUN_ARGS=auto 10000000 silent + +# The C++ compiler options + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test +perf_build: release +perf_run: + $(PROG) $(PERF_RUN_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/count_strings.cpp b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/count_strings.cpp new file mode 100644 index 0000000000..58caaa4553 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/count_strings.cpp @@ -0,0 +1,243 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Workaround for ICC 11.0 not finding __sync_fetch_and_add_4 on some of the Linux platforms. +#if __linux__ && defined(__INTEL_COMPILER) +#define __sync_fetch_and_add(ptr,addend) _InterlockedExchangeAdd(const_cast(reinterpret_cast(ptr)), addend) +#endif +#include +#include +#include +#include +#include +#include "tbb/concurrent_hash_map.h" +#include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tbb_allocator.h" +#include "../../common/utility/utility.h" + + +//! String type with scalable allocator. +/** On platforms with non-scalable default memory allocators, the example scales + better if the string allocator is changed to tbb::tbb_allocator. */ +typedef std::basic_string,tbb::tbb_allocator > MyString; + +using namespace tbb; +using namespace std; + +//! Set to true to counts. +static bool verbose = false; +static bool silent = false; +//! Problem size +long N = 1000000; +const int size_factor = 2; + +//! A concurrent hash table that maps strings to ints. +typedef concurrent_hash_map StringTable; + +//! Function object for counting occurrences of strings. +struct Tally { + StringTable& table; + Tally( StringTable& table_ ) : table(table_) {} + void operator()( const blocked_range range ) const { + for( MyString* p=range.begin(); p!=range.end(); ++p ) { + StringTable::accessor a; + table.insert( a, *p ); + a->second += 1; + } + } +}; + +static MyString* Data; + +static void CountOccurrences(int nthreads) { + StringTable table; + + tick_count t0 = tick_count::now(); + parallel_for( blocked_range( Data, Data+N, 1000 ), Tally(table) ); + tick_count t1 = tick_count::now(); + + int n = 0; + for( StringTable::iterator i=table.begin(); i!=table.end(); ++i ) { + if( verbose && nthreads ) + printf("%s %d\n",i->first.c_str(),i->second); + n += i->second; + } + + if ( !silent ) printf("total = %d unique = %u time = %g\n", n, unsigned(table.size()), (t1-t0).seconds()); +} + +/// Generator of random words + +struct Sound { + const char *chars; + int rates[3];// begining, middle, ending +}; +Sound Vowels[] = { + {"e", {445,6220,1762}}, {"a", {704,5262,514}}, {"i", {402,5224,162}}, {"o", {248,3726,191}}, + {"u", {155,1669,23}}, {"y", {4,400,989}}, {"io", {5,512,18}}, {"ia", {1,329,111}}, + {"ea", {21,370,16}}, {"ou", {32,298,4}}, {"ie", {0,177,140}}, {"ee", {2,183,57}}, + {"ai", {17,206,7}}, {"oo", {1,215,7}}, {"au", {40,111,2}}, {"ua", {0,102,4}}, + {"ui", {0,104,1}}, {"ei", {6,94,3}}, {"ue", {0,67,28}}, {"ay", {1,42,52}}, + {"ey", {1,14,80}}, {"oa", {5,84,3}}, {"oi", {2,81,1}}, {"eo", {1,71,5}}, + {"iou", {0,61,0}}, {"oe", {2,46,9}}, {"eu", {12,43,0}}, {"iu", {0,45,0}}, + {"ya", {12,19,5}}, {"ae", {7,18,10}}, {"oy", {0,10,13}}, {"ye", {8,7,7}}, + {"ion", {0,0,20}}, {"ing", {0,0,20}}, {"ium", {0,0,10}}, {"er", {0,0,20}} +}; +Sound Consonants[] = { + {"r", {483,1414,1110}}, {"n", {312,1548,1114}}, {"t", {363,1653,251}}, {"l", {424,1341,489}}, + {"c", {734,735,260}}, {"m", {732,785,161}}, {"d", {558,612,389}}, {"s", {574,570,405}}, + {"p", {519,361,98}}, {"b", {528,356,30}}, {"v", {197,598,16}}, {"ss", {3,191,567}}, + {"g", {285,430,42}}, {"st", {142,323,180}}, {"h", {470,89,30}}, {"nt", {0,350,231}}, + {"ng", {0,117,442}}, {"f", {319,194,19}}, {"ll", {1,414,83}}, {"w", {249,131,64}}, + {"k", {154,179,47}}, {"nd", {0,279,92}}, {"bl", {62,235,0}}, {"z", {35,223,16}}, + {"sh", {112,69,79}}, {"ch", {139,95,25}}, {"th", {70,143,39}}, {"tt", {0,219,19}}, + {"tr", {131,104,0}}, {"pr", {186,41,0}}, {"nc", {0,223,2}}, {"j", {184,32,1}}, + {"nn", {0,188,20}}, {"rt", {0,148,51}}, {"ct", {0,160,29}}, {"rr", {0,182,3}}, + {"gr", {98,87,0}}, {"ck", {0,92,86}}, {"rd", {0,81,88}}, {"x", {8,102,48}}, + {"ph", {47,101,10}}, {"br", {115,43,0}}, {"cr", {92,60,0}}, {"rm", {0,131,18}}, + {"ns", {0,124,18}}, {"sp", {81,55,4}}, {"sm", {25,29,85}}, {"sc", {53,83,1}}, + {"rn", {0,100,30}}, {"cl", {78,42,0}}, {"mm", {0,116,0}}, {"pp", {0,114,2}}, + {"mp", {0,99,14}}, {"rs", {0,96,16}}, /*{"q", {52,57,1}},*/ {"rl", {0,97,7}}, + {"rg", {0,81,15}}, {"pl", {56,39,0}}, {"sn", {32,62,1}}, {"str", {38,56,0}}, + {"dr", {47,44,0}}, {"fl", {77,13,1}}, {"fr", {77,11,0}}, {"ld", {0,47,38}}, + {"ff", {0,62,20}}, {"lt", {0,61,19}}, {"rb", {0,75,4}}, {"mb", {0,72,7}}, + {"rc", {0,76,1}}, {"gg", {0,74,1}}, {"pt", {1,56,10}}, {"bb", {0,64,1}}, + {"sl", {48,17,0}}, {"dd", {0,59,2}}, {"gn", {3,50,4}}, {"rk", {0,30,28}}, + {"nk", {0,35,20}}, {"gl", {40,14,0}}, {"wh", {45,6,0}}, {"ntr", {0,50,0}}, + {"rv", {0,47,1}}, {"ght", {0,19,29}}, {"sk", {23,17,5}}, {"nf", {0,46,0}}, + {"cc", {0,45,0}}, {"ln", {0,41,0}}, {"sw", {36,4,0}}, {"rp", {0,36,4}}, + {"dn", {0,38,0}}, {"ps", {14,19,5}}, {"nv", {0,38,0}}, {"tch", {0,21,16}}, + {"nch", {0,26,11}}, {"lv", {0,35,0}}, {"wn", {0,14,21}}, {"rf", {0,32,3}}, + {"lm", {0,30,5}}, {"dg", {0,34,0}}, {"ft", {0,18,15}}, {"scr", {23,10,0}}, + {"rch", {0,24,6}}, {"rth", {0,23,7}}, {"rh", {13,15,0}}, {"mpl", {0,29,0}}, + {"cs", {0,1,27}}, {"gh", {4,10,13}}, {"ls", {0,23,3}}, {"ndr", {0,25,0}}, + {"tl", {0,23,1}}, {"ngl", {0,25,0}}, {"lk", {0,15,9}}, {"rw", {0,23,0}}, + {"lb", {0,23,1}}, {"tw", {15,8,0}}, /*{"sq", {15,8,0}},*/ {"chr", {18,4,0}}, + {"dl", {0,23,0}}, {"ctr", {0,22,0}}, {"nst", {0,21,0}}, {"lc", {0,22,0}}, + {"sch", {16,4,0}}, {"ths", {0,1,20}}, {"nl", {0,21,0}}, {"lf", {0,15,6}}, + {"ssn", {0,20,0}}, {"xt", {0,18,1}}, {"xp", {0,20,0}}, {"rst", {0,15,5}}, + {"nh", {0,19,0}}, {"wr", {14,5,0}} +}; +const int VowelsNumber = sizeof(Vowels)/sizeof(Sound); +const int ConsonantsNumber = sizeof(Consonants)/sizeof(Sound); +int VowelsRatesSum[3] = {0,0,0}, ConsonantsRatesSum[3] = {0,0,0}; + +int CountRateSum(Sound sounds[], const int num, const int part) +{ + int sum = 0; + for(int i = 0; i < num; i++) + sum += sounds[i].rates[part]; + return sum; +} + +const char *GetLetters(int type, const int part) +{ + Sound *sounds; int rate, i = 0; + if(type & 1) + sounds = Vowels, rate = rand() % VowelsRatesSum[part]; + else + sounds = Consonants, rate = rand() % ConsonantsRatesSum[part]; + do { + rate -= sounds[i++].rates[part]; + } while(rate > 0); + return sounds[--i].chars; +} + +static void CreateData() { + for(int i = 0; i < 3; i++) { + ConsonantsRatesSum[i] = CountRateSum(Consonants, ConsonantsNumber, i); + VowelsRatesSum[i] = CountRateSum(Vowels, VowelsNumber, i); + } + for( int i=0; i + + +

Overview

+The example counts the number of unique words in a text. + + +

Files

+
+
count_strings.cpp +
Source code for example. +
Makefile +
Makefile for building example. +
+ +

Directories

+
+
msvs +
Contains Microsoft* Visual Studio* 2005 workspace for building and running the example (Windows* systems only). +
xcode +
Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
+ +

To Build

+General build directions can be found here. + +

Usage

+
+
count_strings -h +
Prints the help for command line options +
count_strings [n-of-threads=value] [n-of-strings=value] [verbose] [silent] +
count_strings [n-of-threads [n-of-strings]] [verbose] [silent] +
n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
+ n-of-strings is a number of strings.
+ verbose - enables printing of extra information during execution.
+ silent - no output except elapsed time.
+ +
To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
Build a debug version of the example + (see the build directions). +
Run it with a small number of strings and the desired number of threads, e.g., count_strings 2 10000. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.icproj b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.icproj new file mode 100644 index 0000000000..c873cd5299 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.vcproj new file mode 100644 index 0000000000..6a74e2ea0b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_cl.sln new file mode 100644 index 0000000000..5a9c27e228 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_cl.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "count_strings", "count_strings.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_icl.sln new file mode 100644 index 0000000000..ff1ba2405e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/msvs/count_strings_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "count_strings", "count_strings.icproj", "{ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Debug|Win32.ActiveCfg = Debug|Win32 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Debug|Win32.Build.0 = Debug|Win32 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Debug|x64.ActiveCfg = Debug|x64 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Debug|x64.Build.0 = Debug|x64 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Release|Win32.ActiveCfg = Release|Win32 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Release|Win32.Build.0 = Release|Win32 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Release|x64.ActiveCfg = Release|x64 + {ACC0CC2E-3102-4ED2-AFA2-996AF7DEC9A8}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252C}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..1b90bf71a6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/count_strings/xcode/count_strings.xcodeproj/project.pbxproj @@ -0,0 +1,305 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A1F593A60B8F042A00073279 /* count_strings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* count_strings.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8DD76F6C0486A84900D96B5E /* count_strings */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = count_strings; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* count_strings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = count_strings.cpp; path = ../count_strings.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* count_strings */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = count_strings; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A1F593A50B8F042A00073279 /* count_strings.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* count_strings */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* count_strings */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "count_strings" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = count_strings; + productInstallPath = "$(HOME)/bin"; + productName = count_strings; + productReference = 8DD76F6C0486A84900D96B5E /* count_strings */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "count_strings" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* count_strings */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* count_strings */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* count_strings.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = count_strings; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = count_strings; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = count_strings; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = count_strings; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "count_strings" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "count_strings" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/index.html b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/index.html new file mode 100644 index 0000000000..5859cc379c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_hash_map/index.html @@ -0,0 +1,24 @@ + + + +

Overview

+This directory has examples of the template concurrent_hash_map. + +

Directories

+
+
count_strings +
Concurrently inserts strings into a concurrent_hash_map. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile new file mode 100644 index 0000000000..c3c6884709 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile @@ -0,0 +1,67 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=shortpath +ARGS=4 N=1000 start=0 end=999 verbose +PERF_RUN_ARGS=auto N=1000 start=0 end=99 silent + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # which icc +ifneq (,$(filter icc icpc,$(CXX))) +CXX0XFLAGS?=-std=c++0x -D_TBB_CPP0X +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) $(CXX0XFLAGS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) $(CXX0XFLAGS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile.windows new file mode 100644 index 0000000000..38081238d3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/Makefile.windows @@ -0,0 +1,58 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=shortpath +ARGS=4 N=1000 start=0 end=999 verbose +PERF_RUN_ARGS=auto N=1000 start=0 end=99 silent + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + +perf_build: release + +perf_run: + $(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/index.html b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/index.html new file mode 100644 index 0000000000..26d5a1f4cf --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/index.html @@ -0,0 +1,82 @@ + + + +

Overview

+ +This directory contains a simple example that solves the single source +shortest path problem. It is parameterized by N, a number of nodes, +and a start and end node in [0..N). A graph is generated with N nodes +and some random number of connections between those nodes. A parallel +algorithm based on A* is used to find the shortest path. This +algorithm varies from serial A* in that it needs to add nodes back to +the open set when the g estimate (shortest path from start to the +node) is improved, even if the node has already been "visited". This +is because nodes are added and removed from the open-set in parallel, +resulting in some less optimal paths being explored. The open-set is +implemented with the concurrent_priority_queue. Note that since we +re-visit nodes, the f estimate (on which the priority queue is sorted) +is not technically needed, so we could use this same parallel +algorithm with just a concurrent_queue. However, keeping the f +estimate and using concurrent_priority_queue results in much better +performance. Silent mode prints run time only, regular mode prints +shortest path length, and verbose mode prints out the shortest path. +The generated graph follows a pattern in which the closer two pairs of +node ids are together, the fewer hops there are in a typical path +between those nodes. So, for example, the path between 5 and 7 likely +has few hops whereas 14 to 78 has more and 0 to 9999 has even more, +etc. + + +

Files

+
+
shortpath.cpp +
Driver. + +
Makefile +
Makefile for building example. + +
+ +

Directories

+
+
msvs +
Contains Microsoft* Visual Studio* 2008 workspace for building and running the example with the Intel® C++ compiler (Windows* systems only). +
xcode +
Contains Mac OS* Xcode* workspace for building and running the example (Mac OS* X systems only). +
+ +

To Build

+General build directions can be found here. +

+ +

Usage

+
+ +
shortpath -h +
Prints the help for command line options +
shortpath [#threads=value] [verbose] [silent] [N=value] [start=value] [end=value] [#threads] +
#threads is the number of threads to use; a range of the form low[:high] where low and optional high are non-negative integers, or 'auto' for the TBB default.
+ verbose print full path to screen
+ silent limits output to timing info; overrides verbose
+ N number of nodes in graph
+ start node to start path at
+ end node to end path at
+ + +
To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
Build a debug version of the example + (see the build directions). +
Run it with a small problem size and the desired number of threads, e.g., shortpath 4 N=20 start=0 end=19. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.icproj b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.icproj new file mode 100644 index 0000000000..38334ea972 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.vcproj new file mode 100644 index 0000000000..e5463dfdb5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_cl.sln new file mode 100644 index 0000000000..cf1789ad47 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shortpath", "shortpath.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_icl.sln new file mode 100644 index 0000000000..70881aa72e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/msvs/shortpath_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "shortpath", "shortpath.icproj", "{D731702C-B704-468D-9497-A75EE0521C89}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|Win32.ActiveCfg = Debug|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|Win32.Build.0 = Debug|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|x64.ActiveCfg = Debug|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|x64.Build.0 = Debug|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|Win32.ActiveCfg = Release|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|Win32.Build.0 = Release|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|x64.ActiveCfg = Release|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/shortpath.cpp b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/shortpath.cpp new file mode 100644 index 0000000000..b3c3ad78ff --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/concurrent_priority_queue/shortpath/shortpath.cpp @@ -0,0 +1,378 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include +#include +#include "tbb/atomic.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/task_group.h" +#include "tbb/concurrent_priority_queue.h" +#include "tbb/spin_mutex.h" +#include "tbb/parallel_for.h" +#include "tbb/blocked_range.h" +#include "../../common/utility/utility.h" +#include "../../common/utility/fast_random.h" + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4267) +#endif /* _MSC_VER && _Wp64 */ + +#if __INTEL_COMPILER +#define __TBB_LAMBDAS_PRESENT ( _TBB_CPP0X && __INTEL_COMPILER > 1100 ) +#elif __GNUC__ +#define __TBB_LAMBDAS_PRESENT ( _TBB_CPP0X && __TBB_GCC_VERSION >= 40500 ) +#elif _MSC_VER +#define __TBB_LAMBDAS_PRESENT ( _MSC_VER>=1600 ) +#endif + +using namespace std; +using namespace tbb; + +struct point { + double x, y; + point() {} + point(double _x, double _y) : x(_x), y(_y) {} + point(const point& p) : x(p.x), y(p.y) {} +}; + +double get_distance(const point& p1, const point& p2) { + double xdiff=p1.x-p2.x, ydiff=p1.y-p2.y; + return sqrt(xdiff*xdiff + ydiff*ydiff); +} + +// generates random points on 2D plane within a box of maxsize width & height +point generate_random_point(utility::FastRandom& mr) { + const size_t maxsize=500; + double x = (double)(mr.get() % maxsize); + double y = (double)(mr.get() % maxsize); + return point(x,y); +} + +// weighted toss makes closer nodes (in the point vector) heavily connected +bool die_toss(size_t a, size_t b, utility::FastRandom& mr) { + int node_diff = std::abs((int)(a-b)); + // near nodes + if (node_diff < 16) return true; + // mid nodes + if (node_diff < 64) return ((int)mr.get() % 8 == 0); + // far nodes + if (node_diff < 512) return ((int)mr.get() % 16 == 0); + return false; +} + +typedef vector point_set; +typedef size_t vertex_id; +typedef std::pair vertex_rec; +typedef vector > edge_set; + +bool verbose = false; // prints bin details and other diagnostics to screen +bool silent = false; // suppress all output except for time +size_t N = 1000; // number of vertices +size_t src = 0; // start of path +size_t dst = N-1; // end of path +double INF=100000.0; // infinity +size_t grainsize = 16; // number of vertices per task on average +size_t max_spawn; // max tasks to spawn +atomic num_spawn; // number of active tasks + +point_set vertices; // vertices +edge_set edges; // edges +vector predecessor; // for recreating path from src to dst + +vector f_distance; // estimated distances at particular vertex +vector g_distance; // current shortest distances from src vertex +vector locks; // a lock for each vertex +task_group *sp_group; // task group for tasks executing sub-problems + +class compare_f { +public: + bool operator()(const vertex_rec& u, const vertex_rec& v) const { + return u.second>v.second; + } +}; + +concurrent_priority_queue open_set; // tentative vertices + +void shortpath_helper(); + +#if !__TBB_LAMBDAS_PRESENT +class shortpath_helper_functor { +public: + shortpath_helper_functor() {}; + void operator() () const { shortpath_helper(); } +}; +#endif + +void shortpath() { + g_distance[src] = 0.0; // src's distance from src is zero + f_distance[src] = get_distance(vertices[src], vertices[dst]); // estimate distance from src to dst + open_set.push(make_pair(src,f_distance[src])); // push src into open_set +#if __TBB_LAMBDAS_PRESENT + sp_group->run([](){ shortpath_helper(); }); +#else + sp_group->run( shortpath_helper_functor() ); +#endif + sp_group->wait(); +} + +void shortpath_helper() { + vertex_rec u_rec; + while (open_set.try_pop(u_rec)) { + vertex_id u = u_rec.first; + if (u==dst) continue; + double f = u_rec.second; + double old_g_u = 0.0; + { + spin_mutex::scoped_lock l(locks[u]); + if (f > f_distance[u]) continue; // prune search space + old_g_u = g_distance[u]; + } + for (size_t i=0; irun([]{ shortpath_helper(); }); +#else + sp_group->run( shortpath_helper_functor() ); +#endif + } + else --num_spawn; + } + } + } + --num_spawn; +} + +void make_path(vertex_id src, vertex_id dst, vector& path) { + vertex_id at = predecessor[dst]; + if (at == N) path.push_back(src); + else if (at == src) { path.push_back(src); path.push_back(dst); } + else { make_path(src, at, path); path.push_back(dst); } +} + +void print_path() { + vector path; + double path_length=0.0; + make_path(src, dst, path); + if (verbose) printf("\n "); + for (size_t i=0; i", (int)path[i]); + else printf("(%4d)\n", (int)path[i]); + } + } + if (verbose) printf("Total distance = %5.1f\n", path_length); + else if (!silent) printf(" %5.1f\n", path_length); +} + +int get_default_num_threads() { + static int threads = 0; + if (threads == 0) + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +#if !__TBB_LAMBDAS_PRESENT +class gen_vertices { +public: + gen_vertices() {} + void operator() (blocked_range& r) const { + utility::FastRandom my_random((unsigned int)r.begin()); + for (size_t i=r.begin(); i!=r.end(); ++i) { + vertices[i] = generate_random_point(my_random); + } + } +}; + +class gen_edges { +public: + gen_edges() {} + void operator() (blocked_range& r) const { + utility::FastRandom my_random((unsigned int)r.begin()); + for (size_t i=r.begin(); i!=r.end(); ++i) { + for (size_t j=0; j& r) const { + for (size_t i=r.begin(); i!=r.end(); ++i) { + f_distance[i] = g_distance[i] = INF; + predecessor[i] = N; + } + } +}; +#endif + +void InitializeGraph() { + sp_group = new task_group; + vertices.resize(N); + edges.resize(N); + predecessor.resize(N); + g_distance.resize(N); + f_distance.resize(N); + locks.resize(N); + task_scheduler_init init(get_default_num_threads()); + if (verbose) printf("Generating vertices...\n"); +#if __TBB_LAMBDAS_PRESENT + parallel_for(blocked_range(0,N,64), + [&](blocked_range& r) { + utility::FastRandom my_random(r.begin()); + for (size_t i=r.begin(); i!=r.end(); ++i) { + vertices[i] = generate_random_point(my_random); + } + }, simple_partitioner()); +#else + parallel_for(blocked_range(0,N,64), gen_vertices(), simple_partitioner()); +#endif + if (verbose) printf("Generating edges...\n"); +#if __TBB_LAMBDAS_PRESENT + parallel_for(blocked_range(0,N,64), + [&](blocked_range& r) { + utility::FastRandom my_random(r.begin()); + for (size_t i=r.begin(); i!=r.end(); ++i) { + for (size_t j=0; j(0,N,64), gen_edges(), simple_partitioner()); +#endif + for (size_t i=0; i(0,N), + [&](blocked_range& r) { + for (size_t i=r.begin(); i!=r.end(); ++i) { + f_distance[i] = g_distance[i] = INF; + predecessor[i] = N; + } + }); +#else + parallel_for(blocked_range(0,N), reset_vertices()); +#endif +} + +int main(int argc, char *argv[]) { + try { + utility::thread_number_range threads(get_default_num_threads); + utility::parse_cli_arguments(argc, argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"#threads",utility::thread_number_range_desc) + .arg(verbose,"verbose"," print diagnostic output to screen") + .arg(silent,"silent"," limits output to timing info; overrides verbose") + .arg(N,"N"," number of vertices") + .arg(src,"start"," start of path") + .arg(dst,"end"," end of path") + ); + if (silent) verbose = false; // make silent override verbose + else + printf("shortpath will run with %d vertices to find shortest path between vertices" + " %d and %d using %d:%d threads.\n", + (int)N, (int)src, (int)dst, (int)threads.first, (int)threads.last); + + if (dst >= N) { + if (verbose) + printf("end value %d is invalid for %d vertices; correcting to %d\n", (int)dst, (int)N, (int)N-1); + dst = N-1; + } + + num_spawn = 0; + max_spawn = N/grainsize; + tick_count t0, t1; + InitializeGraph(); + for (int n_thr=threads.first; n_thr<=threads.last; n_thr=threads.step(n_thr)) { + ResetGraph(); + task_scheduler_init init(n_thr); + t0 = tick_count::now(); + shortpath(); + t1 = tick_count::now(); + if (!silent) { + if (predecessor[dst] != N) { + printf("%d threads: [%6.6f] The shortest path from vertex %d to vertex %d is:", + (int)n_thr, (t1-t0).seconds(), (int)src, (int)dst); + print_path(); + } + else { + printf("%d threads: [%6.6f] There is no path from vertex %d to vertex %d\n", + (int)n_thr, (t1-t0).seconds(), (int)src, (int)dst); + } + } else + utility::report_elapsed_time((t1-t0).seconds()); + } + return 0; + } catch(std::exception& e) { + cerr<<"error occurred. error text is :\"" </dev/null)) +CXX=icc +endif # which icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) $(CXX0XFLAGS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) $(CXX0XFLAGS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/Makefile.windows new file mode 100644 index 0000000000..fe16997d51 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/Makefile.windows @@ -0,0 +1,58 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=binpack +ARGS= 4 N=1000 +PERF_RUN_ARGS=auto N=1000 silent + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + +perf_build: release + +perf_run: + $(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/binpack.cpp b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/binpack.cpp new file mode 100644 index 0000000000..c0ae73dac8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/binpack.cpp @@ -0,0 +1,307 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + + +/* Bin-packing algorithm that attempts to use minimal number of bins B of + size V to contain N items of varying sizes. */ + +#include +#include +#include +#include "tbb/atomic.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "tbb/flow_graph.h" +#include "../../common/utility/utility.h" + +using namespace std; +using namespace tbb; +using namespace tbb::flow; + +typedef size_t size_type; // to represent non-zero indices, capacities, etc. +typedef size_t value_type; // the type of items we are attempting to pack into bins +typedef vector bin; // we use a simple vector to represent a bin +// Our bin packers will be function nodes in the graph that take value_type items and +// return a dummy value. They will also implicitly send packed bins to the bin_buffer +// node, and unused items back to the value_pool node: +typedef function_node bin_packer; +// Items are placed into a pool that all bin packers grab from, represent by a queue_node: +typedef queue_node value_pool; +// Packed bins are placed in this buffer waiting to be serially printed and/or accounted for: +typedef buffer_node bin_buffer; +// Packed bins are taken from the_bin_buffer and processed by the_writer: +typedef function_node bin_writer; +// Items are injected into the graph when this node sends them to the_value_pool: +typedef source_node value_source; + +// User-specified globals with default values +size_type V = 42; // desired capacity for each bin +size_type N = 1000; // number of elements to generate +bool verbose = false; // prints bin details and other diagnostics to screen +bool silent = false; // suppress all output except for time +int num_bin_packers=-1; // number of concurrent bin packers in operation; default is #threads; + // larger values can result in more bins at less than full capacity +size_type optimality=1; // 1 (default) is highest the algorithm can obtain; larger numbers run faster + +// Calculated globals +size_type min_B; // lower bound on the optimal number of bins +size_type B; // the answer, i.e. number of bins used by the algorithm +size_type *input_array; // stores randomly generated input values +value_type item_sum; // sum of all randomly generated input values +atomic packed_sum; // sum of all values currently packed into all bins +atomic packed_items; // number of values currently packed into all bins +atomic active_bins; // number of active bin_packers +bin_packer **bins; // the array of bin packers + +// This class is the Body type for bin_packer +class bin_filler { + bin my_bin; // the current bin that this bin_filler is packing + size_type my_used; // capacity of bin used by current contents (not to be confused with my_bin.size()) + size_type relax, relax_val; // relaxation counter for determining when to settle for a non-full bin + bin_packer* my_bin_packer; // ptr to the bin packer that this body object is associated with + size_type bin_index; // index of the encapsulating bin packer in the global bins array + value_pool* the_value_pool; // ptr to the pool of items to pack + bin_buffer* the_bin_buffer; // ptr to the buffer of resulting bins + value_type looking_for; // the minimum size of item this bin_packer will accept + bool done; // flag to indicate that this binpacker has been deactivated + public: + bin_filler(size_t bidx, value_pool* q, bin_buffer* r) : + my_used(0), relax(0), relax_val(0), my_bin_packer(NULL), bin_index(bidx), the_value_pool(q), + the_bin_buffer(r), looking_for(V), done(false) {} + continue_msg operator()(const value_type& item) { + if (!my_bin_packer) my_bin_packer = bins[bin_index]; + if (done) the_value_pool->try_put(item); // this bin_packer is done packing items; put item back to pool + else if (item > V) { // signal that packed_sum has reached item_sum at some point + size_type remaining = active_bins--; + if (remaining == 1 && packed_sum == item_sum) { // this is the last bin and it has seen everything + // this bin_packer may not have seen everything, so stay active + if (my_used>0) the_bin_buffer->try_put(my_bin); + my_bin.clear(); + my_used = 0; + looking_for = V; + ++active_bins; + } + else if (remaining == 1) { // this is the last bin, but there are remaining items + the_value_pool->try_put(V+1); // send out signal + ++active_bins; + } + else if (remaining > 1) { // this is not the last bin; deactivate + if (my_used < V/(1+optimality*.1)) { // this bin is ill-utilized; throw back items and deactivate + packed_sum -= my_used; + packed_items -= my_bin.size(); + for (size_type i=0; itry_put(my_bin[i]); + the_value_pool->remove_successor(*my_bin_packer); // deactivate + done = true; + the_value_pool->try_put(V+1); // send out signal + } + else { // this bin is well-utilized; send out bin and deactivate + the_value_pool->remove_successor(*my_bin_packer); // build no more bins + done = true; + if (my_used>0) the_bin_buffer->try_put(my_bin); + the_value_pool->try_put(V+1); // send out signal + } + } + } + else if (item <= V-my_used && item >= looking_for) { // this item can be packed + my_bin.push_back(item); + my_used += item; + packed_sum += item; + ++packed_items; + looking_for = V-my_used; + relax = 0; + if (packed_sum == item_sum) { + the_value_pool->try_put(V+1); // send out signal + } + if (my_used == V) { + the_bin_buffer->try_put(my_bin); + my_bin.clear(); + my_used = 0; + looking_for = V; + } + } + else { // this item can't be packed; relax constraints + ++relax; + if (relax >= (N-packed_items)/optimality) { // this bin_packer has looked through enough items + relax = 0; + --looking_for; // accept a wider range of items + if (looking_for == 0 && my_used < V/(1+optimality*.1) && my_used > 0 && active_bins > 1) { + // this bin_packer is ill-utilized and can't find items; deactivate and throw back items + size_type remaining = active_bins--; + if (remaining > 1) { // not the last bin_packer + the_value_pool->remove_successor(*my_bin_packer); // deactivate + done = true; + } + else active_bins++; // can't deactivate last bin_packer + packed_sum -= my_used; + packed_items -= my_bin.size(); + for (size_type i=0; itry_put(my_bin[i]); + my_bin.clear(); + my_used = 0; + } + else if (looking_for == 0 && (my_used >= V/(1+optimality*.1) || active_bins == 1)) { + // this bin_packer can't find items but is well-utilized, so send it out and reset + the_bin_buffer->try_put(my_bin); + my_bin.clear(); + my_used = 0; + looking_for = V; + } + } + the_value_pool->try_put(item); // put unused item back to pool + } + return continue_msg(); // need to return something + } +}; + +// source node uses this to send the values to the value_pool +class item_generator { + size_type counter; +public: + item_generator() : counter(0) {} + bool operator()(value_type& m) { + if (counter my_max) my_max = sum; + avg += sum; + running_count += sum; + if (verbose) + cout << "]=" << sum << "; Done/Packed/Total cap: " << running_count << "/" << packed_sum << "/" << item_sum + << " items:" << item_count << "/" << packed_items << "/" << N << " B=" << B << endl; + if (item_count == N) { // should be the last; print stats + avg = avg/(double)B; + if (!silent) + cout << "SUMMARY: #Bins used: " << B << "; Avg size: " << avg << "; Max size: " << my_max + << "; Min size: " << my_min << "\n Lower bound on optimal #bins: " << min_B + << "; Start #bins: " << num_bin_packers << endl; + } + return continue_msg(); // need to return something + } +}; + +int get_default_num_threads() { + static int threads = 0; + if (threads == 0) + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +int main(int argc, char *argv[]) { + try { + utility::thread_number_range threads(get_default_num_threads); + utility::parse_cli_arguments(argc, argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"#threads",utility::thread_number_range_desc) + .arg(verbose,"verbose"," print diagnostic output to screen") + .arg(silent,"silent"," limits output to timing info; overrides verbose") + .arg(N,"N"," number of values to pack") + .arg(V,"V"," capacity of each bin") + .arg(num_bin_packers,"#packers"," number of concurrent bin packers to use " + "(default=#threads)") + .arg(optimality,"optimality","controls optimality of solution; 1 is highest, use\n" + " larger numbers for less optimal but faster solution") + ); + + if (silent) verbose = false; // make silent override verbose + // Generate random input data + srand(42); + input_array = new value_type[N]; + item_sum = 0; + for (size_type i=0; i + + +

Overview

+ +This directory contains a simple tbb::flow example that performs +binpacking of N integer values into a near-optimal number of bins +of capacity V. It features a source_node which passes randomly +generated integer values of size<=V to a queue_node. Multiple +function_nodes set about taking values from this queue_node and +packing them into bins according to a best-fit policy. Items that +cannot be made to fit are rejected and returned to the queue. When +a bin is packed as well as it can be, it is passed to a buffer_node +where it waits to be picked up by another function_node. This final +function nodes gathers stats about the bin and optionally prints its +contents. When all bins are accounted for, it optionally prints a +summary of the quality of the bin-packing. + +

Files

+
+
binpack.cpp +
Driver. + +
Makefile +
Makefile for building example. + +
+ +

Directories

+
+
msvs +
Contains Microsoft* Visual Studio* 2008 workspace for building and running the example with the Intel® C++ compiler (Windows* systems only). +
xcode +
Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
+ +

To Build

+General build directions can be found here. +

+ +

Usage

+
+ +
binpack -h +
Prints the help for command line options +
binpack [#threads=value] [verbose] [silent] [N=value] [V=value] [#packers=value] [optimality=value] [#threads] +
#threads is the number of threads to use; a range of the form low[:high] where low and optional high are non-negative integers, or 'auto' for the TBB default.
+ verbose print diagnostic output to screen
+ silent limits output to timing info; overrides verbose
+ N number of values to pack
+ V capacity of each bin
+ #packers number of concurrent bin packers to use (default=#threads)
+ optimality controls optimality of solution; 1 is highest, use larger numbers for less optimal but faster solution
+ + +
To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
Build a debug version of the example + (see the build directions). +
Run it with a small problem size and the desired number of threads, e.g., binpack 4 N=100. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.icproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.icproj new file mode 100644 index 0000000000..74a4049360 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.vcproj new file mode 100644 index 0000000000..b93a9aecee --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_cl.sln new file mode 100644 index 0000000000..ac5cd2f2b7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binpack", "binpack.vcproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_icl.sln new file mode 100644 index 0000000000..4f86c03347 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/msvs/binpack_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "binpack", "binpack.icproj", "{CB292CD9-903E-464C-AAFE-E7A49003565C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.Build.0 = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.ActiveCfg = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.Build.0 = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.ActiveCfg = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.Build.0 = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.ActiveCfg = Release|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/xcode/binpack.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/xcode/binpack.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..58bde8e88f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/binpack/xcode/binpack.xcodeproj/project.pbxproj @@ -0,0 +1,305 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0E8A7311136F4A4600453C80 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0E8A7310136F4A4600453C80 /* libtbb.dylib */; }; + 0E8A7325136F4D3600453C80 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E8A7310136F4A4600453C80 /* libtbb.dylib */; }; + A1F593A60B8F042A00073279 /* binpack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* binpack.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + 0E8A7311136F4A4600453C80 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 0E8A7310136F4A4600453C80 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + 8DD76F6C0486A84900D96B5E /* Binpack */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Binpack; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* binpack.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = binpack.cpp; path = ../binpack.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0E8A7325136F4D3600453C80 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* Binpack */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = Binpack; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A1F593A50B8F042A00073279 /* binpack.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* Binpack */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 0E8A7310136F4A4600453C80 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* Binpack */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Binpack" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Binpack; + productInstallPath = "$(HOME)/bin"; + productName = Binpack; + productReference = 8DD76F6C0486A84900D96B5E /* Binpack */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "binpack" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* Binpack */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* Binpack */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* binpack.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Binpack; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Binpack; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Binpack; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Binpack; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Binpack" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "binpack" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile new file mode 100644 index 0000000000..276b4752bd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile @@ -0,0 +1,61 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=dining_philosophers +ARGS= auto 5 +LIGHT_ARGS= auto 3 + +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: dining_philosophers.cpp + $(CXX) -O2 -DNDEBUG -D_CONSOLE $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) + +debug: dining_philosophers.cpp + $(CXX) -O0 -D_CONSOLE -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) + +clean: + rm -f $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +light_test: + ./$(PROG) $(LIGHT_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile.windows new file mode 100644 index 0000000000..9c6c60de39 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/Makefile.windows @@ -0,0 +1,54 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=dining_philosophers +ARGS= auto 5 +LIGHT_ARGS= auto 3 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: + $(CXX) ./dining_philosophers.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: + $(CXX) ./dining_philosophers.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +light_test: + $(PROG) $(LIGHT_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/dining_philosophers.cpp b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/dining_philosophers.cpp new file mode 100644 index 0000000000..f7e0109bd3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/dining_philosophers.cpp @@ -0,0 +1,320 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if _MSC_VER + // Suppress "decorated name length exceeded, name was truncated" warning + #pragma warning (disable: 4503) +#endif + +#include "tbb/flow_graph.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "tbb/atomic.h" +#include "tbb/spin_mutex.h" +#include +#include "../../common/utility/utility.h" +#include +#include + +#if _WIN32 || _WIN64 +#include "windows.h" +#define SLEEP(a) Sleep(a*1000) +#else +#define SLEEP(a) sleep(a) +#endif + +// Each philosopher is an object, and is invoked in the think() function_node, the +// eat() function_node and forward() multifunction_node. +// +// The graph is constructed, and each think() function_node is started with a continue_msg. +// +// The philosopher will think, then gather two chopsticks, eat, place the chopsticks back, +// and if they have not completed the required number of cycles, will start to think() again +// by sending a continue_msg to their corresponding think() function_node. +// +// The reserving join has as its inputs the left and right chopstick queues an a queue +// that stores the continue_msg emitted by the function_node after think()ing is done. +// When all three inputs are available, a tuple of the inputs will be forwarded to the +// eat() function_node. The output of the eat() function_node is sent to the forward() +// multifunction_node. + +const int think_time = 1; +const int eat_time = 1; +const int num_times = 10; + +tbb::tick_count t0; +bool verbose = false; + +const char *names[] = { "Archimedes", "Bakunin", "Confucius", "Democritus", "Euclid" + , "Favorinus", "Geminus", "Heraclitus", "Ichthyas", "Jason of Nysa", + "Kant", "Lavrov", "Metrocles", "Nausiphanes", "Onatas", "Phaedrus", + "Quillot", "Russell", "Socrates", "Thales", "Udayana", + "Vernadsky", "Wittgenstein", "Xenophilus", "Yen Yuan", "Zenodotus" +}; +const int NumPhilosophers = sizeof(names) / sizeof(char*); + +struct RunOptions { + utility::thread_number_range threads; + int number_of_philosophers; + bool silent; + RunOptions(utility::thread_number_range threads_, int number_of_philosophers_, bool silent_) : + threads(threads_), number_of_philosophers(number_of_philosophers_), silent(silent_) { } +}; + +RunOptions ParseCommandLine(int argc, char *argv[]) { + int auto_threads = tbb::task_scheduler_init::default_num_threads(); + utility::thread_number_range threads(tbb::task_scheduler_init::default_num_threads, auto_threads, auto_threads); + int nPhilosophers = 5; + bool verbose = false; + char charbuf[100]; + std::sprintf(charbuf, "%d", NumPhilosophers); + std::string pCount = "how many philosophers, from 2-"; + pCount += charbuf; + + utility::cli_argument_pack cli_pack; + cli_pack.positional_arg(threads, "n-of_threads", utility::thread_number_range_desc) + .positional_arg(nPhilosophers, "n-of-philosophers", pCount) + .arg(verbose,"verbose","verbose output"); + utility::parse_cli_arguments(argc, argv, cli_pack); + if(nPhilosophers < 2 || nPhilosophers > NumPhilosophers) { + std::cout << "Number of philosophers (" << nPhilosophers << ") out of range [2:" << NumPhilosophers << "]\n"; + std::cout << cli_pack.usage_string(argv[0]) << std::flush; + std::exit(1); + } + return RunOptions(threads, nPhilosophers,!verbose); +} + + +tbb::spin_mutex my_mutex; + +class chopstick {}; + +using namespace tbb::flow; + +typedef tbb::flow::tuple join_output; +typedef join_node< join_output, reserving > join_node_type; + +typedef function_node think_node_type; +typedef function_node eat_node_type; +typedef multifunction_node forward_node_type; + +class philosopher { +public: + + philosopher( const char *name ) : + my_name(name), my_count(num_times) { } + + ~philosopher() { + } + + void check(); + const char *name() const { return my_name; } + +private: + + friend std::ostream& operator<<(std::ostream& o, philosopher const &p); + + const char *my_name; + int my_count; + + friend class think_node_body; + friend class eat_node_body; + friend class forward_node_body; + + void think( ); + void eat(); + void forward( const continue_msg &in, forward_node_type::output_ports_type &out_ports ); +}; + +std::ostream& operator<<(std::ostream& o, philosopher const &p) { + o << "< philosopher[" << reinterpret_cast(const_cast(&p)) << "] " << p.name() + << ", my_count=" << p.my_count; + return o; +} + +class think_node_body { + philosopher& my_philosopher; +public: + think_node_body( philosopher &p ) : my_philosopher(p) { } + think_node_body( const think_node_body &other ) : my_philosopher(other.my_philosopher) { } + continue_msg operator()( continue_msg /*m*/) { + my_philosopher.think(); + return continue_msg(); + } +}; + +class eat_node_body { + philosopher &my_philosopher; +public: + eat_node_body( philosopher &p) : my_philosopher(p) {} + eat_node_body( const eat_node_body &other ) : my_philosopher(other.my_philosopher) { } + continue_msg operator()(const join_output &in) { + my_philosopher.eat(); + return continue_msg(); + } +}; + +class forward_node_body { + philosopher &my_philosopher; +public: + forward_node_body( philosopher &p) : my_philosopher(p) {} + forward_node_body( const forward_node_body &other ) : my_philosopher(other.my_philosopher) { } + void operator()( const continue_msg &in, forward_node_type::output_ports_type &out) { + my_philosopher.forward( in, out); + } +}; + +void philosopher::check() { + if ( my_count != 0 ) { + std::printf("ERROR: philosopher %s still had to run %d more times\n", name(), my_count); + std::exit(1); + } +} + +void philosopher::forward( const continue_msg &/*in*/, forward_node_type::output_ports_type &out_ports ) { + if(my_count < 0) abort(); + --my_count; + (void)tbb::flow::get<1>(out_ports).try_put(chopstick()); + (void)tbb::flow::get<2>(out_ports).try_put(chopstick()); + if (my_count > 0) { + (void)tbb::flow::get<0>(out_ports).try_put(continue_msg()); //start thinking again + } else { + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::printf("%s has left the building\n", name()); + } + } +} + +void philosopher::eat() { + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::printf("%s eating\n", name()); + } + SLEEP(eat_time); + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::printf("%s done eating\n", name()); + } +} + +void philosopher::think() { + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::printf("%s thinking\n", name()); + } + SLEEP(think_time); + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::printf("%s done thinking\n", name()); + } +} + +typedef queue_node thinking_done_type; + +int main(int argc, char *argv[]) { + try { + tbb::tick_count main_time = tbb::tick_count::now(); + int num_threads; + int num_philosophers; + + RunOptions options = ParseCommandLine(argc, argv); + num_philosophers = options.number_of_philosophers; + verbose = !options.silent; + + for(num_threads = options.threads.first; num_threads <= options.threads.last; num_threads = options.threads.step(num_threads)) { + + tbb::task_scheduler_init init(num_threads); + + graph g; + + if(verbose) std::cout << std::endl << num_philosophers << " philosophers with " + << num_threads << " threads" << std::endl << std::endl; + t0 = tbb::tick_count::now(); + + std::vector > places(num_philosophers, queue_node(g)); + std::vector philosophers; + philosophers.reserve(num_philosophers); + std::vector think_nodes; + think_nodes.reserve(num_philosophers); + std::vector done_vector(num_philosophers, thinking_done_type(g)); + std::vector join_vector(num_philosophers,join_node_type(g)); + std::vector eat_nodes; + eat_nodes.reserve(num_philosophers); + std::vector forward_nodes; + forward_nodes.reserve(num_philosophers); + for ( int i = 0; i < num_philosophers; ++i ) { + places[i].try_put(chopstick()); + philosophers.push_back( philosopher( names[i] ) ); // allowed because of default generated assignment + if(verbose) { + tbb::spin_mutex::scoped_lock lock(my_mutex); + std::cout << "Built philosopher " << philosophers[i] << std::endl; + } + think_nodes.push_back(new think_node_type(g, unlimited, think_node_body(philosophers[i]))); + eat_nodes.push_back( new eat_node_type(g, unlimited, eat_node_body(philosophers[i]))); + forward_nodes.push_back( new forward_node_type(g, unlimited, forward_node_body(philosophers[i]))); + } + + // attach chopstick buffers and think function_nodes to joins + for(int i = 0; i < num_philosophers; ++i) { + make_edge( *think_nodes[i], done_vector[i] ); + make_edge( done_vector[i], input_port<0>(join_vector[i]) ); + make_edge( places[i], input_port<1>(join_vector[i]) ); // left chopstick + make_edge( places[(i+1) % num_philosophers], input_port<2>(join_vector[i]) ); // right chopstick + make_edge( join_vector[i], *eat_nodes[i] ); + make_edge( *eat_nodes[i], *forward_nodes[i] ); + make_edge( output_port<0>(*forward_nodes[i]), *think_nodes[i] ); + make_edge( output_port<1>(*forward_nodes[i]), places[i] ); + make_edge( output_port<2>(*forward_nodes[i]), places[(i+1) % num_philosophers] ); + } + + // start all the philosophers thinking + for(int i = 0; i < num_philosophers; ++i) think_nodes[i]->try_put(continue_msg()); + + g.wait_for_all(); + + tbb::tick_count t1 = tbb::tick_count::now(); + if(verbose) std::cout << std::endl << num_philosophers << " philosophers with " + << num_threads << " threads have taken " << (t1-t0).seconds() << "seconds" << std::endl; + + for ( int i = 0; i < num_philosophers; ++i ) philosophers[i].check(); + + for(int i = 0; i < num_philosophers; ++i) { + delete think_nodes[i]; + delete eat_nodes[i]; + delete forward_nodes[i]; + } + } + + utility::report_elapsed_time((tbb::tick_count::now() - main_time).seconds()); + return 0; + } catch(std::exception& e) { + std::cerr<<"error occurred. error text is :\"" < + + +

Overview

+The Dining Philosophers problem demonstrates tbb::flow and the use of the reserving join node to +solve the potential deadlock. +
This program runs some number of philosophers in parallel, each thinking and then waiting for chopsticks +to be available before eating. Eating and thinking are implemented with sleep(). The chopstick positions are represented by a queue_node with one item. + +

Source Files

+
+
dining_philosophers.cpp +
Source code for the example. +
Makefile, Makefile.windows +
Makefiles for building example. +
+ +

Directories

+
+
src +
Contains source file mentioned above. +
msvs +
Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
xcode +
Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
+ +

To Build

+General build directions can be found here. +

+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.icproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.icproj new file mode 100644 index 0000000000..c27e1791bb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.vcproj new file mode 100644 index 0000000000..d49c0b128f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_cl.sln new file mode 100644 index 0000000000..ed55faa113 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{3EC5FFF9-397F-47A7-BAF9-FDD602956644}") = "dining_philosophers", "dining_philosophers.vcproj", "{3894D1D2-A574-4937-AD56-726758EFE5B7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|Win32.ActiveCfg = Debug|Win32 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|Win32.Build.0 = Debug|Win32 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|x64.ActiveCfg = Debug|x64 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Debug|x64.Build.0 = Debug|x64 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|Win32.ActiveCfg = Release|Win32 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|Win32.Build.0 = Release|Win32 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|x64.ActiveCfg = Release|x64 + {3894D1D2-A574-4937-AD56-726758EFE5B7}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_icl.sln new file mode 100644 index 0000000000..d86e64bf49 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/msvs/dining_philosophers_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{b651a8c1-851b-4873-ab7a-428d9f15be2d}") = "dining_philosophers", "dining_philosophers.icproj", "{bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Debug|Win32.ActiveCfg = Debug|Win32 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Debug|Win32.Build.0 = Debug|Win32 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Debug|x64.ActiveCfg = Debug|x64 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Debug|x64.Build.0 = Debug|x64 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Release|Win32.ActiveCfg = Release|Win32 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Release|Win32.Build.0 = Release|Win32 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Release|x64.ActiveCfg = Release|x64 + {bbdf68ee-c8b2-4836-b3fc-385ce2265dc0}.Release|x64.Build.0 = Release|x64 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Release|x64.Build.0 = Release|x64 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Release|x64.ActiveCfg = Release|x64 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Release|Win32.Build.0 = Release|Win32 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Release|Win32.ActiveCfg = Release|Win32 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Debug|x64.Build.0 = Debug|x64 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Debug|x64.ActiveCfg = Debug|x64 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Debug|Win32.Build.0 = Debug|Win32 + {3894d1d2-a574-4937-ad56-726758efe5b7}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/xcode/dining_philosophers.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/xcode/dining_philosophers.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..fc048821d8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/dining_philosophers/xcode/dining_philosophers.xcodeproj/project.pbxproj @@ -0,0 +1,305 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A1F593A60B8F042A00073279 /* dining_philosophers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* dining_philosophers.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8DD76F6C0486A84900D96B5E /* dining_philosophers */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = dining_philosophers; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* dining_philosophers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = dining_philosophers.cpp; path = ../dining_philosophers.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* dining_philosophers */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = dining_philosophers; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A1F593A50B8F042A00073279 /* dining_philosophers.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* dining_philosophers */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* dining_philosophers */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "dining_philosophers" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = dining_philosophers; + productInstallPath = "$(HOME)/bin"; + productName = dining_philosophers; + productReference = 8DD76F6C0486A84900D96B5E /* dining_philosophers */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "dining_philosophers" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* dining_philosophers */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* dining_philosophers */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* dining_philosophers.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = dining_philosophers; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = dining_philosophers; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = dining_philosophers; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = dining_philosophers; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "dining_philosophers" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "dining_philosophers" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/index.html b/deal.II/bundled/tbb41_20130401oss/examples/graph/index.html new file mode 100644 index 0000000000..decf7f4a67 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/index.html @@ -0,0 +1,28 @@ + + + +

Overview

+This directory has examples of tbb::flow. + +

Directories

+
+
dining_philosophers +
An implementation of dining philosophers in graph using the reserving join node. +
binpack +
A solution to the binpacking problem using a queue_node, a buffer_node and function_nodes. +
logic_sim +
A simplistic example of a collection of digital logic gates that can be easily composed into larger circuits. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/D_latch.h b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/D_latch.h new file mode 100644 index 0000000000..568446e776 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/D_latch.h @@ -0,0 +1,64 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBBexample_graph_logicsim_dlatch_H +#define __TBBexample_graph_logicsim_dlatch_H 1 + +#include "basics.h" + +class D_latch { + broadcast_node D_port; + broadcast_node E_port; + not_gate a_not; + and_gate first_and; + and_gate second_and; + nor_gate first_nor; + nor_gate second_nor; + graph& my_graph; + public: + D_latch(graph& g) : my_graph(g), D_port(g), E_port(g), a_not(g), first_and(g), second_and(g), + first_nor(g), second_nor(g) + { + make_edge(D_port, a_not.get_in(0)); + make_edge(D_port, second_and.get_in(1)); + make_edge(E_port, first_and.get_in(1)); + make_edge(E_port, second_and.get_in(0)); + make_edge(a_not.get_out(), first_and.get_in(0)); + make_edge(first_and.get_out(), first_nor.get_in(0)); + make_edge(second_and.get_out(), second_nor.get_in(1)); + make_edge(first_nor.get_out(), second_nor.get_in(0)); + make_edge(second_nor.get_out(), first_nor.get_in(1)); + } + ~D_latch() {} + receiver& get_D() { return D_port; } + receiver& get_E() { return E_port; } + sender& get_Q() { return first_nor.get_out(); } + sender& get_notQ() { return second_nor.get_out(); } +}; + +#endif /* __TBBexample_graph_logicsim_dlatch_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile new file mode 100644 index 0000000000..735ffda4ce --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile @@ -0,0 +1,63 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=test_all +ARGS=4 +PERF_RUN_ARGS=auto silent + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # which icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $(PROG).cpp -ltbb $(LIBS) $(CXX0XFLAGS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $(PROG).cpp -ltbb_debug $(LIBS) $(CXX0XFLAGS) +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile.windows new file mode 100644 index 0000000000..a8cd0ef173 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/Makefile.windows @@ -0,0 +1,61 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. +PROG=test_all +ARGS=4 +PERF_RUN_ARGS=auto silent + +# Try to find icl.exe +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test + +release: *.cpp + $(CXX) $(PROG).cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe + +debug: *.cpp + $(CXX) $(PROG).cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe + +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest + +test: + $(PROG) $(ARGS) + +compiler_check: + @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + +perf_build: release + +perf_run: + $(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/basics.h b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/basics.h new file mode 100644 index 0000000000..085c929cff --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/basics.h @@ -0,0 +1,543 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBBexample_graph_logicsim_basics_H +#define __TBBexample_graph_logicsim_basics_H 1 + +#define TBB_PREVIEW_GRAPH_NODES 1 + +#include +#include +#include "tbb/atomic.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "tbb/flow_graph.h" +#include "../../common/utility/utility.h" + +#ifndef _WIN32 +#include +#include + +void rt_sleep(int msec) { + usleep(msec*1000); +} + +#else //_WIN32 + +#undef OLDUNIXTIME +#undef STDTIME + +#include + +void rt_sleep(int msec) { + Sleep(msec); +} +#endif /* _WIN32 */ + + +using namespace std; +using namespace tbb; +using namespace tbb::flow; + +typedef enum { low=0, high, undefined } signal_t; + +typedef tuple one_input; +typedef tuple two_input; +typedef tuple three_input; +typedef tuple four_input; + +template +struct gate_helper { + template + static inline receiver& get_inport(or_node& in_ports, int port) { + if (N-1 == port) return input_port(in_ports); + else return gate_helper::get_inport(in_ports, port); + } +}; +template <> +struct gate_helper<1> { + template + static inline receiver& get_inport(or_node& in_ports, int port) { + return input_port<0>(in_ports); + } +}; + +template +class gate { +protected: + typedef or_node input_port_t; + typedef multifunction_node< typename input_port_t::output_type, tuple > gate_fn_t; + typedef typename gate_fn_t::output_ports_type ports_type; +public: + static const int N = tbb::flow::tuple_size::value; + + template + gate(graph& g, Body b) : my_graph(g), in_ports(g), gate_fn(g, 1, b) { + make_edge(in_ports, gate_fn); + } + virtual ~gate() {} + gate& operator=(const gate& src) { return *this; } + sender& get_out() { return output_port<0>(gate_fn); } + receiver& get_in(size_t port) { + return gate_helper::get_inport(in_ports, (int)port); + } +protected: + graph& my_graph; +private: + input_port_t in_ports; + gate_fn_t gate_fn; +}; + + +template +struct or_output_helper { + template + static inline signal_t get_or_output(const OrOutputType& out) { + if (N-1 == out.indx) return tbb::flow::get(out.result); + else return or_output_helper::get_or_output(out); + } +}; +template <> +struct or_output_helper<1> { + template + static inline signal_t get_or_output(const OrOutputType& out) { + return tbb::flow::get<0>(out.result); + } +}; + +// Input devices +class steady_signal { + graph& my_graph; + signal_t init_signal; + write_once_node signal_node; + public: + steady_signal(graph& g, signal_t v) : + my_graph(g), init_signal(v), signal_node(g) {} + steady_signal(const steady_signal& src) : + my_graph(src.my_graph), init_signal(src.init_signal), + signal_node(src.my_graph) {} + ~steady_signal() {} + // Assignment is ignored + steady_signal& operator=(const steady_signal& src) { return *this; } + sender& get_out() { return signal_node; } + void activate() { signal_node.try_put(init_signal); } +}; + +class pulse { + class clock_body { + size_t& ms; + int& reps; + signal_t val; + public: + clock_body(size_t& _ms, int& _reps) : ms(_ms), reps(_reps), val(low) {} + bool operator()(signal_t& out) { + rt_sleep((int)ms); + if (reps>0) --reps; + if (val==low) val = high; + else val = low; + out = val; + return reps>0 || reps == -1; + } + }; + graph& my_graph; + size_t ms, init_ms; + int reps, init_reps; + source_node clock_node; + +public: + pulse(graph& g, size_t _ms=1000, int _reps=-1) : + my_graph(g), ms(_ms), init_ms(_ms), reps(_reps), init_reps(_reps), + clock_node(g, clock_body(ms, reps), false) + {} + pulse(const pulse& src) : + my_graph(src.my_graph), ms(src.init_ms), init_ms(src.init_ms), + reps(src.init_reps), init_reps(src.init_reps), + clock_node(src.my_graph, clock_body(ms, reps), false) + {} + ~pulse() {} + // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph + pulse& operator=(const pulse& src) { + ms = src.ms; init_ms = src.init_ms; reps = src.reps; init_reps = src.init_reps; + return *this; + } + sender& get_out() { return clock_node; } + void activate() { clock_node.activate(); } + void reset() { reps = init_reps; } +}; + +class push_button { + graph& my_graph; + overwrite_node push_button_node; + public: + push_button(graph& g) : my_graph(g), push_button_node(g) { + push_button_node.try_put(low); + } + push_button(const push_button& src) : + my_graph(src.my_graph), push_button_node(src.my_graph) { + push_button_node.try_put(low); + } + ~push_button() {} + // Assignment is ignored + push_button& operator=(const push_button& src) { return *this; } + sender& get_out() { return push_button_node; } + void press() { push_button_node.try_put(high); } + void release() { push_button_node.try_put(low); } +}; + +class toggle { + graph& my_graph; + signal_t state; + overwrite_node toggle_node; + public: + toggle(graph& g) : my_graph(g), state(undefined), toggle_node(g) {} + toggle(const toggle& src) : my_graph(src.my_graph), state(undefined), + toggle_node(src.my_graph) {} + ~toggle() {} + // Assignment ignored + toggle& operator=(const toggle& src) { return *this; } + sender& get_out() { return toggle_node; } + void flip() { + if (state==high) state = low; + else state = high; + toggle_node.try_put(state); + } + void activate() { + state = low; + toggle_node.try_put(state); + } +}; + +// Basic gates +class buffer : public gate { + using gate::my_graph; + typedef gate::ports_type ports_type; + class buffer_body { + signal_t state; + bool touched; + public: + buffer_body() : state(undefined), touched(false) {} + void operator()(const input_port_t::output_type &v, ports_type& p) { + if (!touched || state != tbb::flow::get<0>(v.result)) { + state = tbb::flow::get<0>(v.result); + tbb::flow::get<0>(p).try_put(state); + touched = true; + } + } + }; +public: + buffer(graph& g) : gate(g, buffer_body()) {} + buffer(const buffer& src) : gate(src.my_graph, buffer_body()) {} + ~buffer() {} +}; + +class not_gate : public gate { + using gate::my_graph; + typedef gate::ports_type ports_type; + class not_body { + signal_t port; + bool touched; + public: + not_body() : port(undefined), touched(false) {} + void operator()(const input_port_t::output_type &v, ports_type& p) { + if (!touched || port != tbb::flow::get<0>(v.result)) { + port = tbb::flow::get<0>(v.result); + signal_t state = low; + if (port==low) state = high; + tbb::flow::get<0>(p).try_put(state); + touched = true; + } + } + }; + public: + not_gate(graph& g) : gate(g, not_body()) {} + not_gate(const not_gate& src) : gate(src.my_graph, not_body()) {} + ~not_gate() {} +}; + +template +class and_gate : public gate { + using gate::N; + using gate::my_graph; + typedef typename gate::ports_type ports_type; + typedef typename gate::input_port_t::output_type from_input; + typedef or_output_helper< gate::N > or_output; + class and_body { + signal_t *ports; + signal_t state; + bool touched; + public: + and_body() : state(undefined), touched(false) { + ports = new signal_t[N]; + for (int i=0; i(p).try_put(state); + touched = true; + } + } + }; + public: + and_gate(graph& g) : gate(g, and_body()) {} + and_gate(const and_gate& src) : gate(src.my_graph, and_body()) {} + ~and_gate() {} +}; + +template +class or_gate : public gate { + using gate::N; + using gate::my_graph; + typedef typename gate::ports_type ports_type; + typedef typename gate::input_port_t::output_type from_input; + typedef or_output_helper< gate::N > or_output; + class or_body { + signal_t *ports; + signal_t state; + bool touched; + public: + or_body() : state(undefined), touched(false) { + ports = new signal_t[N]; + for (int i=0; i(p).try_put(state); + touched = true; + } + } + }; +public: + or_gate(graph& g) : gate(g, or_body()) {} + or_gate(const or_gate& src) : gate(src.my_graph, or_body()) {} + ~or_gate() {} +}; + +template +class xor_gate : public gate { + using gate::N; + using gate::my_graph; + typedef typename gate::ports_type ports_type; + typedef typename gate::input_port_t input_port_t; + typedef or_output_helper< gate::N > or_output; + class xor_body { + signal_t *ports; + signal_t state; + bool touched; + public: + xor_body() : state(undefined), touched(false) { + ports = new signal_t[N]; + for (int i=0; i 0) { new_state = low; break; } + else if (ports[i] == high ) { ++highs; } + ++i; + } + if (!touched || state != new_state) { + state = new_state; + tbb::flow::get<0>(p).try_put(state); + touched = true; + } + } + }; + public: + xor_gate(graph& g) : gate(g, xor_body()) {} + xor_gate(const xor_gate& src) : gate(src.my_graph, xor_body()) {} + ~xor_gate() {} +}; + +template +class nor_gate : public gate { + using gate::N; + using gate::my_graph; + typedef typename gate::ports_type ports_type; + typedef typename gate::input_port_t input_port_t; + typedef or_output_helper< gate::N > or_output; + class nor_body { + signal_t *ports; + signal_t state; + bool touched; + public: + nor_body() : state(undefined), touched(false) { + ports = new signal_t[N]; + for (int i=0; i(p).try_put(state); + touched = true; + } + } + }; + public: + nor_gate(graph& g) : gate(g, nor_body()) {} + nor_gate(const nor_gate& src) : gate(src.my_graph, nor_body()) {} + ~nor_gate() {} +}; + +// Output devices +class led { + class led_body { + signal_t &state; + string &label; + bool report_changes; + bool touched; + public: + led_body(signal_t &s, string &l, bool r) : + state(s), label(l), report_changes(r), touched(false) + {} + continue_msg operator()(signal_t b) { + if (!touched || b!=state) { + state = b; + if (state != undefined && report_changes) { + if (state) printf("%s: (*)\n", label.c_str()); + else printf("%s: ( )\n", label.c_str()); + } + touched = false; + } + return continue_msg(); + } + }; + graph& my_graph; + string label; + signal_t state; + bool report_changes; + function_node led_node; + public: + led(graph& g, string l, bool rc=false) : my_graph(g), label(l), state(undefined), + report_changes(rc), + led_node(g, 1, led_body(state, label, report_changes)) + {} + led(const led& src) : my_graph(src.my_graph), label(src.label), state(undefined), + report_changes(src.report_changes), + led_node(src.my_graph, 1, led_body(state, label, report_changes)) + {} + ~led() {} + // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph + // state is set to undefined so that next signal changes it + led& operator=(const led& src) { + label = src.label; state = undefined; report_changes = src.report_changes; + return *this; + } + receiver& get_in() { return led_node; } + void display() { + if (state == high) printf("%s: (*)\n", label.c_str()); + else if (state == low) printf("%s: ( )\n", label.c_str()); + else printf("%s: (u)\n", label.c_str()); + } + signal_t get_value() { return state; } +}; + +class digit : public gate { + using gate::my_graph; + typedef gate::ports_type ports_type; + typedef gate::input_port_t input_port_t; + class digit_body { + signal_t ports[4]; + unsigned int &state; + string &label; + bool& report_changes; + public: + digit_body(unsigned int &s, string &l, bool& r) : state(s), label(l), report_changes(r) { + for (int i=0; i(v.result); + else if (v.indx == 1) ports[1] = tbb::flow::get<1>(v.result); + else if (v.indx == 2) ports[2] = tbb::flow::get<2>(v.result); + else if (v.indx == 3) ports[3] = tbb::flow::get<3>(v.result); + if (ports[0] == high) ++new_state; + if (ports[1] == high) new_state += 2; + if (ports[2] == high) new_state += 4; + if (ports[3] == high) new_state += 8; + if (state != new_state) { + state = new_state; + if (report_changes) { + printf("%s: %x\n", label.c_str(), state); + } + } + } + }; + string label; + unsigned int state; + bool report_changes; + public: + digit(graph& g, string l, bool rc=false) : + gate(g, digit_body(state, label, report_changes)), + label(l), state(0), report_changes(rc) {} + digit(const digit& src) : + gate(src.my_graph, digit_body(state, label, report_changes)), + label(src.label), state(0), report_changes(src.report_changes) {} + ~digit() {} + // Assignment changes the behavior of LHS to that of the RHS, but doesn't change owning graph. + // state is reset as in constructors + digit& operator=(const digit& src) { + label = src.label; state = 0; report_changes = src.report_changes; + return *this; + } + void display() { printf("%s: %x\n", label.c_str(), state); } + unsigned int get_value() { return state; } +}; + +#endif /* __TBBexample_graph_logicsim_basics_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/four_bit_adder.h b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/four_bit_adder.h new file mode 100644 index 0000000000..81fc06367e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/four_bit_adder.h @@ -0,0 +1,70 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBBexample_graph_logicsim_fba_H +#define __TBBexample_graph_logicsim_fba_H 1 + +#include "one_bit_adder.h" + +class four_bit_adder { + graph& my_graph; + std::vector four_adders; + public: + four_bit_adder(graph& g) : my_graph(g), four_adders(4, one_bit_adder(g)) { + make_connections(); + } + four_bit_adder(const four_bit_adder& src) : + my_graph(src.my_graph), four_adders(4, one_bit_adder(src.my_graph)) + { + make_connections(); + } + ~four_bit_adder() {} + receiver& get_A(size_t bit) { + return four_adders[bit].get_A(); + } + receiver& get_B(size_t bit) { + return four_adders[bit].get_B(); + } + receiver& get_CI() { + return four_adders[0].get_CI(); + } + sender& get_out(size_t bit) { + return four_adders[bit].get_out(); + } + sender& get_CO() { + return four_adders[3].get_CO(); + } +private: + void make_connections() { + make_edge(four_adders[0].get_CO(), four_adders[1].get_CI()); + make_edge(four_adders[1].get_CO(), four_adders[2].get_CI()); + make_edge(four_adders[2].get_CO(), four_adders[3].get_CI()); + } +}; + +#endif /* __TBBexample_graph_logicsim_fba_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/index.html b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/index.html new file mode 100644 index 0000000000..13411c20bb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/index.html @@ -0,0 +1,67 @@ + + + +

Overview

+ +This directory contains a simple tbb::flow example that performs +simplistic digital logic simulations with basic logic gates that can +be easily composed to create more interesting circuits. It +exemplifies the multifunction_node and the or_node CPF, among others. + +

Files

+
+
basics.h +
Several I/O devices and basic gates. +
one_bit_adder.h +
A one-bit full adder composed of basic gates. +
four_bit_adder.h +
A four-bit full adder composed of one-bit adders. +
D_latch.h +
A D-latch composed of basic gates. +
test_all.cpp +
A simple test program that exercises the code in the headers. + +
Makefile +
Makefile for building example. + +
+ +

Directories

+
+
msvs +
Contains Microsoft* Visual Studio* 2008 workspace for building and running the example with the Intel® C++ compiler (Windows* systems only). +
xcode +
Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
+ +

To Build

+General build directions can be found here. +

+ +

Usage

+
+ +
test_all -h +
Prints the help for command line options +
test_all [#threads=value] [verbose] [silent] [#threads] +
#threads is the number of threads to use; a range of the form low[:high] where low and optional high are non-negative integers, or 'auto' for the TBB default.
+ verbose print diagnostic output to screen
+ silent limits output to timing info; overrides verbose
+ +
To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
Build a debug version of the example + (see the build directions). +
Run it with the desired number of threads, e.g., test_all 4. +
+ +
+Up to parent directory +

+Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

+Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

+* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_cl.sln new file mode 100644 index 0000000000..a28e18b6a3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_cl.sln @@ -0,0 +1,52 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_all", "test_all.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|Win32.ActiveCfg = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|Win32.Build.0 = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|x64.ActiveCfg = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Debug|x64.Build.0 = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|Win32.ActiveCfg = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|Win32.Build.0 = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|x64.ActiveCfg = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.Release|x64.Build.0 = Release|x64 + + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.Release|x64.Build.0 = Release|x64 + + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.Release|x64.Build.0 = Release|x64 + + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_icl.sln new file mode 100644 index 0000000000..f269562d52 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/logic_sim_icl.sln @@ -0,0 +1,132 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "test_all", "test_all.icproj", "{2D08E05F-D0E0-48A7-9597-28B95ACE70B6}" + ProjectSection(ProjectDependencies) = postProject + {5F685DBD-9A04-4E94-A1CA-FC48FE799830} = {5F685DBD-9A04-4E94-A1CA-FC48FE799830} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|x64.Build.0 = DDDebug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|Win32.Build.0 = DDRelease|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|x64.ActiveCfg = DDRelease|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|x64.Build.0 = DDRelease|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|Win32.Build.0 = Debug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|x64.ActiveCfg = Debug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|x64.Build.0 = Debug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|Win32.ActiveCfg = Release|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|Win32.Build.0 = Release|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|x64.ActiveCfg = Release|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|x64.Build.0 = Release|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|x64.Build.0 = DDDebug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|Win32.Build.0 = DDRelease|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|x64.ActiveCfg = DDRelease|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|x64.Build.0 = DDRelease|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|Win32.Build.0 = Debug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|x64.ActiveCfg = Debug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|x64.Build.0 = Debug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|Win32.ActiveCfg = Release|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|Win32.Build.0 = Release|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|x64.ActiveCfg = Release|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|x64.Build.0 = Release|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|x64.Build.0 = DDDebug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|Win32.Build.0 = DDRelease|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|x64.ActiveCfg = DDRelease|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|x64.Build.0 = DDRelease|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|Win32.Build.0 = Debug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|x64.ActiveCfg = Debug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|x64.Build.0 = Debug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|Win32.ActiveCfg = Release|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|Win32.Build.0 = Release|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|x64.ActiveCfg = Release|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|x64.Build.0 = Release|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|x64.Build.0 = DDDebug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|Win32.Build.0 = DDRelease|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|x64.ActiveCfg = DDRelease|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|x64.Build.0 = DDRelease|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|Win32.Build.0 = Debug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|x64.ActiveCfg = Debug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|x64.Build.0 = Debug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|Win32.ActiveCfg = Release|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|Win32.Build.0 = Release|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|x64.ActiveCfg = Release|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|x64.Build.0 = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|Win32.ActiveCfg = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|x64.ActiveCfg = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|Win32.ActiveCfg = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|x64.ActiveCfg = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.Build.0 = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.ActiveCfg = Debug|x64 +y {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.Build.0 = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.ActiveCfg = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.Build.0 = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.ActiveCfg = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.icproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.icproj new file mode 100644 index 0000000000..259a8ced66 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.vcproj new file mode 100644 index 0000000000..9c6565bd05 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/msvs/test_all.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/one_bit_adder.h b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/one_bit_adder.h new file mode 100644 index 0000000000..f0abd80c3d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/one_bit_adder.h @@ -0,0 +1,82 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBBexample_graph_logicsim_oba_H +#define __TBBexample_graph_logicsim_oba_H 1 + +#include "basics.h" + +class one_bit_adder { + broadcast_node A_port; + broadcast_node B_port; + broadcast_node CI_port; + xor_gate FirstXOR; + xor_gate SecondXOR; + and_gate FirstAND; + and_gate SecondAND; + or_gate FirstOR; + graph& my_graph; +public: + one_bit_adder(graph& g) : my_graph(g), A_port(g), B_port(g), CI_port(g), FirstXOR(g), + SecondXOR(g), FirstAND(g), SecondAND(g), FirstOR(g) { + make_connections(); + } + one_bit_adder(const one_bit_adder& src) : + my_graph(src.my_graph), A_port(src.my_graph), B_port(src.my_graph), + CI_port(src.my_graph), FirstXOR(src.my_graph), SecondXOR(src.my_graph), + FirstAND(src.my_graph), SecondAND(src.my_graph), FirstOR(src.my_graph) + { + make_connections(); + } + + ~one_bit_adder() {} + receiver& get_A() { return A_port; } + receiver& get_B() { return B_port; } + receiver& get_CI() { return CI_port; } + sender& get_out() { + return SecondXOR.get_out(); + } + sender& get_CO() { + return FirstOR.get_out(); + } +private: + void make_connections() { + make_edge(A_port, FirstXOR.get_in(0)); + make_edge(A_port, FirstAND.get_in(0)); + make_edge(B_port, FirstXOR.get_in(1)); + make_edge(B_port, FirstAND.get_in(1)); + make_edge(CI_port, SecondXOR.get_in(1)); + make_edge(CI_port, SecondAND.get_in(1)); + make_edge(FirstXOR.get_out(), SecondXOR.get_in(0)); + make_edge(FirstXOR.get_out(), SecondAND.get_in(0)); + make_edge(SecondAND.get_out(), FirstOR.get_in(0)); + make_edge(FirstAND.get_out(), FirstOR.get_in(1)); + } +}; + +#endif /* __TBBexample_graph_logicsim_oba_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/test_all.cpp b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/test_all.cpp new file mode 100644 index 0000000000..276dde9fbe --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/graph/logic_sim/test_all.cpp @@ -0,0 +1,577 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if _MSC_VER +#pragma warning (disable: 4503) // Suppress "decorated name length exceeded, name was truncated" warning +#endif + +#include "basics.h" +#include "one_bit_adder.h" +#include "four_bit_adder.h" +#include "D_latch.h" +#include + +// User-specified globals with default values +bool verbose = false; // prints bin details and other diagnostics to screen +bool silent = false; // suppress all output except for time + +int get_default_num_threads() { + static int threads = 0; + if (threads == 0) + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +int main(int argc, char *argv[]) { + try { + utility::thread_number_range threads(get_default_num_threads); + utility::parse_cli_arguments(argc, argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"#threads",utility::thread_number_range_desc) + .arg(verbose,"verbose"," print diagnostic output to screen") + .arg(silent,"silent"," limits output to timing info; overrides verbose") + ); + + if (silent) verbose = false; // make silent override verbose + + tick_count start = tick_count::now(); + for(int p = threads.first; p <= threads.last; p = threads.step(p)) { + task_scheduler_init init(p); + if (!silent) cout << "graph test running on " << p << " threads.\n"; + + graph g; + + { // test buffer: 0, 1 + buffer b(g); + toggle input(g); + led output(g, "OUTPUT", false); // false means we will explicitly call display to see LED + + make_edge(input.get_out(), b.get_in(0)); + make_edge(b.get_out(), output.get_in()); + + if (!silent) printf("Testing buffer...\n"); + input.activate(); // 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input.flip(); // 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + } + + { // test not_gate: 0, 1 + not_gate n(g); + toggle input(g); + led output(g, "OUTPUT", false); + + make_edge(input.get_out(), n.get_in(0)); + make_edge(n.get_out(), output.get_in()); + + if (!silent) printf("Testing not_gate...\n"); + input.activate(); // 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input.flip(); // 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + } + + { // test two-input and_gate: 00, 01, 10, 11 + and_gate a(g); + toggle input0(g); + toggle input1(g); + led output(g, "OUTPUT", false); + + make_edge(input0.get_out(), a.get_in(0)); + make_edge(input1.get_out(), a.get_in(1)); + make_edge(a.get_out(), output.get_in()); + + if (!silent) printf("Testing and_gate...\n"); + input1.activate(); input0.activate(); // 0 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input0.flip(); // 0 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input1.flip(); input0.flip(); // 1 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input0.flip(); // 1 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + } + + { // test three-input or_gate: 000, 001, 010, 100, 011, 101, 110, 111 + or_gate o(g); + toggle input0(g); + toggle input1(g); + toggle input2(g); + led output(g, "OUTPUT", false); + + make_edge(input0.get_out(), o.get_in(0)); + make_edge(input1.get_out(), o.get_in(1)); + make_edge(input2.get_out(), o.get_in(2)); + make_edge(o.get_out(), output.get_in()); + + if (!silent) printf("Testing or_gate...\n"); + input2.activate(); input1.activate(); input0.activate(); // 0 0 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input0.flip(); // 0 0 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input1.flip(); input0.flip(); // 0 1 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input2.flip(); input1.flip(); // 1 0 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input2.flip(); input1.flip(); input0.flip(); // 0 1 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input2.flip(); input1.flip(); // 1 0 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input1.flip(); input0.flip(); // 1 1 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input0.flip(); // 1 1 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + } + + { // test two-input xor_gate: 00, 01, 10, 11 + xor_gate x(g); + toggle input0(g); + toggle input1(g); + led output(g, "OUTPUT", false); + + make_edge(input0.get_out(), x.get_in(0)); + make_edge(input1.get_out(), x.get_in(1)); + make_edge(x.get_out(), output.get_in()); + + if (!silent) printf("Testing xor_gate...\n"); + input1.activate(); input0.activate(); // 0 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input0.flip(); // 0 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input1.flip(); input0.flip(); // 1 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input0.flip(); // 1 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + } + + + { // test two-input nor_gate: 00, 01, 10, 11 + nor_gate n(g); + toggle input0(g); + toggle input1(g); + led output(g, "OUTPUT", false); + + make_edge(input0.get_out(), n.get_in(0)); + make_edge(input1.get_out(), n.get_in(1)); + make_edge(n.get_out(), output.get_in()); + + if (!silent) printf("Testing nor_gate...\n"); + input1.activate(); input0.activate(); // 0 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == high); + input0.flip(); // 0 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input1.flip(); input0.flip(); // 1 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + input0.flip(); // 1 1 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == low); + } + + { // test steady_signal and digit + steady_signal input0(g, high); + steady_signal input1(g, low); + and_gate a(g); + or_gate o(g); + xor_gate x(g); + nor_gate n(g); + digit output(g, "OUTPUT", false); + + make_edge(input0.get_out(), a.get_in(0)); + make_edge(input1.get_out(), a.get_in(1)); + make_edge(a.get_out(), output.get_in(0)); + + make_edge(input0.get_out(), o.get_in(0)); + make_edge(input1.get_out(), o.get_in(1)); + make_edge(o.get_out(), output.get_in(1)); + + make_edge(input0.get_out(), x.get_in(0)); + make_edge(input1.get_out(), x.get_in(1)); + make_edge(x.get_out(), output.get_in(2)); + + make_edge(input0.get_out(), n.get_in(0)); + make_edge(input1.get_out(), n.get_in(1)); + make_edge(n.get_out(), output.get_in(3)); + + if (!silent) printf("Testing steady_signal...\n"); + input0.activate(); // 1 + input1.activate(); // 0 + g.wait_for_all(); + if (!silent) output.display(); + assert(output.get_value() == 6); + } + + { // test push_button + push_button p(g); + buffer b(g); + led output(g, "OUTPUT", !silent); // true means print all LED state changes + + make_edge(p.get_out(), b.get_in(0)); + make_edge(b.get_out(), output.get_in()); + + if (!silent) printf("Testing push_button...\n"); + p.press(); + p.release(); + p.press(); + p.release(); + g.wait_for_all(); + } + + { // test one_bit_adder + one_bit_adder my_adder(g); + toggle A(g); + toggle B(g); + toggle CarryIN(g); + led Sum(g, "SUM"); + led CarryOUT(g, "CarryOUT"); + + make_edge(A.get_out(), my_adder.get_A()); + make_edge(B.get_out(), my_adder.get_B()); + make_edge(CarryIN.get_out(), my_adder.get_CI()); + make_edge(my_adder.get_out(), Sum.get_in()); + make_edge(my_adder.get_CO(), CarryOUT.get_in()); + + A.activate(); + B.activate(); + CarryIN.activate(); + + if (!silent) printf("A on\n"); + A.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == high) && (CarryOUT.get_value() == low)); + + if (!silent) printf("A off\n"); + A.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("B on\n"); + B.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == high) && (CarryOUT.get_value() == low)); + if (!silent) printf("B off\n"); + B.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("CarryIN on\n"); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == high) && (CarryOUT.get_value() == low)); + if (!silent) printf("CarryIN off\n"); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("A&B on\n"); + A.flip(); + B.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == high)); + if (!silent) printf("A&B off\n"); + A.flip(); + B.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("A&CarryIN on\n"); + A.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == high)); + if (!silent) printf("A&CarryIN off\n"); + A.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("B&CarryIN on\n"); + B.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == high)); + if (!silent) printf("B&CarryIN off\n"); + B.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + + if (!silent) printf("A&B&CarryIN on\n"); + A.flip(); + B.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == high) && (CarryOUT.get_value() == high)); + if (!silent) printf("A&B&CarryIN off\n"); + A.flip(); + B.flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == low) && (CarryOUT.get_value() == low)); + } + + { // test four_bit_adder + four_bit_adder four_adder(g); + std::vector A(4, toggle(g)); + std::vector B(4, toggle(g)); + toggle CarryIN(g); + digit Sum(g, "SUM"); + led CarryOUT(g, "CarryOUT"); + + for (int i=0; i<4; ++i) { + make_edge(A[i].get_out(), four_adder.get_A(i)); + make_edge(B[i].get_out(), four_adder.get_B(i)); + make_edge(four_adder.get_out(i), Sum.get_in(i)); + } + make_edge(CarryIN.get_out(), four_adder.get_CI()); + make_edge(four_adder.get_CO(), CarryOUT.get_in()); + + // Activate all switches at low state + for (int i=0; i<4; ++i) { + A[i].activate(); + B[i].activate(); + } + CarryIN.activate(); + + if (!silent) printf("1+0\n"); + A[0].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low)); + + if (!silent) printf("0+1\n"); + A[0].flip(); + B[0].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low)); + + if (!silent) printf("3+4\n"); + A[0].flip(); + A[1].flip(); + B[0].flip(); + B[2].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 7) && (CarryOUT.get_value() == low)); + + if (!silent) printf("6+1\n"); + A[0].flip(); + A[2].flip(); + B[0].flip(); + B[2].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 7) && (CarryOUT.get_value() == low)); + + if (!silent) printf("0+0+carry\n"); + A[1].flip(); + A[2].flip(); + B[0].flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 1) && (CarryOUT.get_value() == low)); + + if (!silent) printf("15+15+carry\n"); + A[0].flip(); + A[1].flip(); + A[2].flip(); + A[3].flip(); + B[0].flip(); + B[1].flip(); + B[2].flip(); + B[3].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 0xf) && (CarryOUT.get_value() == high)); + + if (!silent) printf("8+8\n"); + A[0].flip(); + A[1].flip(); + A[2].flip(); + B[0].flip(); + B[1].flip(); + B[2].flip(); + CarryIN.flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 0) && (CarryOUT.get_value() == high)); + + if (!silent) printf("0+0\n"); + A[3].flip(); + B[3].flip(); + g.wait_for_all(); + if (!silent) Sum.display(); + if (!silent) CarryOUT.display(); + assert((Sum.get_value() == 0) && (CarryOUT.get_value() == low)); + } + + { // test D_latch + D_latch my_d_latch(g); + toggle D(g); + pulse E(g, 500, 4); // clock changes every 500ms; stops after 4 changes + led Q(g, " Q", verbose); // if true, LEDs print at every state change + led notQ(g, "~Q", verbose); + + make_edge(D.get_out(), my_d_latch.get_D()); + make_edge(E.get_out(), my_d_latch.get_E()); + make_edge(my_d_latch.get_Q(), Q.get_in()); + make_edge(my_d_latch.get_notQ(), notQ.get_in()); + + D.activate(); + + if (!silent) printf("Toggling D\n"); + E.activate(); + D.flip(); + g.wait_for_all(); + if (!silent && !verbose) { Q.display(); notQ.display(); } + assert((Q.get_value() == high) && (notQ.get_value() == low)); + E.reset(); + + if (!silent) printf("Toggling D\n"); + E.activate(); + D.flip(); + g.wait_for_all(); + if (!silent && !verbose) { Q.display(); notQ.display(); } + assert((Q.get_value() == low) && (notQ.get_value() == high)); + E.reset(); + + if (!silent) printf("Toggling D\n"); + E.activate(); + D.flip(); + g.wait_for_all(); + if (!silent && !verbose) { Q.display(); notQ.display(); } + assert((Q.get_value() == high) && (notQ.get_value() == low)); + E.reset(); + + if (!silent) printf("Toggling D\n"); + E.activate(); + D.flip(); + g.wait_for_all(); + if (!silent && !verbose) { Q.display(); notQ.display(); } + assert((Q.get_value() == low) && (notQ.get_value() == high)); + E.reset(); + + if (!silent) printf("Toggling D\n"); + E.activate(); + D.flip(); + g.wait_for_all(); + if (!silent && !verbose) { Q.display(); notQ.display(); } + assert((Q.get_value() == high) && (notQ.get_value() == low)); + } + } + utility::report_elapsed_time((tbb::tick_count::now() - start).seconds()); + return 0; + } catch(std::exception& e) { + cerr<<"error occurred. error text is :\"" < + + +

Overview

+This directory has example usages of Intel® Threading Building Blocks (Intel® TBB). + +

Directories

+
+
GettingStarted +
Examples from the Getting Started Guide. +
concurrent_hash_map +
Examples using concurrent_hash_map. +
concurrent_priority_queue +
Examples using concurrent_priority_queue. +
graph +
Examples using tbb::flow graph. +
parallel_do +
Examples using parallel_do. +
parallel_for +
Examples using parallel_for. +
parallel_reduce +
Examples using parallel_reduce. +
pipeline +
Examples using pipeline. +
task +
Examples using raw task interface. +
task_group +
Examples using task_group interface. +
task_priority +
Examples using the task priority feature. +
test_all +
Examples that test all the parts of the package. +
common +
Common files for building various examples. Should not be used directly. But if you copy an example to other place this folder should be copied also and should have the same relative path for copied example. +
+ +

To Build

+Build each example by using one of the following methods. The specific directions for each +method can be found below. + + +

+Some of the following directions refer to a shell window; this refers +to the command prompt environment/window normally used on your system. +A shell might be a cmd.exe command prompt window (Windows* systems), or a +sh, bash, csh, ksh, etc. (or compatible) shell window (Windows*, Linux* or Mac OS* X systems). +

+ +

To build by using a Microsoft* Visual Studio* project (Windows* systems):

+Perform the following steps: +
    +
  1. Identify the solution (*.sln) file for the example you wish to build and run.For Microsoft* Visual Studio* 2005, the *.sln file is in the example's msvs sub-directory. For other versions please use Microsoft* + Visual Studio* project converter +
      +
    • <example_name>_cl.sln  - Solution for Microsoft* Visual C++* compiler +
    • +
    • <example_name>_icl.sln - Solution for Intel® C++ Compiler
    • +
    +
  2. +
  3. Open the project by using one of the following methods: +
      +
    • Navigate to the *.sln file from My Computer, by using Windows Explorer, or by using another file browser. Double-click the *.sln file to invoke Microsoft* Visual Studio* and open the project.
    • +
    • Invoke Microsoft* Visual Studio* from the Start menu and use the "Open Project" dialog to navigate to and open the project.
    • +
    +
  4. +
  5. Press <ctrl-F5> to build and run the example.
  6. +
  7. If you copied an example to another place separately from libraries you need to + set %TBBROOT% variable pointing to <installdir> folder.
  8. +
+ +

To build by using a Xcode* IDE project (Mac OS* X systems):

+Perform the following steps: +
    +
  1. Identify the project (*.xcodeproj) file for the example you wish to build and run. +
      +
    • The *.xcodeproj file is in the example's xcode sub-directory. +
    +
  2. +
  3. Open the project by using one of the following methods: +
      +
    • Navigate to the *.xcodeproj file by using the Finder.Double-click the *.xcodeproj file to invoke the Xcode* IDE and open the project.
    • +
    • Invoke the Xcode* IDE and use the "File -> Open" dialog to navigate to and open the project.
    • +
    +
  4. +
  5. Press <Apple-R>, or press the "Build and Go" button in the toolbox, to build and run the example. +
  6. +
+ +

To build by using a Makefile (Windows*, Linux* or Mac OS* X systems):

+Perform the following steps: +
    +
  1. Open a shell window. For Windows* systems, make sure this shell window has the proper environment + defined for use with Microsoft* Visual Studio* (2005, 2008, 2010 or 2012); such a shell can be invoked + from the Start menu, under Visual Studio, Visual Studio Tools, Visual Studio Command Prompt. +
  2. Set up the environment in this shell window for use with Intel TBB. +
    See below for how to set up the environment for Windows*, Linux* or Mac OS* X systems. +
  3. Unless you installed Intel TBB yourself, you may not have write permissions to the directory + containing the example. In this case, make a copy of the example, and use the copy for the following steps. +
  4. In the shell window, navigate to the directory for the example + (or to the directory for the copy of the example if you made one in the previous step). +
  5. Use one or more of the following commands to build and run the example. + Here, make refers to the make command normally used on your system: this could be + nmake, gmake, or make on Windows* systems, or make or gmake on Linux* or Mac OS* X systems. +
    +
    make +
    Default build and run. Equivalent to 'make release test'. +
    make release +
    Compile and link against the release version of Intel TBB runtime library. The resulting executable is left in the directory for the example. +
    make debug +
    Compile and link against the debug version of Intel TBB runtime library. The resulting executable is left in the directory for the example. +
    make test +
    Run an executable previously produced by one of the above commands. +
    make [(above options or targets)] CXX={icl, icc} +
    Build and run as above, but use Intel® compilers instead of default, native compilers (e.g., icl instead of cl.exe on Windows* systems, or icc instead of g++ on Linux* or Mac OS* X systems). +
    make [(above options or targets)] offload=mic +
    Build and run the offload version of an example for Intel® Many Integrated Core (Intel® MIC) Architecture. +
    Note: Only Intel® MIC Architecture with Linux* based host is currently supported. +
    make clean +
    Remove any executables or intermediate files produced by the above commands. +
    +
+ +

To set up the environment (Windows* systems):

+It is strongly recommended that the environment be set up when installing Intel TBB. +Do this by selecting the appropriate check-box during the install. However, if the environment is not set up +during installation, or you wish to build for an alternate architecture or Microsoft* Visual Studio* version, +it may be set up, for a given type of shell window, by using one of the following commands: +
+
For cmd.exe (command prompt): +
<installdir>\bin\tbbvars.bat (arch) (vs) +
+    where (arch) must be is one of the following
+       ia32         : Set up for IA-32  architecture
+       intel64      : Set up for Intel® 64  architecture
+   (vs) should be one of the following
+       vs2005      : Set to use with Microsoft Visual Studio 2005 runtime DLLs
+       vs2008      : Set to use with Microsoft Visual Studio 2008 runtime DLLs
+       vs2010      : Set to use with Microsoft Visual Studio 2010 runtime DLLs
+       vs2012      : Set to use with Microsoft Visual Studio 2012 runtime DLLs
+       all         : Set to use TBB statically linked with Microsoft Visual C++ runtime
+   if (vs) is not set TBB statically linked with Microsoft Visual C++ runtime will be used.
+
+
+ +

To set up the environment (Linux* or Mac OS* X systems):

+The environment may be set up, for a given type of shell window, by using one of the following commands: +
+
For sh, bash, ksh (or compatibles): +
. <installdir>/bin/tbbvars.sh (arch) +
For csh (or compatibles): +
source <installdir>/bin/tbbvars.csh (arch) +
Notes: +
+
  • Choose one of {ia32,intel64} depending on the architecture to be used. +
  • Environment setup need only be performed once per shell window to be used. +
  • Always source tbbvars.sh or tbbvars.csh rather than executing them directly. + +
  • + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/index.html new file mode 100644 index 0000000000..9700a1c4fa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/index.html @@ -0,0 +1,24 @@ + + + +

    Overview

    +This directory has examples of the template parallel_do. + +

    Directories

    +
    +
    parallel_preorder +
    Parallel preorder traversal of a graph. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.cpp new file mode 100644 index 0000000000..e34120f793 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.cpp @@ -0,0 +1,109 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include "Graph.h" +#include + +using namespace std; + +void Graph::create_random_dag( size_t number_of_nodes ) { + my_vertex_set.resize(number_of_nodes); + for( size_t k=0; k>8)%5u); + if( op>int(k) ) op = int(k); + switch( op ) { + default: + c.op = OP_VALUE; + c.value = Cell::value_type((float)k); + break; + case 1: + c.op = OP_NEGATE; + break; + case 2: + c.op = OP_SUB; + break; + case 3: + c.op = OP_ADD; + break; + case 4: + c.op = OP_MUL; + break; + } + for( int j=0; j& root_set ) { + for( size_t k=0; ksuccessor.push_back(&c); + } + if( ArityOfOp[c.op]==0 ) + root_set.push_back(&my_vertex_set[k]); + } +} + +void Cell::update() { + switch( op ) { + case OP_VALUE: + break; + case OP_NEGATE: + value = -(input[0]->value); + break; + case OP_ADD: + value = input[0]->value + input[1]->value; + break; + case OP_SUB: + value = input[0]->value - input[1]->value; + break; + case OP_MUL: + value = input[0]->value * input[1]->value; + break; + } +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.h new file mode 100644 index 0000000000..eb13011c5e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Graph.h @@ -0,0 +1,88 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "Matrix.h" +#include "tbb/atomic.h" +#include + +enum OpKind { + // Use Cell's value + OP_VALUE, + // Unary negation + OP_NEGATE, + // Addition + OP_ADD, + // Subtraction + OP_SUB, + // Multiplication + OP_MUL +}; + +static const int ArityOfOp[] = {0,1,2,2,2}; + +class Cell { +public: + //! Operation for this cell + OpKind op; + + //! Inputs to this cell + Cell* input[2]; + + //! Type of value stored in a Cell + typedef Matrix value_type; + + //! Value associated with this Cell + value_type value; + + //! Set of cells that use this Cell as an input + std::vector successor; + + //! Reference count of number of inputs that are not yet updated. + tbb::atomic ref_count; + + //! Update the Cell's value. + void update(); + + //! Default construtor + Cell() {} +}; + +//! A directed graph where the vertices are Cells. +class Graph { + std::vector my_vertex_set; +public: + //! Create a random acyclic directed graph + void create_random_dag( size_t number_of_nodes ); + + //! Print the graph + void print(); + + //! Get set of cells that have no inputs. + void get_root_set( std::vector& root_set ); +}; + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile new file mode 100644 index 0000000000..003be661b0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile @@ -0,0 +1,65 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=parallel_preorder +ARGS= +PERF_RUN_ARGS=auto silent 500000 100 + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile.windows new file mode 100644 index 0000000000..7fd390a5d0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Makefile.windows @@ -0,0 +1,59 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Parallel_Preorder +ARGS= +PERF_RUN_ARGS=auto silent 500000 100 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Matrix.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Matrix.h new file mode 100644 index 0000000000..fdf26b881b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/Matrix.h @@ -0,0 +1,68 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +class Matrix { + static const int n = 20; + float array[n][n]; +public: + Matrix() {} + Matrix( float z ) { + for( int i=0; i + + +

    Overview

    +Example that uses parallel_do to do parallel preorder traversal of a sparse graph. +

    +Each vertex in the graph is called a "cell". +Each cell has a value. +The value is a matrix. +Some of the cells have operators +that compute the cell's value, using other cell's values as input. +A cell that uses the value of cell x is called a successor of x. +

    +The algorithm works as follows. +

      +
    1. Compute the set of cells that have no inputs. This set is called root_set. +
    2. Each cell has an associated field ref_count that is an atomic integer. + Initialize ref_count to the number of inputs for the Cell. +
    3. Update each cell in root_set, by applying a parallel_do to a root_set +
    4. After updating a cell, for each of its successors +
        +
      1. Atomically decrement the successor's ref_count +
      2. If the count became zero, add the cell to the set of cells to be updated, + by calling parallel_do_feeder_impl::add. +
      +
    +

    +The times printed are for the traversal and update, +and do not include time for computing the root_set. +

    +The example is using custom synchronization via ref_count atomic variable. +Correctness checking tools might not take this into account, and report data races +between different tasks that are actually synchronized. +

    + +NOTE: It is important to understand that this example is unlikely to show speedup +if the cell values are changed to type "float". The reason is twofold. +
      +
    • The smaller value type causes each Cell to be significantly smaller than a cache line, + which leads to false sharing conflicts. +
    • The time to update the cells becomes very small, and consequently the overhead of + parallel_do swamps the useful work. +
    + +

    Files

    +
    +
    main.cpp +
    Main program which parses command line options and runs the algorithm with different numbers of threads. +
    parallel_preorder.cpp +
    Implementation of the parallel preorder traversal algorithm. +
    Graph.h +
    Interfaces of the Graph and Cell classes. +
    Graph.cpp +
    Implementations of the Graph and Cell classes. +
    Matrix.h +
    The Matrix class definition. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the example (Windows* systems only). +
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
    + +

    To Build

    +General build directions can be found here. + +

    Usage

    +
    +
    parallel_preorder -h +
    Prints the help for command line options +
    parallel_preorder [n-of-threads=value] [n-of-nodes=value] [n-of-traversals=value] [silent] +
    parallel_preorder [n-of-threads [n-of-nodes [n-of-traversals]]] [silent] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + n-of-nodes is a number of nodes in the graph. Default value is 1000.
    + n-of-traversals is the number of times to evaluate the graph. Default value is 500.
    + silent - no output except elapsed time.
    +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Run it with the desired number of threads and smaller number of traversals, e.g., parallel_preorder 4 1000 5. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/main.cpp new file mode 100644 index 0000000000..bab2bd25b8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/main.cpp @@ -0,0 +1,101 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* Example program that shows how to use parallel_do to do parallel preorder + traversal of a directed acyclic graph. */ + +#include +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "../../common/utility/utility.h" +#include +#include +#include "Graph.h" + +// some forward declarations +class Cell; +void ParallelPreorderTraversal( const std::vector& root_set ); + +//------------------------------------------------------------------------ +// Test driver +//------------------------------------------------------------------------ +utility::thread_number_range threads(tbb::task_scheduler_init::default_num_threads); +static unsigned nodes = 1000; +static unsigned traversals = 500; +static bool SilentFlag = false; + +//! Parse the command line. +static void ParseCommandLine( int argc, const char* argv[] ) { + utility::parse_cli_arguments( + argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(nodes,"n-of-nodes","number of nodes in the graph.") + .positional_arg(traversals,"n-of-traversals","number of times to evaluate the graph. Reduce it (e.g. to 100) to shorten example run time\n") + .arg(SilentFlag,"silent","no output except elapsed time ") + ); +} + +int main( int argc, const char* argv[] ) { + try { + tbb::tick_count main_start = tbb::tick_count::now(); + ParseCommandLine(argc,argv); + + // Start scheduler with given number of threads. + for( int p=threads.first; p<=threads.last; p = threads.step(p) ) { + tbb::tick_count t0 = tbb::tick_count::now(); + tbb::task_scheduler_init init(p); + srand(2); + size_t root_set_size = 0; + { + Graph g; + g.create_random_dag(nodes); + std::vector root_set; + g.get_root_set(root_set); + root_set_size = root_set.size(); + for( unsigned int trial=0; trial + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder.vcproj new file mode 100644 index 0000000000..2a0d9236c9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder.vcproj @@ -0,0 +1,378 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_cl.sln new file mode 100644 index 0000000000..665106e56c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "parallel_preorder", "parallel_preorder.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_icl.sln new file mode 100644 index 0000000000..b0ba4ac022 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/msvs/parallel_preorder_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "parallel_preorder", "parallel_preorder.icproj", "{68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Debug|Win32.ActiveCfg = Debug|Win32 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Debug|Win32.Build.0 = Debug|Win32 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Debug|x64.ActiveCfg = Debug|x64 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Debug|x64.Build.0 = Debug|x64 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Release|Win32.ActiveCfg = Release|Win32 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Release|Win32.Build.0 = Release|Win32 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Release|x64.ActiveCfg = Release|x64 + {68C4AFEA-1847-4EEE-9CC5-D4FCB712D09F}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252B}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/parallel_preorder.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/parallel_preorder.cpp new file mode 100644 index 0000000000..c3fdab0447 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/parallel_preorder.cpp @@ -0,0 +1,64 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/parallel_do.h" +#include +#include +#include "Graph.h" + + +class Body { +public: + Body() {}; + + //------------------------------------------------------------------------ + // Following signatures are required by parallel_do + //------------------------------------------------------------------------ + typedef Cell* argument_type; + + void operator()( Cell* c, tbb::parallel_do_feeder& feeder ) const { + c->update(); + // Restore ref_count in preparation for subsequent traversal. + c->ref_count = ArityOfOp[c->op]; + for( size_t k=0; ksuccessor.size(); ++k ) { + Cell* successor = c->successor[k]; + // ref_count is used for inter-task synchronization. + // Correctness checking tools might not take this into account, and report + // data races between different tasks, that are actually synchronized. + if( 0 == --(successor->ref_count) ) { + feeder.add( successor ); + } + } + } +}; + +void ParallelPreorderTraversal( const std::vector& root_set ) { + tbb::parallel_do(root_set.begin(), root_set.end(),Body()); +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6773133b21 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_do/parallel_preorder/xcode/parallel_preorder.xcodeproj/project.pbxproj @@ -0,0 +1,317 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 05593AA80B8F55D500DE73AB /* Graph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593AA40B8F55D500DE73AB /* Graph.cpp */; }; + 05593AAB0B8F55D500DE73AB /* parallel_preorder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593AA70B8F55D500DE73AB /* parallel_preorder.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + EAD808FA13051AB300FE8C7C /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EAD808F913051AB300FE8C7C /* main.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 05593AA40B8F55D500DE73AB /* Graph.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Graph.cpp; path = ../Graph.cpp; sourceTree = SOURCE_ROOT; }; + 05593AA50B8F55D500DE73AB /* Graph.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Graph.h; path = ../Graph.h; sourceTree = SOURCE_ROOT; }; + 05593AA60B8F55D500DE73AB /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Matrix.h; path = ../Matrix.h; sourceTree = SOURCE_ROOT; }; + 05593AA70B8F55D500DE73AB /* parallel_preorder.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = parallel_preorder.cpp; path = ../parallel_preorder.cpp; sourceTree = SOURCE_ROOT; }; + 8DD76F6C0486A84900D96B5E /* parallel_preorder */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = parallel_preorder; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; + EAD808F913051AB300FE8C7C /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* parallel_preorder */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = parallel_preorder; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + EAD808F913051AB300FE8C7C /* main.cpp */, + 05593AA70B8F55D500DE73AB /* parallel_preorder.cpp */, + 05593AA40B8F55D500DE73AB /* Graph.cpp */, + 05593AA50B8F55D500DE73AB /* Graph.h */, + 05593AA60B8F55D500DE73AB /* Matrix.h */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* parallel_preorder */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* parallel_preorder */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "parallel_preorder" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = parallel_preorder; + productInstallPath = "$(HOME)/bin"; + productName = parallel_preorder; + productReference = 8DD76F6C0486A84900D96B5E /* parallel_preorder */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "parallel_preorder" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* parallel_preorder */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* parallel_preorder */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05593AA80B8F55D500DE73AB /* Graph.cpp in Sources */, + 05593AAB0B8F55D500DE73AB /* parallel_preorder.cpp in Sources */, + EAD808FA13051AB300FE8C7C /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = parallel_preorder; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = parallel_preorder; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = parallel_preorder; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = parallel_preorder; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "parallel_preorder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "parallel_preorder" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile new file mode 100644 index 0000000000..38c72939e3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile @@ -0,0 +1,59 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=game_of_life +ARGS=2:4 -t 5 +LIGHT_ARGS=1:2 -t 5 +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp + $(CXX) -O2 -DNDEBUG -D_CONSOLE $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) + +debug: src/Evolution.cpp src/Update_state.cpp src/Game_of_life.cpp + $(CXX) -O0 -D_CONSOLE -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) + +clean: + rm -f $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) +light_test: + ./$(PROG) $(LIGHT_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile.windows new file mode 100644 index 0000000000..26215a3087 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/Makefile.windows @@ -0,0 +1,54 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=game_of_life +ARGS=2:4 -t 5 +LIGHT_ARGS=1:2 -t 5 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: + $(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: + $(CXX) ./src/Evolution.cpp ./src/Game_of_life.cpp ./src/Update_state.cpp /MDd /Od /Zi /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +light_test: + $(PROG) $(LIGHT_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/index.html new file mode 100644 index 0000000000..9ca1db9c54 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/index.html @@ -0,0 +1,54 @@ + + + +

    Overview

    +The "Game of life" example demonstrates interoperability of TBB and .NET. +
    This program runs 2 simultaneous instances of the classic Conway's "Game of Life". +One of these instances uses serial calculations to update the board. The other one calculates in parallel with TBB. +The visualization is written in managed C++ and uses .NET CLR. + +

    Source Files

    +
    +
    Form1.h, Board.h +
    Header files for GUI classes. +
    Evolution.h, Evolution.cpp +
    Contain class hierarchy to implement game evolution in serial and parallel. +
    Update_state.cpp +
    Implements 2 approaches for calculating steps in the program: with the use of SSE intrinsics, and ordinary C++ code. +
    Game_of_life.cpp +
    Contains program entry point and other source not related to logical structure of the example. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    src +
    Contains source files mentioned above. +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the example (Windows* systems only). +
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
    + +

    To Build

    +General build directions can be found here. +

    + +

    Usage

    +
    +For Windows* systems, Microsoft* Visual Studio* projects are provided for each of the above versions. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.sln new file mode 100644 index 0000000000..2aabfd5529 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Game of Life", "Game_of_life.vcproj", "{731C7E2E-2766-41D9-96FC-0A3548973803}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug(console)|Win32 = Debug(console)|Win32 + Debug(console)|x64 = Debug(console)|x64 + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release(console)|Win32 = Release(console)|Win32 + Release(console)|x64 = Release(console)|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.ActiveCfg = Debug(console)|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|Win32.Build.0 = Debug(console)|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.ActiveCfg = Debug(console)|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug(console)|x64.Build.0 = Debug(console)|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.ActiveCfg = Debug|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|Win32.Build.0 = Debug|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.ActiveCfg = Debug|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Debug|x64.Build.0 = Debug|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.ActiveCfg = Release(console)|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|Win32.Build.0 = Release(console)|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.ActiveCfg = Release(console)|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release(console)|x64.Build.0 = Release(console)|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.ActiveCfg = Release|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release|Win32.Build.0 = Release|Win32 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.ActiveCfg = Release|x64 + {731C7E2E-2766-41D9-96FC-0A3548973803}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.vcproj new file mode 100644 index 0000000000..554055adb3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/Game_of_life.vcproj @@ -0,0 +1,794 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.ico b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.ico new file mode 100644 index 0000000000..3a5525fd79 Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.rc b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.rc new file mode 100644 index 0000000000..807aa89666 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/app.rc @@ -0,0 +1,63 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon placed first or with lowest ID value becomes application icon + +LANGUAGE 9, 1 +#pragma code_page(1252) +1 ICON "app.ico" + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" + "\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/resource.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/resource.h new file mode 100644 index 0000000000..d5ac7c42aa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/msvs/resource.h @@ -0,0 +1,3 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by app.rc diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp new file mode 100644 index 0000000000..b245bb8e2a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/AssemblyInfo.cpp @@ -0,0 +1,66 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +using namespace System; +using namespace System::Reflection; +using namespace System::Runtime::CompilerServices; +using namespace System::Runtime::InteropServices; +using namespace System::Security::Permissions; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly:AssemblyTitleAttribute("Automata")]; +[assembly:AssemblyDescriptionAttribute("")]; +[assembly:AssemblyConfigurationAttribute("")]; +[assembly:AssemblyCompanyAttribute("")]; +[assembly:AssemblyProductAttribute("Automata")]; +[assembly:AssemblyCopyrightAttribute("Copyright (c) 2007")]; +[assembly:AssemblyTrademarkAttribute("")]; +[assembly:AssemblyCultureAttribute("")]; + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the value or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly:AssemblyVersionAttribute("1.0.*")]; + +[assembly:ComVisible(false)]; + +[assembly:CLSCompliantAttribute(true)]; + +[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Board.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Board.h new file mode 100644 index 0000000000..6ced568c32 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Board.h @@ -0,0 +1,115 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __BOARD_H__ +#define __BOARD_H__ + +#define WIN32_LEAN_AND_MEAN + +#ifndef _CONSOLE +#include + +using namespace System; +using namespace System::ComponentModel; +using namespace System::Collections; +using namespace System::Windows::Forms; +using namespace System::Data; +using namespace System::Drawing; +#define LabelPtr Label^ +#define BoardPtr Board^ +#else +#define LabelPtr int* +#define BoardPtr Board* +#endif + +struct Matrix +{ + int width; + int height; + char* data; +}; + +#ifndef _CONSOLE +public ref class Board : public System::Windows::Forms::UserControl +#else +class Board +#endif + { + public: + Board(int width, int height, int squareSize, LabelPtr counter); + virtual ~Board(); + void seed(int s); + void seed(const BoardPtr s); +#ifndef _CONSOLE + protected: + virtual void OnPaint(PaintEventArgs^ e) override; + void Board::draw(Graphics^ g); + + private: + System::ComponentModel::Container ^components; + +#pragma region Windows Form Designer generated code + void InitializeComponent(void) + { + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + } +#pragma endregion + + private: delegate void drawDelegate(Int32); + public: + //! Called from the Evolution thread + void draw( Int32 nCurIteration ) + { + if (this->InvokeRequired) + { + drawDelegate^ d = gcnew drawDelegate(this, &Board::draw); + IAsyncResult^ result = BeginInvoke(d, nCurIteration); + EndInvoke(result); + return; + } + m_counter->Text = nCurIteration.ToString(); + Invalidate(); + } +#endif + public: + Matrix *m_matrix; + + private: +#ifndef _CONSOLE + SolidBrush^ m_occupiedBrush; + SolidBrush^ m_freeBrush; + Graphics^ m_graphics; + Graphics^ m_mem_dc; + Bitmap^ m_bmp; +#endif + int m_width; + int m_height; + int m_squareSize; + LabelPtr m_counter; + }; +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.cpp new file mode 100644 index 0000000000..b57f331593 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.cpp @@ -0,0 +1,251 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + Evolution.cpp: implementation file for evolution classes; evolution + classes do looped evolution of patterns in a defined + 2 dimensional space +*/ + +#include "Evolution.h" +#include "Board.h" + +#ifdef USE_SSE +#define GRAIN_SIZE 14 +#else +#define GRAIN_SIZE 4000 +#endif +#define TIME_SLICE 330 + +/* + Evolution +*/ + +/** + Evolution::UpdateMatrix() - moves the calculated destination data + to the source data block. No destination zeroing is required since it will + be completely overwritten during the next calculation cycle. +**/ +void Evolution::UpdateMatrix() +{ + memcpy(m_matrix->data, m_dest, m_size); +} + +/* + SequentialEvolution +*/ + +//! SequentialEvolution::Run - begins looped evolution +#ifndef _CONSOLE +void SequentialEvolution::Run() +{ +#else +void SequentialEvolution::Run(double execution_time, int nthread) +{ + printf("Starting game (Sequential evolution)\n"); +#endif + + m_nIteration = 0; + m_serial_time = 0; + tbb::tick_count t0 = tbb::tick_count::now(); + while (!m_done) + { + if( !is_paused ) + { + tbb::tick_count t = tbb::tick_count::now(); + Step(); + tbb::tick_count t1 = tbb::tick_count::now(); + ++m_nIteration; + double work_time = (t1-t0).seconds(); +#ifndef _CONSOLE + if ( work_time * 1000 < TIME_SLICE ) + continue; + m_serial_time += work_time; + m_board->draw(m_nIteration); +#else + m_serial_time += work_time; +#endif + } + //! Let the parallel algorithm work uncontended almost the same time + //! as the serial one. See ParallelEvolution::Run() as well. +#ifndef _CONSOLE + m_evt_start_parallel->Set(); + m_evt_start_serial->WaitOne(); + t0 = tbb::tick_count::now(); +#else + t0 = tbb::tick_count::now(); + if(m_serial_time > execution_time) + { + printf("iterations count = %d time = %g\n", m_nIteration, m_serial_time); + break; + } +#endif + } +} + +//! SequentialEvolution::Step() - override of step method +void SequentialEvolution::Step() +{ + if( !is_paused ) + { +#ifdef USE_SSE + UpdateState(m_matrix, m_matrix->data, 0, m_matrix->height); +#else + UpdateState(m_matrix, m_dest, 0, (m_matrix->width * m_matrix->height)-1); + UpdateMatrix(); +#endif + } +} + +/* + ParallelEvolution +*/ + +//! SequentialEvolution::Run - begins looped evolution +#ifndef _CONSOLE +void ParallelEvolution::Run() +{ +#else +void ParallelEvolution::Run(double execution_time, int nthread) +{ + if(nthread == tbb::task_scheduler_init::automatic) + printf("Starting game (Parallel evolution for automatic number of thread(s))\n"); + else + printf("Starting game (Parallel evolution for %d thread(s))\n", nthread); +#endif + + m_nIteration = 0; + m_parallel_time = 0; + +#ifndef _CONSOLE + //! start task scheduler as necessary + if (m_pInit == NULL) + { + m_pInit = new tbb::task_scheduler_init(); + } + m_evt_start_parallel->WaitOne(); +#else + tbb::task_scheduler_init init(nthread); +#endif + + double work_time = m_serial_time; + tbb::tick_count t0 = tbb::tick_count::now(); + + while (!m_done) + { + if( !is_paused ) + { + tbb::tick_count t = tbb::tick_count::now(); + Step(); + tbb::tick_count t1 = tbb::tick_count::now(); + ++m_nIteration; + double real_work_time = (t1-t0).seconds(); +#ifndef _CONSOLE + if ( real_work_time < work_time ) + continue; + m_parallel_time += real_work_time; + m_board->draw(m_nIteration); +#else + m_parallel_time += real_work_time; +#endif + } + //! Let the serial algorithm work the same time as the parallel one. +#ifndef _CONSOLE + m_evt_start_serial->Set(); + m_evt_start_parallel->WaitOne(); + + work_time = m_serial_time - m_parallel_time; + t0 = tbb::tick_count::now(); +#else + t0 = tbb::tick_count::now(); + if(m_parallel_time > execution_time) + { + printf("iterations count = %d time = %g\n", m_nIteration, m_parallel_time); + init.terminate(); + break; + } +#endif + } +} + +/** + class tbb_parallel_task + + TBB requires a class for parallel loop implementations. The actual + loop "chunks" are performed using the () operator of the class. + The blocked_range contains the range to calculate. Please see the + TBB documentation for more information. +**/ +#ifndef _CONSOLE +public class tbb_parallel_task +#else +class tbb_parallel_task +#endif +{ +public: + static void set_values (Matrix* source, char* dest) + { + m_source = source; + m_dest = dest; + return; + } + + void operator()( const tbb::blocked_range& r ) const + { + int begin = (int)r.begin(); //! capture lower range number for this chunk + int end = (int)r.end(); //! capture upper range number for this chunk + UpdateState(m_source, m_dest, begin, end); + } + + tbb_parallel_task () {} + +private: + static Matrix* m_source; + static char* m_dest; +}; + +Matrix* tbb_parallel_task::m_source; +char* tbb_parallel_task::m_dest; + +//! ParallelEvolution::Step() - override of Step method +void ParallelEvolution::Step() +{ + size_t begin = 0; //! beginning cell position +#ifdef USE_SSE + size_t end = m_matrix->height; //! ending cell position +#else + size_t end = m_size-1; //! ending cell position +#endif + + //! set matrix pointers + tbb_parallel_task::set_values(m_matrix, m_dest); + + //! do calculation loop + parallel_for (tbb::blocked_range (begin, end, GRAIN_SIZE), tbb_parallel_task()); + UpdateMatrix(); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.h new file mode 100644 index 0000000000..1720018fce --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Evolution.h @@ -0,0 +1,203 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/** + Evolution.h: Header file for evolution classes; evolution classes do + looped evolution of patterns in a defined 2 dimensional space +**/ + +#ifndef __EVOLUTION_H__ +#define __EVOLUTION_H__ + +#include "Board.h" +#include +#include +#include + +#define WIN32_LEAN_AND_MEAN + +#include "tbb/task_scheduler_init.h" +#include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" +#include "tbb/tick_count.h" + +#ifndef _CONSOLE +#include +using namespace System::Threading; +#else +typedef unsigned int Int32; +#endif + +void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end); + +/** + class Evolution - base class for SequentialEvolution and ParallelEvolution +**/ +#ifndef _CONSOLE +public ref class Evolution abstract +#else +class Evolution +#endif +{ +public: + Evolution( Matrix *m, //! beginning matrix including initial pattern + BoardPtr board //! the board to update + ) : m_matrix(m), m_board(board), + m_size(m_matrix->height * m_matrix->width), m_done(false) + { + //! allocate memory for second matrix data block + m_dest = new char[m_size]; + is_paused = false; +#ifdef _CONSOLE + m_serial_time = 0; +#endif + } + + virtual ~Evolution() + { + delete[] m_dest; + } + + //! Run() - begins looped evolution +#ifndef _CONSOLE + virtual void Run() = 0; +#else + virtual void Run(double execution_time, int nthread) = 0; +#endif + + //! Quit() - tell the thread to terminate + virtual void Quit() { m_done = true; } + + //! Step() - performs a single evolutionary generation computation on the game matrix + virtual void Step() = 0; + + //! SetPause() - change condition of variable is_paused + virtual void SetPause(bool condition) + { + if ( condition == true ) + is_paused = true; + else + is_paused = false; + } + +protected: + /** + UpdateMatrix() - moves the previous destination data to the source + data block and zeros out destination. + **/ + void UpdateMatrix(); + +protected: + Matrix* m_matrix; //! Pointer to initial matrix + char* m_dest; //! Pointer to calculation destination data + BoardPtr m_board; //! The game board to update + int m_size; //! size of the matrix data block + volatile bool m_done; //! a flag used to terminate the thread + Int32 m_nIteration; //! current calculation cycle index + volatile bool is_paused; //! is needed to perform next iteration + + //! Calculation time of the sequential version (since the start), seconds. + /** + This member is updated by the sequential version and read by parallel, + so no synchronization is necessary. + **/ +#ifndef _CONSOLE + static volatile double m_serial_time = 0; + + static System::Threading::AutoResetEvent ^m_evt_start_serial = gcnew AutoResetEvent(false), + ^m_evt_start_parallel = gcnew AutoResetEvent(false); +#else + double m_serial_time; +#endif +}; + +/** + class SequentialEvolution - derived from Evolution - calculate life generations serially +**/ +#ifndef _CONSOLE +public ref class SequentialEvolution: public Evolution +#else +class SequentialEvolution: public Evolution +#endif +{ +public: + SequentialEvolution(Matrix *m, BoardPtr board) + : Evolution(m, board) + {} +#ifndef _CONSOLE + virtual void Run() override; + virtual void Step() override; +#else + virtual void Run(double execution_time, int nthread); + virtual void Step(); +#endif + +}; + +/** + class ParallelEvolution - derived from Evolution - calculate life generations + in parallel using Intel(R) TBB +**/ +#ifndef _CONSOLE +public ref class ParallelEvolution: public Evolution +#else +class ParallelEvolution: public Evolution +#endif +{ +public: + + ParallelEvolution(Matrix *m, BoardPtr board) + : Evolution(m, board), + m_parallel_time(0) + { + // instantiate a task_scheduler_init object and save a pointer to it + m_pInit = NULL; + } + + ~ParallelEvolution() + { + //! delete task_scheduler_init object + if (m_pInit != NULL) + delete m_pInit; + } +#ifndef _CONSOLE + virtual void Run() override; + virtual void Step() override; +#else + virtual void Run(double execution_time, int nthread); + virtual void Step(); +#endif + + +private: + tbb::task_scheduler_init* m_pInit; + + double m_parallel_time; +}; + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Form1.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Form1.h new file mode 100644 index 0000000000..b31e0e1421 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Form1.h @@ -0,0 +1,314 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _CONSOLE +#ifndef __FORM1_H__ +#define __FORM1_H__ + +#include +#include "Board.h" +#include "Evolution.h" + +#define BOARD_SQUARE_SIZE 2 + + using namespace System; + using namespace System::ComponentModel; + using namespace System::Collections; + using namespace System::Windows::Forms; + using namespace System::Data; + using namespace System::Drawing; + + public ref class Form1 : public System::Windows::Forms::Form + { + public: + Form1(void) + { + InitializeComponent(); + + FormBorderStyle = System::Windows::Forms::FormBorderStyle::FixedDialog; + ClientSize = System::Drawing::Size(1206, 600+m_ribbonHeight+menuStrip1->Height); + + int boardWidth = (ClientRectangle.Width/2-m_sepWidth/2)/BOARD_SQUARE_SIZE; + int boardHeight = (ClientRectangle.Height-menuStrip1->Height-m_ribbonHeight)/BOARD_SQUARE_SIZE; + + m_board1 = gcnew Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, seqGen); + m_board2 = gcnew Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, parGen); + + Controls->Add(m_board1); + Controls->Add(m_board2); + + m_board1->Location = System::Drawing::Point(2, m_ribbonHeight + menuStrip1->Height); + m_board2->Location = System::Drawing::Point(2 + boardWidth*BOARD_SQUARE_SIZE + m_sepWidth/2, m_ribbonHeight + menuStrip1->Height); + + m_seq = gcnew SequentialEvolution(m_board1->m_matrix, m_board1); + m_par = gcnew ParallelEvolution(m_board2->m_matrix, m_board2); + + m_seqThread = gcnew Thread(gcnew ThreadStart(m_seq, &SequentialEvolution::Run)); + m_parThread = gcnew Thread(gcnew ThreadStart(m_par, &ParallelEvolution::Run)); + + Thread::CurrentThread->Priority = ThreadPriority::AboveNormal; + + m_suspend = true; + } + protected: + ~Form1() + { + if (components) + { + delete components; + } + } + private: System::Windows::Forms::MenuStrip^ menuStrip1; + private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ exitToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ gameToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ seedToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ runToolStripMenuItem; + private: System::Windows::Forms::ToolStripMenuItem^ pauseToolStripMenuItem; + private: Board^ m_board1; + private: Board^ m_board2; + private: System::Windows::Forms::Label^ Sequential; + private: System::Windows::Forms::Label^ label1; + private: static const int m_sepWidth = 5; + private: static const int m_ribbonHeight = 26; + private: SequentialEvolution^ m_seq; + private: ParallelEvolution^ m_par; + private: Thread^ m_seqThread; + private: Thread^ m_parThread; + private: System::Windows::Forms::Label^ seqGen; + private: System::Windows::Forms::Label^ parGen; + private: bool m_suspend; + + private: + System::ComponentModel::Container ^components; + +#pragma region Windows Form Designer generated code + void InitializeComponent(void) + { + this->menuStrip1 = (gcnew System::Windows::Forms::MenuStrip()); + this->fileToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->exitToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->gameToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->seedToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->runToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->pauseToolStripMenuItem = (gcnew System::Windows::Forms::ToolStripMenuItem()); + this->Sequential = (gcnew System::Windows::Forms::Label()); + this->label1 = (gcnew System::Windows::Forms::Label()); + this->seqGen = (gcnew System::Windows::Forms::Label()); + this->parGen = (gcnew System::Windows::Forms::Label()); + this->menuStrip1->SuspendLayout(); + this->SuspendLayout(); + // + // menuStrip1 + // + this->menuStrip1->Items->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) + {this->fileToolStripMenuItem, this->gameToolStripMenuItem}); + this->menuStrip1->Location = System::Drawing::Point(0, 0); + this->menuStrip1->Name = L"menuStrip1"; + this->menuStrip1->Padding = System::Windows::Forms::Padding(8, 2, 0, 2); + this->menuStrip1->Size = System::Drawing::Size(1600, 26); + this->menuStrip1->TabIndex = 0; + this->menuStrip1->Text = L"menuStrip1"; + this->menuStrip1->ItemClicked += gcnew System::Windows::Forms::ToolStripItemClickedEventHandler(this, &Form1::menuStrip1_ItemClicked); + // + // fileToolStripMenuItem + // + this->fileToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(1) {this->exitToolStripMenuItem}); + this->fileToolStripMenuItem->Name = L"fileToolStripMenuItem"; + this->fileToolStripMenuItem->Size = System::Drawing::Size(40, 22); + this->fileToolStripMenuItem->Text = L"File"; + // + // exitToolStripMenuItem + // + this->exitToolStripMenuItem->Name = L"exitToolStripMenuItem"; + this->exitToolStripMenuItem->Size = System::Drawing::Size(99, 22); + this->exitToolStripMenuItem->Text = L"Exit"; + this->exitToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnExit); + // + // gameToolStripMenuItem + // + this->gameToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(3) {this->seedToolStripMenuItem, + this->runToolStripMenuItem, this->pauseToolStripMenuItem}); + this->gameToolStripMenuItem->Name = L"gameToolStripMenuItem"; + this->gameToolStripMenuItem->Size = System::Drawing::Size(59, 22); + this->gameToolStripMenuItem->Text = L"Game"; + // + // seedToolStripMenuItem + // + this->seedToolStripMenuItem->Name = L"seedToolStripMenuItem"; + this->seedToolStripMenuItem->Size = System::Drawing::Size(115, 22); + this->seedToolStripMenuItem->Text = L"Seed"; + this->seedToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnSeed); + // + // runToolStripMenuItem + // + this->runToolStripMenuItem->Enabled = false; + this->runToolStripMenuItem->Name = L"runToolStripMenuItem"; + this->runToolStripMenuItem->Size = System::Drawing::Size(115, 22); + this->runToolStripMenuItem->Text = L"Run"; + this->runToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnRun); + // + // pauseToolStripMenuItem + // + this->pauseToolStripMenuItem->Enabled = false; + this->pauseToolStripMenuItem->Name = L"pauseToolStripMenuItem"; + this->pauseToolStripMenuItem->Size = System::Drawing::Size(115, 22); + this->pauseToolStripMenuItem->Text = L"Pause"; + this->pauseToolStripMenuItem->Click += gcnew System::EventHandler(this, &Form1::OnPauseResume); + // + // Sequential + // + this->Sequential->AutoSize = true; + this->Sequential->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast(0))); + this->Sequential->Location = System::Drawing::Point(12, 32); + this->Sequential->Margin = System::Windows::Forms::Padding(4, 0, 4, 0); + this->Sequential->Name = L"Sequential"; + this->Sequential->Size = System::Drawing::Size(239, 18); + this->Sequential->TabIndex = 1; + this->Sequential->Text = L"Sequential Algorithm generation:"; + // + // label1 + // + this->label1->AutoSize = true; + this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, + static_cast(0))); + this->label1->Location = System::Drawing::Point(813, 32); + this->label1->Margin = System::Windows::Forms::Padding(4, 0, 4, 0); + this->label1->Name = L"label1"; + this->label1->Size = System::Drawing::Size(219, 18); + this->label1->TabIndex = 2; + this->label1->Text = L"Parallel Algorithm generation: "; + // + // seqGen + // + this->seqGen->AutoSize = true; + this->seqGen->Location = System::Drawing::Point(289, 35); + this->seqGen->Margin = System::Windows::Forms::Padding(4, 0, 4, 0); + this->seqGen->Name = L"seqGen"; + this->seqGen->Size = System::Drawing::Size(16, 17); + this->seqGen->TabIndex = 3; + this->seqGen->Text = L"0"; + // + // parGen + // + this->parGen->AutoSize = true; + this->parGen->Location = System::Drawing::Point(1068, 35); + this->parGen->Margin = System::Windows::Forms::Padding(4, 0, 4, 0); + this->parGen->Name = L"parGen"; + this->parGen->Size = System::Drawing::Size(16, 17); + this->parGen->TabIndex = 4; + this->parGen->Text = L"0"; + // + // Form1 + // + this->AutoScaleDimensions = System::Drawing::SizeF(8, 16); + this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font; + this->ClientSize = System::Drawing::Size(1600, 738); + this->Controls->Add(this->parGen); + this->Controls->Add(this->seqGen); + this->Controls->Add(this->label1); + this->Controls->Add(this->Sequential); + this->Controls->Add(this->menuStrip1); + this->MainMenuStrip = this->menuStrip1; + this->Margin = System::Windows::Forms::Padding(4); + this->MaximizeBox = false; + this->Name = L"Form1"; + this->Text = L"Game of Life"; + this->menuStrip1->ResumeLayout(false); + this->menuStrip1->PerformLayout(); + this->ResumeLayout(false); + this->PerformLayout(); + + } +#pragma endregion + protected: + void CloseApp () + { + m_seq->Quit(); + m_par->Quit(); + //! Perform a very ungracious exit, should coordinate the threads + System::Environment::Exit(0); + } + + protected: + virtual void OnPaint(PaintEventArgs^ e) override + { + } + + virtual void OnFormClosing(FormClosingEventArgs^ e) override + { + CloseApp(); + } + + void OnExit(System::Object^ sender, System::EventArgs^ e) + { + CloseApp(); + } + + void OnSeed(System::Object^ sender, System::EventArgs^ e) + { + this->seedToolStripMenuItem->Enabled = false; + this->runToolStripMenuItem->Enabled = true; + time_t now = time(NULL); + this->m_board1->seed((int)now); + this->m_board2->seed(this->m_board1); + this->Invalidate(); + } + + void OnRun(System::Object^ sender, System::EventArgs^ e) + { + this->runToolStripMenuItem->Enabled = false; + this->pauseToolStripMenuItem->Enabled = true; + m_seqThread->Start(); + m_parThread->Start(); + } + + void OnPauseResume(System::Object^ sender, System::EventArgs^ e) + { + if (m_suspend) + { + m_seq->SetPause(true); + m_par->SetPause(true); + this->pauseToolStripMenuItem->Text = L"Resume"; + } + else + { + m_seq->SetPause(false); + m_par->SetPause(false); + this->pauseToolStripMenuItem->Text = L"Pause"; + } + m_suspend = !m_suspend; + } + + private: + System::Void menuStrip1_ItemClicked(System::Object^ sender, System::Windows::Forms::ToolStripItemClickedEventArgs^ e) + {} +}; +#endif +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Game_of_life.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Game_of_life.cpp new file mode 100644 index 0000000000..46bb31f7b0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Game_of_life.cpp @@ -0,0 +1,238 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + Game_of_life.cpp : + main project file. +*/ +#include "Board.h" +#include "Form1.h" + +#define WIN32_LEAN_AND_MEAN + +#ifndef _CONSOLE +#include +#else +#include +#include +#include +#include "Evolution.h" + +#define BOARD_SQUARE_SIZE 2 + +int low; //! lower range limit of threads +int high; //! high range limit of threads +double execution_time; //! time for game of life iterations +#endif + +Board::Board(int width, int height, int squareSize, LabelPtr counter) +: m_width(width), m_height(height), m_squareSize(squareSize), m_counter(counter) +{ +#ifndef _CONSOLE + InitializeComponent(); + DoubleBuffered = true; + + this->Width = m_squareSize*width; + this->Height = m_squareSize*height; +#endif + m_matrix = new Matrix(); + m_matrix->width = width; + m_matrix->height = height; + m_matrix->data = new char[width*height]; + memset(m_matrix->data, 0, width*height); +#ifndef _CONSOLE + m_occupiedBrush = gcnew SolidBrush(Color::Black); + m_freeBrush = gcnew SolidBrush(Color::LightGray); + + m_graphics = CreateGraphics(); + m_bmp = gcnew Bitmap(Width, Height); + m_mem_dc = Graphics::FromImage(m_bmp); +#endif +} + +Board::~Board() +{ +#ifndef _CONSOLE + if (components) + { + delete components; + } +#endif + delete[] m_matrix->data; + delete m_matrix; +} + +void Board::seed(int s) +{ + srand(s); + for (int j=0; jdata[i+j*m_width] = x>75? 1: 0; // 25% occupied + } + } +#ifndef _CONSOLE + Invalidate(); +#endif +} + +void Board::seed( const BoardPtr src ) +{ + memcpy(m_matrix->data, src->m_matrix->data, m_height*m_width); +#ifndef _CONSOLE + Invalidate(); +#endif +} + +#ifndef _CONSOLE +void Board::draw(Graphics^ g) +{ + m_mem_dc->FillRectangle(m_freeBrush, Drawing::Rectangle(0, 0, m_width*m_squareSize, m_height*m_squareSize)); + for (int j=0; jdata[i+j*m_width] ) + { + m_mem_dc->FillRectangle(m_occupiedBrush, Drawing::Rectangle(i*m_squareSize, j*m_squareSize, m_squareSize, m_squareSize)); + } + } + } + g->DrawImage(m_bmp, 0, 0); +} + +void Board::OnPaint(PaintEventArgs^ e) +{ + draw(e->Graphics); +} + +[STAThreadAttribute] +int main(array ^args) +{ + // Enabling Windows XP visual effects before any controls are created + Application::EnableVisualStyles(); + Application::SetCompatibleTextRenderingDefault(false); + + // Create the main window and run it + Application::Run(gcnew Form1()); + return 0; +} +#else + +//! Print usage of this program +void PrintUsage() +{ + printf("Usage: gol [M[:N] -t execution_time]\nM and N are a range of numbers of threads to be used.\nexecution_time is a time (in sec) for execution game_of_life iterations\n"); + printf("Default values:\nM:\t\tautomatic\nN:\t\tM\nexecution_time:\t10\n"); +} + +//! Parse command line +bool ParseCommandLine(int argc, char * argv []) +{ + char* s = argv[1]; + char* end; + //! command line without parameters + if(argc == 1) + { + low = tbb::task_scheduler_init::automatic; + high = low; + execution_time = 5; + return true; + } + //! command line with parameters + if(argc != 4) + { + PrintUsage(); + return false; + } + if(std::string("-t") != argv[argc-2]) + //! process M[:N] parameter + high = strtol(s,&end,0); + low = strtol(s,&end,0); + switch( *end ) + { + case ':': + high = strtol(end+1,0,0); + break; + case '\0': + break; + default: + PrintUsage(); + return false; + } + if (high < low) + { + std::cout << "Set correct range. Current range: " << low << ":" << high << std::endl; + PrintUsage(); + return false; + + } + //! process execution_time parameter + execution_time = strtol(argv[argc-1],&end,0); + return true; +} + +int main( int argc, char* argv[] ) +{ + if(!ParseCommandLine( argc, argv )) + return 1; + SequentialEvolution* m_seq; + ParallelEvolution* m_par; + Board* m_board1; + Board* m_board2; + int* count = NULL; + + int boardWidth = 300; + int boardHeight = 300; + + m_board1 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count); + m_board2 = new Board(boardWidth, boardHeight, BOARD_SQUARE_SIZE, count); + + time_t now = time(NULL); + printf("Generate Game of life board\n"); + m_board1->seed((int)now); + m_board2->seed(m_board1); + + m_seq = new SequentialEvolution(m_board1->m_matrix, m_board1); + m_seq->Run(execution_time, 1); + delete m_seq; + + m_par = new ParallelEvolution(m_board2->m_matrix, m_board2); + for( int p = low; p <= high; ++p ) + { + m_par->Run(execution_time, p); + } + delete m_par; + + delete m_board1; + delete m_board2; + return 0; +} +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Update_state.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Update_state.cpp new file mode 100644 index 0000000000..4f3104f1d2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/src/Update_state.cpp @@ -0,0 +1,410 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "Evolution.h" + +#ifdef USE_SSE +/* Update states with SSE */ + +#include +#include + +inline void create_record( char * src, unsigned * dst, unsigned width) +{ + dst[0] |= src[width - 1]; + for( unsigned a=0; a<31u; ++a ) + dst[0] |= src[a]<<(a+1); + unsigned a; + for( a=31u; a>=31; + X[ind] =_mm_or_si128( _mm_slli_epi16(X[ind],1), + _mm_srli_epi16( _mm_slli_si128( X[ind], 2), 15) ); + + unsigned x1 = X[ind + 1].m128i_u32[3]; x1>>=31; + X[ind + 1] =_mm_or_si128( _mm_slli_epi16(X[ind + 1],1), + _mm_srli_epi16( _mm_slli_si128( X[ind + 1], 2), 15) ); + X[ind + 1].m128i_u32[0] |= x0; + + unsigned* dst = (unsigned*)&X[ind]; + unsigned x2 = dst[301/32u] & (1<<(301%32u)); x2>>=(301%32u); + X[ind + 2] =_mm_or_si128( _mm_slli_epi16(X[ind + 2],1), + _mm_srli_epi16( _mm_slli_si128( X[ind + 2], 2), 15) ); + X[ind + 2].m128i_u32[0] |= x1; + X[ind].m128i_u32[0] |= x2; + } +} + +void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end) +{ + //300/128 + 1 =3, 3*300=900 + unsigned size_sse_row = m_matrix->width/128 + 1; //3 + unsigned size_sse_ar=size_sse_row * (end - begin); + __m128i X[906], A[900], B[900], C[900]; + char * mas = m_matrix->data; + + for( unsigned i=0; iwidth; + for( unsigned b = 0 ; b < height; ++b ) + { + char* src = &mas[(b + begin)*width]; + unsigned* dst = (unsigned*)&X[(b+1)*size_sse_row]; + create_record(src, dst, width); + } + // create high row in X[] + char * src; + if(begin == 0) + { + src = &mas[(m_matrix->height-1)*width]; + } + else + { + src = &mas[(begin-1)*width]; + } + unsigned* dst = (unsigned*)X; + create_record(src, dst, width); + + //create lower row in X[] + if(end == m_matrix->height ) + { + src = mas; + } + else + { + src = &mas[end*width]; + } + dst = (unsigned*)&X[(height+1)*size_sse_row]; + create_record(src, dst, width); + + //sum( C, B, A, X+offset_for_upwards ); high-left friend + sum_offset(X,A,B,C,size_sse_ar, 0); + + //sum( C, B, A, X+offset_for_no_vertical_shift ); + sum_offset(X,A,B,C,size_sse_ar, size_sse_row); + + //sum( C, B, A, X+offset_for_downwards ); + sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row); + + //shift_left( X ); (when view 2D) in our logic it is in right + height = end - begin + 2; + shift_left2D( X, height, size_sse_row); + + //sum( C, B, A, X+offset_for_upwards ); high-left friend + sum_offset(X,A,B,C,size_sse_ar, 0); + + //sum( C, B, A, X+offset_for_downwards ); + sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row); + + //shift_left( X ); (view in 2D) in our logic it is right shift + height = end - begin + 2; + shift_left2D( X, height, size_sse_row); + + //sum( C, B, A, X+offset_for_upwards ); high-right friend + sum_offset(X,A,B,C,size_sse_ar, 0); + + //sum( C, B, A, X+offset_for_no_vertical_shift ); right friend + sum_offset(X,A,B,C,size_sse_ar, size_sse_row); + + //sum( C, B, A, X+offset_for_downwards ); right down friend + sum_offset(X,A,B,C,size_sse_ar, 2*size_sse_row); + + //shift_right( X ); (when view in 2D) in our case it left shift. + height = end - begin + 2; + shift_right2D( X, height, size_sse_row); + + //X = (X|A)&B&~C (done bitwise over the arrays) + unsigned shift = size_sse_row; + for(unsigned i=0; iwidth; + for( unsigned b=0; b>(a%32u); + } + } +} +#else +/* end SSE block */ + +// ---------------------------------------------------------------------- +// GetAdjacentCellState() - returns the state (value) of the specified +// adjacent cell of the current cell "cellNumber" +char GetAdjacentCellState( + char* source, // pointer to source data block + int x, // logical width of field + int y, // logical height of field + int cellNumber, // number of cell position to examine + int cp // which adjacent position + ) +{ +/* +cp +*-- cp=1 ... --- cp=8 (summary: -1-2-3- +-x- -x- -4-x-5- +--- --* -6-7-8- ) +*/ + char cellState = 0; // return value + + // set up boundary flags to trigger field-wrap logic + bool onTopRow = false; + bool onBottomRow = false; + bool onLeftColumn = false; + bool onRightColumn = false; + + // check to see if cell is on top row + if (cellNumber < x) + { + onTopRow = true; + } + // check to see if cell is on bottom row + if ((x*y)-cellNumber <= x) + { + onBottomRow = true; + } + // check to see if cell is on left column + if (cellNumber%x == 0) + { + onLeftColumn = true; + } + // check to see if cell is on right column + if ((cellNumber+1)%x == 0) + { + onRightColumn = true; + } + + switch (cp) + { + case 1: + if (onTopRow && onLeftColumn) + { + return *(source+((x*y)-1)); + } + if (onTopRow && !onLeftColumn) + { + return *(source+(((x*y)-x)+(cellNumber-1))); + } + if (onLeftColumn && !onTopRow) + { + return *(source+(cellNumber-1)); + } + return *((source+cellNumber)-(x+1)); + + case 2: + if (onTopRow) + { + return *(source+(((x*y)-x)+cellNumber)); + } + return *((source+cellNumber)-x); + + case 3: + if (onTopRow && onRightColumn) + { + return *(source+((x*y)-x)); + } + if (onTopRow && !onRightColumn) + { + return *(source+(((x*y)-x)+(cellNumber+1))); + } + if (onRightColumn && !onTopRow) + { + return *(source+((cellNumber-(x*2))+1)); + } + return *(source+(cellNumber-(x-1))); + + case 4: + if (onRightColumn) + { + return *(source+(cellNumber-(x-1))); + } + return *(source+(cellNumber+1)); + + case 5: + if (onBottomRow && onRightColumn) + { + return *source; + } + if (onBottomRow && !onRightColumn) + { + return *(source+((cellNumber-((x*y)-x))+1)); + } + if (onRightColumn && !onBottomRow) + { + return *(source+(cellNumber+1)); + } + return *(source+(((cellNumber+x))+1)); + + case 6: + if (onBottomRow) + { + return *(source+(cellNumber-((x*y)-x))); + } + return *(source+(cellNumber+x)); + + case 7: + if (onBottomRow && onLeftColumn) + { + return *(source+(x-1)); + } + if (onBottomRow && !onLeftColumn) + { + return *(source+(cellNumber-((x*y)-x)-1)); + } + if (onLeftColumn && !onBottomRow) + { + return *(source+(cellNumber+((x*2)-1))); + } + return *(source+(cellNumber+(x-1))); + + case 8: + if (onLeftColumn) + { + return *(source+(cellNumber+(x-1))); + } + return *(source+(cellNumber-1)); + } + return cellState; +} + +char CheckCell(Matrix * m_matrix, int cellNumber) +{ + char total = 0; + char* source = m_matrix->data; + //look around to find cell's with status "alive" + for(int i=1; i<9; i++) + { + total += GetAdjacentCellState(source, m_matrix->width, m_matrix->height, cellNumber, i); + } + // if the number of adjacent live cells is < 2 or > 3, the result is a dead + // cell regardless of its current state. (A live cell dies of loneliness if it + // has less than 2 neighbors, and of overcrowding if it has more than 3; a new + // cell is born in an empty spot only if it has exactly 3 neighbors. + if (total < 2 || total > 3) + { + return 0; + } + + // if we get here and the cell position holds a living cell, it stays alive + if (*(source+cellNumber)) + { + return 1; + } + + // we have an empty position. If there are only 2 neighbors, the position stays + // empty. + if (total == 2) + { + return 0; + } + + // we have an empty position and exactly 3 neighbors. A cell is born. + return 1; +} + +void UpdateState(Matrix * m_matrix, char * dest ,int begin, int end) +{ + for (int i=begin; i<=end; i++) + { + *(dest+i) = CheckCell(m_matrix, i); + } +} + +#endif +/* end non-SSE block */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/xcode/game_of_life.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/xcode/game_of_life.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..1c1cd6a822 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/game_of_life/xcode/game_of_life.xcodeproj/project.pbxproj @@ -0,0 +1,317 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 612CD8DD11F573FC00A587B2 /* Game_of_life.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 612CD8DB11F573FC00A587B2 /* Game_of_life.cpp */; }; + 612CD8DE11F573FC00A587B2 /* Update_state.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 612CD8DC11F573FC00A587B2 /* Update_state.cpp */; }; + 612CD8E111F5742000A587B2 /* Evolution.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 612CD8E011F5742000A587B2 /* Evolution.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 612CD8DB11F573FC00A587B2 /* Game_of_life.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game_of_life.cpp; path = ../src/Game_of_life.cpp; sourceTree = SOURCE_ROOT; }; + 612CD8DC11F573FC00A587B2 /* Update_state.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Update_state.cpp; path = ../src/Update_state.cpp; sourceTree = SOURCE_ROOT; }; + 612CD8E011F5742000A587B2 /* Evolution.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Evolution.cpp; path = ../src/Evolution.cpp; sourceTree = SOURCE_ROOT; }; + 8DD76F6C0486A84900D96B5E /* game_of_life */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = game_of_life; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* game_of_life */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = game_of_life; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 612CD8E011F5742000A587B2 /* Evolution.cpp */, + 612CD8DB11F573FC00A587B2 /* Game_of_life.cpp */, + 612CD8DC11F573FC00A587B2 /* Update_state.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* game_of_life */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* game_of_life */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "game_of_life" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = game_of_life; + productInstallPath = "$(HOME)/bin"; + productName = game_of_life; + productReference = 8DD76F6C0486A84900D96B5E /* game_of_life */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "game_of_life" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* game_of_life */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* game_of_life */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 612CD8DD11F573FC00A587B2 /* Game_of_life.cpp in Sources */, + 612CD8DE11F573FC00A587B2 /* Update_state.cpp in Sources */, + 612CD8E111F5742000A587B2 /* Evolution.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = _CONSOLE; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = game_of_life; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PREPROCESSOR_DEFINITIONS = _CONSOLE; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = game_of_life; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = _CONSOLE; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = game_of_life; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_PREPROCESSOR_DEFINITIONS = _CONSOLE; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = game_of_life; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "game_of_life" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "game_of_life" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/index.html new file mode 100644 index 0000000000..2dc784c0ba --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/index.html @@ -0,0 +1,30 @@ + + + +

    Overview

    +This directory has examples of the template parallel_for. + +

    Directories

    +
    +
    seismic +
    Parallel seismic wave simulation. +
    tachyon +
    Parallel 2-D raytracer/renderer. +
    polygon_overlay +
    Simple polygon overlay. +
    game_of_life +
    Simple Game of life overlay. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile new file mode 100644 index 0000000000..3fb1db2c31 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile @@ -0,0 +1,96 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +NAME=pover +ARGS= +LIGHT_ARGS= --polys 10 --size 5x5 + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +include ../../common/gui/Makefile.gmake + +ifeq ($(UI),x) +UI_CXXFLAGS += -DX_FULLSYNC +endif # X + +override CXXFLAGS += $(UI_CXXFLAGS) + +SRCFILES = ../../common/gui/$(UI)video.cpp pover_video.cpp polymain.cpp polyover.cpp + +ifeq ($(shell uname), Linux) +LIBS+= -lrt +endif + +all: release test + +resources: +ifeq ($(UI),mac) + mkdir -p $(APPRES)/en.lproj $(NAME).app/Contents/MacOS + cp ../../common/gui/xcode/tbbExample/Info.plist $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/en.lproj/* $(APPRES)/en.lproj +endif # Mac + +release: $(SRCFILES) resources +ifeq ($(compiler),xl) + # Avoiding "1586-346 (U) An error occurred during code generation. The code generation return code was 40." with -O3. + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) -ltbb -ltbbmalloc $(LIBS) +else +ifeq ($(UI),mac) + $(CXX_UI) -O3 -DNDEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -O3 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) $(MACUIOBJS) -ltbb -ltbbmalloc $(LIBS) +endif + +debug: $(SRCFILES) resources +ifeq ($(UI),mac) + $(CXX_UI) -g -O0 -DTBB_USE_DEBUG -D_DEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -g -O0 -DTBB_USE_DEBUG -D_DEBUG $(CXXFLAGS) -o $(EXE) $(SRCFILES) $(MACUIOBJS) -ltbb_debug -ltbbmalloc_debug $(LIBS) + +clean: + $(RM) $(EXE) *.o *.d +ifeq ($(UI),mac) + rm -rf $(NAME).app +endif + +test: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS) +else + ./$(EXE) $(ARGS) +endif + +light_test: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(LIGHT_ARGS) +else + ./$(EXE) $(LIGHT_ARGS) +endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile.windows new file mode 100644 index 0000000000..c80c45bef7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/Makefile.windows @@ -0,0 +1,68 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Pover +ARGS= +LIGHT_ARGS= --polys 10 --size 5x5 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options + +# Uncomment one of next lines to choose user interface type (console, gdiplus, direct draw) +#UI = con +UI = gdi +#UI = dd + +# Machine architecture, auto-detected from TBB_TARGET_ARCH by default +# Use XARCH variable to change it. See index.html for more information +ARCH0 = $(TBB_TARGET_ARCH)- +ARCH1 = $(ARCH0:ia32-=x86) +ARCH2 = $(ARCH1:intel64-=AMD64) +XARCH = $(ARCH2:-=x86) + +MAKEINC = ../../common/gui/Makefile.win + +all: release test +release: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib tbbmalloc.lib $(LIBS)" XARCH=$(XARCH) RCNAME=pover SOURCE=*.cpp EXE=$(PROG).exe build_one +debug: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_USE_DEBUG" LFLAGS="$(LDFLAGS) tbb_debug.lib tbbmalloc_debug.lib $(LIBS)" XARCH=$(XARCH) RCNAME=pover SOURCE=*.cpp EXE=$(PROG).exe build_one +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest msvs\pover.res +test: + $(PROG) $(ARGS) +light_test: + $(PROG) $(LIGHT_ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/index.html new file mode 100644 index 0000000000..e26fa939c9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/index.html @@ -0,0 +1,121 @@ + + + +

    Overview

    +Polygon Overlay example that demonstrates the use of parallel_for. +

    +This example is a simple implementation of polygon overlay, as described in + + Parallelizing the Polygon Overlay Problem Using Orca, by H.F. Langendoen. +

    +The solution was implemented in three forms: +
      +
    • The naive serial solution. +
    • The naive parallel solution, by splitting list of polygons from one map and intersecting + each sub-list against the entire list of polygons from the second map. +
    • A parallel solution where each map is split into submaps, with each resulting submap being + intersected against the corresponding submap from the other map. This solution requires some + redundancy (some polygons are members of more than one submap). To prevent multiple copies + of a polygon from being placed in the solution map, if both polygons are duplicated (that is, + if they both appear in more than one map), they are intersected but the result is not placed + in the solution map. +
    +The only optimization in each solution is that the area of the generated sub-polygons are subtracted from +the original area of one of the source polygons. When the remaining area is zero, the intersection process +is halted. +

    +A word about the speedup of the submap case. One may get superlinear speedup in this case (for instance a +laptop with Intel® Core(TM) Duo processor got a speedup of about 20 percent over serial.) This results from two effects: +

    +
      +
    • the number of threads used, and +
    • the fact that for each submap, the number of polygons is smaller than that for the other two cases. +
    +If there are, say, 400 polygons in each map, then on average the number of intersections calculated is +approximately 80,000 (400 * 200, where 200 is the average number of polygons examined before stopping.) +If the maps are split into 2 submaps, the time for each submap is about 200*100, or 20,000. So even +comparing the two sets of submaps serially should result in a speedup somewhere around 2. This number +is affected by the number of redundant polygons being compared; this effect would eventually swamp the gain +from comparing smaller numbers of polygons per submap. And remember the submaps are created by intersecting each +map with a rectangular polygon covering the submap being generated, which is additional work taking about N * O(400) +in the case above, where N is the number of submaps generated, that can be done in parallel. +

    +Running the default release pover while varying the number of submaps from 1 to 1000, the speedup on the submap +case for a 2-processor system looks like
    +Table of speedup for the algorithm
    +

    +

    +One further optimization would be to sort one map, say map1, by maxY, and sort the other map (map2) +by minY. For p1 in map1, start testing for intersection at the first p2 in map2 +that intersected the last polygon tested in map1. This would speed up the intersection process greatly, +but the optimization would apply to all the methods, and the sort would have to be accounted for in the timing. +

    +

    +The source maps are generated pseudo-randomly in the manner described in the paper above. That is, if +we need N polygons, then N "boxes" are chosen at random, then one-at-a-time the areas are expanded in +one of fours directions until the area hits an adjacent polygon. When this process is finished, the +resulting map is inspected and any remaining unoccupied "boxes" are made into additional polygons, as +large as possible in each case. So the actual number of polygons in each map will in general be larger +than the number of polygons requested (sometimes by 10% or more.) +

    +

    +One limitation of the program is that if the number of polygons in the source map is greater than the number of +"boxes" (pixels in the GUI case), the maps cannot be generated. +

    + +

    Files

    +
    +
    polyover.cpp +
    Source code for main program. +
    polyover.h +
    Global variables, classes and enums. +
    pover_video.cpp +
    Source code for the GUI interface. +
    pover_video.h +
    Defines for the GUI version. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. For the various UI options, see the common GUI code build instructions. + +

    Usage

    +Building via the above make commands, or via Visual Studio projects on Windows* systems, produces executable files +named pover.exe. To run these executables directly, use one or more of the following commands. +
    +
    pover.exe +
    Run this version (release or debug). +
    pover.exe n:m +
    Run this version (release or debug) (m-n+1) times, with n threads to m threads inclusive. +
    To run a short version of this example, e.g., for use with Intel® Threading Tools: +
    Build a debug version with the GUI turned off + (e.g., make UI=con debug; see also the build directions above). +
    Run it with a small dataset, e.g., pover.exe --polys 10 --size 5x5. +
    + +

    Notes

    +
      +
    • While running with the GUI display should yield reasonable performance in most cases, running with no GUI + display is strongly recommended in order to demonstrate the full performance and scalability of the example. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.icproj new file mode 100644 index 0000000000..d8886d77cd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.rc b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.rc new file mode 100644 index 0000000000..3eee795fa1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.rc @@ -0,0 +1,61 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE 9, 1 +#pragma code_page(1252) + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""afxres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.vcproj new file mode 100644 index 0000000000..ac773e3eae --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover.vcproj @@ -0,0 +1,832 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_cl.sln new file mode 100644 index 0000000000..50f9b864b3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_cl.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pover", "pover.vcproj", "{4BB7B455-1E09-41D3-BC89-6E67C9032F8C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.ActiveCfg = DD Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.Build.0 = DD Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.ActiveCfg = DD Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.Build.0 = DD Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.ActiveCfg = DD Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.Build.0 = DD Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.ActiveCfg = DD Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.Build.0 = DD Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.Build.0 = Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.ActiveCfg = Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.Build.0 = Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|Win32.ActiveCfg = Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|Win32.Build.0 = Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|x64.ActiveCfg = Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_icl.sln new file mode 100644 index 0000000000..bf88dd2499 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/pover_icl.sln @@ -0,0 +1,53 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "pover", "pover.icproj", "{B175D396-7260-45F8-9E18-842ED8A32A16}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Debug|Win32.ActiveCfg = DD Debug|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Debug|Win32.Build.0 = DD Debug|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Debug|x64.ActiveCfg = DD Debug|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Debug|x64.Build.0 = DD Debug|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Release|Win32.ActiveCfg = DD Release|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Release|Win32.Build.0 = DD Release|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Release|x64.ActiveCfg = DD Release|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}.DD Release|x64.Build.0 = DD Release|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.GDI Debug|Win32.Build.0 = Debug|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}.GDI Debug|x64.ActiveCfg = Debug|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}.GDI Debug|x64.Build.0 = Debug|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}._GDI Release|Win32.ActiveCfg = Release|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}._GDI Release|Win32.Build.0 = Release|Win32 + {B175D396-7260-45F8-9E18-842ED8A32A16}._GDI Release|x64.ActiveCfg = Release|x64 + {B175D396-7260-45F8-9E18-842ED8A32A16}._GDI Release|x64.Build.0 = Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|x64.Build.0 = Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|x64.ActiveCfg = Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|Win32.Build.0 = Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}._GDI Release|Win32.ActiveCfg = Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.Build.0 = Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|x64.ActiveCfg = Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.Build.0 = Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.Build.0 = DD Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|x64.ActiveCfg = DD Release|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.Build.0 = DD Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Release|Win32.ActiveCfg = DD Release|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.Build.0 = DD Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|x64.ActiveCfg = DD Debug|x64 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.Build.0 = DD Debug|Win32 + {4BB7B455-1E09-41D3-BC89-6E67C9032F8C}.DD Debug|Win32.ActiveCfg = DD Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/resource.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/resource.h new file mode 100644 index 0000000000..e70b4ea1e0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/msvs/resource.h @@ -0,0 +1,14 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by pover.rc + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 101 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.cpp new file mode 100644 index 0000000000..4ca700c79d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.cpp @@ -0,0 +1,628 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Polygon overlay +// +// Don't want warnings about deprecated sscanf, getenv +#ifndef _CRT_SECURE_NO_DEPRECATE +#define _CRT_SECURE_NO_DEPRECATE +#endif +#define _MAIN_C_ 1 +#include +#include +#include +#include + +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "pover_global.h" +#include "polyover.h" +#include "pover_video.h" +#include "polymain.h" + +using namespace std; + +#if _DEBUG +const char *faceNames[] = { "North", "East", "South", "West" }; +#endif + +/** +**/ +int main( int argc, char **argv) { + pover_video poly; + poly.threaded = true; + gVideo = &poly; + + if(!initializeVideo(argc, argv)) { + return 1; + } + + gIsGraphicalVersion = poly.graphic_display(); + if(argc > 1) { + if(!ParseCmdLine(argc, argv)) { + if(gIsGraphicalVersion) rt_sleep(10000); + // if graphical, we haven't opened the console window so all the error messages we + // so carefully wrote out disappeared into the ether. :( + exit(1); + } + } + + if(gCsvFilename != NULL) { +#define BUFLEN 1000 + std::string fname_buf = gCsvFilename; + fname_buf += ".csv"; + gCsvFile.open(fname_buf.c_str()); + } + + // we have gMapXSize and gMapYSize determining the number of "squares" + // we have g_xwinsize and g_ywinsize the total size of the window + // we also have BORDER_SIZE the size of the border between maps + // we need to determine + // g_polyBoxSize -- the number of pixels on each size of each square + + if(gIsGraphicalVersion) { + int xpixelsPerMap = (g_xwinsize - 4*BORDER_SIZE) / 3; // three maps, with borders between and outside + gMapXSize = xpixelsPerMap; // make the boxes one per pixel + gPolyXBoxSize = xpixelsPerMap / gMapXSize; + int ypixelsPerMap = (g_ywinsize - 2*BORDER_SIZE); // one map vertically + gMapYSize = ypixelsPerMap; // one pixel per box, rather. + + gPolyYBoxSize = ypixelsPerMap / gMapYSize; + if((gPolyXBoxSize == 0) || (gPolyYBoxSize == 0)) { + cout << "The display window is not large enough to show the maps" << std::endl; + int minxSize = 4*BORDER_SIZE + 3*gMapXSize; + int minySize = 2*BORDER_SIZE + gMapYSize; + cout << " Should be at least " << minxSize << " x " << minySize << "." << std::endl; + return 1; + } + map2XLoc = 2*BORDER_SIZE + gMapXSize * gPolyXBoxSize; + maprXLoc = 3*BORDER_SIZE + 2 * gMapXSize * gPolyXBoxSize; + + } + else { // not gIsGraphicalVersion + // gMapXSize, gMapYSize, gNPolygons defined in pover_global.h + } + + // create two polygon maps + SetRandomSeed(gMyRandomSeed); // for repeatability + + gVideo->main_loop(); +} + +void Usage(int argc, char **argv) { + char *cmdTail = strrchr(*argv, '\\'); + if(cmdTail == NULL) { + cmdTail = *argv; + } + else { + cmdTail++; + } + cout << cmdTail << " [threads[:threads2]] [--polys npolys] [--size nnnxnnn] [--seed nnn]" << std::endl; + cout << "Create polygon maps and overlay them." << std::endl << std::endl; + cout << "Parameters:" << std::endl; + cout << " threads[:threads2] - number of threads to run" << std::endl; + cout << " --polys npolys - number of polygons in each map" << std::endl; + cout << " --size nnnxnnn - size of each map (X x Y)" << std::endl; + cout << " --seed nnn - initial value of random number generator" << std::endl; + cout << " --csv filename - write timing data to CSV-format file" << std::endl; + cout << " --grainsize n - set grainsize to n" << std::endl; + cout << " --use_malloc - allocate polygons with malloc instead of scalable allocator" << std::endl; + cout << std::endl; + cout << "npolys must be smaller than the size of the map" << std::endl; + cout << std::endl; + exit(1); +} + +bool ParseCmdLine(int argc, char **argv ) { + bool error_found = false; + bool nPolysSpecified = false; + bool nMapSizeSpecified = false; + bool nSeedSpecified = false; + bool csvSpecified = false; + bool grainsizeSpecified = false; + bool mallocSpecified = false; + int origArgc = argc; + char** origArgv = argv; + unsigned int newnPolygons = gNPolygons; + unsigned int newSeed = gMyRandomSeed; + unsigned int newX = gMapXSize; + unsigned int newY = gMapYSize; + unsigned int newGrainSize = gGrainSize; + argc--; argv++; + if(argc > 0 && isdigit((*argv)[0])) { + // first argument is one or two numbers, specifying how mny threads to run + char* end; gThreadsHigh = gThreadsLow = (int)strtol(argv[0],&end,0); + switch( *end) { + case ':': gThreadsHigh = (int)strtol(end+1,0,0); break; + case '\0': break; + default: cout << "Unexpected character in thread specifier: " << *end << std::endl; break; + } + if(gThreadsLow > gThreadsHigh) { + int t = gThreadsLow; + gThreadsLow = gThreadsHigh; + gThreadsHigh = t; + } + argv++; argc--; + } + while(argc > 0) { + // format 1: --size nnnxnnn, where nnn in {0 .. 9}+ -- size of map in "squares" + if(!strncmp("--size", *argv, (size_t)6)) { + if(nMapSizeSpecified) { + cout << " Error: map size multiply specified" << std::endl; + error_found = true; + } + else { + argv++; argc--; + if(argc == 0) { + error_found = true; + cout << " Error: --size must have a value" << std::endl; + } + if(strchr(*argv, 'x') != strrchr(*argv,'x')) { + // more than one 'x' + cout << "Error: map size should be nnnxnnn (" << *argv << ")" << std::endl; + error_found = true; + } + else { + int rval; + rval = sscanf(*argv, "%ux%u", &newX, &newY); + if(rval != 2) { + cout << "Error parsing map size (format should be nnnxnnn (" << *argv << ")" << std::endl; + error_found = true; + } + if(newX == 0 || newY == 0) { + cout << "Error: size of map should be greater than 0 (" << *argv << ")" << std::endl; + error_found = true; + } + } + } + argc--; argv++; + } + // format 2: --seed nnn -- initial random number seed + else if(!strncmp("--seed", *argv, (size_t)6)) { + argv++; argc--; + if(nSeedSpecified) { + cout << "Error: new seed multiply specified" << std::endl; + error_found = true; + } + else { + nSeedSpecified = true; + int rtval = sscanf(*argv, "%u", &newSeed); + if(rtval == 0) { + cout << "Error: --seed should be an unsigned number (instead of " << *argv << ")" << std::endl; + error_found = true; + } + } + argv++; argc--; + } + // format 3: --polys n[n] -- number of polygons in each map + else if(!strncmp("--polys", *argv, (size_t)7)) { + //unsigned int newnPolygons; + argv++; argc--; + if(nPolysSpecified) { + cout << "Error: number of polygons multiply-specified" << std::endl; + error_found = true; + }else { + int rtval = sscanf(*argv, "%u", &newnPolygons); + if(newnPolygons == 0) { + cout << "Error: number of polygons must be greater than 0 (" << *argv << ")" << std::endl; + } + } + argv++; argc--; + } + // format 4: --csv -- name of CSV output file ("xxx" for "xxx.csv") + else if(!strncmp("--csv", *argv, (size_t)5)) { + argv++; argc--; + if(csvSpecified) { + cout << "Error: Multiple specification of CSV file" << std::endl; + error_found = true; + } + else { + gCsvFilename = *argv; + argv++; argc--; + csvSpecified = true; + } + } + else if(!strncmp("--grainsize", *argv, (size_t)11)) { + argv++; argc--; + if(grainsizeSpecified) { + cout << "Error: Multiple specification of grainsize" << std::endl; + error_found = true; + } + else { + int grval = sscanf(*argv, "%u", &newGrainSize); + grainsizeSpecified = true; + if(newGrainSize == 0) { + cout << "Error: grainsize must be greater than 0" << std::endl; + error_found = true; + } + } + argv++; argc--; + } + else if(!strncmp("--use_malloc", *argv, (size_t)12)) { + argv++; argc--; + if(mallocSpecified) { + cout << "Error: --use_malloc multiply-specified" << std::endl; + error_found = true; + } + else { + mallocSpecified = true; + gMBehavior = UseMalloc; + } + } + else { + cout << "Error: unrecognized argument: " << *argv << std::endl; + error_found = true; + argv++; argc--; + } + } + if(!error_found) { + if(newX * newY < newnPolygons) { + error_found = true; + cout << "Error: map size should not be smaller than the number of polygons (gNPolygons = " << newnPolygons << ", map size " << newX << "x" << newY << ")" << std::endl; + } + } + if(!error_found) { + gMapXSize = newX; + gMapYSize = newY; + gNPolygons = newnPolygons; + gMyRandomSeed = newSeed; + gGrainSize = (int)newGrainSize; + } + else { + Usage(origArgc, origArgv); + } + return !error_found; +} + +// create a polygon map with at least gNPolygons polygons. +// Usually more than gNPolygons polygons will be generated, because the +// process of growing the polygons results in holes. +bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, colorcomp_t maxR, colorcomp_t maxG, colorcomp_t maxB) { + bool error_found = false; + int *validPolys; + int *validSide; + int maxSides; + RPolygon *newPoly; + + if(xSize <= 0) { + cout << "xSize (" << xSize << ") should be > 0." << std::endl; + error_found = true; + } + if(ySize <= 0) { + cout << "ySize (" << ySize << ") should be > 0." << std::endl; + error_found = true; + } + if(gNPolygons > (xSize * ySize)) { + cout << "gNPolygons (" << gNPolygons << ") should be less than " << (xSize * ySize) << std::endl; + error_found = true; + } + if(error_found) return false; + // the whole map is [xSize x ySize] squares + // the way we create the map is to + // 1) pick nPolygon discrete squares on an [xSize x ySize] grid + // 2) while there are unused squares on the grid + // 3) pick a polygon with a side that has unused squares on a side + // 4) expand the polygon by 1 to occupy the unused squares + // + // Continue until every square on the grid is occupied by a polygon + int *tempMap; + tempMap = (int *)malloc(xSize * ySize * sizeof(int)); + for(int i=0;i < xSize; i++) { + for(int j=0;j < ySize; j++) { + tempMap[i*ySize + j] = 0; + } + } + + // *newMap = new vector; + *newMap = new Polygon_map_t; + (*newMap)->reserve(gNPolygons + 1); // how much bigger does this need to be on average? + (*newMap)->push_back(RPolygon(0,0,xSize-1, ySize-1)); + for(int i=0; i < gNPolygons; i++) { + int nX; + int nY; + do { // look for an empty square. + nX = NextRan(xSize); + nY = NextRan(ySize); + } while(tempMap[nX * ySize + nY] != 0); + int nR = (maxR * NextRan(1000)) / 999; + int nG = (maxG * NextRan(1000)) / 999; + int nB = (maxB * NextRan(1000)) / 999; + (*newMap)->push_back(RPolygon(nX,nY,nX,nY,nR,nG,nB)); + tempMap[nX * ySize + nY] = i+1; // index of this polygon + 1 + } + // now have to grow polygons to fill the space. + validPolys = (int *)malloc(4*gNPolygons * sizeof(int)); + validSide = (int *)malloc(4*gNPolygons * sizeof(int)); + for(int i=0;i 0) { + int indx = NextRan(maxSides); + int polyIndx = validPolys[indx]; + int checkSide = validSide[indx]; + int xlow, xhigh, ylow, yhigh; + int xlnew, xhnew, ylnew, yhnew; + (**newMap)[polyIndx].get(&xlow,&ylow,&xhigh,&yhigh); + xlnew = xlow; + xhnew = xhigh; + ylnew = ylow; + yhnew = yhigh; + // can this polygon be expanded along the chosen side? + switch(checkSide) { + case NORTH_SIDE: + // y-1 from xlow to xhigh + ylow = yhigh = (ylow - 1); + ylnew--; + break; + case EAST_SIDE: + // x+1 from ylow to yhigh + xlow = xhigh = (xhigh + 1); + xhnew++; + break; + case SOUTH_SIDE: + // y+1 from xlow to xhigh + ylow = yhigh = (yhigh+1); + yhnew++; + break; + case WEST_SIDE: + // x-1 from ylow to yhigh + xlow = xhigh = (xlow - 1); + xlnew--; + break; + } + bool okay_to_extend = !(((xlow < 0) || (xlow >= xSize)) || ((ylow < 0) || (ylow >= ySize))); + for(int ii = xlow; (ii <= xhigh) && okay_to_extend; ii++) { + for(int jj=ylow; (jj <= yhigh) && okay_to_extend; jj++) { + okay_to_extend = tempMap[ii*ySize + jj] == 0; + } + } + if(okay_to_extend) { + (**newMap)[polyIndx].set(xlnew,ylnew,xhnew,yhnew); + for(int ii = xlow; ii <= xhigh; ii++) { + for(int jj=ylow; jj <= yhigh && okay_to_extend; jj++) { + tempMap[ii*ySize + jj] = polyIndx; + } + } + } + else { + // once we cannot expand along a side, we will never be able to; remove from the list. + for(int i=indx + 1; i < maxSides; i++) { + validPolys[i-1] = validPolys[i]; + validSide[i-1] = validSide[i]; + } + maxSides--; + } + } + + // Once no polygons can be grown, look for unused squares, and fill them with polygons. + for(int j=0;jpush_back(RPolygon(i,j,ilen,jlen,nR,nG,nB)); + gNPolygons++; + for(int ii=i; ii<=ilen;ii++) { + for(int jj=j;jj<=jlen;jj++) { + tempMap[ii*ySize + jj] = gNPolygons; + } + } + } + } + } + +#if _DEBUG + if(!gIsGraphicalVersion) { + cout << std::endl << "Final Map:" << std::endl; + for(int j=0; j < ySize; j++ ) { + cout << "Row " << setw(2) << j << ":"; + for(int i=0;i=limit)) {cout << "checkMap error: " << str << " out of range (" << n << ")" << std::endl;anError=true;} +#define xRangeCheck(str,n) rangeCheck(str,n,gMapXSize) +#define yRangeCheck(str,n) rangeCheck(str,n,gMapYSize) + // The first polygon is the whole map. + bool anError = false; + int *cArray; + if(checkMap->size() <= 0) { + cout << "checkMap error: no polygons in map" << std::endl; + return; + } + // mapXhigh and mapYhigh are inclusive, that is, if the map is 5x5, those values would be 4. + int mapXhigh, mapYhigh, mapLowX, mapLowY; + int gMapXSize, gMapYSize; + (*checkMap)[0].get(&mapLowX, &mapLowY, &mapXhigh, &mapYhigh); + if((mapLowX !=0) || (mapLowY != 0)) { + cout << "checkMap error: map origin not (0,0) (X=" << mapLowX << ", Y=" << mapLowY << ")" << std::endl; + anError = true; + } + if((mapXhigh < 0) || (mapYhigh < 0)) { + cout << "checkMap error: no area in map (X=" << mapXhigh << ", Y=" << mapYhigh << ")" << std::endl; + anError = true; + } + if(anError) return; + // bounds for array. + gMapXSize = mapXhigh + 1; + gMapYSize = mapYhigh + 1; + cArray = (int *)malloc(sizeof(int)*(gMapXSize*gMapYSize)); + + for(int i=0; isize()) && !anError; p++) { + (*checkMap)[p].get(&xlow, &ylow, &xhigh, &yhigh); + xRangeCheck("xlow", xlow); + yRangeCheck("ylow", ylow); + xRangeCheck("xhigh", xhigh); + yRangeCheck("yhigh", yhigh); + if(xlow>xhigh) { + cout << "checkMap error: xlow > xhigh (" << xlow << "," << xhigh << ")" << std::endl; + anError = true; + } + if(ylow>yhigh) { + cout << "checkMap error: ylow > yhigh (" << ylow << "," << yhigh << ")" << std::endl; + anError = true; + } + for(int ii = xlow; ii <= xhigh; ii++) { + for(int jj = ylow; jj <= yhigh; jj++) { + if(cArray[indx(ii,jj)] != 0) { + cout << "checkMap error: polygons " << cArray[indx(ii,jj)] << " and " << p << " intersect" << std::endl; + anError = true; + } + cArray[indx(ii,jj)] = p; + } + } + } + for(int ii=0; ii < gMapXSize; ii++) { + for(int jj=0; jj < gMapYSize; jj++) { + if(cArray[indx(ii,jj)] == 0) { + cout << "checkMap error: block(" << ii << ", " << jj << ") not in any polygon" << std::endl; + anError = true; + } + } + } + free(cArray); +} + +bool CompOnePolygon(RPolygon &p1, RPolygon &p2) { + int xl1, xh1, yl1, yh1; + int xl2, xh2, yl2, yh2; + p1.get(&xl1, &yl1, &xh1, &yh1); + p2.get(&xl2, &yl2, &xh2, &yh2); + if(yl1>yl2) return true; + if(yl1 xl2); +} + +bool PolygonsEqual(RPolygon *p1, RPolygon *p2) { + int xl1, xh1, yl1, yh1; + int xl2, xh2, yl2, yh2; + p1->get(&xl1, &yl1, &xh1, &yh1); + p2->get(&xl2, &yl2, &xh2, &yh2); + return ((xl1 == xl2) && (yl1==yl2) && (xh1 == xh2) && (yh1 == yh2)); +} + +bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2) { + // create two new polygon maps, copy the pointers from the original to these. + // we have to skip the first polygon, which is the size of the whole map + Polygon_map_t *t1, *t2; + bool is_ok = true; + t1 = new Polygon_map_t; + t1->reserve(map1->size()); + for(unsigned int i=1;isize(); i++) { + t1->push_back(map1->at(i)); + } + t2 = new Polygon_map_t; + t2->reserve(map2->size()); + for(unsigned int i=1;isize();i++) { + t2->push_back(map2->at(i)); + } + // sort the two created maps by (xlow, ylow) + sort(t1->begin(), t1->end()); + sort(t2->begin(), t2->end()); + // compare each element of both maps. + if(t1->size() != t2->size()) { + cout << "Error: maps not the same size ( " << int(t1->size()) << " vs " << int(t2->size()) << ")." << std::endl; + } + int maxSize = (int)((t1->size() < t2->size()) ? t1->size() : t2->size()); + for(int i=0; i < maxSize; i++) { + if(!PolygonsEqual(&((*t1)[i]), &((*t2)[i]))) { + cout << "Error: polygons unequal (" << (*t1)[i] << " vs " << (*t2)[i] << std::endl; + is_ok = false; + } + } + delete t1; + delete t2; + return is_ok; +} + +void SetRandomSeed(int newSeed) { + srand((unsigned)newSeed); +} + +int NextRan(int n) { + // assert(n > 1); + // if we are given 1, we will just return 0 + //assert(n < RAND_MAX); + int rrand = rand() << 15 | rand(); + if(rrand < 0) rrand = -rrand; + return rrand % n; +} + +std::ostream& operator<<(std::ostream& s, const RPolygon &p) { + int xl, yl, xh, yh; + p.get(&xl, &yl, &xh, &yh); + return s << "[(" << xl << "," << yl << ")-(" << xh << "," << yh << ")] "; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.h new file mode 100644 index 0000000000..ca5938d5a3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polymain.h @@ -0,0 +1,53 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "pover_global.h" // for declaration of DEFINE and INIT + +DEFINE Polygon_map_t *gPolymap1 INIT(0); +DEFINE Polygon_map_t *gPolymap2 INIT(0); +DEFINE Polygon_map_t *gResultMap INIT(0); + +extern void Usage(int argc, char **argv); + +extern bool ParseCmdLine(int argc, char **argv ); + +extern bool GenerateMap(Polygon_map_t **newMap, int xSize, int ySize, int gNPolygons, colorcomp_t maxR, colorcomp_t maxG, colorcomp_t maxB); + +extern bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh); + +extern void CheckPolygonMap(Polygon_map_t *checkMap); + +extern bool CompOnePolygon(RPolygon *p1, RPolygon *p2); + +extern bool PolygonsEqual(RPolygon *p1, RPolygon *p2); + +extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2); + +extern void SetRandomSeed(int newSeed); + +extern int NextRan(int n); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.cpp new file mode 100644 index 0000000000..c9d74fe2d4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.cpp @@ -0,0 +1,676 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Polygon overlay +// +#include +#include +#include +#include +#include +#include "tbb/tick_count.h" +#include "tbb/blocked_range.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/mutex.h" +#include "tbb/spin_mutex.h" +#include "polyover.h" +#include "polymain.h" +#include "pover_video.h" + +using namespace std; + +/*! +* @brief intersects a polygon with a map, adding any results to output map +* +* @param[out] resultMap output map (must be allocated) +* @param[in] polygon to be intersected +* @param[in] map intersected against +* @param[in] lock to use when adding output polygons to result map +* +*/ +void OverlayOnePolygonWithMap(Polygon_map_t *resultMap, RPolygon *myPoly, Polygon_map_t *map2, tbb::spin_mutex *rMutex) { + int r1, g1, b1, r2, g2, b2; + int myr=0; + int myg=0; + int myb=0; + int p1Area = myPoly->area(); + for(unsigned int j=1; (j < map2->size()) && (p1Area > 0); j++) { + RPolygon *p2 = &((*map2)[j]); + RPolygon *pnew; + int newxMin, newxMax, newyMin, newyMax; + myPoly->getColor(&r1, &g1, &b1); + if(PolygonsOverlap(myPoly, p2, newxMin, newyMin, newxMax, newyMax)) { + p2->getColor(&r2, &g2, &b2); + myr = r1 + r2; + myg = g1 + g2; + myb = b1 + b2; + p1Area -= (newxMax-newxMin+1)*(newyMax - newyMin + 1); + if(rMutex) { + tbb::spin_mutex::scoped_lock lock(*rMutex); + resultMap->push_back(RPolygon(newxMin, newyMin, newxMax, newyMax, myr, myg, myb)); + } + else { + resultMap->push_back(RPolygon(newxMin, newyMin, newxMax, newyMax, myr, myg, myb)); + } + } + } +} + +/*! +* @brief Serial version of polygon overlay +* @param[out] output map +* @param[in] first map (map that individual polygons are taken from) +* @param[in] second map (map passed to OverlayOnePolygonWithMap) +*/ +void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2) { + cout << "SerialOverlayMaps called" << std::endl; + *resultMap = new Polygon_map_t; + + RPolygon *p0 = &((*map1)[0]); + int mapxSize, mapySize, ignore1, ignore2; + p0->get(&ignore1, &ignore2, &mapxSize, &mapySize); + (*resultMap)->reserve(mapxSize*mapySize); // can't be any bigger than this + // push the map size as the first polygon, + (*resultMap)->push_back(RPolygon(0,0,mapxSize, mapySize)); + for(unsigned int i=1; i < map1->size(); i++) { + RPolygon *p1 = &((*map1)[i]); + OverlayOnePolygonWithMap(*resultMap, p1, map2, NULL); + } +} + +/*! +* @class ApplyOverlay +* @brief Simple version of parallel overlay (make parallel on polygons in map1) +*/ +class ApplyOverlay { + Polygon_map_t *m_map1, *m_map2, *m_resultMap; + tbb::spin_mutex *m_rMutex; +public: + /*! + * @brief functor to apply + * @param[in] r range of polygons to intersect from map1 + */ + void operator()( const tbb::blocked_range & r) const { + PRINT_DEBUG("From " << r.begin() << " to " << r.end()); + for(int i=r.begin(); i != r.end(); i++) { + RPolygon *myPoly = &((*m_map1)[i]); + OverlayOnePolygonWithMap(m_resultMap, myPoly, m_map2, m_rMutex); + } + } + ApplyOverlay(Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2, tbb::spin_mutex *rmutex) : + m_resultMap(resultMap), m_map1(map1), m_map2(map2), m_rMutex(rmutex) {} +}; + +/*! +* @brief apply the parallel algorithm +* @param[out] result_map generated map +* @param[in] polymap1 first map to be applied (algorithm is parallel on this map) +* @param[in] polymap2 second map. +*/ +void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, Polygon_map_t &polymap2) { +// ----------------------------------- + bool automatic_threadcount = false; + + if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic) { + gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic; + automatic_threadcount = true; + } + result_map = new Polygon_map_t; + + RPolygon *p0 = &(polymap1[0]); + int mapxSize, mapySize, ignore1, ignore2; + p0->get(&ignore1, &ignore2, &mapxSize, &mapySize); + result_map->reserve(mapxSize*mapySize); // can't be any bigger than this + // push the map size as the first polygon, + tbb::spin_mutex *resultMutex = new tbb::spin_mutex(); + int grain_size = gGrainSize; + + for(int nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) { + tbb::task_scheduler_init init(nthreads); + if(gIsGraphicalVersion) { + RPolygon *xp = new RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0); // Clear the output space + delete xp; + } + // put size polygon in result map + result_map->push_back(RPolygon(0,0,mapxSize, mapySize)); + + tbb::tick_count t0 = tbb::tick_count::now(); + tbb::parallel_for (tbb::blocked_range(1,(int)(polymap1.size()),grain_size), ApplyOverlay(result_map, &polymap1, &polymap2, resultMutex)); + tbb::tick_count t1 = tbb::tick_count::now(); + + double naiveParallelTime = (t1-t0).seconds() * 1000; + cout << "Naive parallel with spin lock and "; + if(automatic_threadcount) cout << "automatic"; + else cout << nthreads; + cout << ((nthreads == 1) ? " thread" : " threads"); + cout << " took " << naiveParallelTime << " msec : speedup over serial " << (gSerialTime / naiveParallelTime) << std::endl; + if(gCsvFile.is_open()) { + gCsvFile << "," << naiveParallelTime; + } +#if _DEBUG + CheckPolygonMap(result_map); + ComparePolygonMaps(result_map, gResultMap); +#endif + result_map->clear(); + } + delete resultMutex; + if(gCsvFile.is_open()) { + gCsvFile << std::endl; + } +// ----------------------------------- +} + +template +void split_at( Flagged_map_t& in_map, Flagged_map_t &left_out, Flagged_map_t &right_out, const T median) { + left_out.reserve(in_map.size()); + right_out.reserve(in_map.size()); + for(Flagged_map_t::iterator i = in_map.begin(); i != in_map.end(); ++i ) { + RPolygon *p = i->p(); + if(p->xmax() < median) { + // in left map + left_out.push_back(*i); + } + else if(p->xmin() >= median) { + right_out.push_back(*i); + // in right map + } + else { + // in both maps. + left_out.push_back(*i); + right_out.push_back(RPolygon_flagged(p, true)); + } + } +} + +// range that splits the maps as well as the range. the flagged_map_t are +// vectors of pointers, and each range owns its maps (has to free them on destruction.) +template +class blocked_range_with_maps { + + typedef blocked_range my_range_type; + +private: + + my_range_type my_range; + Flagged_map_t my_map1; + Flagged_map_t my_map2; + +public: + + blocked_range_with_maps( + T begin, T end, typename my_range_type::size_type my_grainsize, + Polygon_map_t *p1, Polygon_map_t *p2 + ) + : my_range(begin, end, my_grainsize) + { + my_map1.reserve(p1->size()); + my_map2.reserve(p2->size()); + for(int i=1; i < p1->size(); ++i) { + my_map1.push_back(RPolygon_flagged(&((*p1)[i]), false)); + } + for(int i=1; i < p2->size(); ++i) { + my_map2.push_back(RPolygon_flagged(&(p2->at(i)), false)); + } + } + + // copy-constructor required for deep copy of flagged maps. One copy is done at the start of the + // parallel for. + blocked_range_with_maps(const blocked_range_with_maps& other): my_range(other.my_range), my_map1(other.my_map1), my_map2(other.my_map2) { } + bool empty() const { return my_range.empty(); } + bool is_divisible() const { return my_range.is_divisible(); } + +#if _DEBUG + void check_my_map() { + assert(my_range.begin() <= my_range.end()); + for(Flagged_map_t::iterator ci = my_map1.begin(); ci != my_map1.end(); ++ci) { + RPolygon *rp = ci->p(); + assert(rp->xmax() >= my_range.begin()); + assert(rp->xmin() < my_range.end()); + } + for(Flagged_map_t::iterator ci = my_map2.begin(); ci != my_map2.end(); ++ci) { + RPolygon *rp = ci->p(); + assert(rp->xmax() >= my_range.begin()); + assert(rp->xmin() < my_range.end()); + } + } + + void dump_map( Flagged_map_t& mapx) { + cout << " ** MAP **\n"; + for( Flagged_map_t::iterator ci = mapx.begin(); ci != mapx.end(); ++ci) { + cout << *(ci->p()); + if(ci->isDuplicate()) { + cout << " -- is_duplicate"; + } + cout << "\n"; + } + cout << "\n"; + } +#endif + + blocked_range_with_maps(blocked_range_with_maps& lhs_r, split ) : my_range(my_range_type(lhs_r.my_range, split())) { + // lhs_r.my_range makes my_range from [median, high) and rhs_r.my_range from [low, median) + Flagged_map_t original_map1 = lhs_r.my_map1; + Flagged_map_t original_map2 = lhs_r.my_map2; + lhs_r.my_map1.clear(); + lhs_r.my_map2.clear(); + split_at(original_map1, lhs_r.my_map1, my_map1, my_range.begin()); + split_at(original_map2, lhs_r.my_map2, my_map2, my_range.begin()); +#if _DEBUG + this->check_my_map(); + lhs_r.check_my_map(); +#endif + } + + const my_range_type& range() const { return my_range; } + Flagged_map_t& map1() { return my_map1; } + Flagged_map_t& map2() { return my_map2; } +}; + +/*! +* @class ApplySplitOverlay +* @brief parallel by columnar strip +*/ +class ApplySplitOverlay { + Polygon_map_t *m_map1, *m_map2, *m_resultMap; + tbb::spin_mutex *m_rMutex; +public: + /*! + * @brief functor for columnar parallel version + * @param[in] r range of map to be operated on + */ + void operator()(/*const*/ blocked_range_with_maps & r) const { +#ifdef _DEBUG + // if we are debugging, serialize the method. That way we can + // see what is happening in each strip without the interleaving + // confusing things. + tbb::spin_mutex::scoped_lock lock(*m_rMutex); + cout << unitbuf << "From " << r.range().begin() << " to " << r.range().end()-1 << std::endl; +#endif + // get yMapSize + int r1, g1, b1, r2, g2, b2; + int myr=-1; + int myg=-1; + int myb=-1; + int i1, i2, i3, yMapSize; + (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize); + + Flagged_map_t &fmap1 = r.map1(); + Flagged_map_t &fmap2 = r.map2(); + + // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged + // as duplicate, don't add the result to the output map. We can still + // intersect them, because we are keeping track of how much of the polygon + // is left over from intersecting, and quitting when the polygon is + // used up. + + for(unsigned int ii=0; ii < fmap1.size(); ii++) { + RPolygon *p1 = fmap1[ii].p(); + bool is_dup = fmap1[ii].isDuplicate(); + int parea = p1->area(); + p1->getColor(&r1, &g1, &b1); + for(unsigned int jj=0;(jj < fmap2.size()) && (parea > 0); jj++) { + int xl, yl, xh, yh; + RPolygon *p2 = fmap2[jj].p(); + if(PolygonsOverlap(p1, p2, xl, yl, xh, yh)) { + if(!(is_dup && fmap2[jj].isDuplicate())) { + p2->getColor(&r2, &g2, &b2); + myr = r1 + r2; + myg = g1 + g2; + myb = b1 + b2; +#ifdef _DEBUG +#else + tbb::spin_mutex::scoped_lock lock(*m_rMutex); +#endif + (*m_resultMap).push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb)); + } + parea -= (xh-xl+1)*(yh-yl+1); + } + } + } + } + + ApplySplitOverlay(Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2, tbb::spin_mutex *rmutex) : + m_resultMap(resultMap), m_map1(map1), m_map2(map2), m_rMutex(rmutex) {} +}; + + +/*! +* @brief intersects two maps strip-wise +* +* @param[out] resultMap output map (must be allocated) +* @param[in] polymap1 map to be intersected +* @param[in] polymap2 map to be intersected +*/ +void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2) { + int nthreads; + bool automatic_threadcount = false; + double domainSplitParallelTime; + tbb::tick_count t0, t1; + tbb::spin_mutex *resultMutex; + if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic ) { + gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic; + automatic_threadcount = true; + } + *result_map = new Polygon_map_t; + + RPolygon *p0 = &((*polymap1)[0]); + int mapxSize, mapySize, ignore1, ignore2; + p0->get(&ignore1, &ignore2, &mapxSize, &mapySize); + (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this + resultMutex = new tbb::spin_mutex(); + + int grain_size; +#ifdef _DEBUG + grain_size = gMapXSize / 4; +#else + grain_size = gGrainSize; +#endif + for(nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) { + tbb::task_scheduler_init init(nthreads); + if(gIsGraphicalVersion) { + RPolygon *xp = new RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0); // Clear the output space + delete xp; + } + // push the map size as the first polygon, + (*result_map)->push_back(RPolygon(0,0,mapxSize, mapySize)); + t0 = tbb::tick_count::now(); + tbb::parallel_for (blocked_range_with_maps(0,(int)(mapxSize+1),grain_size, polymap1, polymap2), ApplySplitOverlay((*result_map), polymap1, polymap2, resultMutex)); + t1 = tbb::tick_count::now(); + domainSplitParallelTime = (t1-t0).seconds()*1000; + cout << "Splitting parallel with spin lock and "; + if(automatic_threadcount) cout << "automatic"; + else cout << nthreads; + cout << ((nthreads == 1) ? " thread" : " threads"); + cout << " took " << domainSplitParallelTime << " msec : speedup over serial " << (gSerialTime / domainSplitParallelTime) << std::endl; + if(gCsvFile.is_open()) { + gCsvFile << "," << domainSplitParallelTime; + } +#if _DEBUG + CheckPolygonMap(*result_map); + ComparePolygonMaps(*result_map, gResultMap); +#endif + (*result_map)->clear(); + + } + delete resultMutex; + if(gCsvFile.is_open()) { + gCsvFile << std::endl; + } +} + +class ApplySplitOverlayCV { + Polygon_map_t *m_map1, *m_map2; + concurrent_Polygon_map_t *m_resultMap; +public: + /*! + * @brief functor for columnar parallel version + * @param[in] r range of map to be operated on + */ + void operator()(blocked_range_with_maps & r) const { + // get yMapSize + int r1, g1, b1, r2, g2, b2; + int myr=-1; + int myg=-1; + int myb=-1; + int i1, i2, i3, yMapSize; + (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize); + + Flagged_map_t &fmap1 = r.map1(); + Flagged_map_t &fmap2 = r.map2(); + + // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged + // as duplicate, don't add the result to the output map. We can still + // intersect them, because we are keeping track of how much of the polygon + // is left over from intersecting, and quitting when the polygon is + // used up. + + for(unsigned int ii=0; ii < fmap1.size(); ii++) { + RPolygon *p1 = fmap1[ii].p(); + bool is_dup = fmap1[ii].isDuplicate(); + int parea = p1->area(); + p1->getColor(&r1, &g1, &b1); + for(unsigned int jj=0;(jj < fmap2.size()) && (parea > 0); jj++) { + int xl, yl, xh, yh; + RPolygon *p2 = fmap2[jj].p(); + if(PolygonsOverlap(p1, p2, xl, yl, xh, yh)) { + if(!(is_dup && fmap2[jj].isDuplicate())) { + p2->getColor(&r2, &g2, &b2); + myr = r1 + r2; + myg = g1 + g2; + myb = b1 + b2; + (*m_resultMap).push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb)); + } + parea -= (xh-xl+1)*(yh-yl+1); + } + } + } + } + + ApplySplitOverlayCV(concurrent_Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2 ) : + m_resultMap(resultMap), m_map1(map1), m_map2(map2) {} +}; + + +/*! +* @brief intersects two maps strip-wise, accumulating into a concurrent_vector +* +* @param[out] resultMap output map (must be allocated) +* @param[in] polymap1 map to be intersected +* @param[in] polymap2 map to be intersected +*/ +void SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2) { + int nthreads; + bool automatic_threadcount = false; + double domainSplitParallelTime; + tbb::tick_count t0, t1; + if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic ) { + gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic; + automatic_threadcount = true; + } + *result_map = new concurrent_Polygon_map_t; + + RPolygon *p0 = &((*polymap1)[0]); + int mapxSize, mapySize, ignore1, ignore2; + p0->get(&ignore1, &ignore2, &mapxSize, &mapySize); + // (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this + + int grain_size; +#ifdef _DEBUG + grain_size = gMapXSize / 4; +#else + grain_size = gGrainSize; +#endif + for(nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) { + tbb::task_scheduler_init init(nthreads); + if(gIsGraphicalVersion) { + RPolygon *xp = new RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0); // Clear the output space + delete xp; + } + // push the map size as the first polygon, + (*result_map)->push_back(RPolygon(0,0,mapxSize, mapySize)); + t0 = tbb::tick_count::now(); + tbb::parallel_for (blocked_range_with_maps(0,(int)(mapxSize+1),grain_size, polymap1, polymap2), ApplySplitOverlayCV((*result_map), polymap1, polymap2)); + t1 = tbb::tick_count::now(); + domainSplitParallelTime = (t1-t0).seconds()*1000; + cout << "Splitting parallel with concurrent_vector and "; + if(automatic_threadcount) cout << "automatic"; + else cout << nthreads; + cout << ((nthreads == 1) ? " thread" : " threads"); + cout << " took " << domainSplitParallelTime << " msec : speedup over serial " << (gSerialTime / domainSplitParallelTime) << std::endl; + if(gCsvFile.is_open()) { + gCsvFile << "," << domainSplitParallelTime; + } +#if _DEBUG + { + + Polygon_map_t s_result_map; + for(concurrent_Polygon_map_t::const_iterator ci = (*result_map)->begin(); ci != (*result_map)->end(); ++ci) { + s_result_map.push_back(*ci); + } + CheckPolygonMap(&s_result_map); + ComparePolygonMaps(&s_result_map, gResultMap); + } +#endif + (*result_map)->clear(); + + } + + if(gCsvFile.is_open()) { + gCsvFile << std::endl; + } + +} + +// ------------------------------------------------------ + +class ApplySplitOverlayETS { + Polygon_map_t *m_map1, *m_map2; + ETS_Polygon_map_t *m_resultMap; +public: + /*! + * @brief functor for columnar parallel version + * @param[in] r range of map to be operated on + */ + void operator()(blocked_range_with_maps & r) const { + // get yMapSize + int r1, g1, b1, r2, g2, b2; + int myr=-1; + int myg=-1; + int myb=-1; + int i1, i2, i3, yMapSize; + (*m_map1)[0].get(&i1, &i2, &i3, &yMapSize); + + Flagged_map_t &fmap1 = r.map1(); + Flagged_map_t &fmap2 = r.map2(); + + // When intersecting polygons from fmap1 and fmap2, if BOTH are flagged + // as duplicate, don't add the result to the output map. We can still + // intersect them, because we are keeping track of how much of the polygon + // is left over from intersecting, and quitting when the polygon is + // used up. + + for(unsigned int ii=0; ii < fmap1.size(); ii++) { + RPolygon *p1 = fmap1[ii].p(); + bool is_dup = fmap1[ii].isDuplicate(); + int parea = p1->area(); + p1->getColor(&r1, &g1, &b1); + for(unsigned int jj=0;(jj < fmap2.size()) && (parea > 0); jj++) { + int xl, yl, xh, yh; + RPolygon *p2 = fmap2[jj].p(); + if(PolygonsOverlap(p1, p2, xl, yl, xh, yh)) { + if(!(is_dup && fmap2[jj].isDuplicate())) { + p2->getColor(&r2, &g2, &b2); + myr = r1 + r2; + myg = g1 + g2; + myb = b1 + b2; + (*m_resultMap).local().push_back(RPolygon(xl, yl, xh, yh, myr, myg, myb)); + } + parea -= (xh-xl+1)*(yh-yl+1); + } + } + } + } + + ApplySplitOverlayETS(ETS_Polygon_map_t *resultMap, Polygon_map_t *map1, Polygon_map_t *map2 ) : + m_resultMap(resultMap), m_map1(map1), m_map2(map2) {} +}; + + +/*! +* @brief intersects two maps strip-wise, accumulating into an ets variable +* +* @param[out] resultMap output map (must be allocated) +* @param[in] polymap1 map to be intersected +* @param[in] polymap2 map to be intersected +*/ +void SplitParallelOverlayETS(ETS_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2) { + int nthreads; + bool automatic_threadcount = false; + double domainSplitParallelTime; + tbb::tick_count t0, t1; + if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic ) { + gThreadsLow = gThreadsHigh = tbb::task_scheduler_init::automatic; + automatic_threadcount = true; + } + *result_map = new ETS_Polygon_map_t; + + RPolygon *p0 = &((*polymap1)[0]); + int mapxSize, mapySize, ignore1, ignore2; + p0->get(&ignore1, &ignore2, &mapxSize, &mapySize); + // (*result_map)->reserve(mapxSize*mapySize); // can't be any bigger than this + + int grain_size; +#ifdef _DEBUG + grain_size = gMapXSize / 4; +#else + grain_size = gGrainSize; +#endif + for(nthreads = gThreadsLow; nthreads <= gThreadsHigh; nthreads++) { + tbb::task_scheduler_init init(nthreads); + if(gIsGraphicalVersion) { + RPolygon *xp = new RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0); // Clear the output space + delete xp; + } + // push the map size as the first polygon, + // This polygon needs to be first, so we can push it at the start of a combine. + // (*result_map)->local.push_back(RPolygon(0,0,mapxSize, mapySize)); + t0 = tbb::tick_count::now(); + tbb::parallel_for (blocked_range_with_maps(0,(int)(mapxSize+1),grain_size, polymap1, polymap2), ApplySplitOverlayETS((*result_map), polymap1, polymap2)); + t1 = tbb::tick_count::now(); + domainSplitParallelTime = (t1-t0).seconds()*1000; + cout << "Splitting parallel with ETS and "; + if(automatic_threadcount) cout << "automatic"; + else cout << nthreads; + cout << ((nthreads == 1) ? " thread" : " threads"); + cout << " took " << domainSplitParallelTime << " msec : speedup over serial " << (gSerialTime / domainSplitParallelTime) << std::endl; + if(gCsvFile.is_open()) { + gCsvFile << "," << domainSplitParallelTime; + } +#if _DEBUG + { + + Polygon_map_t s_result_map; + flattened2d psv = flatten2d(**result_map); + s_result_map.push_back(RPolygon(0,0,mapxSize, mapySize)); + for(flattened2d::const_iterator ci = psv.begin(); ci != psv.end(); ++ci) { + s_result_map.push_back(*ci); + } + CheckPolygonMap(&s_result_map); + ComparePolygonMaps(&s_result_map, gResultMap); + } +#endif + (*result_map)->clear(); + + } + + if(gCsvFile.is_open()) { + gCsvFile << std::endl; + } + +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.h new file mode 100644 index 0000000000..889301f01a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/polyover.h @@ -0,0 +1,49 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/*! + * polyover.h : extern declarations for polyover.cpp +*/ +#include "rpolygon.h" +#include "tbb/mutex.h" +#include "tbb/spin_mutex.h" + +extern void OverlayOnePolygonWithMap(Polygon_map_t *resultMap, RPolygon *myPoly, Polygon_map_t *map2, tbb::spin_mutex *rMutex); + +extern void SerialOverlayMaps(Polygon_map_t **resultMap, Polygon_map_t *map1, Polygon_map_t *map2); + +// extern void NaiveParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2); +extern void NaiveParallelOverlay(Polygon_map_t *&result_map, Polygon_map_t &polymap1, Polygon_map_t &polymap2); + +extern void SplitParallelOverlay(Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2); +extern void SplitParallelOverlayCV(concurrent_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2); +extern void SplitParallelOverlayETS(ETS_Polygon_map_t **result_map, Polygon_map_t *polymap1, Polygon_map_t *polymap2); + +extern void CheckPolygonMap(Polygon_map_t *checkMap); +extern bool ComparePolygonMaps(Polygon_map_t *map1, Polygon_map_t *map2); + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_global.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_global.h new file mode 100644 index 0000000000..a2762e172d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_global.h @@ -0,0 +1,101 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// +// pover_global.h +// +#ifndef _POVER_GLOBAL_H_ +#define _POVER_GLOBAL_H_ + +#ifdef _MAIN_C_ +#define DEFINE // nothing +#define STATIC static +#define INIT(n) = n +#else // not in main file +#define DEFINE extern +#define STATIC // nothing +#define INIT(n) // nothing +#endif // _MAIN_C_ + +#include +#include + +#ifdef _WINDOWS +#include +#endif + +// this Polygon class only supports rectangles +DEFINE int gDrawXOffset INIT(0); // used for drawing polygons +DEFINE int gDrawYOffset INIT(0); +DEFINE int gPolyXBoxSize INIT(0); // number of pixels orresponding to one "square" (x) +DEFINE int gPolyYBoxSize INIT(0); // number of pixels orresponding to one "square" (y) +DEFINE bool gDoDraw INIT(false); // render the boxes + +#define THREADS_UNSET 0 +DEFINE int gThreadsLow INIT(THREADS_UNSET); +DEFINE int gThreadsHigh INIT(THREADS_UNSET); + +DEFINE std::ofstream gCsvFile; +DEFINE double gSerialTime; +DEFINE char *gCsvFilename INIT(NULL); + +#define BORDER_SIZE 10 // number of pixels between maps + +// The map size and the number of polygons depends on the version we are compiling. +// If DEBUG then it is small; else it is large. + +#ifdef _DEBUG +DEFINE int gNPolygons INIT(30); // default number of polygons in map +DEFINE int gMapXSize INIT(30); +DEFINE int gMapYSize INIT(30); +DEFINE int gGrainSize INIT(5); +#else +DEFINE int gNPolygons INIT(50000); // default number of polygons in map +DEFINE int gMapXSize INIT(1000); +DEFINE int gMapYSize INIT(1000); +DEFINE int gGrainSize INIT(20); +#endif +DEFINE int gMyRandomSeed INIT(2453185); + +DEFINE bool gIsGraphicalVersion INIT(false); + +typedef enum { + NORTH_SIDE, + EAST_SIDE, + SOUTH_SIDE, + WEST_SIDE +} allSides; + +#if _DEBUG +#define PRINT_DEBUG(x) (cout << x << std::endl) +#else +#define PRINT_DEBUG(x) +#endif + + +#endif // _POVER_GLOBAL_H_ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.cpp new file mode 100644 index 0000000000..c99388fce2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.cpp @@ -0,0 +1,178 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Support for GUI display for Polygon overlay demo + +#define VIDEO_WINMAIN_ARGS +#include +#include "polyover.h" +#include "polymain.h" +#include "pover_video.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#ifndef _WIN32 +#include +#include + +void rt_sleep(int msec) { + usleep(msec*1000); +} + +#else //_WIN32 + +#undef OLDUNIXTIME +#undef STDTIME + +#include + +void rt_sleep(int msec) { + Sleep(msec); +} + +#endif /* _WIN32 */ + +using namespace std; + +bool g_next_frame() { + if(++n_next_frame_calls >= frame_skips) { // the data race here is benign + n_next_frame_calls = 0; + return gVideo->next_frame(); + } + return gVideo->running; +} + +bool g_last_frame() { + if(n_next_frame_calls) return gVideo->next_frame(); + return gVideo->running; +} + +bool initializeVideo(int argc, char **argv) { + //pover_video *l_video = new pover_video(); + //gVideo = l_video; + gVideo->init_console(); // don't check return code. + gVideo->title = g_windowTitle; + g_useGraphics = gVideo->init_window(g_xwinsize, g_ywinsize); + return true; +} + +void pover_video::on_process() { + tbb::tick_count t0, t1; + double naiveParallelTime, domainSplitParallelTime; + // create map1 These could be done in parallel, if the pseudorandom number generator were re-seeded. + GenerateMap(&gPolymap1, gMapXSize, gMapYSize, gNPolygons, /*red*/255, /*green*/0, /*blue*/127); + // create map2 + GenerateMap(&gPolymap2, gMapXSize, gMapYSize, gNPolygons, /*red*/0, /*green*/255, /*blue*/127); + // + // Draw source maps + gDrawXOffset = map1XLoc; + gDrawYOffset = map1YLoc; + for(int i=0; i < int(gPolymap1->size()); i++) { + (*gPolymap1)[i].drawPoly(); + } + gDrawXOffset = map2XLoc; + gDrawYOffset = map2YLoc; + for(int i=0; i < int(gPolymap2->size()) ;i++) { + (*gPolymap2)[i].drawPoly(); + } + gDoDraw = true; + + // run serial map generation + gDrawXOffset = maprXLoc; + gDrawYOffset = maprYLoc; + { + RPolygon *xp = new RPolygon(0, 0, gMapXSize-1, gMapYSize-1, 0, 0, 0); // Clear the output space + delete xp; + t0 = tbb::tick_count::now(); + SerialOverlayMaps(&gResultMap, gPolymap1, gPolymap2); + t1 = tbb::tick_count::now(); + cout << "Serial overlay took " << (t1-t0).seconds()*1000 << " msec" << std::endl; + gSerialTime = (t1-t0).seconds()*1000; +#if _DEBUG + CheckPolygonMap(gResultMap); + // keep the map for comparison purposes. +#else + delete gResultMap; +#endif + if(gCsvFile.is_open()) { + gCsvFile << "Serial Time," << gSerialTime << std::endl; + gCsvFile << "Threads,"; + if(gThreadsLow == THREADS_UNSET || gThreadsLow == tbb::task_scheduler_init::automatic) { + gCsvFile << "Threads,Automatic"; + } + else { + for(int i=gThreadsLow; i <= gThreadsHigh; i++) { + gCsvFile << i; + if(i < gThreadsHigh) gCsvFile << ","; + } + } + gCsvFile << std::endl; + } + if(gIsGraphicalVersion) rt_sleep(2000); + } + // run naive parallel map generation + { + Polygon_map_t *resultMap; + if(gCsvFile.is_open()) { + gCsvFile << "Naive Time"; + } + NaiveParallelOverlay(resultMap, *gPolymap1, *gPolymap2); + delete resultMap; + if(gIsGraphicalVersion) rt_sleep(2000); + } + // run split map generation + { + Polygon_map_t *resultMap; + if(gCsvFile.is_open()) { + gCsvFile << "Split Time"; + } + SplitParallelOverlay(&resultMap, gPolymap1, gPolymap2); + delete resultMap; + if(gIsGraphicalVersion) rt_sleep(2000); + } + // split, accumulating into concurrent vector + { + concurrent_Polygon_map_t *cresultMap; + if(gCsvFile.is_open()) { + gCsvFile << "Split CV time"; + } + SplitParallelOverlayCV(&cresultMap, gPolymap1, gPolymap2); + delete cresultMap; + if(gIsGraphicalVersion) rt_sleep(2000); + } + // split, accumulating into ETS + { + ETS_Polygon_map_t *cresultMap; + if(gCsvFile.is_open()) { + gCsvFile << "Split ETS time"; + } + SplitParallelOverlayETS(&cresultMap, gPolymap1, gPolymap2); + delete cresultMap; + if(gIsGraphicalVersion) rt_sleep(2000); + } + if(gIsGraphicalVersion) rt_sleep(8000); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.h new file mode 100644 index 0000000000..141d286f8d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/pover_video.h @@ -0,0 +1,72 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// support for GUI for polygon overlay demo +// +#ifndef _POVER_VIDEO_H_ +#define _POVER_VIDEO_H_ +#include "../../common/gui/video.h" + +#include "pover_global.h" // for declaration of DEFINE and INIT + +DEFINE class video *gVideo INIT(0); + +DEFINE int n_next_frame_calls INIT(0); +DEFINE int frame_skips INIT(10); +extern bool g_next_frame(); +extern bool g_last_frame(); + +class pover_video: public video { + void on_process(); +public: +#ifdef _WINDOWS + bool graphic_display(){return video::win_hInstance != (HINSTANCE)NULL;} +#else + bool graphic_display() { return true;} // fix this for Linux +#endif + //void on_key(int key); +}; + +DEFINE int g_xwinsize INIT(1024); +DEFINE int g_ywinsize INIT(768); + +DEFINE int map1XLoc INIT(10); +DEFINE int map1YLoc INIT(10); +DEFINE int map2XLoc INIT(270); +DEFINE int map2YLoc INIT(10); +DEFINE int maprXLoc INIT(530); +DEFINE int maprYLoc INIT(10); + +DEFINE const char *g_windowTitle INIT("Polygon Overlay"); +DEFINE bool g_useGraphics INIT(true); + +extern bool initializeVideo(int argc, char **argv); + +extern void rt_sleep(int msec); + +#endif // _POVER_VIDEO_H_ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/rpolygon.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/rpolygon.h new file mode 100644 index 0000000000..d0da0e99a3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/rpolygon.h @@ -0,0 +1,163 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// rpolygon.h +// +#ifndef _RPOLYGON_H_ +#define _RPOLYGON_H_ +#include +#include +#include "pover_video.h" + +#include "tbb/scalable_allocator.h" +#include "tbb/concurrent_vector.h" +#include "tbb/enumerable_thread_specific.h" + +using namespace std; + +using namespace tbb; + +class RPolygon; +typedef scalable_allocator RPolygon_allocator; +DEFINE RPolygon_allocator rAlloc; + +enum MallocBehavior { + UseMalloc, + UseScalableAllocator +}; + +DEFINE MallocBehavior gMBehavior INIT(UseScalableAllocator); + +class RPolygon { +public: + RPolygon() {m_XMin = m_YMin = m_XMax = m_YMax = 0; + m_r = m_g = m_b = 0; + } + RPolygon(int xMin, int yMin, int xMax, int yMax, int r=-1, int g=-1, int b=-1) : m_XMin(xMin), m_YMin(yMin), m_XMax(xMax), m_YMax(yMax) { + if( r >= 0) { + m_r=(colorcomp_t)r; m_g=(colorcomp_t)g; m_b=(colorcomp_t)b; + if(gDoDraw) drawPoly(); + } + } + + void set_nodraw(int xMin, int yMin, int xMax, int yMax) {m_XMin=xMin; m_YMin=yMin; m_XMax=xMax; m_YMax=yMax;} + + RPolygon &intersect(RPolygon &otherPoly); + void set(int xMin, int yMin, int xMax, int yMax) { + set_nodraw(xMin,yMin,xMax,yMax); + if(gDoDraw) { + drawPoly(); + } + } + void get(int *xMin, int *yMin, int *xMax, int *yMax) const {*xMin=m_XMin;*yMin=m_YMin;*xMax=m_XMax;*yMax=m_YMax;} + int xmax() const { return m_XMax; } + int xmin() const { return m_XMin; } + int ymax() const { return m_YMax; } + int ymin() const { return m_YMin; } + void setColor(colorcomp_t newr, colorcomp_t newg, colorcomp_t newb) {m_r = newr; m_g=newg; m_b=newb;} + void getColor(int *myr, int *myg, int *myb) {*myr=m_r; *myg=m_g; *myb=m_b;} + color_t myColor() {return gVideo->get_color(m_r, m_g, m_b);} + void drawPoly() { + if(gVideo->running) { + if(g_next_frame()) { // Shouldn't call next_frame each time + drawing_area ldrawing( + gDrawXOffset+m_XMin*gPolyXBoxSize, //x + gDrawYOffset+m_YMin*gPolyYBoxSize, //y + (m_XMax-m_XMin+1)*gPolyXBoxSize, //sizex + (m_YMax-m_YMin+1)*gPolyYBoxSize); //sizey + for(int y=0; y b.ymin()) return false; + if(a.ymin() < b.ymin()) return true; + return a.xmin() < b.xmin(); +} +#else +extern bool operator<(const RPolygon& a, const RPolygon& b); +#endif + +extern ostream& operator<<(ostream& s, const RPolygon &p); + +class RPolygon_flagged { + RPolygon *myPoly; + bool is_duplicate; +public: + RPolygon_flagged() {myPoly = NULL; is_duplicate = false;} + RPolygon_flagged(RPolygon* _p, bool _is_duplicate) : myPoly(_p), is_duplicate(_is_duplicate) { } + bool isDuplicate() {return is_duplicate;} + void setDuplicate(bool newValue) {is_duplicate = newValue;} + RPolygon *p() {return myPoly;} + void setp(RPolygon *newp) {myPoly = newp;} +}; + +typedef class vector Polygon_map_t; +typedef class concurrent_vector concurrent_Polygon_map_t; +typedef class enumerable_thread_specific ETS_Polygon_map_t; +typedef class vector > Flagged_map_t; // we'll make shallow copies + +inline bool PolygonsOverlap(RPolygon *p1, RPolygon *p2, int &xl, int &yl, int &xh, int &yh) { + int xl1, yl1, xh1, yh1, xl2, yl2, xh2, yh2; +#if _DEBUG + rt_sleep(1); // slow down the process so we can see it. +#endif + p1->get(&xl1, &yl1, &xh1, &yh1); + p2->get(&xl2, &yl2, &xh2, &yh2); + if(xl1 > xh2) return false; + if(xh1 < xl2) return false; + if(yl1 > yh2) return false; + if(yh1 < yl2) return false; + xl = (xl1 < xl2) ? xl2 : xl1; + xh = (xh1 < xh2) ? xh1 : xh2; + yl = (yl1 < yl2) ? yl2 : yl1; + yh = (yh1 < yh2) ? yh1 : yh2; + return true; +} + +#endif // _RPOLYGON_H_ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/speedup.gif b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/speedup.gif new file mode 100644 index 0000000000..04d6d87689 Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/speedup.gif differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..4ada99960b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/project.pbxproj @@ -0,0 +1,355 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 84011603152CB4AD00B07E4D /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */; }; + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84B8DA7A152CA90100D59B95 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 84B8DAAC152CB05200D59B95 /* polymain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA4152CB05200D59B95 /* polymain.cpp */; }; + 84B8DAAD152CB05200D59B95 /* polyover.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA6152CB05200D59B95 /* polyover.cpp */; }; + 84B8DAAE152CB05200D59B95 /* pover_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DAA9152CB05200D59B95 /* pover_video.cpp */; }; + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = ""; }; + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; + 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; + 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbbAppDelegate.h; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.h; sourceTree = ""; }; + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tbbAppDelegate.m; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.m; sourceTree = ""; }; + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tbbExample-Prefix.pch"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; sourceTree = ""; }; + 84B8DA7D152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; + 84B8DA7F152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = MainMenu.xib; sourceTree = ""; }; + 84B8DA99152CADF400D59B95 /* macvideo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macvideo.cpp; path = ../../../common/gui/macvideo.cpp; sourceTree = ""; }; + 84B8DAA4152CB05200D59B95 /* polymain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = polymain.cpp; path = ../polymain.cpp; sourceTree = ""; }; + 84B8DAA5152CB05200D59B95 /* polymain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = polymain.h; path = ../polymain.h; sourceTree = ""; }; + 84B8DAA6152CB05200D59B95 /* polyover.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = polyover.cpp; path = ../polyover.cpp; sourceTree = ""; }; + 84B8DAA7152CB05200D59B95 /* polyover.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = polyover.h; path = ../polyover.h; sourceTree = ""; }; + 84B8DAA8152CB05200D59B95 /* pover_global.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pover_global.h; path = ../pover_global.h; sourceTree = ""; }; + 84B8DAA9152CB05200D59B95 /* pover_video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pover_video.cpp; path = ../pover_video.cpp; sourceTree = ""; }; + 84B8DAAA152CB05200D59B95 /* pover_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pover_video.h; path = ../pover_video.h; sourceTree = ""; }; + 84B8DAAB152CB05200D59B95 /* rpolygon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = rpolygon.h; path = ../rpolygon.h; sourceTree = ""; }; + 84D017511527431F0008A4E0 /* tbbExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84D017551527431F0008A4E0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 84D017581527431F0008A4E0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84D0174E1527431F0008A4E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + 84011603152CB4AD00B07E4D /* libtbbmalloc.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84B8DA6C152CA8D900D59B95 /* tbbExample */ = { + isa = PBXGroup; + children = ( + 84B8DAA4152CB05200D59B95 /* polymain.cpp */, + 84B8DAA5152CB05200D59B95 /* polymain.h */, + 84B8DAA6152CB05200D59B95 /* polyover.cpp */, + 84B8DAA7152CB05200D59B95 /* polyover.h */, + 84B8DAA8152CB05200D59B95 /* pover_global.h */, + 84B8DAA9152CB05200D59B95 /* pover_video.cpp */, + 84B8DAAA152CB05200D59B95 /* pover_video.h */, + 84B8DAAB152CB05200D59B95 /* rpolygon.h */, + 84B8DA98152CAD8600D59B95 /* Gui layer */, + 84B8DA7B152CA97B00D59B95 /* Resources */, + ); + name = tbbExample; + sourceTree = ""; + }; + 84B8DA7B152CA97B00D59B95 /* Resources */ = { + isa = PBXGroup; + children = ( + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, + ); + name = Resources; + path = ../../../common/gui/xcode/tbbExample/en.lproj; + sourceTree = ""; + }; + 84B8DA98152CAD8600D59B95 /* Gui layer */ = { + isa = PBXGroup; + children = ( + 84B8DA99152CADF400D59B95 /* macvideo.cpp */, + 84B8DA6F152CA90100D59B95 /* main.m */, + 84B8DA70152CA90100D59B95 /* OpenGLView.h */, + 84B8DA71152CA90100D59B95 /* OpenGLView.m */, + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */, + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */, + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */, + ); + name = "Gui layer"; + sourceTree = ""; + }; + 84D017461527431F0008A4E0 = { + isa = PBXGroup; + children = ( + 84B8DA6C152CA8D900D59B95 /* tbbExample */, + 84D017541527431F0008A4E0 /* Frameworks */, + 84D017521527431F0008A4E0 /* Products */, + ); + sourceTree = ""; + }; + 84D017521527431F0008A4E0 /* Products */ = { + isa = PBXGroup; + children = ( + 84D017511527431F0008A4E0 /* tbbExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 84D017541527431F0008A4E0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84D01775152744BD0008A4E0 /* OpenGL.framework */, + 84D017551527431F0008A4E0 /* Cocoa.framework */, + 84D017571527431F0008A4E0 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84D017571527431F0008A4E0 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 84011602152CB4AD00B07E4D /* libtbbmalloc.dylib */, + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, + 84D017581527431F0008A4E0 /* AppKit.framework */, + 84D017591527431F0008A4E0 /* CoreData.framework */, + 84D0175A1527431F0008A4E0 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84D017501527431F0008A4E0 /* tbbExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */; + buildPhases = ( + 84D0174D1527431F0008A4E0 /* Sources */, + 84D0174E1527431F0008A4E0 /* Frameworks */, + 84D0174F1527431F0008A4E0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample; + productName = tbbExample; + productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84D017481527431F0008A4E0 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = tbb; + LastUpgradeCheck = 0430; + }; + buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "polygon_overlay" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 84D017461527431F0008A4E0; + productRefGroup = 84D017521527431F0008A4E0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84D017501527431F0008A4E0 /* tbbExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84D0174F1527431F0008A4E0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA7A152CA90100D59B95 /* (null) in Resources */, + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */, + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84D0174D1527431F0008A4E0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA77152CA90100D59B95 /* main.m in Sources */, + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */, + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */, + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */, + 84B8DAAC152CB05200D59B95 /* polymain.cpp in Sources */, + 84B8DAAD152CB05200D59B95 /* polyover.cpp in Sources */, + 84B8DAAE152CB05200D59B95 /* pover_video.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7D152CA97B00D59B95 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7F152CA97B00D59B95 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84D01770152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 84D01771152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + 84D01773152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84D01774152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "polygon_overlay" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01770152743200008A4E0 /* Debug */, + 84D01771152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01773152743200008A4E0 /* Debug */, + 84D01774152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84D017481527431F0008A4E0 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme new file mode 100644 index 0000000000..37d4ac6bf5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/polygon_overlay/xcode/polygon_overlay.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile new file mode 100644 index 0000000000..1b3ca107a6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile @@ -0,0 +1,115 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +NAME=seismic +ARGS=0:4 300 +PERF_RUN_ARGS=auto 10000 silent +LIGHT_ARGS=1:2 100 + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(offload), mic) +override CXXFLAGS += -D__TBB_MIC_OFFLOAD=1 +# Currently only console mode is supported in offload version +override UI=con +SOURCES = $(UI)video.o universe.cpp seismic_video.cpp main.cpp +OFFLOAD_SOURCES = ../../common/gui/$(UI)video.cpp +else +SOURCES = ../../common/gui/$(UI)video.cpp universe.cpp seismic_video.cpp main.cpp +PERFFLAGS=-msse2 +endif + +ifeq (,$(filter icc icpc,$(CXX))) +TBBLIB = -ltbb +TBBLIB_DEBUG = -ltbb_debug +else +TBBLIB = -tbb +TBBLIB_DEBUG = -ltbb_debug +ifeq ($(offload), mic) +TBBLIB_DEBUG += -offload-option,mic,ld,"-ltbb_debug -L${TBBROOT}/lib/mic/" +endif +endif + +include ../../common/gui/Makefile.gmake +override CXXFLAGS += $(UI_CXXFLAGS) + +ifeq ($(shell uname), Linux) +LIBS+= -lrt +endif + +all: release test + +resources: +ifeq ($(UI),mac) + mkdir -p $(APPRES)/en.lproj $(NAME).app/Contents/MacOS + cp ../../common/gui/xcode/tbbExample/Info.plist $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/en.lproj/* $(APPRES)/en.lproj +endif # Mac + +release: resources +ifeq ($(offload), mic) + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -c -offload-attribute-target=mic $(OFFLOAD_SOURCES) +endif +ifeq ($(UI),mac) + $(CXX_UI) -O2 -DNDEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) $(TBBLIB) $(LIBS) + +debug: resources +ifeq ($(offload), mic) + $(CXX) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -c -offload-attribute-target=mic $(OFFLOAD_SOURCES) +endif +ifeq ($(UI),mac) + $(CXX_UI) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) $(TBBLIB_DEBUG) $(LIBS) + +clean: + $(RM) $(EXE) *.o *.d +ifeq ($(UI),mac) + rm -rf $(NAME).app +endif + +test: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS) +else + ./$(EXE) $(ARGS) +endif + +perf_build: override CXXFLAGS+=$(PERFFLAGS) +perf_build: release + +perf_run: + ./$(EXE) $(PERF_RUN_ARGS) + +light_test: + ./$(EXE) $(LIGHT_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile.windows new file mode 100644 index 0000000000..d5b3e36c28 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/Makefile.windows @@ -0,0 +1,75 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Seismic +ARGS=0:4 300 +PERF_RUN_ARGS=auto 10000 silent +LIGHT_ARGS=1:2 100 + +# Trying ot find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# Uncomment one of next lines to choose user interface type (console, gdiplus, direct draw) +#UI = con +UI = gdi +#UI = dd + +# Machine architecture, auto-detected from TBB_TARGET_ARCH by default +# Use XARCH variable to change it. See index.html for more information +ARCH0 = $(TBB_TARGET_ARCH)- +ARCH1 = $(ARCH0:ia32-=x86) +ARCH2 = $(ARCH1:intel64-=AMD64) +XARCH = $(ARCH2:-=x86) + +MAKEINC = ../../common/gui/Makefile.win +SOURCES = seismic_video.cpp universe.cpp main.cpp + +all: release test +release: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib $(LIBS)" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE="$(SOURCES)" EXE=$(PROG).exe build_one +debug: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_USE_DEBUG" LFLAGS="$(LDFLAGS) tbb_debug.lib $(LIBS)" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE="$(SOURCES)" EXE=$(PROG).exe build_one +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest msvs\SeismicSimulation.res >nul 2>&1 +test: + $(PROG) $(ARGS) + +perf_build: compiler_check + @$(MAKE) -f $(MAKEINC) UI=con CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib $(LIBS)" XARCH=$(XARCH) RCNAME=SeismicSimulation SOURCE="$(SOURCES) " EXE=$(PROG).exe build_one +perf_run: + $(PROG) $(PERF_RUN_ARGS) + +light_test: + $(PROG) $(LIGHT_ARGS) + +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/index.html new file mode 100644 index 0000000000..cd6cbff93e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/index.html @@ -0,0 +1,113 @@ + + + +

    Overview

    +
    +
    Parallel seismic wave simulation that demonstrates use of parallel_for and affinity_partitioner. +
    The example can be built in the offload version to run on Intel® Many Integrated Core (Intel® MIC) Architecture based coprocessor (see build instructions). +NOTE: Currently, the offload version does not support GUI and can only be used with console mode. +
    + +

    Files

    +
    +
    main.cpp +
    Main program which parses command line options and runs the algorithm with different numbers of threads. +
    universe.h +
    Wave propagation methods interface. +
    universe.cpp +
    Wave propagation methods implementation. +
    seismic_video.h +
    GUI mode support interface. +
    seismic_video.cpp +
    GUI mode support implementation. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. +The following additional options are supported: +
    +
    make [(general targets: {release, debug} [test])] UI={con, gdi, dd, d2d, x, mac} +
    Build and run as usual, but build with the specified GUI driver: console, GDI+*, DirectDraw*, + Direct2D*, X11, or OpenGL* + (see the description of the common GUI code + for more information on available graphics support). + For Linux* and Mac OS* X systems, the best available driver is detected automatically by the Makefile. + For Windows* systems, UI=gdi is the default GUI driver; compiling with UI=dd or + UI=d2d may offer superior + performance, but can only be used if the Microsoft* DirectX* SDK is installed on your system + and if overlay is supported by your graphics card. + Use UI=con to build without the GUI for use in making performance measurements + (strongly recommended when measuring performance or scalability; see note below). +
    make [(above options or targets)] XARCH=x64 +
    Build and run as above, but also specify XARCH=x64 + (or XARCH=AMD64 for older compilers) when building the example on Windows* as a 64-bit binary. +
    make [(above options or targets)] DDLIB_DIR=<specify path to library directory of Direct Draw* SDK here> +
    If you experience ddraw.lib linking problems, specify the correct library directory via this option. +
    make [(above options or targets)] CXXFLAGS=-DX_FULLSYNC +
    Build and run as above, but enable full X11 synchronization if you experience "tearing" of motion on slower video systems. +
    + +

    Usage

    +
    +
    seismic -h +
    Prints the help for command line options +
    seismic [n-of-threads=value] [n-of-frames=value] [silent] [serial] +
    seismic [n-of-threads [n-of-frames]] [silent] [serial] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + n-of-frames is a number of frames the example processes internally.
    + silent - no output except elapsed time.
    + serial - in GUI mode start with serial version of algorithm.
    + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector:: +
    Build a debug version of the example + (see the build directions). +
    Run it with the desired number of threads and smaller number of frames, e.g., seismic 4 5. +
    + +

    Hot keys

    +The following hot keys can be used in interactive execution mode when the example is compiled with the graphical +user interface: +
    +
    <left mouse button> +
    Starts new seismic wave in place specified by mouse cursor. +
    <space> +
    Toggles between parallel and serial execution modes. +
    <p> +
    Enables parallel execution mode. +
    <s> +
    Enables serial execution mode. +
    <e> +
    Enables screen updates. +
    <d> +
    Disables screen updates (strongly recommended when measuring performance or scalability; see note below). +
    <esc> +
    Stops execution. +
    + +

    Notes

    +
      +
    • While running with the GUI display turned on should yield reasonable performance in most cases, running with the GUI + display turned off is strongly recommended in order to demonstrate the full performance and scalability of the example. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/main.cpp new file mode 100644 index 0000000000..0f2bbfd2f2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/main.cpp @@ -0,0 +1,161 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define VIDEO_WINMAIN_ARGS + +#include +#include "tbb/tick_count.h" +#include "../../common/utility/utility.h" + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (push,target(mic)) +#endif // __TBB_MIC_OFFLOAD +#include "seismic_video.h" +#include "universe.h" +#include "tbb/task_scheduler_init.h" + +Universe u; +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (pop) +#endif // __TBB_MIC_OFFLOAD + +struct RunOptions { + //! It is used for console mode for test with different number of threads and also has + //! meaning for GUI: threads.first - use separate event/updating loop thread (>0) or not (0). + //! threads.second - initialization value for scheduler + utility::thread_number_range threads; + int numberOfFrames; + bool silent; + bool parallel; + RunOptions(utility::thread_number_range threads_ , int number_of_frames_ , bool silent_ , bool parallel_ ) + : threads(threads_),numberOfFrames(number_of_frames_), silent(silent_), parallel(parallel_) + { + } +}; + +int do_get_default_num_threads() { + int threads; + #if __TBB_MIC_OFFLOAD + #pragma offload target(mic) out(threads) + #endif // __TBB_MIC_OFFLOAD + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +int get_default_num_threads() { + static int threads = do_get_default_num_threads(); + return threads; +} + +RunOptions ParseCommandLine(int argc, char *argv[]){ + // zero number of threads means to run serial version + utility::thread_number_range threads(get_default_num_threads,0,get_default_num_threads()); + + int numberOfFrames = 1000; + bool silent = false; + bool serial = false; + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(numberOfFrames,"n-of-frames","number of frames the example processes internally") + .arg(silent,"silent","no output except elapsed time") + .arg(serial,"serial","in GUI mode start with serial version of algorithm") + ); + return RunOptions(threads,numberOfFrames,silent,!serial); +} + +int main(int argc, char *argv[]) +{ + try{ + tbb::tick_count mainStartTime = tbb::tick_count::now(); + RunOptions options = ParseCommandLine(argc,argv); + SeismicVideo video(u,options.numberOfFrames,options.threads.last,options.parallel); + + // video layer init + if(video.init_window(u.UniverseWidth, u.UniverseHeight)) { + video.calc_fps = true; + video.threaded = options.threads.first > 0; + // video is ok, init Universe + u.InitializeUniverse(video); + // main loop + video.main_loop(); + } + else if(video.init_console()) { + // do console mode + for(int p = options.threads.first; p <= options.threads.last; p = options.threads.step(p)) { + tbb::tick_count xwayParallelismStartTime = tbb::tick_count::now(); + u.InitializeUniverse(video); + int numberOfFrames = options.numberOfFrames; + #if __TBB_MIC_OFFLOAD + drawing_memory dmem = video.get_drawing_memory(); + char *pMem = dmem.get_address(); + size_t memSize = dmem.get_size(); + + #pragma offload target(mic) in(u, numberOfFrames, p, dmem), out(pMem:length(memSize)) + { + // It is necessary to update the pointer on mic + // since the address spaces on host and on target are different + dmem.set_address(pMem); + u.SetDrawingMemory(dmem); + #endif // __TBB_MIC_OFFLOAD + if (p==0){ + //run a serial version + for( int i=0; i + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.rc b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.rc new file mode 100644 index 0000000000..c2003347a9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.rc @@ -0,0 +1,145 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_SEISMICSIMULATION ICON "SeismicSimulation.ico" +IDI_SMALL ICON "small.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Menu +// + +IDC_SEISMICSIMULATION MENU +BEGIN + POPUP "&File" + BEGIN + MENUITEM "&Parallel", ID_FILE_PARALLEL + MENUITEM "&Serial", ID_FILE_SERIAL + MENUITEM SEPARATOR + MENUITEM "&Enable GUI", ID_FILE_ENABLEGUI + MENUITEM "&Disable GUI", ID_FILE_DISABLEGUI + MENUITEM SEPARATOR + MENUITEM "E&xit", IDM_EXIT + END + POPUP "&Help" + BEGIN + MENUITEM "&About ...", IDM_ABOUT + END +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Accelerator +// + +IDC_SEISMICSIMULATION ACCELERATORS +BEGIN + VK_OEM_2, IDM_ABOUT, VIRTKEY, ALT, NOINVERT + "P", ID_FILE_PARALLEL, VIRTKEY, ALT, NOINVERT + "S", ID_FILE_SERIAL, VIRTKEY, ALT, NOINVERT + "D", ID_FILE_DISABLEGUI, VIRTKEY, ALT, NOINVERT + "E", ID_FILE_ENABLEGUI, VIRTKEY, ALT, NOINVERT +END + + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ABOUTBOX DIALOG 22, 17, 230, 75 +STYLE DS_SETFONT | DS_MODALFRAME | WS_CAPTION | WS_SYSMENU +CAPTION "About" +FONT 8, "System" +BEGIN + ICON IDI_SEISMICSIMULATION,IDC_MYICON,14,9,16,16 + LTEXT "SeismicSimulation Version 1.1",IDC_STATIC,49,10,119,8,SS_NOPREFIX + LTEXT "Copyright (C) 2005-2008",IDC_STATIC,49,20,119,8 + DEFPUSHBUTTON "OK",IDOK,195,6,30,11,WS_GROUP +END + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APP_TITLE "SeismicSimulation" + IDC_SEISMICSIMULATION "SEISMICSIMULATION" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.vcproj new file mode 100644 index 0000000000..61e7535a20 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation.vcproj @@ -0,0 +1,836 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_cl.sln new file mode 100644 index 0000000000..a953c4ad3a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_cl.sln @@ -0,0 +1,37 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SeismicSimulation", "SeismicSimulation.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A2527}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.Build.0 = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.Build.0 = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.ActiveCfg = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.Build.0 = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_icl.sln new file mode 100644 index 0000000000..6bca0c1afc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/SeismicSimulation_icl.sln @@ -0,0 +1,53 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "SeismicSimulation", "SeismicSimulation.icproj", "{87C5A3E0-E1C8-457F-AA2F-B3E455214E76}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Debug|x64.Build.0 = DDDebug|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Release|Win32.Build.0 = DDRelease|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Release|x64.ActiveCfg = DDRelease|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.DD Release|x64.Build.0 = DDRelease|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.GDI Debug|Win32.Build.0 = Debug|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.GDI Debug|x64.ActiveCfg = Debug|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}.GDI Debug|x64.Build.0 = Debug|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}._GDI Release|Win32.ActiveCfg = Release|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}._GDI Release|Win32.Build.0 = Release|Win32 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}._GDI Release|x64.ActiveCfg = Release|x64 + {87C5A3E0-E1C8-457F-AA2F-B3E455214E76}._GDI Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.Build.0 = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.ActiveCfg = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.Build.0 = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.Build.0 = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/resource.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/resource.h new file mode 100644 index 0000000000..44453d7ee1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/resource.h @@ -0,0 +1,32 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by SeismicSimulation.rc +// +#define IDC_MYICON 2 +#define IDD_SEISMICSIMULATION_DIALOG 102 +#define IDS_APP_TITLE 103 +#define IDD_ABOUTBOX 103 +#define IDM_ABOUT 104 +#define IDM_EXIT 105 +#define IDI_SEISMICSIMULATION 107 +#define IDI_SMALL 108 +#define IDC_SEISMICSIMULATION 109 +#define IDR_MAINFRAME 128 +#define ID_FILE_PARALLEL 32771 +#define ID_FILE_SERIAL 32772 +#define IDM_PARALLEL 32773 +#define ID_FILE_ENABLEGUI 32774 +#define ID_FILE_DISABLEGUI 32775 +#define IDC_STATIC -1 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 129 +#define _APS_NEXT_COMMAND_VALUE 32782 +#define _APS_NEXT_CONTROL_VALUE 1000 +#define _APS_NEXT_SYMED_VALUE 110 +#endif +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/small.ico b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/small.ico new file mode 100644 index 0000000000..d551aa3aaf Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/msvs/small.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.cpp new file mode 100644 index 0000000000..df946f107a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.cpp @@ -0,0 +1,156 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "seismic_video.h" +#include "universe.h" +#include "tbb/task_scheduler_init.h" + +const char * const SeismicVideo::titles[2] = {"Seismic Simulation: Serial", "Seismic Simulation: Parallel"}; +void SeismicVideo::on_mouse(int x, int y, int key) { + if(key == 1){ + u_.TryPutNewPulseSource(x,y); + } +} + +void SeismicVideo::on_key(int key) { + key &= 0xff; + if(char(key) == ' ') initIsParallel = !initIsParallel; + else if(char(key) == 'p') initIsParallel = true; + else if(char(key) == 's') initIsParallel = false; + else if(char(key) == 'e') updating = true; + else if(char(key) == 'd') updating = false; + else if(key == 27) running = false; + title = initIsParallel?titles[1]:titles[0]; +} + +void SeismicVideo::on_process() { + tbb::task_scheduler_init Init(threadsHigh); + do { + if( initIsParallel ) + u_.ParallelUpdateUniverse(); + else + u_.SerialUpdateUniverse(); + if( numberOfFrames_ > 0 ) --numberOfFrames_; + } while(next_frame() && numberOfFrames_); +} + +#ifdef _WINDOWS +#include "msvs/resource.h" +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); +SeismicVideo * gVideo = NULL; +#endif + +SeismicVideo::SeismicVideo( Universe &u, int number_of_frames, int threads_high, bool init_is_parallel) + :numberOfFrames_(number_of_frames),initIsParallel(init_is_parallel),u_(u),threadsHigh(threads_high) +{ + title = initIsParallel?titles[1]:titles[0]; +#ifdef _WINDOWS + gVideo = this; + LoadStringA(video::win_hInstance, IDC_SEISMICSIMULATION, szWindowClass, MAX_LOADSTRING); + memset(&wcex, 0, sizeof(wcex)); + wcex.lpfnWndProc = (WNDPROC)WndProc; + wcex.hIcon = LoadIcon(video::win_hInstance, MAKEINTRESOURCE(IDI_SEISMICSIMULATION)); + wcex.hCursor = LoadCursor(NULL, IDC_ARROW); + wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); + wcex.lpszMenuName = LPCTSTR(IDC_SEISMICSIMULATION); + wcex.lpszClassName = szWindowClass; + wcex.hIconSm = LoadIcon(video::win_hInstance, MAKEINTRESOURCE(IDI_SMALL)); + win_set_class(wcex); // ascii convention here + win_load_accelerators(IDC_SEISMICSIMULATION); +#endif + +} + + + + + +#ifdef _WINDOWS +// +// FUNCTION: WndProc(HWND, unsigned, WORD, LONG) +// +// PURPOSE: Processes messages for the main window. +// +// WM_COMMAND - process the application menu +// WM_PAINT - Paint the main window +// WM_DESTROY - post a quit message and return +// +// +LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: return TRUE; + case WM_COMMAND: + if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { + EndDialog(hDlg, LOWORD(wParam)); + return TRUE; + } + break; + } + return FALSE; +} + +LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + int wmId; + switch (message) { + case WM_COMMAND: + wmId = LOWORD(wParam); + // Parse the menu selections: + switch (wmId) + { + case IDM_ABOUT: + DialogBox(video::win_hInstance, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)About); + break; + case IDM_EXIT: + PostQuitMessage(0); + break; + case ID_FILE_PARALLEL: + gVideo->on_key('p'); + break; + case ID_FILE_SERIAL: + gVideo->on_key('s'); + break; + case ID_FILE_ENABLEGUI: + gVideo->on_key('e'); + break; + case ID_FILE_DISABLEGUI: + gVideo->on_key('d'); + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + break; + default: + return DefWindowProc(hWnd, message, wParam, lParam); + } + return 0; +} + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.h new file mode 100644 index 0000000000..5c3b79feb2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/seismic_video.h @@ -0,0 +1,62 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef SEISMIC_VIDEO_H_ +#define SEISMIC_VIDEO_H_ + +#include "../../common/gui/video.h" + +class Universe; + +class SeismicVideo : public video +{ +#ifdef _WINDOWS + #define MAX_LOADSTRING 100 + TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name + WNDCLASSEX wcex; +#endif + static const char * const titles[2]; + + bool initIsParallel ; + + Universe &u_; + int numberOfFrames_; + int threadsHigh; +private: + void on_mouse(int x, int y, int key); + void on_process(); + +#ifdef _WINDOWS +public: +#endif + void on_key(int key); + +public: + SeismicVideo( Universe &u,int numberOfFrames, int threadsHigh, bool initIsParallel=true); +}; +#endif /* SEISMIC_VIDEO_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.cpp new file mode 100644 index 0000000000..8665269914 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.cpp @@ -0,0 +1,233 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (target(mic)) +#endif // __TBB_MIC_OFFLOAD + +#include "../../common/gui/video.h" +#include +#include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" + + +using namespace std; + +#ifdef _MSC_VER +// warning C4068: unknown pragma +#pragma warning(disable: 4068) +// warning C4351: new behavior: elements of array 'array' will be default initialized +#pragma warning(disable: 4351) +#endif + +#include "universe.h" + +const colorcomp_t MaterialColor[4][3] = { // BGR + {96,0,0}, // WATER + {0,48,48}, // SANDSTONE + {32,32,23} // SHALE +}; + +void Universe::InitializeUniverse(video const& colorizer) { + + pulseCounter = pulseTime = 100; + pulseX = UniverseWidth/3; + pulseY = UniverseHeight/4; + // Initialize V, S, and T to slightly non-zero values, in order to avoid denormal waves. + for( int i=0; i0 ? t : 0; + ValueType b = t<0 ? -t : 0; + ValueType g = 0.5f*fabs(t); + memcpy(c, MaterialColor[k], sizeof(c)); + c[2] = colorcomp_t(r*(255-c[2])+c[2]); + c[1] = colorcomp_t(g*(255-c[1])+c[1]); + c[0] = colorcomp_t(b*(255-c[0])+c[0]); + ColorMap[k][i] = colorizer.get_color(c[2], c[1], c[0]); + } + } + // Set damping coefficients around border to reduce reflections from boundaries. + ValueType d = 1.0; + for( int k=DamperSize-1; k>0; --k ) { + d *= 1-1.0f/(DamperSize*DamperSize); + for( int j=1; j0 ) { + ValueType t = (pulseCounter-pulseTime/2)*0.05f; + V[pulseY][pulseX] += 64*sqrt(M[pulseY][pulseX])*exp(-t*t); + --pulseCounter; + } +} + +struct Universe::Rectangle { + struct std::pair xRange; + struct std::pair yRange; + Rectangle (int startX, int startY, int width, int height):xRange(startX,width),yRange(startY,height){} + int StartX() const {return xRange.first;} + int StartY() const {return yRange.first;} + int Width() const {return xRange.second;} + int Height() const {return yRange.second;} + int EndX() const {return xRange.first + xRange.second;} + int EndY() const {return yRange.first + yRange.second;} + +}; + +void Universe::UpdateStress(Rectangle const& r ) { + drawing_area drawing(r.StartX(),r.StartY(),r.Width(),r.Height(),drawingMemory); + for( int i=r.StartY(); i=ColorMapSize ) index = ColorMapSize-1; + color_t* c = ColorMap[material[i][j]]; + drawing.put_pixel(c[index]); + } + } +} + +void Universe::SerialUpdateStress() { + Rectangle area(0, 0, UniverseWidth-1, UniverseHeight-1); + UpdateStress(area); +} + +struct UpdateStressBody { + Universe & u_; + UpdateStressBody(Universe & u):u_(u){} + void operator()( const tbb::blocked_range& range ) const { + Universe::Rectangle area(0, range.begin(), u_.UniverseWidth-1, range.size()); + u_.UpdateStress(area); + } +}; + +void Universe::ParallelUpdateStress(tbb::affinity_partitioner &affinity) { + tbb::parallel_for( tbb::blocked_range( 0, UniverseHeight-1 ), // Index space for loop + UpdateStressBody(*this), // Body of loop + affinity ); // Affinity hint +} + +void Universe::UpdateVelocity(Rectangle const& r) { + for( int i=r.StartY(); i& y_range ) const { + u_.UpdateVelocity(Universe::Rectangle(0,y_range.begin(),u_.UniverseWidth-1,y_range.size())); + } +}; + +void Universe::ParallelUpdateVelocity(tbb::affinity_partitioner &affinity) { + tbb::parallel_for( tbb::blocked_range( 0, UniverseHeight-1 ), // Index space for loop + UpdateVelocityBody(*this), // Body of loop + affinity ); // Affinity hint +} + +void Universe::SerialUpdateUniverse() { + UpdatePulse(); + SerialUpdateStress(); + SerialUpdateVelocity(); +} + +void Universe::ParallelUpdateUniverse() { + /** Affinity is an argument to parallel_for to hint that an iteration of a loop + is best replayed on the same processor for each execution of the loop. + It is a static object because it must remember where the iterations happened + in previous executions. */ + static tbb::affinity_partitioner affinity; + UpdatePulse(); + ParallelUpdateStress(affinity); + ParallelUpdateVelocity(affinity); +} + +bool Universe::TryPutNewPulseSource(int x, int y){ + if(pulseCounter == 0) { + pulseCounter = pulseTime; + pulseX = x; pulseY = y; + return true; + } + return false; +} + +void Universe::SetDrawingMemory(const drawing_memory &dmem) { + drawingMemory = dmem; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.h new file mode 100644 index 0000000000..3a568fb48e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/universe.h @@ -0,0 +1,120 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef UNIVERSE_H_ +#define UNIVERSE_H_ + +#include "../../common/gui/video.h" +#include "tbb/partitioner.h" + + +class Universe { +public: + enum { + UniverseWidth = 1024 + ,UniverseHeight = 512 + }; +private: + //in order to avoid performance degradation due to cache aliasing issue + //some padding is needed after each row in array, and between array themselves. + //the padding is achieved by adjusting number of rows and columns. + //as the compiler is forced to place class members of the same clause in order of the + //declaration this seems to be the right way of padding. + + //magic constants what are being added bellow are chosen experimentally. + enum { + MaxWidth = UniverseWidth+1, + MaxHeight = UniverseHeight+3 + }; + + typedef float ValueType; + + //! Horizontal stress + ValueType S[MaxHeight][MaxWidth]; + + //! Velocity at each grid point + ValueType V[MaxHeight][MaxWidth]; + + //! Vertical stress + ValueType T[MaxHeight][MaxWidth]; + + //! Coefficient related to modulus + ValueType M[MaxHeight][MaxWidth]; + + //! Damping coefficients + ValueType D[MaxHeight][MaxWidth]; + + //! Coefficient related to lightness + ValueType L[MaxHeight][MaxWidth]; + + enum { ColorMapSize = 1024}; + color_t ColorMap[4][ColorMapSize]; + + enum MaterialType { + WATER=0, + SANDSTONE=1, + SHALE=2 + }; + + //! Values are MaterialType, cast to an unsigned char to save space. + unsigned char material[MaxHeight][MaxWidth]; + +private: + enum { DamperSize = 32}; + + int pulseTime; + int pulseCounter; + int pulseX; + int pulseY; + + drawing_memory drawingMemory; + +public: + void InitializeUniverse(video const& colorizer); + + void SerialUpdateUniverse(); + void ParallelUpdateUniverse(); + bool TryPutNewPulseSource(int x, int y); + void SetDrawingMemory(const drawing_memory &dmem); +private: + struct Rectangle; + void UpdatePulse(); + void UpdateStress(Rectangle const& r ); + + void SerialUpdateStress() ; + friend struct UpdateStressBody; + friend struct UpdateVelocityBody; + void ParallelUpdateStress(tbb::affinity_partitioner &affinity); + + void UpdateVelocity(Rectangle const& r); + + void SerialUpdateVelocity() ; + void ParallelUpdateVelocity(tbb::affinity_partitioner &affinity); +}; + +#endif /* UNIVERSE_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..ff394654c2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/project.pbxproj @@ -0,0 +1,345 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84B8DA7A152CA90100D59B95 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA82152CA99C00D59B95 /* main.cpp */; }; + 84B8DA88152CA99C00D59B95 /* seismic_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */; }; + 84B8DA89152CA99C00D59B95 /* universe.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA85152CA99C00D59B95 /* universe.cpp */; }; + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; + 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; + 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbbAppDelegate.h; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.h; sourceTree = ""; }; + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tbbAppDelegate.m; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.m; sourceTree = ""; }; + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tbbExample-Prefix.pch"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; sourceTree = ""; }; + 84B8DA7D152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; + 84B8DA7F152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = MainMenu.xib; sourceTree = ""; }; + 84B8DA82152CA99C00D59B95 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = ""; }; + 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = seismic_video.cpp; path = ../seismic_video.cpp; sourceTree = ""; }; + 84B8DA84152CA99C00D59B95 /* seismic_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = seismic_video.h; path = ../seismic_video.h; sourceTree = ""; }; + 84B8DA85152CA99C00D59B95 /* universe.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = universe.cpp; path = ../universe.cpp; sourceTree = ""; }; + 84B8DA86152CA99C00D59B95 /* universe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = universe.h; path = ../universe.h; sourceTree = ""; }; + 84B8DA99152CADF400D59B95 /* macvideo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macvideo.cpp; path = ../../../common/gui/macvideo.cpp; sourceTree = ""; }; + 84D017511527431F0008A4E0 /* tbbExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84D017551527431F0008A4E0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 84D017581527431F0008A4E0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84D0174E1527431F0008A4E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84B8DA6C152CA8D900D59B95 /* tbbExample */ = { + isa = PBXGroup; + children = ( + 84B8DA98152CAD8600D59B95 /* Gui layer */, + 84B8DA7B152CA97B00D59B95 /* Resources */, + 84B8DA82152CA99C00D59B95 /* main.cpp */, + 84B8DA83152CA99C00D59B95 /* seismic_video.cpp */, + 84B8DA84152CA99C00D59B95 /* seismic_video.h */, + 84B8DA85152CA99C00D59B95 /* universe.cpp */, + 84B8DA86152CA99C00D59B95 /* universe.h */, + ); + name = tbbExample; + sourceTree = ""; + }; + 84B8DA7B152CA97B00D59B95 /* Resources */ = { + isa = PBXGroup; + children = ( + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, + ); + name = Resources; + path = ../../../common/gui/xcode/tbbExample/en.lproj; + sourceTree = ""; + }; + 84B8DA98152CAD8600D59B95 /* Gui layer */ = { + isa = PBXGroup; + children = ( + 84B8DA99152CADF400D59B95 /* macvideo.cpp */, + 84B8DA6F152CA90100D59B95 /* main.m */, + 84B8DA70152CA90100D59B95 /* OpenGLView.h */, + 84B8DA71152CA90100D59B95 /* OpenGLView.m */, + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */, + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */, + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */, + ); + name = "Gui layer"; + sourceTree = ""; + }; + 84D017461527431F0008A4E0 = { + isa = PBXGroup; + children = ( + 84B8DA6C152CA8D900D59B95 /* tbbExample */, + 84D017541527431F0008A4E0 /* Frameworks */, + 84D017521527431F0008A4E0 /* Products */, + ); + sourceTree = ""; + }; + 84D017521527431F0008A4E0 /* Products */ = { + isa = PBXGroup; + children = ( + 84D017511527431F0008A4E0 /* tbbExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 84D017541527431F0008A4E0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84D01775152744BD0008A4E0 /* OpenGL.framework */, + 84D017551527431F0008A4E0 /* Cocoa.framework */, + 84D017571527431F0008A4E0 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84D017571527431F0008A4E0 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, + 84D017581527431F0008A4E0 /* AppKit.framework */, + 84D017591527431F0008A4E0 /* CoreData.framework */, + 84D0175A1527431F0008A4E0 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84D017501527431F0008A4E0 /* tbbExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */; + buildPhases = ( + 84D0174D1527431F0008A4E0 /* Sources */, + 84D0174E1527431F0008A4E0 /* Frameworks */, + 84D0174F1527431F0008A4E0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample; + productName = tbbExample; + productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84D017481527431F0008A4E0 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = tbb; + LastUpgradeCheck = 0430; + }; + buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tbbExample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 84D017461527431F0008A4E0; + productRefGroup = 84D017521527431F0008A4E0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84D017501527431F0008A4E0 /* tbbExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84D0174F1527431F0008A4E0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA7A152CA90100D59B95 /* (null) in Resources */, + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */, + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84D0174D1527431F0008A4E0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA77152CA90100D59B95 /* main.m in Sources */, + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */, + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */, + 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */, + 84B8DA88152CA99C00D59B95 /* seismic_video.cpp in Sources */, + 84B8DA89152CA99C00D59B95 /* universe.cpp in Sources */, + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7D152CA97B00D59B95 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7F152CA97B00D59B95 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84D01770152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 84D01771152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + 84D01773152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84D01774152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tbbExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01770152743200008A4E0 /* Debug */, + 84D01771152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01773152743200008A4E0 /* Debug */, + 84D01774152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84D017481527431F0008A4E0 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme new file mode 100644 index 0000000000..1dd33ab334 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/seismic/xcode/seismic.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile new file mode 100644 index 0000000000..4d972bf6b9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile @@ -0,0 +1,190 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# The original source for this example is +# Copyright (c) 1994-2008 John E. Stone +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# GNU Makefile that builds and runs example. +NAME:=tachyon + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +# The default runtime arguments +export ARGS = dat/balls.dat +export PERF_RUN_ARGS = silent dat/balls3.dat +export LIGHT_ARGS= dat/model2.dat + +# define name suffix +SUFFIX = .$(VERSION) + +LIBS ?= -lm + +include ../../common/gui/Makefile.gmake + +ifeq ($(UI),x) +UI_CXXFLAGS += -DX_FULLSYNC +ifneq (,$(findstring -lXext,$(LIBS))) +UI_CXXFLAGS += -DX_NOSHMPIX +endif +endif # X + +MYCXXFLAGS = $(CXXFLAGS) $(UI_CXXFLAGS) + +all: build run +release: build +debug: build_debug +test: run + +build: build_serial build_tbb1d build_tbb +build_debug: build_serial_debug build_tbb1d_debug build_tbb_debug +run: run_serial run_tbb1d run_tbb + +serial: build_serial run_serial +serial_debug: build_serial_debug run_serial +tbb: build_tbb run_tbb +tbb_debug: build_tbb_debug run_tbb +tbb1d: build_tbb1d run_tbb1d +tbb1d_debug: build_tbb1d_debug run_tbb1d + +build_serial: + $(MAKE) VERSION=serial build_one +build_serial_debug: + $(MAKE) VERSION=serial ADD_DEBUG=1 build_one +run_serial: + $(MAKE) VERSION=serial run_one + +build_tbb: + $(MAKE) VERSION=tbb ADD_TBB=1 build_one +build_tbb_debug: + $(MAKE) VERSION=tbb ADD_TBB=1 ADD_DEBUG=1 build_one +run_tbb: + $(MAKE) VERSION=tbb run_one + +build_tbb1d: + $(MAKE) VERSION=tbb1d ADD_TBB=1 build_one +build_tbb1d_debug: + $(MAKE) VERSION=tbb1d ADD_TBB=1 ADD_DEBUG=1 build_one +run_tbb1d: + $(MAKE) VERSION=tbb1d run_one + + +perf_build: + $(MAKE) UI=con VERSION=tbb ADD_TBB=1 build_one +perf_run: + $(MAKE) UI=con VERSION=tbb run_perf_one + +light_test: + $(MAKE) UI=con VERSION=tbb light_test_one + + +# +# Per-build Makefile rules (for recursive $(MAKE) calls from above) +# + +SVERSION = $(VERSION) + +ifeq ($(ADD_DEBUG),1) +MYCXXFLAGS += -O0 -g -D_DEBUG +else +MYCXXFLAGS += -O2 -DNDEBUG +endif + + +ifeq ($(ADD_TBB),1) +MYCXXFLAGS += +ifeq ($(ADD_DEBUG),1) +MYCXXFLAGS += -DTBB_USE_DEBUG +LIBS += -ltbb_debug +else +LIBS += -ltbb +endif +endif + +ifeq ($(shell uname), Linux) +LIBS += -lrt +endif + +SOURCE = ../../common/gui/$(UI)video.cpp src/trace.$(SVERSION).cpp src/main.cpp src/pthread.cpp src/tachyon_video.cpp src/api.cpp src/apigeom.cpp src/apitrigeom.cpp src/bndbox.cpp src/box.cpp src/camera.cpp src/coordsys.cpp src/cylinder.cpp src/extvol.cpp src/global.cpp src/grid.cpp src/imageio.cpp src/imap.cpp src/intersect.cpp src/jpeg.cpp src/light.cpp src/objbound.cpp src/parse.cpp src/plane.cpp src/ppm.cpp src/quadric.cpp src/render.cpp src/ring.cpp src/shade.cpp src/sphere.cpp src/texture.cpp src/tgafile.cpp src/trace_rest.cpp src/triangle.cpp src/ui.cpp src/util.cpp src/vector.cpp src/vol.cpp + +build_one: $(EXE) + +run_one: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS) +else + ./$(EXE) $(ARGS) +endif + +run_perf_one: + ./$(EXE) $(PERF_RUN_ARGS) + +light_test_one: + ./$(EXE) $(LIGHT_ARGS) + +$(EXE): $(SOURCE) +ifeq ($(UI),mac) + mkdir -p $(APPRES)/en.lproj $(NAME)$(SUFFIX).app/Contents/MacOS + cp ../../common/gui/xcode/tbbExample/Info.plist $(NAME)$(SUFFIX).app/Contents + cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME)$(SUFFIX).app/Contents + cp ../../common/gui/xcode/tbbExample/en.lproj/* $(APPRES)/en.lproj + $(CXX_UI) $(MYCXXFLAGS) $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) $(MYCXXFLAGS) -o $@ $(SOURCE) $(MACUIOBJS) $(LIBS) + $(RM) *.o + +clean: VERSION = * +clean: +ifeq ($(UI),mac) + rm -rf $(NAME).* +endif + $(RM) $(EXE) *.o *.d diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile.windows new file mode 100644 index 0000000000..99158efcc8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/Makefile.windows @@ -0,0 +1,139 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# The original source for this example is +# Copyright (c) 1994-2008 John E. Stone +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. The name of the author may not be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# Common Makefile that builds and runs example. + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# Uncomment one of next lines to choose user interface type (console, gdiplus, direct draw) +#UI = con +UI = gdi +#UI = dd + +# Machine architecture, auto-detected from TBB_TARGET_ARCH by default +# Use XARCH variable to change it. See index.html for more information +ARCH0 = $(TBB_TARGET_ARCH)- +ARCH1 = $(ARCH0:ia32-=x86) +ARCH2 = $(ARCH1:intel64-=AMD64) +XARCH = $(ARCH2:-=x86) + +# The default runtime arguments +ARGS = dat\balls.dat +PERF_RUN_ARGS = silent dat\balls3.dat +LIGHT_ARGS=dat\model2.dat + +# Add these for tbb/tbb1d release builds +# /GL is a workaround to prevent run-time crash when built by VS2010 +CXXFLAGS_TBB_NDEBUG = $(CXXFLAGS) /GL +LIBS_TBB_NDEBUG = tbb.lib $(LIBS) + +# Add these for tbb/tbb1d debug builds +CXXFLAGS_TBB_DEBUG = $(CXXFLAGS) /D TBB_USE_DEBUG +LIBS_TBB_DEBUG = tbb_debug.lib $(LIBS) + + +MAKEINC = ../../common/gui/Makefile.win +SOURCE = src/main.cpp src/pthread.cpp src/tachyon_video.cpp src/api.cpp src/apigeom.cpp src/apitrigeom.cpp src/bndbox.cpp src/box.cpp src/camera.cpp src/coordsys.cpp src/cylinder.cpp src/extvol.cpp src/global.cpp src/grid.cpp src/imageio.cpp src/imap.cpp src/intersect.cpp src/jpeg.cpp src/light.cpp src/objbound.cpp src/parse.cpp src/plane.cpp src/ppm.cpp src/quadric.cpp src/render.cpp src/ring.cpp src/shade.cpp src/sphere.cpp src/texture.cpp src/tgafile.cpp src/trace_rest.cpp src/triangle.cpp src/ui.cpp src/util.cpp src/vector.cpp src/vol.cpp + +# Targets +all: build run +release: build +debug: build_debug +test: run + +build: build_serial build_tbb1d build_tbb +build_debug: build_serial_debug build_tbb1d_debug build_tbb_debug +run: run_serial run_tbb1d run_tbb + +serial: build_serial run_serial +serial_debug: build_serial_debug run_serial +tbb: build_tbb run_tbb +tbb_debug: build_tbb_debug run_tbb +tbb1d: build_tbb1d run_tbb1d +tbb1d_debug: build_tbb1d_debug run_tbb1d + +build_serial: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tachyon.serial.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one +build_serial_debug: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.serial.cpp $(SOURCE)" EXE=tachyon.serial.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS=$(CXXFLAGS) XARCH=$(XARCH) build_one +run_serial: + -.\tachyon.serial.exe $(ARGS) + +build_tbb: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tachyon.tbb.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one +build_tbb_debug: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tachyon.tbb.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one +run_tbb: + -.\tachyon.tbb.exe $(ARGS) + +build_tbb1d: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tachyon.tbb1d.exe RCNAME=gui UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one +build_tbb1d_debug: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb1d.cpp $(SOURCE)" EXE=tachyon.tbb1d.exe RCNAME=gui UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_DEBUG)" LFLAGS="$(LIBS_TBB_DEBUG)" XARCH=$(XARCH) build_one +run_tbb1d: + -.\tachyon.tbb1d.exe $(ARGS) + + +clean: + @cmd.exe /C del tachyon.* *.manifest *.obj msvs\gui.res *.?db + +perf_build: + @$(MAKE) -f $(MAKEINC) SOURCE="src/trace.tbb.cpp $(SOURCE)" EXE=tachyon.tbb.exe RCNAME=gui UI=con CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS_TBB_NDEBUG)" LFLAGS="$(LIBS_TBB_NDEBUG)" XARCH=$(XARCH) build_one +perf_run: + -.\tachyon.tbb.exe $(PERF_RUN_ARGS) + +light_test: + -.\tachyon.tbb.exe $(LIGHT_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/820spheres.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/820spheres.dat new file mode 100644 index 0000000000..5d5a4300e0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/820spheres.dat @@ -0,0 +1,1671 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 512 512 + VERBOSE 0 + +CAMERA + ZOOM 1.0 + ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 12 + CENTER 0.0 0.0 2.0 + VIEWDIR 0 0 -1 + UPDIR 0 1 0 + +END_CAMERA + +LIGHT CENTER 4 3 2 RAD 0.2 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 1 -4 4 RAD 0.2 COLOR 0.5 0.5 0.5 + +LIGHT CENTER -3 1 5 RAD 0.2 COLOR 0.5 0.5 0.5 + +TEXDEF txt001 AMBIENT 0.2 DIFFUSE 0.8 SPECULAR 0 OPACITY 1 + COLOR 1 0.75 0.33 + TEXFUNC 0 + +TEXDEF txt002 AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 1.0 1.0 TEXFUNC 0 + + SPHERE CENTER 0 0 0 RAD 0.5 + txt002 + SPHERE CENTER 0.272166 0.272166 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.420314 0.420314 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.470715 0.470715 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.461623 0.409245 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.409245 0.461623 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.429405 0.481784 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.367935 0.472692 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.379004 0.431383 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.481784 0.429405 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.431383 0.379004 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.472692 0.367935 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.461844 0.304709 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.492085 0.33495 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.424345 0.305171 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.435193 0.368397 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.529584 0.334488 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.472692 0.367935 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.499343 0.304247 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.518736 0.271262 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.488495 0.241021 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.450996 0.241483 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.304709 0.461844 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.33495 0.492085 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.368397 0.435193 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.305171 0.424345 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.271262 0.518736 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.241483 0.450996 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.241021 0.488495 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.334488 0.529584 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.304247 0.499343 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.367935 0.472692 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.230635 0.38777 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.2506 0.446614 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.301839 0.407906 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.253236 0.449775 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.179397 0.426478 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.182032 0.429639 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.159431 0.367634 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.227999 0.384609 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.208034 0.325765 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.279238 0.345901 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.115031 0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.102505 0.502308 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.160392 0.474661 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.160392 0.474661 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.115031 0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.115031 0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.082487 0.239622 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0438957 0.258053 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.117687 0.252557 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0863845 0.308551 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00869528 0.245118 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0511841 0.295616 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0472866 0.226687 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0399982 0.189123 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0785895 0.170692 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.11379 0.183628 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.38777 0.230635 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.446614 0.2506 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.449775 0.253236 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.407906 0.301839 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.384609 0.227999 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.345901 0.279238 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.325765 0.208034 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.426478 0.179397 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.367634 0.159431 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.429639 0.182032 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.239622 0.082487 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.258053 0.0438957 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.308551 0.0863845 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.252557 0.117687 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.189123 0.0399982 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.183628 0.11379 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.170692 0.0785895 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.245118 0.00869528 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.226687 0.0472866 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.295616 0.0511841 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.4293 0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.502308 0.102505 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.474661 0.160392 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.474661 0.160392 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.4293 0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.4293 0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.643951 0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.802608 0.281471 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.824035 0.30566 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.787796 0.241352 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.752156 0.305221 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.838847 0.34578 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.766968 0.345341 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.817421 0.321591 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.874487 0.28191 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.853061 0.257721 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.838248 0.217602 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.643951 0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.61371 0.202787 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.5724 0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.624779 0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.68526 0.183615 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.696329 0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.715501 0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.632882 0.131237 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.663122 0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.591572 0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.594141 0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.619127 0.408291 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.638217 0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547576 0.389119 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.566667 0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.57505 0.429687 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550064 0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.621614 0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.802608 0.281471 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.858698 0.329459 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.845371 0.280879 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.798572 0.337088 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.815936 0.330051 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.75581 0.33768 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.759846 0.282063 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.862735 0.273842 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.806645 0.225855 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.849407 0.225263 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.594141 0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.613592 0.428945 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.665691 0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.621614 0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.542042 0.409774 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550064 0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.522591 0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.586119 0.388377 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.566667 0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.638217 0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.643951 0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.674191 0.202787 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.715501 0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.663122 0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.602641 0.183615 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.591572 0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.5724 0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.655019 0.131237 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.624779 0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.696329 0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.852418 0.0955788 2.30268e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.922609 0.11107 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.867231 0.135698 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.877966 0.164775 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.907797 0.0709499 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.863153 0.124655 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.837606 0.0554592 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.897062 0.0418734 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.826871 0.0263827 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.841683 0.0665023 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.69376 -0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.740325 -0.0440268 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.721234 0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.668775 -0.0631985 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.649684 0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.712851 -0.0845947 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.666287 -0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.737837 -0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.69376 -0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.745859 -0.0646815 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.737837 -0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.674309 -0.0838533 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.666287 -0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.701782 -0.0432853 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.649684 0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.721234 0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.172546 0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.281471 0.802608 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.30566 0.824035 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.305221 0.752156 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.241352 0.787796 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.28191 0.874487 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.217602 0.838248 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.257721 0.853061 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.34578 0.838847 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.321591 0.817421 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.345341 0.766968 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.358439 0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.408291 0.619127 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.337042 0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.429687 0.57505 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399007 0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.379835 0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389119 0.547576 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.317871 0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.172546 0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.142305 0.674191 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.100996 0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.153374 0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.213855 0.655019 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.224924 0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.244096 0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.161477 0.602641 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.191718 0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.120168 0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0955788 0.852418 1.31582e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.11107 0.922609 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.164775 0.877966 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.135698 0.867231 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0418734 0.897062 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0665023 0.841683 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0263827 0.826871 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0709499 0.907797 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0554592 0.837606 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.124655 0.863153 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0133465 0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0646815 0.745859 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0347427 0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0432853 0.701782 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0272215 0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00804971 0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0838533 0.674309 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0539145 0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0133465 0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0440268 0.740325 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0272215 0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0845947 0.712851 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0347427 0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0539145 0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0631985 0.668775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00804971 0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.281471 0.802608 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.329459 0.858698 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.337088 0.798572 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.280879 0.845371 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.273842 0.862735 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225263 0.849407 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225855 0.806645 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.330051 0.815936 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282063 0.759846 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.33768 0.75581 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.172546 0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202787 0.674191 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.244096 0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.191718 0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.131237 0.655019 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.120168 0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.100996 0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.183615 0.602641 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.153374 0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.224924 0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.358439 0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.428945 0.613592 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399007 0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.37761 0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.388377 0.586119 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.337042 0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.317871 0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.409774 0.542042 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.339267 0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.379835 0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.371785 0.0996195 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER -0.393621 0.220501 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.368601 0.279642 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.321889 0.238665 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.372464 0.281062 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.440333 0.261479 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.444196 0.262898 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.465353 0.202338 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.389758 0.219082 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.414778 0.15994 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.343046 0.178104 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.191247 0.166275 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.130089 0.20793 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.154295 0.172673 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.192135 0.230419 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.167041 0.201532 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.229087 0.224021 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.228199 0.159877 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.129201 0.143787 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.190359 0.102131 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.153407 0.108529 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.31427 0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.277961 0.367156 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.252306 0.297666 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.31427 0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.339925 0.383759 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.376234 0.330873 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.376234 0.330873 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.277961 0.367156 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.31427 0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.252306 0.297666 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.574159 0.153845 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER -0.612768 0.202534 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.543919 0.184086 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.554987 0.225396 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643008 0.172294 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER -0.585228 0.195155 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.6044 0.123605 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.631939 0.130984 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.56309 0.112536 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.494808 0.247614 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.494287 0.313607 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.452978 0.302539 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.434629 0.269833 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.536117 0.258683 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.476459 0.214908 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.536638 0.19269 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.554467 0.291389 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.554987 0.225396 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.513157 0.28032 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.552323 0.0329639 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.625877 0.0248832 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.584567 0.0138144 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.593633 0.0440327 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.561087 0.101445 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.520079 0.0521134 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.584869 -0.0244483 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.511316 -0.0163676 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.54356 -0.0355172 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.451136 0.0058509 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.447081 0.0051487 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.386138 0.0172804 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.439178 0.0688765 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.512079 -0.00628079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.504176 0.0574471 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.516134 -0.00557859 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.459039 -0.0578769 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.463094 -0.0571747 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.398096 -0.0457452 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.486264 -0.162382 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.248762 -0.0483751 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.183785 -0.0599222 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.187119 -0.0172857 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.215921 0.00673113 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.245428 -0.0910116 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.277564 -0.0243582 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.310405 -0.0794645 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.216626 -0.115028 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.281603 -0.103481 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.21996 -0.0723919 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.471405 0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.508983 0.690426 1.25414e-16 RAD 0.0555556 + txt002 + SPHERE CENTER -0.484794 0.755941 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.436283 0.7029 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.478434 0.695668 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.557494 0.743468 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551134 0.683194 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.581682 0.677953 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.515343 0.7507 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.539531 0.685185 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.466832 0.697658 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.335322 0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.283164 0.659645 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.286452 0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.33883 0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.332034 0.663153 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.3877 0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.384191 0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.279656 0.610775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.331813 0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.282943 0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.335322 0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.313405 0.629404 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.331813 0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.384191 0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.316914 0.678274 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.33883 0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.264535 0.625895 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.286452 0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.645066 0.554344 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.681385 0.616373 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.649723 0.609912 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607573 0.617144 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.676727 0.560805 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602915 0.561576 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.640408 0.498776 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.718878 0.553573 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.682558 0.491544 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687216 0.547112 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.471405 0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.501645 0.501645 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.542955 0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.490576 0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.430095 0.482473 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.419026 0.523783 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399854 0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.482473 0.430095 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.452233 0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523783 0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607487 0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.659645 0.283164 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.603979 0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.656357 0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.663153 0.332034 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.610996 0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.610775 0.279656 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.558618 0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.645066 0.554344 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668521 0.610229 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.598918 0.585648 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.619787 0.622977 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.714669 0.578925 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.665934 0.591673 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.691213 0.52304 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.6938 0.541596 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.670344 0.48571 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.624197 0.517014 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607487 0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.629404 0.313405 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.558618 0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.610996 0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.678274 0.316914 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.659866 0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.656357 0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.625895 0.264535 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.603979 0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.555109 0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.471405 0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.441164 0.501645 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399854 0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.452233 0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.512714 0.482473 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523783 0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.542955 0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.460336 0.430095 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.490576 0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.419026 0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643951 -0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.835815 -0.157543 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.871646 -0.122136 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.799077 -0.135649 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.82339 -0.0854653 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.908384 -0.14403 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.860128 -0.107359 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.872552 -0.179437 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.884071 -0.194213 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.84824 -0.229621 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.811502 -0.207727 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643951 -0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.61371 -0.142305 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.68526 -0.161477 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.632882 -0.213855 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.69376 0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674309 0.0838533 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.666287 0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.745859 0.0646815 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.737837 0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.701782 0.0432853 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.721234 -0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.649684 -0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.835815 -0.157543 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.899353 -0.119969 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.868703 -0.130205 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.836885 -0.0844101 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.866465 -0.147308 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.803997 -0.111748 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.802927 -0.184881 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.898283 -0.193102 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.834745 -0.230676 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.867633 -0.203337 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.69376 0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668775 0.0631985 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.649684 -0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.740325 0.0440268 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.721234 -0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.712851 0.0845947 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.737837 0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.666287 0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643951 -0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674191 -0.142305 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.715501 -0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.663122 -0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602641 -0.161477 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591572 -0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.5724 -0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.655019 -0.213855 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.624779 -0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.696329 -0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.786005 -0.343435 1.25414e-16 RAD 0.0555556 + txt002 + SPHERE CENTER -0.82165 -0.392454 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.753118 -0.370774 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.80984 -0.323622 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.854538 -0.365116 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.842728 -0.296284 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.818893 -0.316097 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.797815 -0.412267 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.76217 -0.363249 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.729282 -0.390587 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.594141 -0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.542042 -0.409774 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.550064 -0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.613592 -0.428945 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.621614 -0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.586119 -0.388377 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.638217 -0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.566667 -0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.594141 -0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.547576 -0.389119 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.566667 -0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.619127 -0.408291 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.638217 -0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.57505 -0.429687 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.621614 -0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.550064 -0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0996195 -0.371785 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.220501 -0.393621 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.279642 -0.368601 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.281062 -0.372464 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.238665 -0.321889 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.219082 -0.389758 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.178104 -0.343046 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.15994 -0.414778 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.261479 -0.440333 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.202338 -0.465353 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.262898 -0.444196 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.383759 -0.339925 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.166275 -0.191247 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.20793 -0.130089 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.230419 -0.192135 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.172673 -0.154295 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.143787 -0.129201 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.108529 -0.153407 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.102131 -0.190359 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.201532 -0.167041 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.159877 -0.228199 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.224021 -0.229087 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0058509 -0.451136 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0051487 -0.447081 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0688765 -0.439178 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0172804 -0.386138 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0578769 -0.459039 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0457452 -0.398096 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0571747 -0.463094 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00628079 -0.512079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00557859 -0.516134 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0574471 -0.504176 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0483751 -0.248762 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0599222 -0.183785 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00673113 -0.215921 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0172857 -0.187119 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115028 -0.216626 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0723919 -0.21996 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.103481 -0.281603 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0910116 -0.245428 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0794645 -0.310405 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0243582 -0.277564 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.162382 -0.486264 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.153845 -0.574159 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202534 -0.612768 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.184086 -0.543919 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.130984 -0.631939 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.112536 -0.56309 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.172294 -0.643008 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.123605 -0.6044 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.195155 -0.585228 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0329639 -0.552323 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0248832 -0.625877 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0138144 -0.584567 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0244483 -0.584869 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0355172 -0.54356 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0163676 -0.511316 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0440327 -0.593633 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0521134 -0.520079 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.101445 -0.561087 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.247614 -0.494808 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313607 -0.494287 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.269833 -0.434629 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.302539 -0.452978 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.291389 -0.554467 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.28032 -0.513157 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.258683 -0.536117 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.19269 -0.536638 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.214908 -0.476459 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.172546 -0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.157543 -0.835815 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.122136 -0.871646 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0854653 -0.82339 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.135649 -0.799077 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.194213 -0.884071 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.207727 -0.811502 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.229621 -0.84824 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.14403 -0.908384 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.179437 -0.872552 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.107359 -0.860128 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0133465 -0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0838533 -0.674309 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0539145 -0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0432853 -0.701782 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00804971 -0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0272215 -0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0646815 -0.745859 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0347427 -0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.172546 -0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.142305 -0.61371 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.213855 -0.632882 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.161477 -0.68526 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.343435 -0.786005 1.25414e-16 RAD 0.0555556 + txt002 + SPHERE CENTER -0.392454 -0.82165 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.323622 -0.80984 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.370774 -0.753118 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.412267 -0.797815 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.390587 -0.729282 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.363249 -0.76217 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.365116 -0.854538 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.316097 -0.818893 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.296284 -0.842728 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.358439 -0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.389119 -0.547576 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317871 -0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.429687 -0.57505 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.379835 -0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399007 -0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.408291 -0.619127 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.337042 -0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.358439 -0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.409774 -0.542042 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.379835 -0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.388377 -0.586119 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317871 -0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.337042 -0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.428945 -0.613592 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399007 -0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.157543 -0.835815 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.119969 -0.899353 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0844101 -0.836885 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.130205 -0.868703 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.193102 -0.898283 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.203337 -0.867633 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.230676 -0.834745 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.147308 -0.866465 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.184881 -0.802927 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.111748 -0.803997 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.172546 -0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.202787 -0.61371 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.244096 -0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.191718 -0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.131237 -0.632882 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.120168 -0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.100996 -0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.183615 -0.68526 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.153374 -0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.224924 -0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0133465 -0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0631985 -0.668775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00804971 -0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0845947 -0.712851 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0539145 -0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0347427 -0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0440268 -0.740325 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0272215 -0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.471405 -0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.690426 -0.508983 2.241e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.755941 -0.484794 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.695668 -0.478434 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.7029 -0.436283 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.7507 -0.515343 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.697658 -0.466832 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.685185 -0.539531 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.743468 -0.557494 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.677953 -0.581682 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.683194 -0.551134 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.607487 -0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.629404 -0.313405 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.610996 -0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.558618 -0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.625895 -0.264535 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.603979 -0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.678274 -0.316914 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.656357 -0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.607487 -0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.659645 -0.283164 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.656357 -0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.603979 -0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.610775 -0.279656 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.558618 -0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.663153 -0.332034 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.610996 -0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.554344 -0.645066 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.610229 -0.668521 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.622977 -0.619787 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.585648 -0.598918 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.541596 -0.6938 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.517014 -0.624197 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.48571 -0.670344 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.578925 -0.714669 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.52304 -0.691213 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.591673 -0.665934 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.471405 -0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.501645 -0.441164 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.430095 -0.460336 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.482473 -0.512714 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.335322 -0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313405 -0.629404 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.384191 -0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.331813 -0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.264535 -0.625895 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.286452 -0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.316914 -0.678274 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.33883 -0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.554344 -0.645066 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.616373 -0.681385 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.617144 -0.607573 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.609912 -0.649723 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.553573 -0.718878 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547112 -0.687216 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.491544 -0.682558 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.560805 -0.676727 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.498776 -0.640408 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.561576 -0.602915 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.335322 -0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.283164 -0.659645 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.33883 -0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.286452 -0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.279656 -0.610775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.331813 -0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.332034 -0.663153 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.384191 -0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.471405 -0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.441164 -0.441164 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399854 -0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.452233 -0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.512714 -0.460336 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.523783 -0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.542955 -0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.460336 -0.512714 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.490576 -0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.419026 -0.523783 -0.222222 RAD 0.0185185 + txt002 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls.dat new file mode 100644 index 0000000000..0d4bbb15bb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls.dat @@ -0,0 +1,14804 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 512 512 + VERBOSE 0 + +CAMERA + ZOOM 1.20711 +ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 5 + CENTER 2.1 1.3 1.7 + VIEWDIR -0.700389 -0.433574 -0.566982 + UPDIR -0.482085 -0.298433 0.82373 + +END_CAMERA + +BACKGROUND 0.078 0.361 0.753 + +LIGHT CENTER 4 3 2 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 1 -4 4 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER -3 1 5 RAD 0.002 COLOR 0.5 0.5 0.5 + +TEXDEF txt001 AMBIENT 0.2 DIFFUSE 0.8 SPECULAR 0 OPACITY 1 +PHONG PLASTIC 0 PHONG_SIZE 100000 + COLOR 1 0.75 0.33 + TEXFUNC 0 + +TRI + V0 12 12 -0.5 V1 -12 -12 -0.5 V2 12 -12 -0.5 + txt001 +TRI + V0 12 12 -0.5 V1 -12 12 -0.5 V2 -12 -12 -0.5 + txt001 +TEXDEF txt002 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 +PHONG PLASTIC 0.5 PHONG_SIZE 45.2776 + COLOR 1 0.9 0.7 + TEXFUNC 0 + + SPHERE CENTER 0 0 0 RAD 0.5 + txt002 + SPHERE CENTER 0.272166 0.272166 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.420314 0.420314 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.470715 0.470715 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.481689 0.481689 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475329 0.45787 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45787 0.475329 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477074 0.494534 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.453255 0.488174 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4661 0.48356 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494534 0.477074 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48356 0.4661 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488174 0.453255 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461623 0.409245 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.47044 0.419664 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447954 0.425689 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.468014 0.433095 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484109 0.40322 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481683 0.416651 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475292 0.392801 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464049 0.395814 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455233 0.385395 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.441563 0.401839 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409245 0.461623 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.419664 0.47044 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433095 0.468014 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.425689 0.447954 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.395814 0.464049 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401839 0.441563 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385395 0.455233 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40322 0.484109 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392801 0.475292 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416651 0.481683 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429405 0.481784 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.441197 0.503434 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452601 0.483752 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434161 0.494577 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418001 0.501466 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410965 0.492609 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406209 0.479816 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436441 0.490641 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42465 0.46899 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447846 0.470958 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.36376 0.497028 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383056 0.487812 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383056 0.487812 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34864 0.481907 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352815 0.457572 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34864 0.481907 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352815 0.457572 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379004 0.431383 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.376578 0.444814 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399064 0.438789 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385395 0.455233 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356518 0.437408 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.365335 0.447826 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358944 0.423976 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.370187 0.420964 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372614 0.407532 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392673 0.414939 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481784 0.429405 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.503434 0.441197 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494577 0.434161 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483752 0.452601 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490641 0.436441 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.470958 0.447846 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46899 0.42465 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501466 0.418001 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479816 0.406209 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492609 0.410965 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431383 0.379004 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.444814 0.376578 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455233 0.385395 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438789 0.399064 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420964 0.370187 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414939 0.392673 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407532 0.372614 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437408 0.356518 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423976 0.358944 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447826 0.365335 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.497028 0.36376 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.487812 0.383056 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.487812 0.383056 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481907 0.34864 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457572 0.352815 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481907 0.34864 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457572 0.352815 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461844 0.304709 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.492085 0.33495 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.492085 0.33495 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488469 0.313874 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471009 0.331334 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495701 0.356025 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474625 0.352409 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495701 0.356025 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51316 0.338566 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51316 0.338566 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.509544 0.31749 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.424345 0.305171 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.40568 0.315605 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403931 0.312107 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419383 0.329161 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426095 0.30867 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.439797 0.322225 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.444759 0.298235 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410643 0.291616 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429307 0.281181 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408893 0.288117 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435193 0.368397 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.440864 0.389015 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457301 0.37895 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.451857 0.367697 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418755 0.378463 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429748 0.357145 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.413085 0.357845 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4242 0.389715 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418529 0.369098 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440637 0.37965 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529584 0.334488 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.546497 0.347572 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532117 0.331508 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522481 0.352406 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.543964 0.350552 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519948 0.355387 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52705 0.337468 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5536 0.329654 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536686 0.31657 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53922 0.313589 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.48474 0.389488 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495668 0.369235 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477004 0.379669 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461764 0.388188 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.454027 0.37837 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449715 0.366636 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480429 0.377754 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46838 0.356202 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.491357 0.357501 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499343 0.304247 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.518259 0.314219 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519922 0.310678 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504895 0.328108 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.49768 0.307788 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484316 0.321677 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478764 0.297816 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512708 0.290358 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493791 0.280387 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51437 0.286818 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.518736 0.271262 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.539811 0.274878 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.520873 0.290418 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.533373 0.290264 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.537674 0.255722 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531235 0.271108 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516598 0.252106 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.525174 0.255876 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504099 0.25226 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506236 0.271416 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488495 0.241021 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.50716 0.230587 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51153 0.24936 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499694 0.253381 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484125 0.222248 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476659 0.245042 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46546 0.232683 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495961 0.218227 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477296 0.228661 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.500331 0.237 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450996 0.241483 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.455172 0.217147 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472226 0.232599 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45115 0.228983 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433942 0.226031 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429921 0.237867 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429767 0.250367 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455018 0.229647 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450842 0.253983 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472072 0.245099 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304709 0.461844 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.33495 0.492085 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.33495 0.492085 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331334 0.471009 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313874 0.488469 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338566 0.51316 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31749 0.509544 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338566 0.51316 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356025 0.495701 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356025 0.495701 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352409 0.474625 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.368397 0.435193 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389015 0.440864 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367697 0.451857 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37895 0.457301 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389715 0.4242 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37965 0.440637 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369098 0.418529 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378463 0.418755 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357845 0.413085 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357145 0.429748 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305171 0.424345 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.315605 0.40568 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329161 0.419383 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312107 0.403931 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291616 0.410643 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288117 0.408893 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281181 0.429307 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30867 0.426095 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298235 0.444759 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322225 0.439797 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271262 0.518736 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.274878 0.539811 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290264 0.533373 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290418 0.520873 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.255876 0.525174 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271416 0.506236 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25226 0.504099 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.255722 0.537674 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252106 0.516598 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271108 0.531235 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241483 0.450996 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.217147 0.455172 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228983 0.45115 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.232599 0.472226 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229647 0.455018 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245099 0.472072 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253983 0.450842 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.226031 0.433942 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250367 0.429767 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237867 0.429921 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241021 0.488495 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.230587 0.50716 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253381 0.499694 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24936 0.51153 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218227 0.495961 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237 0.500331 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228661 0.477296 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222248 0.484125 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.232683 0.46546 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245042 0.476659 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334488 0.529584 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.347572 0.546497 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352406 0.522481 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331508 0.532117 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329654 0.5536 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313589 0.53922 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31657 0.536686 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350552 0.543964 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337468 0.52705 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355387 0.519948 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304247 0.499343 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314219 0.518259 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328108 0.504895 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310678 0.519922 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290358 0.512708 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286818 0.51437 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280387 0.493791 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307788 0.49768 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297816 0.478764 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321677 0.484316 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389488 0.48474 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379669 0.477004 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369235 0.495668 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377754 0.480429 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357501 0.491357 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356202 0.46838 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388188 0.461764 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366636 0.449715 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37837 0.454027 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230635 0.38777 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.2506 0.446614 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.264242 0.467193 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.272442 0.447086 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253384 0.459832 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2424 0.46672 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.231541 0.459359 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228758 0.446141 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261459 0.453974 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247817 0.433396 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269659 0.433868 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301839 0.407906 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.319874 0.420236 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.303021 0.407886 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296625 0.428474 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318692 0.420256 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295442 0.428494 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300656 0.407926 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325088 0.399668 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307053 0.387338 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308235 0.387318 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253236 0.449775 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.263032 0.459076 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270029 0.436804 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247378 0.440021 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.246239 0.472047 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230585 0.452992 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236443 0.462746 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26889 0.468829 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259094 0.459528 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275887 0.446557 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179397 0.426478 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.174744 0.447688 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197172 0.437457 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.1895 0.447523 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156968 0.436708 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171724 0.436544 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161621 0.415499 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164641 0.426642 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.169293 0.405432 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187069 0.416412 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182032 0.429639 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177682 0.45215 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.190087 0.449636 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200611 0.44299 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.169628 0.432153 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192556 0.422992 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173978 0.409641 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159104 0.438799 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.163454 0.416288 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171508 0.436286 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159431 0.367634 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.13761 0.368692 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.158434 0.366998 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153102 0.387887 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138607 0.369329 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.154099 0.388523 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160429 0.36827 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.14394 0.34844 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165761 0.347381 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164764 0.346745 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227999 0.384609 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.237348 0.393812 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251829 0.390976 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234368 0.408432 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213518 0.387445 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210538 0.402066 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.204169 0.378242 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23098 0.369989 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221631 0.360786 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245461 0.367152 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208034 0.325765 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.209548 0.312342 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229235 0.324887 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209827 0.337 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188347 0.31322 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188626 0.337878 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.186834 0.326643 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207755 0.301107 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206242 0.31453 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227442 0.313652 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279238 0.345901 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.302145 0.344931 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297823 0.356827 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.289691 0.366251 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28356 0.334005 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271106 0.355325 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260653 0.334975 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291692 0.324581 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268785 0.325551 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28737 0.336477 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.102505 0.502308 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.110567 0.524146 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.126738 0.506465 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.112687 0.504055 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0863343 0.519988 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0884544 0.499897 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0782715 0.49815 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100385 0.522399 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0923218 0.500561 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.116555 0.504718 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160392 0.474661 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177777 0.492047 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176681 0.473492 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159222 0.490951 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161488 0.493217 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142932 0.492121 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144102 0.475831 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178947 0.475757 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161561 0.458371 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177851 0.457202 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160392 0.474661 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.167697 0.481967 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161561 0.458371 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144102 0.475831 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166528 0.498257 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142932 0.492121 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159222 0.490951 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183987 0.480797 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176681 0.473492 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177851 0.457202 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0450372 0.477623 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.055591 0.475469 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696413 0.47788 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0465898 0.4591 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.071194 0.459357 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0586963 0.438424 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325396 0.45669 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446461 0.436013 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0430934 0.454536 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.10495 0.439381 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0911807 0.435691 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10864 0.45315 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128801 0.43299 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13249 0.44676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138881 0.42291 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111341 0.415531 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121421 0.40545 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0975713 0.411841 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.052284 0.366554 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0708393 0.36765 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0533799 0.385109 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511144 0.382844 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0522103 0.401399 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685002 0.400229 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685739 0.365384 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0859596 0.38277 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0871292 0.36648 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0493251 0.475575 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0725262 0.467381 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.06557 0.479825 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0339426 0.465141 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0501875 0.46939 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0417612 0.446512 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0408988 0.452697 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0487174 0.434069 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0640999 0.444504 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0623642 0.376634 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0859596 0.38277 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685002 0.400229 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0460743 0.377803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0522103 0.401399 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0533799 0.385109 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0635337 0.360344 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0708393 0.36765 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0871292 0.36648 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.125111 0.439381 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138881 0.435691 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121421 0.45315 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101261 0.43299 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0975713 0.44676 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0911807 0.42291 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11872 0.415531 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10864 0.40545 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13249 0.411841 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.082487 0.239622 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0438957 0.258053 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0426858 0.273525 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.064638 0.265928 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0510334 0.281546 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0219434 0.26565 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.030291 0.273671 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0231533 0.250178 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0355481 0.250032 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.036758 0.23456 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0575003 0.242434 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117687 0.252557 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.135677 0.265544 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138361 0.25778 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12224 0.275732 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115003 0.26032 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101567 0.270508 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.097014 0.247334 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131123 0.242369 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.113134 0.229382 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.133808 0.234605 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0863845 0.308551 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0971427 0.330622 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.109956 0.310023 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.091905 0.317013 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0735708 0.329151 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0683331 0.315541 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0628126 0.30708 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0916222 0.322161 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.080864 0.30009 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104436 0.301561 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00869528 0.245118 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0110117 0.257416 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00823377 0.253319 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0102865 0.269325 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0105502 0.249215 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.010748 0.261124 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00915679 0.236916 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0126029 0.233209 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00710408 0.22091 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00664257 0.229111 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511841 0.295616 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0555846 0.315856 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0705987 0.309941 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0705297 0.296292 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.03617 0.301531 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511152 0.281968 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0317696 0.281291 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.036239 0.31518 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0318385 0.29494 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.051253 0.309265 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0472866 0.226687 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.025169 0.224935 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0281502 0.217281 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0288111 0.241399 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0443054 0.234341 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0479475 0.250805 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.066423 0.236092 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0436445 0.210223 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0657621 0.211974 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0466257 0.202569 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0399982 0.189123 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0335228 0.179527 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0567332 0.187058 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0385291 0.203632 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0167878 0.181593 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.021794 0.205698 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0232631 0.191189 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0349919 0.165018 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0414672 0.174615 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0582023 0.172549 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0785895 0.170692 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0867911 0.147549 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101845 0.166573 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.083121 0.161663 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0635354 0.151669 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0598652 0.165782 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0553337 0.174812 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822597 0.156579 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.074058 0.179722 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0973138 0.175603 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11379 0.183628 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.133336 0.176775 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136161 0.192663 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124499 0.199753 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110965 0.167739 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102127 0.190718 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0914184 0.174592 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.122627 0.160649 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103081 0.167502 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125452 0.176537 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38777 0.230635 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.446614 0.2506 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.467193 0.264242 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459832 0.253384 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447086 0.272442 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.453974 0.261459 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433868 0.269659 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433396 0.247817 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46672 0.2424 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446141 0.228758 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459359 0.231541 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449775 0.253236 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.459076 0.263032 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440021 0.247378 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436804 0.270029 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.468829 0.26889 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446557 0.275887 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459528 0.259094 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472047 0.246239 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.462746 0.236443 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452992 0.230585 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407906 0.301839 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.420236 0.319874 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428474 0.296625 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407886 0.303021 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399668 0.325088 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387318 0.308235 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387338 0.307053 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420256 0.318692 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407926 0.300656 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428494 0.295442 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384609 0.227999 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.393812 0.237348 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408432 0.234368 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.390976 0.251829 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369989 0.23098 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367152 0.245461 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360786 0.221631 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387445 0.213518 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378242 0.204169 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402066 0.210538 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345901 0.279238 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.344931 0.302145 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366251 0.289691 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356827 0.297823 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324581 0.291692 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336477 0.28737 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325551 0.268785 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334005 0.28356 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334975 0.260653 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355325 0.271106 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325765 0.208034 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.312342 0.209548 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337 0.209827 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324887 0.229235 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301107 0.207755 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313652 0.227442 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31453 0.206242 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31322 0.188347 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.326643 0.186834 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337878 0.188626 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426478 0.179397 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.447688 0.174744 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447523 0.1895 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437457 0.197172 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426642 0.164641 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416412 0.187069 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405432 0.169293 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436708 0.156968 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.415499 0.161621 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436544 0.171724 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367634 0.159431 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.368692 0.13761 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387887 0.153102 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366998 0.158434 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34844 0.14394 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346745 0.164764 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347381 0.165761 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369329 0.138607 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36827 0.160429 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388523 0.154099 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429639 0.182032 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.45215 0.177682 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44299 0.200611 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449636 0.190087 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438799 0.159104 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436286 0.171508 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416288 0.163454 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.432153 0.169628 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409641 0.173978 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.422992 0.192556 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.239622 0.082487 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.258053 0.0438957 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.273525 0.0426858 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281546 0.0510334 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265928 0.064638 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250032 0.0355481 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242434 0.0575003 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23456 0.036758 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26565 0.0219434 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250178 0.0231533 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273671 0.030291 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308551 0.0863845 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.330622 0.0971427 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317013 0.091905 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310023 0.109956 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322161 0.0916222 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301561 0.104436 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30009 0.080864 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329151 0.0735708 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30708 0.0628126 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315541 0.0683331 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252557 0.117687 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.265544 0.135677 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275732 0.12224 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25778 0.138361 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242369 0.131123 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234605 0.133808 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229382 0.113134 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26032 0.115003 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247334 0.097014 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270508 0.101567 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.189123 0.0399982 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.179527 0.0335228 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203632 0.0385291 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187058 0.0567332 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165018 0.0349919 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172549 0.0582023 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174615 0.0414672 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181593 0.0167878 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191189 0.0232631 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205698 0.021794 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183628 0.11379 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.176775 0.133336 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.199753 0.124499 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192663 0.136161 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160649 0.122627 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176537 0.125452 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167502 0.103081 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167739 0.110965 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174592 0.0914184 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.190718 0.102127 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.170692 0.0785895 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.147549 0.0867911 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161663 0.083121 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166573 0.101845 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156579 0.0822597 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.175603 0.0973138 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179722 0.074058 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.151669 0.0635354 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174812 0.0553337 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165782 0.0598652 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245118 0.00869528 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.257416 -0.0110117 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269325 0.0102865 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253319 0.00823377 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233209 -0.0126029 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229111 0.00664257 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22091 0.00710408 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249215 -0.0105502 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236916 0.00915679 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261124 0.010748 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.226687 0.0472866 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.224935 0.025169 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241399 0.0288111 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217281 0.0281502 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210223 0.0436445 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202569 0.0466257 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211974 0.0657621 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234341 0.0443054 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236092 0.066423 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250805 0.0479475 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295616 0.0511841 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.315856 0.0555846 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296292 0.0705297 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309941 0.0705987 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31518 0.036239 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309265 0.051253 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29494 0.0318385 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301531 0.03617 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281291 0.0317696 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281968 0.0511152 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.502308 0.102505 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.524146 0.110567 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504055 0.112687 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506465 0.126738 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522399 0.100385 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504718 0.116555 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.500561 0.0923218 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519988 0.0863343 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.49815 0.0782715 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499897 0.0884544 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474661 0.160392 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.481967 0.167697 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475831 0.144102 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458371 0.161561 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480797 0.183987 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457202 0.177851 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.473492 0.176681 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498257 0.166528 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490951 0.159222 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492121 0.142932 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474661 0.160392 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.492047 0.177777 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490951 0.159222 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.473492 0.176681 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475757 0.178947 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457202 0.177851 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458371 0.161561 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493217 0.161488 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475831 0.144102 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492121 0.142932 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.475575 0.0493251 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479825 0.06557 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.467381 0.0725262 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452697 0.0408988 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.444504 0.0640999 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434069 0.0487174 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.465141 0.0339426 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446512 0.0417612 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46939 0.0501875 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.439381 0.125111 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45315 0.121421 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435691 0.138881 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.415531 0.11872 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.411841 0.13249 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40545 0.10864 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43299 0.101261 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42291 0.0911807 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44676 0.0975713 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.376634 0.0623642 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400229 0.0685002 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38277 0.0859596 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360344 0.0635337 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36648 0.0871292 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36765 0.0708393 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377803 0.0460743 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385109 0.0533799 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401399 0.0522103 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.477623 0.0450372 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.47788 0.0696413 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475469 0.055591 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45669 0.0325396 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.454536 0.0430934 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436013 0.0446461 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4591 0.0465898 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438424 0.0586963 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459357 0.071194 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.366554 0.052284 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385109 0.0533799 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36765 0.0708393 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.365384 0.0685739 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36648 0.0871292 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38277 0.0859596 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382844 0.0511144 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400229 0.0685002 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401399 0.0522103 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.41922 0.125111 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40545 0.121421 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42291 0.138881 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44307 0.11872 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44676 0.13249 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45315 0.10864 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.425611 0.101261 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435691 0.0911807 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.411841 0.0975713 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.802608 0.281471 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.824035 0.30566 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.822021 0.302088 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.821938 0.282758 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802598 0.298094 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824119 0.32499 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.804695 0.320997 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826132 0.328563 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843459 0.309654 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845472 0.313227 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843375 0.290324 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.787796 0.241352 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.785699 0.218449 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802677 0.22345 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.778718 0.223304 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770818 0.236351 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.763837 0.241205 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.772915 0.259253 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794777 0.236497 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.796874 0.2594 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811756 0.241498 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.752156 0.305221 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.741263 0.325175 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.747715 0.32493 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.765112 0.325981 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745704 0.305466 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.769553 0.306272 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.756597 0.285513 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.728307 0.304415 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7392 0.284462 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.734759 0.304171 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838847 0.34578 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.851488 0.360404 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853509 0.335865 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832518 0.347059 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.836826 0.370319 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817857 0.356973 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824185 0.355695 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857816 0.359125 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845176 0.344501 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.859838 0.334587 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.766968 0.345341 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.768944 0.369945 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788341 0.356172 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.780624 0.356171 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.747572 0.359113 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759252 0.34534 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745596 0.33451 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755289 0.359115 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753313 0.334511 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774685 0.345342 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817421 0.321591 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.83071 0.340361 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.840365 0.325527 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.822249 0.341208 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.807766 0.336425 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799305 0.337272 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794477 0.317654 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.825882 0.320744 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.812593 0.301973 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.835537 0.30591 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.874487 0.28191 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.891539 0.292033 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868678 0.28812 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.872763 0.305711 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897348 0.285824 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.878572 0.299501 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880296 0.275701 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.893263 0.268233 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876212 0.25811 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.870402 0.264319 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853061 0.257721 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.87538 0.26204 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87108 0.266856 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.860805 0.280934 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857361 0.252905 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842785 0.271799 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.835041 0.248586 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867636 0.238827 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845317 0.234508 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.863337 0.243643 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838248 0.217602 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.860225 0.206363 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858689 0.230102 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.854636 0.223536 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.839784 0.193863 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.834196 0.211035 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817808 0.205101 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843837 0.200429 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.821861 0.211667 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842301 0.224168 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.61371 0.202787 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.61556 0.221097 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621702 0.225035 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635958 0.210779 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607567 0.198849 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627965 0.188531 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605717 0.180539 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593312 0.213105 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591462 0.194794 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599454 0.217042 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.556122 0.208861 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575596 0.203643 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.578791 0.215568 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.552927 0.196936 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575596 0.203643 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569205 0.179793 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549732 0.185011 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.56601 0.167868 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569205 0.179793 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.631486 0.266765 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648629 0.250487 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.636704 0.247291 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607636 0.260374 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612854 0.240901 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600929 0.237705 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619561 0.26357 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612854 0.240901 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.636704 0.247291 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68526 0.183615 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684921 0.190903 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665787 0.178397 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669989 0.201661 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704395 0.196121 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.689462 0.206879 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704733 0.188833 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700193 0.172858 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700531 0.165569 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681058 0.160351 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.710584 0.23918 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705059 0.216195 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687599 0.233654 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701855 0.24791 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678869 0.242384 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687599 0.233654 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.719314 0.23045 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705059 0.216195 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.713788 0.207465 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.738169 0.160081 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718696 0.165299 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721891 0.177224 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.734974 0.148156 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718696 0.165299 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712305 0.141449 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731779 0.136231 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70911 0.129524 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712305 0.141449 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632882 0.131237 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.634145 0.108412 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.650927 0.115965 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627664 0.111763 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616099 0.123683 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609618 0.127034 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614836 0.146508 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639363 0.127886 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.6381 0.15071 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656145 0.135439 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.680265 0.0847178 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.686972 0.107387 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675047 0.104191 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656415 0.0783272 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651197 0.0978007 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639272 0.0946054 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.66834 0.0815225 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651197 0.0978007 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675047 0.104191 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.577317 0.105912 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600302 0.111438 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582843 0.128897 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.568587 0.114642 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.574113 0.137627 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582843 0.128897 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586046 0.0971825 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600302 0.111438 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609032 0.102708 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594141 0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.619127 0.408291 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.625955 0.411883 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630791 0.390369 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607547 0.396287 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61429 0.429805 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595882 0.414208 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607462 0.426212 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.637535 0.423887 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630706 0.420295 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642371 0.402373 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.68332 0.389713 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68332 0.389713 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688854 0.369058 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638217 0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.652948 0.344865 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632683 0.357697 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651954 0.357326 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658482 0.324211 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.657489 0.336672 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643752 0.316388 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639211 0.324581 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624481 0.316758 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618946 0.337413 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547576 0.389119 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.541008 0.410169 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548718 0.410472 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564748 0.405866 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539866 0.388816 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563607 0.384513 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546435 0.367766 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523836 0.393422 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530405 0.372372 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531546 0.393725 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566667 0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.555534 0.296626 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572202 0.297216 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550163 0.307914 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549999 0.31728 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544629 0.328569 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.561133 0.338525 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572037 0.306582 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583171 0.327827 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588706 0.307172 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.501272 0.340934 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501272 0.340934 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506807 0.320279 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57505 0.429687 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.58161 0.452905 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5989 0.436077 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586467 0.434777 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55776 0.446515 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562617 0.428387 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5512 0.423296 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570193 0.447815 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563633 0.424596 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587483 0.430987 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550064 0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547099 0.396248 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569716 0.388263 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.557504 0.403175 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527447 0.387819 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.537852 0.394747 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530412 0.371406 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539659 0.372907 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542624 0.356494 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562276 0.364922 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621614 0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.637209 0.41723 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642848 0.401533 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624734 0.418027 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.615976 0.414703 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603501 0.4155 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600381 0.39648 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634089 0.39821 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618494 0.379986 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639728 0.382513 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802608 0.281471 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.858698 0.329459 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.872345 0.34259 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86421 0.32016 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848329 0.338969 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.866833 0.351888 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842817 0.348268 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853186 0.338757 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882715 0.333079 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.869068 0.319948 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87458 0.310649 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845371 0.280879 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.849036 0.291048 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826067 0.287867 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.840755 0.304882 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868341 0.28406 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86006 0.297894 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.864676 0.273891 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853652 0.267046 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.849987 0.256877 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.830683 0.263865 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.798572 0.337088 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.808673 0.346884 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.82298 0.335792 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.807762 0.322361 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.784265 0.34818 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.783355 0.323657 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774164 0.338384 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799483 0.361611 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.789382 0.351815 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.81379 0.350519 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.815936 0.330051 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.828769 0.350165 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838905 0.333232 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.820583 0.347547 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.805799 0.346984 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.797614 0.344366 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.792966 0.32687 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824121 0.332668 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811288 0.312554 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.834258 0.315735 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.75581 0.33768 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.753851 0.362219 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774086 0.350765 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76987 0.352319 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.735575 0.349134 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751594 0.339233 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737534 0.324595 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739791 0.347581 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.74175 0.323042 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760026 0.336127 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759846 0.282063 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.756464 0.29233 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.779336 0.288514 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.765125 0.305929 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736973 0.285879 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745634 0.299478 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.740355 0.275612 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751185 0.268464 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.754567 0.258198 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774058 0.264649 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.862735 0.273842 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.885497 0.282313 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876946 0.281455 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867718 0.29787 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871286 0.274699 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853506 0.290257 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848523 0.266228 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880514 0.258284 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857752 0.249813 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871963 0.257427 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.806645 0.225855 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.818054 0.21762 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.83061 0.230661 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.813612 0.241754 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794089 0.212813 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.789647 0.236948 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.78268 0.221048 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811087 0.20172 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799677 0.209955 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.823642 0.214761 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.849407 0.225263 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.873186 0.21889 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.865588 0.240865 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.866351 0.236437 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857005 0.203288 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.850171 0.220835 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.833227 0.20966 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.856242 0.207715 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832464 0.214088 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848644 0.22969 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594141 0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.613592 0.428945 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626191 0.448155 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634643 0.42519 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614455 0.43276 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60514 0.45191 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593404 0.436515 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592541 0.4327 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625328 0.44434 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612729 0.42513 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.63378 0.421375 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.68332 0.389713 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68332 0.389713 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688854 0.369058 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621614 0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.625435 0.399844 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627149 0.378352 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60511 0.38905 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619901 0.420499 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599576 0.409705 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61608 0.419661 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641939 0.409801 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638118 0.408963 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643653 0.388308 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542042 0.409774 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.53788 0.433888 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558395 0.423551 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55574 0.426423 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.521526 0.42011 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539387 0.412646 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.525689 0.395996 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524182 0.417238 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528344 0.393124 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544697 0.406901 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550064 0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.540802 0.399304 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54453 0.400489 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563801 0.400119 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546337 0.37865 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569335 0.379464 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555599 0.35918 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527065 0.37902 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536327 0.359551 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530793 0.380205 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.501272 0.340934 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501272 0.340934 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506807 0.320279 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586119 0.388377 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.594185 0.405974 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609969 0.394768 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593017 0.410332 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570335 0.399584 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569167 0.403942 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562269 0.381987 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587286 0.384019 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57922 0.366422 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60307 0.372813 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566667 0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.567308 0.314012 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587901 0.320398 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569787 0.336891 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546074 0.311485 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548554 0.334364 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.545434 0.315344 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564188 0.294991 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563547 0.29885 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.584781 0.301377 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638217 0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.659244 0.341809 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65787 0.345471 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645657 0.360383 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639592 0.33338 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626005 0.351955 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618565 0.328614 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651804 0.318468 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630777 0.313702 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65043 0.32213 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.674191 0.202787 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.690652 0.219248 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695267 0.206403 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677807 0.223862 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669577 0.215632 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656732 0.220246 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.653116 0.199171 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687036 0.198172 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.670575 0.181711 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.691651 0.185327 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.733129 0.203821 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.709966 0.212373 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.733129 0.203821 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.709966 0.212373 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.738664 0.183166 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721035 0.171063 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721035 0.171063 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.675225 0.261725 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683777 0.238562 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65457 0.267259 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642468 0.249631 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642468 0.249631 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675225 0.261725 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683777 0.238562 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602641 0.183615 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600215 0.197046 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.622701 0.191021 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609032 0.207465 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.580155 0.18964 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588972 0.200059 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582581 0.176209 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593824 0.173196 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.596251 0.159765 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61631 0.167171 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.587397 0.24926 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606693 0.240045 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606693 0.240045 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572277 0.23414 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.576452 0.209804 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572277 0.23414 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.576452 0.209804 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.551082 0.155041 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566866 0.174029 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.551082 0.155041 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566866 0.174029 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.556617 0.134387 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577935 0.13272 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577935 0.13272 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655019 0.131237 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.668451 0.12881 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678869 0.137627 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.662426 0.151296 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644601 0.12242 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638576 0.144906 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.631169 0.124846 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661044 0.108751 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647613 0.111177 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671463 0.117567 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626446 0.0796777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645433 0.0954616 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605791 0.0852121 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604124 0.10653 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604124 0.10653 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626446 0.0796777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645433 0.0954616 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.720665 0.115992 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.711449 0.135288 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.711449 0.135288 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705544 0.100872 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681209 0.105047 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705544 0.100872 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681209 0.105047 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852418 0.0955788 1.89979e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.922609 0.11107 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.937225 0.122151 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.916553 0.11086 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915202 0.131874 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.943281 0.12236 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.921258 0.132084 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.928665 0.111279 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.944632 0.101346 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.930016 0.0902645 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.92396 0.090055 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867231 0.135698 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.873196 0.134634 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882112 0.117797 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858152 0.11765 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858315 0.152536 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843271 0.135552 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852349 0.1536 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882275 0.152682 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876309 0.153747 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89119 0.135845 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.877966 0.164775 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.890926 0.182656 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897331 0.159019 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876622 0.167676 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871561 0.188412 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857256 0.173431 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.8586 0.17053 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89227 0.179755 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87931 0.161874 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.898675 0.156118 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.907797 0.0709499 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.930963 0.0752104 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.924191 0.0806562 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915684 0.0941344 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.914568 0.0655041 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.899289 0.0844281 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.891402 0.0612436 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.923076 0.0520258 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89991 0.0477654 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.916304 0.0574717 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.863153 0.124655 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.875744 0.141535 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.88655 0.129819 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868763 0.146389 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852347 0.136371 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845366 0.141225 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.839756 0.119492 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.870135 0.119801 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857544 0.102922 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880941 0.108085 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.837606 0.0554592 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.842832 0.0523913 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86055 0.0593957 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842434 0.0750766 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.819888 0.0484547 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.81949 0.07114 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.814662 0.0515226 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838004 0.0327739 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832778 0.0358417 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.855722 0.0397783 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897062 0.0418734 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.920407 0.0359958 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.912106 0.0588574 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915603 0.0511067 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.905363 0.0190117 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.900559 0.0341227 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882018 0.0248894 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.901866 0.0267625 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.878521 0.0326401 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.893565 0.0496241 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826871 0.0263827 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.825102 0.00436945 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.84533 0.018173 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.823964 0.025051 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.806642 0.0125791 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.805505 0.0332607 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.808411 0.0345923 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.828008 0.00570109 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.829777 0.0277143 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848237 0.0195047 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.841683 0.0665023 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.840284 0.0454909 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.856111 0.0473735 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.831823 0.0463379 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.825856 0.0646197 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817395 0.0654667 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.827255 0.0856311 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.850144 0.0656554 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.851543 0.0866667 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.865971 0.0675379 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.69376 -0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.740325 -0.0440268 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.762259 -0.0417568 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759495 -0.0345526 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.748937 -0.0216407 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743089 -0.051231 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.729767 -0.0311149 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721155 -0.053501 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753646 -0.0641429 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731712 -0.0664129 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750882 -0.0569387 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.782939 0.0179281 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.782939 0.0179281 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788473 -0.00272662 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721234 0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.736829 0.0454452 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.742467 0.0297485 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724354 0.046242 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715595 0.0429182 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70312 0.043715 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7 0.0246945 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.733709 0.0264247 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718114 0.00820099 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739347 0.010728 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.668775 -0.0631985 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.669983 -0.0708196 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.690113 -0.0618185 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671462 -0.0467378 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648644 -0.0721997 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.650123 -0.0481178 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647436 -0.0645786 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667296 -0.0872804 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666087 -0.0796593 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687426 -0.0782793 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649684 0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.646718 0.0244627 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669336 0.016478 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.657124 0.0313903 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627066 0.0160343 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.637471 0.022962 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630031 -0.000378614 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639278 0.00112207 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642244 -0.0152909 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661896 -0.00686255 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600892 -0.0308513 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600892 -0.0308513 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606426 -0.051506 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712851 -0.0845947 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.730141 -0.101422 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736701 -0.0782041 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725284 -0.0832945 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.706291 -0.107813 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701434 -0.0896851 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.689001 -0.0909853 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.717709 -0.102723 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700418 -0.0858949 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724268 -0.0795043 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666287 -0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.655153 -0.0751594 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671821 -0.0745692 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649783 -0.0638711 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649619 -0.0545047 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644249 -0.0432164 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660752 -0.0332597 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671657 -0.0652028 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682791 -0.0439578 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688325 -0.0646126 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737837 -0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.752567 -0.0269197 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.732303 -0.014088 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751574 -0.0144587 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.758102 -0.0475745 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.757108 -0.0351134 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743371 -0.0553974 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.73883 -0.0472037 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7241 -0.0550267 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718566 -0.0343719 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.69376 -0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.745859 -0.0646815 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.770032 -0.0684873 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759394 -0.0481266 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.762305 -0.0507391 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.756497 -0.0850422 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.74877 -0.067294 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.732325 -0.0812364 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753586 -0.0824297 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.729413 -0.0786239 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.742948 -0.062069 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.782939 0.0179281 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.782939 0.0179281 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788473 -0.00272662 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737837 -0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.758864 -0.0299763 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.757489 -0.0263144 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745277 -0.0114021 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739212 -0.0384047 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725625 -0.0198304 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718185 -0.043171 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751424 -0.0533169 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.730397 -0.0580833 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750049 -0.0496549 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674309 -0.0838533 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.675276 -0.106805 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694308 -0.091423 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673094 -0.0875713 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655278 -0.0992356 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.653095 -0.0800016 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65431 -0.0762835 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.676491 -0.103087 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675524 -0.0801352 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695522 -0.0877049 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666287 -0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.666927 -0.0577732 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68752 -0.0513875 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669407 -0.034894 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645694 -0.0603001 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648173 -0.0374209 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645053 -0.0564414 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663807 -0.0767937 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663167 -0.072935 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.6844 -0.070408 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600892 -0.0308513 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600892 -0.0308513 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606426 -0.051506 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701782 -0.0432853 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.717566 -0.0544915 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725632 -0.0368947 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718734 -0.0588496 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.693716 -0.0608821 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694884 -0.0652402 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677932 -0.0496759 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700615 -0.0389272 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.684831 -0.027721 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.708681 -0.0213304 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649684 0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.640422 0.0275193 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644149 0.0287044 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.66342 0.0283337 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645956 0.00686453 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.668955 0.00767898 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655218 -0.012605 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626685 0.00723527 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635947 -0.0122343 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630413 0.00842045 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721234 0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.725055 0.0280589 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.726768 0.00656677 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70473 0.0172649 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.71952 0.0487136 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.699195 0.0379196 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715699 0.0478762 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.741558 0.0380155 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737738 0.0371781 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743272 0.0165234 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.281471 0.802608 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.30566 0.824035 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.302088 0.822021 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298094 0.802598 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282758 0.821938 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309654 0.843459 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290324 0.843375 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313227 0.845472 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32499 0.824119 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328563 0.826132 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320997 0.804695 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305221 0.752156 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.325175 0.741263 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325981 0.765112 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32493 0.747715 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304415 0.728307 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304171 0.734759 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.284462 0.7392 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305466 0.745704 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285513 0.756597 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306272 0.769553 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241352 0.787796 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.218449 0.785699 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223304 0.778718 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22345 0.802677 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236497 0.794777 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241498 0.811756 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2594 0.796874 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236351 0.770818 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259253 0.772915 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241205 0.763837 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28191 0.874487 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.292033 0.891539 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305711 0.872763 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28812 0.868678 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268233 0.893263 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264319 0.870402 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25811 0.876212 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285824 0.897348 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275701 0.880296 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299501 0.878572 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217602 0.838248 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.206363 0.860225 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223536 0.854636 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230102 0.858689 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200429 0.843837 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224168 0.842301 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211667 0.821861 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193863 0.839784 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205101 0.817808 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211035 0.834196 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257721 0.853061 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.26204 0.87538 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280934 0.860805 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266856 0.87108 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238827 0.867636 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243643 0.863337 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234508 0.845317 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252905 0.857361 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248586 0.835041 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271799 0.842785 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34578 0.838847 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.360404 0.851488 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347059 0.832518 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335865 0.853509 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359125 0.857816 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334587 0.859838 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.344501 0.845176 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.370319 0.836826 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355695 0.824185 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356973 0.817857 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321591 0.817421 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340361 0.83071 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341208 0.822249 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325527 0.840365 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320744 0.825882 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30591 0.835537 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301973 0.812593 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336425 0.807766 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317654 0.794477 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337272 0.799305 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345341 0.766968 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.369945 0.768944 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356171 0.780624 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356172 0.788341 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359115 0.755289 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345342 0.774685 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334511 0.753313 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359113 0.747572 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33451 0.745596 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34534 0.759252 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358439 0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.408291 0.619127 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.411883 0.625955 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396287 0.607547 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.390369 0.630791 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423887 0.637535 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402373 0.642371 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420295 0.630706 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429805 0.61429 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426212 0.607462 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414208 0.595882 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337042 0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.344865 0.652948 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357326 0.651954 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357697 0.632683 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324581 0.639211 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337413 0.618946 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316758 0.624481 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324211 0.658482 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316388 0.643752 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336672 0.657489 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389713 0.68332 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369058 0.688854 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389713 0.68332 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429687 0.57505 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.452905 0.58161 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434777 0.586467 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436077 0.5989 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447815 0.570193 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.430987 0.587483 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.424596 0.563633 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446515 0.55776 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423296 0.5512 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428387 0.562617 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399007 0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.41723 0.637209 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418027 0.624734 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401533 0.642848 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39821 0.634089 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382513 0.639728 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379986 0.618494 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414703 0.615976 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39648 0.600381 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4155 0.603501 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379835 0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.396248 0.547099 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403175 0.557504 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388263 0.569716 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372907 0.539659 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.364922 0.562276 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356494 0.542624 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387819 0.527447 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371406 0.530412 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.394747 0.537852 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389119 0.547576 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.410169 0.541008 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405866 0.564748 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410472 0.548718 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393422 0.523836 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393725 0.531546 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372372 0.530405 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388816 0.539866 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367766 0.546435 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384513 0.563607 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340934 0.501272 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320279 0.506807 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340934 0.501272 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317871 0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.296626 0.555534 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307914 0.550163 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297216 0.572202 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306582 0.572037 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307172 0.588706 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.327827 0.583171 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31728 0.549999 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338525 0.561133 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328569 0.544629 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.142305 0.674191 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.144155 0.692502 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150298 0.696439 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164554 0.682184 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136163 0.670254 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156561 0.659936 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.134313 0.651943 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121907 0.684509 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120057 0.666199 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12805 0.688447 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0847178 0.680265 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104191 0.675047 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.107387 0.686972 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0815225 0.66834 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104191 0.675047 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0978007 0.651197 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0783272 0.656415 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0946054 0.639272 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0978007 0.651197 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.160081 0.738169 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177224 0.721891 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165299 0.718696 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136231 0.731779 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141449 0.712305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.129524 0.70911 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.148156 0.734974 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141449 0.712305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165299 0.718696 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213855 0.655019 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.213517 0.662308 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.194382 0.649801 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198584 0.673065 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23299 0.667526 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218058 0.678283 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233329 0.660237 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228788 0.644262 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229127 0.636974 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209653 0.631756 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.23918 0.710584 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233654 0.687599 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.216195 0.705059 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23045 0.719314 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207465 0.713788 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.216195 0.705059 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24791 0.701855 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233654 0.687599 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242384 0.678869 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.266765 0.631486 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247291 0.636704 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250487 0.648629 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26357 0.619561 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247291 0.636704 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240901 0.612854 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260374 0.607636 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237705 0.600929 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240901 0.612854 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161477 0.602641 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.162741 0.579817 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179523 0.58737 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156259 0.583168 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144695 0.595088 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138214 0.598439 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.143431 0.617912 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167958 0.59929 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166695 0.622115 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184741 0.606843 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.208861 0.556122 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215568 0.578791 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203643 0.575596 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185011 0.549732 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179793 0.569205 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167868 0.56601 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196936 0.552927 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179793 0.569205 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203643 0.575596 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.105912 0.577317 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128897 0.582843 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111438 0.600302 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0971825 0.586046 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102708 0.609032 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111438 0.600302 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.114642 0.568587 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128897 0.582843 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.137627 0.574113 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0955788 0.852418 9.1293e-17 RAD 0.0555556 + txt002 + SPHERE CENTER 0.11107 0.922609 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.122151 0.937225 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131874 0.915202 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11086 0.916553 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101346 0.944632 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.090055 0.92396 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0902645 0.930016 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12236 0.943281 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111279 0.928665 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.132084 0.921258 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164775 0.877966 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.182656 0.890926 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167676 0.876622 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159019 0.897331 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179755 0.89227 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156118 0.898675 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161874 0.87931 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188412 0.871561 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.17053 0.8586 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173431 0.857256 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135698 0.867231 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.134634 0.873196 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11765 0.858152 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117797 0.882112 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152682 0.882275 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135845 0.89119 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153747 0.876309 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152536 0.858315 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.1536 0.852349 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135552 0.843271 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0418734 0.897062 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0359958 0.920407 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511067 0.915603 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0588574 0.912106 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0267625 0.901866 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496241 0.893565 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0326401 0.878521 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0190117 0.905363 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0248894 0.882018 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0341227 0.900559 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0665023 0.841683 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0454909 0.840284 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0463379 0.831823 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0473735 0.856111 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0656554 0.850144 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0675379 0.865971 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0866667 0.851543 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646197 0.825856 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0856311 0.827255 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0654667 0.817395 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0263827 0.826871 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00436945 0.825102 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.025051 0.823964 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.018173 0.84533 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00570109 0.828008 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0195047 0.848237 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0277143 0.829777 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0125791 0.806642 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0345923 0.808411 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0332607 0.805505 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0709499 0.907797 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0752104 0.930963 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0941344 0.915684 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0806562 0.924191 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0520258 0.923076 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0574717 0.916304 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0477654 0.89991 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0655041 0.914568 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0612436 0.891402 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0844281 0.899289 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0554592 0.837606 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0523913 0.842832 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0750766 0.842434 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0593957 0.86055 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0327739 0.838004 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0397783 0.855722 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0358417 0.832778 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0484547 0.819888 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0515226 0.814662 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.07114 0.81949 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124655 0.863153 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.141535 0.875744 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.146389 0.868763 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.129819 0.88655 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119801 0.870135 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108085 0.880941 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102922 0.857544 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136371 0.852347 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119492 0.839756 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141225 0.845366 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0133465 0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0646815 0.745859 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0684873 0.770032 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0507391 0.762305 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0481266 0.759394 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0824297 0.753586 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.062069 0.742948 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0786239 0.729413 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0850422 0.756497 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0812364 0.732325 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.067294 0.74877 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0347427 0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0299763 0.758864 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0114021 0.745277 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0263144 0.757489 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0533169 0.751424 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0496549 0.750049 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0580833 0.730397 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0384047 0.739212 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.043171 0.718185 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0198304 0.725625 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0179281 0.782939 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00272662 0.788473 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0179281 0.782939 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0432853 0.701782 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0544915 0.717566 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0588496 0.718734 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0368947 0.725632 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0389272 0.700615 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0213304 0.708681 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.027721 0.684831 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0608821 0.693716 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0496759 0.677932 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0652402 0.694884 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0272215 0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0280589 0.725055 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0172649 0.70473 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00656677 0.726768 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0380155 0.741558 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0165234 0.743272 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0371781 0.737738 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0487136 0.71952 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0478762 0.715699 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0379196 0.699195 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00804971 0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0275193 0.640422 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0283337 0.66342 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0287044 0.644149 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00723527 0.626685 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00842045 0.630413 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0122343 0.635947 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00686453 0.645956 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.012605 0.655218 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00767898 0.668955 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0838533 0.674309 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.106805 0.675276 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0875713 0.673094 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.091423 0.694308 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103087 0.676491 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0877049 0.695522 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0801352 0.675524 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0992356 0.655278 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0762835 0.65431 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0800016 0.653095 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0308513 0.600892 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051506 0.606426 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308513 0.600892 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0539145 0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0577732 0.666927 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.034894 0.669407 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0513875 0.68752 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0767937 0.663807 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.070408 0.6844 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.072935 0.663167 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0603001 0.645694 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0564414 0.645053 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0374209 0.648173 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0133465 0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0440268 0.740325 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0417568 0.762259 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0216407 0.748937 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0345526 0.759495 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0641429 0.753646 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0569387 0.750882 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0664129 0.731712 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051231 0.743089 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053501 0.721155 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0311149 0.729767 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0272215 0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0454452 0.736829 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.046242 0.724354 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0297485 0.742467 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0264247 0.733709 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.010728 0.739347 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00820099 0.718114 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0429182 0.715595 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0246945 0.7 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.043715 0.70312 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0179281 0.782939 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00272662 0.788473 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0179281 0.782939 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0845947 0.712851 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.101422 0.730141 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0832945 0.725284 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0782041 0.736701 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.102723 0.717709 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0795043 0.724268 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0858949 0.700418 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107813 0.706291 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0909853 0.689001 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0896851 0.701434 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0347427 0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0269197 0.752567 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0144587 0.751574 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.014088 0.732303 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0472037 0.73883 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0343719 0.718566 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0550267 0.7241 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0475745 0.758102 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0553974 0.743371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0351134 0.757108 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0539145 0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0751594 0.655153 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0638711 0.649783 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745692 0.671821 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0652028 0.671657 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0646126 0.688325 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0439578 0.682791 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0545047 0.649619 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0332597 0.660752 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0432164 0.644249 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0631985 0.668775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0708196 0.669983 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0467378 0.671462 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0618185 0.690113 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0872804 0.667296 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0782793 0.687426 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0796593 0.666087 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0721997 0.648644 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0645786 0.647436 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0481178 0.650123 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0308513 0.600892 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051506 0.606426 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308513 0.600892 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00804971 0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0244627 0.646718 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0313903 0.657124 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.016478 0.669336 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00112207 0.639278 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00686255 0.661896 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0152909 0.642244 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0160343 0.627066 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.000378614 0.630031 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.022962 0.637471 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281471 0.802608 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.329459 0.858698 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.34259 0.872345 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338969 0.848329 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32016 0.86421 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333079 0.882715 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310649 0.87458 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.319948 0.869068 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351888 0.866833 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338757 0.853186 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348268 0.842817 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337088 0.798572 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.346884 0.808673 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322361 0.807762 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335792 0.82298 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.361611 0.799483 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350519 0.81379 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351815 0.789382 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34818 0.784265 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338384 0.774164 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.323657 0.783355 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280879 0.845371 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.291048 0.849036 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304882 0.840755 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287867 0.826067 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267046 0.853652 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263865 0.830683 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.256877 0.849987 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28406 0.868341 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273891 0.864676 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297894 0.86006 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273842 0.862735 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282313 0.885497 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29787 0.867718 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281455 0.876946 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258284 0.880514 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257427 0.871963 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249813 0.857752 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.274699 0.871286 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266228 0.848523 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290257 0.853506 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225263 0.849407 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.21889 0.873186 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236437 0.866351 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240865 0.865588 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207715 0.856242 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22969 0.848644 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214088 0.832464 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203288 0.857005 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20966 0.833227 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220835 0.850171 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225855 0.806645 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.21762 0.818054 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241754 0.813612 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230661 0.83061 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20172 0.811087 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214761 0.823642 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209955 0.799677 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212813 0.794089 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221048 0.78268 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236948 0.789647 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330051 0.815936 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.350165 0.828769 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347547 0.820583 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333232 0.838905 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332668 0.824121 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315735 0.834258 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312554 0.811288 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346984 0.805799 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32687 0.792966 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.344366 0.797614 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282063 0.759846 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.29233 0.756464 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305929 0.765125 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288514 0.779336 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268464 0.751185 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264649 0.774058 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258198 0.754567 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285879 0.736973 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275612 0.740355 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299478 0.745634 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33768 0.75581 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.362219 0.753851 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352319 0.76987 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350765 0.774086 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347581 0.739791 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336127 0.760026 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.323042 0.74175 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.349134 0.735575 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324595 0.737534 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339233 0.751594 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202787 0.674191 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.219248 0.690652 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223862 0.677807 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206403 0.695267 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198172 0.687036 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185327 0.691651 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181711 0.670575 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215632 0.669577 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.199171 0.653116 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220246 0.656732 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.261725 0.675225 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238562 0.683777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261725 0.675225 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238562 0.683777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267259 0.65457 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249631 0.642468 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249631 0.642468 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.203821 0.733129 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212373 0.709966 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183166 0.738664 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171063 0.721035 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171063 0.721035 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203821 0.733129 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212373 0.709966 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131237 0.655019 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.12881 0.668451 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.151296 0.662426 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.137627 0.678869 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108751 0.661044 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117567 0.671463 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111177 0.647613 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12242 0.644601 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124846 0.631169 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144906 0.638576 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.115992 0.720665 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135288 0.711449 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135288 0.711449 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100872 0.705544 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105047 0.681209 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100872 0.705544 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105047 0.681209 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0796777 0.626446 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0954616 0.645433 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0796777 0.626446 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0954616 0.645433 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0852121 0.605791 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10653 0.604124 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10653 0.604124 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183615 0.602641 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.197046 0.600215 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207465 0.609032 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191021 0.622701 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173196 0.593824 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167171 0.61631 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159765 0.596251 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18964 0.580155 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176209 0.582581 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200059 0.588972 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.155041 0.551082 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174029 0.566866 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.134387 0.556617 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13272 0.577935 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13272 0.577935 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.155041 0.551082 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174029 0.566866 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.24926 0.587397 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240045 0.606693 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240045 0.606693 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23414 0.572277 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209804 0.576452 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23414 0.572277 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209804 0.576452 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358439 0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.428945 0.613592 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.448155 0.626191 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43276 0.614455 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42519 0.634643 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44434 0.625328 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.421375 0.63378 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42513 0.612729 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45191 0.60514 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4327 0.592541 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436515 0.593404 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399007 0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399844 0.625435 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38905 0.60511 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378352 0.627149 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409801 0.641939 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388308 0.643653 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408963 0.638118 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420499 0.619901 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419661 0.61608 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409705 0.599576 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389713 0.68332 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369058 0.688854 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389713 0.68332 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388377 0.586119 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.405974 0.594185 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410332 0.593017 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.394768 0.609969 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384019 0.587286 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372813 0.60307 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366422 0.57922 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399584 0.570335 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.381987 0.562269 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403942 0.569167 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337042 0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.341809 0.659244 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360383 0.645657 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345471 0.65787 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318468 0.651804 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32213 0.65043 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313702 0.630777 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33338 0.639592 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328614 0.618565 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351955 0.626005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317871 0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314012 0.567308 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336891 0.569787 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320398 0.587901 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294991 0.564188 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301377 0.584781 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29885 0.563547 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.311485 0.546074 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315344 0.545434 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334364 0.548554 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409774 0.542042 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.433888 0.53788 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426423 0.55574 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423551 0.558395 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.417238 0.524182 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406901 0.544697 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393124 0.528344 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42011 0.521526 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.395996 0.525689 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.412646 0.539387 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340934 0.501272 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320279 0.506807 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340934 0.501272 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379835 0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399304 0.540802 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400119 0.563801 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400489 0.54453 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37902 0.527065 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380205 0.530793 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359551 0.536327 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37865 0.546337 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.35918 0.555599 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379464 0.569335 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371785 0.0996195 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER -0.393621 0.220501 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.368601 0.279642 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.354293 0.299716 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347717 0.279022 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366989 0.292196 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375177 0.300337 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.387873 0.292817 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389485 0.280263 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355904 0.287162 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.370213 0.267088 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349329 0.266468 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321889 0.238665 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.304702 0.250544 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32307 0.238717 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327715 0.259421 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30352 0.250492 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326533 0.259369 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320707 0.238612 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298875 0.229788 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316063 0.217908 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317244 0.21796 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372464 0.281062 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.362978 0.289441 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35549 0.267771 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378255 0.270044 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379952 0.302733 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395229 0.283335 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389438 0.294353 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357187 0.30046 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366673 0.29208 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349699 0.278789 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440333 0.261479 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.443285 0.282991 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421181 0.271991 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4302 0.282046 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462437 0.27248 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449353 0.271534 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459485 0.250967 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453417 0.262424 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.450466 0.240911 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431313 0.251423 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.444196 0.262898 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.449273 0.285685 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436139 0.282528 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.426189 0.27701 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45733 0.266055 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434246 0.257381 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452254 0.243269 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46728 0.271573 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462204 0.248787 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454146 0.268416 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.465353 0.202338 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.486123 0.204606 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464339 0.202946 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470107 0.223366 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487137 0.203998 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471122 0.222757 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466367 0.201729 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.481368 0.183578 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460599 0.18131 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459584 0.181918 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389758 0.219082 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.378635 0.228779 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.365937 0.225483 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383364 0.24293 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402455 0.222377 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407185 0.236529 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER -0.413578 0.21268 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385029 0.20493 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396152 0.195233 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372331 0.201634 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414778 0.15994 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.412573 0.147477 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39322 0.15977 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412448 0.172167 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434131 0.147647 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434006 0.172338 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436336 0.16011 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414903 0.13525 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417108 0.147713 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39555 0.147543 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343046 0.178104 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.319723 0.177083 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325124 0.189464 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332294 0.198298 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337645 0.165722 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350216 0.186938 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360967 0.166743 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330475 0.156889 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353797 0.157909 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335876 0.16927 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191247 0.166275 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.130089 0.20793 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115471 0.221102 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.126388 0.200597 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13987 0.220766 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119172 0.228435 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143571 0.228099 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13379 0.215264 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10569 0.208266 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120308 0.195095 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116607 0.187762 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154295 0.172673 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.15554 0.180792 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17557 0.171251 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166926 0.19323 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134265 0.182215 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145651 0.194652 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133019 0.174096 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.142909 0.160236 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141663 0.152117 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.162939 0.150694 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192135 0.230419 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.18209 0.243049 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168159 0.227721 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185251 0.218634 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206066 0.245747 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209227 0.221332 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216111 0.233117 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188974 0.254834 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199019 0.242204 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175043 0.239506 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.167041 0.201532 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.151829 0.219088 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14514 0.205084 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163068 0.221861 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173729 0.215537 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.184969 0.218309 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188942 0.197981 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155801 0.19876 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171014 0.181204 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149113 0.184756 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.229087 0.224021 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.22829 0.248268 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207937 0.234532 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216949 0.2391 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249439 0.237756 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238098 0.228589 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250236 0.213509 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240428 0.233189 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241225 0.208942 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220075 0.219453 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228199 0.159877 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.229756 0.167942 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207683 0.16569 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223214 0.183484 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250271 0.162129 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.243729 0.177671 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248714 0.154064 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234741 0.144336 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233184 0.13627 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212668 0.142084 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.129201 0.143787 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.105335 0.14887 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115741 0.153943 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121723 0.167242 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.118795 0.138714 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135183 0.157086 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.142661 0.13363 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.112813 0.125414 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.136679 0.120331 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123219 0.130487 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190359 0.102131 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.179968 0.0897843 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166467 0.105492 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183804 0.114103 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER -0.20386 0.0864233 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207696 0.110742 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214251 0.0987702 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186523 0.0778128 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196914 0.0901597 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173022 0.0935207 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153407 0.108529 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.130858 0.0995811 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135326 0.123725 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134736 0.113639 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER -0.148938 0.0843858 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152816 0.0984435 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171487 0.0933338 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149528 0.0944715 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172078 0.10342 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153997 0.118615 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.277961 0.367156 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.269898 0.374298 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270045 0.350338 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291334 0.362218 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277815 0.391115 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299251 0.379036 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.285878 0.383973 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.256525 0.379235 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264588 0.372093 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.256671 0.355276 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252306 0.297666 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.235688 0.305995 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259438 0.312359 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245915 0.321516 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228556 0.291303 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238783 0.306824 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245173 0.282974 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242079 0.282145 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258696 0.273816 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265828 0.288509 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.32435 0.32435 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33812 0.32066 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32066 0.33812 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3005 0.317959 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29681 0.331729 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29042 0.307879 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317959 0.3005 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307879 0.29042 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331729 0.29681 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339925 0.383759 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.334762 0.407156 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31686 0.392275 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326552 0.388696 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357827 0.39864 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349618 0.380181 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362991 0.375243 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348135 0.402218 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353299 0.378821 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330233 0.387337 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376234 0.330873 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.393346 0.348239 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383366 0.345565 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369843 0.354723 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386213 0.333547 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 0.340031 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369102 0.316181 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399736 0.324389 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382624 0.307023 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389757 0.321715 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376234 0.330873 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.386461 0.346394 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 0.340031 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369843 0.354723 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399983 0.337237 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383366 0.345565 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389757 0.321715 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392851 0.322544 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382624 0.307023 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369102 0.316181 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277961 0.367156 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.261966 0.385852 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259422 0.36581 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.278159 0.38141 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.280504 0.387198 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296698 0.382755 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.2965 0.368501 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261768 0.371598 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277764 0.352901 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259225 0.351556 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.304189 0.32435 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29042 0.32066 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307879 0.33812 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328039 0.317959 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331729 0.331729 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33812 0.307879 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31058 0.3005 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32066 0.29042 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29681 0.29681 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252306 0.297666 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.228803 0.30415 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238783 0.306824 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245915 0.321516 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242326 0.294992 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259438 0.312359 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265828 0.288509 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235194 0.2803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258696 0.273816 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245173 0.282974 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574159 0.153845 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER -0.612768 0.202534 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612732 0.225282 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591695 0.212428 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60221 0.22113 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633805 0.215388 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623283 0.211236 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER -0.63384 0.192641 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62329 0.206686 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623325 0.183939 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602253 0.193832 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543919 0.184086 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.527458 0.200547 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522843 0.187702 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.540303 0.205161 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548533 0.196931 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561378 0.201546 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.564994 0.18047 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531074 0.179472 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.547535 0.163011 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.526459 0.166627 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.542885 0.243024 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534333 0.219861 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563539 0.248559 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575642 0.23093 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575642 0.23093 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542885 0.243024 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534333 0.219861 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643008 0.172294 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER -0.660425 0.189742 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645434 0.185725 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636618 0.196144 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657999 0.17631 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634191 0.182712 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640582 0.158862 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666816 0.165892 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649399 0.148444 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651825 0.161875 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER -0.585228 0.195155 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.574809 0.203972 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561378 0.201546 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568784 0.181486 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598659 0.197581 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592634 0.175095 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609078 0.188764 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591253 0.217641 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601672 0.208824 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577822 0.215215 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6044 0.123605 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.620861 0.107144 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608016 0.102529 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625475 0.119989 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617245 0.128219 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621859 0.141064 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600784 0.14468 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599785 0.11076 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583324 0.127221 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58694 0.106145 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631939 0.130984 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643128 0.132649 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618482 0.133263 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631785 0.152367 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656585 0.130371 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645242 0.150088 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645397 0.128706 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643283 0.111266 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632094 0.109601 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618637 0.11188 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591664 0.0609772 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572676 0.076761 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612319 0.0665116 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613986 0.0878298 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613986 0.0878298 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591664 0.0609772 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572676 0.076761 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56309 0.112536 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549659 0.11011 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53924 0.118927 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555684 0.132596 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573509 0.103719 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579534 0.126205 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58694 0.106145 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557065 0.09005 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570497 0.0924762 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546646 0.0988668 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.494808 0.247614 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.494287 0.313607 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.484182 0.326876 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470513 0.310432 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488171 0.302705 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507957 0.330051 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511946 0.305881 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518062 0.316783 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490299 0.337778 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500404 0.324509 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476629 0.321334 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452978 0.302539 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.436971 0.320401 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436675 0.29902 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.455413 0.3148 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453274 0.32392 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471717 0.318318 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469281 0.306057 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434535 0.30814 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.450543 0.290278 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434239 0.286759 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434629 0.269833 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.426389 0.279233 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445377 0.263449 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448298 0.286276 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415641 0.285616 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43755 0.29266 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42388 0.276216 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41272 0.262789 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420959 0.253389 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431707 0.247006 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536117 0.258683 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549787 0.275127 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549787 0.275127 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529727 0.282533 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536117 0.258683 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516058 0.266089 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522448 0.242239 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556177 0.251277 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542508 0.234833 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556177 0.251277 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476459 0.214908 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.457868 0.209819 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER -0.458164 0.2312 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453963 0.210053 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476163 0.193527 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472258 0.193761 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.494753 0.198616 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480363 0.214674 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498954 0.219763 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480659 0.236055 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536638 0.19269 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549603 0.17251 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528912 0.177908 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549105 0.191778 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557329 0.187292 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556831 0.20656 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544363 0.207471 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537136 0.173421 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524171 0.193601 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516445 0.178819 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554467 0.291389 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.562288 0.314604 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542501 0.306499 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541186 0.310183 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574255 0.299494 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553152 0.295073 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566433 0.276279 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575569 0.29581 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567748 0.272595 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555781 0.287705 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.567359 0.227186 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54267 0.227528 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555283 0.246777 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579676 0.225054 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567601 0.244644 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567305 0.223263 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567063 0.205805 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554691 0.204014 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542374 0.206147 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513157 0.28032 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.507811 0.298839 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489718 0.287442 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505577 0.302049 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531251 0.291716 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529016 0.294927 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536597 0.273198 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515392 0.27711 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER -0.520738 0.258591 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497299 0.265714 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.552323 0.0329639 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.625877 0.0248832 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.646362 0.0316054 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625173 0.0287309 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627981 0.0478 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647066 0.0277577 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628685 0.0439523 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62658 0.0210355 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644258 0.00868865 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623773 0.00196644 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623069 0.00581415 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584567 0.0138144 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.584898 0.0177119 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56353 0.0185345 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.580268 0.0364224 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605935 0.0129918 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601305 0.0317022 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605605 0.00909422 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER -0.589197 -0.00489609 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588867 -0.00879364 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567829 -0.00407348 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.593994 0.105299 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572783 0.0926585 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582384 0.100664 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614541 0.0949359 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602932 0.090301 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613879 0.0719323 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604941 0.0869303 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604278 0.0639267 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58373 0.0742898 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593633 0.0440327 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607302 0.0604766 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607302 0.0604766 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587242 0.0678827 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593633 0.0440327 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573573 0.0514389 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579964 0.0275889 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613693 0.0366265 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600023 0.0201827 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613693 0.0366265 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561087 0.101445 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551884 0.118381 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536664 0.103361 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550745 0.0944221 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576307 0.116465 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575168 0.0925065 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58551 0.0995293 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562225 0.125404 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571428 0.108468 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.547006 0.110383 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER -0.520079 0.0521134 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523344 0.0542684 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534291 0.0358996 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541988 0.0591566 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509132 0.0704822 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER -0.527777 0.0753703 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505868 0.0683272 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501435 0.0472252 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49817 0.0450702 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512382 0.0288565 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584869 -0.0244483 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.5935 -0.0473753 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57344 -0.0399691 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.595617 -0.0308315 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604929 -0.0318545 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607046 -0.0153107 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.596298 -0.00892756 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582752 -0.0409921 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574121 -0.0180651 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562692 -0.0335859 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511316 -0.0163676 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.48882 -0.0212225 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497372 0.00194055 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491256 -0.00896145 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502764 -0.0395307 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505199 -0.0272696 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525259 -0.0346758 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.50888 -0.0286287 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531375 -0.0237738 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517432 -0.00546563 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54356 -0.0355172 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530389 -0.0495897 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519442 -0.031221 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53532 -0.0261165 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554507 -0.0538859 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.559438 -0.0304127 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567678 -0.0398133 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538628 -0.0589904 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.551799 -0.0449178 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.527681 -0.0406217 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451136 0.0058509 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.447081 0.0051487 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.435909 0.01504 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423265 0.0115452 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440694 0.0289993 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459725 0.00864346 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46451 0.0226028 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470897 -0.0012478 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER -0.442297 -0.00881065 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453468 -0.0187019 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.429652 -0.0123054 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386138 0.0172804 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.364644 0.0293677 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375512 0.0213457 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385352 0.0401449 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37527 0.0253024 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395978 0.0360796 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396764 0.0132151 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER -0.36543 0.0065032 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386924 -0.00558411 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376298 -0.00151881 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.439178 0.0688765 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.426942 0.0903221 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416328 0.0699989 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435083 0.0806307 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449792 0.0891998 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.457933 0.0795084 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462029 0.0677542 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431037 0.078568 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER -0.443274 0.0571224 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420423 0.0582447 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512079 -0.00628079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523883 -0.000557006 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49924 -0.00208214 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.51057 0.0165974 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536722 -0.00475566 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523409 0.0123987 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524918 -0.0104794 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525392 -0.0234352 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513588 -0.029159 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500749 -0.0249603 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504176 0.0574471 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.508666 0.0817008 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488971 0.0722467 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489545 0.0732807 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523872 0.0669012 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504751 0.058481 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519382 0.0426474 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523298 0.0658672 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518808 0.0416134 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.503602 0.0564131 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516134 -0.00557859 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.540463 -0.00154892 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.52751 -0.00538221 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524673 0.0156462 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529087 -0.00174531 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513298 0.0154498 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504759 -0.00577498 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531924 -0.0227737 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507596 -0.0268034 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518971 -0.026607 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459039 -0.0578769 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.451803 -0.0707378 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435761 -0.0561039 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454158 -0.0461991 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.475081 -0.0725109 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477435 -0.0479721 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.482316 -0.05965 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.456685 -0.0824157 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46392 -0.0695548 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440643 -0.0677817 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.463094 -0.0571747 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.459563 -0.081612 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.442243 -0.0665888 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.463589 -0.0696122 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480415 -0.0721979 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.48444 -0.0601982 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.483946 -0.0477607 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459069 -0.0691745 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4626 -0.0447373 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.441749 -0.0541513 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398096 -0.0457452 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.373728 -0.0495643 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383722 -0.030137 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382672 -0.0306825 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388102 -0.0651725 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.397047 -0.0462908 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41247 -0.0613535 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389151 -0.064627 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41352 -0.060808 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399146 -0.0451997 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.412497 -0.190929 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400273 -0.174844 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417001 -0.16674 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436523 -0.195071 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.441027 -0.170881 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448325 -0.183127 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419795 -0.203175 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431597 -0.191231 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407571 -0.18709 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.343834 -0.12515 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353814 -0.122476 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360946 -0.107784 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357357 -0.134308 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374468 -0.116942 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380859 -0.140792 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350225 -0.149 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373727 -0.155484 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360204 -0.146326 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.41922 -0.10495 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40545 -0.10864 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42291 -0.0911807 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44307 -0.111341 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44676 -0.0975713 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45315 -0.121421 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425611 -0.128801 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435691 -0.138881 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411841 -0.13249 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.486264 -0.162382 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.502603 -0.174264 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.479659 -0.170327 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.495376 -0.15142 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509207 -0.166319 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501981 -0.143475 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.492868 -0.154437 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49349 -0.185226 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477151 -0.173345 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470546 -0.18129 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.501491 -0.082906 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477742 -0.0892696 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484874 -0.0745774 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515014 -0.0920638 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498397 -0.0837352 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504787 -0.107585 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507882 -0.106756 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497655 -0.122277 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484132 -0.11312 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.508376 -0.0810612 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498397 -0.0837352 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484874 -0.0745774 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501244 -0.0957534 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477742 -0.0892696 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484132 -0.11312 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514767 -0.104911 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497655 -0.122277 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504787 -0.107585 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.411775 -0.200165 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399922 -0.179342 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415187 -0.189948 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436152 -0.199808 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.439564 -0.189591 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448677 -0.178629 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420888 -0.189202 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.433412 -0.168023 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409035 -0.168379 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.439381 -0.10495 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45315 -0.10864 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435691 -0.0911807 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415531 -0.111341 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411841 -0.0975713 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40545 -0.121421 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43299 -0.128801 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42291 -0.138881 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44676 -0.13249 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.350719 -0.123305 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374468 -0.116942 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360946 -0.107784 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343587 -0.137998 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353814 -0.122476 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360204 -0.146326 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357109 -0.147155 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373727 -0.155484 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380859 -0.140792 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248762 -0.0483751 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.183785 -0.0599222 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.160406 -0.0522053 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171954 -0.0513956 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178533 -0.0358698 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172236 -0.0607319 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190363 -0.0443964 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195615 -0.0684488 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165658 -0.0762577 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189036 -0.0839747 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177206 -0.075448 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.187119 -0.0172857 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.176731 -0.00705049 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192673 -0.025725 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200733 -0.00352517 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171177 0.00138875 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195179 0.00491406 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.181564 -0.00884647 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163117 -0.020811 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173504 -0.0310463 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179058 -0.0394855 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215921 0.00673113 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.20044 0.0258737 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196602 0.00551963 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215612 0.0203763 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21976 0.0270852 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234932 0.0215878 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235241 0.00794264 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200749 0.0122285 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21623 -0.00691403 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196911 -0.00812553 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245428 -0.0910116 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.234308 -0.0942304 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.221514 -0.0854464 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238704 -0.0714204 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258223 -0.0997955 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262619 -0.0769856 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269343 -0.0965768 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241032 -0.113822 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252152 -0.110603 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228237 -0.105038 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277564 -0.0243582 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.275459 -0.0076281 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.255218 -0.0167139 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270078 -0.00142185 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297806 -0.0152725 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.292425 -0.00906621 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299911 -0.0320026 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282946 -0.0305645 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.285051 -0.0472946 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262704 -0.0396503 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.310405 -0.0794645 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.324811 -0.0817333 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300317 -0.0800146 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.313378 -0.0603366 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.334899 -0.0811832 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.323466 -0.0597864 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320493 -0.0789143 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321838 -0.100861 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307433 -0.0985923 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297345 -0.0991425 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216626 -0.115028 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.195663 -0.127519 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194866 -0.104303 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201738 -0.108803 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.217423 -0.138245 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223497 -0.119529 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238386 -0.125754 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210551 -0.133744 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.231514 -0.121254 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209754 -0.110528 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281603 -0.103481 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.291073 -0.126206 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271345 -0.119897 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293457 -0.110246 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301332 -0.10979 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.303716 -0.0938302 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291862 -0.0870656 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.279219 -0.119442 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269749 -0.0967168 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.25949 -0.113132 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21996 -0.0723919 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.20388 -0.0673141 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216456 -0.0490355 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.198742 -0.0609052 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207384 -0.0906706 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202246 -0.0842617 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223463 -0.0957484 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225098 -0.0788008 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241177 -0.0838786 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.237674 -0.0605222 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.508983 0.690426 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.484794 0.755941 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.47411 0.767658 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.467528 0.744501 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489758 0.749038 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491377 0.779098 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507025 0.760478 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502061 0.767382 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469146 0.774562 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.47983 0.762845 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462564 0.751405 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436283 0.7029 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.418941 0.714226 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43889 0.704751 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44101 0.724842 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416335 0.712374 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.438403 0.722991 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.433677 0.701048 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414215 0.692283 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431557 0.680957 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434163 0.682808 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478434 0.695668 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.481931 0.703418 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500827 0.694124 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491475 0.716184 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459538 0.704962 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469082 0.717727 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.456041 0.697211 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46889 0.682902 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.465393 0.675152 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487786 0.673608 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557494 0.743468 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.560084 0.767402 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543179 0.760285 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53997 0.755145 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574398 0.750585 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554284 0.738328 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571808 0.726651 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577608 0.755725 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575017 0.731791 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560703 0.748608 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.551134 0.683194 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.573364 0.687731 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571303 0.682033 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56324 0.703871 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553195 0.688893 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543071 0.705033 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530964 0.684356 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561258 0.667055 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539027 0.662518 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.559196 0.661356 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581682 0.677953 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.601808 0.682851 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579842 0.680568 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58454 0.700216 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603648 0.680237 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58638 0.697602 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583522 0.675339 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59895 0.660588 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.578824 0.65569 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576984 0.658304 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515343 0.7507 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.506594 0.773394 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491321 0.755462 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507924 0.764807 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530616 0.768632 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531946 0.760045 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539365 0.745938 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514012 0.759287 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522762 0.736593 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49874 0.741355 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539531 0.685185 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.538818 0.693658 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517905 0.691194 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534075 0.708875 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560445 0.687649 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555702 0.702866 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561158 0.679176 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544274 0.669969 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544988 0.661495 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523361 0.667505 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466832 0.697658 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.447385 0.709346 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447429 0.703286 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46231 0.721188 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466788 0.703718 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.481713 0.71556 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.486235 0.692031 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451907 0.685816 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471354 0.674129 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451951 0.679757 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335322 0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.283164 0.659645 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.269894 0.672915 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.275822 0.649528 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293281 0.666987 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277236 0.683032 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300624 0.677104 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290507 0.669762 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259777 0.665573 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273047 0.652302 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265705 0.642185 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.286452 0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.279361 0.614273 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.303327 0.613293 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.288206 0.628413 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262487 0.604959 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271332 0.619099 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269578 0.594664 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277607 0.589839 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.284698 0.579544 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301572 0.588858 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33883 0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.328536 0.663448 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314396 0.654603 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.329516 0.639482 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35297 0.665202 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353951 0.641237 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.363265 0.658111 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33785 0.680322 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348145 0.673232 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32371 0.671477 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332034 0.663153 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.321274 0.684748 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.308341 0.666888 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326131 0.678752 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344967 0.681014 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349824 0.675018 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355727 0.659419 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327177 0.669149 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337937 0.647554 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314244 0.651289 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.391875 0.684201 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384191 0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.389739 0.622198 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366159 0.617804 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378964 0.63493 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407771 0.61539 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396997 0.628121 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402224 0.604188 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394966 0.598265 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389418 0.587062 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371386 0.593871 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.279656 0.610775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258061 0.621535 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264057 0.616678 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.275921 0.634468 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.27366 0.615632 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29152 0.628565 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295255 0.604872 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261795 0.597842 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.28339 0.587082 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267791 0.592985 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331813 0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.320611 0.55307 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30788 0.563845 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325005 0.57665 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344544 0.547843 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348938 0.571423 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355747 0.553391 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327419 0.535038 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338621 0.540585 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314688 0.545813 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258608 0.550934 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335322 0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.313405 0.629404 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.316595 0.626214 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318408 0.606941 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335868 0.624401 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.311592 0.648676 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330864 0.646863 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.308402 0.651867 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.294133 0.631217 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290942 0.634407 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295946 0.611945 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331813 0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.319608 0.539107 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307378 0.556863 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.322499 0.541743 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344043 0.540862 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346933 0.543497 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356248 0.560372 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328923 0.555982 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.341128 0.575492 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316693 0.573738 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384191 0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.403702 0.623201 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401066 0.62031 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385946 0.635431 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386827 0.613886 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369071 0.626116 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367317 0.601681 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401947 0.598766 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382437 0.586561 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399312 0.595876 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316914 0.678274 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.305407 0.69384 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296616 0.671002 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317721 0.674446 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325704 0.701111 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338018 0.681717 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337211 0.685545 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3046 0.697667 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316107 0.682101 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295809 0.67483 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.391875 0.684201 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33883 0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.329538 0.677411 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314897 0.661584 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332022 0.674389 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353472 0.672184 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355956 0.669162 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362764 0.65113 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336346 0.659378 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.345639 0.638325 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321705 0.643552 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264535 0.625895 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.248969 0.637402 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.268363 0.625088 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271807 0.646193 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245142 0.638209 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267979 0.647 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.260708 0.626702 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241698 0.617105 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.257264 0.605598 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261092 0.604791 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.286452 0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.265398 0.613271 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.26842 0.610787 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281225 0.627912 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.283431 0.606463 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299257 0.621104 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.304484 0.59717 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270625 0.589337 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291679 0.580045 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273647 0.586853 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258608 0.550934 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645066 0.554344 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.681385 0.616373 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.678928 0.639472 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661636 0.629767 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664108 0.621631 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698678 0.626079 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683858 0.608237 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701135 0.602979 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696205 0.634214 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698662 0.611115 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678912 0.624508 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649723 0.609912 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.640648 0.631982 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625749 0.614812 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64267 0.62585 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664623 0.627081 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666645 0.620949 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673698 0.605012 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647702 0.616044 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656777 0.593974 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632802 0.598874 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607573 0.617144 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.595495 0.63057 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594239 0.605919 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615286 0.617371 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608828 0.641795 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628619 0.628595 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.620906 0.628369 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587782 0.630343 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59986 0.616917 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586526 0.605692 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676727 0.560805 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.689897 0.57563 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693998 0.575587 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673115 0.585222 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672626 0.560848 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655844 0.57044 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659456 0.546023 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693509 0.551213 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680339 0.536388 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69761 0.55117 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602915 0.561576 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602201 0.570049 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623084 0.560414 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615021 0.582252 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582032 0.571211 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594852 0.583414 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582745 0.562738 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.590095 0.549372 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.590808 0.540899 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610978 0.539737 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640408 0.498776 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.627785 0.478525 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615951 0.497935 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630799 0.484234 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.652241 0.479365 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655255 0.485075 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664864 0.499616 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637394 0.493066 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650016 0.513317 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62556 0.512476 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718878 0.553573 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.73992 0.563328 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.720935 0.559693 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719679 0.577348 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737863 0.557208 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717623 0.571228 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.716821 0.547453 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739118 0.539553 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718076 0.529798 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.720133 0.535918 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682558 0.491544 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.688647 0.474542 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666351 0.485132 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.686417 0.498226 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.704854 0.480953 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702624 0.504637 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698765 0.497955 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684788 0.46786 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678699 0.484862 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662492 0.47845 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687216 0.547112 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.690713 0.554862 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.667813 0.552739 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682694 0.570641 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.710116 0.549235 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702097 0.565014 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.706619 0.541484 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.695235 0.531333 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691738 0.523582 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672335 0.52921 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.501645 0.501645 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.499795 0.519956 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.493653 0.523893 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.479397 0.509638 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507788 0.497708 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.48739 0.48739 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509638 0.479397 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522043 0.511963 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523893 0.493653 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515901 0.515901 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.559233 0.507719 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539759 0.502501 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536564 0.514426 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562428 0.495794 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539759 0.502501 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54615 0.478651 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.565623 0.483869 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549345 0.466726 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54615 0.478651 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.483869 0.565623 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466726 0.549345 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478651 0.54615 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507719 0.559233 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502501 0.539759 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514426 0.536564 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.495794 0.562428 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502501 0.539759 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478651 0.54615 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430095 0.482473 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.430434 0.489762 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449569 0.477255 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445366 0.500519 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41096 0.49498 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425893 0.505737 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410622 0.487691 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415162 0.471716 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414824 0.464428 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434297 0.45921 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.523783 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.404771 0.538038 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410297 0.515053 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 0.532513 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4135 0.546768 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436486 0.541242 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 0.532513 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396041 0.529309 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410297 0.515053 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401567 0.506323 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.377186 0.45894 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396659 0.464158 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393464 0.476083 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380381 0.447015 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396659 0.464158 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40305 0.440308 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383576 0.43509 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406245 0.428383 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40305 0.440308 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.482473 0.430095 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.48121 0.407271 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464428 0.414824 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487691 0.410622 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499256 0.422542 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505737 0.425893 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500519 0.445366 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.475992 0.426744 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477255 0.449569 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45921 0.434297 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.43509 0.383576 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428383 0.406245 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440308 0.40305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45894 0.377186 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464158 0.396659 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476083 0.393464 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447015 0.380381 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464158 0.396659 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440308 0.40305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.538038 0.404771 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515053 0.410297 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532513 0.427756 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546768 0.4135 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541242 0.436486 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532513 0.427756 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529309 0.396041 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515053 0.410297 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.506323 0.401567 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607487 0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.659645 0.283164 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.672915 0.269894 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649528 0.275822 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666987 0.293281 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683032 0.277236 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.677104 0.300624 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669762 0.290507 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665573 0.259777 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.652302 0.273047 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642185 0.265705 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603979 0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.592776 0.280905 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.580045 0.291679 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59717 0.304484 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61671 0.275678 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621104 0.299257 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627912 0.281225 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599585 0.262872 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610787 0.26842 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586853 0.273647 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656357 0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661904 0.350033 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638325 0.345639 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65113 0.362764 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679937 0.343224 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669162 0.355956 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674389 0.332022 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.667131 0.326099 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661584 0.314897 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643552 0.321705 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663153 0.332034 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.685865 0.340177 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679339 0.33606 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669651 0.355123 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669679 0.336151 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653465 0.351097 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646968 0.328008 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679367 0.317089 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656656 0.308945 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672841 0.312971 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.664041 0.412036 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610996 0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.600701 0.391282 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586561 0.382437 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601681 0.367317 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625136 0.393037 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626116 0.369071 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.635431 0.385946 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610016 0.408157 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62031 0.401066 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.595876 0.399312 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610775 0.279656 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602632 0.256944 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587686 0.273158 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606749 0.26347 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62572 0.263442 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.629838 0.269968 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633864 0.286153 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606658 0.27313 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614801 0.295841 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591712 0.289344 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558618 0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551527 0.342108 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575492 0.341128 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560372 0.356248 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534652 0.332793 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543497 0.346933 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541743 0.322499 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549772 0.317673 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556863 0.307378 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573738 0.316693 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530773 0.278768 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645066 0.554344 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668521 0.610229 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.663938 0.633406 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64522 0.617928 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65892 0.626429 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687239 0.625707 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682221 0.61873 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691822 0.602531 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673539 0.617206 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678123 0.59403 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654822 0.601728 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598918 0.585648 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.580238 0.601562 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581665 0.587563 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59781 0.605914 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.597491 0.599646 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615063 0.603999 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616171 0.583732 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581346 0.581295 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600026 0.565381 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582773 0.567297 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619787 0.622977 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.608008 0.63767 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601637 0.613891 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623239 0.620102 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626157 0.646756 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641389 0.629188 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637936 0.632063 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604555 0.640545 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616334 0.625852 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598184 0.616766 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.714669 0.578925 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.729812 0.597914 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711617 0.592661 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70632 0.602084 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732864 0.584178 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709372 0.588348 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.71772 0.565189 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.738161 0.574755 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723017 0.555767 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719965 0.569503 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665934 0.591673 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.658095 0.605761 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647455 0.607672 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643855 0.58746 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676573 0.589763 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662334 0.571461 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684413 0.575674 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680174 0.609975 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688013 0.595887 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669535 0.611885 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691213 0.52304 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.712906 0.511567 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.699372 0.507717 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.710453 0.529503 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.704747 0.526889 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702295 0.544826 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683054 0.538362 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693665 0.505104 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671972 0.516576 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680131 0.501254 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6938 0.541596 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.70016 0.547376 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676324 0.546319 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690564 0.564621 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717636 0.542652 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70804 0.559898 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711276 0.536873 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.703396 0.524351 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.697037 0.518571 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679561 0.523294 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.670344 0.48571 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.67091 0.466887 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650637 0.480853 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671107 0.490138 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690617 0.471745 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690815 0.494995 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690052 0.490567 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.670147 0.46246 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669581 0.481283 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649874 0.476425 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624197 0.517014 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.60809 0.516313 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60089 0.524375 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616221 0.538029 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631397 0.508952 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639529 0.530668 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647504 0.509653 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616065 0.495298 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632172 0.495999 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608865 0.50336 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607487 0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.629404 0.313405 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.626214 0.316595 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606941 0.318408 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624401 0.335868 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648676 0.311592 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646863 0.330864 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651867 0.308402 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631217 0.294133 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634407 0.290942 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.611945 0.295946 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558618 0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.537564 0.341105 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.540585 0.338621 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553391 0.355747 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555596 0.334297 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571423 0.348938 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57665 0.325005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542791 0.317172 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563845 0.30788 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545813 0.314688 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610996 0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.601704 0.405245 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587062 0.389418 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604188 0.402224 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625637 0.400018 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628121 0.396997 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.63493 0.378964 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608512 0.387213 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617804 0.366159 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593871 0.371386 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678274 0.316914 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.697473 0.31938 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674538 0.318074 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681812 0.338182 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701209 0.31822 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.685547 0.337022 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682009 0.315754 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693935 0.298112 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674736 0.295646 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671 0.296805 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.664041 0.412036 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656357 0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.675867 0.351035 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673232 0.348145 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.658111 0.363265 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.658993 0.341721 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641237 0.353951 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639482 0.329516 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674113 0.3266 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654603 0.314396 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671477 0.32371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625895 0.264535 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.623429 0.245336 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604627 0.260997 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624736 0.268271 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644697 0.248874 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646004 0.271809 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647163 0.268073 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624589 0.2416 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627055 0.2608 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605787 0.257262 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603979 0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591774 0.266942 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579544 0.284698 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594664 0.269578 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616209 0.268696 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619099 0.271332 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628413 0.288206 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601088 0.283817 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613293 0.303327 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588858 0.301572 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530773 0.278768 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.441164 0.501645 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.424703 0.518106 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420089 0.505261 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.437548 0.522721 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445778 0.51449 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.458623 0.519105 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462239 0.498029 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428319 0.497031 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44478 0.48057 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423704 0.484186 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.382226 0.502679 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405389 0.511231 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382226 0.502679 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405389 0.511231 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376691 0.482024 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39432 0.469922 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39432 0.469922 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.44013 0.560583 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431578 0.53742 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460785 0.566118 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472887 0.548489 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472887 0.548489 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44013 0.560583 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431578 0.53742 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512714 0.482473 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.51514 0.495905 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.492654 0.48988 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.506323 0.506323 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5352 0.488498 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.526383 0.498917 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532774 0.475067 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.521531 0.472055 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519105 0.458623 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499045 0.46603 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.527958 0.548119 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.508662 0.538903 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.508662 0.538903 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543078 0.532998 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538903 0.508662 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543078 0.532998 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538903 0.508662 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.564273 0.4539 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548489 0.472887 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.564273 0.4539 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548489 0.472887 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558738 0.433245 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53742 0.431578 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53742 0.431578 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460336 0.430095 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.446904 0.427669 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436486 0.436486 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45293 0.450155 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470754 0.421278 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.47678 0.443764 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484186 0.423704 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454311 0.407609 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.467742 0.410035 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.443892 0.416426 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.488909 0.378536 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469922 0.39432 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509564 0.384071 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511231 0.405389 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511231 0.405389 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488909 0.378536 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469922 0.39432 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.39469 0.414851 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403906 0.434147 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403906 0.434147 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409811 0.399731 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434147 0.403906 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409811 0.399731 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434147 0.403906 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.835815 -0.157543 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.871646 -0.122136 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.871334 -0.102403 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.850164 -0.113406 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862937 -0.100577 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.892817 -0.111133 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884419 -0.109307 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.893129 -0.130866 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880044 -0.123961 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880356 -0.143694 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858873 -0.134964 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.799077 -0.135649 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.781177 -0.120908 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.778973 -0.13149 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.795477 -0.113462 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.801282 -0.125067 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.815582 -0.11762 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819182 -0.139808 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.784778 -0.143095 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802678 -0.157836 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782573 -0.153678 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82339 -0.0854653 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.811594 -0.0654286 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80102 -0.0876595 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.820516 -0.0820122 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.833964 -0.0632344 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842886 -0.079818 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.845761 -0.083271 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.814468 -0.0688817 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.826265 -0.0889183 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803895 -0.0911125 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908384 -0.14403 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.926643 -0.128672 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.90826 -0.133221 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904034 -0.1198 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.926768 -0.139481 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904159 -0.130608 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908508 -0.154838 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.930993 -0.152902 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.912733 -0.16826 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.912609 -0.157451 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860128 -0.107359 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.853284 -0.0905999 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.839638 -0.0940331 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840233 -0.111382 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.873773 -0.103926 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860723 -0.124708 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880618 -0.120685 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.873178 -0.086577 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880022 -0.103336 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859532 -0.0900102 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872552 -0.179437 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.894035 -0.188167 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885777 -0.195141 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.89378 -0.172046 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880811 -0.172463 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880556 -0.156342 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859328 -0.163733 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872807 -0.195558 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.851325 -0.186828 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.864549 -0.202532 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884071 -0.194213 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.891905 -0.197746 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867957 -0.193701 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884286 -0.175383 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908019 -0.198259 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900401 -0.175896 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900186 -0.194726 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.89169 -0.216576 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.883856 -0.213043 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867741 -0.212531 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84824 -0.229621 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.843832 -0.25245 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.826426 -0.235043 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.846687 -0.233837 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.865646 -0.247028 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868501 -0.228415 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.870053 -0.224198 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.845385 -0.248234 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.849792 -0.225404 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.827978 -0.230827 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.811502 -0.207727 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.794108 -0.212743 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.788345 -0.199907 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802328 -0.189621 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.817265 -0.220563 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825486 -0.197441 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.83466 -0.215547 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803282 -0.230849 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.820676 -0.225832 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797518 -0.218012 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.61371 -0.142305 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.597249 -0.125845 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592635 -0.138689 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610094 -0.12123 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618324 -0.12946 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631169 -0.124846 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634785 -0.145921 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600865 -0.14692 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617326 -0.163381 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.596251 -0.159765 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.554772 -0.141271 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577935 -0.13272 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554772 -0.141271 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577935 -0.13272 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549237 -0.161926 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566866 -0.174029 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566866 -0.174029 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612676 -0.0833673 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604124 -0.10653 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633331 -0.0778329 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645433 -0.0954616 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645433 -0.0954616 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612676 -0.0833673 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604124 -0.10653 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68526 -0.161477 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687686 -0.148046 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6652 -0.154071 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678869 -0.137627 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.707746 -0.155452 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698929 -0.145033 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70532 -0.168883 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694077 -0.171896 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691651 -0.185327 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671591 -0.177921 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.700504 -0.095832 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681209 -0.105047 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681209 -0.105047 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715624 -0.110952 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711449 -0.135288 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715624 -0.110952 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711449 -0.135288 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.736819 -0.190051 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721035 -0.171063 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.736819 -0.190051 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721035 -0.171063 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.731284 -0.210706 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709966 -0.212373 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709966 -0.212373 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632882 -0.213855 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.61945 -0.216282 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609032 -0.207465 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625476 -0.193796 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6433 -0.222672 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649326 -0.200186 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656732 -0.220246 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626857 -0.236341 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640288 -0.233915 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616438 -0.227525 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661455 -0.265414 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642468 -0.249631 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68211 -0.25988 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683777 -0.238562 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683777 -0.238562 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661455 -0.265414 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642468 -0.249631 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.567237 -0.2291 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576452 -0.209804 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576452 -0.209804 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582357 -0.24422 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606693 -0.240045 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582357 -0.24422 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606693 -0.240045 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69376 0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674309 0.0838533 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.66171 0.103063 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653258 0.0800983 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673446 0.0876683 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682761 0.106818 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694497 0.0914233 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69536 0.0876083 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662574 0.0992478 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675172 0.0800382 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654121 0.0762832 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.604582 0.0446211 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604582 0.0446211 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599047 0.0239663 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666287 0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.662466 0.0547519 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660752 0.0332597 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682791 0.0439578 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.668 0.0754066 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688325 0.0646126 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671821 0.0745692 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645962 0.0647085 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649783 0.0638711 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644249 0.0432164 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745859 0.0646815 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.750021 0.0887955 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.729506 0.078459 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732161 0.0813312 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.766375 0.075018 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748514 0.0675537 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.762212 0.050904 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.763719 0.0721458 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759557 0.0480318 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743204 0.0618093 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737837 0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.747099 0.0542122 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743371 0.0553974 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.7241 0.0550267 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741565 0.0335575 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718566 0.0343719 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732303 0.014088 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760836 0.0339282 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.751574 0.0144587 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757108 0.0351134 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.786629 -0.00415829 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786629 -0.00415829 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.781094 -0.024813 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701782 0.0432853 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.693716 0.0608821 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.677932 0.0496759 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694884 0.0652402 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717566 0.0544915 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718734 0.0588496 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725632 0.0368947 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.700615 0.0389272 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.708681 0.0213304 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684831 0.027721 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721234 -0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.720593 -0.0310802 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.7 -0.0246945 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718114 -0.00820099 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741827 -0.0336072 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739347 -0.010728 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.742467 -0.0297485 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723713 -0.0501007 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724354 -0.046242 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70312 -0.043715 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649684 -0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.628657 -0.00328338 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630031 0.000378614 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642244 0.0152909 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648309 -0.0117117 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661896 0.00686255 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669336 -0.016478 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636097 -0.026624 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657124 -0.0313903 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637471 -0.022962 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.835815 -0.157543 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.899353 -0.119969 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.909872 -0.0977075 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.891613 -0.104052 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.886771 -0.0997803 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.917612 -0.113625 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.894512 -0.115698 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.907093 -0.135886 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.922453 -0.117896 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.911935 -0.140158 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904194 -0.124241 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868703 -0.130205 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.867758 -0.11253 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.846864 -0.122142 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860854 -0.107566 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.889596 -0.120593 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.882692 -0.115629 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.890541 -0.138267 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.875606 -0.135168 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.876551 -0.152843 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854713 -0.14478 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.836885 -0.0844101 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.826973 -0.0627848 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.81296 -0.083104 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.830202 -0.0805529 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.850898 -0.0640908 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854126 -0.0818589 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860809 -0.0857161 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.833656 -0.0666419 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843568 -0.0882673 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819643 -0.0869612 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.866465 -0.147308 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.876203 -0.130609 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.879733 -0.128522 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.857385 -0.124356 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862935 -0.149395 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.844117 -0.143141 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.853198 -0.166093 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885283 -0.153561 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.875546 -0.170259 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.888813 -0.151474 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803997 -0.111748 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.798532 -0.108311 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797989 -0.131037 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819589 -0.119537 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80454 -0.0890219 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825597 -0.100248 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.810005 -0.0924597 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.78294 -0.100522 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.788405 -0.10396 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782397 -0.123249 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802927 -0.184881 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.785723 -0.180723 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.798991 -0.161937 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782104 -0.173028 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.78966 -0.203667 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786041 -0.195972 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.806864 -0.207825 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.806546 -0.192576 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82375 -0.196734 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819813 -0.17379 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.898283 -0.193102 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.920038 -0.201143 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900209 -0.201384 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.910616 -0.17991 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.918112 -0.192861 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.90869 -0.171628 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.896357 -0.18482 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.907705 -0.214335 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.88595 -0.206294 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.887876 -0.214576 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.834745 -0.230676 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.824206 -0.252002 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.810793 -0.231282 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.827952 -0.234336 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.848158 -0.251396 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.851905 -0.23373 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858698 -0.23007 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.830999 -0.248342 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.841538 -0.227016 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.817586 -0.227621 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867633 -0.203337 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.868948 -0.209658 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84746 -0.202239 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.865773 -0.186008 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.889121 -0.210757 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885946 -0.187106 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.887806 -0.204436 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.870808 -0.226988 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.869493 -0.220667 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84932 -0.219569 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69376 0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668775 0.0631985 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661946 0.0667914 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65711 0.0452771 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680354 0.0511945 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673611 0.0847128 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.692019 0.069116 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680439 0.08112 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650366 0.0787954 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657195 0.0752026 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64553 0.0572811 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.604582 0.0446211 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604582 0.0446211 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599047 0.0239663 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649684 -0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.634953 -0.000226782 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655218 0.012605 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.635947 0.0122343 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.629419 -0.0208815 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630413 -0.00842045 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644149 -0.0287044 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64869 -0.0205108 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.66342 -0.0283337 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.668955 -0.00767898 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.740325 0.0440268 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.746894 0.0650768 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739183 0.0653796 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723153 0.0607735 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748035 0.0437239 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724295 0.0394207 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741466 0.0226739 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.764065 0.04833 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757496 0.02728 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.756355 0.0486329 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721234 -0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.732368 -0.0484665 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715699 -0.0478762 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737738 -0.0371781 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737902 -0.0278118 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743272 -0.0165234 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.726768 -0.00656677 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715864 -0.0385099 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70473 -0.0172649 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.699195 -0.0379196 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.786629 -0.00415829 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786629 -0.00415829 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.781094 -0.024813 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712851 0.0845947 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.706291 0.107813 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.689001 0.0909853 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701434 0.0896851 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.730141 0.101422 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725284 0.0832945 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.736701 0.0782041 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717709 0.102723 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724268 0.0795043 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.700418 0.0858949 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737837 0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.740802 0.0511556 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718185 0.043171 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.730397 0.0580833 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760455 0.0427273 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.750049 0.0496549 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757489 0.0263144 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748242 0.027815 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745277 0.0114021 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725625 0.0198304 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666287 0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.650692 0.0721382 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645053 0.0564414 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663167 0.072935 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671925 0.0696112 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6844 0.070408 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68752 0.0513875 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653812 0.0531177 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669407 0.034894 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648173 0.0374209 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674191 -0.142305 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.672341 -0.123995 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666199 -0.120057 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651943 -0.134313 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680334 -0.146243 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659936 -0.156561 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682184 -0.164554 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69459 -0.131987 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696439 -0.150298 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688447 -0.12805 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.731779 -0.136231 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712305 -0.141449 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70911 -0.129524 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.734974 -0.148156 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712305 -0.141449 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718696 -0.165299 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.738169 -0.160081 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721891 -0.177224 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718696 -0.165299 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.656415 -0.0783272 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639272 -0.0946054 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651197 -0.0978007 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680265 -0.0847178 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675047 -0.104191 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.686972 -0.107387 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.66834 -0.0815225 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675047 -0.104191 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651197 -0.0978007 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602641 -0.161477 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.60298 -0.154189 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.622115 -0.166695 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617912 -0.143431 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583506 -0.148971 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598439 -0.138214 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583168 -0.156259 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587708 -0.172234 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58737 -0.179523 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606843 -0.184741 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.577317 -0.105912 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582843 -0.128897 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600302 -0.111438 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586046 -0.0971825 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609032 -0.102708 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600302 -0.111438 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568587 -0.114642 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582843 -0.128897 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574113 -0.137627 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549732 -0.185011 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569205 -0.179793 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56601 -0.167868 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.552927 -0.196936 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569205 -0.179793 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575596 -0.203643 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556122 -0.208861 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.578791 -0.215568 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575596 -0.203643 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655019 -0.213855 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.653756 -0.23668 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636974 -0.229127 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660237 -0.233329 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671802 -0.221409 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678283 -0.218058 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673065 -0.198584 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648538 -0.217207 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649801 -0.194382 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631756 -0.209653 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607636 -0.260374 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600929 -0.237705 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612854 -0.240901 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631486 -0.266765 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636704 -0.247291 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648629 -0.250487 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619561 -0.26357 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636704 -0.247291 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612854 -0.240901 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.710584 -0.23918 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687599 -0.233654 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.705059 -0.216195 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719314 -0.23045 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.713788 -0.207465 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.705059 -0.216195 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701855 -0.24791 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687599 -0.233654 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678869 -0.242384 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786005 -0.343435 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.82165 -0.392454 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.824791 -0.400556 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802599 -0.392663 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.821021 -0.376528 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843843 -0.400347 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840073 -0.376319 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840701 -0.392245 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82542 -0.416482 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.822279 -0.40838 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803228 -0.408589 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.753118 -0.370774 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.734271 -0.367981 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.731279 -0.362711 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745269 -0.348136 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.756109 -0.376044 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.767107 -0.356199 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.774956 -0.378837 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.74212 -0.390619 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760966 -0.393412 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739128 -0.385349 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80984 -0.323622 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.80634 -0.308073 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786996 -0.316395 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802721 -0.300378 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.829184 -0.315299 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825565 -0.307605 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.832685 -0.330849 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.813459 -0.331317 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.81696 -0.346866 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.794116 -0.339639 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854538 -0.365116 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.878086 -0.365674 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859887 -0.367962 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.863875 -0.346241 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872736 -0.362827 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858526 -0.343394 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.849188 -0.362269 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868748 -0.384548 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.8452 -0.38399 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.85055 -0.386837 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842728 -0.296284 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.848999 -0.272611 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.828835 -0.281616 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.829121 -0.278432 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862893 -0.287278 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843015 -0.293099 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.856621 -0.310951 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862606 -0.290462 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.856335 -0.314135 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842441 -0.299468 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.818893 -0.316097 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.819591 -0.297057 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.814956 -0.293153 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.79807 -0.304244 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.823527 -0.320001 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802007 -0.327188 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.822829 -0.339041 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840413 -0.30891 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.839716 -0.32795 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.835779 -0.305006 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797815 -0.412267 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.793573 -0.436217 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.776294 -0.419454 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.796968 -0.420728 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.815094 -0.42903 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.818489 -0.413542 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819335 -0.405081 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.79442 -0.427756 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.798662 -0.403807 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.777141 -0.410993 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76217 -0.363249 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.747522 -0.356966 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759239 -0.339469 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.740618 -0.352002 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.750453 -0.380746 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743549 -0.375782 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.765101 -0.387029 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.769074 -0.368213 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.783722 -0.374496 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.780791 -0.350716 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.729282 -0.390587 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.704862 -0.392427 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717401 -0.374248 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.714218 -0.373948 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.716744 -0.408767 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.726099 -0.390287 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741164 -0.406927 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719927 -0.409067 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.744347 -0.407227 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732465 -0.390887 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594141 -0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.542042 -0.409774 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.517869 -0.413579 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528508 -0.393219 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525596 -0.395831 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531404 -0.430134 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539131 -0.412386 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555577 -0.426328 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534315 -0.427522 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558488 -0.423716 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544953 -0.407161 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.504962 -0.327164 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504962 -0.327164 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499428 -0.347819 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550064 -0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.529037 -0.375068 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530412 -0.371406 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542624 -0.356494 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548689 -0.383497 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562276 -0.364922 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569716 -0.388263 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536477 -0.398409 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557504 -0.403175 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537852 -0.394747 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613592 -0.428945 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612625 -0.451897 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593593 -0.436515 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614807 -0.432663 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632624 -0.444328 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634806 -0.425094 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633591 -0.421376 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61141 -0.448179 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612377 -0.425227 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592379 -0.432797 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621614 -0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.620974 -0.402865 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600381 -0.39648 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618494 -0.379986 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642207 -0.405392 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639728 -0.382513 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642848 -0.401533 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624094 -0.421886 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624734 -0.418027 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603501 -0.4155 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687009 -0.375943 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687009 -0.375943 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681475 -0.396598 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586119 -0.388377 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.570335 -0.399584 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562269 -0.381987 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569167 -0.403942 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594185 -0.405974 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593017 -0.410332 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609969 -0.394768 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587286 -0.384019 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60307 -0.372813 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57922 -0.366422 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638217 -0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.64748 -0.317573 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643752 -0.316388 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624481 -0.316758 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641945 -0.338228 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618946 -0.337413 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632683 -0.357697 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661216 -0.337857 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651954 -0.357326 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657489 -0.336672 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566667 -0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.562847 -0.317033 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561133 -0.338525 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583171 -0.327827 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568381 -0.296378 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588706 -0.307172 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572202 -0.297216 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546343 -0.307077 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550163 -0.307914 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544629 -0.328569 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594141 -0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.547576 -0.389119 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.525642 -0.386849 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528407 -0.379645 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538964 -0.366733 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544812 -0.396323 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558134 -0.376207 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566746 -0.398593 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534255 -0.409235 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556189 -0.411505 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537019 -0.402031 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.504962 -0.327164 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504962 -0.327164 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499428 -0.347819 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566667 -0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551072 -0.299647 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545434 -0.315344 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563547 -0.29885 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572306 -0.302174 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584781 -0.301377 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587901 -0.320398 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554192 -0.318667 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569787 -0.336891 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548554 -0.334364 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619127 -0.408291 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.617918 -0.415912 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.597788 -0.406911 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616439 -0.39183 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639257 -0.417292 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637778 -0.39321 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640465 -0.409671 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.620605 -0.432372 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621814 -0.424751 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600475 -0.423371 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638217 -0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.641183 -0.320629 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618565 -0.328614 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630777 -0.313702 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660835 -0.329058 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65043 -0.32213 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65787 -0.345471 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648623 -0.34397 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645657 -0.360383 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626005 -0.351955 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687009 -0.375943 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687009 -0.375943 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681475 -0.396598 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57505 -0.429687 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.55776 -0.446515 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5512 -0.423296 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562617 -0.428387 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58161 -0.452905 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586467 -0.434777 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5989 -0.436077 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570193 -0.447815 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587483 -0.430987 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563633 -0.424596 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621614 -0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.632748 -0.420252 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61608 -0.419661 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638118 -0.408963 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638282 -0.399597 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643653 -0.388308 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627149 -0.378352 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616244 -0.410295 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60511 -0.38905 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599576 -0.409705 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550064 -0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.535334 -0.372012 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555599 -0.35918 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536327 -0.359551 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529799 -0.392667 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530793 -0.380205 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54453 -0.400489 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549071 -0.392296 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563801 -0.400119 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569335 -0.379464 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0996195 -0.371785 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.220501 -0.393621 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.279642 -0.368601 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.299716 -0.354293 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.292196 -0.366989 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279022 -0.347717 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287162 -0.355904 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266468 -0.349329 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267088 -0.370213 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300337 -0.375177 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280263 -0.389485 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.292817 -0.387873 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281062 -0.372464 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.289441 -0.362978 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270044 -0.378255 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267771 -0.35549 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30046 -0.357187 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.278789 -0.349699 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29208 -0.366673 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302733 -0.379952 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294353 -0.389438 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.283335 -0.395229 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238665 -0.321889 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.250544 -0.304702 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259421 -0.327715 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238717 -0.32307 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229788 -0.298875 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.21796 -0.317244 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217908 -0.316063 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250492 -0.30352 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238612 -0.320707 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259369 -0.326533 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219082 -0.389758 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.228779 -0.378635 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24293 -0.383364 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225483 -0.365937 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20493 -0.385029 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201634 -0.372331 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195233 -0.396152 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222377 -0.402455 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.21268 -0.413578 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236529 -0.407185 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178104 -0.343046 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177083 -0.319723 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198298 -0.332294 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.189464 -0.325124 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156889 -0.330475 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16927 -0.335876 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.157909 -0.353797 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165722 -0.337645 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166743 -0.360967 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.186938 -0.350216 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.15994 -0.414778 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.147477 -0.412573 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172167 -0.412448 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.15977 -0.39322 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13525 -0.414903 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147543 -0.39555 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147713 -0.417108 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147647 -0.434131 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16011 -0.436336 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172338 -0.434006 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261479 -0.440333 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282991 -0.443285 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282046 -0.4302 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271991 -0.421181 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262424 -0.453417 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251423 -0.431313 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240911 -0.450466 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27248 -0.462437 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250967 -0.459485 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271534 -0.449353 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202338 -0.465353 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.204606 -0.486123 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223366 -0.470107 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202946 -0.464339 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183578 -0.481368 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181918 -0.459584 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18131 -0.460599 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203998 -0.487137 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201729 -0.466367 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222757 -0.471122 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262898 -0.444196 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.285685 -0.449273 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27701 -0.426189 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282528 -0.436139 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271573 -0.46728 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268416 -0.454146 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248787 -0.462204 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266055 -0.45733 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243269 -0.452254 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257381 -0.434246 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.374298 -0.269898 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.362218 -0.291334 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350338 -0.270045 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379235 -0.256525 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355276 -0.256671 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372093 -0.264588 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.391115 -0.277815 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383973 -0.285878 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379036 -0.299251 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.304189 -0.304189 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29042 -0.307879 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307879 -0.29042 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328039 -0.31058 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331729 -0.29681 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33812 -0.32066 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31058 -0.328039 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32066 -0.33812 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29681 -0.331729 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.305995 -0.235688 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321516 -0.245915 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312359 -0.259438 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282145 -0.242079 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288509 -0.265828 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273816 -0.258696 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291303 -0.228556 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282974 -0.245173 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306824 -0.238783 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.385852 -0.261966 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38141 -0.278159 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36581 -0.259422 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371598 -0.261768 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351556 -0.259225 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352901 -0.277764 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387198 -0.280504 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.368501 -0.2965 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382755 -0.296698 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.30415 -0.228803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321516 -0.245915 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306824 -0.238783 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2803 -0.235194 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282974 -0.245173 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273816 -0.258696 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294992 -0.242326 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288509 -0.265828 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312359 -0.259438 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.32435 -0.304189 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33812 -0.307879 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32066 -0.29042 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3005 -0.31058 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29681 -0.29681 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29042 -0.32066 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317959 -0.328039 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307879 -0.33812 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331729 -0.331729 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383759 -0.339925 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.407156 -0.334762 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388696 -0.326552 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392275 -0.31686 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402218 -0.348135 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387337 -0.330233 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378821 -0.353299 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39864 -0.357827 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.375243 -0.362991 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380181 -0.349618 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.346394 -0.386461 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.354723 -0.369843 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340031 -0.362711 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322544 -0.392851 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316181 -0.369102 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307023 -0.382624 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337237 -0.399983 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321715 -0.389757 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345565 -0.383366 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.348239 -0.393346 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.354723 -0.369843 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345565 -0.383366 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324389 -0.399736 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321715 -0.389757 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307023 -0.382624 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333547 -0.386213 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316181 -0.369102 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340031 -0.362711 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166275 -0.191247 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.20793 -0.130089 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.221102 -0.115471 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220766 -0.13987 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200597 -0.126388 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208266 -0.10569 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187762 -0.116607 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195095 -0.120308 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228435 -0.119172 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215264 -0.13379 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228099 -0.143571 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230419 -0.192135 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.243049 -0.18209 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218634 -0.185251 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227721 -0.168159 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.254834 -0.188974 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.239506 -0.175043 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242204 -0.199019 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245747 -0.206066 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233117 -0.216111 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221332 -0.209227 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172673 -0.154295 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.180792 -0.15554 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19323 -0.166926 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171251 -0.17557 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160236 -0.142909 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150694 -0.162939 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152117 -0.141663 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182215 -0.134265 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174096 -0.133019 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.194652 -0.145651 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.143787 -0.129201 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.14887 -0.105335 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167242 -0.121723 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153943 -0.115741 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125414 -0.112813 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130487 -0.123219 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120331 -0.136679 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138714 -0.118795 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13363 -0.142661 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.157086 -0.135183 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108529 -0.153407 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0995811 -0.130858 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.113639 -0.134736 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.123725 -0.135326 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0944715 -0.149528 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.118615 -0.153997 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10342 -0.172078 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0843858 -0.148938 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0933338 -0.171487 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0984435 -0.152816 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102131 -0.190359 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0897843 -0.179968 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.114103 -0.183804 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105492 -0.166467 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0778128 -0.186523 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0935207 -0.173022 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0901597 -0.196914 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0864233 -0.20386 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0987702 -0.214251 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110742 -0.207696 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201532 -0.167041 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.219088 -0.151829 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221861 -0.163068 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205084 -0.14514 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19876 -0.155801 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184756 -0.149113 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181204 -0.171014 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215537 -0.173729 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197981 -0.188942 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218309 -0.184969 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159877 -0.228199 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.167942 -0.229756 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183484 -0.223214 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16569 -0.207683 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144336 -0.234741 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142084 -0.212668 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13627 -0.233184 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.162129 -0.250271 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.154064 -0.248714 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177671 -0.243729 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224021 -0.229087 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.248268 -0.22829 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2391 -0.216949 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234532 -0.207937 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233189 -0.240428 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219453 -0.220075 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208942 -0.241225 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237756 -0.249439 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213509 -0.250236 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228589 -0.238098 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058509 -0.451136 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0051487 -0.447081 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.01504 -0.435909 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0289993 -0.440694 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0115452 -0.423265 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00881065 -0.442297 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0123054 -0.429652 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0187019 -0.453468 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00864346 -0.459725 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0012478 -0.470897 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0226028 -0.46451 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0688765 -0.439178 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0903221 -0.426942 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0806307 -0.435083 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0699989 -0.416328 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.078568 -0.431037 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0582447 -0.420423 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571224 -0.443274 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0891998 -0.449792 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0677542 -0.462029 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0795084 -0.457933 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0172804 -0.386138 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0293677 -0.364644 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0401449 -0.385352 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0213457 -0.375512 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0065032 -0.36543 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00151881 -0.376298 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00558411 -0.386924 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0253024 -0.37527 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0132151 -0.396764 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0360796 -0.395978 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0578769 -0.459039 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0707378 -0.451803 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0461991 -0.454158 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0561039 -0.435761 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0824157 -0.456685 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0677817 -0.440643 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0695548 -0.46392 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0725109 -0.475081 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.05965 -0.482316 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0479721 -0.477435 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0457452 -0.398096 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0495643 -0.373728 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0306825 -0.382672 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.030137 -0.383722 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.064627 -0.389151 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0451997 -0.399146 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.060808 -0.41352 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0651725 -0.388102 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0613535 -0.41247 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0462908 -0.397047 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0571747 -0.463094 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.081612 -0.459563 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0696122 -0.463589 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0665888 -0.442243 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0691745 -0.459069 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0541513 -0.441749 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0447373 -0.4626 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0721979 -0.480415 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0477607 -0.483946 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0601982 -0.48444 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00628079 -0.512079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.000557006 -0.523883 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0165974 -0.51057 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00208214 -0.49924 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0234352 -0.525392 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0249603 -0.500749 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.029159 -0.513588 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00475566 -0.536722 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0104794 -0.524918 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0123987 -0.523409 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00557859 -0.516134 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00154892 -0.540463 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0156462 -0.524673 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00538221 -0.52751 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0227737 -0.531924 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.026607 -0.518971 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0268034 -0.507596 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00174531 -0.529087 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00577498 -0.504759 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0154498 -0.513298 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0574471 -0.504176 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0817008 -0.508666 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0732807 -0.489545 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0722467 -0.488971 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0658672 -0.523298 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0564131 -0.503602 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0416134 -0.518808 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0669012 -0.523872 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0426474 -0.519382 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.058481 -0.504751 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0483751 -0.248762 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0599222 -0.183785 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0522053 -0.160406 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0358698 -0.178533 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0513956 -0.171954 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0762577 -0.165658 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.075448 -0.177206 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0839747 -0.189036 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0607319 -0.172236 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0684488 -0.195615 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0443964 -0.190363 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00673113 -0.215921 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0258737 -0.20044 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0203763 -0.215612 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00551963 -0.196602 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0122285 -0.200749 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00812553 -0.196911 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00691403 -0.21623 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0270852 -0.21976 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00794264 -0.235241 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0215878 -0.234932 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0172857 -0.187119 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00705049 -0.176731 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00352517 -0.200733 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.025725 -0.192673 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.020811 -0.163117 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0394855 -0.179058 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0310463 -0.173504 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00138875 -0.171177 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00884647 -0.181564 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00491406 -0.195179 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115028 -0.216626 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.127519 -0.195663 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.108803 -0.201738 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104303 -0.194866 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133744 -0.210551 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110528 -0.209754 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121254 -0.231514 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138245 -0.217423 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.125754 -0.238386 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119529 -0.223497 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0723919 -0.21996 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0673141 -0.20388 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0609052 -0.198742 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0490355 -0.216456 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0788008 -0.225098 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0605222 -0.237674 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0838786 -0.241177 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0906706 -0.207384 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0957484 -0.223463 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0842617 -0.202246 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103481 -0.281603 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.126206 -0.291073 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110246 -0.293457 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119897 -0.271345 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119442 -0.279219 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113132 -0.25949 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0967168 -0.269749 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10979 -0.301332 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0870656 -0.291862 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0938302 -0.303716 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0910116 -0.245428 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0942304 -0.234308 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0714204 -0.238704 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0854464 -0.221514 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113822 -0.241032 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105038 -0.228237 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110603 -0.252152 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0997955 -0.258223 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0965768 -0.269343 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0769856 -0.262619 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0794645 -0.310405 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0817333 -0.324811 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0603366 -0.313378 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0800146 -0.300317 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100861 -0.321838 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0991425 -0.297345 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0985923 -0.307433 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0811832 -0.334899 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0789143 -0.320493 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0597864 -0.323466 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0243582 -0.277564 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0076281 -0.275459 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00142185 -0.270078 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0167139 -0.255218 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0305645 -0.282946 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0396503 -0.262704 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0472946 -0.285051 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0152725 -0.297806 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0320026 -0.299911 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00906621 -0.292425 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.190929 -0.412497 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.16674 -0.417001 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174844 -0.400273 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203175 -0.419795 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18709 -0.407571 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191231 -0.431597 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195071 -0.436523 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183127 -0.448325 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170881 -0.441027 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.10495 -0.41922 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911807 -0.42291 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10864 -0.40545 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128801 -0.425611 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13249 -0.411841 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138881 -0.435691 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111341 -0.44307 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121421 -0.45315 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0975713 -0.44676 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.12515 -0.343834 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107784 -0.360946 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122476 -0.353814 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149 -0.350225 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146326 -0.360204 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155484 -0.373727 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134308 -0.357357 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140792 -0.380859 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116942 -0.374468 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.200165 -0.411775 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189948 -0.415187 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179342 -0.399922 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189202 -0.420888 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168379 -0.409035 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168023 -0.433412 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199808 -0.436152 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178629 -0.448677 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189591 -0.439564 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.123305 -0.350719 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107784 -0.360946 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116942 -0.374468 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.147155 -0.357109 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140792 -0.380859 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155484 -0.373727 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137998 -0.343587 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146326 -0.360204 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122476 -0.353814 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.125111 -0.41922 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138881 -0.42291 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121421 -0.40545 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.101261 -0.425611 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0975713 -0.411841 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911807 -0.435691 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11872 -0.44307 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10864 -0.45315 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13249 -0.44676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.162382 -0.486264 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.174264 -0.502603 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.15142 -0.495376 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170327 -0.479659 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185226 -0.49349 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18129 -0.470546 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173345 -0.477151 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166319 -0.509207 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154437 -0.492868 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143475 -0.501981 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0810612 -0.508376 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745774 -0.484874 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0837352 -0.498397 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104911 -0.514767 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107585 -0.504787 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122277 -0.497655 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0957534 -0.501244 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11312 -0.484132 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0892696 -0.477742 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.082906 -0.501491 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745774 -0.484874 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0892696 -0.477742 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.106756 -0.507882 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11312 -0.484132 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122277 -0.497655 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0920638 -0.515014 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107585 -0.504787 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0837352 -0.498397 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153845 -0.574159 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202534 -0.612768 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225282 -0.612732 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22113 -0.60221 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212428 -0.591695 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206686 -0.62329 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193832 -0.602253 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183939 -0.623325 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215388 -0.633805 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192641 -0.63384 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211236 -0.623283 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.243024 -0.542885 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219861 -0.534333 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243024 -0.542885 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219861 -0.534333 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248559 -0.563539 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23093 -0.575642 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23093 -0.575642 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184086 -0.543919 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.200547 -0.527458 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205161 -0.540303 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187702 -0.522843 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179472 -0.531074 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166627 -0.526459 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.163011 -0.547535 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196931 -0.548533 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18047 -0.564994 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201546 -0.561378 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130984 -0.631939 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.132649 -0.643128 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152367 -0.631785 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.133263 -0.618482 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111266 -0.643283 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11188 -0.618637 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.109601 -0.632094 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130371 -0.656585 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128706 -0.645397 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150088 -0.645242 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.112536 -0.56309 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.11011 -0.549659 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.132596 -0.555684 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.118927 -0.53924 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.09005 -0.557065 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0988668 -0.546646 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0924762 -0.570497 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103719 -0.573509 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106145 -0.58694 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.126205 -0.579534 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0609772 -0.591664 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.076761 -0.572676 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0609772 -0.591664 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.076761 -0.572676 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0665116 -0.612319 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0878298 -0.613986 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0878298 -0.613986 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172294 -0.643008 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.189742 -0.660425 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196144 -0.636618 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185725 -0.645434 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165892 -0.666816 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161875 -0.651825 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.148444 -0.649399 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.17631 -0.657999 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER 0.158862 -0.640582 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182712 -0.634191 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.123605 -0.6044 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.107144 -0.620861 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119989 -0.625475 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102529 -0.608016 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11076 -0.599785 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106145 -0.58694 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.127221 -0.583324 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128219 -0.617245 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.14468 -0.600784 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141064 -0.621859 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195155 -0.585228 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.203972 -0.574809 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181486 -0.568784 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201546 -0.561378 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217641 -0.591253 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215215 -0.577822 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208824 -0.601672 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197581 -0.598659 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188764 -0.609078 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.175095 -0.592634 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0329639 -0.552323 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0248832 -0.625877 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0316054 -0.646362 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0478 -0.627981 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0287309 -0.625173 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00868865 -0.644258 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00581415 -0.623069 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00196644 -0.623773 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0277577 -0.647066 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0210355 -0.62658 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0439523 -0.628685 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.105299 -0.593994 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100664 -0.582384 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0926585 -0.572783 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0869303 -0.604941 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0742898 -0.58373 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0639267 -0.604278 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0949359 -0.614541 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0719323 -0.613879 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.090301 -0.602932 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0138144 -0.584567 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0177119 -0.584898 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0364224 -0.580268 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0185345 -0.56353 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00489609 -0.589197 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00407348 -0.567829 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00879364 -0.588867 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0129918 -0.605935 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00909422 -0.605605 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0317022 -0.601305 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0244483 -0.584869 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0473753 -0.5935 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308315 -0.595617 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0399691 -0.57344 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0409921 -0.582752 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0335859 -0.562692 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0180651 -0.574121 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0318545 -0.604929 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00892756 -0.596298 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0153107 -0.607046 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0355172 -0.54356 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0495897 -0.530389 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0261165 -0.53532 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.031221 -0.519442 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0589904 -0.538628 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0406217 -0.527681 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0449178 -0.551799 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0538859 -0.554507 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0398133 -0.567678 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0304127 -0.559438 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0163676 -0.511316 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0212225 -0.48882 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00896145 -0.491256 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00194055 -0.497372 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0286287 -0.50888 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00546563 -0.517432 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0237738 -0.531375 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0395307 -0.502764 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0346758 -0.525259 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272696 -0.505199 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440327 -0.593633 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0604766 -0.607302 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0678827 -0.587242 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0604766 -0.607302 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0366265 -0.613693 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0366265 -0.613693 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0201827 -0.600023 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440327 -0.593633 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0275889 -0.579964 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0514389 -0.573573 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0521134 -0.520079 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0542684 -0.523344 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0591566 -0.541988 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0358996 -0.534291 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0472252 -0.501435 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0288565 -0.512382 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0450702 -0.49817 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0704822 -0.509132 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0683272 -0.505868 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0753703 -0.527777 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101445 -0.561087 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.118381 -0.551884 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0944221 -0.550745 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103361 -0.536664 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125404 -0.562225 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110383 -0.547006 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108468 -0.571428 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.116465 -0.576307 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0995293 -0.58551 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0925065 -0.575168 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247614 -0.494808 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313607 -0.494287 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.326876 -0.484182 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302705 -0.488171 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310432 -0.470513 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337778 -0.490299 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321334 -0.476629 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324509 -0.500404 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330051 -0.507957 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316783 -0.518062 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305881 -0.511946 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269833 -0.434629 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.279233 -0.426389 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286276 -0.448298 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263449 -0.445377 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262789 -0.41272 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247006 -0.431707 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253389 -0.420959 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285616 -0.415641 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.276216 -0.42388 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29266 -0.43755 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302539 -0.452978 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.320401 -0.436971 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3148 -0.455413 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29902 -0.436675 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30814 -0.434535 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286759 -0.434239 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290278 -0.450543 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32392 -0.453274 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306057 -0.469281 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318318 -0.471717 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291389 -0.554467 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314604 -0.562288 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310183 -0.541186 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306499 -0.542501 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29581 -0.575569 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287705 -0.555781 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.272595 -0.567748 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299494 -0.574255 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.276279 -0.566433 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295073 -0.553152 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28032 -0.513157 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.298839 -0.507811 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302049 -0.505577 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287442 -0.489718 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27711 -0.515392 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265714 -0.497299 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258591 -0.520738 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291716 -0.531251 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273198 -0.536597 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294927 -0.529016 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.227186 -0.567359 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.246777 -0.555283 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227528 -0.54267 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205805 -0.567063 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206147 -0.542374 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.204014 -0.554691 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225054 -0.579676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223263 -0.567305 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244644 -0.567601 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258683 -0.536117 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.275127 -0.549787 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282533 -0.529727 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275127 -0.549787 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251277 -0.556177 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251277 -0.556177 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234833 -0.542508 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258683 -0.536117 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242239 -0.522448 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266089 -0.516058 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19269 -0.536638 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.17251 -0.549603 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191778 -0.549105 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177908 -0.528912 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173421 -0.537136 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178819 -0.516445 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193601 -0.524171 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187292 -0.557329 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207471 -0.544363 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20656 -0.556831 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214908 -0.476459 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.209819 -0.457868 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210053 -0.453963 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2312 -0.458164 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214674 -0.480363 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236055 -0.480659 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219763 -0.498954 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193527 -0.476163 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198616 -0.494753 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193761 -0.472258 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.157543 -0.835815 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.122136 -0.871646 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.102403 -0.871334 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100577 -0.862937 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113406 -0.850164 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123961 -0.880044 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134964 -0.858873 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143694 -0.880356 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111133 -0.892817 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130866 -0.893129 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.109307 -0.884419 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0854653 -0.82339 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0654286 -0.811594 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0820122 -0.820516 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0876595 -0.80102 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0688817 -0.814468 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911125 -0.803895 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0889183 -0.826265 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0632344 -0.833964 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.083271 -0.845761 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.079818 -0.842886 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135649 -0.799077 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.120908 -0.781177 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113462 -0.795477 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13149 -0.778973 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143095 -0.784778 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153678 -0.782573 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157836 -0.802678 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.125067 -0.801282 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.139808 -0.819182 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11762 -0.815582 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194213 -0.884071 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.197746 -0.891905 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175383 -0.884286 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193701 -0.867957 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216576 -0.89169 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212531 -0.867741 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.213043 -0.883856 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.198259 -0.908019 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194726 -0.900186 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175896 -0.900401 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207727 -0.811502 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.212743 -0.794108 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189621 -0.802328 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199907 -0.788345 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230849 -0.803282 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.218012 -0.797518 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225832 -0.820676 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220563 -0.817265 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215547 -0.83466 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.197441 -0.825486 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.229621 -0.84824 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.25245 -0.843832 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233837 -0.846687 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235043 -0.826426 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248234 -0.845385 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230827 -0.827978 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225404 -0.849792 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247028 -0.865646 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224198 -0.870053 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228415 -0.868501 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14403 -0.908384 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.128672 -0.926643 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.1198 -0.904034 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133221 -0.90826 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152902 -0.930993 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157451 -0.912609 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.16826 -0.912733 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.139481 -0.926768 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154838 -0.908508 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130608 -0.904159 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179437 -0.872552 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.188167 -0.894035 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172046 -0.89378 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195141 -0.885777 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195558 -0.872807 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202532 -0.864549 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186828 -0.851325 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172463 -0.880811 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163733 -0.859328 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.156342 -0.880556 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107359 -0.860128 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0905999 -0.853284 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111382 -0.840233 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0940331 -0.839638 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.086577 -0.873178 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0900102 -0.859532 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103336 -0.880022 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103926 -0.873773 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120685 -0.880618 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124708 -0.860723 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0133465 -0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0838533 -0.674309 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.103063 -0.66171 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0876683 -0.673446 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0800983 -0.653258 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0992478 -0.662574 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0762832 -0.654121 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0800382 -0.675172 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106818 -0.682761 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0876083 -0.69536 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0914233 -0.694497 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0539145 -0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0547519 -0.662466 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0439578 -0.682791 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0332597 -0.660752 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0647085 -0.645962 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0432164 -0.644249 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0638711 -0.649783 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0754066 -0.668 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0745692 -0.671821 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646126 -0.688325 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0446211 -0.604582 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0239663 -0.599047 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446211 -0.604582 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0432853 -0.701782 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0608821 -0.693716 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0652402 -0.694884 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496759 -0.677932 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0389272 -0.700615 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.027721 -0.684831 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0213304 -0.708681 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0544915 -0.717566 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0368947 -0.725632 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0588496 -0.718734 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00804971 -0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00328338 -0.628657 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0152909 -0.642244 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.000378614 -0.630031 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.026624 -0.636097 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.022962 -0.637471 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0313903 -0.657124 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0117117 -0.648309 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.016478 -0.669336 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00686255 -0.661896 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272215 -0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0310802 -0.720593 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00820099 -0.718114 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0246945 -0.7 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0501007 -0.723713 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.043715 -0.70312 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.046242 -0.724354 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0336072 -0.741827 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0297485 -0.742467 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.010728 -0.739347 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646815 -0.745859 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0887955 -0.750021 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0813312 -0.732161 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.078459 -0.729506 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0721458 -0.763719 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0618093 -0.743204 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0480318 -0.759557 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.075018 -0.766375 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.050904 -0.762212 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0675537 -0.748514 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00415829 -0.786629 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.024813 -0.781094 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00415829 -0.786629 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0347427 -0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0542122 -0.747099 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0550267 -0.7241 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0553974 -0.743371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0339282 -0.760836 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0351134 -0.757108 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0144587 -0.751574 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0335575 -0.741565 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.014088 -0.732303 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0343719 -0.718566 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.142305 -0.61371 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.125845 -0.597249 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.12123 -0.610094 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138689 -0.592635 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14692 -0.600865 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.159765 -0.596251 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163381 -0.617326 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.12946 -0.618324 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145921 -0.634785 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124846 -0.631169 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0833673 -0.612676 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10653 -0.604124 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0833673 -0.612676 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10653 -0.604124 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0778329 -0.633331 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0954616 -0.645433 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0954616 -0.645433 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.141271 -0.554772 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13272 -0.577935 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161926 -0.549237 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174029 -0.566866 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174029 -0.566866 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141271 -0.554772 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13272 -0.577935 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.213855 -0.632882 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.216282 -0.61945 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193796 -0.625476 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207465 -0.609032 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.236341 -0.626857 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227525 -0.616438 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233915 -0.640288 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.222672 -0.6433 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220246 -0.656732 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200186 -0.649326 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.2291 -0.567237 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209804 -0.576452 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209804 -0.576452 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24422 -0.582357 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240045 -0.606693 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24422 -0.582357 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240045 -0.606693 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.265414 -0.661455 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249631 -0.642468 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265414 -0.661455 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249631 -0.642468 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.25988 -0.68211 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238562 -0.683777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238562 -0.683777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161477 -0.68526 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.148046 -0.687686 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137627 -0.678869 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154071 -0.6652 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171896 -0.694077 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177921 -0.671591 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185327 -0.691651 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155452 -0.707746 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168883 -0.70532 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145033 -0.698929 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.190051 -0.736819 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171063 -0.721035 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210706 -0.731284 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212373 -0.709966 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212373 -0.709966 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190051 -0.736819 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171063 -0.721035 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.095832 -0.700504 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105047 -0.681209 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105047 -0.681209 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110952 -0.715624 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135288 -0.711449 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110952 -0.715624 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135288 -0.711449 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343435 -0.786005 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.392454 -0.82165 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.400556 -0.824791 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376528 -0.821021 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392663 -0.802599 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416482 -0.82542 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408589 -0.803228 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40838 -0.822279 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400347 -0.843843 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392245 -0.840701 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376319 -0.840073 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.323622 -0.80984 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.308073 -0.80634 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300378 -0.802721 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316395 -0.786996 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331317 -0.813459 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339639 -0.794116 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346866 -0.81696 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.315299 -0.829184 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330849 -0.832685 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307605 -0.825565 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.370774 -0.753118 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.367981 -0.734271 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348136 -0.745269 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 -0.731279 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390619 -0.74212 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385349 -0.739128 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393412 -0.760966 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376044 -0.756109 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378837 -0.774956 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356199 -0.767107 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412267 -0.797815 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.436217 -0.793573 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420728 -0.796968 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419454 -0.776294 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 -0.79442 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410993 -0.777141 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403807 -0.798662 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42903 -0.815094 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405081 -0.819335 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.413542 -0.818489 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390587 -0.729282 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.392427 -0.704862 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373948 -0.714218 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374248 -0.717401 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409067 -0.719927 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390887 -0.732465 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407227 -0.744347 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408767 -0.716744 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406927 -0.741164 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390287 -0.726099 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.363249 -0.76217 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.356966 -0.747522 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.352002 -0.740618 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339469 -0.759239 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.368213 -0.769074 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350716 -0.780791 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374496 -0.783722 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380746 -0.750453 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.387029 -0.765101 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375782 -0.743549 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.365116 -0.854538 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.365674 -0.878086 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346241 -0.863875 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367962 -0.859887 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384548 -0.868748 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386837 -0.85055 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.38399 -0.8452 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362827 -0.872736 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362269 -0.849188 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343394 -0.858526 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316097 -0.818893 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.297057 -0.819591 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.304244 -0.79807 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293153 -0.814956 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30891 -0.840413 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.305006 -0.835779 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32795 -0.839716 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320001 -0.823527 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339041 -0.822829 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327188 -0.802007 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296284 -0.842728 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.272611 -0.848999 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.278432 -0.829121 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281616 -0.828835 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290462 -0.862606 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299468 -0.842441 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314135 -0.856335 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.287278 -0.862893 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.310951 -0.856621 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293099 -0.843015 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.358439 -0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.389119 -0.547576 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.386849 -0.525642 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366733 -0.538964 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379645 -0.528407 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409235 -0.534255 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402031 -0.537019 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411505 -0.556189 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396323 -0.544812 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398593 -0.566746 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376207 -0.558134 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317871 -0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.299647 -0.551072 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29885 -0.563547 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.315344 -0.545434 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318667 -0.554192 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.334364 -0.548554 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336891 -0.569787 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.302174 -0.572306 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320398 -0.587901 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301377 -0.584781 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.327164 -0.504962 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347819 -0.499428 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327164 -0.504962 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.429687 -0.57505 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.446515 -0.55776 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428387 -0.562617 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423296 -0.5512 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447815 -0.570193 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424596 -0.563633 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430987 -0.587483 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452905 -0.58161 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436077 -0.5989 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434777 -0.586467 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379835 -0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.372012 -0.535334 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359551 -0.536327 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35918 -0.555599 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392296 -0.549071 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379464 -0.569335 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400119 -0.563801 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392667 -0.529799 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400489 -0.54453 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380205 -0.530793 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399007 -0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.420252 -0.632748 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408963 -0.638118 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419661 -0.61608 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410295 -0.616244 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409705 -0.599576 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.38905 -0.60511 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399597 -0.638282 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378352 -0.627149 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388308 -0.643653 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408291 -0.619127 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.415912 -0.617918 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39183 -0.616439 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406911 -0.597788 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432372 -0.620605 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423371 -0.600475 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424751 -0.621814 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417292 -0.639257 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409671 -0.640465 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39321 -0.637778 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375943 -0.687009 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396598 -0.681475 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375943 -0.687009 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337042 -0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.320629 -0.641183 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.313702 -0.630777 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328614 -0.618565 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.34397 -0.648623 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.351955 -0.626005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360383 -0.645657 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.329058 -0.660835 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.345471 -0.65787 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32213 -0.65043 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.358439 -0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.409774 -0.542042 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.413579 -0.517869 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395831 -0.525596 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393219 -0.528508 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427522 -0.534315 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407161 -0.544953 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423716 -0.558488 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430134 -0.531404 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.426328 -0.555577 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412386 -0.539131 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379835 -0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375068 -0.529037 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356494 -0.542624 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371406 -0.530412 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398409 -0.536477 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394747 -0.537852 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403175 -0.557504 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383497 -0.548689 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388263 -0.569716 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.364922 -0.562276 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.327164 -0.504962 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347819 -0.499428 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327164 -0.504962 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388377 -0.586119 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399584 -0.570335 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403942 -0.569167 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.381987 -0.562269 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384019 -0.587286 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366422 -0.57922 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372813 -0.60307 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405974 -0.594185 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394768 -0.609969 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410332 -0.593017 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317871 -0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317033 -0.562847 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327827 -0.583171 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338525 -0.561133 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307077 -0.546343 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328569 -0.544629 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307914 -0.550163 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296378 -0.568381 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297216 -0.572202 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307172 -0.588706 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337042 -0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317573 -0.64748 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316758 -0.624481 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316388 -0.643752 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337857 -0.661216 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336672 -0.657489 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357326 -0.651954 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338228 -0.641945 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357697 -0.632683 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337413 -0.618946 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428945 -0.613592 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.451897 -0.612625 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432663 -0.614807 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436515 -0.593593 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448179 -0.61141 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432797 -0.592379 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425227 -0.612377 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.444328 -0.632624 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421376 -0.633591 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425094 -0.634806 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375943 -0.687009 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396598 -0.681475 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375943 -0.687009 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399007 -0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.402865 -0.620974 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379986 -0.618494 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39648 -0.600381 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421886 -0.624094 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4155 -0.603501 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.418027 -0.624734 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405392 -0.642207 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401533 -0.642848 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382513 -0.639728 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157543 -0.835815 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.119969 -0.899353 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0977075 -0.909872 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0997803 -0.886771 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104052 -0.891613 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.117896 -0.922453 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124241 -0.904194 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140158 -0.911935 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113625 -0.917612 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135886 -0.907093 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115698 -0.894512 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0844101 -0.836885 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0627848 -0.826973 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0805529 -0.830202 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.083104 -0.81296 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0666419 -0.833656 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0869612 -0.819643 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0882673 -0.843568 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0640908 -0.850898 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0857161 -0.860809 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0818589 -0.854126 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130205 -0.868703 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.11253 -0.867758 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107566 -0.860854 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122142 -0.846864 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135168 -0.875606 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14478 -0.854713 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152843 -0.876551 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120593 -0.889596 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138267 -0.890541 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115629 -0.882692 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193102 -0.898283 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.201143 -0.920038 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17991 -0.910616 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201384 -0.900209 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214335 -0.907705 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214576 -0.887876 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206294 -0.88595 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192861 -0.918112 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18482 -0.896357 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171628 -0.90869 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203337 -0.867633 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.209658 -0.868948 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186008 -0.865773 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202239 -0.84746 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.226988 -0.870808 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.219569 -0.84932 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220667 -0.869493 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210757 -0.889121 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.204436 -0.887806 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.187106 -0.885946 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230676 -0.834745 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.252002 -0.824206 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234336 -0.827952 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.231282 -0.810793 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248342 -0.830999 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227621 -0.817586 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227016 -0.841538 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.251396 -0.848158 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23007 -0.858698 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23373 -0.851905 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.147308 -0.866465 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.130609 -0.876203 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124356 -0.857385 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128522 -0.879733 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153561 -0.885283 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.151474 -0.888813 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170259 -0.875546 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149395 -0.862935 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166093 -0.853198 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143141 -0.844117 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.184881 -0.802927 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.180723 -0.785723 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173028 -0.782104 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161937 -0.798991 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192576 -0.806546 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17379 -0.819813 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196734 -0.82375 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203667 -0.78966 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207825 -0.806864 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195972 -0.786041 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111748 -0.803997 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.108311 -0.798532 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119537 -0.819589 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131037 -0.797989 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100522 -0.78294 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123249 -0.782397 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10396 -0.788405 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0890219 -0.80454 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0924597 -0.810005 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100248 -0.825597 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.202787 -0.61371 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.200937 -0.595399 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194794 -0.591462 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.180539 -0.605717 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.208929 -0.617647 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188531 -0.627965 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210779 -0.635958 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223185 -0.603392 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225035 -0.621702 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.217042 -0.599454 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.260374 -0.607636 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240901 -0.612854 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.237705 -0.600929 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.26357 -0.619561 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240901 -0.612854 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247291 -0.636704 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.266765 -0.631486 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250487 -0.648629 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247291 -0.636704 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.185011 -0.549732 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.167868 -0.56601 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179793 -0.569205 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.208861 -0.556122 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203643 -0.575596 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215568 -0.578791 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196936 -0.552927 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203643 -0.575596 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179793 -0.569205 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131237 -0.632882 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.131575 -0.625593 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.15071 -0.6381 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146508 -0.614836 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.112102 -0.620375 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.127034 -0.609618 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111763 -0.627664 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116304 -0.643639 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115965 -0.650927 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135439 -0.656145 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.105912 -0.577317 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111438 -0.600302 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128897 -0.582843 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.114642 -0.568587 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137627 -0.574113 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128897 -0.582843 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0971825 -0.586046 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111438 -0.600302 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.102708 -0.609032 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0783272 -0.656415 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0978007 -0.651197 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0946054 -0.639272 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0815225 -0.66834 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0978007 -0.651197 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104191 -0.675047 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0847178 -0.680265 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107387 -0.686972 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104191 -0.675047 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183615 -0.68526 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.182351 -0.708085 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165569 -0.700531 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188833 -0.704733 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200397 -0.692813 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206879 -0.689462 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201661 -0.669989 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177134 -0.688611 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178397 -0.665787 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.160351 -0.681058 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.136231 -0.731779 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.129524 -0.70911 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141449 -0.712305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.160081 -0.738169 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165299 -0.718696 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177224 -0.721891 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.148156 -0.734974 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165299 -0.718696 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141449 -0.712305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.23918 -0.710584 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216195 -0.705059 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233654 -0.687599 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24791 -0.701855 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242384 -0.678869 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233654 -0.687599 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23045 -0.719314 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216195 -0.705059 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207465 -0.713788 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0133465 -0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0631985 -0.668775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0667914 -0.661946 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511945 -0.680354 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0452771 -0.65711 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0787954 -0.650366 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0572811 -0.64553 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0752026 -0.657195 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0847128 -0.673611 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.08112 -0.680439 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.069116 -0.692019 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00804971 -0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.000226782 -0.634953 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0122343 -0.635947 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.012605 -0.655218 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0205108 -0.64869 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00767898 -0.668955 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0283337 -0.66342 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0208815 -0.629419 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0287044 -0.644149 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00842045 -0.630413 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0446211 -0.604582 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0239663 -0.599047 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446211 -0.604582 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0845947 -0.712851 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.107813 -0.706291 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0896851 -0.701434 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0909853 -0.689001 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102723 -0.717709 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0858949 -0.700418 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0795043 -0.724268 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101422 -0.730141 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0782041 -0.736701 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0832945 -0.725284 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0539145 -0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0721382 -0.650692 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.072935 -0.663167 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0564414 -0.645053 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0531177 -0.653812 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0374209 -0.648173 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.034894 -0.669407 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696112 -0.671925 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0513875 -0.68752 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.070408 -0.6844 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0347427 -0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0511556 -0.740802 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0580833 -0.730397 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.043171 -0.718185 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.027815 -0.748242 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0198304 -0.725625 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0114021 -0.745277 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0427273 -0.760455 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0263144 -0.757489 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496549 -0.750049 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440268 -0.740325 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0650768 -0.746894 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0607735 -0.723153 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0653796 -0.739183 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.04833 -0.764065 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0486329 -0.756355 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02728 -0.757496 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0437239 -0.748035 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0226739 -0.741466 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0394207 -0.724295 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00415829 -0.786629 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.024813 -0.781094 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00415829 -0.786629 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272215 -0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0484665 -0.732368 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0371781 -0.737738 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0478762 -0.715699 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0385099 -0.715864 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0379196 -0.699195 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0172649 -0.70473 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0278118 -0.737902 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00656677 -0.726768 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0165234 -0.743272 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.690426 -0.508983 1.83812e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.755941 -0.484794 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.767658 -0.47411 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.749038 -0.489758 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.744501 -0.467528 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774562 -0.469146 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751405 -0.462564 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.762845 -0.47983 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.779098 -0.491377 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.767382 -0.502061 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760478 -0.507025 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695668 -0.478434 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.703418 -0.481931 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.716184 -0.491475 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694124 -0.500827 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682902 -0.46889 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673608 -0.487786 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675152 -0.465393 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704962 -0.459538 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697211 -0.456041 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.717727 -0.469082 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7029 -0.436283 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.714226 -0.418941 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724842 -0.44101 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704751 -0.43889 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.692283 -0.414215 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682808 -0.434163 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680957 -0.431557 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712374 -0.416335 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701048 -0.433677 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.722991 -0.438403 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7507 -0.515343 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.773394 -0.506594 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.764807 -0.507924 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755462 -0.491321 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759287 -0.514012 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.741355 -0.49874 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736593 -0.522762 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.768632 -0.530616 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745938 -0.539365 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760045 -0.531946 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697658 -0.466832 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.709346 -0.447385 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721188 -0.46231 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703286 -0.447429 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685816 -0.451907 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.679757 -0.451951 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674129 -0.471354 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703718 -0.466788 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.692031 -0.486235 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.71556 -0.481713 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685185 -0.539531 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.693658 -0.538818 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.708875 -0.534075 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.691194 -0.517905 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669969 -0.544274 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667505 -0.523361 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661495 -0.544988 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687649 -0.560445 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.679176 -0.561158 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.702866 -0.555702 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743468 -0.557494 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.767402 -0.560084 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755145 -0.53997 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760285 -0.543179 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755725 -0.577608 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.748608 -0.560703 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731791 -0.575017 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750585 -0.574398 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.726651 -0.571808 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.738328 -0.554284 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677953 -0.581682 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.682851 -0.601808 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700216 -0.58454 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680568 -0.579842 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660588 -0.59895 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658304 -0.576984 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65569 -0.578824 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680237 -0.603648 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675339 -0.583522 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697602 -0.58638 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683194 -0.551134 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.687731 -0.573364 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703871 -0.56324 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682033 -0.571303 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667055 -0.561258 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661356 -0.559196 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.662518 -0.539027 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688893 -0.553195 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.684356 -0.530964 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705033 -0.543071 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607487 -0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.629404 -0.313405 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626214 -0.316595 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624401 -0.335868 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606941 -0.318408 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.631217 -0.294133 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611945 -0.295946 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634407 -0.290942 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648676 -0.311592 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651867 -0.308402 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646863 -0.330864 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610996 -0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.623201 -0.403702 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635431 -0.385946 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62031 -0.401066 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598766 -0.401947 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595876 -0.399312 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586561 -0.382437 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613886 -0.386827 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.601681 -0.367317 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626116 -0.369071 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558618 -0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.539107 -0.319608 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541743 -0.322499 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.556863 -0.307378 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555982 -0.328923 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.573738 -0.316693 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575492 -0.341128 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540862 -0.344043 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560372 -0.356248 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.543497 -0.346933 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625895 -0.264535 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.637402 -0.248969 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646193 -0.271807 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625088 -0.268363 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617105 -0.241698 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604791 -0.261092 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605598 -0.257264 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638209 -0.245142 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626702 -0.260708 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647 -0.267979 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550934 -0.258608 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603979 -0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.613271 -0.265398 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627912 -0.281225 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610787 -0.26842 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589337 -0.270625 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586853 -0.273647 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.580045 -0.291679 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606463 -0.283431 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.59717 -0.304484 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621104 -0.299257 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678274 -0.316914 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.69384 -0.305407 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674446 -0.317721 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671002 -0.296616 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697667 -0.3046 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.67483 -0.295809 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682101 -0.316107 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701111 -0.325704 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685545 -0.337211 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681717 -0.338018 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656357 -0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.677411 -0.329538 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674389 -0.332022 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661584 -0.314897 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659378 -0.336346 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643552 -0.321705 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638325 -0.345639 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.672184 -0.353472 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65113 -0.362764 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669162 -0.355956 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684201 -0.391875 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607487 -0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.659645 -0.283164 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.672915 -0.269894 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666987 -0.293281 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649528 -0.275822 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665573 -0.259777 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642185 -0.265705 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.652302 -0.273047 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683032 -0.277236 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669762 -0.290507 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677104 -0.300624 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656357 -0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.663448 -0.328536 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639482 -0.329516 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.654603 -0.314396 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680322 -0.33785 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671477 -0.32371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673232 -0.348145 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665202 -0.35297 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658111 -0.363265 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641237 -0.353951 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603979 -0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.614273 -0.279361 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628413 -0.288206 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613293 -0.303327 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589839 -0.277607 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588858 -0.301572 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.579544 -0.284698 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604959 -0.262487 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594664 -0.269578 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619099 -0.271332 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610775 -0.279656 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.621535 -0.258061 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634468 -0.275921 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616678 -0.264057 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.597842 -0.261795 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592985 -0.267791 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587082 -0.28339 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.615632 -0.27366 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604872 -0.295255 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628565 -0.29152 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550934 -0.258608 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558618 -0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.55307 -0.320611 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57665 -0.325005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563845 -0.30788 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535038 -0.327419 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.545813 -0.314688 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540585 -0.338621 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547843 -0.344544 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.553391 -0.355747 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571423 -0.348938 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663153 -0.332034 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684748 -0.321274 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678752 -0.326131 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666888 -0.308341 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669149 -0.327177 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651289 -0.314244 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647554 -0.337937 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681014 -0.344967 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659419 -0.355727 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675018 -0.349824 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610996 -0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.622198 -0.389739 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.63493 -0.378964 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617804 -0.366159 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598265 -0.394966 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593871 -0.371386 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587062 -0.389418 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61539 -0.407771 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604188 -0.402224 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628121 -0.396997 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684201 -0.391875 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.554344 -0.645066 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.610229 -0.668521 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.633406 -0.663938 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626429 -0.65892 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617928 -0.64522 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617206 -0.673539 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.601728 -0.654822 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.59403 -0.678123 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625707 -0.687239 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602531 -0.691822 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61873 -0.682221 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.622977 -0.619787 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.63767 -0.608008 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.620102 -0.623239 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613891 -0.601637 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.640545 -0.604555 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616766 -0.598184 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625852 -0.616334 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646756 -0.626157 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632063 -0.637936 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.629188 -0.641389 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.585648 -0.598918 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.601562 -0.580238 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605914 -0.59781 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587563 -0.581665 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.581295 -0.581346 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.567297 -0.582773 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565381 -0.600026 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599646 -0.597491 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583732 -0.616171 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603999 -0.615063 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541596 -0.6938 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547376 -0.70016 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564621 -0.690564 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546319 -0.676324 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524351 -0.703396 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523294 -0.679561 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.518571 -0.697037 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542652 -0.717636 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536873 -0.711276 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559898 -0.70804 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517014 -0.624197 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.516313 -0.60809 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538029 -0.616221 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524375 -0.60089 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495298 -0.616065 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.50336 -0.608865 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495999 -0.632172 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508952 -0.631397 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.509653 -0.647504 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530668 -0.639529 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48571 -0.670344 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.466887 -0.67091 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490138 -0.671107 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480853 -0.650637 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46246 -0.670147 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476425 -0.649874 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481283 -0.669581 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471745 -0.690617 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490567 -0.690052 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494995 -0.690815 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.578925 -0.714669 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.597914 -0.729812 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602084 -0.70632 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592661 -0.711617 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.574755 -0.738161 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569503 -0.719965 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555767 -0.723017 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.584178 -0.732864 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565189 -0.71772 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588348 -0.709372 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52304 -0.691213 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.511567 -0.712906 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529503 -0.710453 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.507717 -0.699372 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.505104 -0.693665 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501254 -0.680131 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516576 -0.671972 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.526889 -0.704747 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538362 -0.683054 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544826 -0.702295 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591673 -0.665934 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.605761 -0.658095 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.58746 -0.643855 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607672 -0.647455 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609975 -0.680174 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611885 -0.669535 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595887 -0.688013 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589763 -0.676573 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575674 -0.684413 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571461 -0.662334 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.501645 -0.441164 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.518106 -0.424703 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522721 -0.437548 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.505261 -0.420089 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497031 -0.428319 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484186 -0.423704 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48057 -0.44478 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51449 -0.445778 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498029 -0.462239 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519105 -0.458623 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.560583 -0.44013 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53742 -0.431578 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560583 -0.44013 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53742 -0.431578 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566118 -0.460785 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548489 -0.472887 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548489 -0.472887 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.502679 -0.382226 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.511231 -0.405389 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.482024 -0.376691 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.469922 -0.39432 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.469922 -0.39432 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502679 -0.382226 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.511231 -0.405389 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.430095 -0.460336 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.427669 -0.446904 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450155 -0.45293 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436486 -0.436486 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407609 -0.454311 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416426 -0.443892 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410035 -0.467742 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.421278 -0.470754 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423704 -0.484186 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.443764 -0.47678 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.414851 -0.39469 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434147 -0.403906 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434147 -0.403906 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399731 -0.409811 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403906 -0.434147 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399731 -0.409811 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403906 -0.434147 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.378536 -0.488909 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39432 -0.469922 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378536 -0.488909 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39432 -0.469922 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384071 -0.509564 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405389 -0.511231 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405389 -0.511231 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.482473 -0.512714 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.495905 -0.51514 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506323 -0.506323 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48988 -0.492654 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472055 -0.521531 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46603 -0.499045 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458623 -0.519105 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488498 -0.5352 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475067 -0.532774 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498917 -0.526383 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.4539 -0.564273 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472887 -0.548489 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433245 -0.558738 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431578 -0.53742 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431578 -0.53742 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4539 -0.564273 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472887 -0.548489 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.548119 -0.527958 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538903 -0.508662 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538903 -0.508662 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532998 -0.543078 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508662 -0.538903 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532998 -0.543078 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508662 -0.538903 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335322 -0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313405 -0.629404 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.316595 -0.626214 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335868 -0.624401 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318408 -0.606941 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294133 -0.631217 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295946 -0.611945 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290942 -0.634407 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.311592 -0.648676 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308402 -0.651867 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330864 -0.646863 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384191 -0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.405245 -0.601704 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402224 -0.604188 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389418 -0.587062 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387213 -0.608512 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371386 -0.593871 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366159 -0.617804 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400018 -0.625637 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378964 -0.63493 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396997 -0.628121 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331813 -0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.341105 -0.537564 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355747 -0.553391 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338621 -0.540585 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317172 -0.542791 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314688 -0.545813 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30788 -0.563845 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334297 -0.555596 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325005 -0.57665 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348938 -0.571423 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264535 -0.625895 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.245336 -0.623429 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268271 -0.624736 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260997 -0.604627 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2416 -0.624589 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257262 -0.605787 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2608 -0.627055 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248874 -0.644697 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268073 -0.647163 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271809 -0.646004 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.278768 -0.530773 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286452 -0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.266942 -0.591774 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269578 -0.594664 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.284698 -0.579544 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.283817 -0.601088 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301572 -0.588858 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.303327 -0.613293 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268696 -0.616209 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288206 -0.628413 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271332 -0.619099 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316914 -0.678274 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.31938 -0.697473 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338182 -0.681812 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318074 -0.674538 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298112 -0.693935 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296805 -0.671 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295646 -0.674736 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31822 -0.701209 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315754 -0.682009 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337022 -0.685547 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33883 -0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.351035 -0.675867 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.363265 -0.658111 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348145 -0.673232 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3266 -0.674113 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32371 -0.671477 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314396 -0.654603 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341721 -0.658993 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329516 -0.639482 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.353951 -0.641237 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.412036 -0.664041 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.554344 -0.645066 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.616373 -0.681385 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.639472 -0.678928 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621631 -0.664108 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.629767 -0.661636 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634214 -0.696205 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624508 -0.678912 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611115 -0.698662 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626079 -0.698678 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602979 -0.701135 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.608237 -0.683858 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617144 -0.607573 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.63057 -0.595495 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617371 -0.615286 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605919 -0.594239 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630343 -0.587782 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605692 -0.586526 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616917 -0.59986 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641795 -0.608828 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628369 -0.620906 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628595 -0.628619 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609912 -0.649723 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.631982 -0.640648 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62585 -0.64267 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614812 -0.625749 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616044 -0.647702 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598874 -0.632802 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593974 -0.656777 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627081 -0.664623 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605012 -0.673698 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.620949 -0.666645 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.553573 -0.718878 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.563328 -0.73992 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577348 -0.719679 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559693 -0.720935 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539553 -0.739118 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535918 -0.720133 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529798 -0.718076 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.557208 -0.737863 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547453 -0.716821 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571228 -0.717623 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547112 -0.687216 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.554862 -0.690713 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570641 -0.682694 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.552739 -0.667813 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531333 -0.695235 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52921 -0.672335 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523582 -0.691738 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549235 -0.710116 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541484 -0.706619 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565014 -0.702097 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.491544 -0.682558 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.474542 -0.688647 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498226 -0.686417 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.485132 -0.666351 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46786 -0.684788 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.47845 -0.662492 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484862 -0.678699 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480953 -0.704854 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497955 -0.698765 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504637 -0.702624 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560805 -0.676727 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.57563 -0.689897 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.585222 -0.673115 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575587 -0.693998 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.551213 -0.693509 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55117 -0.69761 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536388 -0.680339 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560848 -0.672626 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546023 -0.659456 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57044 -0.655844 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498776 -0.640408 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.478525 -0.627785 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484234 -0.630799 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497935 -0.615951 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493066 -0.637394 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512476 -0.62556 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.513317 -0.650016 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479365 -0.652241 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499616 -0.664864 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.485075 -0.655255 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.561576 -0.602915 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.570049 -0.602201 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582252 -0.615021 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560414 -0.623084 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549372 -0.590095 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539737 -0.610978 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540899 -0.590808 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571211 -0.582032 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562738 -0.582745 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583414 -0.594852 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335322 -0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.283164 -0.659645 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.269894 -0.672915 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.293281 -0.666987 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275822 -0.649528 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259777 -0.665573 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265705 -0.642185 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273047 -0.652302 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.277236 -0.683032 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290507 -0.669762 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300624 -0.677104 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33883 -0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.350033 -0.661904 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.362764 -0.65113 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345639 -0.638325 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.326099 -0.667131 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321705 -0.643552 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314897 -0.661584 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.343224 -0.679937 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332022 -0.674389 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355956 -0.669162 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286452 -0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.280905 -0.592776 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304484 -0.59717 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291679 -0.580045 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262872 -0.599585 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273647 -0.586853 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26842 -0.610787 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275678 -0.61671 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281225 -0.627912 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299257 -0.621104 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279656 -0.610775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.256944 -0.602632 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26347 -0.606749 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273158 -0.587686 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27313 -0.606658 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.289344 -0.591712 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295841 -0.614801 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263442 -0.62572 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286153 -0.633864 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269968 -0.629838 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.278768 -0.530773 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331813 -0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.342108 -0.551527 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356248 -0.560372 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341128 -0.575492 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317673 -0.549772 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316693 -0.573738 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307378 -0.556863 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332793 -0.534652 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322499 -0.541743 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346933 -0.543497 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332034 -0.663153 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340177 -0.685865 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355123 -0.669651 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33606 -0.679339 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317089 -0.679367 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312971 -0.672841 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308945 -0.656656 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336151 -0.669679 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328008 -0.646968 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351097 -0.653465 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384191 -0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.391282 -0.600701 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367317 -0.601681 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382437 -0.586561 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408157 -0.610016 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399312 -0.595876 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401066 -0.62031 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393037 -0.625136 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385946 -0.635431 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369071 -0.626116 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.412036 -0.664041 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.441164 -0.441164 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.443014 -0.422853 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449156 -0.418916 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.463412 -0.433171 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435021 -0.445101 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455419 -0.455419 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433171 -0.463412 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420766 -0.430846 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418916 -0.449156 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426908 -0.426908 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.383576 -0.43509 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40305 -0.440308 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406245 -0.428383 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380381 -0.447015 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40305 -0.440308 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396659 -0.464158 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377186 -0.45894 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393464 -0.476083 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396659 -0.464158 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.45894 -0.377186 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476083 -0.393464 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464158 -0.396659 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43509 -0.383576 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440308 -0.40305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428383 -0.406245 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447015 -0.380381 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440308 -0.40305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464158 -0.396659 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512714 -0.460336 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.512375 -0.453047 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493241 -0.465554 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497443 -0.44229 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531849 -0.447829 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516916 -0.437072 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532187 -0.455118 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527647 -0.471093 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527985 -0.478381 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508512 -0.483599 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.538038 -0.404771 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532513 -0.427756 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.515053 -0.410297 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529309 -0.396041 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506323 -0.401567 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.515053 -0.410297 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546768 -0.4135 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532513 -0.427756 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541242 -0.436486 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.565623 -0.483869 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54615 -0.478651 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549345 -0.466726 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562428 -0.495794 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54615 -0.478651 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539759 -0.502501 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559233 -0.507719 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536564 -0.514426 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539759 -0.502501 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.460336 -0.512714 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.461599 -0.535539 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478381 -0.527985 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455118 -0.532187 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.443553 -0.520267 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437072 -0.516916 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44229 -0.497443 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.466817 -0.516065 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.465554 -0.493241 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483599 -0.508512 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.507719 -0.559233 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.514426 -0.536564 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502501 -0.539759 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483869 -0.565623 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478651 -0.54615 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.466726 -0.549345 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495794 -0.562428 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478651 -0.54615 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502501 -0.539759 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.523783 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.404771 -0.538038 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.427756 -0.532513 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410297 -0.515053 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396041 -0.529309 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401567 -0.506323 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410297 -0.515053 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4135 -0.546768 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.427756 -0.532513 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436486 -0.541242 -0.222222 RAD 0.00617284 + txt002 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls3.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls3.dat new file mode 100644 index 0000000000..2837425d4d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/balls3.dat @@ -0,0 +1,14804 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 1024 768 + VERBOSE 0 + +CAMERA + ZOOM 1.20711 +ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 5 + CENTER 2.1 1.3 1.7 + VIEWDIR -0.700389 -0.433574 -0.566982 + UPDIR -0.482085 -0.298433 0.82373 + +END_CAMERA + +BACKGROUND 0.078 0.361 0.753 + +LIGHT CENTER 4 3 2 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 1 -4 4 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER -3 1 5 RAD 0.002 COLOR 0.5 0.5 0.5 + +TEXDEF txt001 AMBIENT 0.2 DIFFUSE 0.8 SPECULAR 0 OPACITY 1 +PHONG PLASTIC 0 PHONG_SIZE 100000 + COLOR 1 0.75 0.33 + TEXFUNC 0 + +TRI + V0 12 12 -0.5 V1 -12 -12 -0.5 V2 12 -12 -0.5 + txt001 +TRI + V0 12 12 -0.5 V1 -12 12 -0.5 V2 -12 -12 -0.5 + txt001 +TEXDEF txt002 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 +PHONG PLASTIC 0.5 PHONG_SIZE 45.2776 + COLOR 1 0.9 0.7 + TEXFUNC 0 + + SPHERE CENTER 0 0 0 RAD 0.5 + txt002 + SPHERE CENTER 0.272166 0.272166 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.420314 0.420314 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.470715 0.470715 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.481689 0.481689 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475329 0.45787 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45787 0.475329 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477074 0.494534 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.453255 0.488174 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4661 0.48356 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494534 0.477074 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48356 0.4661 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488174 0.453255 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461623 0.409245 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.47044 0.419664 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447954 0.425689 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.468014 0.433095 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484109 0.40322 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481683 0.416651 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475292 0.392801 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464049 0.395814 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455233 0.385395 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.441563 0.401839 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409245 0.461623 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.419664 0.47044 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433095 0.468014 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.425689 0.447954 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.395814 0.464049 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401839 0.441563 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385395 0.455233 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40322 0.484109 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392801 0.475292 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416651 0.481683 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429405 0.481784 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.441197 0.503434 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452601 0.483752 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434161 0.494577 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418001 0.501466 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410965 0.492609 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406209 0.479816 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436441 0.490641 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42465 0.46899 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447846 0.470958 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.36376 0.497028 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383056 0.487812 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383056 0.487812 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34864 0.481907 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352815 0.457572 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34864 0.481907 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352815 0.457572 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379004 0.431383 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.376578 0.444814 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399064 0.438789 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385395 0.455233 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356518 0.437408 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.365335 0.447826 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358944 0.423976 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.370187 0.420964 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372614 0.407532 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392673 0.414939 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481784 0.429405 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.503434 0.441197 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494577 0.434161 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483752 0.452601 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490641 0.436441 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.470958 0.447846 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46899 0.42465 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501466 0.418001 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479816 0.406209 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492609 0.410965 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431383 0.379004 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.444814 0.376578 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455233 0.385395 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438789 0.399064 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420964 0.370187 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414939 0.392673 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407532 0.372614 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437408 0.356518 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423976 0.358944 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447826 0.365335 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.497028 0.36376 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.487812 0.383056 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.487812 0.383056 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481907 0.34864 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457572 0.352815 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481907 0.34864 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457572 0.352815 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461844 0.304709 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.492085 0.33495 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.492085 0.33495 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488469 0.313874 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471009 0.331334 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495701 0.356025 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474625 0.352409 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495701 0.356025 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51316 0.338566 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51316 0.338566 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.509544 0.31749 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.424345 0.305171 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.40568 0.315605 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403931 0.312107 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419383 0.329161 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426095 0.30867 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.439797 0.322225 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.444759 0.298235 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410643 0.291616 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429307 0.281181 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408893 0.288117 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435193 0.368397 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.440864 0.389015 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457301 0.37895 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.451857 0.367697 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418755 0.378463 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429748 0.357145 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.413085 0.357845 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4242 0.389715 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418529 0.369098 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440637 0.37965 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529584 0.334488 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.546497 0.347572 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532117 0.331508 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522481 0.352406 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.543964 0.350552 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519948 0.355387 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52705 0.337468 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5536 0.329654 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536686 0.31657 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53922 0.313589 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472692 0.367935 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.48474 0.389488 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495668 0.369235 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477004 0.379669 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.461764 0.388188 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.454027 0.37837 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449715 0.366636 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480429 0.377754 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46838 0.356202 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.491357 0.357501 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499343 0.304247 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.518259 0.314219 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519922 0.310678 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504895 0.328108 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.49768 0.307788 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484316 0.321677 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478764 0.297816 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512708 0.290358 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493791 0.280387 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51437 0.286818 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.518736 0.271262 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.539811 0.274878 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.520873 0.290418 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.533373 0.290264 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.537674 0.255722 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531235 0.271108 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516598 0.252106 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.525174 0.255876 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504099 0.25226 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506236 0.271416 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488495 0.241021 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.50716 0.230587 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51153 0.24936 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499694 0.253381 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484125 0.222248 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476659 0.245042 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46546 0.232683 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495961 0.218227 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.477296 0.228661 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.500331 0.237 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450996 0.241483 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.455172 0.217147 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472226 0.232599 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45115 0.228983 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433942 0.226031 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429921 0.237867 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429767 0.250367 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455018 0.229647 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450842 0.253983 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472072 0.245099 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304709 0.461844 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.33495 0.492085 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.33495 0.492085 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331334 0.471009 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313874 0.488469 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338566 0.51316 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31749 0.509544 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338566 0.51316 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356025 0.495701 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356025 0.495701 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352409 0.474625 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.368397 0.435193 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389015 0.440864 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367697 0.451857 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37895 0.457301 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389715 0.4242 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37965 0.440637 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369098 0.418529 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378463 0.418755 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357845 0.413085 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357145 0.429748 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305171 0.424345 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.315605 0.40568 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329161 0.419383 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312107 0.403931 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291616 0.410643 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288117 0.408893 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281181 0.429307 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30867 0.426095 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298235 0.444759 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322225 0.439797 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271262 0.518736 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.274878 0.539811 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290264 0.533373 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290418 0.520873 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.255876 0.525174 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271416 0.506236 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25226 0.504099 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.255722 0.537674 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252106 0.516598 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271108 0.531235 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241483 0.450996 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.217147 0.455172 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228983 0.45115 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.232599 0.472226 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229647 0.455018 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245099 0.472072 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253983 0.450842 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.226031 0.433942 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250367 0.429767 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237867 0.429921 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241021 0.488495 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.230587 0.50716 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253381 0.499694 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24936 0.51153 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218227 0.495961 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237 0.500331 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228661 0.477296 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222248 0.484125 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.232683 0.46546 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245042 0.476659 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334488 0.529584 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.347572 0.546497 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352406 0.522481 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331508 0.532117 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329654 0.5536 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313589 0.53922 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31657 0.536686 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350552 0.543964 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337468 0.52705 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355387 0.519948 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304247 0.499343 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314219 0.518259 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328108 0.504895 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310678 0.519922 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290358 0.512708 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286818 0.51437 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280387 0.493791 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307788 0.49768 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297816 0.478764 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321677 0.484316 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367935 0.472692 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389488 0.48474 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379669 0.477004 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369235 0.495668 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377754 0.480429 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357501 0.491357 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356202 0.46838 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388188 0.461764 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366636 0.449715 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37837 0.454027 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230635 0.38777 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.2506 0.446614 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.264242 0.467193 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.272442 0.447086 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253384 0.459832 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2424 0.46672 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.231541 0.459359 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228758 0.446141 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261459 0.453974 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247817 0.433396 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269659 0.433868 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301839 0.407906 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.319874 0.420236 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.303021 0.407886 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296625 0.428474 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318692 0.420256 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295442 0.428494 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300656 0.407926 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325088 0.399668 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307053 0.387338 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308235 0.387318 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253236 0.449775 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.263032 0.459076 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270029 0.436804 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247378 0.440021 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.246239 0.472047 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230585 0.452992 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236443 0.462746 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26889 0.468829 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259094 0.459528 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275887 0.446557 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179397 0.426478 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.174744 0.447688 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197172 0.437457 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.1895 0.447523 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156968 0.436708 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171724 0.436544 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161621 0.415499 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164641 0.426642 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.169293 0.405432 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187069 0.416412 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182032 0.429639 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177682 0.45215 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.190087 0.449636 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200611 0.44299 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.169628 0.432153 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192556 0.422992 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173978 0.409641 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159104 0.438799 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.163454 0.416288 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171508 0.436286 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159431 0.367634 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.13761 0.368692 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.158434 0.366998 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153102 0.387887 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138607 0.369329 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.154099 0.388523 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160429 0.36827 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.14394 0.34844 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165761 0.347381 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164764 0.346745 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227999 0.384609 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.237348 0.393812 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251829 0.390976 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234368 0.408432 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213518 0.387445 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210538 0.402066 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.204169 0.378242 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23098 0.369989 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221631 0.360786 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245461 0.367152 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208034 0.325765 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.209548 0.312342 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229235 0.324887 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209827 0.337 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188347 0.31322 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188626 0.337878 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.186834 0.326643 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207755 0.301107 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206242 0.31453 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227442 0.313652 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279238 0.345901 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.302145 0.344931 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297823 0.356827 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.289691 0.366251 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28356 0.334005 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271106 0.355325 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260653 0.334975 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291692 0.324581 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268785 0.325551 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28737 0.336477 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.102505 0.502308 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.110567 0.524146 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.126738 0.506465 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.112687 0.504055 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0863343 0.519988 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0884544 0.499897 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0782715 0.49815 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100385 0.522399 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0923218 0.500561 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.116555 0.504718 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160392 0.474661 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177777 0.492047 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176681 0.473492 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159222 0.490951 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161488 0.493217 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142932 0.492121 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144102 0.475831 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178947 0.475757 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161561 0.458371 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177851 0.457202 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160392 0.474661 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.167697 0.481967 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161561 0.458371 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144102 0.475831 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166528 0.498257 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142932 0.492121 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159222 0.490951 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183987 0.480797 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176681 0.473492 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177851 0.457202 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0450372 0.477623 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.055591 0.475469 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696413 0.47788 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0465898 0.4591 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.071194 0.459357 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0586963 0.438424 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325396 0.45669 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446461 0.436013 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0430934 0.454536 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.10495 0.439381 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0911807 0.435691 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10864 0.45315 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128801 0.43299 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13249 0.44676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138881 0.42291 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111341 0.415531 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121421 0.40545 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0975713 0.411841 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.052284 0.366554 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0708393 0.36765 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0533799 0.385109 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511144 0.382844 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0522103 0.401399 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685002 0.400229 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685739 0.365384 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0859596 0.38277 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0871292 0.36648 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571437 0.456947 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0493251 0.475575 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0725262 0.467381 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.06557 0.479825 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0339426 0.465141 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0501875 0.46939 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0417612 0.446512 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0408988 0.452697 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0487174 0.434069 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0640999 0.444504 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696698 0.383939 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0623642 0.376634 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0859596 0.38277 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0685002 0.400229 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0460743 0.377803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0522103 0.401399 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0533799 0.385109 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0635337 0.360344 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0708393 0.36765 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0871292 0.36648 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115031 0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.125111 0.439381 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138881 0.435691 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121421 0.45315 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101261 0.43299 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0975713 0.44676 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0911807 0.42291 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11872 0.415531 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10864 0.40545 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13249 0.411841 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.082487 0.239622 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0438957 0.258053 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0426858 0.273525 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.064638 0.265928 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0510334 0.281546 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0219434 0.26565 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.030291 0.273671 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0231533 0.250178 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0355481 0.250032 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.036758 0.23456 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0575003 0.242434 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117687 0.252557 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.135677 0.265544 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138361 0.25778 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12224 0.275732 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.115003 0.26032 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101567 0.270508 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.097014 0.247334 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131123 0.242369 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.113134 0.229382 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.133808 0.234605 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0863845 0.308551 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0971427 0.330622 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.109956 0.310023 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.091905 0.317013 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0735708 0.329151 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0683331 0.315541 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0628126 0.30708 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0916222 0.322161 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.080864 0.30009 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104436 0.301561 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00869528 0.245118 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0110117 0.257416 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00823377 0.253319 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0102865 0.269325 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0105502 0.249215 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.010748 0.261124 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00915679 0.236916 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0126029 0.233209 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00710408 0.22091 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00664257 0.229111 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511841 0.295616 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0555846 0.315856 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0705987 0.309941 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0705297 0.296292 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.03617 0.301531 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511152 0.281968 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0317696 0.281291 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.036239 0.31518 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0318385 0.29494 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.051253 0.309265 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0472866 0.226687 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.025169 0.224935 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0281502 0.217281 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0288111 0.241399 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0443054 0.234341 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0479475 0.250805 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.066423 0.236092 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0436445 0.210223 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0657621 0.211974 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0466257 0.202569 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0399982 0.189123 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0335228 0.179527 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0567332 0.187058 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0385291 0.203632 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0167878 0.181593 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.021794 0.205698 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0232631 0.191189 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0349919 0.165018 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0414672 0.174615 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0582023 0.172549 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0785895 0.170692 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0867911 0.147549 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101845 0.166573 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.083121 0.161663 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0635354 0.151669 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0598652 0.165782 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0553337 0.174812 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822597 0.156579 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.074058 0.179722 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0973138 0.175603 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11379 0.183628 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.133336 0.176775 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136161 0.192663 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124499 0.199753 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110965 0.167739 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102127 0.190718 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0914184 0.174592 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.122627 0.160649 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103081 0.167502 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125452 0.176537 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38777 0.230635 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.446614 0.2506 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.467193 0.264242 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459832 0.253384 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447086 0.272442 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.453974 0.261459 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433868 0.269659 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433396 0.247817 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46672 0.2424 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446141 0.228758 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459359 0.231541 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449775 0.253236 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.459076 0.263032 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440021 0.247378 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436804 0.270029 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.468829 0.26889 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446557 0.275887 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459528 0.259094 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472047 0.246239 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.462746 0.236443 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452992 0.230585 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407906 0.301839 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.420236 0.319874 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428474 0.296625 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407886 0.303021 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399668 0.325088 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387318 0.308235 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387338 0.307053 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420256 0.318692 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407926 0.300656 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428494 0.295442 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384609 0.227999 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.393812 0.237348 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408432 0.234368 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.390976 0.251829 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369989 0.23098 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367152 0.245461 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360786 0.221631 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387445 0.213518 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378242 0.204169 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402066 0.210538 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345901 0.279238 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.344931 0.302145 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366251 0.289691 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356827 0.297823 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324581 0.291692 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336477 0.28737 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325551 0.268785 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334005 0.28356 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334975 0.260653 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355325 0.271106 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325765 0.208034 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.312342 0.209548 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337 0.209827 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324887 0.229235 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301107 0.207755 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313652 0.227442 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31453 0.206242 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31322 0.188347 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.326643 0.186834 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337878 0.188626 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426478 0.179397 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.447688 0.174744 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447523 0.1895 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437457 0.197172 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426642 0.164641 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416412 0.187069 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405432 0.169293 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436708 0.156968 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.415499 0.161621 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436544 0.171724 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367634 0.159431 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.368692 0.13761 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387887 0.153102 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366998 0.158434 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34844 0.14394 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346745 0.164764 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347381 0.165761 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369329 0.138607 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36827 0.160429 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388523 0.154099 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429639 0.182032 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.45215 0.177682 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44299 0.200611 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449636 0.190087 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438799 0.159104 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436286 0.171508 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416288 0.163454 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.432153 0.169628 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409641 0.173978 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.422992 0.192556 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.239622 0.082487 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.258053 0.0438957 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.273525 0.0426858 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281546 0.0510334 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265928 0.064638 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250032 0.0355481 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242434 0.0575003 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23456 0.036758 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26565 0.0219434 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250178 0.0231533 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273671 0.030291 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308551 0.0863845 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.330622 0.0971427 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317013 0.091905 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310023 0.109956 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322161 0.0916222 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301561 0.104436 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30009 0.080864 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329151 0.0735708 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30708 0.0628126 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315541 0.0683331 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252557 0.117687 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.265544 0.135677 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275732 0.12224 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25778 0.138361 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242369 0.131123 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234605 0.133808 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229382 0.113134 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26032 0.115003 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247334 0.097014 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270508 0.101567 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.189123 0.0399982 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.179527 0.0335228 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203632 0.0385291 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187058 0.0567332 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165018 0.0349919 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172549 0.0582023 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174615 0.0414672 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181593 0.0167878 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191189 0.0232631 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205698 0.021794 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183628 0.11379 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.176775 0.133336 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.199753 0.124499 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192663 0.136161 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160649 0.122627 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176537 0.125452 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167502 0.103081 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167739 0.110965 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174592 0.0914184 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.190718 0.102127 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.170692 0.0785895 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.147549 0.0867911 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161663 0.083121 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166573 0.101845 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156579 0.0822597 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.175603 0.0973138 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179722 0.074058 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.151669 0.0635354 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174812 0.0553337 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165782 0.0598652 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245118 0.00869528 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.257416 -0.0110117 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269325 0.0102865 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253319 0.00823377 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233209 -0.0126029 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229111 0.00664257 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22091 0.00710408 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249215 -0.0105502 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236916 0.00915679 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261124 0.010748 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.226687 0.0472866 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.224935 0.025169 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241399 0.0288111 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217281 0.0281502 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210223 0.0436445 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202569 0.0466257 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211974 0.0657621 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234341 0.0443054 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236092 0.066423 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250805 0.0479475 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295616 0.0511841 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.315856 0.0555846 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296292 0.0705297 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309941 0.0705987 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31518 0.036239 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309265 0.051253 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29494 0.0318385 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301531 0.03617 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281291 0.0317696 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281968 0.0511152 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.502308 0.102505 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.524146 0.110567 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504055 0.112687 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506465 0.126738 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522399 0.100385 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504718 0.116555 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.500561 0.0923218 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519988 0.0863343 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.49815 0.0782715 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499897 0.0884544 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474661 0.160392 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.481967 0.167697 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475831 0.144102 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458371 0.161561 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480797 0.183987 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457202 0.177851 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.473492 0.176681 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498257 0.166528 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490951 0.159222 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492121 0.142932 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.474661 0.160392 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.492047 0.177777 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490951 0.159222 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.473492 0.176681 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475757 0.178947 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.457202 0.177851 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458371 0.161561 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493217 0.161488 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475831 0.144102 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.492121 0.142932 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.475575 0.0493251 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479825 0.06557 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.467381 0.0725262 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452697 0.0408988 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.444504 0.0640999 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434069 0.0487174 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.465141 0.0339426 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446512 0.0417612 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46939 0.0501875 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.439381 0.125111 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45315 0.121421 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435691 0.138881 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.415531 0.11872 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.411841 0.13249 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40545 0.10864 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43299 0.101261 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42291 0.0911807 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44676 0.0975713 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.376634 0.0623642 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400229 0.0685002 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38277 0.0859596 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360344 0.0635337 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36648 0.0871292 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36765 0.0708393 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377803 0.0460743 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385109 0.0533799 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401399 0.0522103 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.456947 0.0571437 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.477623 0.0450372 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.47788 0.0696413 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475469 0.055591 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45669 0.0325396 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.454536 0.0430934 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436013 0.0446461 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4591 0.0465898 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.438424 0.0586963 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.459357 0.071194 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383939 0.0696698 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.366554 0.052284 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385109 0.0533799 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36765 0.0708393 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.365384 0.0685739 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36648 0.0871292 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38277 0.0859596 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382844 0.0511144 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400229 0.0685002 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401399 0.0522103 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4293 0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.41922 0.125111 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40545 0.121421 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42291 0.138881 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44307 0.11872 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44676 0.13249 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45315 0.10864 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.425611 0.101261 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435691 0.0911807 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.411841 0.0975713 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.802608 0.281471 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.824035 0.30566 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.822021 0.302088 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.821938 0.282758 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802598 0.298094 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824119 0.32499 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.804695 0.320997 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826132 0.328563 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843459 0.309654 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845472 0.313227 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843375 0.290324 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.787796 0.241352 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.785699 0.218449 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802677 0.22345 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.778718 0.223304 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770818 0.236351 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.763837 0.241205 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.772915 0.259253 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794777 0.236497 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.796874 0.2594 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811756 0.241498 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.752156 0.305221 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.741263 0.325175 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.747715 0.32493 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.765112 0.325981 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745704 0.305466 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.769553 0.306272 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.756597 0.285513 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.728307 0.304415 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7392 0.284462 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.734759 0.304171 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838847 0.34578 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.851488 0.360404 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853509 0.335865 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832518 0.347059 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.836826 0.370319 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817857 0.356973 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824185 0.355695 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857816 0.359125 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845176 0.344501 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.859838 0.334587 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.766968 0.345341 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.768944 0.369945 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788341 0.356172 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.780624 0.356171 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.747572 0.359113 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759252 0.34534 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745596 0.33451 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755289 0.359115 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753313 0.334511 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774685 0.345342 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817421 0.321591 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.83071 0.340361 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.840365 0.325527 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.822249 0.341208 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.807766 0.336425 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799305 0.337272 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794477 0.317654 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.825882 0.320744 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.812593 0.301973 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.835537 0.30591 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.874487 0.28191 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.891539 0.292033 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868678 0.28812 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.872763 0.305711 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897348 0.285824 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.878572 0.299501 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880296 0.275701 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.893263 0.268233 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876212 0.25811 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.870402 0.264319 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853061 0.257721 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.87538 0.26204 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87108 0.266856 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.860805 0.280934 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857361 0.252905 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842785 0.271799 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.835041 0.248586 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867636 0.238827 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845317 0.234508 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.863337 0.243643 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838248 0.217602 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.860225 0.206363 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858689 0.230102 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.854636 0.223536 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.839784 0.193863 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.834196 0.211035 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817808 0.205101 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843837 0.200429 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.821861 0.211667 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842301 0.224168 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.61371 0.202787 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.61556 0.221097 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621702 0.225035 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635958 0.210779 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607567 0.198849 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627965 0.188531 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605717 0.180539 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593312 0.213105 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591462 0.194794 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599454 0.217042 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.556122 0.208861 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575596 0.203643 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.578791 0.215568 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.552927 0.196936 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575596 0.203643 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569205 0.179793 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549732 0.185011 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.56601 0.167868 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569205 0.179793 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.631486 0.266765 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648629 0.250487 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.636704 0.247291 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607636 0.260374 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612854 0.240901 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600929 0.237705 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619561 0.26357 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612854 0.240901 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.636704 0.247291 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68526 0.183615 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684921 0.190903 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665787 0.178397 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669989 0.201661 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704395 0.196121 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.689462 0.206879 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704733 0.188833 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700193 0.172858 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700531 0.165569 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681058 0.160351 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.710584 0.23918 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705059 0.216195 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687599 0.233654 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701855 0.24791 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678869 0.242384 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687599 0.233654 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.719314 0.23045 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705059 0.216195 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.713788 0.207465 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.738169 0.160081 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718696 0.165299 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721891 0.177224 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.734974 0.148156 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718696 0.165299 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712305 0.141449 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731779 0.136231 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70911 0.129524 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712305 0.141449 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632882 0.131237 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.634145 0.108412 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.650927 0.115965 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627664 0.111763 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616099 0.123683 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609618 0.127034 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614836 0.146508 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639363 0.127886 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.6381 0.15071 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656145 0.135439 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.680265 0.0847178 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.686972 0.107387 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675047 0.104191 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656415 0.0783272 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651197 0.0978007 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639272 0.0946054 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.66834 0.0815225 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651197 0.0978007 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675047 0.104191 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.577317 0.105912 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600302 0.111438 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582843 0.128897 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.568587 0.114642 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.574113 0.137627 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582843 0.128897 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586046 0.0971825 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600302 0.111438 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609032 0.102708 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594141 0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.619127 0.408291 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.625955 0.411883 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630791 0.390369 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607547 0.396287 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61429 0.429805 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595882 0.414208 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607462 0.426212 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.637535 0.423887 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630706 0.420295 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642371 0.402373 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.68332 0.389713 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68332 0.389713 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688854 0.369058 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638217 0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.652948 0.344865 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632683 0.357697 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651954 0.357326 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658482 0.324211 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.657489 0.336672 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643752 0.316388 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639211 0.324581 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624481 0.316758 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618946 0.337413 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547576 0.389119 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.541008 0.410169 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548718 0.410472 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564748 0.405866 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539866 0.388816 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563607 0.384513 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546435 0.367766 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523836 0.393422 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530405 0.372372 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531546 0.393725 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566667 0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.555534 0.296626 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572202 0.297216 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550163 0.307914 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549999 0.31728 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544629 0.328569 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.561133 0.338525 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572037 0.306582 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583171 0.327827 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588706 0.307172 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.501272 0.340934 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501272 0.340934 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506807 0.320279 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57505 0.429687 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.58161 0.452905 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5989 0.436077 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586467 0.434777 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55776 0.446515 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562617 0.428387 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5512 0.423296 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570193 0.447815 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563633 0.424596 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587483 0.430987 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550064 0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547099 0.396248 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569716 0.388263 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.557504 0.403175 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527447 0.387819 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.537852 0.394747 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530412 0.371406 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539659 0.372907 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542624 0.356494 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562276 0.364922 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621614 0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.637209 0.41723 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642848 0.401533 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624734 0.418027 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.615976 0.414703 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603501 0.4155 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600381 0.39648 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634089 0.39821 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618494 0.379986 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639728 0.382513 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.802608 0.281471 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.858698 0.329459 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.872345 0.34259 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86421 0.32016 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848329 0.338969 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.866833 0.351888 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842817 0.348268 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853186 0.338757 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882715 0.333079 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.869068 0.319948 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87458 0.310649 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845371 0.280879 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.849036 0.291048 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826067 0.287867 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.840755 0.304882 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868341 0.28406 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86006 0.297894 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.864676 0.273891 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853652 0.267046 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.849987 0.256877 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.830683 0.263865 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.798572 0.337088 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.808673 0.346884 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.82298 0.335792 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.807762 0.322361 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.784265 0.34818 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.783355 0.323657 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774164 0.338384 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799483 0.361611 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.789382 0.351815 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.81379 0.350519 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.815936 0.330051 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.828769 0.350165 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838905 0.333232 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.820583 0.347547 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.805799 0.346984 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.797614 0.344366 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.792966 0.32687 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.824121 0.332668 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811288 0.312554 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.834258 0.315735 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.75581 0.33768 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.753851 0.362219 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774086 0.350765 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76987 0.352319 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.735575 0.349134 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751594 0.339233 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737534 0.324595 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739791 0.347581 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.74175 0.323042 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760026 0.336127 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759846 0.282063 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.756464 0.29233 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.779336 0.288514 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.765125 0.305929 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736973 0.285879 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745634 0.299478 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.740355 0.275612 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751185 0.268464 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.754567 0.258198 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774058 0.264649 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.862735 0.273842 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.885497 0.282313 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876946 0.281455 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867718 0.29787 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871286 0.274699 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.853506 0.290257 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848523 0.266228 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880514 0.258284 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857752 0.249813 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871963 0.257427 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.806645 0.225855 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.818054 0.21762 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.83061 0.230661 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.813612 0.241754 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.794089 0.212813 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.789647 0.236948 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.78268 0.221048 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.811087 0.20172 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.799677 0.209955 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.823642 0.214761 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.849407 0.225263 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.873186 0.21889 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.865588 0.240865 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.866351 0.236437 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857005 0.203288 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.850171 0.220835 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.833227 0.20966 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.856242 0.207715 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832464 0.214088 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848644 0.22969 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594141 0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.613592 0.428945 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626191 0.448155 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634643 0.42519 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614455 0.43276 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60514 0.45191 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593404 0.436515 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592541 0.4327 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625328 0.44434 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.612729 0.42513 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.63378 0.421375 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.68332 0.389713 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68332 0.389713 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660156 0.398265 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665691 0.37761 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688854 0.369058 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671225 0.356956 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621614 0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.625435 0.399844 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627149 0.378352 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60511 0.38905 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619901 0.420499 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599576 0.409705 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61608 0.419661 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641939 0.409801 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638118 0.408963 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643653 0.388308 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542042 0.409774 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.53788 0.433888 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558395 0.423551 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55574 0.426423 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.521526 0.42011 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539387 0.412646 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.525689 0.395996 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524182 0.417238 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528344 0.393124 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544697 0.406901 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.550064 0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.540802 0.399304 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54453 0.400489 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563801 0.400119 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546337 0.37865 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569335 0.379464 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555599 0.35918 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527065 0.37902 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536327 0.359551 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530793 0.380205 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.501272 0.340934 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501272 0.340934 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517056 0.359921 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522591 0.339267 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506807 0.320279 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.528125 0.318612 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586119 0.388377 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.594185 0.405974 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609969 0.394768 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593017 0.410332 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570335 0.399584 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569167 0.403942 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562269 0.381987 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587286 0.384019 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57922 0.366422 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.60307 0.372813 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566667 0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.567308 0.314012 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587901 0.320398 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569787 0.336891 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546074 0.311485 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548554 0.334364 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.545434 0.315344 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564188 0.294991 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563547 0.29885 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.584781 0.301377 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638217 0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.659244 0.341809 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65787 0.345471 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645657 0.360383 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639592 0.33338 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626005 0.351955 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.618565 0.328614 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651804 0.318468 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630777 0.313702 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65043 0.32213 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643951 0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.674191 0.202787 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.690652 0.219248 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695267 0.206403 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677807 0.223862 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669577 0.215632 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656732 0.220246 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.653116 0.199171 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687036 0.198172 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.670575 0.181711 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.691651 0.185327 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.733129 0.203821 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.709966 0.212373 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.733129 0.203821 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.709966 0.212373 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715501 0.191718 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.738664 0.183166 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721035 0.171063 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721035 0.171063 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.675225 0.261725 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683777 0.238562 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65457 0.267259 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642468 0.249631 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642468 0.249631 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675225 0.261725 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663122 0.244096 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683777 0.238562 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602641 0.183615 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600215 0.197046 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.622701 0.191021 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609032 0.207465 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.580155 0.18964 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588972 0.200059 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582581 0.176209 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593824 0.173196 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.596251 0.159765 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61631 0.167171 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.587397 0.24926 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606693 0.240045 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606693 0.240045 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572277 0.23414 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.576452 0.209804 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.572277 0.23414 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.576452 0.209804 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591572 0.224924 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.551082 0.155041 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566866 0.174029 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.551082 0.155041 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566866 0.174029 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.5724 0.153374 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.556617 0.134387 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577935 0.13272 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577935 0.13272 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655019 0.131237 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.668451 0.12881 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678869 0.137627 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.662426 0.151296 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644601 0.12242 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638576 0.144906 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.631169 0.124846 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661044 0.108751 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647613 0.111177 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671463 0.117567 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626446 0.0796777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645433 0.0954616 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605791 0.0852121 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604124 0.10653 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604124 0.10653 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626446 0.0796777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624779 0.100996 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645433 0.0954616 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.720665 0.115992 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.711449 0.135288 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.711449 0.135288 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705544 0.100872 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681209 0.105047 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705544 0.100872 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681209 0.105047 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.696329 0.120168 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852418 0.0955788 1.89979e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.922609 0.11107 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.937225 0.122151 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.916553 0.11086 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915202 0.131874 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.943281 0.12236 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.921258 0.132084 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.928665 0.111279 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.944632 0.101346 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.930016 0.0902645 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.92396 0.090055 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.867231 0.135698 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.873196 0.134634 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882112 0.117797 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858152 0.11765 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.858315 0.152536 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.843271 0.135552 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852349 0.1536 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882275 0.152682 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876309 0.153747 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89119 0.135845 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.877966 0.164775 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.890926 0.182656 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897331 0.159019 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.876622 0.167676 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.871561 0.188412 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857256 0.173431 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.8586 0.17053 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89227 0.179755 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.87931 0.161874 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.898675 0.156118 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.907797 0.0709499 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.930963 0.0752104 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.924191 0.0806562 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915684 0.0941344 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.914568 0.0655041 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.899289 0.0844281 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.891402 0.0612436 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.923076 0.0520258 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.89991 0.0477654 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.916304 0.0574717 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.863153 0.124655 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.875744 0.141535 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.88655 0.129819 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.868763 0.146389 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.852347 0.136371 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.845366 0.141225 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.839756 0.119492 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.870135 0.119801 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.857544 0.102922 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.880941 0.108085 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.837606 0.0554592 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.842832 0.0523913 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.86055 0.0593957 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.842434 0.0750766 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.819888 0.0484547 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.81949 0.07114 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.814662 0.0515226 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.838004 0.0327739 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.832778 0.0358417 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.855722 0.0397783 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.897062 0.0418734 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.920407 0.0359958 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.912106 0.0588574 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.915603 0.0511067 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.905363 0.0190117 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.900559 0.0341227 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.882018 0.0248894 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.901866 0.0267625 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.878521 0.0326401 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.893565 0.0496241 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.826871 0.0263827 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.825102 0.00436945 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.84533 0.018173 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.823964 0.025051 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.806642 0.0125791 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.805505 0.0332607 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.808411 0.0345923 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.828008 0.00570109 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.829777 0.0277143 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.848237 0.0195047 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.841683 0.0665023 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.840284 0.0454909 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.856111 0.0473735 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.831823 0.0463379 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.825856 0.0646197 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.817395 0.0654667 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.827255 0.0856311 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.850144 0.0656554 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.851543 0.0866667 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.865971 0.0675379 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.69376 -0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.740325 -0.0440268 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.762259 -0.0417568 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759495 -0.0345526 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.748937 -0.0216407 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743089 -0.051231 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.729767 -0.0311149 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721155 -0.053501 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753646 -0.0641429 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731712 -0.0664129 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750882 -0.0569387 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.782939 0.0179281 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.782939 0.0179281 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788473 -0.00272662 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721234 0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.736829 0.0454452 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.742467 0.0297485 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724354 0.046242 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715595 0.0429182 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70312 0.043715 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7 0.0246945 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.733709 0.0264247 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718114 0.00820099 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739347 0.010728 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.668775 -0.0631985 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.669983 -0.0708196 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.690113 -0.0618185 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671462 -0.0467378 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648644 -0.0721997 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.650123 -0.0481178 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647436 -0.0645786 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667296 -0.0872804 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666087 -0.0796593 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687426 -0.0782793 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649684 0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.646718 0.0244627 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669336 0.016478 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.657124 0.0313903 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627066 0.0160343 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.637471 0.022962 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630031 -0.000378614 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639278 0.00112207 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642244 -0.0152909 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661896 -0.00686255 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600892 -0.0308513 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600892 -0.0308513 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606426 -0.051506 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712851 -0.0845947 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.730141 -0.101422 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736701 -0.0782041 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725284 -0.0832945 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.706291 -0.107813 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701434 -0.0896851 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.689001 -0.0909853 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.717709 -0.102723 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700418 -0.0858949 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724268 -0.0795043 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666287 -0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.655153 -0.0751594 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671821 -0.0745692 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649783 -0.0638711 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649619 -0.0545047 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644249 -0.0432164 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660752 -0.0332597 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671657 -0.0652028 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682791 -0.0439578 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688325 -0.0646126 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737837 -0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.752567 -0.0269197 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.732303 -0.014088 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751574 -0.0144587 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.758102 -0.0475745 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.757108 -0.0351134 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743371 -0.0553974 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.73883 -0.0472037 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7241 -0.0550267 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718566 -0.0343719 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.69376 -0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.745859 -0.0646815 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.770032 -0.0684873 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759394 -0.0481266 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.762305 -0.0507391 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.756497 -0.0850422 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.74877 -0.067294 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.732325 -0.0812364 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.753586 -0.0824297 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.729413 -0.0786239 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.742948 -0.062069 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.782939 0.0179281 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.782939 0.0179281 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759776 0.02648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.76531 0.0058253 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.788473 -0.00272662 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.770845 -0.0148294 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737837 -0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.758864 -0.0299763 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.757489 -0.0263144 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745277 -0.0114021 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.739212 -0.0384047 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725625 -0.0198304 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718185 -0.043171 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751424 -0.0533169 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.730397 -0.0580833 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750049 -0.0496549 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674309 -0.0838533 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.675276 -0.106805 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694308 -0.091423 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673094 -0.0875713 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655278 -0.0992356 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.653095 -0.0800016 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65431 -0.0762835 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.676491 -0.103087 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675524 -0.0801352 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695522 -0.0877049 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666287 -0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.666927 -0.0577732 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.68752 -0.0513875 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669407 -0.034894 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645694 -0.0603001 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648173 -0.0374209 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645053 -0.0564414 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663807 -0.0767937 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663167 -0.072935 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.6844 -0.070408 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.600892 -0.0308513 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.600892 -0.0308513 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616676 -0.0118635 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62221 -0.0325183 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606426 -0.051506 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627745 -0.053173 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701782 -0.0432853 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.717566 -0.0544915 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.725632 -0.0368947 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.718734 -0.0588496 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.693716 -0.0608821 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694884 -0.0652402 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677932 -0.0496759 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700615 -0.0389272 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.684831 -0.027721 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.708681 -0.0213304 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649684 0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.640422 0.0275193 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644149 0.0287044 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.66342 0.0283337 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.645956 0.00686453 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.668955 0.00767898 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.655218 -0.012605 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626685 0.00723527 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635947 -0.0122343 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630413 0.00842045 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721234 0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.725055 0.0280589 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.726768 0.00656677 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.70473 0.0172649 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.71952 0.0487136 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.699195 0.0379196 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.715699 0.0478762 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.741558 0.0380155 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.737738 0.0371781 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743272 0.0165234 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.281471 0.802608 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.30566 0.824035 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.302088 0.822021 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298094 0.802598 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282758 0.821938 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.309654 0.843459 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290324 0.843375 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313227 0.845472 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32499 0.824119 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328563 0.826132 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320997 0.804695 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305221 0.752156 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.325175 0.741263 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325981 0.765112 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32493 0.747715 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304415 0.728307 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304171 0.734759 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.284462 0.7392 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305466 0.745704 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285513 0.756597 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306272 0.769553 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241352 0.787796 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.218449 0.785699 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223304 0.778718 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22345 0.802677 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236497 0.794777 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241498 0.811756 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2594 0.796874 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236351 0.770818 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259253 0.772915 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241205 0.763837 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28191 0.874487 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.292033 0.891539 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305711 0.872763 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28812 0.868678 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268233 0.893263 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264319 0.870402 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.25811 0.876212 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285824 0.897348 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275701 0.880296 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299501 0.878572 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217602 0.838248 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.206363 0.860225 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223536 0.854636 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230102 0.858689 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200429 0.843837 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224168 0.842301 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211667 0.821861 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193863 0.839784 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205101 0.817808 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211035 0.834196 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257721 0.853061 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.26204 0.87538 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280934 0.860805 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266856 0.87108 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238827 0.867636 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243643 0.863337 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234508 0.845317 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.252905 0.857361 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248586 0.835041 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271799 0.842785 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34578 0.838847 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.360404 0.851488 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347059 0.832518 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335865 0.853509 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359125 0.857816 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334587 0.859838 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.344501 0.845176 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.370319 0.836826 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355695 0.824185 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356973 0.817857 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321591 0.817421 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340361 0.83071 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341208 0.822249 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325527 0.840365 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320744 0.825882 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30591 0.835537 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301973 0.812593 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336425 0.807766 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317654 0.794477 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337272 0.799305 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345341 0.766968 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.369945 0.768944 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356171 0.780624 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356172 0.788341 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359115 0.755289 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345342 0.774685 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334511 0.753313 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359113 0.747572 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33451 0.745596 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34534 0.759252 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358439 0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.408291 0.619127 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.411883 0.625955 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396287 0.607547 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.390369 0.630791 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423887 0.637535 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402373 0.642371 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420295 0.630706 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429805 0.61429 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426212 0.607462 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414208 0.595882 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337042 0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.344865 0.652948 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357326 0.651954 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.357697 0.632683 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324581 0.639211 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337413 0.618946 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316758 0.624481 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324211 0.658482 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316388 0.643752 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336672 0.657489 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389713 0.68332 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369058 0.688854 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389713 0.68332 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.429687 0.57505 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.452905 0.58161 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434777 0.586467 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436077 0.5989 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447815 0.570193 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.430987 0.587483 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.424596 0.563633 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.446515 0.55776 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423296 0.5512 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428387 0.562617 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399007 0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.41723 0.637209 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418027 0.624734 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401533 0.642848 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39821 0.634089 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382513 0.639728 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379986 0.618494 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.414703 0.615976 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39648 0.600381 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4155 0.603501 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379835 0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.396248 0.547099 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403175 0.557504 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388263 0.569716 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372907 0.539659 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.364922 0.562276 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356494 0.542624 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387819 0.527447 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371406 0.530412 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.394747 0.537852 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389119 0.547576 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.410169 0.541008 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405866 0.564748 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410472 0.548718 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393422 0.523836 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393725 0.531546 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372372 0.530405 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388816 0.539866 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367766 0.546435 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384513 0.563607 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340934 0.501272 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320279 0.506807 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340934 0.501272 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317871 0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.296626 0.555534 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307914 0.550163 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297216 0.572202 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306582 0.572037 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307172 0.588706 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.327827 0.583171 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31728 0.549999 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338525 0.561133 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328569 0.544629 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.142305 0.674191 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.144155 0.692502 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150298 0.696439 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164554 0.682184 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136163 0.670254 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156561 0.659936 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.134313 0.651943 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.121907 0.684509 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120057 0.666199 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12805 0.688447 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0847178 0.680265 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104191 0.675047 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.107387 0.686972 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0815225 0.66834 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.104191 0.675047 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0978007 0.651197 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0783272 0.656415 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0946054 0.639272 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0978007 0.651197 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.160081 0.738169 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177224 0.721891 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165299 0.718696 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136231 0.731779 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141449 0.712305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.129524 0.70911 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.148156 0.734974 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141449 0.712305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165299 0.718696 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213855 0.655019 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.213517 0.662308 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.194382 0.649801 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198584 0.673065 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23299 0.667526 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218058 0.678283 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233329 0.660237 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228788 0.644262 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229127 0.636974 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209653 0.631756 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.23918 0.710584 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233654 0.687599 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.216195 0.705059 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23045 0.719314 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207465 0.713788 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.216195 0.705059 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24791 0.701855 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233654 0.687599 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242384 0.678869 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.266765 0.631486 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247291 0.636704 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250487 0.648629 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26357 0.619561 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247291 0.636704 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240901 0.612854 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260374 0.607636 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237705 0.600929 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240901 0.612854 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161477 0.602641 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.162741 0.579817 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179523 0.58737 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156259 0.583168 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144695 0.595088 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138214 0.598439 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.143431 0.617912 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167958 0.59929 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166695 0.622115 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184741 0.606843 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.208861 0.556122 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215568 0.578791 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203643 0.575596 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185011 0.549732 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179793 0.569205 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167868 0.56601 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196936 0.552927 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179793 0.569205 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203643 0.575596 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.105912 0.577317 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128897 0.582843 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111438 0.600302 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0971825 0.586046 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102708 0.609032 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111438 0.600302 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.114642 0.568587 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128897 0.582843 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.137627 0.574113 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0955788 0.852418 9.1293e-17 RAD 0.0555556 + txt002 + SPHERE CENTER 0.11107 0.922609 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.122151 0.937225 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131874 0.915202 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11086 0.916553 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101346 0.944632 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.090055 0.92396 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0902645 0.930016 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12236 0.943281 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111279 0.928665 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.132084 0.921258 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.164775 0.877966 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.182656 0.890926 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167676 0.876622 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159019 0.897331 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179755 0.89227 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156118 0.898675 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161874 0.87931 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188412 0.871561 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.17053 0.8586 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173431 0.857256 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135698 0.867231 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.134634 0.873196 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11765 0.858152 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117797 0.882112 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152682 0.882275 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135845 0.89119 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153747 0.876309 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152536 0.858315 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.1536 0.852349 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135552 0.843271 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0418734 0.897062 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0359958 0.920407 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511067 0.915603 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0588574 0.912106 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0267625 0.901866 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496241 0.893565 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0326401 0.878521 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0190117 0.905363 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0248894 0.882018 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0341227 0.900559 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0665023 0.841683 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0454909 0.840284 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0463379 0.831823 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0473735 0.856111 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0656554 0.850144 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0675379 0.865971 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0866667 0.851543 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646197 0.825856 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0856311 0.827255 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0654667 0.817395 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0263827 0.826871 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.00436945 0.825102 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.025051 0.823964 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.018173 0.84533 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00570109 0.828008 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0195047 0.848237 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0277143 0.829777 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0125791 0.806642 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0345923 0.808411 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0332607 0.805505 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0709499 0.907797 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0752104 0.930963 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0941344 0.915684 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0806562 0.924191 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0520258 0.923076 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0574717 0.916304 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0477654 0.89991 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0655041 0.914568 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0612436 0.891402 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0844281 0.899289 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0554592 0.837606 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0523913 0.842832 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0750766 0.842434 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0593957 0.86055 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0327739 0.838004 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0397783 0.855722 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0358417 0.832778 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0484547 0.819888 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0515226 0.814662 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.07114 0.81949 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124655 0.863153 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.141535 0.875744 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.146389 0.868763 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.129819 0.88655 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119801 0.870135 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108085 0.880941 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102922 0.857544 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.136371 0.852347 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119492 0.839756 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141225 0.845366 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0133465 0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0646815 0.745859 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0684873 0.770032 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0507391 0.762305 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0481266 0.759394 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0824297 0.753586 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.062069 0.742948 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0786239 0.729413 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0850422 0.756497 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0812364 0.732325 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.067294 0.74877 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0347427 0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0299763 0.758864 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0114021 0.745277 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0263144 0.757489 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0533169 0.751424 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0496549 0.750049 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0580833 0.730397 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0384047 0.739212 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.043171 0.718185 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0198304 0.725625 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0179281 0.782939 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00272662 0.788473 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0179281 0.782939 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0432853 0.701782 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0544915 0.717566 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0588496 0.718734 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0368947 0.725632 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0389272 0.700615 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0213304 0.708681 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.027721 0.684831 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0608821 0.693716 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0496759 0.677932 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0652402 0.694884 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0272215 0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0280589 0.725055 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0172649 0.70473 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00656677 0.726768 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0380155 0.741558 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0165234 0.743272 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0371781 0.737738 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0487136 0.71952 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0478762 0.715699 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0379196 0.699195 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00804971 0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0275193 0.640422 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0283337 0.66342 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0287044 0.644149 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00723527 0.626685 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00842045 0.630413 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0122343 0.635947 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00686453 0.645956 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.012605 0.655218 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00767898 0.668955 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0838533 0.674309 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.106805 0.675276 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0875713 0.673094 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.091423 0.694308 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103087 0.676491 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0877049 0.695522 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0801352 0.675524 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0992356 0.655278 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0762835 0.65431 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0800016 0.653095 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0308513 0.600892 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051506 0.606426 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308513 0.600892 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0539145 0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0577732 0.666927 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.034894 0.669407 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0513875 0.68752 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0767937 0.663807 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.070408 0.6844 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.072935 0.663167 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0603001 0.645694 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0564414 0.645053 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0374209 0.648173 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0133465 0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0440268 0.740325 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0417568 0.762259 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0216407 0.748937 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0345526 0.759495 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0641429 0.753646 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0569387 0.750882 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0664129 0.731712 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051231 0.743089 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053501 0.721155 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0311149 0.729767 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0272215 0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0454452 0.736829 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.046242 0.724354 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0297485 0.742467 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0264247 0.733709 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.010728 0.739347 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00820099 0.718114 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0429182 0.715595 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0246945 0.7 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.043715 0.70312 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0179281 0.782939 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00272662 0.788473 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0148294 0.770845 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0179281 0.782939 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058253 0.76531 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02648 0.759776 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0845947 0.712851 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.101422 0.730141 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0832945 0.725284 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0782041 0.736701 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.102723 0.717709 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0795043 0.724268 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0858949 0.700418 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107813 0.706291 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0909853 0.689001 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0896851 0.701434 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0347427 0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0269197 0.752567 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0144587 0.751574 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.014088 0.732303 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0472037 0.73883 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0343719 0.718566 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0550267 0.7241 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0475745 0.758102 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0553974 0.743371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0351134 0.757108 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0539145 0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0751594 0.655153 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0638711 0.649783 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745692 0.671821 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0652028 0.671657 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0646126 0.688325 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0439578 0.682791 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0545047 0.649619 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0332597 0.660752 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0432164 0.644249 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0631985 0.668775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0708196 0.669983 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0467378 0.671462 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0618185 0.690113 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0872804 0.667296 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0782793 0.687426 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0796593 0.666087 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0721997 0.648644 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0645786 0.647436 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0481178 0.650123 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0308513 0.600892 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.051506 0.606426 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.053173 0.627745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308513 0.600892 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0325183 0.62221 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0118635 0.616676 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00804971 0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0244627 0.646718 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0313903 0.657124 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.016478 0.669336 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00112207 0.639278 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00686255 0.661896 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0152909 0.642244 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0160343 0.627066 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.000378614 0.630031 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.022962 0.637471 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281471 0.802608 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.329459 0.858698 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.34259 0.872345 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338969 0.848329 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32016 0.86421 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333079 0.882715 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310649 0.87458 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.319948 0.869068 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351888 0.866833 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338757 0.853186 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348268 0.842817 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337088 0.798572 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.346884 0.808673 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322361 0.807762 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335792 0.82298 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.361611 0.799483 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350519 0.81379 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351815 0.789382 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.34818 0.784265 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338384 0.774164 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.323657 0.783355 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280879 0.845371 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.291048 0.849036 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304882 0.840755 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287867 0.826067 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267046 0.853652 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263865 0.830683 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.256877 0.849987 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28406 0.868341 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273891 0.864676 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297894 0.86006 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273842 0.862735 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282313 0.885497 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29787 0.867718 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281455 0.876946 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258284 0.880514 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257427 0.871963 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249813 0.857752 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.274699 0.871286 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266228 0.848523 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290257 0.853506 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225263 0.849407 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.21889 0.873186 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236437 0.866351 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240865 0.865588 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207715 0.856242 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22969 0.848644 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214088 0.832464 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203288 0.857005 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20966 0.833227 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220835 0.850171 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225855 0.806645 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.21762 0.818054 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.241754 0.813612 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230661 0.83061 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20172 0.811087 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214761 0.823642 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209955 0.799677 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212813 0.794089 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221048 0.78268 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236948 0.789647 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330051 0.815936 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.350165 0.828769 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347547 0.820583 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333232 0.838905 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332668 0.824121 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315735 0.834258 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312554 0.811288 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346984 0.805799 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32687 0.792966 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.344366 0.797614 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282063 0.759846 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.29233 0.756464 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305929 0.765125 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288514 0.779336 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268464 0.751185 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264649 0.774058 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258198 0.754567 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285879 0.736973 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275612 0.740355 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299478 0.745634 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33768 0.75581 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.362219 0.753851 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352319 0.76987 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350765 0.774086 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.347581 0.739791 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336127 0.760026 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.323042 0.74175 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.349134 0.735575 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324595 0.737534 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339233 0.751594 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172546 0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202787 0.674191 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.219248 0.690652 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223862 0.677807 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206403 0.695267 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198172 0.687036 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185327 0.691651 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181711 0.670575 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215632 0.669577 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.199171 0.653116 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220246 0.656732 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.261725 0.675225 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238562 0.683777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261725 0.675225 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238562 0.683777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244096 0.663122 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267259 0.65457 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249631 0.642468 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.249631 0.642468 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.203821 0.733129 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212373 0.709966 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183166 0.738664 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171063 0.721035 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171063 0.721035 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203821 0.733129 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191718 0.715501 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212373 0.709966 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.131237 0.655019 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.12881 0.668451 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.151296 0.662426 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.137627 0.678869 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108751 0.661044 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.117567 0.671463 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111177 0.647613 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.12242 0.644601 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.124846 0.631169 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144906 0.638576 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.115992 0.720665 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135288 0.711449 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.135288 0.711449 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100872 0.705544 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105047 0.681209 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100872 0.705544 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105047 0.681209 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120168 0.696329 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0796777 0.626446 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0954616 0.645433 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0796777 0.626446 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0954616 0.645433 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100996 0.624779 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0852121 0.605791 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10653 0.604124 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10653 0.604124 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183615 0.602641 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.197046 0.600215 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207465 0.609032 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191021 0.622701 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173196 0.593824 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167171 0.61631 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159765 0.596251 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18964 0.580155 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.176209 0.582581 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200059 0.588972 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.155041 0.551082 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174029 0.566866 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.134387 0.556617 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13272 0.577935 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13272 0.577935 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.155041 0.551082 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153374 0.5724 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174029 0.566866 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.24926 0.587397 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240045 0.606693 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240045 0.606693 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23414 0.572277 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209804 0.576452 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23414 0.572277 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.209804 0.576452 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224924 0.591572 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.358439 0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.428945 0.613592 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.448155 0.626191 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43276 0.614455 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42519 0.634643 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44434 0.625328 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.421375 0.63378 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42513 0.612729 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.45191 0.60514 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4327 0.592541 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436515 0.593404 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399007 0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399844 0.625435 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38905 0.60511 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378352 0.627149 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409801 0.641939 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388308 0.643653 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408963 0.638118 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420499 0.619901 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419661 0.61608 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409705 0.599576 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.389713 0.68332 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369058 0.688854 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356956 0.671225 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389713 0.68332 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37761 0.665691 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.398265 0.660156 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388377 0.586119 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.405974 0.594185 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410332 0.593017 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.394768 0.609969 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384019 0.587286 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372813 0.60307 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366422 0.57922 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399584 0.570335 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.381987 0.562269 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403942 0.569167 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337042 0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.341809 0.659244 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.360383 0.645657 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345471 0.65787 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318468 0.651804 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32213 0.65043 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.313702 0.630777 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33338 0.639592 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328614 0.618565 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351955 0.626005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317871 0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314012 0.567308 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336891 0.569787 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320398 0.587901 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294991 0.564188 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301377 0.584781 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29885 0.563547 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.311485 0.546074 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315344 0.545434 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334364 0.548554 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.409774 0.542042 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.433888 0.53788 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426423 0.55574 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423551 0.558395 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.417238 0.524182 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406901 0.544697 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393124 0.528344 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.42011 0.521526 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.395996 0.525689 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.412646 0.539387 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340934 0.501272 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.320279 0.506807 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318612 0.528125 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340934 0.501272 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.339267 0.522591 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359921 0.517056 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379835 0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.399304 0.540802 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400119 0.563801 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400489 0.54453 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37902 0.527065 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380205 0.530793 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.359551 0.536327 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37865 0.546337 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.35918 0.555599 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379464 0.569335 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371785 0.0996195 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER -0.393621 0.220501 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.368601 0.279642 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.354293 0.299716 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347717 0.279022 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366989 0.292196 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375177 0.300337 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.387873 0.292817 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389485 0.280263 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355904 0.287162 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.370213 0.267088 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349329 0.266468 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321889 0.238665 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.304702 0.250544 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32307 0.238717 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327715 0.259421 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30352 0.250492 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326533 0.259369 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320707 0.238612 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298875 0.229788 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316063 0.217908 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317244 0.21796 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372464 0.281062 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.362978 0.289441 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35549 0.267771 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378255 0.270044 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379952 0.302733 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395229 0.283335 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389438 0.294353 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357187 0.30046 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366673 0.29208 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349699 0.278789 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440333 0.261479 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.443285 0.282991 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421181 0.271991 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4302 0.282046 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462437 0.27248 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449353 0.271534 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459485 0.250967 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453417 0.262424 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.450466 0.240911 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431313 0.251423 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.444196 0.262898 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.449273 0.285685 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436139 0.282528 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.426189 0.27701 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45733 0.266055 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434246 0.257381 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452254 0.243269 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46728 0.271573 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462204 0.248787 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454146 0.268416 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.465353 0.202338 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.486123 0.204606 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464339 0.202946 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470107 0.223366 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487137 0.203998 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471122 0.222757 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466367 0.201729 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.481368 0.183578 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460599 0.18131 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459584 0.181918 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389758 0.219082 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.378635 0.228779 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.365937 0.225483 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383364 0.24293 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402455 0.222377 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407185 0.236529 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER -0.413578 0.21268 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385029 0.20493 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396152 0.195233 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372331 0.201634 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414778 0.15994 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.412573 0.147477 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39322 0.15977 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412448 0.172167 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434131 0.147647 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434006 0.172338 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436336 0.16011 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414903 0.13525 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417108 0.147713 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39555 0.147543 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343046 0.178104 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.319723 0.177083 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325124 0.189464 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332294 0.198298 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337645 0.165722 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350216 0.186938 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360967 0.166743 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330475 0.156889 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353797 0.157909 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335876 0.16927 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191247 0.166275 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.130089 0.20793 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.115471 0.221102 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.126388 0.200597 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13987 0.220766 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119172 0.228435 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143571 0.228099 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13379 0.215264 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10569 0.208266 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120308 0.195095 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116607 0.187762 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154295 0.172673 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.15554 0.180792 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17557 0.171251 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166926 0.19323 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134265 0.182215 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145651 0.194652 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133019 0.174096 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.142909 0.160236 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141663 0.152117 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.162939 0.150694 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192135 0.230419 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.18209 0.243049 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168159 0.227721 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185251 0.218634 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206066 0.245747 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209227 0.221332 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216111 0.233117 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188974 0.254834 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199019 0.242204 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175043 0.239506 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.167041 0.201532 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.151829 0.219088 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14514 0.205084 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163068 0.221861 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173729 0.215537 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.184969 0.218309 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188942 0.197981 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155801 0.19876 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171014 0.181204 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149113 0.184756 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.229087 0.224021 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.22829 0.248268 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207937 0.234532 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216949 0.2391 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249439 0.237756 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238098 0.228589 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250236 0.213509 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240428 0.233189 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241225 0.208942 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220075 0.219453 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228199 0.159877 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.229756 0.167942 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207683 0.16569 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223214 0.183484 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250271 0.162129 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.243729 0.177671 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248714 0.154064 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234741 0.144336 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233184 0.13627 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212668 0.142084 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.129201 0.143787 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.105335 0.14887 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115741 0.153943 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121723 0.167242 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.118795 0.138714 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135183 0.157086 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.142661 0.13363 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.112813 0.125414 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.136679 0.120331 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123219 0.130487 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190359 0.102131 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.179968 0.0897843 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166467 0.105492 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183804 0.114103 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER -0.20386 0.0864233 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207696 0.110742 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214251 0.0987702 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186523 0.0778128 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196914 0.0901597 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173022 0.0935207 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153407 0.108529 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.130858 0.0995811 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135326 0.123725 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134736 0.113639 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER -0.148938 0.0843858 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152816 0.0984435 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171487 0.0933338 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149528 0.0944715 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172078 0.10342 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153997 0.118615 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.277961 0.367156 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.269898 0.374298 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270045 0.350338 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291334 0.362218 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277815 0.391115 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299251 0.379036 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.285878 0.383973 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.256525 0.379235 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264588 0.372093 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.256671 0.355276 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252306 0.297666 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.235688 0.305995 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259438 0.312359 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245915 0.321516 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228556 0.291303 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238783 0.306824 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245173 0.282974 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242079 0.282145 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258696 0.273816 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265828 0.288509 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.32435 0.32435 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33812 0.32066 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32066 0.33812 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3005 0.317959 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29681 0.331729 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29042 0.307879 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317959 0.3005 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307879 0.29042 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331729 0.29681 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339925 0.383759 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.334762 0.407156 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31686 0.392275 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326552 0.388696 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357827 0.39864 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349618 0.380181 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362991 0.375243 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348135 0.402218 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353299 0.378821 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330233 0.387337 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376234 0.330873 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.393346 0.348239 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383366 0.345565 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369843 0.354723 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386213 0.333547 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 0.340031 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369102 0.316181 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399736 0.324389 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382624 0.307023 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389757 0.321715 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376234 0.330873 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.386461 0.346394 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 0.340031 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369843 0.354723 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399983 0.337237 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383366 0.345565 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389757 0.321715 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392851 0.322544 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382624 0.307023 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369102 0.316181 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277961 0.367156 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.261966 0.385852 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259422 0.36581 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.278159 0.38141 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.280504 0.387198 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296698 0.382755 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.2965 0.368501 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261768 0.371598 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277764 0.352901 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259225 0.351556 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31427 0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.304189 0.32435 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29042 0.32066 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307879 0.33812 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328039 0.317959 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331729 0.331729 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33812 0.307879 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.31058 0.3005 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32066 0.29042 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29681 0.29681 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252306 0.297666 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.228803 0.30415 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238783 0.306824 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245915 0.321516 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242326 0.294992 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259438 0.312359 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265828 0.288509 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235194 0.2803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258696 0.273816 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245173 0.282974 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574159 0.153845 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER -0.612768 0.202534 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612732 0.225282 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591695 0.212428 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60221 0.22113 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633805 0.215388 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623283 0.211236 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER -0.63384 0.192641 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62329 0.206686 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623325 0.183939 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602253 0.193832 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543919 0.184086 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.527458 0.200547 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522843 0.187702 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.540303 0.205161 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548533 0.196931 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561378 0.201546 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.564994 0.18047 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531074 0.179472 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.547535 0.163011 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.526459 0.166627 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.542885 0.243024 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534333 0.219861 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563539 0.248559 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575642 0.23093 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575642 0.23093 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542885 0.243024 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534333 0.219861 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643008 0.172294 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER -0.660425 0.189742 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645434 0.185725 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636618 0.196144 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657999 0.17631 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634191 0.182712 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640582 0.158862 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666816 0.165892 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649399 0.148444 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651825 0.161875 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER -0.585228 0.195155 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.574809 0.203972 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561378 0.201546 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568784 0.181486 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598659 0.197581 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592634 0.175095 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609078 0.188764 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591253 0.217641 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601672 0.208824 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577822 0.215215 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6044 0.123605 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER -0.620861 0.107144 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608016 0.102529 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625475 0.119989 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617245 0.128219 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621859 0.141064 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600784 0.14468 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599785 0.11076 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583324 0.127221 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58694 0.106145 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631939 0.130984 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER -0.643128 0.132649 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618482 0.133263 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631785 0.152367 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656585 0.130371 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645242 0.150088 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645397 0.128706 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643283 0.111266 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632094 0.109601 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618637 0.11188 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591664 0.0609772 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572676 0.076761 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612319 0.0665116 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613986 0.0878298 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613986 0.0878298 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591664 0.0609772 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572676 0.076761 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56309 0.112536 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549659 0.11011 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53924 0.118927 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555684 0.132596 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573509 0.103719 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579534 0.126205 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58694 0.106145 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557065 0.09005 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570497 0.0924762 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546646 0.0988668 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.494808 0.247614 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.494287 0.313607 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.484182 0.326876 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470513 0.310432 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488171 0.302705 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507957 0.330051 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511946 0.305881 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518062 0.316783 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490299 0.337778 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500404 0.324509 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476629 0.321334 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452978 0.302539 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.436971 0.320401 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436675 0.29902 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.455413 0.3148 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453274 0.32392 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471717 0.318318 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469281 0.306057 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434535 0.30814 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.450543 0.290278 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434239 0.286759 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434629 0.269833 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.426389 0.279233 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445377 0.263449 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448298 0.286276 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415641 0.285616 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43755 0.29266 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42388 0.276216 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41272 0.262789 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420959 0.253389 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431707 0.247006 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536117 0.258683 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549787 0.275127 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549787 0.275127 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529727 0.282533 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536117 0.258683 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516058 0.266089 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522448 0.242239 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556177 0.251277 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542508 0.234833 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556177 0.251277 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476459 0.214908 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.457868 0.209819 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER -0.458164 0.2312 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453963 0.210053 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476163 0.193527 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472258 0.193761 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.494753 0.198616 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480363 0.214674 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498954 0.219763 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480659 0.236055 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536638 0.19269 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549603 0.17251 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528912 0.177908 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549105 0.191778 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557329 0.187292 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556831 0.20656 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544363 0.207471 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537136 0.173421 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524171 0.193601 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516445 0.178819 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554467 0.291389 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.562288 0.314604 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542501 0.306499 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541186 0.310183 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574255 0.299494 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553152 0.295073 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566433 0.276279 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575569 0.29581 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567748 0.272595 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555781 0.287705 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554987 0.225396 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.567359 0.227186 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54267 0.227528 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555283 0.246777 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579676 0.225054 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567601 0.244644 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567305 0.223263 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567063 0.205805 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554691 0.204014 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542374 0.206147 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513157 0.28032 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.507811 0.298839 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489718 0.287442 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505577 0.302049 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531251 0.291716 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529016 0.294927 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536597 0.273198 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515392 0.27711 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER -0.520738 0.258591 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497299 0.265714 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.552323 0.0329639 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER -0.625877 0.0248832 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER -0.646362 0.0316054 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625173 0.0287309 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627981 0.0478 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647066 0.0277577 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628685 0.0439523 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62658 0.0210355 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644258 0.00868865 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623773 0.00196644 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623069 0.00581415 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584567 0.0138144 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER -0.584898 0.0177119 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56353 0.0185345 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.580268 0.0364224 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605935 0.0129918 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601305 0.0317022 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605605 0.00909422 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER -0.589197 -0.00489609 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588867 -0.00879364 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567829 -0.00407348 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593331 0.0822954 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.593994 0.105299 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572783 0.0926585 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582384 0.100664 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614541 0.0949359 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602932 0.090301 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613879 0.0719323 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604941 0.0869303 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604278 0.0639267 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58373 0.0742898 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593633 0.0440327 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607302 0.0604766 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607302 0.0604766 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587242 0.0678827 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593633 0.0440327 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573573 0.0514389 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579964 0.0275889 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613693 0.0366265 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600023 0.0201827 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613693 0.0366265 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561087 0.101445 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551884 0.118381 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536664 0.103361 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550745 0.0944221 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576307 0.116465 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575168 0.0925065 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58551 0.0995293 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562225 0.125404 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571428 0.108468 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER -0.547006 0.110383 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER -0.520079 0.0521134 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523344 0.0542684 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534291 0.0358996 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541988 0.0591566 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509132 0.0704822 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER -0.527777 0.0753703 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505868 0.0683272 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501435 0.0472252 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49817 0.0450702 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512382 0.0288565 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584869 -0.0244483 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.5935 -0.0473753 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57344 -0.0399691 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.595617 -0.0308315 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604929 -0.0318545 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607046 -0.0153107 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.596298 -0.00892756 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582752 -0.0409921 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574121 -0.0180651 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562692 -0.0335859 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511316 -0.0163676 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.48882 -0.0212225 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497372 0.00194055 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491256 -0.00896145 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502764 -0.0395307 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505199 -0.0272696 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525259 -0.0346758 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.50888 -0.0286287 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531375 -0.0237738 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517432 -0.00546563 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54356 -0.0355172 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530389 -0.0495897 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519442 -0.031221 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53532 -0.0261165 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554507 -0.0538859 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.559438 -0.0304127 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.567678 -0.0398133 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538628 -0.0589904 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.551799 -0.0449178 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.527681 -0.0406217 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451136 0.0058509 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER -0.447081 0.0051487 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER -0.435909 0.01504 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423265 0.0115452 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440694 0.0289993 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459725 0.00864346 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46451 0.0226028 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470897 -0.0012478 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER -0.442297 -0.00881065 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.453468 -0.0187019 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.429652 -0.0123054 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386138 0.0172804 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER -0.364644 0.0293677 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375512 0.0213457 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385352 0.0401449 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37527 0.0253024 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395978 0.0360796 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396764 0.0132151 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER -0.36543 0.0065032 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386924 -0.00558411 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376298 -0.00151881 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.439178 0.0688765 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER -0.426942 0.0903221 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416328 0.0699989 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435083 0.0806307 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449792 0.0891998 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.457933 0.0795084 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462029 0.0677542 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431037 0.078568 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER -0.443274 0.0571224 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420423 0.0582447 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512079 -0.00628079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.523883 -0.000557006 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49924 -0.00208214 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.51057 0.0165974 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536722 -0.00475566 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523409 0.0123987 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524918 -0.0104794 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525392 -0.0234352 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513588 -0.029159 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500749 -0.0249603 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504176 0.0574471 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.508666 0.0817008 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488971 0.0722467 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489545 0.0732807 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523872 0.0669012 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504751 0.058481 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519382 0.0426474 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523298 0.0658672 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518808 0.0416134 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.503602 0.0564131 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.516134 -0.00557859 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.540463 -0.00154892 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.52751 -0.00538221 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.524673 0.0156462 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529087 -0.00174531 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.513298 0.0154498 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504759 -0.00577498 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531924 -0.0227737 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507596 -0.0268034 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.518971 -0.026607 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459039 -0.0578769 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.451803 -0.0707378 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435761 -0.0561039 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454158 -0.0461991 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.475081 -0.0725109 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477435 -0.0479721 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.482316 -0.05965 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.456685 -0.0824157 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46392 -0.0695548 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440643 -0.0677817 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.463094 -0.0571747 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.459563 -0.081612 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.442243 -0.0665888 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.463589 -0.0696122 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.480415 -0.0721979 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.48444 -0.0601982 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.483946 -0.0477607 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459069 -0.0691745 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4626 -0.0447373 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.441749 -0.0541513 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398096 -0.0457452 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.373728 -0.0495643 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383722 -0.030137 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382672 -0.0306825 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388102 -0.0651725 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.397047 -0.0462908 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41247 -0.0613535 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389151 -0.064627 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41352 -0.060808 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399146 -0.0451997 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.412497 -0.190929 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400273 -0.174844 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417001 -0.16674 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436523 -0.195071 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.441027 -0.170881 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448325 -0.183127 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419795 -0.203175 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431597 -0.191231 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407571 -0.18709 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.343834 -0.12515 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353814 -0.122476 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360946 -0.107784 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357357 -0.134308 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374468 -0.116942 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380859 -0.140792 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350225 -0.149 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373727 -0.155484 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360204 -0.146326 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.41922 -0.10495 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40545 -0.10864 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42291 -0.0911807 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44307 -0.111341 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44676 -0.0975713 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45315 -0.121421 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425611 -0.128801 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435691 -0.138881 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411841 -0.13249 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.486264 -0.162382 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.502603 -0.174264 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.479659 -0.170327 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.495376 -0.15142 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509207 -0.166319 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501981 -0.143475 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.492868 -0.154437 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49349 -0.185226 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477151 -0.173345 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470546 -0.18129 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.501491 -0.082906 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477742 -0.0892696 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484874 -0.0745774 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515014 -0.0920638 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498397 -0.0837352 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504787 -0.107585 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507882 -0.106756 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497655 -0.122277 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484132 -0.11312 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491265 -0.0984274 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.508376 -0.0810612 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.498397 -0.0837352 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484874 -0.0745774 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.501244 -0.0957534 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477742 -0.0892696 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484132 -0.11312 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514767 -0.104911 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.497655 -0.122277 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504787 -0.107585 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424299 -0.178985 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.411775 -0.200165 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399922 -0.179342 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415187 -0.189948 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436152 -0.199808 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.439564 -0.189591 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448677 -0.178629 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420888 -0.189202 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.433412 -0.168023 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409035 -0.168379 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4293 -0.115031 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.439381 -0.10495 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45315 -0.10864 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.435691 -0.0911807 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415531 -0.111341 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411841 -0.0975713 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40545 -0.121421 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43299 -0.128801 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42291 -0.138881 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44676 -0.13249 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367336 -0.131634 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.350719 -0.123305 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374468 -0.116942 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360946 -0.107784 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343587 -0.137998 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353814 -0.122476 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360204 -0.146326 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357109 -0.147155 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373727 -0.155484 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380859 -0.140792 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248762 -0.0483751 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.183785 -0.0599222 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.160406 -0.0522053 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171954 -0.0513956 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178533 -0.0358698 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172236 -0.0607319 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190363 -0.0443964 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195615 -0.0684488 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165658 -0.0762577 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189036 -0.0839747 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177206 -0.075448 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.187119 -0.0172857 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.176731 -0.00705049 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192673 -0.025725 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200733 -0.00352517 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171177 0.00138875 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195179 0.00491406 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.181564 -0.00884647 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163117 -0.020811 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173504 -0.0310463 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179058 -0.0394855 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215921 0.00673113 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.20044 0.0258737 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196602 0.00551963 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215612 0.0203763 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21976 0.0270852 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234932 0.0215878 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235241 0.00794264 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200749 0.0122285 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21623 -0.00691403 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196911 -0.00812553 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245428 -0.0910116 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.234308 -0.0942304 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.221514 -0.0854464 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238704 -0.0714204 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.258223 -0.0997955 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262619 -0.0769856 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269343 -0.0965768 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241032 -0.113822 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.252152 -0.110603 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228237 -0.105038 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277564 -0.0243582 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.275459 -0.0076281 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.255218 -0.0167139 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270078 -0.00142185 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297806 -0.0152725 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.292425 -0.00906621 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299911 -0.0320026 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282946 -0.0305645 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.285051 -0.0472946 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262704 -0.0396503 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.310405 -0.0794645 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.324811 -0.0817333 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300317 -0.0800146 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.313378 -0.0603366 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.334899 -0.0811832 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.323466 -0.0597864 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320493 -0.0789143 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321838 -0.100861 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307433 -0.0985923 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297345 -0.0991425 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216626 -0.115028 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.195663 -0.127519 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194866 -0.104303 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201738 -0.108803 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.217423 -0.138245 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223497 -0.119529 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238386 -0.125754 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210551 -0.133744 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.231514 -0.121254 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209754 -0.110528 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281603 -0.103481 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.291073 -0.126206 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271345 -0.119897 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293457 -0.110246 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301332 -0.10979 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.303716 -0.0938302 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291862 -0.0870656 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.279219 -0.119442 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269749 -0.0967168 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.25949 -0.113132 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.21996 -0.0723919 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.20388 -0.0673141 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216456 -0.0490355 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.198742 -0.0609052 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207384 -0.0906706 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202246 -0.0842617 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223463 -0.0957484 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225098 -0.0788008 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241177 -0.0838786 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.237674 -0.0605222 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.508983 0.690426 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.484794 0.755941 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.47411 0.767658 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.467528 0.744501 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.489758 0.749038 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491377 0.779098 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507025 0.760478 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502061 0.767382 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469146 0.774562 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.47983 0.762845 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462564 0.751405 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436283 0.7029 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.418941 0.714226 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.43889 0.704751 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44101 0.724842 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416335 0.712374 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.438403 0.722991 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.433677 0.701048 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414215 0.692283 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431557 0.680957 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434163 0.682808 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478434 0.695668 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.481931 0.703418 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500827 0.694124 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491475 0.716184 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.459538 0.704962 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469082 0.717727 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.456041 0.697211 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46889 0.682902 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.465393 0.675152 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487786 0.673608 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557494 0.743468 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.560084 0.767402 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543179 0.760285 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53997 0.755145 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574398 0.750585 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554284 0.738328 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571808 0.726651 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577608 0.755725 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575017 0.731791 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560703 0.748608 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.551134 0.683194 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.573364 0.687731 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571303 0.682033 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56324 0.703871 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553195 0.688893 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543071 0.705033 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530964 0.684356 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561258 0.667055 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539027 0.662518 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.559196 0.661356 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581682 0.677953 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.601808 0.682851 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579842 0.680568 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58454 0.700216 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603648 0.680237 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58638 0.697602 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583522 0.675339 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59895 0.660588 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.578824 0.65569 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576984 0.658304 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515343 0.7507 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.506594 0.773394 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.491321 0.755462 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507924 0.764807 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530616 0.768632 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531946 0.760045 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539365 0.745938 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514012 0.759287 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522762 0.736593 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.49874 0.741355 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539531 0.685185 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.538818 0.693658 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517905 0.691194 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534075 0.708875 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560445 0.687649 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555702 0.702866 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561158 0.679176 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544274 0.669969 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544988 0.661495 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523361 0.667505 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466832 0.697658 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.447385 0.709346 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447429 0.703286 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.46231 0.721188 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466788 0.703718 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.481713 0.71556 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.486235 0.692031 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451907 0.685816 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471354 0.674129 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.451951 0.679757 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335322 0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.283164 0.659645 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.269894 0.672915 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.275822 0.649528 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293281 0.666987 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277236 0.683032 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300624 0.677104 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290507 0.669762 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.259777 0.665573 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273047 0.652302 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265705 0.642185 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.286452 0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.279361 0.614273 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.303327 0.613293 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.288206 0.628413 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.262487 0.604959 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271332 0.619099 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.269578 0.594664 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.277607 0.589839 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.284698 0.579544 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301572 0.588858 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33883 0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.328536 0.663448 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314396 0.654603 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.329516 0.639482 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35297 0.665202 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353951 0.641237 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.363265 0.658111 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33785 0.680322 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348145 0.673232 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32371 0.671477 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332034 0.663153 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.321274 0.684748 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.308341 0.666888 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.326131 0.678752 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344967 0.681014 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.349824 0.675018 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355727 0.659419 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327177 0.669149 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337937 0.647554 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314244 0.651289 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.391875 0.684201 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384191 0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.389739 0.622198 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366159 0.617804 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378964 0.63493 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407771 0.61539 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396997 0.628121 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402224 0.604188 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394966 0.598265 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.389418 0.587062 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371386 0.593871 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.279656 0.610775 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258061 0.621535 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264057 0.616678 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.275921 0.634468 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.27366 0.615632 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29152 0.628565 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295255 0.604872 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261795 0.597842 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.28339 0.587082 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267791 0.592985 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331813 0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.320611 0.55307 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30788 0.563845 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325005 0.57665 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344544 0.547843 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348938 0.571423 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355747 0.553391 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327419 0.535038 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338621 0.540585 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314688 0.545813 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258608 0.550934 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335322 0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.313405 0.629404 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.316595 0.626214 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318408 0.606941 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.335868 0.624401 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.311592 0.648676 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330864 0.646863 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.308402 0.651867 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.294133 0.631217 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290942 0.634407 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295946 0.611945 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331813 0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.319608 0.539107 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307378 0.556863 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.322499 0.541743 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.344043 0.540862 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346933 0.543497 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356248 0.560372 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328923 0.555982 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.341128 0.575492 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316693 0.573738 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384191 0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.403702 0.623201 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401066 0.62031 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385946 0.635431 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386827 0.613886 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.369071 0.626116 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367317 0.601681 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401947 0.598766 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382437 0.586561 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399312 0.595876 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316914 0.678274 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.305407 0.69384 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296616 0.671002 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317721 0.674446 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.325704 0.701111 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338018 0.681717 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337211 0.685545 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3046 0.697667 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316107 0.682101 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.295809 0.67483 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.391875 0.684201 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37258 0.674986 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406996 0.669081 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40282 0.644745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.3877 0.659866 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.33883 0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.329538 0.677411 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314897 0.661584 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.332022 0.674389 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.353472 0.672184 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.355956 0.669162 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362764 0.65113 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336346 0.659378 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.345639 0.638325 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.321705 0.643552 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.264535 0.625895 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.248969 0.637402 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.268363 0.625088 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.271807 0.646193 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.245142 0.638209 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267979 0.647 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.260708 0.626702 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.241698 0.617105 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.257264 0.605598 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.261092 0.604791 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.286452 0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.265398 0.613271 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.26842 0.610787 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281225 0.627912 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.283431 0.606463 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299257 0.621104 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.304484 0.59717 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.270625 0.589337 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.291679 0.580045 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273647 0.586853 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.258608 0.550934 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.267823 0.570229 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.273728 0.535813 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.298064 0.539989 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.282943 0.555109 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645066 0.554344 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.681385 0.616373 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.678928 0.639472 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661636 0.629767 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664108 0.621631 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698678 0.626079 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683858 0.608237 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701135 0.602979 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696205 0.634214 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698662 0.611115 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678912 0.624508 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649723 0.609912 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.640648 0.631982 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625749 0.614812 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64267 0.62585 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664623 0.627081 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666645 0.620949 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673698 0.605012 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647702 0.616044 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656777 0.593974 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632802 0.598874 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607573 0.617144 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.595495 0.63057 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594239 0.605919 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615286 0.617371 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608828 0.641795 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628619 0.628595 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.620906 0.628369 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587782 0.630343 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59986 0.616917 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586526 0.605692 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676727 0.560805 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.689897 0.57563 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693998 0.575587 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673115 0.585222 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672626 0.560848 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655844 0.57044 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659456 0.546023 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693509 0.551213 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680339 0.536388 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69761 0.55117 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602915 0.561576 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602201 0.570049 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623084 0.560414 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615021 0.582252 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582032 0.571211 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594852 0.583414 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582745 0.562738 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.590095 0.549372 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.590808 0.540899 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610978 0.539737 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640408 0.498776 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.627785 0.478525 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615951 0.497935 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630799 0.484234 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.652241 0.479365 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655255 0.485075 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.664864 0.499616 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637394 0.493066 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650016 0.513317 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62556 0.512476 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718878 0.553573 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.73992 0.563328 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.720935 0.559693 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719679 0.577348 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737863 0.557208 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717623 0.571228 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.716821 0.547453 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739118 0.539553 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718076 0.529798 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.720133 0.535918 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682558 0.491544 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.688647 0.474542 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666351 0.485132 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.686417 0.498226 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.704854 0.480953 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702624 0.504637 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698765 0.497955 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684788 0.46786 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678699 0.484862 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662492 0.47845 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687216 0.547112 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.690713 0.554862 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.667813 0.552739 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682694 0.570641 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.710116 0.549235 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702097 0.565014 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.706619 0.541484 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.695235 0.531333 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691738 0.523582 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672335 0.52921 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.501645 0.501645 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.499795 0.519956 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.493653 0.523893 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.479397 0.509638 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507788 0.497708 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.48739 0.48739 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509638 0.479397 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522043 0.511963 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523893 0.493653 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515901 0.515901 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.559233 0.507719 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539759 0.502501 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536564 0.514426 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562428 0.495794 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539759 0.502501 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54615 0.478651 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.565623 0.483869 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549345 0.466726 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54615 0.478651 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.483869 0.565623 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.466726 0.549345 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478651 0.54615 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.507719 0.559233 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502501 0.539759 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.514426 0.536564 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.495794 0.562428 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.502501 0.539759 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.478651 0.54615 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430095 0.482473 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.430434 0.489762 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.449569 0.477255 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445366 0.500519 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.41096 0.49498 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425893 0.505737 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410622 0.487691 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.415162 0.471716 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.414824 0.464428 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434297 0.45921 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.523783 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.404771 0.538038 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410297 0.515053 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 0.532513 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4135 0.546768 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436486 0.541242 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 0.532513 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396041 0.529309 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410297 0.515053 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401567 0.506323 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.377186 0.45894 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396659 0.464158 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393464 0.476083 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380381 0.447015 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396659 0.464158 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40305 0.440308 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383576 0.43509 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406245 0.428383 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40305 0.440308 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.482473 0.430095 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.48121 0.407271 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464428 0.414824 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.487691 0.410622 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499256 0.422542 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.505737 0.425893 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.500519 0.445366 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.475992 0.426744 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.477255 0.449569 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45921 0.434297 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.43509 0.383576 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428383 0.406245 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440308 0.40305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45894 0.377186 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464158 0.396659 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.476083 0.393464 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447015 0.380381 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.464158 0.396659 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.440308 0.40305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.538038 0.404771 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515053 0.410297 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532513 0.427756 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546768 0.4135 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541242 0.436486 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532513 0.427756 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529309 0.396041 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.515053 0.410297 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.506323 0.401567 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607487 0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.659645 0.283164 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.672915 0.269894 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649528 0.275822 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666987 0.293281 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683032 0.277236 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.677104 0.300624 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669762 0.290507 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665573 0.259777 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.652302 0.273047 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642185 0.265705 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603979 0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.592776 0.280905 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.580045 0.291679 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59717 0.304484 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61671 0.275678 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621104 0.299257 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627912 0.281225 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599585 0.262872 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610787 0.26842 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586853 0.273647 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656357 0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661904 0.350033 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638325 0.345639 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65113 0.362764 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679937 0.343224 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669162 0.355956 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674389 0.332022 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.667131 0.326099 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661584 0.314897 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643552 0.321705 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663153 0.332034 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.685865 0.340177 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679339 0.33606 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669651 0.355123 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669679 0.336151 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653465 0.351097 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646968 0.328008 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679367 0.317089 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656656 0.308945 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.672841 0.312971 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.664041 0.412036 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610996 0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.600701 0.391282 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586561 0.382437 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601681 0.367317 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625136 0.393037 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626116 0.369071 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.635431 0.385946 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610016 0.408157 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62031 0.401066 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.595876 0.399312 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610775 0.279656 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.602632 0.256944 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587686 0.273158 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606749 0.26347 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62572 0.263442 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.629838 0.269968 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633864 0.286153 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606658 0.27313 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614801 0.295841 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591712 0.289344 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558618 0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551527 0.342108 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575492 0.341128 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.560372 0.356248 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534652 0.332793 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543497 0.346933 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.541743 0.322499 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549772 0.317673 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556863 0.307378 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.573738 0.316693 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530773 0.278768 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645066 0.554344 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668521 0.610229 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.663938 0.633406 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64522 0.617928 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65892 0.626429 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687239 0.625707 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682221 0.61873 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691822 0.602531 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673539 0.617206 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678123 0.59403 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654822 0.601728 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598918 0.585648 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.580238 0.601562 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581665 0.587563 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.59781 0.605914 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.597491 0.599646 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.615063 0.603999 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616171 0.583732 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.581346 0.581295 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600026 0.565381 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582773 0.567297 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619787 0.622977 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.608008 0.63767 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601637 0.613891 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.623239 0.620102 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626157 0.646756 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641389 0.629188 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637936 0.632063 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604555 0.640545 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616334 0.625852 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598184 0.616766 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.714669 0.578925 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.729812 0.597914 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711617 0.592661 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70632 0.602084 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732864 0.584178 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709372 0.588348 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.71772 0.565189 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.738161 0.574755 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723017 0.555767 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719965 0.569503 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665934 0.591673 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.658095 0.605761 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647455 0.607672 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643855 0.58746 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676573 0.589763 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662334 0.571461 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684413 0.575674 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680174 0.609975 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688013 0.595887 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669535 0.611885 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691213 0.52304 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.712906 0.511567 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.699372 0.507717 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.710453 0.529503 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.704747 0.526889 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.702295 0.544826 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683054 0.538362 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693665 0.505104 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671972 0.516576 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680131 0.501254 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6938 0.541596 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.70016 0.547376 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.676324 0.546319 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690564 0.564621 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717636 0.542652 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70804 0.559898 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711276 0.536873 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.703396 0.524351 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.697037 0.518571 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679561 0.523294 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.670344 0.48571 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.67091 0.466887 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650637 0.480853 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671107 0.490138 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690617 0.471745 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690815 0.494995 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.690052 0.490567 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.670147 0.46246 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669581 0.481283 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649874 0.476425 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624197 0.517014 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.60809 0.516313 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60089 0.524375 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616221 0.538029 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631397 0.508952 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639529 0.530668 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647504 0.509653 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616065 0.495298 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632172 0.495999 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608865 0.50336 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.607487 0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.629404 0.313405 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.626214 0.316595 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606941 0.318408 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624401 0.335868 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648676 0.311592 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646863 0.330864 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651867 0.308402 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631217 0.294133 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634407 0.290942 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.611945 0.295946 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558618 0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.537564 0.341105 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.540585 0.338621 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.553391 0.355747 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555596 0.334297 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.571423 0.348938 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57665 0.325005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542791 0.317172 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563845 0.30788 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545813 0.314688 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610996 0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.601704 0.405245 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587062 0.389418 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604188 0.402224 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625637 0.400018 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628121 0.396997 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.63493 0.378964 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.608512 0.387213 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617804 0.366159 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593871 0.371386 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678274 0.316914 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.697473 0.31938 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674538 0.318074 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681812 0.338182 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701209 0.31822 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.685547 0.337022 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682009 0.315754 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.693935 0.298112 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674736 0.295646 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671 0.296805 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.664041 0.412036 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644745 0.40282 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.679161 0.396915 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674986 0.37258 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659866 0.3877 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656357 0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.675867 0.351035 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673232 0.348145 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.658111 0.363265 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.658993 0.341721 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641237 0.353951 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639482 0.329516 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.674113 0.3266 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654603 0.314396 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671477 0.32371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625895 0.264535 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.623429 0.245336 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604627 0.260997 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624736 0.268271 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644697 0.248874 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.646004 0.271809 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.647163 0.268073 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624589 0.2416 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627055 0.2608 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.605787 0.257262 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603979 0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.591774 0.266942 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.579544 0.284698 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594664 0.269578 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616209 0.268696 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619099 0.271332 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.628413 0.288206 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.601088 0.283817 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613293 0.303327 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588858 0.301572 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.530773 0.278768 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539989 0.298064 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545894 0.263648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570229 0.267823 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555109 0.282943 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.471405 0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.441164 0.501645 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.424703 0.518106 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420089 0.505261 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.437548 0.522721 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.445778 0.51449 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.458623 0.519105 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.462239 0.498029 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428319 0.497031 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44478 0.48057 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423704 0.484186 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.382226 0.502679 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405389 0.511231 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382226 0.502679 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405389 0.511231 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399854 0.490576 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376691 0.482024 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39432 0.469922 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39432 0.469922 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.44013 0.560583 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431578 0.53742 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460785 0.566118 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472887 0.548489 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.472887 0.548489 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.44013 0.560583 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452233 0.542955 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.431578 0.53742 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.512714 0.482473 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.51514 0.495905 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.492654 0.48988 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.506323 0.506323 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5352 0.488498 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.526383 0.498917 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.532774 0.475067 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.521531 0.472055 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.519105 0.458623 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499045 0.46603 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.527958 0.548119 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.508662 0.538903 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.508662 0.538903 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543078 0.532998 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538903 0.508662 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.543078 0.532998 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538903 0.508662 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.523783 0.523783 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.564273 0.4539 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548489 0.472887 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.564273 0.4539 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548489 0.472887 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542955 0.452233 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558738 0.433245 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53742 0.431578 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.53742 0.431578 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.460336 0.430095 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.446904 0.427669 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436486 0.436486 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.45293 0.450155 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.470754 0.421278 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.47678 0.443764 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.484186 0.423704 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.454311 0.407609 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.467742 0.410035 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.443892 0.416426 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.488909 0.378536 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469922 0.39432 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.509564 0.384071 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511231 0.405389 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.511231 0.405389 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.488909 0.378536 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.490576 0.399854 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.469922 0.39432 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.39469 0.414851 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403906 0.434147 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403906 0.434147 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409811 0.399731 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434147 0.403906 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409811 0.399731 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434147 0.403906 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419026 0.419026 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.835815 -0.157543 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.871646 -0.122136 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.871334 -0.102403 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.850164 -0.113406 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862937 -0.100577 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.892817 -0.111133 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884419 -0.109307 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.893129 -0.130866 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880044 -0.123961 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880356 -0.143694 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858873 -0.134964 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.799077 -0.135649 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.781177 -0.120908 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.778973 -0.13149 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.795477 -0.113462 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.801282 -0.125067 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.815582 -0.11762 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819182 -0.139808 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.784778 -0.143095 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802678 -0.157836 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782573 -0.153678 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82339 -0.0854653 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.811594 -0.0654286 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80102 -0.0876595 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.820516 -0.0820122 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.833964 -0.0632344 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842886 -0.079818 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.845761 -0.083271 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.814468 -0.0688817 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.826265 -0.0889183 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803895 -0.0911125 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908384 -0.14403 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.926643 -0.128672 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.90826 -0.133221 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904034 -0.1198 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.926768 -0.139481 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904159 -0.130608 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908508 -0.154838 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.930993 -0.152902 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.912733 -0.16826 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.912609 -0.157451 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860128 -0.107359 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.853284 -0.0905999 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.839638 -0.0940331 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840233 -0.111382 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.873773 -0.103926 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860723 -0.124708 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880618 -0.120685 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.873178 -0.086577 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880022 -0.103336 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859532 -0.0900102 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872552 -0.179437 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.894035 -0.188167 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885777 -0.195141 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.89378 -0.172046 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880811 -0.172463 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.880556 -0.156342 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859328 -0.163733 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872807 -0.195558 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.851325 -0.186828 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.864549 -0.202532 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884071 -0.194213 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.891905 -0.197746 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867957 -0.193701 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.884286 -0.175383 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.908019 -0.198259 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900401 -0.175896 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900186 -0.194726 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.89169 -0.216576 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.883856 -0.213043 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867741 -0.212531 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84824 -0.229621 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.843832 -0.25245 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.826426 -0.235043 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.846687 -0.233837 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.865646 -0.247028 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868501 -0.228415 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.870053 -0.224198 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.845385 -0.248234 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.849792 -0.225404 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.827978 -0.230827 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.811502 -0.207727 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.794108 -0.212743 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.788345 -0.199907 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802328 -0.189621 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.817265 -0.220563 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825486 -0.197441 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.83466 -0.215547 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803282 -0.230849 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.820676 -0.225832 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797518 -0.218012 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.61371 -0.142305 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.597249 -0.125845 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592635 -0.138689 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.610094 -0.12123 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618324 -0.12946 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631169 -0.124846 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634785 -0.145921 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600865 -0.14692 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617326 -0.163381 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.596251 -0.159765 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.554772 -0.141271 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577935 -0.13272 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554772 -0.141271 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.577935 -0.13272 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.153374 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549237 -0.161926 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566866 -0.174029 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566866 -0.174029 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612676 -0.0833673 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604124 -0.10653 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633331 -0.0778329 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645433 -0.0954616 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645433 -0.0954616 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612676 -0.0833673 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.100996 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604124 -0.10653 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68526 -0.161477 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687686 -0.148046 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6652 -0.154071 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678869 -0.137627 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.707746 -0.155452 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.698929 -0.145033 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70532 -0.168883 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694077 -0.171896 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.691651 -0.185327 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671591 -0.177921 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.700504 -0.095832 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681209 -0.105047 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681209 -0.105047 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715624 -0.110952 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711449 -0.135288 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715624 -0.110952 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.711449 -0.135288 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.120168 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.736819 -0.190051 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721035 -0.171063 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.736819 -0.190051 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721035 -0.171063 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.191718 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.731284 -0.210706 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709966 -0.212373 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.709966 -0.212373 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632882 -0.213855 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.61945 -0.216282 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609032 -0.207465 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.625476 -0.193796 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6433 -0.222672 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649326 -0.200186 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.656732 -0.220246 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626857 -0.236341 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640288 -0.233915 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616438 -0.227525 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661455 -0.265414 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642468 -0.249631 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68211 -0.25988 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683777 -0.238562 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.683777 -0.238562 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661455 -0.265414 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.244096 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642468 -0.249631 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.567237 -0.2291 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576452 -0.209804 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.576452 -0.209804 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582357 -0.24422 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606693 -0.240045 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582357 -0.24422 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606693 -0.240045 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.224924 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69376 0.0133465 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674309 0.0838533 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.66171 0.103063 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653258 0.0800983 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673446 0.0876683 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682761 0.106818 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694497 0.0914233 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69536 0.0876083 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.662574 0.0992478 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675172 0.0800382 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.654121 0.0762832 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.604582 0.0446211 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604582 0.0446211 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599047 0.0239663 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666287 0.0539145 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.662466 0.0547519 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660752 0.0332597 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682791 0.0439578 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.668 0.0754066 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688325 0.0646126 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671821 0.0745692 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645962 0.0647085 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649783 0.0638711 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644249 0.0432164 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745859 0.0646815 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.750021 0.0887955 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.729506 0.078459 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732161 0.0813312 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.766375 0.075018 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748514 0.0675537 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.762212 0.050904 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.763719 0.0721458 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759557 0.0480318 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743204 0.0618093 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737837 0.0347427 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.747099 0.0542122 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743371 0.0553974 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.7241 0.0550267 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741565 0.0335575 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718566 0.0343719 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732303 0.014088 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760836 0.0339282 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.751574 0.0144587 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757108 0.0351134 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.786629 -0.00415829 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786629 -0.00415829 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.781094 -0.024813 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701782 0.0432853 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.693716 0.0608821 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.677932 0.0496759 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.694884 0.0652402 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717566 0.0544915 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718734 0.0588496 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725632 0.0368947 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.700615 0.0389272 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.708681 0.0213304 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.684831 0.027721 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721234 -0.0272215 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.720593 -0.0310802 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.7 -0.0246945 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718114 -0.00820099 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741827 -0.0336072 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739347 -0.010728 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.742467 -0.0297485 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723713 -0.0501007 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724354 -0.046242 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70312 -0.043715 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649684 -0.00804971 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.628657 -0.00328338 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630031 0.000378614 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642244 0.0152909 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648309 -0.0117117 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661896 0.00686255 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669336 -0.016478 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636097 -0.026624 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657124 -0.0313903 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637471 -0.022962 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.835815 -0.157543 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.899353 -0.119969 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.909872 -0.0977075 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.891613 -0.104052 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.886771 -0.0997803 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.917612 -0.113625 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.894512 -0.115698 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.907093 -0.135886 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.922453 -0.117896 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.911935 -0.140158 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.904194 -0.124241 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868703 -0.130205 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.867758 -0.11253 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.846864 -0.122142 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860854 -0.107566 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.889596 -0.120593 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.882692 -0.115629 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.890541 -0.138267 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.875606 -0.135168 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.876551 -0.152843 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854713 -0.14478 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.836885 -0.0844101 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.826973 -0.0627848 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.81296 -0.083104 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.830202 -0.0805529 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.850898 -0.0640908 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854126 -0.0818589 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.860809 -0.0857161 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.833656 -0.0666419 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843568 -0.0882673 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819643 -0.0869612 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.866465 -0.147308 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.876203 -0.130609 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.879733 -0.128522 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.857385 -0.124356 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862935 -0.149395 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.844117 -0.143141 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.853198 -0.166093 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885283 -0.153561 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.875546 -0.170259 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.888813 -0.151474 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803997 -0.111748 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.798532 -0.108311 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797989 -0.131037 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819589 -0.119537 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80454 -0.0890219 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825597 -0.100248 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.810005 -0.0924597 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.78294 -0.100522 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.788405 -0.10396 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782397 -0.123249 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802927 -0.184881 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.785723 -0.180723 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.798991 -0.161937 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.782104 -0.173028 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.78966 -0.203667 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786041 -0.195972 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.806864 -0.207825 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.806546 -0.192576 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82375 -0.196734 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819813 -0.17379 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.898283 -0.193102 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.920038 -0.201143 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.900209 -0.201384 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.910616 -0.17991 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.918112 -0.192861 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.90869 -0.171628 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.896357 -0.18482 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.907705 -0.214335 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.88595 -0.206294 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.887876 -0.214576 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.834745 -0.230676 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.824206 -0.252002 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.810793 -0.231282 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.827952 -0.234336 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.848158 -0.251396 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.851905 -0.23373 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858698 -0.23007 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.830999 -0.248342 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.841538 -0.227016 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.817586 -0.227621 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.867633 -0.203337 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.868948 -0.209658 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84746 -0.202239 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.865773 -0.186008 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.889121 -0.210757 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.885946 -0.187106 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.887806 -0.204436 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.870808 -0.226988 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.869493 -0.220667 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.84932 -0.219569 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69376 0.0133465 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.668775 0.0631985 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.661946 0.0667914 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65711 0.0452771 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680354 0.0511945 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673611 0.0847128 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.692019 0.069116 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680439 0.08112 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.650366 0.0787954 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657195 0.0752026 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64553 0.0572811 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.604582 0.0446211 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.604582 0.0446211 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627745 0.053173 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.62221 0.0325183 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599047 0.0239663 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616676 0.0118635 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649684 -0.00804971 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.634953 -0.000226782 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655218 0.012605 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.635947 0.0122343 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.629419 -0.0208815 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630413 -0.00842045 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.644149 -0.0287044 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.64869 -0.0205108 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.66342 -0.0283337 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.668955 -0.00767898 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.740325 0.0440268 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.746894 0.0650768 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739183 0.0653796 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.723153 0.0607735 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748035 0.0437239 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724295 0.0394207 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741466 0.0226739 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.764065 0.04833 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757496 0.02728 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.756355 0.0486329 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721234 -0.0272215 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.732368 -0.0484665 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715699 -0.0478762 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737738 -0.0371781 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737902 -0.0278118 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743272 -0.0165234 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.726768 -0.00656677 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715864 -0.0385099 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70473 -0.0172649 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.699195 -0.0379196 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.786629 -0.00415829 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786629 -0.00415829 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.770845 0.0148294 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76531 -0.0058253 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.781094 -0.024813 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759776 -0.02648 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712851 0.0845947 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.706291 0.107813 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.689001 0.0909853 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701434 0.0896851 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.730141 0.101422 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725284 0.0832945 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.736701 0.0782041 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717709 0.102723 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.724268 0.0795043 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.700418 0.0858949 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.737837 0.0347427 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.740802 0.0511556 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718185 0.043171 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.730397 0.0580833 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760455 0.0427273 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.750049 0.0496549 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.757489 0.0263144 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.748242 0.027815 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745277 0.0114021 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.725625 0.0198304 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666287 0.0539145 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.650692 0.0721382 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645053 0.0564414 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663167 0.072935 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671925 0.0696112 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.6844 0.070408 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.68752 0.0513875 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.653812 0.0531177 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.669407 0.034894 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648173 0.0374209 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643951 -0.172546 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.674191 -0.142305 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.672341 -0.123995 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.666199 -0.120057 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651943 -0.134313 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680334 -0.146243 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.659936 -0.156561 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.682184 -0.164554 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.69459 -0.131987 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696439 -0.150298 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.688447 -0.12805 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.715501 -0.153374 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.731779 -0.136231 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712305 -0.141449 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.70911 -0.129524 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.734974 -0.148156 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.712305 -0.141449 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718696 -0.165299 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.738169 -0.160081 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.721891 -0.177224 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.718696 -0.165299 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.663122 -0.100996 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.656415 -0.0783272 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639272 -0.0946054 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651197 -0.0978007 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.680265 -0.0847178 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675047 -0.104191 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.686972 -0.107387 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.66834 -0.0815225 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.675047 -0.104191 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651197 -0.0978007 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.602641 -0.161477 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.60298 -0.154189 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.622115 -0.166695 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.617912 -0.143431 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583506 -0.148971 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.598439 -0.138214 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583168 -0.156259 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587708 -0.172234 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58737 -0.179523 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.606843 -0.184741 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.591572 -0.120168 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.577317 -0.105912 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582843 -0.128897 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600302 -0.111438 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586046 -0.0971825 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609032 -0.102708 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600302 -0.111438 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568587 -0.114642 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.582843 -0.128897 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.574113 -0.137627 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5724 -0.191718 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.549732 -0.185011 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569205 -0.179793 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.56601 -0.167868 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.552927 -0.196936 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569205 -0.179793 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575596 -0.203643 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556122 -0.208861 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.578791 -0.215568 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.575596 -0.203643 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.655019 -0.213855 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.653756 -0.23668 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636974 -0.229127 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660237 -0.233329 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671802 -0.221409 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678283 -0.218058 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.673065 -0.198584 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648538 -0.217207 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.649801 -0.194382 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631756 -0.209653 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624779 -0.244096 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.607636 -0.260374 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600929 -0.237705 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612854 -0.240901 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.631486 -0.266765 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636704 -0.247291 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648629 -0.250487 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619561 -0.26357 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.636704 -0.247291 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612854 -0.240901 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.696329 -0.224924 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.710584 -0.23918 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687599 -0.233654 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.705059 -0.216195 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719314 -0.23045 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.713788 -0.207465 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.705059 -0.216195 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.701855 -0.24791 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687599 -0.233654 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.678869 -0.242384 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786005 -0.343435 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.82165 -0.392454 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.824791 -0.400556 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802599 -0.392663 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.821021 -0.376528 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843843 -0.400347 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840073 -0.376319 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840701 -0.392245 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.82542 -0.416482 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.822279 -0.40838 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.803228 -0.408589 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.753118 -0.370774 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.734271 -0.367981 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.731279 -0.362711 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.745269 -0.348136 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.756109 -0.376044 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.767107 -0.356199 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.774956 -0.378837 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.74212 -0.390619 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.760966 -0.393412 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.739128 -0.385349 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.80984 -0.323622 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.80634 -0.308073 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.786996 -0.316395 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802721 -0.300378 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.829184 -0.315299 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.825565 -0.307605 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.832685 -0.330849 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.813459 -0.331317 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.81696 -0.346866 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.794116 -0.339639 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.854538 -0.365116 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.878086 -0.365674 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.859887 -0.367962 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.863875 -0.346241 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.872736 -0.362827 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.858526 -0.343394 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.849188 -0.362269 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.868748 -0.384548 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.8452 -0.38399 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.85055 -0.386837 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842728 -0.296284 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.848999 -0.272611 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.828835 -0.281616 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.829121 -0.278432 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862893 -0.287278 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.843015 -0.293099 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.856621 -0.310951 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.862606 -0.290462 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.856335 -0.314135 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.842441 -0.299468 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.818893 -0.316097 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.819591 -0.297057 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.814956 -0.293153 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.79807 -0.304244 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.823527 -0.320001 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.802007 -0.327188 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.822829 -0.339041 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.840413 -0.30891 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.839716 -0.32795 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.835779 -0.305006 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.797815 -0.412267 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.793573 -0.436217 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.776294 -0.419454 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.796968 -0.420728 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.815094 -0.42903 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.818489 -0.413542 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.819335 -0.405081 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.79442 -0.427756 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.798662 -0.403807 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.777141 -0.410993 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.76217 -0.363249 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.747522 -0.356966 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.759239 -0.339469 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.740618 -0.352002 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.750453 -0.380746 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.743549 -0.375782 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.765101 -0.387029 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.769074 -0.368213 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.783722 -0.374496 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.780791 -0.350716 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.729282 -0.390587 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.704862 -0.392427 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.717401 -0.374248 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.714218 -0.373948 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.716744 -0.408767 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.726099 -0.390287 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.741164 -0.406927 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.719927 -0.409067 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.744347 -0.407227 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.732465 -0.390887 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594141 -0.358439 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.542042 -0.409774 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.517869 -0.413579 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528508 -0.393219 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.525596 -0.395831 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.531404 -0.430134 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.539131 -0.412386 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555577 -0.426328 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534315 -0.427522 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558488 -0.423716 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544953 -0.407161 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.504962 -0.327164 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504962 -0.327164 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499428 -0.347819 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550064 -0.379835 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.529037 -0.375068 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530412 -0.371406 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.542624 -0.356494 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548689 -0.383497 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562276 -0.364922 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569716 -0.388263 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536477 -0.398409 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.557504 -0.403175 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537852 -0.394747 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.613592 -0.428945 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.612625 -0.451897 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593593 -0.436515 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.614807 -0.432663 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632624 -0.444328 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.634806 -0.425094 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.633591 -0.421376 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61141 -0.448179 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.612377 -0.425227 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.592379 -0.432797 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621614 -0.399007 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.620974 -0.402865 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600381 -0.39648 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618494 -0.379986 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642207 -0.405392 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639728 -0.382513 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.642848 -0.401533 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624094 -0.421886 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624734 -0.418027 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.603501 -0.4155 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687009 -0.375943 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687009 -0.375943 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681475 -0.396598 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586119 -0.388377 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.570335 -0.399584 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562269 -0.381987 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569167 -0.403942 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594185 -0.405974 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.593017 -0.410332 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.609969 -0.394768 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587286 -0.384019 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60307 -0.372813 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57922 -0.366422 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638217 -0.337042 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.64748 -0.317573 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643752 -0.316388 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.624481 -0.316758 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.641945 -0.338228 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618946 -0.337413 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.632683 -0.357697 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.661216 -0.337857 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.651954 -0.357326 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.657489 -0.336672 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566667 -0.317871 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.562847 -0.317033 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.561133 -0.338525 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.583171 -0.327827 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.568381 -0.296378 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.588706 -0.307172 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572202 -0.297216 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.546343 -0.307077 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550163 -0.307914 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544629 -0.328569 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.594141 -0.358439 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.547576 -0.389119 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.525642 -0.386849 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528407 -0.379645 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.538964 -0.366733 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.544812 -0.396323 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.558134 -0.376207 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566746 -0.398593 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.534255 -0.409235 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.556189 -0.411505 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.537019 -0.402031 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.504962 -0.327164 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.504962 -0.327164 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.528125 -0.318612 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.522591 -0.339267 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.499428 -0.347819 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.517056 -0.359921 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.566667 -0.317871 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.551072 -0.299647 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.545434 -0.315344 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563547 -0.29885 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.572306 -0.302174 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.584781 -0.301377 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587901 -0.320398 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.554192 -0.318667 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569787 -0.336891 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.548554 -0.334364 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.619127 -0.408291 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.617918 -0.415912 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.597788 -0.406911 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616439 -0.39183 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.639257 -0.417292 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.637778 -0.39321 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.640465 -0.409671 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.620605 -0.432372 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621814 -0.424751 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.600475 -0.423371 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638217 -0.337042 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.641183 -0.320629 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.618565 -0.328614 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.630777 -0.313702 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660835 -0.329058 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65043 -0.32213 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.65787 -0.345471 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.648623 -0.34397 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.645657 -0.360383 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.626005 -0.351955 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.687009 -0.375943 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.687009 -0.375943 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.671225 -0.356956 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.665691 -0.37761 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.681475 -0.396598 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.660156 -0.398265 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.57505 -0.429687 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.55776 -0.446515 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5512 -0.423296 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.562617 -0.428387 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.58161 -0.452905 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.586467 -0.434777 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.5989 -0.436077 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.570193 -0.447815 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.587483 -0.430987 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563633 -0.424596 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.621614 -0.399007 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.632748 -0.420252 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.61608 -0.419661 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638118 -0.408963 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.638282 -0.399597 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.643653 -0.388308 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.627149 -0.378352 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.616244 -0.410295 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.60511 -0.38905 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.599576 -0.409705 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.550064 -0.379835 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.535334 -0.372012 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.555599 -0.35918 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.536327 -0.359551 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.529799 -0.392667 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.530793 -0.380205 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.54453 -0.400489 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.549071 -0.392296 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.563801 -0.400119 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.569335 -0.379464 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0996195 -0.371785 0.544331 RAD 0.166667 + txt002 + SPHERE CENTER 0.220501 -0.393621 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.279642 -0.368601 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER 0.299716 -0.354293 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER 0.292196 -0.366989 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279022 -0.347717 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287162 -0.355904 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266468 -0.349329 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267088 -0.370213 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300337 -0.375177 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.280263 -0.389485 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.292817 -0.387873 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281062 -0.372464 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.289441 -0.362978 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER 0.270044 -0.378255 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267771 -0.35549 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30046 -0.357187 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.278789 -0.349699 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29208 -0.366673 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302733 -0.379952 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294353 -0.389438 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER 0.283335 -0.395229 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238665 -0.321889 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER 0.250544 -0.304702 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259421 -0.327715 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238717 -0.32307 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER 0.229788 -0.298875 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER 0.21796 -0.317244 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217908 -0.316063 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250492 -0.30352 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.238612 -0.320707 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259369 -0.326533 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219082 -0.389758 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.228779 -0.378635 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER 0.24293 -0.383364 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225483 -0.365937 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20493 -0.385029 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201634 -0.372331 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195233 -0.396152 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222377 -0.402455 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER 0.21268 -0.413578 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236529 -0.407185 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178104 -0.343046 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.177083 -0.319723 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198298 -0.332294 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.189464 -0.325124 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.156889 -0.330475 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16927 -0.335876 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.157909 -0.353797 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165722 -0.337645 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166743 -0.360967 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER 0.186938 -0.350216 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.15994 -0.414778 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.147477 -0.412573 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172167 -0.412448 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.15977 -0.39322 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13525 -0.414903 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147543 -0.39555 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147713 -0.417108 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.147647 -0.434131 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16011 -0.436336 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172338 -0.434006 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.261479 -0.440333 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER 0.282991 -0.443285 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282046 -0.4302 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271991 -0.421181 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262424 -0.453417 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251423 -0.431313 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.240911 -0.450466 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27248 -0.462437 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER 0.250967 -0.459485 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271534 -0.449353 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202338 -0.465353 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.204606 -0.486123 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223366 -0.470107 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.202946 -0.464339 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183578 -0.481368 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181918 -0.459584 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18131 -0.460599 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.203998 -0.487137 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201729 -0.466367 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.222757 -0.471122 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262898 -0.444196 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER 0.285685 -0.449273 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27701 -0.426189 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282528 -0.436139 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271573 -0.46728 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268416 -0.454146 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248787 -0.462204 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266055 -0.45733 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243269 -0.452254 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257381 -0.434246 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.374298 -0.269898 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER 0.362218 -0.291334 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER 0.350338 -0.270045 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379235 -0.256525 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355276 -0.256671 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.372093 -0.264588 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER 0.391115 -0.277815 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383973 -0.285878 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER 0.379036 -0.299251 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.304189 -0.304189 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29042 -0.307879 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307879 -0.29042 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328039 -0.31058 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331729 -0.29681 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33812 -0.32066 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31058 -0.328039 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32066 -0.33812 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29681 -0.331729 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.305995 -0.235688 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321516 -0.245915 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312359 -0.259438 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282145 -0.242079 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288509 -0.265828 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273816 -0.258696 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291303 -0.228556 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282974 -0.245173 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306824 -0.238783 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367156 -0.277961 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.385852 -0.261966 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.38141 -0.278159 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER 0.36581 -0.259422 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371598 -0.261768 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351556 -0.259225 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.352901 -0.277764 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387198 -0.280504 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER 0.368501 -0.2965 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382755 -0.296698 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER 0.297666 -0.252306 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.30415 -0.228803 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321516 -0.245915 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306824 -0.238783 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2803 -0.235194 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282974 -0.245173 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273816 -0.258696 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294992 -0.242326 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288509 -0.265828 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312359 -0.259438 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31427 -0.31427 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.32435 -0.304189 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33812 -0.307879 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32066 -0.29042 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3005 -0.31058 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29681 -0.29681 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29042 -0.32066 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317959 -0.328039 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307879 -0.33812 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331729 -0.331729 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.383759 -0.339925 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER 0.407156 -0.334762 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER 0.388696 -0.326552 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.392275 -0.31686 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402218 -0.348135 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387337 -0.330233 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378821 -0.353299 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39864 -0.357827 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER 0.375243 -0.362991 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380181 -0.349618 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER 0.346394 -0.386461 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.354723 -0.369843 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340031 -0.362711 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322544 -0.392851 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316181 -0.369102 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307023 -0.382624 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337237 -0.399983 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321715 -0.389757 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345565 -0.383366 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330873 -0.376234 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER 0.348239 -0.393346 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.354723 -0.369843 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345565 -0.383366 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324389 -0.399736 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321715 -0.389757 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307023 -0.382624 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER 0.333547 -0.386213 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316181 -0.369102 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.340031 -0.362711 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166275 -0.191247 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER 0.20793 -0.130089 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER 0.221102 -0.115471 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.220766 -0.13987 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.200597 -0.126388 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208266 -0.10569 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187762 -0.116607 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195095 -0.120308 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228435 -0.119172 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215264 -0.13379 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228099 -0.143571 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER 0.230419 -0.192135 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.243049 -0.18209 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218634 -0.185251 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227721 -0.168159 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.254834 -0.188974 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.239506 -0.175043 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242204 -0.199019 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER 0.245747 -0.206066 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233117 -0.216111 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221332 -0.209227 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172673 -0.154295 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER 0.180792 -0.15554 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19323 -0.166926 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.171251 -0.17557 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.160236 -0.142909 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150694 -0.162939 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152117 -0.141663 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182215 -0.134265 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.174096 -0.133019 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.194652 -0.145651 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER 0.143787 -0.129201 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER 0.14887 -0.105335 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER 0.167242 -0.121723 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153943 -0.115741 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125414 -0.112813 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130487 -0.123219 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER 0.120331 -0.136679 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER 0.138714 -0.118795 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13363 -0.142661 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.157086 -0.135183 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108529 -0.153407 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0995811 -0.130858 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER 0.113639 -0.134736 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.123725 -0.135326 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0944715 -0.149528 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.118615 -0.153997 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.10342 -0.172078 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0843858 -0.148938 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0933338 -0.171487 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0984435 -0.152816 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102131 -0.190359 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0897843 -0.179968 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER 0.114103 -0.183804 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.105492 -0.166467 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0778128 -0.186523 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0935207 -0.173022 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0901597 -0.196914 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0864233 -0.20386 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0987702 -0.214251 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110742 -0.207696 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201532 -0.167041 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER 0.219088 -0.151829 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.221861 -0.163068 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205084 -0.14514 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19876 -0.155801 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184756 -0.149113 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181204 -0.171014 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215537 -0.173729 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197981 -0.188942 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER 0.218309 -0.184969 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER 0.159877 -0.228199 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER 0.167942 -0.229756 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183484 -0.223214 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.16569 -0.207683 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER 0.144336 -0.234741 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER 0.142084 -0.212668 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER 0.13627 -0.233184 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER 0.162129 -0.250271 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER 0.154064 -0.248714 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177671 -0.243729 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.224021 -0.229087 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER 0.248268 -0.22829 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2391 -0.216949 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234532 -0.207937 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER 0.233189 -0.240428 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219453 -0.220075 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208942 -0.241225 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER 0.237756 -0.249439 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER 0.213509 -0.250236 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER 0.228589 -0.238098 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0058509 -0.451136 0.729516 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0051487 -0.447081 0.803476 RAD 0.0185185 + txt002 + SPHERE CENTER 0.01504 -0.435909 0.823149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0289993 -0.440694 0.803352 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0115452 -0.423265 0.802231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00881065 -0.442297 0.823273 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0123054 -0.429652 0.802355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0187019 -0.453468 0.8036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00864346 -0.459725 0.824394 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0012478 -0.470897 0.804721 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0226028 -0.46451 0.804597 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0688765 -0.439178 0.766553 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0903221 -0.426942 0.766429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0806307 -0.435083 0.745229 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0699989 -0.416328 0.757266 RAD 0.00617284 + txt002 + SPHERE CENTER 0.078568 -0.431037 0.787754 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0582447 -0.420423 0.77859 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0571224 -0.443274 0.787878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0891998 -0.449792 0.775717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0677542 -0.462029 0.775841 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0795084 -0.457933 0.754517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0172804 -0.386138 0.763155 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0293677 -0.364644 0.76191 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0401449 -0.385352 0.753867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0213457 -0.375512 0.741241 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0065032 -0.36543 0.771198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00151881 -0.376298 0.750529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00558411 -0.386924 0.772443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0253024 -0.37527 0.783824 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0132151 -0.396764 0.785069 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0360796 -0.395978 0.775781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0578769 -0.459039 0.766439 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0707378 -0.451803 0.786236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0461991 -0.454158 0.787639 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0561039 -0.435761 0.774481 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0824157 -0.456685 0.765035 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0677817 -0.440643 0.753281 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0695548 -0.46392 0.745238 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0725109 -0.475081 0.778193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.05965 -0.482316 0.758396 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0479721 -0.477435 0.779597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0457452 -0.398096 0.726118 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0495643 -0.373728 0.724997 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0306825 -0.382672 0.738155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.030137 -0.383722 0.713492 RAD 0.00617284 + txt002 + SPHERE CENTER -0.064627 -0.389151 0.71296 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0451997 -0.399146 0.701455 RAD 0.00617284 + txt002 + SPHERE CENTER -0.060808 -0.41352 0.714081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0651725 -0.388102 0.737623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0613535 -0.41247 0.738744 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0462908 -0.397047 0.750781 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0571747 -0.463094 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER -0.081612 -0.459563 0.692603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0696122 -0.463589 0.713804 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0665888 -0.442243 0.701767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0691745 -0.459069 0.671279 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0541513 -0.441749 0.680442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0447373 -0.4626 0.671155 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0721979 -0.480415 0.683315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0477607 -0.483946 0.683192 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0601982 -0.48444 0.704516 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00628079 -0.512079 0.769837 RAD 0.0185185 + txt002 + SPHERE CENTER -0.000557006 -0.523883 0.790755 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0165974 -0.51057 0.779001 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00208214 -0.49924 0.790506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0234352 -0.525392 0.781591 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0249603 -0.500749 0.781342 RAD 0.00617284 + txt002 + SPHERE CENTER -0.029159 -0.513588 0.760673 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00475566 -0.536722 0.770086 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0104794 -0.524918 0.749168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0123987 -0.523409 0.758332 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00557859 -0.516134 0.695877 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00154892 -0.540463 0.697123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0156462 -0.524673 0.705165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00538221 -0.52751 0.717791 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0227737 -0.531924 0.687835 RAD 0.00617284 + txt002 + SPHERE CENTER -0.026607 -0.518971 0.708504 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0268034 -0.507596 0.68659 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00174531 -0.529087 0.675209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00577498 -0.504759 0.673964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0154498 -0.513298 0.683251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0574471 -0.504176 0.732914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0817008 -0.508666 0.734036 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0732807 -0.489545 0.720878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0722467 -0.488971 0.745541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0658672 -0.523298 0.746073 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0564131 -0.503602 0.757577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0416134 -0.518808 0.744951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0669012 -0.523872 0.72141 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0426474 -0.519382 0.720288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.058481 -0.504751 0.708251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0483751 -0.248762 0.655442 RAD 0.0555556 + txt002 + SPHERE CENTER -0.0599222 -0.183785 0.689081 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0522053 -0.160406 0.690965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0358698 -0.178533 0.687193 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0513956 -0.171954 0.669156 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0762577 -0.165658 0.692853 RAD 0.00617284 + txt002 + SPHERE CENTER -0.075448 -0.177206 0.671044 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0839747 -0.189036 0.690969 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0607319 -0.172236 0.71089 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0684488 -0.195615 0.709006 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0443964 -0.190363 0.707118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00673113 -0.215921 0.692479 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0258737 -0.20044 0.690591 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0203763 -0.215612 0.671903 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00551963 -0.196602 0.677151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0122285 -0.200749 0.711167 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00812553 -0.196911 0.697727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00691403 -0.21623 0.713055 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0270852 -0.21976 0.705919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00794264 -0.235241 0.707807 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0215878 -0.234932 0.687231 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0172857 -0.187119 0.6286 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00705049 -0.176731 0.608675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00352517 -0.200733 0.613272 RAD 0.00617284 + txt002 + SPHERE CENTER -0.025725 -0.192673 0.60607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.020811 -0.163117 0.624003 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0394855 -0.179058 0.621398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0310463 -0.173504 0.643928 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00138875 -0.171177 0.631205 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00884647 -0.181564 0.65113 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00491406 -0.195179 0.635801 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115028 -0.216626 0.652044 RAD 0.0185185 + txt002 + SPHERE CENTER -0.127519 -0.195663 0.655816 RAD 0.00617284 + txt002 + SPHERE CENTER -0.108803 -0.201738 0.670732 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104303 -0.194866 0.647447 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133744 -0.210551 0.637128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110528 -0.209754 0.628759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121254 -0.231514 0.633356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138245 -0.217423 0.660413 RAD 0.00617284 + txt002 + SPHERE CENTER -0.125754 -0.238386 0.656641 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119529 -0.223497 0.675329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0723919 -0.21996 0.591563 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0673141 -0.20388 0.573526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0609052 -0.198742 0.596811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0490355 -0.216456 0.584361 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0788008 -0.225098 0.568278 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0605222 -0.237674 0.579113 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0838786 -0.241177 0.586315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0906706 -0.207384 0.580727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0957484 -0.223463 0.598764 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0842617 -0.202246 0.604012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103481 -0.281603 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.126206 -0.291073 0.620293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110246 -0.293457 0.638981 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119897 -0.271345 0.633733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119442 -0.279219 0.599717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113132 -0.25949 0.613157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0967168 -0.269749 0.597829 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10979 -0.301332 0.604965 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0870656 -0.291862 0.603077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0938302 -0.303716 0.623653 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0910116 -0.245428 0.715923 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0942304 -0.234308 0.737733 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0714204 -0.238704 0.729364 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0854464 -0.221514 0.718528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113822 -0.241032 0.724292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105038 -0.228237 0.705088 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110603 -0.252152 0.702483 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0997955 -0.258223 0.735128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0965768 -0.269343 0.713318 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0769856 -0.262619 0.726759 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0794645 -0.310405 0.682285 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0817333 -0.324811 0.702209 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0603366 -0.313378 0.697613 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0800146 -0.300317 0.704814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100861 -0.321838 0.686881 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0991425 -0.297345 0.689486 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0985923 -0.307433 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0811832 -0.334899 0.67968 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0789143 -0.320493 0.659755 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0597864 -0.323466 0.675083 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0243582 -0.277564 0.719322 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0076281 -0.275459 0.737359 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00142185 -0.270078 0.714074 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0167139 -0.255218 0.726523 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0305645 -0.282946 0.742607 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0396503 -0.262704 0.731771 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0472946 -0.285051 0.72457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0152725 -0.297806 0.730157 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0320026 -0.299911 0.71212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00906621 -0.292425 0.706872 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.544331 RAD 0.0555556 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.190929 -0.412497 0.599471 RAD 0.00617284 + txt002 + SPHERE CENTER -0.16674 -0.417001 0.601529 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174844 -0.400273 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203175 -0.419795 0.57931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18709 -0.407571 0.565115 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191231 -0.431597 0.561208 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195071 -0.436523 0.595564 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183127 -0.448325 0.577461 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170881 -0.441027 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER -0.10495 -0.41922 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911807 -0.42291 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10864 -0.40545 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128801 -0.425611 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13249 -0.411841 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138881 -0.435691 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111341 -0.44307 0.638566 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121421 -0.45315 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0975713 -0.44676 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.12515 -0.343834 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107784 -0.360946 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122476 -0.353814 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149 -0.350225 0.585275 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146326 -0.360204 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155484 -0.373727 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134308 -0.357357 0.603794 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140792 -0.380859 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116942 -0.374468 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178985 -0.424299 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.200165 -0.411775 0.505236 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189948 -0.415187 0.527454 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179342 -0.399922 0.511201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189202 -0.420888 0.485076 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168379 -0.409035 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168023 -0.433412 0.487134 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199808 -0.436152 0.501329 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178629 -0.448677 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189591 -0.439564 0.523547 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131634 -0.367336 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.123305 -0.350719 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107784 -0.360946 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116942 -0.374468 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.147155 -0.357109 0.491041 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140792 -0.380859 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155484 -0.373727 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137998 -0.343587 0.509559 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146326 -0.360204 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122476 -0.353814 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115031 -0.4293 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER -0.125111 -0.41922 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138881 -0.42291 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.121421 -0.40545 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.101261 -0.425611 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0975713 -0.411841 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911807 -0.435691 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11872 -0.44307 0.450097 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10864 -0.45315 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13249 -0.44676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER -0.162382 -0.486264 0.544331 RAD 0.0185185 + txt002 + SPHERE CENTER -0.174264 -0.502603 0.558526 RAD 0.00617284 + txt002 + SPHERE CENTER -0.15142 -0.495376 0.564491 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170327 -0.479659 0.566757 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185226 -0.49349 0.538366 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18129 -0.470546 0.546597 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173345 -0.477151 0.524171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166319 -0.509207 0.536101 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154437 -0.492868 0.521905 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143475 -0.501981 0.542066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.507294 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0810612 -0.508376 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745774 -0.484874 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0837352 -0.498397 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104911 -0.514767 0.503387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107585 -0.504787 0.525813 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122277 -0.497655 0.507294 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0957534 -0.501244 0.484868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11312 -0.484132 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0892696 -0.477742 0.488775 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0984274 -0.491265 0.581368 RAD 0.0185185 + txt002 + SPHERE CENTER -0.082906 -0.501491 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0745774 -0.484874 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0892696 -0.477742 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.106756 -0.507882 0.597621 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11312 -0.484132 0.599887 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122277 -0.497655 0.581368 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0920638 -0.515014 0.579103 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107585 -0.504787 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0837352 -0.498397 0.56285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.153845 -0.574159 0.618405 RAD 0.0555556 + txt002 + SPHERE CENTER 0.202534 -0.612768 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.225282 -0.612732 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.22113 -0.60221 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.212428 -0.591695 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206686 -0.62329 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193832 -0.602253 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.183939 -0.623325 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215388 -0.633805 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.192641 -0.63384 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.211236 -0.623283 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.243024 -0.542885 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219861 -0.534333 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.243024 -0.542885 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219861 -0.534333 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248559 -0.563539 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23093 -0.575642 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.23093 -0.575642 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.184086 -0.543919 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.200547 -0.527458 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205161 -0.540303 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187702 -0.522843 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.179472 -0.531074 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.166627 -0.526459 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.163011 -0.547535 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196931 -0.548533 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.18047 -0.564994 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201546 -0.561378 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130984 -0.631939 0.658726 RAD 0.0185185 + txt002 + SPHERE CENTER 0.132649 -0.643128 0.680674 RAD 0.00617284 + txt002 + SPHERE CENTER 0.152367 -0.631785 0.671072 RAD 0.00617284 + txt002 + SPHERE CENTER 0.133263 -0.618482 0.679302 RAD 0.00617284 + txt002 + SPHERE CENTER 0.111266 -0.643283 0.668328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11188 -0.618637 0.666956 RAD 0.00617284 + txt002 + SPHERE CENTER 0.109601 -0.632094 0.64638 RAD 0.00617284 + txt002 + SPHERE CENTER 0.130371 -0.656585 0.660098 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128706 -0.645397 0.63815 RAD 0.00617284 + txt002 + SPHERE CENTER 0.150088 -0.645242 0.650495 RAD 0.00617284 + txt002 + SPHERE CENTER 0.112536 -0.56309 0.678886 RAD 0.0185185 + txt002 + SPHERE CENTER 0.11011 -0.549659 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.132596 -0.555684 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.118927 -0.53924 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.09005 -0.557065 0.687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0988668 -0.546646 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0924762 -0.570497 0.666541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103719 -0.573509 0.699462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106145 -0.58694 0.678886 RAD 0.00617284 + txt002 + SPHERE CENTER 0.126205 -0.579534 0.691232 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.618405 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0609772 -0.591664 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.643096 RAD 0.00617284 + txt002 + SPHERE CENTER 0.076761 -0.572676 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0609772 -0.591664 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.076761 -0.572676 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.593714 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0665116 -0.612319 0.618405 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0878298 -0.613986 0.606059 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0878298 -0.613986 0.630751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.172294 -0.643008 0.598245 RAD 0.0185185 + txt002 + SPHERE CENTER 0.189742 -0.660425 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.196144 -0.636618 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.185725 -0.645434 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.165892 -0.666816 0.599616 RAD 0.00617284 + txt002 + SPHERE CENTER 0.161875 -0.651825 0.618821 RAD 0.00617284 + txt002 + SPHERE CENTER 0.148444 -0.649399 0.598245 RAD 0.00617284 + txt002 + SPHERE CENTER 0.17631 -0.657999 0.57904 RAD 0.00617284 + txt002 + SPHERE CENTER 0.158862 -0.640582 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.182712 -0.634191 0.577669 RAD 0.00617284 + txt002 + SPHERE CENTER 0.123605 -0.6044 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.107144 -0.620861 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.119989 -0.625475 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102529 -0.608016 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.11076 -0.599785 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106145 -0.58694 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.127221 -0.583324 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.128219 -0.617245 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.14468 -0.600784 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.141064 -0.621859 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.195155 -0.585228 0.557924 RAD 0.0185185 + txt002 + SPHERE CENTER 0.203972 -0.574809 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.181486 -0.568784 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.201546 -0.561378 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.217641 -0.591253 0.549693 RAD 0.00617284 + txt002 + SPHERE CENTER 0.215215 -0.577822 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.208824 -0.601672 0.57027 RAD 0.00617284 + txt002 + SPHERE CENTER 0.197581 -0.598659 0.537348 RAD 0.00617284 + txt002 + SPHERE CENTER 0.188764 -0.609078 0.557924 RAD 0.00617284 + txt002 + SPHERE CENTER 0.175095 -0.592634 0.545578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0329639 -0.552323 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0248832 -0.625877 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0316054 -0.646362 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0478 -0.627981 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0287309 -0.625173 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00868865 -0.644258 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00581415 -0.623069 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00196644 -0.623773 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0277577 -0.647066 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0210355 -0.62658 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0439523 -0.628685 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0822954 -0.593331 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.105299 -0.593994 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.100664 -0.582384 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0926585 -0.572783 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0869303 -0.604941 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0742898 -0.58373 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0639267 -0.604278 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0949359 -0.614541 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0719323 -0.613879 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.090301 -0.602932 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0138144 -0.584567 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0177119 -0.584898 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0364224 -0.580268 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0185345 -0.56353 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00489609 -0.589197 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00407348 -0.567829 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00879364 -0.588867 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0129918 -0.605935 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00909422 -0.605605 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0317022 -0.601305 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0244483 -0.584869 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0473753 -0.5935 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0308315 -0.595617 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0399691 -0.57344 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0409921 -0.582752 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0335859 -0.562692 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0180651 -0.574121 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0318545 -0.604929 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00892756 -0.596298 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0153107 -0.607046 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0355172 -0.54356 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0495897 -0.530389 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0261165 -0.53532 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER -0.031221 -0.519442 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0589904 -0.538628 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0406217 -0.527681 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0449178 -0.551799 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0538859 -0.554507 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0398133 -0.567678 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0304127 -0.559438 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0163676 -0.511316 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0212225 -0.48882 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00896145 -0.491256 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00194055 -0.497372 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0286287 -0.50888 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00546563 -0.517432 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0237738 -0.531375 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0395307 -0.502764 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0346758 -0.525259 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272696 -0.505199 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440327 -0.593633 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0604766 -0.607302 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0678827 -0.587242 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0604766 -0.607302 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0366265 -0.613693 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0366265 -0.613693 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0201827 -0.600023 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440327 -0.593633 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0275889 -0.579964 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0514389 -0.573573 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0521134 -0.520079 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0542684 -0.523344 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0591566 -0.541988 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0358996 -0.534291 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0472252 -0.501435 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0288565 -0.512382 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0450702 -0.49817 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0704822 -0.509132 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0683272 -0.505868 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0753703 -0.527777 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101445 -0.561087 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.118381 -0.551884 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0944221 -0.550745 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.103361 -0.536664 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.125404 -0.562225 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.110383 -0.547006 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.108468 -0.571428 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.116465 -0.576307 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0995293 -0.58551 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0925065 -0.575168 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247614 -0.494808 0.43322 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313607 -0.494287 0.399581 RAD 0.0185185 + txt002 + SPHERE CENTER 0.326876 -0.484182 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302705 -0.488171 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310432 -0.470513 0.39372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337778 -0.490299 0.402668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321334 -0.476629 0.415013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.324509 -0.500404 0.420874 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330051 -0.507957 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316783 -0.518062 0.405442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.305881 -0.511946 0.384149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269833 -0.434629 0.396183 RAD 0.0185185 + txt002 + SPHERE CENTER 0.279233 -0.426389 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286276 -0.448298 0.383837 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263449 -0.445377 0.37489 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262789 -0.41272 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.247006 -0.431707 0.387235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.253389 -0.420959 0.408529 RAD 0.00617284 + txt002 + SPHERE CENTER 0.285616 -0.415641 0.396183 RAD 0.00617284 + txt002 + SPHERE CENTER 0.276216 -0.42388 0.417476 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29266 -0.43755 0.40513 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302539 -0.452978 0.460062 RAD 0.0185185 + txt002 + SPHERE CENTER 0.320401 -0.436971 0.454201 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3148 -0.455413 0.438769 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29902 -0.436675 0.441856 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30814 -0.434535 0.475494 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286759 -0.434239 0.463149 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290278 -0.450543 0.481355 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32392 -0.453274 0.472408 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306057 -0.469281 0.478269 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318318 -0.471717 0.456976 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291389 -0.554467 0.436618 RAD 0.0185185 + txt002 + SPHERE CENTER 0.314604 -0.562288 0.439705 RAD 0.00617284 + txt002 + SPHERE CENTER 0.310183 -0.541186 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.306499 -0.542501 0.45205 RAD 0.00617284 + txt002 + SPHERE CENTER 0.29581 -0.575569 0.448652 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287705 -0.555781 0.460998 RAD 0.00617284 + txt002 + SPHERE CENTER 0.272595 -0.567748 0.445566 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299494 -0.574255 0.424272 RAD 0.00617284 + txt002 + SPHERE CENTER 0.276279 -0.566433 0.421186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295073 -0.553152 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.28032 -0.513157 0.497099 RAD 0.0185185 + txt002 + SPHERE CENTER 0.298839 -0.507811 0.512531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.302049 -0.505577 0.488152 RAD 0.00617284 + txt002 + SPHERE CENTER 0.287442 -0.489718 0.500186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27711 -0.515392 0.521479 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265714 -0.497299 0.509133 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258591 -0.520738 0.506047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291716 -0.531251 0.509445 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273198 -0.536597 0.494013 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294927 -0.529016 0.485065 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225396 -0.554987 0.470257 RAD 0.0185185 + txt002 + SPHERE CENTER 0.227186 -0.567359 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.246777 -0.555283 0.482603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.227528 -0.54267 0.49155 RAD 0.00617284 + txt002 + SPHERE CENTER 0.205805 -0.567063 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.206147 -0.542374 0.479204 RAD 0.00617284 + txt002 + SPHERE CENTER 0.204014 -0.554691 0.457911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.225054 -0.579676 0.470257 RAD 0.00617284 + txt002 + SPHERE CENTER 0.223263 -0.567305 0.448964 RAD 0.00617284 + txt002 + SPHERE CENTER 0.244644 -0.567601 0.46131 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258683 -0.536117 0.372739 RAD 0.0185185 + txt002 + SPHERE CENTER 0.275127 -0.549787 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282533 -0.529727 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275127 -0.549787 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251277 -0.556177 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.251277 -0.556177 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.234833 -0.542508 0.372739 RAD 0.00617284 + txt002 + SPHERE CENTER 0.258683 -0.536117 0.348047 RAD 0.00617284 + txt002 + SPHERE CENTER 0.242239 -0.522448 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.266089 -0.516058 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.19269 -0.536638 0.406378 RAD 0.0185185 + txt002 + SPHERE CENTER 0.17251 -0.549603 0.412239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.191778 -0.549105 0.427671 RAD 0.00617284 + txt002 + SPHERE CENTER 0.177908 -0.528912 0.424584 RAD 0.00617284 + txt002 + SPHERE CENTER 0.173421 -0.537136 0.390945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.178819 -0.516445 0.403291 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193601 -0.524171 0.385084 RAD 0.00617284 + txt002 + SPHERE CENTER 0.187292 -0.557329 0.394032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.207471 -0.544363 0.388171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.20656 -0.556831 0.409464 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214908 -0.476459 0.369341 RAD 0.0185185 + txt002 + SPHERE CENTER 0.209819 -0.457868 0.353908 RAD 0.00617284 + txt002 + SPHERE CENTER 0.210053 -0.453963 0.378288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2312 -0.458164 0.366254 RAD 0.00617284 + txt002 + SPHERE CENTER 0.214674 -0.480363 0.344961 RAD 0.00617284 + txt002 + SPHERE CENTER 0.236055 -0.480659 0.357307 RAD 0.00617284 + txt002 + SPHERE CENTER 0.219763 -0.498954 0.360393 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193527 -0.476163 0.356995 RAD 0.00617284 + txt002 + SPHERE CENTER 0.198616 -0.494753 0.372427 RAD 0.00617284 + txt002 + SPHERE CENTER 0.193761 -0.472258 0.381374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER -0.157543 -0.835815 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.122136 -0.871646 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER -0.102403 -0.871334 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100577 -0.862937 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113406 -0.850164 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123961 -0.880044 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER -0.134964 -0.858873 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143694 -0.880356 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111133 -0.892817 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130866 -0.893129 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER -0.109307 -0.884419 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0854653 -0.82339 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0654286 -0.811594 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0820122 -0.820516 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0876595 -0.80102 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0688817 -0.814468 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0911125 -0.803895 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0889183 -0.826265 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0632344 -0.833964 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER -0.083271 -0.845761 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER -0.079818 -0.842886 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135649 -0.799077 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.120908 -0.781177 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113462 -0.795477 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13149 -0.778973 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143095 -0.784778 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153678 -0.782573 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157836 -0.802678 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER -0.125067 -0.801282 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.139808 -0.819182 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.11762 -0.815582 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194213 -0.884071 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER -0.197746 -0.891905 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175383 -0.884286 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193701 -0.867957 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216576 -0.89169 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212531 -0.867741 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER -0.213043 -0.883856 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER -0.198259 -0.908019 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194726 -0.900186 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER -0.175896 -0.900401 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207727 -0.811502 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.212743 -0.794108 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER -0.189621 -0.802328 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER -0.199907 -0.788345 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230849 -0.803282 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER -0.218012 -0.797518 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225832 -0.820676 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220563 -0.817265 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215547 -0.83466 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER -0.197441 -0.825486 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER -0.229621 -0.84824 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.25245 -0.843832 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233837 -0.846687 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.235043 -0.826426 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248234 -0.845385 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230827 -0.827978 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225404 -0.849792 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247028 -0.865646 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224198 -0.870053 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER -0.228415 -0.868501 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14403 -0.908384 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER -0.128672 -0.926643 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER -0.1198 -0.904034 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER -0.133221 -0.90826 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152902 -0.930993 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157451 -0.912609 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER -0.16826 -0.912733 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER -0.139481 -0.926768 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154838 -0.908508 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130608 -0.904159 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179437 -0.872552 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.188167 -0.894035 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172046 -0.89378 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195141 -0.885777 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195558 -0.872807 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202532 -0.864549 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186828 -0.851325 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172463 -0.880811 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163733 -0.859328 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER -0.156342 -0.880556 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107359 -0.860128 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0905999 -0.853284 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111382 -0.840233 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0940331 -0.839638 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.086577 -0.873178 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0900102 -0.859532 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103336 -0.880022 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER -0.103926 -0.873773 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120685 -0.880618 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124708 -0.860723 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0133465 -0.69376 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0838533 -0.674309 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.103063 -0.66171 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0876683 -0.673446 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0800983 -0.653258 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0992478 -0.662574 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0762832 -0.654121 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0800382 -0.675172 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.106818 -0.682761 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0876083 -0.69536 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0914233 -0.694497 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0539145 -0.666287 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0547519 -0.662466 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0439578 -0.682791 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0332597 -0.660752 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0647085 -0.645962 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0432164 -0.644249 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0638711 -0.649783 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0754066 -0.668 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0745692 -0.671821 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646126 -0.688325 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0446211 -0.604582 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0239663 -0.599047 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446211 -0.604582 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0432853 -0.701782 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0608821 -0.693716 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0652402 -0.694884 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496759 -0.677932 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0389272 -0.700615 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.027721 -0.684831 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0213304 -0.708681 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0544915 -0.717566 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0368947 -0.725632 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0588496 -0.718734 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00804971 -0.649684 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00328338 -0.628657 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0152909 -0.642244 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.000378614 -0.630031 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.026624 -0.636097 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.022962 -0.637471 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0313903 -0.657124 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0117117 -0.648309 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.016478 -0.669336 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.00686255 -0.661896 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272215 -0.721234 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0310802 -0.720593 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00820099 -0.718114 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0246945 -0.7 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0501007 -0.723713 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.043715 -0.70312 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.046242 -0.724354 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0336072 -0.741827 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0297485 -0.742467 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.010728 -0.739347 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0646815 -0.745859 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0887955 -0.750021 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0813312 -0.732161 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.078459 -0.729506 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0721458 -0.763719 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0618093 -0.743204 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0480318 -0.759557 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.075018 -0.766375 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.050904 -0.762212 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0675537 -0.748514 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00415829 -0.786629 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.024813 -0.781094 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00415829 -0.786629 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0347427 -0.737837 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0542122 -0.747099 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0550267 -0.7241 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0553974 -0.743371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0339282 -0.760836 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0351134 -0.757108 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0144587 -0.751574 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0335575 -0.741565 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.014088 -0.732303 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0343719 -0.718566 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.142305 -0.61371 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.125845 -0.597249 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.12123 -0.610094 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138689 -0.592635 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14692 -0.600865 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.159765 -0.596251 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.163381 -0.617326 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.12946 -0.618324 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145921 -0.634785 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124846 -0.631169 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0833673 -0.612676 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10653 -0.604124 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0833673 -0.612676 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10653 -0.604124 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.624779 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0778329 -0.633331 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0954616 -0.645433 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0954616 -0.645433 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.141271 -0.554772 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13272 -0.577935 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161926 -0.549237 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174029 -0.566866 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.174029 -0.566866 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141271 -0.554772 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.5724 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.13272 -0.577935 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.213855 -0.632882 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.216282 -0.61945 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193796 -0.625476 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207465 -0.609032 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.236341 -0.626857 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227525 -0.616438 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233915 -0.640288 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.222672 -0.6433 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220246 -0.656732 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200186 -0.649326 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.2291 -0.567237 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209804 -0.576452 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.209804 -0.576452 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24422 -0.582357 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240045 -0.606693 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24422 -0.582357 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240045 -0.606693 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.591572 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.265414 -0.661455 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249631 -0.642468 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.265414 -0.661455 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.249631 -0.642468 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.663122 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.25988 -0.68211 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238562 -0.683777 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.238562 -0.683777 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161477 -0.68526 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.148046 -0.687686 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137627 -0.678869 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.154071 -0.6652 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171896 -0.694077 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177921 -0.671591 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER -0.185327 -0.691651 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.155452 -0.707746 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER -0.168883 -0.70532 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.145033 -0.698929 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.190051 -0.736819 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171063 -0.721035 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210706 -0.731284 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212373 -0.709966 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.212373 -0.709966 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.190051 -0.736819 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.715501 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171063 -0.721035 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.095832 -0.700504 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105047 -0.681209 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.105047 -0.681209 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110952 -0.715624 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135288 -0.711449 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER -0.110952 -0.715624 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135288 -0.711449 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.696329 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343435 -0.786005 8.51251e-17 RAD 0.0555556 + txt002 + SPHERE CENTER -0.392454 -0.82165 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER -0.400556 -0.824791 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376528 -0.821021 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392663 -0.802599 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.416482 -0.82542 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408589 -0.803228 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER -0.40838 -0.822279 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400347 -0.843843 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392245 -0.840701 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376319 -0.840073 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER -0.323622 -0.80984 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.308073 -0.80634 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.300378 -0.802721 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316395 -0.786996 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.331317 -0.813459 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339639 -0.794116 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346866 -0.81696 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.315299 -0.829184 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.330849 -0.832685 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307605 -0.825565 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.370774 -0.753118 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.367981 -0.734271 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.348136 -0.745269 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362711 -0.731279 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390619 -0.74212 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.385349 -0.739128 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393412 -0.760966 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376044 -0.756109 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378837 -0.774956 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356199 -0.767107 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412267 -0.797815 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER -0.436217 -0.793573 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER -0.420728 -0.796968 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419454 -0.776294 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427756 -0.79442 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410993 -0.777141 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403807 -0.798662 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER -0.42903 -0.815094 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405081 -0.819335 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.413542 -0.818489 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390587 -0.729282 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.392427 -0.704862 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.373948 -0.714218 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374248 -0.717401 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409067 -0.719927 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390887 -0.732465 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407227 -0.744347 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408767 -0.716744 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406927 -0.741164 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.390287 -0.726099 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.363249 -0.76217 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER -0.356966 -0.747522 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER -0.352002 -0.740618 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339469 -0.759239 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER -0.368213 -0.769074 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER -0.350716 -0.780791 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER -0.374496 -0.783722 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380746 -0.750453 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER -0.387029 -0.765101 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375782 -0.743549 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER -0.365116 -0.854538 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER -0.365674 -0.878086 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER -0.346241 -0.863875 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER -0.367962 -0.859887 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384548 -0.868748 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER -0.386837 -0.85055 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER -0.38399 -0.8452 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362827 -0.872736 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER -0.362269 -0.849188 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER -0.343394 -0.858526 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316097 -0.818893 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER -0.297057 -0.819591 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.304244 -0.79807 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293153 -0.814956 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER -0.30891 -0.840413 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.305006 -0.835779 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32795 -0.839716 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320001 -0.823527 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339041 -0.822829 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327188 -0.802007 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296284 -0.842728 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER -0.272611 -0.848999 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER -0.278432 -0.829121 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.281616 -0.828835 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER -0.290462 -0.862606 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER -0.299468 -0.842441 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.314135 -0.856335 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.287278 -0.862893 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER -0.310951 -0.856621 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER -0.293099 -0.843015 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER -0.358439 -0.594141 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.389119 -0.547576 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.386849 -0.525642 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366733 -0.538964 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379645 -0.528407 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409235 -0.534255 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.402031 -0.537019 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.411505 -0.556189 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396323 -0.544812 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398593 -0.566746 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.376207 -0.558134 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317871 -0.566667 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.299647 -0.551072 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.29885 -0.563547 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.315344 -0.545434 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318667 -0.554192 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.334364 -0.548554 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336891 -0.569787 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.302174 -0.572306 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.320398 -0.587901 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.301377 -0.584781 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.327164 -0.504962 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347819 -0.499428 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327164 -0.504962 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.429687 -0.57505 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER -0.446515 -0.55776 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428387 -0.562617 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423296 -0.5512 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.447815 -0.570193 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424596 -0.563633 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430987 -0.587483 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER -0.452905 -0.58161 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436077 -0.5989 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER -0.434777 -0.586467 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379835 -0.550064 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.372012 -0.535334 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359551 -0.536327 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.35918 -0.555599 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392296 -0.549071 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379464 -0.569335 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400119 -0.563801 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.392667 -0.529799 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.400489 -0.54453 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.380205 -0.530793 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399007 -0.621614 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.420252 -0.632748 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408963 -0.638118 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.419661 -0.61608 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410295 -0.616244 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409705 -0.599576 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.38905 -0.60511 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399597 -0.638282 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.378352 -0.627149 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388308 -0.643653 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.408291 -0.619127 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.415912 -0.617918 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39183 -0.616439 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.406911 -0.597788 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432372 -0.620605 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423371 -0.600475 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER -0.424751 -0.621814 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.417292 -0.639257 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER -0.409671 -0.640465 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39321 -0.637778 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375943 -0.687009 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396598 -0.681475 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375943 -0.687009 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337042 -0.638217 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.320629 -0.641183 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.313702 -0.630777 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328614 -0.618565 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.34397 -0.648623 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.351955 -0.626005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.360383 -0.645657 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.329058 -0.660835 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.345471 -0.65787 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.32213 -0.65043 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.358439 -0.594141 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.409774 -0.542042 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.413579 -0.517869 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.395831 -0.525596 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.393219 -0.528508 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.427522 -0.534315 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.407161 -0.544953 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.423716 -0.558488 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.430134 -0.531404 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.426328 -0.555577 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.412386 -0.539131 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379835 -0.550064 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375068 -0.529037 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356494 -0.542624 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.371406 -0.530412 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398409 -0.536477 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394747 -0.537852 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403175 -0.557504 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.383497 -0.548689 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388263 -0.569716 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.364922 -0.562276 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.327164 -0.504962 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.347819 -0.499428 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.359921 -0.517056 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327164 -0.504962 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.339267 -0.522591 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.318612 -0.528125 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.388377 -0.586119 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.399584 -0.570335 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.403942 -0.569167 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.381987 -0.562269 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.384019 -0.587286 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER -0.366422 -0.57922 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.372813 -0.60307 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405974 -0.594185 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER -0.394768 -0.609969 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER -0.410332 -0.593017 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER -0.317871 -0.566667 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317033 -0.562847 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.327827 -0.583171 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338525 -0.561133 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307077 -0.546343 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.328569 -0.544629 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307914 -0.550163 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.296378 -0.568381 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.297216 -0.572202 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.307172 -0.588706 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337042 -0.638217 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.317573 -0.64748 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316758 -0.624481 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.316388 -0.643752 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337857 -0.661216 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER -0.336672 -0.657489 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357326 -0.651954 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER -0.338228 -0.641945 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER -0.357697 -0.632683 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.337413 -0.618946 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.428945 -0.613592 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.451897 -0.612625 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432663 -0.614807 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER -0.436515 -0.593593 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.448179 -0.61141 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER -0.432797 -0.592379 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425227 -0.612377 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.444328 -0.632624 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421376 -0.633591 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER -0.425094 -0.634806 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.375943 -0.687009 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.396598 -0.681475 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.398265 -0.660156 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.375943 -0.687009 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.37761 -0.665691 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER -0.356956 -0.671225 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.399007 -0.621614 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER -0.402865 -0.620974 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER -0.379986 -0.618494 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.39648 -0.600381 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.421886 -0.624094 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER -0.4155 -0.603501 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER -0.418027 -0.624734 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER -0.405392 -0.642207 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.401533 -0.642848 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.382513 -0.639728 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER -0.157543 -0.835815 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER -0.119969 -0.899353 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0977075 -0.909872 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0997803 -0.886771 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104052 -0.891613 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER -0.117896 -0.922453 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124241 -0.904194 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER -0.140158 -0.911935 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER -0.113625 -0.917612 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135886 -0.907093 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115698 -0.894512 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0844101 -0.836885 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0627848 -0.826973 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0805529 -0.830202 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER -0.083104 -0.81296 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0666419 -0.833656 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0869612 -0.819643 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0882673 -0.843568 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0640908 -0.850898 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0857161 -0.860809 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0818589 -0.854126 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER -0.130205 -0.868703 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER -0.11253 -0.867758 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107566 -0.860854 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER -0.122142 -0.846864 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135168 -0.875606 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER -0.14478 -0.854713 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER -0.152843 -0.876551 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120593 -0.889596 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER -0.138267 -0.890541 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115629 -0.882692 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER -0.193102 -0.898283 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER -0.201143 -0.920038 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17991 -0.910616 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201384 -0.900209 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214335 -0.907705 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER -0.214576 -0.887876 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206294 -0.88595 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192861 -0.918112 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER -0.18482 -0.896357 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER -0.171628 -0.90869 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203337 -0.867633 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER -0.209658 -0.868948 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER -0.186008 -0.865773 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER -0.202239 -0.84746 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER -0.226988 -0.870808 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.219569 -0.84932 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER -0.220667 -0.869493 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210757 -0.889121 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER -0.204436 -0.887806 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER -0.187106 -0.885946 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER -0.230676 -0.834745 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER -0.252002 -0.824206 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER -0.234336 -0.827952 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER -0.231282 -0.810793 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER -0.248342 -0.830999 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227621 -0.817586 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER -0.227016 -0.841538 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER -0.251396 -0.848158 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23007 -0.858698 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23373 -0.851905 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER -0.147308 -0.866465 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER -0.130609 -0.876203 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.124356 -0.857385 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128522 -0.879733 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153561 -0.885283 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER -0.151474 -0.888813 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER -0.170259 -0.875546 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.149395 -0.862935 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER -0.166093 -0.853198 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER -0.143141 -0.844117 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER -0.184881 -0.802927 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER -0.180723 -0.785723 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER -0.173028 -0.782104 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER -0.161937 -0.798991 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER -0.192576 -0.806546 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER -0.17379 -0.819813 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196734 -0.82375 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203667 -0.78966 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207825 -0.806864 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER -0.195972 -0.786041 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111748 -0.803997 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER -0.108311 -0.798532 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER -0.119537 -0.819589 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131037 -0.797989 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100522 -0.78294 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER -0.123249 -0.782397 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.10396 -0.788405 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0890219 -0.80454 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0924597 -0.810005 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100248 -0.825597 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER -0.172546 -0.643951 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER -0.202787 -0.61371 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.200937 -0.595399 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.194794 -0.591462 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.180539 -0.605717 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.208929 -0.617647 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188531 -0.627965 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.210779 -0.635958 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.223185 -0.603392 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.225035 -0.621702 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.217042 -0.599454 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.244096 -0.624779 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.260374 -0.607636 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240901 -0.612854 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.237705 -0.600929 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.26357 -0.619561 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.240901 -0.612854 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247291 -0.636704 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.266765 -0.631486 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.250487 -0.648629 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.247291 -0.636704 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.191718 -0.5724 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.185011 -0.549732 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.167868 -0.56601 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179793 -0.569205 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.208861 -0.556122 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203643 -0.575596 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.215568 -0.578791 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.196936 -0.552927 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.203643 -0.575596 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.179793 -0.569205 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.131237 -0.632882 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.131575 -0.625593 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.15071 -0.6381 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.146508 -0.614836 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.112102 -0.620375 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.127034 -0.609618 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111763 -0.627664 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.116304 -0.643639 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.115965 -0.650927 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.135439 -0.656145 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.120168 -0.591572 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.105912 -0.577317 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111438 -0.600302 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128897 -0.582843 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.114642 -0.568587 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.137627 -0.574113 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.128897 -0.582843 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0971825 -0.586046 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.111438 -0.600302 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.102708 -0.609032 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.100996 -0.663122 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0783272 -0.656415 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0978007 -0.651197 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0946054 -0.639272 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0815225 -0.66834 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0978007 -0.651197 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104191 -0.675047 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0847178 -0.680265 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.107387 -0.686972 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.104191 -0.675047 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.183615 -0.68526 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER -0.182351 -0.708085 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165569 -0.700531 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.188833 -0.704733 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER -0.200397 -0.692813 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER -0.206879 -0.689462 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER -0.201661 -0.669989 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177134 -0.688611 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER -0.178397 -0.665787 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER -0.160351 -0.681058 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER -0.153374 -0.715501 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.136231 -0.731779 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.129524 -0.70911 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141449 -0.712305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.160081 -0.738169 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165299 -0.718696 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.177224 -0.721891 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.148156 -0.734974 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER -0.165299 -0.718696 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.141449 -0.712305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.224924 -0.696329 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER -0.23918 -0.710584 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216195 -0.705059 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233654 -0.687599 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER -0.24791 -0.701855 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.242384 -0.678869 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER -0.233654 -0.687599 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.23045 -0.719314 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER -0.216195 -0.705059 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER -0.207465 -0.713788 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0133465 -0.69376 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.0631985 -0.668775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0667914 -0.661946 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0511945 -0.680354 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0452771 -0.65711 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0787954 -0.650366 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0572811 -0.64553 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0752026 -0.657195 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0847128 -0.673611 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.08112 -0.680439 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.069116 -0.692019 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00804971 -0.649684 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.000226782 -0.634953 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0122343 -0.635947 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.012605 -0.655218 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0205108 -0.64869 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00767898 -0.668955 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0283337 -0.66342 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0208815 -0.629419 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0287044 -0.644149 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00842045 -0.630413 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0446211 -0.604582 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0239663 -0.599047 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0118635 -0.616676 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0446211 -0.604582 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0325183 -0.62221 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.053173 -0.627745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0845947 -0.712851 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.107813 -0.706291 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0896851 -0.701434 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0909853 -0.689001 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.102723 -0.717709 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0858949 -0.700418 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0795043 -0.724268 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.101422 -0.730141 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0782041 -0.736701 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0832945 -0.725284 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0539145 -0.666287 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0721382 -0.650692 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.072935 -0.663167 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0564414 -0.645053 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0531177 -0.653812 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0374209 -0.648173 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.034894 -0.669407 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0696112 -0.671925 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0513875 -0.68752 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.070408 -0.6844 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0347427 -0.737837 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0511556 -0.740802 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0580833 -0.730397 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.043171 -0.718185 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.027815 -0.748242 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0198304 -0.725625 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0114021 -0.745277 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0427273 -0.760455 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0263144 -0.757489 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0496549 -0.750049 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0440268 -0.740325 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.0650768 -0.746894 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0607735 -0.723153 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0653796 -0.739183 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.04833 -0.764065 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0486329 -0.756355 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.02728 -0.757496 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0437239 -0.748035 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0226739 -0.741466 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0394207 -0.724295 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER -0.00415829 -0.786629 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER -0.024813 -0.781094 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER -0.02648 -0.759776 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00415829 -0.786629 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0058253 -0.76531 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.0148294 -0.770845 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0272215 -0.721234 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER -0.0484665 -0.732368 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0371781 -0.737738 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0478762 -0.715699 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0385099 -0.715864 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0379196 -0.699195 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0172649 -0.70473 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0278118 -0.737902 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER -0.00656677 -0.726768 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER -0.0165234 -0.743272 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 1.11022e-16 RAD 0.166667 + txt002 + SPHERE CENTER 0.690426 -0.508983 1.83812e-16 RAD 0.0555556 + txt002 + SPHERE CENTER 0.755941 -0.484794 -0.0246914 RAD 0.0185185 + txt002 + SPHERE CENTER 0.767658 -0.47411 -0.0436186 RAD 0.00617284 + txt002 + SPHERE CENTER 0.749038 -0.489758 -0.0478724 RAD 0.00617284 + txt002 + SPHERE CENTER 0.744501 -0.467528 -0.0381316 RAD 0.00617284 + txt002 + SPHERE CENTER 0.774562 -0.469146 -0.0204376 RAD 0.00617284 + txt002 + SPHERE CENTER 0.751405 -0.462564 -0.0149506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.762845 -0.47983 -0.00151032 RAD 0.00617284 + txt002 + SPHERE CENTER 0.779098 -0.491377 -0.0301783 RAD 0.00617284 + txt002 + SPHERE CENTER 0.767382 -0.502061 -0.0112511 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760478 -0.507025 -0.0344321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.695668 -0.478434 -0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.703418 -0.481931 -0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.716184 -0.491475 -0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.694124 -0.500827 -0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682902 -0.46889 -0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673608 -0.487786 -0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675152 -0.465393 -0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704962 -0.459538 -0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697211 -0.456041 -0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.717727 -0.469082 -0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7029 -0.436283 -0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.714226 -0.418941 -0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.724842 -0.44101 -0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.704751 -0.43889 -0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.692283 -0.414215 -0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682808 -0.434163 -0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680957 -0.431557 0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.712374 -0.416335 0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701048 -0.433677 0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.722991 -0.438403 0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.7507 -0.515343 0.0425863 RAD 0.0185185 + txt002 + SPHERE CENTER 0.773394 -0.506594 0.0468401 RAD 0.00617284 + txt002 + SPHERE CENTER 0.764807 -0.507924 0.0237283 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755462 -0.491321 0.0394341 RAD 0.00617284 + txt002 + SPHERE CENTER 0.759287 -0.514012 0.065698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.741355 -0.49874 0.058292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.736593 -0.522762 0.0614442 RAD 0.00617284 + txt002 + SPHERE CENTER 0.768632 -0.530616 0.0499923 RAD 0.00617284 + txt002 + SPHERE CENTER 0.745938 -0.539365 0.0457385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760045 -0.531946 0.0268805 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697658 -0.466832 0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.709346 -0.447385 0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.721188 -0.46231 0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703286 -0.447429 0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685816 -0.451907 0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.679757 -0.451951 0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674129 -0.471354 0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703718 -0.466788 0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.692031 -0.486235 0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.71556 -0.481713 0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685185 -0.539531 0.0672777 RAD 0.0185185 + txt002 + SPHERE CENTER 0.693658 -0.538818 0.0904587 RAD 0.00617284 + txt002 + SPHERE CENTER 0.708875 -0.534075 0.0716007 RAD 0.00617284 + txt002 + SPHERE CENTER 0.691194 -0.517905 0.0775657 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669969 -0.544274 0.0861356 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667505 -0.523361 0.0732426 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661495 -0.544988 0.0629546 RAD 0.00617284 + txt002 + SPHERE CENTER 0.687649 -0.560445 0.0801706 RAD 0.00617284 + txt002 + SPHERE CENTER 0.679176 -0.561158 0.0569896 RAD 0.00617284 + txt002 + SPHERE CENTER 0.702866 -0.555702 0.0613127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.743468 -0.557494 -0.0178949 RAD 0.0185185 + txt002 + SPHERE CENTER 0.767402 -0.560084 -0.0233819 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755145 -0.53997 -0.0307879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.760285 -0.543179 -0.00685171 RAD 0.00617284 + txt002 + SPHERE CENTER 0.755725 -0.577608 -0.0104889 RAD 0.00617284 + txt002 + SPHERE CENTER 0.748608 -0.560703 0.00604126 RAD 0.00617284 + txt002 + SPHERE CENTER 0.731791 -0.575017 -0.00500196 RAD 0.00617284 + txt002 + SPHERE CENTER 0.750585 -0.574398 -0.0344251 RAD 0.00617284 + txt002 + SPHERE CENTER 0.726651 -0.571808 -0.0289382 RAD 0.00617284 + txt002 + SPHERE CENTER 0.738328 -0.554284 -0.0418311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677953 -0.581682 0.00679642 RAD 0.0185185 + txt002 + SPHERE CENTER 0.682851 -0.601808 0.0202367 RAD 0.00617284 + txt002 + SPHERE CENTER 0.700216 -0.58454 0.0170845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680568 -0.579842 0.0312799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.660588 -0.59895 0.00994863 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658304 -0.576984 0.0209919 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65569 -0.578824 -0.00349164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680237 -0.603648 -0.0042468 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675339 -0.583522 -0.0176871 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697602 -0.58638 -0.00739901 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683194 -0.551134 -0.0604812 RAD 0.0185185 + txt002 + SPHERE CENTER 0.687731 -0.573364 -0.070222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.703871 -0.56324 -0.0545162 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682033 -0.571303 -0.0462858 RAD 0.00617284 + txt002 + SPHERE CENTER 0.667055 -0.561258 -0.076187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661356 -0.559196 -0.0522508 RAD 0.00617284 + txt002 + SPHERE CENTER 0.662518 -0.539027 -0.0664462 RAD 0.00617284 + txt002 + SPHERE CENTER 0.688893 -0.553195 -0.0844174 RAD 0.00617284 + txt002 + SPHERE CENTER 0.684356 -0.530964 -0.0746767 RAD 0.00617284 + txt002 + SPHERE CENTER 0.705033 -0.543071 -0.0687117 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607487 -0.335322 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.629404 -0.313405 -0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.626214 -0.316595 -0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624401 -0.335868 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606941 -0.318408 -0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.631217 -0.294133 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611945 -0.295946 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634407 -0.290942 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.648676 -0.311592 -0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651867 -0.308402 -0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646863 -0.330864 -0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610996 -0.384191 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.623201 -0.403702 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.635431 -0.385946 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62031 -0.401066 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598766 -0.401947 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595876 -0.399312 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586561 -0.382437 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613886 -0.386827 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.601681 -0.367317 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626116 -0.369071 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558618 -0.331813 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.539107 -0.319608 -0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541743 -0.322499 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.556863 -0.307378 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555982 -0.328923 -0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.573738 -0.316693 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575492 -0.341128 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540862 -0.344043 -0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560372 -0.356248 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.543497 -0.346933 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625895 -0.264535 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.637402 -0.248969 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646193 -0.271807 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625088 -0.268363 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617105 -0.241698 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604791 -0.261092 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605598 -0.257264 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638209 -0.245142 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626702 -0.260708 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647 -0.267979 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550934 -0.258608 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603979 -0.286452 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.613271 -0.265398 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627912 -0.281225 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610787 -0.26842 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589337 -0.270625 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.586853 -0.273647 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.580045 -0.291679 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.606463 -0.283431 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.59717 -0.304484 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621104 -0.299257 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678274 -0.316914 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.69384 -0.305407 -0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674446 -0.317721 -0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671002 -0.296616 -0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.697667 -0.3046 -0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.67483 -0.295809 -0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.682101 -0.316107 -0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.701111 -0.325704 -0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.685545 -0.337211 -0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681717 -0.338018 -0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656357 -0.33883 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.677411 -0.329538 -0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674389 -0.332022 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.661584 -0.314897 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659378 -0.336346 -0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.643552 -0.321705 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.638325 -0.345639 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.672184 -0.353472 -0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.65113 -0.362764 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669162 -0.355956 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684201 -0.391875 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607487 -0.335322 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.659645 -0.283164 0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.672915 -0.269894 0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666987 -0.293281 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.649528 -0.275822 0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665573 -0.259777 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.642185 -0.265705 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.652302 -0.273047 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.683032 -0.277236 0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669762 -0.290507 0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.677104 -0.300624 0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.656357 -0.33883 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.663448 -0.328536 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.639482 -0.329516 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.654603 -0.314396 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.680322 -0.33785 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.671477 -0.32371 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.673232 -0.348145 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.665202 -0.35297 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.658111 -0.363265 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641237 -0.353951 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603979 -0.286452 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.614273 -0.279361 0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628413 -0.288206 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613293 -0.303327 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589839 -0.277607 0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588858 -0.301572 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.579544 -0.284698 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604959 -0.262487 0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.594664 -0.269578 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.619099 -0.271332 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610775 -0.279656 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.621535 -0.258061 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634468 -0.275921 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616678 -0.264057 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.597842 -0.261795 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592985 -0.267791 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587082 -0.28339 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.615632 -0.27366 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604872 -0.295255 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628565 -0.29152 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.550934 -0.258608 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570229 -0.267823 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535813 -0.273728 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539989 -0.298064 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555109 -0.282943 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.558618 -0.331813 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.55307 -0.320611 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57665 -0.325005 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.563845 -0.30788 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535038 -0.327419 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.545813 -0.314688 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540585 -0.338621 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547843 -0.344544 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.553391 -0.355747 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571423 -0.348938 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.663153 -0.332034 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684748 -0.321274 0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.678752 -0.326131 0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.666888 -0.308341 0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669149 -0.327177 0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.651289 -0.314244 0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.647554 -0.337937 0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.681014 -0.344967 0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659419 -0.355727 0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.675018 -0.349824 0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.610996 -0.384191 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.622198 -0.389739 0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.63493 -0.378964 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617804 -0.366159 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598265 -0.394966 0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593871 -0.371386 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587062 -0.389418 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61539 -0.407771 0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.604188 -0.402224 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628121 -0.396997 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.684201 -0.391875 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.674986 -0.37258 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.669081 -0.406996 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.644745 -0.40282 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.659866 -0.3877 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.554344 -0.645066 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.610229 -0.668521 0.153697 RAD 0.0185185 + txt002 + SPHERE CENTER 0.633406 -0.663938 0.160875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626429 -0.65892 0.137727 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617928 -0.64522 0.156428 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617206 -0.673539 0.176845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.601728 -0.654822 0.172398 RAD 0.00617284 + txt002 + SPHERE CENTER 0.59403 -0.678123 0.169668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625707 -0.687239 0.158144 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602531 -0.691822 0.150967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.61873 -0.682221 0.134996 RAD 0.00617284 + txt002 + SPHERE CENTER 0.622977 -0.619787 0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.63767 -0.608008 0.0834188 RAD 0.00617284 + txt002 + SPHERE CENTER 0.620102 -0.623239 0.0751099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.613891 -0.601637 0.0853287 RAD 0.00617284 + txt002 + SPHERE CENTER 0.640545 -0.604555 0.107698 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616766 -0.598184 0.109608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.625852 -0.616334 0.123668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.646756 -0.626157 0.0974792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.632063 -0.637936 0.113449 RAD 0.00617284 + txt002 + SPHERE CENTER 0.629188 -0.641389 0.0891702 RAD 0.00617284 + txt002 + SPHERE CENTER 0.585648 -0.598918 0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.601562 -0.580238 0.162601 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605914 -0.59781 0.14581 RAD 0.00617284 + txt002 + SPHERE CENTER 0.587563 -0.581665 0.142311 RAD 0.00617284 + txt002 + SPHERE CENTER 0.581295 -0.581346 0.176661 RAD 0.00617284 + txt002 + SPHERE CENTER 0.567297 -0.582773 0.156372 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565381 -0.600026 0.173931 RAD 0.00617284 + txt002 + SPHERE CENTER 0.599646 -0.597491 0.18016 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583732 -0.616171 0.177429 RAD 0.00617284 + txt002 + SPHERE CENTER 0.603999 -0.615063 0.163369 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541596 -0.6938 0.165419 RAD 0.0185185 + txt002 + SPHERE CENTER 0.547376 -0.70016 0.188567 RAD 0.00617284 + txt002 + SPHERE CENTER 0.564621 -0.690564 0.173728 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546319 -0.676324 0.182211 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524351 -0.703396 0.180258 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523294 -0.679561 0.173902 RAD 0.00617284 + txt002 + SPHERE CENTER 0.518571 -0.697037 0.157111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542652 -0.717636 0.171776 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536873 -0.711276 0.148628 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559898 -0.70804 0.156937 RAD 0.00617284 + txt002 + SPHERE CENTER 0.517014 -0.624197 0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.516313 -0.60809 0.190293 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538029 -0.616221 0.181811 RAD 0.00617284 + txt002 + SPHERE CENTER 0.524375 -0.60089 0.168094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495298 -0.616065 0.180075 RAD 0.00617284 + txt002 + SPHERE CENTER 0.50336 -0.608865 0.157875 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495999 -0.632172 0.161374 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508952 -0.631397 0.193792 RAD 0.00617284 + txt002 + SPHERE CENTER 0.509653 -0.647504 0.175091 RAD 0.00617284 + txt002 + SPHERE CENTER 0.530668 -0.639529 0.18531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48571 -0.670344 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.466887 -0.67091 0.138803 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490138 -0.671107 0.147112 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480853 -0.650637 0.136894 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46246 -0.670147 0.114524 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476425 -0.649874 0.112614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.481283 -0.669581 0.0985541 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471745 -0.690617 0.124743 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490567 -0.690052 0.108773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.494995 -0.690815 0.133052 RAD 0.00617284 + txt002 + SPHERE CENTER 0.578925 -0.714669 0.104938 RAD 0.0185185 + txt002 + SPHERE CENTER 0.597914 -0.729812 0.109385 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602084 -0.70632 0.103028 RAD 0.00617284 + txt002 + SPHERE CENTER 0.592661 -0.711617 0.125228 RAD 0.00617284 + txt002 + SPHERE CENTER 0.574755 -0.738161 0.111295 RAD 0.00617284 + txt002 + SPHERE CENTER 0.569503 -0.719965 0.127138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.555767 -0.723017 0.106848 RAD 0.00617284 + txt002 + SPHERE CENTER 0.584178 -0.732864 0.0890951 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565189 -0.71772 0.0846485 RAD 0.00617284 + txt002 + SPHERE CENTER 0.588348 -0.709372 0.0827387 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52304 -0.691213 0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.511567 -0.712906 0.0596212 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529503 -0.710453 0.0764123 RAD 0.00617284 + txt002 + SPHERE CENTER 0.507717 -0.699372 0.079911 RAD 0.00617284 + txt002 + SPHERE CENTER 0.505104 -0.693665 0.0455609 RAD 0.00617284 + txt002 + SPHERE CENTER 0.501254 -0.680131 0.0658506 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516576 -0.671972 0.0482916 RAD 0.00617284 + txt002 + SPHERE CENTER 0.526889 -0.704747 0.0420622 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538362 -0.683054 0.044793 RAD 0.00617284 + txt002 + SPHERE CENTER 0.544826 -0.702295 0.0588533 RAD 0.00617284 + txt002 + SPHERE CENTER 0.591673 -0.665934 0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.605761 -0.658095 0.0319289 RAD 0.00617284 + txt002 + SPHERE CENTER 0.58746 -0.643855 0.0404111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.607672 -0.647455 0.0541285 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609975 -0.680174 0.0421477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611885 -0.669535 0.0643473 RAD 0.00617284 + txt002 + SPHERE CENTER 0.595887 -0.688013 0.0608487 RAD 0.00617284 + txt002 + SPHERE CENTER 0.589763 -0.676573 0.0284303 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575674 -0.684413 0.0471312 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571461 -0.662334 0.0369125 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.501645 -0.441164 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.518106 -0.424703 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.522721 -0.437548 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.505261 -0.420089 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497031 -0.428319 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484186 -0.423704 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48057 -0.44478 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.51449 -0.445778 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498029 -0.462239 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.519105 -0.458623 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.560583 -0.44013 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53742 -0.431578 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560583 -0.44013 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.53742 -0.431578 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.452233 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.566118 -0.460785 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548489 -0.472887 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.548489 -0.472887 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.502679 -0.382226 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.511231 -0.405389 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.482024 -0.376691 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.469922 -0.39432 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.469922 -0.39432 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502679 -0.382226 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.399854 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.511231 -0.405389 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.430095 -0.460336 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.427669 -0.446904 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.450155 -0.45293 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436486 -0.436486 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.407609 -0.454311 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.416426 -0.443892 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410035 -0.467742 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.421278 -0.470754 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.423704 -0.484186 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.443764 -0.47678 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.414851 -0.39469 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434147 -0.403906 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.434147 -0.403906 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399731 -0.409811 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403906 -0.434147 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399731 -0.409811 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.403906 -0.434147 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.419026 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.378536 -0.488909 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39432 -0.469922 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378536 -0.488909 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.39432 -0.469922 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.490576 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384071 -0.509564 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405389 -0.511231 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.405389 -0.511231 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.482473 -0.512714 0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.495905 -0.51514 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506323 -0.506323 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.48988 -0.492654 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472055 -0.521531 0.30328 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46603 -0.499045 0.295049 RAD 0.00617284 + txt002 + SPHERE CENTER 0.458623 -0.519105 0.282703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.488498 -0.5352 0.290934 RAD 0.00617284 + txt002 + SPHERE CENTER 0.475067 -0.532774 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498917 -0.526383 0.270358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.4539 -0.564273 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472887 -0.548489 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433245 -0.558738 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431578 -0.53742 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.431578 -0.53742 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4539 -0.564273 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.542955 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.472887 -0.548489 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.548119 -0.527958 0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538903 -0.508662 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.538903 -0.508662 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532998 -0.543078 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.246914 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508662 -0.538903 0.234568 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532998 -0.543078 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508662 -0.538903 0.209877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.523783 0.197531 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335322 -0.607487 0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.313405 -0.629404 0.178389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.316595 -0.626214 0.202664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335868 -0.624401 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318408 -0.606941 0.187336 RAD 0.00617284 + txt002 + SPHERE CENTER 0.294133 -0.631217 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295946 -0.611945 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290942 -0.634407 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.311592 -0.648676 0.193717 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308402 -0.651867 0.169441 RAD 0.00617284 + txt002 + SPHERE CENTER 0.330864 -0.646863 0.178389 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384191 -0.610996 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.405245 -0.601704 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.402224 -0.604188 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.389418 -0.587062 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.387213 -0.608512 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.371386 -0.593871 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.366159 -0.617804 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.400018 -0.625637 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.378964 -0.63493 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396997 -0.628121 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331813 -0.558618 0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.341105 -0.537564 0.175614 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355747 -0.553391 0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338621 -0.540585 0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317172 -0.542791 0.178701 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314688 -0.545813 0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.30788 -0.563845 0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.334297 -0.555596 0.191046 RAD 0.00617284 + txt002 + SPHERE CENTER 0.325005 -0.57665 0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348938 -0.571423 0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.264535 -0.625895 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.245336 -0.623429 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268271 -0.624736 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.260997 -0.604627 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2416 -0.624589 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.257262 -0.605787 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.2608 -0.627055 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.248874 -0.644697 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268073 -0.647163 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271809 -0.646004 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.278768 -0.530773 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286452 -0.603979 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.266942 -0.591774 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269578 -0.594664 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.284698 -0.579544 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.283817 -0.601088 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.301572 -0.588858 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.303327 -0.613293 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.268696 -0.616209 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.288206 -0.628413 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.271332 -0.619099 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316914 -0.678274 0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.31938 -0.697473 0.138161 RAD 0.00617284 + txt002 + SPHERE CENTER 0.338182 -0.681812 0.134867 RAD 0.00617284 + txt002 + SPHERE CENTER 0.318074 -0.674538 0.147213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298112 -0.693935 0.126127 RAD 0.00617284 + txt002 + SPHERE CENTER 0.296805 -0.671 0.135179 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295646 -0.674736 0.110799 RAD 0.00617284 + txt002 + SPHERE CENTER 0.31822 -0.701209 0.113782 RAD 0.00617284 + txt002 + SPHERE CENTER 0.315754 -0.682009 0.0984536 RAD 0.00617284 + txt002 + SPHERE CENTER 0.337022 -0.685547 0.110488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33883 -0.656357 0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.351035 -0.675867 0.0466081 RAD 0.00617284 + txt002 + SPHERE CENTER 0.363265 -0.658111 0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.348145 -0.673232 0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3266 -0.674113 0.0435217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.32371 -0.671477 0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314396 -0.654603 0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341721 -0.658993 0.031176 RAD 0.00617284 + txt002 + SPHERE CENTER 0.329516 -0.639482 0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.353951 -0.641237 0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.412036 -0.664041 0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.554344 -0.645066 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.616373 -0.681385 -0.129006 RAD 0.0185185 + txt002 + SPHERE CENTER 0.639472 -0.678928 -0.137375 RAD 0.00617284 + txt002 + SPHERE CENTER 0.621631 -0.664108 -0.145845 RAD 0.00617284 + txt002 + SPHERE CENTER 0.629767 -0.661636 -0.122663 RAD 0.00617284 + txt002 + SPHERE CENTER 0.634214 -0.696205 -0.120537 RAD 0.00617284 + txt002 + SPHERE CENTER 0.624508 -0.678912 -0.105825 RAD 0.00617284 + txt002 + SPHERE CENTER 0.611115 -0.698662 -0.112168 RAD 0.00617284 + txt002 + SPHERE CENTER 0.626079 -0.698678 -0.143718 RAD 0.00617284 + txt002 + SPHERE CENTER 0.602979 -0.701135 -0.135349 RAD 0.00617284 + txt002 + SPHERE CENTER 0.608237 -0.683858 -0.152187 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617144 -0.607573 -0.122833 RAD 0.0185185 + txt002 + SPHERE CENTER 0.63057 -0.595495 -0.139672 RAD 0.00617284 + txt002 + SPHERE CENTER 0.617371 -0.615286 -0.146288 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605919 -0.594239 -0.140323 RAD 0.00617284 + txt002 + SPHERE CENTER 0.630343 -0.587782 -0.116217 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605692 -0.586526 -0.116868 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616917 -0.59986 -0.0993785 RAD 0.00617284 + txt002 + SPHERE CENTER 0.641795 -0.608828 -0.122182 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628369 -0.620906 -0.105343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.628595 -0.628619 -0.128798 RAD 0.00617284 + txt002 + SPHERE CENTER 0.609912 -0.649723 -0.062352 RAD 0.0185185 + txt002 + SPHERE CENTER 0.631982 -0.640648 -0.0560094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.62585 -0.64267 -0.0798417 RAD 0.00617284 + txt002 + SPHERE CENTER 0.614812 -0.625749 -0.0656463 RAD 0.00617284 + txt002 + SPHERE CENTER 0.616044 -0.647702 -0.0385197 RAD 0.00617284 + txt002 + SPHERE CENTER 0.598874 -0.632802 -0.0481565 RAD 0.00617284 + txt002 + SPHERE CENTER 0.593974 -0.656777 -0.0448623 RAD 0.00617284 + txt002 + SPHERE CENTER 0.627081 -0.664623 -0.0527151 RAD 0.00617284 + txt002 + SPHERE CENTER 0.605012 -0.673698 -0.0590577 RAD 0.00617284 + txt002 + SPHERE CENTER 0.620949 -0.666645 -0.0765474 RAD 0.00617284 + txt002 + SPHERE CENTER 0.553573 -0.718878 -0.117284 RAD 0.0185185 + txt002 + SPHERE CENTER 0.563328 -0.73992 -0.108814 RAD 0.00617284 + txt002 + SPHERE CENTER 0.577348 -0.719679 -0.110668 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559693 -0.720935 -0.0934517 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539553 -0.739118 -0.115431 RAD 0.00617284 + txt002 + SPHERE CENTER 0.535918 -0.720133 -0.100068 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529798 -0.718076 -0.1239 RAD 0.00617284 + txt002 + SPHERE CENTER 0.557208 -0.737863 -0.132647 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547453 -0.716821 -0.141116 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571228 -0.717623 -0.1345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.547112 -0.687216 -0.0506299 RAD 0.0185185 + txt002 + SPHERE CENTER 0.554862 -0.690713 -0.0274488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.570641 -0.682694 -0.0446649 RAD 0.00617284 + txt002 + SPHERE CENTER 0.552739 -0.667813 -0.0364345 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531333 -0.695235 -0.0334138 RAD 0.00617284 + txt002 + SPHERE CENTER 0.52921 -0.672335 -0.0423994 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523582 -0.691738 -0.0565949 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549235 -0.710116 -0.0416443 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541484 -0.706619 -0.0648253 RAD 0.00617284 + txt002 + SPHERE CENTER 0.565014 -0.702097 -0.0588603 RAD 0.00617284 + txt002 + SPHERE CENTER 0.491544 -0.682558 -0.099389 RAD 0.0185185 + txt002 + SPHERE CENTER 0.474542 -0.688647 -0.0825505 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498226 -0.686417 -0.0759343 RAD 0.00617284 + txt002 + SPHERE CENTER 0.485132 -0.666351 -0.0818993 RAD 0.00617284 + txt002 + SPHERE CENTER 0.46786 -0.684788 -0.106005 RAD 0.00617284 + txt002 + SPHERE CENTER 0.47845 -0.662492 -0.105354 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484862 -0.678699 -0.122844 RAD 0.00617284 + txt002 + SPHERE CENTER 0.480953 -0.704854 -0.10004 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497955 -0.698765 -0.116879 RAD 0.00617284 + txt002 + SPHERE CENTER 0.504637 -0.702624 -0.093424 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560805 -0.676727 -0.177765 RAD 0.0185185 + txt002 + SPHERE CENTER 0.57563 -0.689897 -0.192477 RAD 0.00617284 + txt002 + SPHERE CENTER 0.585222 -0.673115 -0.177114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.575587 -0.693998 -0.168128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.551213 -0.693509 -0.193128 RAD 0.00617284 + txt002 + SPHERE CENTER 0.55117 -0.69761 -0.16878 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536388 -0.680339 -0.178416 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560848 -0.672626 -0.202114 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546023 -0.659456 -0.187402 RAD 0.00617284 + txt002 + SPHERE CENTER 0.57044 -0.655844 -0.186751 RAD 0.00617284 + txt002 + SPHERE CENTER 0.498776 -0.640408 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.478525 -0.627785 -0.166213 RAD 0.00617284 + txt002 + SPHERE CENTER 0.484234 -0.630799 -0.142381 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497935 -0.615951 -0.156576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493066 -0.637394 -0.183703 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512476 -0.62556 -0.174066 RAD 0.00617284 + txt002 + SPHERE CENTER 0.513317 -0.650016 -0.17736 RAD 0.00617284 + txt002 + SPHERE CENTER 0.479365 -0.652241 -0.169507 RAD 0.00617284 + txt002 + SPHERE CENTER 0.499616 -0.664864 -0.163165 RAD 0.00617284 + txt002 + SPHERE CENTER 0.485075 -0.655255 -0.145675 RAD 0.00617284 + txt002 + SPHERE CENTER 0.561576 -0.602915 -0.171592 RAD 0.0185185 + txt002 + SPHERE CENTER 0.570049 -0.602201 -0.194773 RAD 0.00617284 + txt002 + SPHERE CENTER 0.582252 -0.615021 -0.177557 RAD 0.00617284 + txt002 + SPHERE CENTER 0.560414 -0.623084 -0.185788 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549372 -0.590095 -0.188808 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539737 -0.610978 -0.179823 RAD 0.00617284 + txt002 + SPHERE CENTER 0.540899 -0.590808 -0.165627 RAD 0.00617284 + txt002 + SPHERE CENTER 0.571211 -0.582032 -0.180578 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562738 -0.582745 -0.157397 RAD 0.00617284 + txt002 + SPHERE CENTER 0.583414 -0.594852 -0.163362 RAD 0.00617284 + txt002 + SPHERE CENTER 0.335322 -0.607487 -0.111111 RAD 0.0555556 + txt002 + SPHERE CENTER 0.283164 -0.659645 -0.104315 RAD 0.0185185 + txt002 + SPHERE CENTER 0.269894 -0.672915 -0.0882695 RAD 0.00617284 + txt002 + SPHERE CENTER 0.293281 -0.666987 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275822 -0.649528 -0.0830215 RAD 0.00617284 + txt002 + SPHERE CENTER 0.259777 -0.665573 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.265705 -0.642185 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273047 -0.652302 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.277236 -0.683032 -0.109563 RAD 0.00617284 + txt002 + SPHERE CENTER 0.290507 -0.669762 -0.125608 RAD 0.00617284 + txt002 + SPHERE CENTER 0.300624 -0.677104 -0.104315 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33883 -0.656357 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.350033 -0.661904 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.362764 -0.65113 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.345639 -0.638325 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.326099 -0.667131 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.321705 -0.643552 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.314897 -0.661584 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.343224 -0.679937 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332022 -0.674389 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355956 -0.669162 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286452 -0.603979 -0.0555556 RAD 0.0185185 + txt002 + SPHERE CENTER 0.280905 -0.592776 -0.0342624 RAD 0.00617284 + txt002 + SPHERE CENTER 0.304484 -0.59717 -0.0401235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.291679 -0.580045 -0.0524691 RAD 0.00617284 + txt002 + SPHERE CENTER 0.262872 -0.599585 -0.0496945 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273647 -0.586853 -0.0679012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26842 -0.610787 -0.0709877 RAD 0.00617284 + txt002 + SPHERE CENTER 0.275678 -0.61671 -0.0373488 RAD 0.00617284 + txt002 + SPHERE CENTER 0.281225 -0.627912 -0.058642 RAD 0.00617284 + txt002 + SPHERE CENTER 0.299257 -0.621104 -0.0432099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.279656 -0.610775 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.256944 -0.602632 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.26347 -0.606749 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.273158 -0.587686 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.27313 -0.606658 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.289344 -0.591712 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.295841 -0.614801 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263442 -0.62572 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.286153 -0.633864 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.269968 -0.629838 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.278768 -0.530773 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.298064 -0.539989 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.263648 -0.545894 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.267823 -0.570229 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.282943 -0.555109 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.331813 -0.558618 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.342108 -0.551527 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.356248 -0.560372 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.341128 -0.575492 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317673 -0.549772 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.316693 -0.573738 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.307378 -0.556863 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332793 -0.534652 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.322499 -0.541743 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.346933 -0.543497 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.332034 -0.663153 -0.15987 RAD 0.0185185 + txt002 + SPHERE CENTER 0.340177 -0.685865 -0.165118 RAD 0.00617284 + txt002 + SPHERE CENTER 0.355123 -0.669651 -0.154009 RAD 0.00617284 + txt002 + SPHERE CENTER 0.33606 -0.679339 -0.141664 RAD 0.00617284 + txt002 + SPHERE CENTER 0.317089 -0.679367 -0.170979 RAD 0.00617284 + txt002 + SPHERE CENTER 0.312971 -0.672841 -0.147525 RAD 0.00617284 + txt002 + SPHERE CENTER 0.308945 -0.656656 -0.165731 RAD 0.00617284 + txt002 + SPHERE CENTER 0.336151 -0.669679 -0.183325 RAD 0.00617284 + txt002 + SPHERE CENTER 0.328008 -0.646968 -0.178077 RAD 0.00617284 + txt002 + SPHERE CENTER 0.351097 -0.653465 -0.172216 RAD 0.00617284 + txt002 + SPHERE CENTER 0.384191 -0.610996 -0.166667 RAD 0.0185185 + txt002 + SPHERE CENTER 0.391282 -0.600701 -0.18796 RAD 0.00617284 + txt002 + SPHERE CENTER 0.367317 -0.601681 -0.182099 RAD 0.00617284 + txt002 + SPHERE CENTER 0.382437 -0.586561 -0.169753 RAD 0.00617284 + txt002 + SPHERE CENTER 0.408157 -0.610016 -0.172528 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399312 -0.595876 -0.154321 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401066 -0.62031 -0.151235 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393037 -0.625136 -0.184873 RAD 0.00617284 + txt002 + SPHERE CENTER 0.385946 -0.635431 -0.16358 RAD 0.00617284 + txt002 + SPHERE CENTER 0.369071 -0.626116 -0.179012 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.111111 RAD 0.0185185 + txt002 + SPHERE CENTER 0.412036 -0.664041 -0.111111 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40282 -0.644745 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.0864198 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 -0.0987654 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396915 -0.679161 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.37258 -0.674986 -0.123457 RAD 0.00617284 + txt002 + SPHERE CENTER 0.3877 -0.659866 -0.135802 RAD 0.00617284 + txt002 + SPHERE CENTER 0.471405 -0.471405 -0.222222 RAD 0.0555556 + txt002 + SPHERE CENTER 0.441164 -0.441164 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.443014 -0.422853 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.449156 -0.418916 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.463412 -0.433171 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.435021 -0.445101 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455419 -0.455419 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.433171 -0.463412 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.420766 -0.430846 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.418916 -0.449156 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.426908 -0.426908 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.399854 -0.452233 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.383576 -0.43509 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40305 -0.440308 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.406245 -0.428383 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.380381 -0.447015 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.40305 -0.440308 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396659 -0.464158 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.377186 -0.45894 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.393464 -0.476083 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396659 -0.464158 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.452233 -0.399854 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.45894 -0.377186 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.476083 -0.393464 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464158 -0.396659 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.43509 -0.383576 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440308 -0.40305 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.428383 -0.406245 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.447015 -0.380381 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.440308 -0.40305 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.464158 -0.396659 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.512714 -0.460336 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.512375 -0.453047 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.493241 -0.465554 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.497443 -0.44229 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.531849 -0.447829 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.516916 -0.437072 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532187 -0.455118 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527647 -0.471093 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.527985 -0.478381 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.508512 -0.483599 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.523783 -0.419026 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.538038 -0.404771 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532513 -0.427756 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.515053 -0.410297 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.529309 -0.396041 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.506323 -0.401567 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.515053 -0.410297 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.546768 -0.4135 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.532513 -0.427756 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.541242 -0.436486 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.542955 -0.490576 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.565623 -0.483869 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54615 -0.478651 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.549345 -0.466726 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.562428 -0.495794 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.54615 -0.478651 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539759 -0.502501 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.559233 -0.507719 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.536564 -0.514426 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.539759 -0.502501 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.460336 -0.512714 -0.282703 RAD 0.0185185 + txt002 + SPHERE CENTER 0.461599 -0.535539 -0.292037 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478381 -0.527985 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.455118 -0.532187 -0.268448 RAD 0.00617284 + txt002 + SPHERE CENTER 0.443553 -0.520267 -0.299164 RAD 0.00617284 + txt002 + SPHERE CENTER 0.437072 -0.516916 -0.275576 RAD 0.00617284 + txt002 + SPHERE CENTER 0.44229 -0.497443 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.466817 -0.516065 -0.306292 RAD 0.00617284 + txt002 + SPHERE CENTER 0.465554 -0.493241 -0.296959 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483599 -0.508512 -0.289831 RAD 0.00617284 + txt002 + SPHERE CENTER 0.490576 -0.542955 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.507719 -0.559233 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.514426 -0.536564 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502501 -0.539759 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.483869 -0.565623 -0.215094 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478651 -0.54615 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.466726 -0.549345 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.495794 -0.562428 -0.236478 RAD 0.00617284 + txt002 + SPHERE CENTER 0.478651 -0.54615 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.502501 -0.539759 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.419026 -0.523783 -0.222222 RAD 0.0185185 + txt002 + SPHERE CENTER 0.404771 -0.538038 -0.207967 RAD 0.00617284 + txt002 + SPHERE CENTER 0.427756 -0.532513 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410297 -0.515053 -0.200839 RAD 0.00617284 + txt002 + SPHERE CENTER 0.396041 -0.529309 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.401567 -0.506323 -0.222222 RAD 0.00617284 + txt002 + SPHERE CENTER 0.410297 -0.515053 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.4135 -0.546768 -0.22935 RAD 0.00617284 + txt002 + SPHERE CENTER 0.427756 -0.532513 -0.243606 RAD 0.00617284 + txt002 + SPHERE CENTER 0.436486 -0.541242 -0.222222 RAD 0.00617284 + txt002 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/lattice.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/lattice.dat new file mode 100644 index 0000000000..fc40ed8838 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/lattice.dat @@ -0,0 +1,18012 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 512 512 + VERBOSE 0 + +CAMERA + ZOOM 1.0 + ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 8 + CENTER 0.5625 1 0.9375 + VIEWDIR 0 -0.707107 -0.707107 + UPDIR 0.272166 0.680414 -0.680414 + +END_CAMERA + +LIGHT CENTER 2 0.5 0.5 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER -1 0.5 0.5 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 0.5 2 0.5 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 0.5 -1 0.5 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 0.5 0.5 2 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 0.5 0.5 -1 RAD 0.002 COLOR 0.5 0.5 0.5 + +TEXDEF txt001 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0 RAD 0.03125 + txt001 +TEXDEF txt002 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0 APEX 0.109531 0 0 RAD 0.0078125 + txt002 +TEXDEF txt003 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0 APEX 0 0.109531 0 RAD 0.0078125 + txt003 +TEXDEF txt004 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.0154687 APEX 0 0 0.109531 RAD 0.0078125 + txt004 +TEXDEF txt005 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.125 RAD 0.03125 + txt005 +TEXDEF txt006 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.125 APEX 0.109531 0 0.125 RAD 0.0078125 + txt006 +TEXDEF txt007 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.125 APEX 0 0.109531 0.125 RAD 0.0078125 + txt007 +TEXDEF txt008 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.140469 APEX 0 0 0.234531 RAD 0.0078125 + txt008 +TEXDEF txt009 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.25 RAD 0.03125 + txt009 +TEXDEF txt010 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.25 APEX 0.109531 0 0.25 RAD 0.0078125 + txt010 +TEXDEF txt011 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.25 APEX 0 0.109531 0.25 RAD 0.0078125 + txt011 +TEXDEF txt012 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.265469 APEX 0 0 0.359531 RAD 0.0078125 + txt012 +TEXDEF txt013 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.375 RAD 0.03125 + txt013 +TEXDEF txt014 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.375 APEX 0.109531 0 0.375 RAD 0.0078125 + txt014 +TEXDEF txt015 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.375 APEX 0 0.109531 0.375 RAD 0.0078125 + txt015 +TEXDEF txt016 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.390469 APEX 0 0 0.484531 RAD 0.0078125 + txt016 +TEXDEF txt017 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.5 RAD 0.03125 + txt017 +TEXDEF txt018 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.5 APEX 0.109531 0 0.5 RAD 0.0078125 + txt018 +TEXDEF txt019 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.5 APEX 0 0.109531 0.5 RAD 0.0078125 + txt019 +TEXDEF txt020 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.515469 APEX 0 0 0.609531 RAD 0.0078125 + txt020 +TEXDEF txt021 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.625 RAD 0.03125 + txt021 +TEXDEF txt022 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.625 APEX 0.109531 0 0.625 RAD 0.0078125 + txt022 +TEXDEF txt023 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.625 APEX 0 0.109531 0.625 RAD 0.0078125 + txt023 +TEXDEF txt024 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.640469 APEX 0 0 0.734531 RAD 0.0078125 + txt024 +TEXDEF txt025 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.75 RAD 0.03125 + txt025 +TEXDEF txt026 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.75 APEX 0.109531 0 0.75 RAD 0.0078125 + txt026 +TEXDEF txt027 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.75 APEX 0 0.109531 0.75 RAD 0.0078125 + txt027 +TEXDEF txt028 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.765469 APEX 0 0 0.859531 RAD 0.0078125 + txt028 +TEXDEF txt029 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 0.875 RAD 0.03125 + txt029 +TEXDEF txt030 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 0.875 APEX 0.109531 0 0.875 RAD 0.0078125 + txt030 +TEXDEF txt031 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 0.875 APEX 0 0.109531 0.875 RAD 0.0078125 + txt031 +TEXDEF txt032 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0 0.890469 APEX 0 0 0.984531 RAD 0.0078125 + txt032 +TEXDEF txt033 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0 1 RAD 0.03125 + txt033 +TEXDEF txt034 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0 1 APEX 0.109531 0 1 RAD 0.0078125 + txt034 +TEXDEF txt035 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.0154687 1 APEX 0 0.109531 1 RAD 0.0078125 + txt035 +TEXDEF txt036 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0 RAD 0.03125 + txt036 +TEXDEF txt037 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0 APEX 0.109531 0.125 0 RAD 0.0078125 + txt037 +TEXDEF txt038 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0 APEX 0 0.234531 0 RAD 0.0078125 + txt038 +TEXDEF txt039 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.0154687 APEX 0 0.125 0.109531 RAD 0.0078125 + txt039 +TEXDEF txt040 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.125 RAD 0.03125 + txt040 +TEXDEF txt041 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.125 APEX 0.109531 0.125 0.125 RAD 0.0078125 + txt041 +TEXDEF txt042 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.125 APEX 0 0.234531 0.125 RAD 0.0078125 + txt042 +TEXDEF txt043 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.140469 APEX 0 0.125 0.234531 RAD 0.0078125 + txt043 +TEXDEF txt044 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.25 RAD 0.03125 + txt044 +TEXDEF txt045 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.25 APEX 0.109531 0.125 0.25 RAD 0.0078125 + txt045 +TEXDEF txt046 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.25 APEX 0 0.234531 0.25 RAD 0.0078125 + txt046 +TEXDEF txt047 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.265469 APEX 0 0.125 0.359531 RAD 0.0078125 + txt047 +TEXDEF txt048 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.375 RAD 0.03125 + txt048 +TEXDEF txt049 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.375 APEX 0.109531 0.125 0.375 RAD 0.0078125 + txt049 +TEXDEF txt050 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.375 APEX 0 0.234531 0.375 RAD 0.0078125 + txt050 +TEXDEF txt051 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.390469 APEX 0 0.125 0.484531 RAD 0.0078125 + txt051 +TEXDEF txt052 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.5 RAD 0.03125 + txt052 +TEXDEF txt053 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.5 APEX 0.109531 0.125 0.5 RAD 0.0078125 + txt053 +TEXDEF txt054 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.5 APEX 0 0.234531 0.5 RAD 0.0078125 + txt054 +TEXDEF txt055 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.515469 APEX 0 0.125 0.609531 RAD 0.0078125 + txt055 +TEXDEF txt056 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.625 RAD 0.03125 + txt056 +TEXDEF txt057 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.625 APEX 0.109531 0.125 0.625 RAD 0.0078125 + txt057 +TEXDEF txt058 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.625 APEX 0 0.234531 0.625 RAD 0.0078125 + txt058 +TEXDEF txt059 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.640469 APEX 0 0.125 0.734531 RAD 0.0078125 + txt059 +TEXDEF txt060 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.75 RAD 0.03125 + txt060 +TEXDEF txt061 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.75 APEX 0.109531 0.125 0.75 RAD 0.0078125 + txt061 +TEXDEF txt062 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.75 APEX 0 0.234531 0.75 RAD 0.0078125 + txt062 +TEXDEF txt063 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.765469 APEX 0 0.125 0.859531 RAD 0.0078125 + txt063 +TEXDEF txt064 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 0.875 RAD 0.03125 + txt064 +TEXDEF txt065 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 0.875 APEX 0.109531 0.125 0.875 RAD 0.0078125 + txt065 +TEXDEF txt066 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 0.875 APEX 0 0.234531 0.875 RAD 0.0078125 + txt066 +TEXDEF txt067 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.125 0.890469 APEX 0 0.125 0.984531 RAD 0.0078125 + txt067 +TEXDEF txt068 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.125 1 RAD 0.03125 + txt068 +TEXDEF txt069 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.125 1 APEX 0.109531 0.125 1 RAD 0.0078125 + txt069 +TEXDEF txt070 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.140469 1 APEX 0 0.234531 1 RAD 0.0078125 + txt070 +TEXDEF txt071 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0 RAD 0.03125 + txt071 +TEXDEF txt072 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0 APEX 0.109531 0.25 0 RAD 0.0078125 + txt072 +TEXDEF txt073 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0 APEX 0 0.359531 0 RAD 0.0078125 + txt073 +TEXDEF txt074 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.0154687 APEX 0 0.25 0.109531 RAD 0.0078125 + txt074 +TEXDEF txt075 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.125 RAD 0.03125 + txt075 +TEXDEF txt076 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.125 APEX 0.109531 0.25 0.125 RAD 0.0078125 + txt076 +TEXDEF txt077 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.125 APEX 0 0.359531 0.125 RAD 0.0078125 + txt077 +TEXDEF txt078 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.140469 APEX 0 0.25 0.234531 RAD 0.0078125 + txt078 +TEXDEF txt079 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.25 RAD 0.03125 + txt079 +TEXDEF txt080 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.25 APEX 0.109531 0.25 0.25 RAD 0.0078125 + txt080 +TEXDEF txt081 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.25 APEX 0 0.359531 0.25 RAD 0.0078125 + txt081 +TEXDEF txt082 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.265469 APEX 0 0.25 0.359531 RAD 0.0078125 + txt082 +TEXDEF txt083 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.375 RAD 0.03125 + txt083 +TEXDEF txt084 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.375 APEX 0.109531 0.25 0.375 RAD 0.0078125 + txt084 +TEXDEF txt085 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.375 APEX 0 0.359531 0.375 RAD 0.0078125 + txt085 +TEXDEF txt086 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.390469 APEX 0 0.25 0.484531 RAD 0.0078125 + txt086 +TEXDEF txt087 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.5 RAD 0.03125 + txt087 +TEXDEF txt088 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.5 APEX 0.109531 0.25 0.5 RAD 0.0078125 + txt088 +TEXDEF txt089 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.5 APEX 0 0.359531 0.5 RAD 0.0078125 + txt089 +TEXDEF txt090 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.515469 APEX 0 0.25 0.609531 RAD 0.0078125 + txt090 +TEXDEF txt091 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.625 RAD 0.03125 + txt091 +TEXDEF txt092 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.625 APEX 0.109531 0.25 0.625 RAD 0.0078125 + txt092 +TEXDEF txt093 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.625 APEX 0 0.359531 0.625 RAD 0.0078125 + txt093 +TEXDEF txt094 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.640469 APEX 0 0.25 0.734531 RAD 0.0078125 + txt094 +TEXDEF txt095 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.75 RAD 0.03125 + txt095 +TEXDEF txt096 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.75 APEX 0.109531 0.25 0.75 RAD 0.0078125 + txt096 +TEXDEF txt097 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.75 APEX 0 0.359531 0.75 RAD 0.0078125 + txt097 +TEXDEF txt098 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.765469 APEX 0 0.25 0.859531 RAD 0.0078125 + txt098 +TEXDEF txt099 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 0.875 RAD 0.03125 + txt099 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 0.875 APEX 0.109531 0.25 0.875 RAD 0.0078125 + txt100 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 0.875 APEX 0 0.359531 0.875 RAD 0.0078125 + txt101 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.25 0.890469 APEX 0 0.25 0.984531 RAD 0.0078125 + txt102 +TEXDEF txt103 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.25 1 RAD 0.03125 + txt103 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.25 1 APEX 0.109531 0.25 1 RAD 0.0078125 + txt104 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.265469 1 APEX 0 0.359531 1 RAD 0.0078125 + txt105 +TEXDEF txt106 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0 RAD 0.03125 + txt106 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0 APEX 0.109531 0.375 0 RAD 0.0078125 + txt107 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0 APEX 0 0.484531 0 RAD 0.0078125 + txt108 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.0154687 APEX 0 0.375 0.109531 RAD 0.0078125 + txt109 +TEXDEF txt110 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.125 RAD 0.03125 + txt110 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.125 APEX 0.109531 0.375 0.125 RAD 0.0078125 + txt111 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.125 APEX 0 0.484531 0.125 RAD 0.0078125 + txt112 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.140469 APEX 0 0.375 0.234531 RAD 0.0078125 + txt113 +TEXDEF txt114 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.25 RAD 0.03125 + txt114 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.25 APEX 0.109531 0.375 0.25 RAD 0.0078125 + txt115 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.25 APEX 0 0.484531 0.25 RAD 0.0078125 + txt116 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.265469 APEX 0 0.375 0.359531 RAD 0.0078125 + txt117 +TEXDEF txt118 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.375 RAD 0.03125 + txt118 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.375 APEX 0.109531 0.375 0.375 RAD 0.0078125 + txt119 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.375 APEX 0 0.484531 0.375 RAD 0.0078125 + txt120 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.390469 APEX 0 0.375 0.484531 RAD 0.0078125 + txt121 +TEXDEF txt122 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.5 RAD 0.03125 + txt122 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.5 APEX 0.109531 0.375 0.5 RAD 0.0078125 + txt123 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.5 APEX 0 0.484531 0.5 RAD 0.0078125 + txt124 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.515469 APEX 0 0.375 0.609531 RAD 0.0078125 + txt125 +TEXDEF txt126 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.625 RAD 0.03125 + txt126 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.625 APEX 0.109531 0.375 0.625 RAD 0.0078125 + txt127 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.625 APEX 0 0.484531 0.625 RAD 0.0078125 + txt128 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.640469 APEX 0 0.375 0.734531 RAD 0.0078125 + txt129 +TEXDEF txt130 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.75 RAD 0.03125 + txt130 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.75 APEX 0.109531 0.375 0.75 RAD 0.0078125 + txt131 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.75 APEX 0 0.484531 0.75 RAD 0.0078125 + txt132 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.765469 APEX 0 0.375 0.859531 RAD 0.0078125 + txt133 +TEXDEF txt134 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 0.875 RAD 0.03125 + txt134 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 0.875 APEX 0.109531 0.375 0.875 RAD 0.0078125 + txt135 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 0.875 APEX 0 0.484531 0.875 RAD 0.0078125 + txt136 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.375 0.890469 APEX 0 0.375 0.984531 RAD 0.0078125 + txt137 +TEXDEF txt138 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.375 1 RAD 0.03125 + txt138 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.375 1 APEX 0.109531 0.375 1 RAD 0.0078125 + txt139 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.390469 1 APEX 0 0.484531 1 RAD 0.0078125 + txt140 +TEXDEF txt141 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0 RAD 0.03125 + txt141 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0 APEX 0.109531 0.5 0 RAD 0.0078125 + txt142 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0 APEX 0 0.609531 0 RAD 0.0078125 + txt143 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.0154687 APEX 0 0.5 0.109531 RAD 0.0078125 + txt144 +TEXDEF txt145 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.125 RAD 0.03125 + txt145 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.125 APEX 0.109531 0.5 0.125 RAD 0.0078125 + txt146 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.125 APEX 0 0.609531 0.125 RAD 0.0078125 + txt147 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.140469 APEX 0 0.5 0.234531 RAD 0.0078125 + txt148 +TEXDEF txt149 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.25 RAD 0.03125 + txt149 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.25 APEX 0.109531 0.5 0.25 RAD 0.0078125 + txt150 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.25 APEX 0 0.609531 0.25 RAD 0.0078125 + txt151 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.265469 APEX 0 0.5 0.359531 RAD 0.0078125 + txt152 +TEXDEF txt153 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.375 RAD 0.03125 + txt153 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.375 APEX 0.109531 0.5 0.375 RAD 0.0078125 + txt154 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.375 APEX 0 0.609531 0.375 RAD 0.0078125 + txt155 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.390469 APEX 0 0.5 0.484531 RAD 0.0078125 + txt156 +TEXDEF txt157 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.5 RAD 0.03125 + txt157 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.5 APEX 0.109531 0.5 0.5 RAD 0.0078125 + txt158 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.5 APEX 0 0.609531 0.5 RAD 0.0078125 + txt159 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.515469 APEX 0 0.5 0.609531 RAD 0.0078125 + txt160 +TEXDEF txt161 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.625 RAD 0.03125 + txt161 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.625 APEX 0.109531 0.5 0.625 RAD 0.0078125 + txt162 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.625 APEX 0 0.609531 0.625 RAD 0.0078125 + txt163 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.640469 APEX 0 0.5 0.734531 RAD 0.0078125 + txt164 +TEXDEF txt165 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.75 RAD 0.03125 + txt165 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.75 APEX 0.109531 0.5 0.75 RAD 0.0078125 + txt166 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.75 APEX 0 0.609531 0.75 RAD 0.0078125 + txt167 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.765469 APEX 0 0.5 0.859531 RAD 0.0078125 + txt168 +TEXDEF txt169 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 0.875 RAD 0.03125 + txt169 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 0.875 APEX 0.109531 0.5 0.875 RAD 0.0078125 + txt170 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 0.875 APEX 0 0.609531 0.875 RAD 0.0078125 + txt171 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.5 0.890469 APEX 0 0.5 0.984531 RAD 0.0078125 + txt172 +TEXDEF txt173 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.5 1 RAD 0.03125 + txt173 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.5 1 APEX 0.109531 0.5 1 RAD 0.0078125 + txt174 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.515469 1 APEX 0 0.609531 1 RAD 0.0078125 + txt175 +TEXDEF txt176 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0 RAD 0.03125 + txt176 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0 APEX 0.109531 0.625 0 RAD 0.0078125 + txt177 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0 APEX 0 0.734531 0 RAD 0.0078125 + txt178 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.0154687 APEX 0 0.625 0.109531 RAD 0.0078125 + txt179 +TEXDEF txt180 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.125 RAD 0.03125 + txt180 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.125 APEX 0.109531 0.625 0.125 RAD 0.0078125 + txt181 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.125 APEX 0 0.734531 0.125 RAD 0.0078125 + txt182 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.140469 APEX 0 0.625 0.234531 RAD 0.0078125 + txt183 +TEXDEF txt184 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.25 RAD 0.03125 + txt184 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.25 APEX 0.109531 0.625 0.25 RAD 0.0078125 + txt185 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.25 APEX 0 0.734531 0.25 RAD 0.0078125 + txt186 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.265469 APEX 0 0.625 0.359531 RAD 0.0078125 + txt187 +TEXDEF txt188 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.375 RAD 0.03125 + txt188 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.375 APEX 0.109531 0.625 0.375 RAD 0.0078125 + txt189 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.375 APEX 0 0.734531 0.375 RAD 0.0078125 + txt190 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.390469 APEX 0 0.625 0.484531 RAD 0.0078125 + txt191 +TEXDEF txt192 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.5 RAD 0.03125 + txt192 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.5 APEX 0.109531 0.625 0.5 RAD 0.0078125 + txt193 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.5 APEX 0 0.734531 0.5 RAD 0.0078125 + txt194 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.515469 APEX 0 0.625 0.609531 RAD 0.0078125 + txt195 +TEXDEF txt196 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.625 RAD 0.03125 + txt196 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.625 APEX 0.109531 0.625 0.625 RAD 0.0078125 + txt197 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.625 APEX 0 0.734531 0.625 RAD 0.0078125 + txt198 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.640469 APEX 0 0.625 0.734531 RAD 0.0078125 + txt199 +TEXDEF txt200 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.75 RAD 0.03125 + txt200 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.75 APEX 0.109531 0.625 0.75 RAD 0.0078125 + txt201 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.75 APEX 0 0.734531 0.75 RAD 0.0078125 + txt202 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.765469 APEX 0 0.625 0.859531 RAD 0.0078125 + txt203 +TEXDEF txt204 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 0.875 RAD 0.03125 + txt204 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 0.875 APEX 0.109531 0.625 0.875 RAD 0.0078125 + txt205 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 0.875 APEX 0 0.734531 0.875 RAD 0.0078125 + txt206 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.625 0.890469 APEX 0 0.625 0.984531 RAD 0.0078125 + txt207 +TEXDEF txt208 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.625 1 RAD 0.03125 + txt208 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.625 1 APEX 0.109531 0.625 1 RAD 0.0078125 + txt209 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.640469 1 APEX 0 0.734531 1 RAD 0.0078125 + txt210 +TEXDEF txt211 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0 RAD 0.03125 + txt211 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0 APEX 0.109531 0.75 0 RAD 0.0078125 + txt212 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0 APEX 0 0.859531 0 RAD 0.0078125 + txt213 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.0154687 APEX 0 0.75 0.109531 RAD 0.0078125 + txt214 +TEXDEF txt215 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.125 RAD 0.03125 + txt215 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.125 APEX 0.109531 0.75 0.125 RAD 0.0078125 + txt216 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.125 APEX 0 0.859531 0.125 RAD 0.0078125 + txt217 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.140469 APEX 0 0.75 0.234531 RAD 0.0078125 + txt218 +TEXDEF txt219 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.25 RAD 0.03125 + txt219 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.25 APEX 0.109531 0.75 0.25 RAD 0.0078125 + txt220 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.25 APEX 0 0.859531 0.25 RAD 0.0078125 + txt221 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.265469 APEX 0 0.75 0.359531 RAD 0.0078125 + txt222 +TEXDEF txt223 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.375 RAD 0.03125 + txt223 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.375 APEX 0.109531 0.75 0.375 RAD 0.0078125 + txt224 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.375 APEX 0 0.859531 0.375 RAD 0.0078125 + txt225 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.390469 APEX 0 0.75 0.484531 RAD 0.0078125 + txt226 +TEXDEF txt227 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.5 RAD 0.03125 + txt227 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.5 APEX 0.109531 0.75 0.5 RAD 0.0078125 + txt228 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.5 APEX 0 0.859531 0.5 RAD 0.0078125 + txt229 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.515469 APEX 0 0.75 0.609531 RAD 0.0078125 + txt230 +TEXDEF txt231 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.625 RAD 0.03125 + txt231 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.625 APEX 0.109531 0.75 0.625 RAD 0.0078125 + txt232 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.625 APEX 0 0.859531 0.625 RAD 0.0078125 + txt233 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.640469 APEX 0 0.75 0.734531 RAD 0.0078125 + txt234 +TEXDEF txt235 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.75 RAD 0.03125 + txt235 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.75 APEX 0.109531 0.75 0.75 RAD 0.0078125 + txt236 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.75 APEX 0 0.859531 0.75 RAD 0.0078125 + txt237 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.765469 APEX 0 0.75 0.859531 RAD 0.0078125 + txt238 +TEXDEF txt239 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 0.875 RAD 0.03125 + txt239 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 0.875 APEX 0.109531 0.75 0.875 RAD 0.0078125 + txt240 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 0.875 APEX 0 0.859531 0.875 RAD 0.0078125 + txt241 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.75 0.890469 APEX 0 0.75 0.984531 RAD 0.0078125 + txt242 +TEXDEF txt243 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.75 1 RAD 0.03125 + txt243 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.75 1 APEX 0.109531 0.75 1 RAD 0.0078125 + txt244 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.765469 1 APEX 0 0.859531 1 RAD 0.0078125 + txt245 +TEXDEF txt246 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0 RAD 0.03125 + txt246 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0 APEX 0.109531 0.875 0 RAD 0.0078125 + txt247 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0 APEX 0 0.984531 0 RAD 0.0078125 + txt248 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.0154687 APEX 0 0.875 0.109531 RAD 0.0078125 + txt249 +TEXDEF txt250 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.125 RAD 0.03125 + txt250 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.125 APEX 0.109531 0.875 0.125 RAD 0.0078125 + txt251 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.125 APEX 0 0.984531 0.125 RAD 0.0078125 + txt252 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.140469 APEX 0 0.875 0.234531 RAD 0.0078125 + txt253 +TEXDEF txt254 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.25 RAD 0.03125 + txt254 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.25 APEX 0.109531 0.875 0.25 RAD 0.0078125 + txt255 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.25 APEX 0 0.984531 0.25 RAD 0.0078125 + txt256 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.265469 APEX 0 0.875 0.359531 RAD 0.0078125 + txt257 +TEXDEF txt258 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.375 RAD 0.03125 + txt258 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.375 APEX 0.109531 0.875 0.375 RAD 0.0078125 + txt259 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.375 APEX 0 0.984531 0.375 RAD 0.0078125 + txt260 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.390469 APEX 0 0.875 0.484531 RAD 0.0078125 + txt261 +TEXDEF txt262 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.5 RAD 0.03125 + txt262 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.5 APEX 0.109531 0.875 0.5 RAD 0.0078125 + txt263 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.5 APEX 0 0.984531 0.5 RAD 0.0078125 + txt264 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.515469 APEX 0 0.875 0.609531 RAD 0.0078125 + txt265 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.625 RAD 0.03125 + txt266 +TEXDEF txt267 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.625 APEX 0.109531 0.875 0.625 RAD 0.0078125 + txt267 +TEXDEF txt268 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.625 APEX 0 0.984531 0.625 RAD 0.0078125 + txt268 +TEXDEF txt269 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.640469 APEX 0 0.875 0.734531 RAD 0.0078125 + txt269 +TEXDEF txt270 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.75 RAD 0.03125 + txt270 +TEXDEF txt271 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.75 APEX 0.109531 0.875 0.75 RAD 0.0078125 + txt271 +TEXDEF txt272 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.75 APEX 0 0.984531 0.75 RAD 0.0078125 + txt272 +TEXDEF txt273 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.765469 APEX 0 0.875 0.859531 RAD 0.0078125 + txt273 +TEXDEF txt274 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 0.875 RAD 0.03125 + txt274 +TEXDEF txt275 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 0.875 APEX 0.109531 0.875 0.875 RAD 0.0078125 + txt275 +TEXDEF txt276 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 0.875 APEX 0 0.984531 0.875 RAD 0.0078125 + txt276 +TEXDEF txt277 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.875 0.890469 APEX 0 0.875 0.984531 RAD 0.0078125 + txt277 +TEXDEF txt278 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 0.875 1 RAD 0.03125 + txt278 +TEXDEF txt279 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 0.875 1 APEX 0.109531 0.875 1 RAD 0.0078125 + txt279 +TEXDEF txt280 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0 0.890469 1 APEX 0 0.984531 1 RAD 0.0078125 + txt280 +TEXDEF txt281 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0 RAD 0.03125 + txt281 +TEXDEF txt282 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0 APEX 0.109531 1 0 RAD 0.0078125 + txt282 +TEXDEF txt283 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.0154687 APEX 0 1 0.109531 RAD 0.0078125 + txt283 +TEXDEF txt284 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.125 RAD 0.03125 + txt284 +TEXDEF txt285 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.125 APEX 0.109531 1 0.125 RAD 0.0078125 + txt285 +TEXDEF txt286 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.140469 APEX 0 1 0.234531 RAD 0.0078125 + txt286 +TEXDEF txt287 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.25 RAD 0.03125 + txt287 +TEXDEF txt288 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.25 APEX 0.109531 1 0.25 RAD 0.0078125 + txt288 +TEXDEF txt289 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.265469 APEX 0 1 0.359531 RAD 0.0078125 + txt289 +TEXDEF txt290 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.375 RAD 0.03125 + txt290 +TEXDEF txt291 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.375 APEX 0.109531 1 0.375 RAD 0.0078125 + txt291 +TEXDEF txt292 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.390469 APEX 0 1 0.484531 RAD 0.0078125 + txt292 +TEXDEF txt293 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.5 RAD 0.03125 + txt293 +TEXDEF txt294 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.5 APEX 0.109531 1 0.5 RAD 0.0078125 + txt294 +TEXDEF txt295 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.515469 APEX 0 1 0.609531 RAD 0.0078125 + txt295 +TEXDEF txt296 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.625 RAD 0.03125 + txt296 +TEXDEF txt297 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.625 APEX 0.109531 1 0.625 RAD 0.0078125 + txt297 +TEXDEF txt298 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.640469 APEX 0 1 0.734531 RAD 0.0078125 + txt298 +TEXDEF txt299 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.75 RAD 0.03125 + txt299 +TEXDEF txt300 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.75 APEX 0.109531 1 0.75 RAD 0.0078125 + txt300 +TEXDEF txt301 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.765469 APEX 0 1 0.859531 RAD 0.0078125 + txt301 +TEXDEF txt302 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 0.875 RAD 0.03125 + txt302 +TEXDEF txt303 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 0.875 APEX 0.109531 1 0.875 RAD 0.0078125 + txt303 +TEXDEF txt304 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0 1 0.890469 APEX 0 1 0.984531 RAD 0.0078125 + txt304 +TEXDEF txt305 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0 1 1 RAD 0.03125 + txt305 +TEXDEF txt306 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.0154687 1 1 APEX 0.109531 1 1 RAD 0.0078125 + txt306 +TEXDEF txt307 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0 RAD 0.03125 + txt307 +TEXDEF txt308 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0 APEX 0.234531 0 0 RAD 0.0078125 + txt308 +TEXDEF txt309 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0 APEX 0.125 0.109531 0 RAD 0.0078125 + txt309 +TEXDEF txt310 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.0154687 APEX 0.125 0 0.109531 RAD 0.0078125 + txt310 +TEXDEF txt311 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.125 RAD 0.03125 + txt311 +TEXDEF txt312 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.125 APEX 0.234531 0 0.125 RAD 0.0078125 + txt312 +TEXDEF txt313 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.125 APEX 0.125 0.109531 0.125 RAD 0.0078125 + txt313 +TEXDEF txt314 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.140469 APEX 0.125 0 0.234531 RAD 0.0078125 + txt314 +TEXDEF txt315 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.25 RAD 0.03125 + txt315 +TEXDEF txt316 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.25 APEX 0.234531 0 0.25 RAD 0.0078125 + txt316 +TEXDEF txt317 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.25 APEX 0.125 0.109531 0.25 RAD 0.0078125 + txt317 +TEXDEF txt318 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.265469 APEX 0.125 0 0.359531 RAD 0.0078125 + txt318 +TEXDEF txt319 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.375 RAD 0.03125 + txt319 +TEXDEF txt320 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.375 APEX 0.234531 0 0.375 RAD 0.0078125 + txt320 +TEXDEF txt321 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.375 APEX 0.125 0.109531 0.375 RAD 0.0078125 + txt321 +TEXDEF txt322 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.390469 APEX 0.125 0 0.484531 RAD 0.0078125 + txt322 +TEXDEF txt323 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.5 RAD 0.03125 + txt323 +TEXDEF txt324 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.5 APEX 0.234531 0 0.5 RAD 0.0078125 + txt324 +TEXDEF txt325 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.5 APEX 0.125 0.109531 0.5 RAD 0.0078125 + txt325 +TEXDEF txt326 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.515469 APEX 0.125 0 0.609531 RAD 0.0078125 + txt326 +TEXDEF txt327 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.625 RAD 0.03125 + txt327 +TEXDEF txt328 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.625 APEX 0.234531 0 0.625 RAD 0.0078125 + txt328 +TEXDEF txt329 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.625 APEX 0.125 0.109531 0.625 RAD 0.0078125 + txt329 +TEXDEF txt330 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.640469 APEX 0.125 0 0.734531 RAD 0.0078125 + txt330 +TEXDEF txt331 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.75 RAD 0.03125 + txt331 +TEXDEF txt332 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.75 APEX 0.234531 0 0.75 RAD 0.0078125 + txt332 +TEXDEF txt333 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.75 APEX 0.125 0.109531 0.75 RAD 0.0078125 + txt333 +TEXDEF txt334 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.765469 APEX 0.125 0 0.859531 RAD 0.0078125 + txt334 +TEXDEF txt335 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 0.875 RAD 0.03125 + txt335 +TEXDEF txt336 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 0.875 APEX 0.234531 0 0.875 RAD 0.0078125 + txt336 +TEXDEF txt337 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 0.875 APEX 0.125 0.109531 0.875 RAD 0.0078125 + txt337 +TEXDEF txt338 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0 0.890469 APEX 0.125 0 0.984531 RAD 0.0078125 + txt338 +TEXDEF txt339 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0 1 RAD 0.03125 + txt339 +TEXDEF txt340 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0 1 APEX 0.234531 0 1 RAD 0.0078125 + txt340 +TEXDEF txt341 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.0154687 1 APEX 0.125 0.109531 1 RAD 0.0078125 + txt341 +TEXDEF txt342 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0 RAD 0.03125 + txt342 +TEXDEF txt343 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0 APEX 0.234531 0.125 0 RAD 0.0078125 + txt343 +TEXDEF txt344 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0 APEX 0.125 0.234531 0 RAD 0.0078125 + txt344 +TEXDEF txt345 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.0154687 APEX 0.125 0.125 0.109531 RAD 0.0078125 + txt345 +TEXDEF txt346 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.125 RAD 0.03125 + txt346 +TEXDEF txt347 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.125 APEX 0.234531 0.125 0.125 RAD 0.0078125 + txt347 +TEXDEF txt348 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.125 APEX 0.125 0.234531 0.125 RAD 0.0078125 + txt348 +TEXDEF txt349 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.140469 APEX 0.125 0.125 0.234531 RAD 0.0078125 + txt349 +TEXDEF txt350 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.25 RAD 0.03125 + txt350 +TEXDEF txt351 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.25 APEX 0.234531 0.125 0.25 RAD 0.0078125 + txt351 +TEXDEF txt352 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.25 APEX 0.125 0.234531 0.25 RAD 0.0078125 + txt352 +TEXDEF txt353 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.265469 APEX 0.125 0.125 0.359531 RAD 0.0078125 + txt353 +TEXDEF txt354 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.375 RAD 0.03125 + txt354 +TEXDEF txt355 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.375 APEX 0.234531 0.125 0.375 RAD 0.0078125 + txt355 +TEXDEF txt356 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.375 APEX 0.125 0.234531 0.375 RAD 0.0078125 + txt356 +TEXDEF txt357 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.390469 APEX 0.125 0.125 0.484531 RAD 0.0078125 + txt357 +TEXDEF txt358 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.5 RAD 0.03125 + txt358 +TEXDEF txt359 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.5 APEX 0.234531 0.125 0.5 RAD 0.0078125 + txt359 +TEXDEF txt360 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.5 APEX 0.125 0.234531 0.5 RAD 0.0078125 + txt360 +TEXDEF txt361 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.515469 APEX 0.125 0.125 0.609531 RAD 0.0078125 + txt361 +TEXDEF txt362 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.625 RAD 0.03125 + txt362 +TEXDEF txt363 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.625 APEX 0.234531 0.125 0.625 RAD 0.0078125 + txt363 +TEXDEF txt364 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.625 APEX 0.125 0.234531 0.625 RAD 0.0078125 + txt364 +TEXDEF txt365 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.640469 APEX 0.125 0.125 0.734531 RAD 0.0078125 + txt365 +TEXDEF txt366 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.75 RAD 0.03125 + txt366 +TEXDEF txt367 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.75 APEX 0.234531 0.125 0.75 RAD 0.0078125 + txt367 +TEXDEF txt368 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.75 APEX 0.125 0.234531 0.75 RAD 0.0078125 + txt368 +TEXDEF txt369 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.765469 APEX 0.125 0.125 0.859531 RAD 0.0078125 + txt369 +TEXDEF txt370 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 0.875 RAD 0.03125 + txt370 +TEXDEF txt371 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 0.875 APEX 0.234531 0.125 0.875 RAD 0.0078125 + txt371 +TEXDEF txt372 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 0.875 APEX 0.125 0.234531 0.875 RAD 0.0078125 + txt372 +TEXDEF txt373 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.125 0.890469 APEX 0.125 0.125 0.984531 RAD 0.0078125 + txt373 +TEXDEF txt374 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.125 1 RAD 0.03125 + txt374 +TEXDEF txt375 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.125 1 APEX 0.234531 0.125 1 RAD 0.0078125 + txt375 +TEXDEF txt376 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.140469 1 APEX 0.125 0.234531 1 RAD 0.0078125 + txt376 +TEXDEF txt377 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0 RAD 0.03125 + txt377 +TEXDEF txt378 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0 APEX 0.234531 0.25 0 RAD 0.0078125 + txt378 +TEXDEF txt379 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0 APEX 0.125 0.359531 0 RAD 0.0078125 + txt379 +TEXDEF txt380 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.0154687 APEX 0.125 0.25 0.109531 RAD 0.0078125 + txt380 +TEXDEF txt381 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.125 RAD 0.03125 + txt381 +TEXDEF txt382 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.125 APEX 0.234531 0.25 0.125 RAD 0.0078125 + txt382 +TEXDEF txt383 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.125 APEX 0.125 0.359531 0.125 RAD 0.0078125 + txt383 +TEXDEF txt384 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.140469 APEX 0.125 0.25 0.234531 RAD 0.0078125 + txt384 +TEXDEF txt385 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.25 RAD 0.03125 + txt385 +TEXDEF txt386 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.25 APEX 0.234531 0.25 0.25 RAD 0.0078125 + txt386 +TEXDEF txt387 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.25 APEX 0.125 0.359531 0.25 RAD 0.0078125 + txt387 +TEXDEF txt388 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.265469 APEX 0.125 0.25 0.359531 RAD 0.0078125 + txt388 +TEXDEF txt389 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.375 RAD 0.03125 + txt389 +TEXDEF txt390 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.375 APEX 0.234531 0.25 0.375 RAD 0.0078125 + txt390 +TEXDEF txt391 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.375 APEX 0.125 0.359531 0.375 RAD 0.0078125 + txt391 +TEXDEF txt392 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.390469 APEX 0.125 0.25 0.484531 RAD 0.0078125 + txt392 +TEXDEF txt393 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.5 RAD 0.03125 + txt393 +TEXDEF txt394 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.5 APEX 0.234531 0.25 0.5 RAD 0.0078125 + txt394 +TEXDEF txt395 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.5 APEX 0.125 0.359531 0.5 RAD 0.0078125 + txt395 +TEXDEF txt396 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.515469 APEX 0.125 0.25 0.609531 RAD 0.0078125 + txt396 +TEXDEF txt397 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.625 RAD 0.03125 + txt397 +TEXDEF txt398 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.625 APEX 0.234531 0.25 0.625 RAD 0.0078125 + txt398 +TEXDEF txt399 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.625 APEX 0.125 0.359531 0.625 RAD 0.0078125 + txt399 +TEXDEF txt400 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.640469 APEX 0.125 0.25 0.734531 RAD 0.0078125 + txt400 +TEXDEF txt401 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.75 RAD 0.03125 + txt401 +TEXDEF txt402 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.75 APEX 0.234531 0.25 0.75 RAD 0.0078125 + txt402 +TEXDEF txt403 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.75 APEX 0.125 0.359531 0.75 RAD 0.0078125 + txt403 +TEXDEF txt404 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.765469 APEX 0.125 0.25 0.859531 RAD 0.0078125 + txt404 +TEXDEF txt405 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 0.875 RAD 0.03125 + txt405 +TEXDEF txt406 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 0.875 APEX 0.234531 0.25 0.875 RAD 0.0078125 + txt406 +TEXDEF txt407 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 0.875 APEX 0.125 0.359531 0.875 RAD 0.0078125 + txt407 +TEXDEF txt408 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.25 0.890469 APEX 0.125 0.25 0.984531 RAD 0.0078125 + txt408 +TEXDEF txt409 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.25 1 RAD 0.03125 + txt409 +TEXDEF txt410 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.25 1 APEX 0.234531 0.25 1 RAD 0.0078125 + txt410 +TEXDEF txt411 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.265469 1 APEX 0.125 0.359531 1 RAD 0.0078125 + txt411 +TEXDEF txt412 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0 RAD 0.03125 + txt412 +TEXDEF txt413 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0 APEX 0.234531 0.375 0 RAD 0.0078125 + txt413 +TEXDEF txt414 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0 APEX 0.125 0.484531 0 RAD 0.0078125 + txt414 +TEXDEF txt415 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.0154687 APEX 0.125 0.375 0.109531 RAD 0.0078125 + txt415 +TEXDEF txt416 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.125 RAD 0.03125 + txt416 +TEXDEF txt417 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.125 APEX 0.234531 0.375 0.125 RAD 0.0078125 + txt417 +TEXDEF txt418 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.125 APEX 0.125 0.484531 0.125 RAD 0.0078125 + txt418 +TEXDEF txt419 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.140469 APEX 0.125 0.375 0.234531 RAD 0.0078125 + txt419 +TEXDEF txt420 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.25 RAD 0.03125 + txt420 +TEXDEF txt421 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.25 APEX 0.234531 0.375 0.25 RAD 0.0078125 + txt421 +TEXDEF txt422 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.25 APEX 0.125 0.484531 0.25 RAD 0.0078125 + txt422 +TEXDEF txt423 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.265469 APEX 0.125 0.375 0.359531 RAD 0.0078125 + txt423 +TEXDEF txt424 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.375 RAD 0.03125 + txt424 +TEXDEF txt425 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.375 APEX 0.234531 0.375 0.375 RAD 0.0078125 + txt425 +TEXDEF txt426 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.375 APEX 0.125 0.484531 0.375 RAD 0.0078125 + txt426 +TEXDEF txt427 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.390469 APEX 0.125 0.375 0.484531 RAD 0.0078125 + txt427 +TEXDEF txt428 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.5 RAD 0.03125 + txt428 +TEXDEF txt429 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.5 APEX 0.234531 0.375 0.5 RAD 0.0078125 + txt429 +TEXDEF txt430 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.5 APEX 0.125 0.484531 0.5 RAD 0.0078125 + txt430 +TEXDEF txt431 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.515469 APEX 0.125 0.375 0.609531 RAD 0.0078125 + txt431 +TEXDEF txt432 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.625 RAD 0.03125 + txt432 +TEXDEF txt433 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.625 APEX 0.234531 0.375 0.625 RAD 0.0078125 + txt433 +TEXDEF txt434 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.625 APEX 0.125 0.484531 0.625 RAD 0.0078125 + txt434 +TEXDEF txt435 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.640469 APEX 0.125 0.375 0.734531 RAD 0.0078125 + txt435 +TEXDEF txt436 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.75 RAD 0.03125 + txt436 +TEXDEF txt437 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.75 APEX 0.234531 0.375 0.75 RAD 0.0078125 + txt437 +TEXDEF txt438 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.75 APEX 0.125 0.484531 0.75 RAD 0.0078125 + txt438 +TEXDEF txt439 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.765469 APEX 0.125 0.375 0.859531 RAD 0.0078125 + txt439 +TEXDEF txt440 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 0.875 RAD 0.03125 + txt440 +TEXDEF txt441 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 0.875 APEX 0.234531 0.375 0.875 RAD 0.0078125 + txt441 +TEXDEF txt442 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 0.875 APEX 0.125 0.484531 0.875 RAD 0.0078125 + txt442 +TEXDEF txt443 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.375 0.890469 APEX 0.125 0.375 0.984531 RAD 0.0078125 + txt443 +TEXDEF txt444 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.375 1 RAD 0.03125 + txt444 +TEXDEF txt445 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.375 1 APEX 0.234531 0.375 1 RAD 0.0078125 + txt445 +TEXDEF txt446 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.390469 1 APEX 0.125 0.484531 1 RAD 0.0078125 + txt446 +TEXDEF txt447 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0 RAD 0.03125 + txt447 +TEXDEF txt448 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0 APEX 0.234531 0.5 0 RAD 0.0078125 + txt448 +TEXDEF txt449 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0 APEX 0.125 0.609531 0 RAD 0.0078125 + txt449 +TEXDEF txt450 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.0154687 APEX 0.125 0.5 0.109531 RAD 0.0078125 + txt450 +TEXDEF txt451 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.125 RAD 0.03125 + txt451 +TEXDEF txt452 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.125 APEX 0.234531 0.5 0.125 RAD 0.0078125 + txt452 +TEXDEF txt453 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.125 APEX 0.125 0.609531 0.125 RAD 0.0078125 + txt453 +TEXDEF txt454 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.140469 APEX 0.125 0.5 0.234531 RAD 0.0078125 + txt454 +TEXDEF txt455 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.25 RAD 0.03125 + txt455 +TEXDEF txt456 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.25 APEX 0.234531 0.5 0.25 RAD 0.0078125 + txt456 +TEXDEF txt457 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.25 APEX 0.125 0.609531 0.25 RAD 0.0078125 + txt457 +TEXDEF txt458 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.265469 APEX 0.125 0.5 0.359531 RAD 0.0078125 + txt458 +TEXDEF txt459 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.375 RAD 0.03125 + txt459 +TEXDEF txt460 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.375 APEX 0.234531 0.5 0.375 RAD 0.0078125 + txt460 +TEXDEF txt461 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.375 APEX 0.125 0.609531 0.375 RAD 0.0078125 + txt461 +TEXDEF txt462 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.390469 APEX 0.125 0.5 0.484531 RAD 0.0078125 + txt462 +TEXDEF txt463 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.5 RAD 0.03125 + txt463 +TEXDEF txt464 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.5 APEX 0.234531 0.5 0.5 RAD 0.0078125 + txt464 +TEXDEF txt465 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.5 APEX 0.125 0.609531 0.5 RAD 0.0078125 + txt465 +TEXDEF txt466 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.515469 APEX 0.125 0.5 0.609531 RAD 0.0078125 + txt466 +TEXDEF txt467 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.625 RAD 0.03125 + txt467 +TEXDEF txt468 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.625 APEX 0.234531 0.5 0.625 RAD 0.0078125 + txt468 +TEXDEF txt469 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.625 APEX 0.125 0.609531 0.625 RAD 0.0078125 + txt469 +TEXDEF txt470 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.640469 APEX 0.125 0.5 0.734531 RAD 0.0078125 + txt470 +TEXDEF txt471 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.75 RAD 0.03125 + txt471 +TEXDEF txt472 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.75 APEX 0.234531 0.5 0.75 RAD 0.0078125 + txt472 +TEXDEF txt473 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.75 APEX 0.125 0.609531 0.75 RAD 0.0078125 + txt473 +TEXDEF txt474 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.765469 APEX 0.125 0.5 0.859531 RAD 0.0078125 + txt474 +TEXDEF txt475 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 0.875 RAD 0.03125 + txt475 +TEXDEF txt476 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 0.875 APEX 0.234531 0.5 0.875 RAD 0.0078125 + txt476 +TEXDEF txt477 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 0.875 APEX 0.125 0.609531 0.875 RAD 0.0078125 + txt477 +TEXDEF txt478 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.5 0.890469 APEX 0.125 0.5 0.984531 RAD 0.0078125 + txt478 +TEXDEF txt479 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.5 1 RAD 0.03125 + txt479 +TEXDEF txt480 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.5 1 APEX 0.234531 0.5 1 RAD 0.0078125 + txt480 +TEXDEF txt481 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.515469 1 APEX 0.125 0.609531 1 RAD 0.0078125 + txt481 +TEXDEF txt482 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0 RAD 0.03125 + txt482 +TEXDEF txt483 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0 APEX 0.234531 0.625 0 RAD 0.0078125 + txt483 +TEXDEF txt484 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0 APEX 0.125 0.734531 0 RAD 0.0078125 + txt484 +TEXDEF txt485 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.0154687 APEX 0.125 0.625 0.109531 RAD 0.0078125 + txt485 +TEXDEF txt486 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.125 RAD 0.03125 + txt486 +TEXDEF txt487 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.125 APEX 0.234531 0.625 0.125 RAD 0.0078125 + txt487 +TEXDEF txt488 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.125 APEX 0.125 0.734531 0.125 RAD 0.0078125 + txt488 +TEXDEF txt489 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.140469 APEX 0.125 0.625 0.234531 RAD 0.0078125 + txt489 +TEXDEF txt490 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.25 RAD 0.03125 + txt490 +TEXDEF txt491 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.25 APEX 0.234531 0.625 0.25 RAD 0.0078125 + txt491 +TEXDEF txt492 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.25 APEX 0.125 0.734531 0.25 RAD 0.0078125 + txt492 +TEXDEF txt493 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.265469 APEX 0.125 0.625 0.359531 RAD 0.0078125 + txt493 +TEXDEF txt494 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.375 RAD 0.03125 + txt494 +TEXDEF txt495 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.375 APEX 0.234531 0.625 0.375 RAD 0.0078125 + txt495 +TEXDEF txt496 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.375 APEX 0.125 0.734531 0.375 RAD 0.0078125 + txt496 +TEXDEF txt497 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.390469 APEX 0.125 0.625 0.484531 RAD 0.0078125 + txt497 +TEXDEF txt498 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.5 RAD 0.03125 + txt498 +TEXDEF txt499 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.5 APEX 0.234531 0.625 0.5 RAD 0.0078125 + txt499 +TEXDEF txt500 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.5 APEX 0.125 0.734531 0.5 RAD 0.0078125 + txt500 +TEXDEF txt501 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.515469 APEX 0.125 0.625 0.609531 RAD 0.0078125 + txt501 +TEXDEF txt502 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.625 RAD 0.03125 + txt502 +TEXDEF txt503 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.625 APEX 0.234531 0.625 0.625 RAD 0.0078125 + txt503 +TEXDEF txt504 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.625 APEX 0.125 0.734531 0.625 RAD 0.0078125 + txt504 +TEXDEF txt505 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.640469 APEX 0.125 0.625 0.734531 RAD 0.0078125 + txt505 +TEXDEF txt506 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.75 RAD 0.03125 + txt506 +TEXDEF txt507 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.75 APEX 0.234531 0.625 0.75 RAD 0.0078125 + txt507 +TEXDEF txt508 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.75 APEX 0.125 0.734531 0.75 RAD 0.0078125 + txt508 +TEXDEF txt509 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.765469 APEX 0.125 0.625 0.859531 RAD 0.0078125 + txt509 +TEXDEF txt510 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 0.875 RAD 0.03125 + txt510 +TEXDEF txt511 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 0.875 APEX 0.234531 0.625 0.875 RAD 0.0078125 + txt511 +TEXDEF txt512 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 0.875 APEX 0.125 0.734531 0.875 RAD 0.0078125 + txt512 +TEXDEF txt513 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.625 0.890469 APEX 0.125 0.625 0.984531 RAD 0.0078125 + txt513 +TEXDEF txt514 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.625 1 RAD 0.03125 + txt514 +TEXDEF txt515 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.625 1 APEX 0.234531 0.625 1 RAD 0.0078125 + txt515 +TEXDEF txt516 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.640469 1 APEX 0.125 0.734531 1 RAD 0.0078125 + txt516 +TEXDEF txt517 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0 RAD 0.03125 + txt517 +TEXDEF txt518 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0 APEX 0.234531 0.75 0 RAD 0.0078125 + txt518 +TEXDEF txt519 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0 APEX 0.125 0.859531 0 RAD 0.0078125 + txt519 +TEXDEF txt520 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.0154687 APEX 0.125 0.75 0.109531 RAD 0.0078125 + txt520 +TEXDEF txt521 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.125 RAD 0.03125 + txt521 +TEXDEF txt522 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.125 APEX 0.234531 0.75 0.125 RAD 0.0078125 + txt522 +TEXDEF txt523 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.125 APEX 0.125 0.859531 0.125 RAD 0.0078125 + txt523 +TEXDEF txt524 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.140469 APEX 0.125 0.75 0.234531 RAD 0.0078125 + txt524 +TEXDEF txt525 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.25 RAD 0.03125 + txt525 +TEXDEF txt526 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.25 APEX 0.234531 0.75 0.25 RAD 0.0078125 + txt526 +TEXDEF txt527 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.25 APEX 0.125 0.859531 0.25 RAD 0.0078125 + txt527 +TEXDEF txt528 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.265469 APEX 0.125 0.75 0.359531 RAD 0.0078125 + txt528 +TEXDEF txt529 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.375 RAD 0.03125 + txt529 +TEXDEF txt530 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.375 APEX 0.234531 0.75 0.375 RAD 0.0078125 + txt530 +TEXDEF txt531 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.375 APEX 0.125 0.859531 0.375 RAD 0.0078125 + txt531 +TEXDEF txt532 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.390469 APEX 0.125 0.75 0.484531 RAD 0.0078125 + txt532 +TEXDEF txt533 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.5 RAD 0.03125 + txt533 +TEXDEF txt534 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.5 APEX 0.234531 0.75 0.5 RAD 0.0078125 + txt534 +TEXDEF txt535 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.5 APEX 0.125 0.859531 0.5 RAD 0.0078125 + txt535 +TEXDEF txt536 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.515469 APEX 0.125 0.75 0.609531 RAD 0.0078125 + txt536 +TEXDEF txt537 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.625 RAD 0.03125 + txt537 +TEXDEF txt538 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.625 APEX 0.234531 0.75 0.625 RAD 0.0078125 + txt538 +TEXDEF txt539 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.625 APEX 0.125 0.859531 0.625 RAD 0.0078125 + txt539 +TEXDEF txt540 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.640469 APEX 0.125 0.75 0.734531 RAD 0.0078125 + txt540 +TEXDEF txt541 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.75 RAD 0.03125 + txt541 +TEXDEF txt542 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.75 APEX 0.234531 0.75 0.75 RAD 0.0078125 + txt542 +TEXDEF txt543 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.75 APEX 0.125 0.859531 0.75 RAD 0.0078125 + txt543 +TEXDEF txt544 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.765469 APEX 0.125 0.75 0.859531 RAD 0.0078125 + txt544 +TEXDEF txt545 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 0.875 RAD 0.03125 + txt545 +TEXDEF txt546 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 0.875 APEX 0.234531 0.75 0.875 RAD 0.0078125 + txt546 +TEXDEF txt547 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 0.875 APEX 0.125 0.859531 0.875 RAD 0.0078125 + txt547 +TEXDEF txt548 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.75 0.890469 APEX 0.125 0.75 0.984531 RAD 0.0078125 + txt548 +TEXDEF txt549 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.75 1 RAD 0.03125 + txt549 +TEXDEF txt550 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.75 1 APEX 0.234531 0.75 1 RAD 0.0078125 + txt550 +TEXDEF txt551 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.765469 1 APEX 0.125 0.859531 1 RAD 0.0078125 + txt551 +TEXDEF txt552 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0 RAD 0.03125 + txt552 +TEXDEF txt553 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0 APEX 0.234531 0.875 0 RAD 0.0078125 + txt553 +TEXDEF txt554 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0 APEX 0.125 0.984531 0 RAD 0.0078125 + txt554 +TEXDEF txt555 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.0154687 APEX 0.125 0.875 0.109531 RAD 0.0078125 + txt555 +TEXDEF txt556 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.125 RAD 0.03125 + txt556 +TEXDEF txt557 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.125 APEX 0.234531 0.875 0.125 RAD 0.0078125 + txt557 +TEXDEF txt558 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.125 APEX 0.125 0.984531 0.125 RAD 0.0078125 + txt558 +TEXDEF txt559 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.140469 APEX 0.125 0.875 0.234531 RAD 0.0078125 + txt559 +TEXDEF txt560 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.25 RAD 0.03125 + txt560 +TEXDEF txt561 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.25 APEX 0.234531 0.875 0.25 RAD 0.0078125 + txt561 +TEXDEF txt562 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.25 APEX 0.125 0.984531 0.25 RAD 0.0078125 + txt562 +TEXDEF txt563 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.265469 APEX 0.125 0.875 0.359531 RAD 0.0078125 + txt563 +TEXDEF txt564 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.375 RAD 0.03125 + txt564 +TEXDEF txt565 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.375 APEX 0.234531 0.875 0.375 RAD 0.0078125 + txt565 +TEXDEF txt566 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.375 APEX 0.125 0.984531 0.375 RAD 0.0078125 + txt566 +TEXDEF txt567 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.390469 APEX 0.125 0.875 0.484531 RAD 0.0078125 + txt567 +TEXDEF txt568 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.5 RAD 0.03125 + txt568 +TEXDEF txt569 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.5 APEX 0.234531 0.875 0.5 RAD 0.0078125 + txt569 +TEXDEF txt570 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.5 APEX 0.125 0.984531 0.5 RAD 0.0078125 + txt570 +TEXDEF txt571 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.515469 APEX 0.125 0.875 0.609531 RAD 0.0078125 + txt571 +TEXDEF txt572 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.625 RAD 0.03125 + txt572 +TEXDEF txt573 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.625 APEX 0.234531 0.875 0.625 RAD 0.0078125 + txt573 +TEXDEF txt574 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.625 APEX 0.125 0.984531 0.625 RAD 0.0078125 + txt574 +TEXDEF txt575 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.640469 APEX 0.125 0.875 0.734531 RAD 0.0078125 + txt575 +TEXDEF txt576 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.75 RAD 0.03125 + txt576 +TEXDEF txt577 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.75 APEX 0.234531 0.875 0.75 RAD 0.0078125 + txt577 +TEXDEF txt578 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.75 APEX 0.125 0.984531 0.75 RAD 0.0078125 + txt578 +TEXDEF txt579 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.765469 APEX 0.125 0.875 0.859531 RAD 0.0078125 + txt579 +TEXDEF txt580 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 0.875 RAD 0.03125 + txt580 +TEXDEF txt581 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 0.875 APEX 0.234531 0.875 0.875 RAD 0.0078125 + txt581 +TEXDEF txt582 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 0.875 APEX 0.125 0.984531 0.875 RAD 0.0078125 + txt582 +TEXDEF txt583 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.875 0.890469 APEX 0.125 0.875 0.984531 RAD 0.0078125 + txt583 +TEXDEF txt584 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 0.875 1 RAD 0.03125 + txt584 +TEXDEF txt585 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 0.875 1 APEX 0.234531 0.875 1 RAD 0.0078125 + txt585 +TEXDEF txt586 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 0.890469 1 APEX 0.125 0.984531 1 RAD 0.0078125 + txt586 +TEXDEF txt587 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0 RAD 0.03125 + txt587 +TEXDEF txt588 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0 APEX 0.234531 1 0 RAD 0.0078125 + txt588 +TEXDEF txt589 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.0154687 APEX 0.125 1 0.109531 RAD 0.0078125 + txt589 +TEXDEF txt590 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.125 RAD 0.03125 + txt590 +TEXDEF txt591 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.125 APEX 0.234531 1 0.125 RAD 0.0078125 + txt591 +TEXDEF txt592 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.140469 APEX 0.125 1 0.234531 RAD 0.0078125 + txt592 +TEXDEF txt593 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.25 RAD 0.03125 + txt593 +TEXDEF txt594 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.25 APEX 0.234531 1 0.25 RAD 0.0078125 + txt594 +TEXDEF txt595 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.265469 APEX 0.125 1 0.359531 RAD 0.0078125 + txt595 +TEXDEF txt596 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.375 RAD 0.03125 + txt596 +TEXDEF txt597 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.375 APEX 0.234531 1 0.375 RAD 0.0078125 + txt597 +TEXDEF txt598 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.390469 APEX 0.125 1 0.484531 RAD 0.0078125 + txt598 +TEXDEF txt599 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.5 RAD 0.03125 + txt599 +TEXDEF txt600 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.5 APEX 0.234531 1 0.5 RAD 0.0078125 + txt600 +TEXDEF txt601 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.515469 APEX 0.125 1 0.609531 RAD 0.0078125 + txt601 +TEXDEF txt602 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.625 RAD 0.03125 + txt602 +TEXDEF txt603 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.625 APEX 0.234531 1 0.625 RAD 0.0078125 + txt603 +TEXDEF txt604 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.640469 APEX 0.125 1 0.734531 RAD 0.0078125 + txt604 +TEXDEF txt605 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.75 RAD 0.03125 + txt605 +TEXDEF txt606 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.75 APEX 0.234531 1 0.75 RAD 0.0078125 + txt606 +TEXDEF txt607 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.765469 APEX 0.125 1 0.859531 RAD 0.0078125 + txt607 +TEXDEF txt608 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 0.875 RAD 0.03125 + txt608 +TEXDEF txt609 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 0.875 APEX 0.234531 1 0.875 RAD 0.0078125 + txt609 +TEXDEF txt610 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.125 1 0.890469 APEX 0.125 1 0.984531 RAD 0.0078125 + txt610 +TEXDEF txt611 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.125 1 1 RAD 0.03125 + txt611 +TEXDEF txt612 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.140469 1 1 APEX 0.234531 1 1 RAD 0.0078125 + txt612 +TEXDEF txt613 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0 RAD 0.03125 + txt613 +TEXDEF txt614 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0 APEX 0.359531 0 0 RAD 0.0078125 + txt614 +TEXDEF txt615 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0 APEX 0.25 0.109531 0 RAD 0.0078125 + txt615 +TEXDEF txt616 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.0154687 APEX 0.25 0 0.109531 RAD 0.0078125 + txt616 +TEXDEF txt617 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.125 RAD 0.03125 + txt617 +TEXDEF txt618 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.125 APEX 0.359531 0 0.125 RAD 0.0078125 + txt618 +TEXDEF txt619 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.125 APEX 0.25 0.109531 0.125 RAD 0.0078125 + txt619 +TEXDEF txt620 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.140469 APEX 0.25 0 0.234531 RAD 0.0078125 + txt620 +TEXDEF txt621 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.25 RAD 0.03125 + txt621 +TEXDEF txt622 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.25 APEX 0.359531 0 0.25 RAD 0.0078125 + txt622 +TEXDEF txt623 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.25 APEX 0.25 0.109531 0.25 RAD 0.0078125 + txt623 +TEXDEF txt624 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.265469 APEX 0.25 0 0.359531 RAD 0.0078125 + txt624 +TEXDEF txt625 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.375 RAD 0.03125 + txt625 +TEXDEF txt626 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.375 APEX 0.359531 0 0.375 RAD 0.0078125 + txt626 +TEXDEF txt627 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.375 APEX 0.25 0.109531 0.375 RAD 0.0078125 + txt627 +TEXDEF txt628 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.390469 APEX 0.25 0 0.484531 RAD 0.0078125 + txt628 +TEXDEF txt629 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.5 RAD 0.03125 + txt629 +TEXDEF txt630 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.5 APEX 0.359531 0 0.5 RAD 0.0078125 + txt630 +TEXDEF txt631 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.5 APEX 0.25 0.109531 0.5 RAD 0.0078125 + txt631 +TEXDEF txt632 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.515469 APEX 0.25 0 0.609531 RAD 0.0078125 + txt632 +TEXDEF txt633 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.625 RAD 0.03125 + txt633 +TEXDEF txt634 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.625 APEX 0.359531 0 0.625 RAD 0.0078125 + txt634 +TEXDEF txt635 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.625 APEX 0.25 0.109531 0.625 RAD 0.0078125 + txt635 +TEXDEF txt636 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.640469 APEX 0.25 0 0.734531 RAD 0.0078125 + txt636 +TEXDEF txt637 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.75 RAD 0.03125 + txt637 +TEXDEF txt638 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.75 APEX 0.359531 0 0.75 RAD 0.0078125 + txt638 +TEXDEF txt639 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.75 APEX 0.25 0.109531 0.75 RAD 0.0078125 + txt639 +TEXDEF txt640 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.765469 APEX 0.25 0 0.859531 RAD 0.0078125 + txt640 +TEXDEF txt641 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 0.875 RAD 0.03125 + txt641 +TEXDEF txt642 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 0.875 APEX 0.359531 0 0.875 RAD 0.0078125 + txt642 +TEXDEF txt643 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 0.875 APEX 0.25 0.109531 0.875 RAD 0.0078125 + txt643 +TEXDEF txt644 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0 0.890469 APEX 0.25 0 0.984531 RAD 0.0078125 + txt644 +TEXDEF txt645 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0 1 RAD 0.03125 + txt645 +TEXDEF txt646 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0 1 APEX 0.359531 0 1 RAD 0.0078125 + txt646 +TEXDEF txt647 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.0154687 1 APEX 0.25 0.109531 1 RAD 0.0078125 + txt647 +TEXDEF txt648 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0 RAD 0.03125 + txt648 +TEXDEF txt649 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0 APEX 0.359531 0.125 0 RAD 0.0078125 + txt649 +TEXDEF txt650 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0 APEX 0.25 0.234531 0 RAD 0.0078125 + txt650 +TEXDEF txt651 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.0154687 APEX 0.25 0.125 0.109531 RAD 0.0078125 + txt651 +TEXDEF txt652 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.125 RAD 0.03125 + txt652 +TEXDEF txt653 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.125 APEX 0.359531 0.125 0.125 RAD 0.0078125 + txt653 +TEXDEF txt654 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.125 APEX 0.25 0.234531 0.125 RAD 0.0078125 + txt654 +TEXDEF txt655 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.140469 APEX 0.25 0.125 0.234531 RAD 0.0078125 + txt655 +TEXDEF txt656 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.25 RAD 0.03125 + txt656 +TEXDEF txt657 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.25 APEX 0.359531 0.125 0.25 RAD 0.0078125 + txt657 +TEXDEF txt658 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.25 APEX 0.25 0.234531 0.25 RAD 0.0078125 + txt658 +TEXDEF txt659 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.265469 APEX 0.25 0.125 0.359531 RAD 0.0078125 + txt659 +TEXDEF txt660 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.375 RAD 0.03125 + txt660 +TEXDEF txt661 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.375 APEX 0.359531 0.125 0.375 RAD 0.0078125 + txt661 +TEXDEF txt662 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.375 APEX 0.25 0.234531 0.375 RAD 0.0078125 + txt662 +TEXDEF txt663 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.390469 APEX 0.25 0.125 0.484531 RAD 0.0078125 + txt663 +TEXDEF txt664 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.5 RAD 0.03125 + txt664 +TEXDEF txt665 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.5 APEX 0.359531 0.125 0.5 RAD 0.0078125 + txt665 +TEXDEF txt666 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.5 APEX 0.25 0.234531 0.5 RAD 0.0078125 + txt666 +TEXDEF txt667 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.515469 APEX 0.25 0.125 0.609531 RAD 0.0078125 + txt667 +TEXDEF txt668 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.625 RAD 0.03125 + txt668 +TEXDEF txt669 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.625 APEX 0.359531 0.125 0.625 RAD 0.0078125 + txt669 +TEXDEF txt670 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.625 APEX 0.25 0.234531 0.625 RAD 0.0078125 + txt670 +TEXDEF txt671 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.640469 APEX 0.25 0.125 0.734531 RAD 0.0078125 + txt671 +TEXDEF txt672 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.75 RAD 0.03125 + txt672 +TEXDEF txt673 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.75 APEX 0.359531 0.125 0.75 RAD 0.0078125 + txt673 +TEXDEF txt674 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.75 APEX 0.25 0.234531 0.75 RAD 0.0078125 + txt674 +TEXDEF txt675 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.765469 APEX 0.25 0.125 0.859531 RAD 0.0078125 + txt675 +TEXDEF txt676 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 0.875 RAD 0.03125 + txt676 +TEXDEF txt677 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 0.875 APEX 0.359531 0.125 0.875 RAD 0.0078125 + txt677 +TEXDEF txt678 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 0.875 APEX 0.25 0.234531 0.875 RAD 0.0078125 + txt678 +TEXDEF txt679 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.125 0.890469 APEX 0.25 0.125 0.984531 RAD 0.0078125 + txt679 +TEXDEF txt680 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.125 1 RAD 0.03125 + txt680 +TEXDEF txt681 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.125 1 APEX 0.359531 0.125 1 RAD 0.0078125 + txt681 +TEXDEF txt682 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.140469 1 APEX 0.25 0.234531 1 RAD 0.0078125 + txt682 +TEXDEF txt683 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0 RAD 0.03125 + txt683 +TEXDEF txt684 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0 APEX 0.359531 0.25 0 RAD 0.0078125 + txt684 +TEXDEF txt685 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0 APEX 0.25 0.359531 0 RAD 0.0078125 + txt685 +TEXDEF txt686 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.0154687 APEX 0.25 0.25 0.109531 RAD 0.0078125 + txt686 +TEXDEF txt687 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.125 RAD 0.03125 + txt687 +TEXDEF txt688 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.125 APEX 0.359531 0.25 0.125 RAD 0.0078125 + txt688 +TEXDEF txt689 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.125 APEX 0.25 0.359531 0.125 RAD 0.0078125 + txt689 +TEXDEF txt690 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.140469 APEX 0.25 0.25 0.234531 RAD 0.0078125 + txt690 +TEXDEF txt691 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.25 RAD 0.03125 + txt691 +TEXDEF txt692 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.25 APEX 0.359531 0.25 0.25 RAD 0.0078125 + txt692 +TEXDEF txt693 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.25 APEX 0.25 0.359531 0.25 RAD 0.0078125 + txt693 +TEXDEF txt694 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.265469 APEX 0.25 0.25 0.359531 RAD 0.0078125 + txt694 +TEXDEF txt695 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.375 RAD 0.03125 + txt695 +TEXDEF txt696 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.375 APEX 0.359531 0.25 0.375 RAD 0.0078125 + txt696 +TEXDEF txt697 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.375 APEX 0.25 0.359531 0.375 RAD 0.0078125 + txt697 +TEXDEF txt698 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.390469 APEX 0.25 0.25 0.484531 RAD 0.0078125 + txt698 +TEXDEF txt699 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.5 RAD 0.03125 + txt699 +TEXDEF txt700 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.5 APEX 0.359531 0.25 0.5 RAD 0.0078125 + txt700 +TEXDEF txt701 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.5 APEX 0.25 0.359531 0.5 RAD 0.0078125 + txt701 +TEXDEF txt702 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.515469 APEX 0.25 0.25 0.609531 RAD 0.0078125 + txt702 +TEXDEF txt703 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.625 RAD 0.03125 + txt703 +TEXDEF txt704 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.625 APEX 0.359531 0.25 0.625 RAD 0.0078125 + txt704 +TEXDEF txt705 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.625 APEX 0.25 0.359531 0.625 RAD 0.0078125 + txt705 +TEXDEF txt706 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.640469 APEX 0.25 0.25 0.734531 RAD 0.0078125 + txt706 +TEXDEF txt707 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.75 RAD 0.03125 + txt707 +TEXDEF txt708 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.75 APEX 0.359531 0.25 0.75 RAD 0.0078125 + txt708 +TEXDEF txt709 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.75 APEX 0.25 0.359531 0.75 RAD 0.0078125 + txt709 +TEXDEF txt710 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.765469 APEX 0.25 0.25 0.859531 RAD 0.0078125 + txt710 +TEXDEF txt711 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 0.875 RAD 0.03125 + txt711 +TEXDEF txt712 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 0.875 APEX 0.359531 0.25 0.875 RAD 0.0078125 + txt712 +TEXDEF txt713 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 0.875 APEX 0.25 0.359531 0.875 RAD 0.0078125 + txt713 +TEXDEF txt714 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.25 0.890469 APEX 0.25 0.25 0.984531 RAD 0.0078125 + txt714 +TEXDEF txt715 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.25 1 RAD 0.03125 + txt715 +TEXDEF txt716 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.25 1 APEX 0.359531 0.25 1 RAD 0.0078125 + txt716 +TEXDEF txt717 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.265469 1 APEX 0.25 0.359531 1 RAD 0.0078125 + txt717 +TEXDEF txt718 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0 RAD 0.03125 + txt718 +TEXDEF txt719 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0 APEX 0.359531 0.375 0 RAD 0.0078125 + txt719 +TEXDEF txt720 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0 APEX 0.25 0.484531 0 RAD 0.0078125 + txt720 +TEXDEF txt721 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.0154687 APEX 0.25 0.375 0.109531 RAD 0.0078125 + txt721 +TEXDEF txt722 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.125 RAD 0.03125 + txt722 +TEXDEF txt723 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.125 APEX 0.359531 0.375 0.125 RAD 0.0078125 + txt723 +TEXDEF txt724 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.125 APEX 0.25 0.484531 0.125 RAD 0.0078125 + txt724 +TEXDEF txt725 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.140469 APEX 0.25 0.375 0.234531 RAD 0.0078125 + txt725 +TEXDEF txt726 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.25 RAD 0.03125 + txt726 +TEXDEF txt727 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.25 APEX 0.359531 0.375 0.25 RAD 0.0078125 + txt727 +TEXDEF txt728 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.25 APEX 0.25 0.484531 0.25 RAD 0.0078125 + txt728 +TEXDEF txt729 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.265469 APEX 0.25 0.375 0.359531 RAD 0.0078125 + txt729 +TEXDEF txt730 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.375 RAD 0.03125 + txt730 +TEXDEF txt731 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.375 APEX 0.359531 0.375 0.375 RAD 0.0078125 + txt731 +TEXDEF txt732 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.375 APEX 0.25 0.484531 0.375 RAD 0.0078125 + txt732 +TEXDEF txt733 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.390469 APEX 0.25 0.375 0.484531 RAD 0.0078125 + txt733 +TEXDEF txt734 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.5 RAD 0.03125 + txt734 +TEXDEF txt735 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.5 APEX 0.359531 0.375 0.5 RAD 0.0078125 + txt735 +TEXDEF txt736 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.5 APEX 0.25 0.484531 0.5 RAD 0.0078125 + txt736 +TEXDEF txt737 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.515469 APEX 0.25 0.375 0.609531 RAD 0.0078125 + txt737 +TEXDEF txt738 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.625 RAD 0.03125 + txt738 +TEXDEF txt739 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.625 APEX 0.359531 0.375 0.625 RAD 0.0078125 + txt739 +TEXDEF txt740 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.625 APEX 0.25 0.484531 0.625 RAD 0.0078125 + txt740 +TEXDEF txt741 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.640469 APEX 0.25 0.375 0.734531 RAD 0.0078125 + txt741 +TEXDEF txt742 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.75 RAD 0.03125 + txt742 +TEXDEF txt743 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.75 APEX 0.359531 0.375 0.75 RAD 0.0078125 + txt743 +TEXDEF txt744 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.75 APEX 0.25 0.484531 0.75 RAD 0.0078125 + txt744 +TEXDEF txt745 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.765469 APEX 0.25 0.375 0.859531 RAD 0.0078125 + txt745 +TEXDEF txt746 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 0.875 RAD 0.03125 + txt746 +TEXDEF txt747 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 0.875 APEX 0.359531 0.375 0.875 RAD 0.0078125 + txt747 +TEXDEF txt748 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 0.875 APEX 0.25 0.484531 0.875 RAD 0.0078125 + txt748 +TEXDEF txt749 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.375 0.890469 APEX 0.25 0.375 0.984531 RAD 0.0078125 + txt749 +TEXDEF txt750 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.375 1 RAD 0.03125 + txt750 +TEXDEF txt751 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.375 1 APEX 0.359531 0.375 1 RAD 0.0078125 + txt751 +TEXDEF txt752 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.390469 1 APEX 0.25 0.484531 1 RAD 0.0078125 + txt752 +TEXDEF txt753 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0 RAD 0.03125 + txt753 +TEXDEF txt754 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0 APEX 0.359531 0.5 0 RAD 0.0078125 + txt754 +TEXDEF txt755 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0 APEX 0.25 0.609531 0 RAD 0.0078125 + txt755 +TEXDEF txt756 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.0154687 APEX 0.25 0.5 0.109531 RAD 0.0078125 + txt756 +TEXDEF txt757 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.125 RAD 0.03125 + txt757 +TEXDEF txt758 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.125 APEX 0.359531 0.5 0.125 RAD 0.0078125 + txt758 +TEXDEF txt759 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.125 APEX 0.25 0.609531 0.125 RAD 0.0078125 + txt759 +TEXDEF txt760 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.140469 APEX 0.25 0.5 0.234531 RAD 0.0078125 + txt760 +TEXDEF txt761 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.25 RAD 0.03125 + txt761 +TEXDEF txt762 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.25 APEX 0.359531 0.5 0.25 RAD 0.0078125 + txt762 +TEXDEF txt763 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.25 APEX 0.25 0.609531 0.25 RAD 0.0078125 + txt763 +TEXDEF txt764 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.265469 APEX 0.25 0.5 0.359531 RAD 0.0078125 + txt764 +TEXDEF txt765 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.375 RAD 0.03125 + txt765 +TEXDEF txt766 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.375 APEX 0.359531 0.5 0.375 RAD 0.0078125 + txt766 +TEXDEF txt767 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.375 APEX 0.25 0.609531 0.375 RAD 0.0078125 + txt767 +TEXDEF txt768 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.390469 APEX 0.25 0.5 0.484531 RAD 0.0078125 + txt768 +TEXDEF txt769 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.5 RAD 0.03125 + txt769 +TEXDEF txt770 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.5 APEX 0.359531 0.5 0.5 RAD 0.0078125 + txt770 +TEXDEF txt771 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.5 APEX 0.25 0.609531 0.5 RAD 0.0078125 + txt771 +TEXDEF txt772 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.515469 APEX 0.25 0.5 0.609531 RAD 0.0078125 + txt772 +TEXDEF txt773 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.625 RAD 0.03125 + txt773 +TEXDEF txt774 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.625 APEX 0.359531 0.5 0.625 RAD 0.0078125 + txt774 +TEXDEF txt775 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.625 APEX 0.25 0.609531 0.625 RAD 0.0078125 + txt775 +TEXDEF txt776 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.640469 APEX 0.25 0.5 0.734531 RAD 0.0078125 + txt776 +TEXDEF txt777 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.75 RAD 0.03125 + txt777 +TEXDEF txt778 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.75 APEX 0.359531 0.5 0.75 RAD 0.0078125 + txt778 +TEXDEF txt779 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.75 APEX 0.25 0.609531 0.75 RAD 0.0078125 + txt779 +TEXDEF txt780 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.765469 APEX 0.25 0.5 0.859531 RAD 0.0078125 + txt780 +TEXDEF txt781 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 0.875 RAD 0.03125 + txt781 +TEXDEF txt782 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 0.875 APEX 0.359531 0.5 0.875 RAD 0.0078125 + txt782 +TEXDEF txt783 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 0.875 APEX 0.25 0.609531 0.875 RAD 0.0078125 + txt783 +TEXDEF txt784 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.5 0.890469 APEX 0.25 0.5 0.984531 RAD 0.0078125 + txt784 +TEXDEF txt785 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.5 1 RAD 0.03125 + txt785 +TEXDEF txt786 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.5 1 APEX 0.359531 0.5 1 RAD 0.0078125 + txt786 +TEXDEF txt787 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.515469 1 APEX 0.25 0.609531 1 RAD 0.0078125 + txt787 +TEXDEF txt788 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0 RAD 0.03125 + txt788 +TEXDEF txt789 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0 APEX 0.359531 0.625 0 RAD 0.0078125 + txt789 +TEXDEF txt790 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0 APEX 0.25 0.734531 0 RAD 0.0078125 + txt790 +TEXDEF txt791 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.0154687 APEX 0.25 0.625 0.109531 RAD 0.0078125 + txt791 +TEXDEF txt792 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.125 RAD 0.03125 + txt792 +TEXDEF txt793 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.125 APEX 0.359531 0.625 0.125 RAD 0.0078125 + txt793 +TEXDEF txt794 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.125 APEX 0.25 0.734531 0.125 RAD 0.0078125 + txt794 +TEXDEF txt795 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.140469 APEX 0.25 0.625 0.234531 RAD 0.0078125 + txt795 +TEXDEF txt796 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.25 RAD 0.03125 + txt796 +TEXDEF txt797 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.25 APEX 0.359531 0.625 0.25 RAD 0.0078125 + txt797 +TEXDEF txt798 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.25 APEX 0.25 0.734531 0.25 RAD 0.0078125 + txt798 +TEXDEF txt799 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.265469 APEX 0.25 0.625 0.359531 RAD 0.0078125 + txt799 +TEXDEF txt800 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.375 RAD 0.03125 + txt800 +TEXDEF txt801 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.375 APEX 0.359531 0.625 0.375 RAD 0.0078125 + txt801 +TEXDEF txt802 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.375 APEX 0.25 0.734531 0.375 RAD 0.0078125 + txt802 +TEXDEF txt803 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.390469 APEX 0.25 0.625 0.484531 RAD 0.0078125 + txt803 +TEXDEF txt804 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.5 RAD 0.03125 + txt804 +TEXDEF txt805 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.5 APEX 0.359531 0.625 0.5 RAD 0.0078125 + txt805 +TEXDEF txt806 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.5 APEX 0.25 0.734531 0.5 RAD 0.0078125 + txt806 +TEXDEF txt807 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.515469 APEX 0.25 0.625 0.609531 RAD 0.0078125 + txt807 +TEXDEF txt808 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.625 RAD 0.03125 + txt808 +TEXDEF txt809 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.625 APEX 0.359531 0.625 0.625 RAD 0.0078125 + txt809 +TEXDEF txt810 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.625 APEX 0.25 0.734531 0.625 RAD 0.0078125 + txt810 +TEXDEF txt811 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.640469 APEX 0.25 0.625 0.734531 RAD 0.0078125 + txt811 +TEXDEF txt812 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.75 RAD 0.03125 + txt812 +TEXDEF txt813 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.75 APEX 0.359531 0.625 0.75 RAD 0.0078125 + txt813 +TEXDEF txt814 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.75 APEX 0.25 0.734531 0.75 RAD 0.0078125 + txt814 +TEXDEF txt815 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.765469 APEX 0.25 0.625 0.859531 RAD 0.0078125 + txt815 +TEXDEF txt816 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 0.875 RAD 0.03125 + txt816 +TEXDEF txt817 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 0.875 APEX 0.359531 0.625 0.875 RAD 0.0078125 + txt817 +TEXDEF txt818 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 0.875 APEX 0.25 0.734531 0.875 RAD 0.0078125 + txt818 +TEXDEF txt819 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.625 0.890469 APEX 0.25 0.625 0.984531 RAD 0.0078125 + txt819 +TEXDEF txt820 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.625 1 RAD 0.03125 + txt820 +TEXDEF txt821 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.625 1 APEX 0.359531 0.625 1 RAD 0.0078125 + txt821 +TEXDEF txt822 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.640469 1 APEX 0.25 0.734531 1 RAD 0.0078125 + txt822 +TEXDEF txt823 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0 RAD 0.03125 + txt823 +TEXDEF txt824 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0 APEX 0.359531 0.75 0 RAD 0.0078125 + txt824 +TEXDEF txt825 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0 APEX 0.25 0.859531 0 RAD 0.0078125 + txt825 +TEXDEF txt826 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.0154687 APEX 0.25 0.75 0.109531 RAD 0.0078125 + txt826 +TEXDEF txt827 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.125 RAD 0.03125 + txt827 +TEXDEF txt828 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.125 APEX 0.359531 0.75 0.125 RAD 0.0078125 + txt828 +TEXDEF txt829 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.125 APEX 0.25 0.859531 0.125 RAD 0.0078125 + txt829 +TEXDEF txt830 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.140469 APEX 0.25 0.75 0.234531 RAD 0.0078125 + txt830 +TEXDEF txt831 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.25 RAD 0.03125 + txt831 +TEXDEF txt832 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.25 APEX 0.359531 0.75 0.25 RAD 0.0078125 + txt832 +TEXDEF txt833 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.25 APEX 0.25 0.859531 0.25 RAD 0.0078125 + txt833 +TEXDEF txt834 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.265469 APEX 0.25 0.75 0.359531 RAD 0.0078125 + txt834 +TEXDEF txt835 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.375 RAD 0.03125 + txt835 +TEXDEF txt836 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.375 APEX 0.359531 0.75 0.375 RAD 0.0078125 + txt836 +TEXDEF txt837 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.375 APEX 0.25 0.859531 0.375 RAD 0.0078125 + txt837 +TEXDEF txt838 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.390469 APEX 0.25 0.75 0.484531 RAD 0.0078125 + txt838 +TEXDEF txt839 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.5 RAD 0.03125 + txt839 +TEXDEF txt840 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.5 APEX 0.359531 0.75 0.5 RAD 0.0078125 + txt840 +TEXDEF txt841 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.5 APEX 0.25 0.859531 0.5 RAD 0.0078125 + txt841 +TEXDEF txt842 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.515469 APEX 0.25 0.75 0.609531 RAD 0.0078125 + txt842 +TEXDEF txt843 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.625 RAD 0.03125 + txt843 +TEXDEF txt844 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.625 APEX 0.359531 0.75 0.625 RAD 0.0078125 + txt844 +TEXDEF txt845 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.625 APEX 0.25 0.859531 0.625 RAD 0.0078125 + txt845 +TEXDEF txt846 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.640469 APEX 0.25 0.75 0.734531 RAD 0.0078125 + txt846 +TEXDEF txt847 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.75 RAD 0.03125 + txt847 +TEXDEF txt848 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.75 APEX 0.359531 0.75 0.75 RAD 0.0078125 + txt848 +TEXDEF txt849 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.75 APEX 0.25 0.859531 0.75 RAD 0.0078125 + txt849 +TEXDEF txt850 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.765469 APEX 0.25 0.75 0.859531 RAD 0.0078125 + txt850 +TEXDEF txt851 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 0.875 RAD 0.03125 + txt851 +TEXDEF txt852 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 0.875 APEX 0.359531 0.75 0.875 RAD 0.0078125 + txt852 +TEXDEF txt853 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 0.875 APEX 0.25 0.859531 0.875 RAD 0.0078125 + txt853 +TEXDEF txt854 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.75 0.890469 APEX 0.25 0.75 0.984531 RAD 0.0078125 + txt854 +TEXDEF txt855 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.75 1 RAD 0.03125 + txt855 +TEXDEF txt856 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.75 1 APEX 0.359531 0.75 1 RAD 0.0078125 + txt856 +TEXDEF txt857 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.765469 1 APEX 0.25 0.859531 1 RAD 0.0078125 + txt857 +TEXDEF txt858 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0 RAD 0.03125 + txt858 +TEXDEF txt859 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0 APEX 0.359531 0.875 0 RAD 0.0078125 + txt859 +TEXDEF txt860 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0 APEX 0.25 0.984531 0 RAD 0.0078125 + txt860 +TEXDEF txt861 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.0154687 APEX 0.25 0.875 0.109531 RAD 0.0078125 + txt861 +TEXDEF txt862 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.125 RAD 0.03125 + txt862 +TEXDEF txt863 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.125 APEX 0.359531 0.875 0.125 RAD 0.0078125 + txt863 +TEXDEF txt864 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.125 APEX 0.25 0.984531 0.125 RAD 0.0078125 + txt864 +TEXDEF txt865 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.140469 APEX 0.25 0.875 0.234531 RAD 0.0078125 + txt865 +TEXDEF txt866 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.25 RAD 0.03125 + txt866 +TEXDEF txt867 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.25 APEX 0.359531 0.875 0.25 RAD 0.0078125 + txt867 +TEXDEF txt868 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.25 APEX 0.25 0.984531 0.25 RAD 0.0078125 + txt868 +TEXDEF txt869 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.265469 APEX 0.25 0.875 0.359531 RAD 0.0078125 + txt869 +TEXDEF txt870 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.375 RAD 0.03125 + txt870 +TEXDEF txt871 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.375 APEX 0.359531 0.875 0.375 RAD 0.0078125 + txt871 +TEXDEF txt872 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.375 APEX 0.25 0.984531 0.375 RAD 0.0078125 + txt872 +TEXDEF txt873 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.390469 APEX 0.25 0.875 0.484531 RAD 0.0078125 + txt873 +TEXDEF txt874 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.5 RAD 0.03125 + txt874 +TEXDEF txt875 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.5 APEX 0.359531 0.875 0.5 RAD 0.0078125 + txt875 +TEXDEF txt876 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.5 APEX 0.25 0.984531 0.5 RAD 0.0078125 + txt876 +TEXDEF txt877 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.515469 APEX 0.25 0.875 0.609531 RAD 0.0078125 + txt877 +TEXDEF txt878 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.625 RAD 0.03125 + txt878 +TEXDEF txt879 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.625 APEX 0.359531 0.875 0.625 RAD 0.0078125 + txt879 +TEXDEF txt880 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.625 APEX 0.25 0.984531 0.625 RAD 0.0078125 + txt880 +TEXDEF txt881 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.640469 APEX 0.25 0.875 0.734531 RAD 0.0078125 + txt881 +TEXDEF txt882 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.75 RAD 0.03125 + txt882 +TEXDEF txt883 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.75 APEX 0.359531 0.875 0.75 RAD 0.0078125 + txt883 +TEXDEF txt884 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.75 APEX 0.25 0.984531 0.75 RAD 0.0078125 + txt884 +TEXDEF txt885 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.765469 APEX 0.25 0.875 0.859531 RAD 0.0078125 + txt885 +TEXDEF txt886 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 0.875 RAD 0.03125 + txt886 +TEXDEF txt887 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 0.875 APEX 0.359531 0.875 0.875 RAD 0.0078125 + txt887 +TEXDEF txt888 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 0.875 APEX 0.25 0.984531 0.875 RAD 0.0078125 + txt888 +TEXDEF txt889 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.875 0.890469 APEX 0.25 0.875 0.984531 RAD 0.0078125 + txt889 +TEXDEF txt890 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 0.875 1 RAD 0.03125 + txt890 +TEXDEF txt891 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 0.875 1 APEX 0.359531 0.875 1 RAD 0.0078125 + txt891 +TEXDEF txt892 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 0.890469 1 APEX 0.25 0.984531 1 RAD 0.0078125 + txt892 +TEXDEF txt893 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0 RAD 0.03125 + txt893 +TEXDEF txt894 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0 APEX 0.359531 1 0 RAD 0.0078125 + txt894 +TEXDEF txt895 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.0154687 APEX 0.25 1 0.109531 RAD 0.0078125 + txt895 +TEXDEF txt896 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.125 RAD 0.03125 + txt896 +TEXDEF txt897 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.125 APEX 0.359531 1 0.125 RAD 0.0078125 + txt897 +TEXDEF txt898 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.140469 APEX 0.25 1 0.234531 RAD 0.0078125 + txt898 +TEXDEF txt899 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.25 RAD 0.03125 + txt899 +TEXDEF txt900 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.25 APEX 0.359531 1 0.25 RAD 0.0078125 + txt900 +TEXDEF txt901 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.265469 APEX 0.25 1 0.359531 RAD 0.0078125 + txt901 +TEXDEF txt902 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.375 RAD 0.03125 + txt902 +TEXDEF txt903 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.375 APEX 0.359531 1 0.375 RAD 0.0078125 + txt903 +TEXDEF txt904 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.390469 APEX 0.25 1 0.484531 RAD 0.0078125 + txt904 +TEXDEF txt905 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.5 RAD 0.03125 + txt905 +TEXDEF txt906 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.5 APEX 0.359531 1 0.5 RAD 0.0078125 + txt906 +TEXDEF txt907 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.515469 APEX 0.25 1 0.609531 RAD 0.0078125 + txt907 +TEXDEF txt908 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.625 RAD 0.03125 + txt908 +TEXDEF txt909 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.625 APEX 0.359531 1 0.625 RAD 0.0078125 + txt909 +TEXDEF txt910 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.640469 APEX 0.25 1 0.734531 RAD 0.0078125 + txt910 +TEXDEF txt911 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.75 RAD 0.03125 + txt911 +TEXDEF txt912 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.75 APEX 0.359531 1 0.75 RAD 0.0078125 + txt912 +TEXDEF txt913 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.765469 APEX 0.25 1 0.859531 RAD 0.0078125 + txt913 +TEXDEF txt914 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 0.875 RAD 0.03125 + txt914 +TEXDEF txt915 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 0.875 APEX 0.359531 1 0.875 RAD 0.0078125 + txt915 +TEXDEF txt916 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.25 1 0.890469 APEX 0.25 1 0.984531 RAD 0.0078125 + txt916 +TEXDEF txt917 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.25 1 1 RAD 0.03125 + txt917 +TEXDEF txt918 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.265469 1 1 APEX 0.359531 1 1 RAD 0.0078125 + txt918 +TEXDEF txt919 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0 RAD 0.03125 + txt919 +TEXDEF txt920 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0 APEX 0.484531 0 0 RAD 0.0078125 + txt920 +TEXDEF txt921 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0 APEX 0.375 0.109531 0 RAD 0.0078125 + txt921 +TEXDEF txt922 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.0154687 APEX 0.375 0 0.109531 RAD 0.0078125 + txt922 +TEXDEF txt923 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.125 RAD 0.03125 + txt923 +TEXDEF txt924 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.125 APEX 0.484531 0 0.125 RAD 0.0078125 + txt924 +TEXDEF txt925 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.125 APEX 0.375 0.109531 0.125 RAD 0.0078125 + txt925 +TEXDEF txt926 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.140469 APEX 0.375 0 0.234531 RAD 0.0078125 + txt926 +TEXDEF txt927 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.25 RAD 0.03125 + txt927 +TEXDEF txt928 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.25 APEX 0.484531 0 0.25 RAD 0.0078125 + txt928 +TEXDEF txt929 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.25 APEX 0.375 0.109531 0.25 RAD 0.0078125 + txt929 +TEXDEF txt930 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.265469 APEX 0.375 0 0.359531 RAD 0.0078125 + txt930 +TEXDEF txt931 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.375 RAD 0.03125 + txt931 +TEXDEF txt932 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.375 APEX 0.484531 0 0.375 RAD 0.0078125 + txt932 +TEXDEF txt933 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.375 APEX 0.375 0.109531 0.375 RAD 0.0078125 + txt933 +TEXDEF txt934 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.390469 APEX 0.375 0 0.484531 RAD 0.0078125 + txt934 +TEXDEF txt935 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.5 RAD 0.03125 + txt935 +TEXDEF txt936 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.5 APEX 0.484531 0 0.5 RAD 0.0078125 + txt936 +TEXDEF txt937 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.5 APEX 0.375 0.109531 0.5 RAD 0.0078125 + txt937 +TEXDEF txt938 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.515469 APEX 0.375 0 0.609531 RAD 0.0078125 + txt938 +TEXDEF txt939 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.625 RAD 0.03125 + txt939 +TEXDEF txt940 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.625 APEX 0.484531 0 0.625 RAD 0.0078125 + txt940 +TEXDEF txt941 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.625 APEX 0.375 0.109531 0.625 RAD 0.0078125 + txt941 +TEXDEF txt942 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.640469 APEX 0.375 0 0.734531 RAD 0.0078125 + txt942 +TEXDEF txt943 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.75 RAD 0.03125 + txt943 +TEXDEF txt944 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.75 APEX 0.484531 0 0.75 RAD 0.0078125 + txt944 +TEXDEF txt945 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.75 APEX 0.375 0.109531 0.75 RAD 0.0078125 + txt945 +TEXDEF txt946 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.765469 APEX 0.375 0 0.859531 RAD 0.0078125 + txt946 +TEXDEF txt947 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 0.875 RAD 0.03125 + txt947 +TEXDEF txt948 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 0.875 APEX 0.484531 0 0.875 RAD 0.0078125 + txt948 +TEXDEF txt949 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 0.875 APEX 0.375 0.109531 0.875 RAD 0.0078125 + txt949 +TEXDEF txt950 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0 0.890469 APEX 0.375 0 0.984531 RAD 0.0078125 + txt950 +TEXDEF txt951 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0 1 RAD 0.03125 + txt951 +TEXDEF txt952 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0 1 APEX 0.484531 0 1 RAD 0.0078125 + txt952 +TEXDEF txt953 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.0154687 1 APEX 0.375 0.109531 1 RAD 0.0078125 + txt953 +TEXDEF txt954 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0 RAD 0.03125 + txt954 +TEXDEF txt955 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0 APEX 0.484531 0.125 0 RAD 0.0078125 + txt955 +TEXDEF txt956 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0 APEX 0.375 0.234531 0 RAD 0.0078125 + txt956 +TEXDEF txt957 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.0154687 APEX 0.375 0.125 0.109531 RAD 0.0078125 + txt957 +TEXDEF txt958 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.125 RAD 0.03125 + txt958 +TEXDEF txt959 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.125 APEX 0.484531 0.125 0.125 RAD 0.0078125 + txt959 +TEXDEF txt960 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.125 APEX 0.375 0.234531 0.125 RAD 0.0078125 + txt960 +TEXDEF txt961 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.140469 APEX 0.375 0.125 0.234531 RAD 0.0078125 + txt961 +TEXDEF txt962 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.25 RAD 0.03125 + txt962 +TEXDEF txt963 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.25 APEX 0.484531 0.125 0.25 RAD 0.0078125 + txt963 +TEXDEF txt964 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.25 APEX 0.375 0.234531 0.25 RAD 0.0078125 + txt964 +TEXDEF txt965 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.265469 APEX 0.375 0.125 0.359531 RAD 0.0078125 + txt965 +TEXDEF txt966 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.375 RAD 0.03125 + txt966 +TEXDEF txt967 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.375 APEX 0.484531 0.125 0.375 RAD 0.0078125 + txt967 +TEXDEF txt968 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.375 APEX 0.375 0.234531 0.375 RAD 0.0078125 + txt968 +TEXDEF txt969 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.390469 APEX 0.375 0.125 0.484531 RAD 0.0078125 + txt969 +TEXDEF txt970 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.5 RAD 0.03125 + txt970 +TEXDEF txt971 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.5 APEX 0.484531 0.125 0.5 RAD 0.0078125 + txt971 +TEXDEF txt972 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.5 APEX 0.375 0.234531 0.5 RAD 0.0078125 + txt972 +TEXDEF txt973 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.515469 APEX 0.375 0.125 0.609531 RAD 0.0078125 + txt973 +TEXDEF txt974 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.625 RAD 0.03125 + txt974 +TEXDEF txt975 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.625 APEX 0.484531 0.125 0.625 RAD 0.0078125 + txt975 +TEXDEF txt976 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.625 APEX 0.375 0.234531 0.625 RAD 0.0078125 + txt976 +TEXDEF txt977 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.640469 APEX 0.375 0.125 0.734531 RAD 0.0078125 + txt977 +TEXDEF txt978 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.75 RAD 0.03125 + txt978 +TEXDEF txt979 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.75 APEX 0.484531 0.125 0.75 RAD 0.0078125 + txt979 +TEXDEF txt980 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.75 APEX 0.375 0.234531 0.75 RAD 0.0078125 + txt980 +TEXDEF txt981 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.765469 APEX 0.375 0.125 0.859531 RAD 0.0078125 + txt981 +TEXDEF txt982 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 0.875 RAD 0.03125 + txt982 +TEXDEF txt983 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 0.875 APEX 0.484531 0.125 0.875 RAD 0.0078125 + txt983 +TEXDEF txt984 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 0.875 APEX 0.375 0.234531 0.875 RAD 0.0078125 + txt984 +TEXDEF txt985 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.125 0.890469 APEX 0.375 0.125 0.984531 RAD 0.0078125 + txt985 +TEXDEF txt986 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.125 1 RAD 0.03125 + txt986 +TEXDEF txt987 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.125 1 APEX 0.484531 0.125 1 RAD 0.0078125 + txt987 +TEXDEF txt988 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.140469 1 APEX 0.375 0.234531 1 RAD 0.0078125 + txt988 +TEXDEF txt989 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0 RAD 0.03125 + txt989 +TEXDEF txt990 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0 APEX 0.484531 0.25 0 RAD 0.0078125 + txt990 +TEXDEF txt991 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0 APEX 0.375 0.359531 0 RAD 0.0078125 + txt991 +TEXDEF txt992 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.0154687 APEX 0.375 0.25 0.109531 RAD 0.0078125 + txt992 +TEXDEF txt993 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.125 RAD 0.03125 + txt993 +TEXDEF txt994 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.125 APEX 0.484531 0.25 0.125 RAD 0.0078125 + txt994 +TEXDEF txt995 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.125 APEX 0.375 0.359531 0.125 RAD 0.0078125 + txt995 +TEXDEF txt996 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.140469 APEX 0.375 0.25 0.234531 RAD 0.0078125 + txt996 +TEXDEF txt997 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.25 RAD 0.03125 + txt997 +TEXDEF txt998 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.25 APEX 0.484531 0.25 0.25 RAD 0.0078125 + txt998 +TEXDEF txt999 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.25 APEX 0.375 0.359531 0.25 RAD 0.0078125 + txt999 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.265469 APEX 0.375 0.25 0.359531 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.375 RAD 0.03125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.375 APEX 0.484531 0.25 0.375 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.375 APEX 0.375 0.359531 0.375 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.390469 APEX 0.375 0.25 0.484531 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.5 RAD 0.03125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.5 APEX 0.484531 0.25 0.5 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.5 APEX 0.375 0.359531 0.5 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.515469 APEX 0.375 0.25 0.609531 RAD 0.0078125 + txt100 +TEXDEF txt100 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.625 RAD 0.03125 + txt100 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.625 APEX 0.484531 0.25 0.625 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.625 APEX 0.375 0.359531 0.625 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.640469 APEX 0.375 0.25 0.734531 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.75 RAD 0.03125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.75 APEX 0.484531 0.25 0.75 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.75 APEX 0.375 0.359531 0.75 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.765469 APEX 0.375 0.25 0.859531 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 0.875 RAD 0.03125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 0.875 APEX 0.484531 0.25 0.875 RAD 0.0078125 + txt101 +TEXDEF txt101 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 0.875 APEX 0.375 0.359531 0.875 RAD 0.0078125 + txt101 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.25 0.890469 APEX 0.375 0.25 0.984531 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.25 1 RAD 0.03125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.25 1 APEX 0.484531 0.25 1 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.265469 1 APEX 0.375 0.359531 1 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0 RAD 0.03125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0 APEX 0.484531 0.375 0 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0 APEX 0.375 0.484531 0 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.0154687 APEX 0.375 0.375 0.109531 RAD 0.0078125 + txt102 +TEXDEF txt102 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.125 RAD 0.03125 + txt102 +TEXDEF txt102 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.125 APEX 0.484531 0.375 0.125 RAD 0.0078125 + txt102 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.125 APEX 0.375 0.484531 0.125 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.140469 APEX 0.375 0.375 0.234531 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.25 RAD 0.03125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.25 APEX 0.484531 0.375 0.25 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.25 APEX 0.375 0.484531 0.25 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.265469 APEX 0.375 0.375 0.359531 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.375 RAD 0.03125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.375 APEX 0.484531 0.375 0.375 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.375 APEX 0.375 0.484531 0.375 RAD 0.0078125 + txt103 +TEXDEF txt103 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.390469 APEX 0.375 0.375 0.484531 RAD 0.0078125 + txt103 +TEXDEF txt104 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.5 RAD 0.03125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.5 APEX 0.484531 0.375 0.5 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.5 APEX 0.375 0.484531 0.5 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.515469 APEX 0.375 0.375 0.609531 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.625 RAD 0.03125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.625 APEX 0.484531 0.375 0.625 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.625 APEX 0.375 0.484531 0.625 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.640469 APEX 0.375 0.375 0.734531 RAD 0.0078125 + txt104 +TEXDEF txt104 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.75 RAD 0.03125 + txt104 +TEXDEF txt104 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.75 APEX 0.484531 0.375 0.75 RAD 0.0078125 + txt104 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.75 APEX 0.375 0.484531 0.75 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.765469 APEX 0.375 0.375 0.859531 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 0.875 RAD 0.03125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 0.875 APEX 0.484531 0.375 0.875 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 0.875 APEX 0.375 0.484531 0.875 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.375 0.890469 APEX 0.375 0.375 0.984531 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.375 1 RAD 0.03125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.375 1 APEX 0.484531 0.375 1 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.390469 1 APEX 0.375 0.484531 1 RAD 0.0078125 + txt105 +TEXDEF txt105 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0 RAD 0.03125 + txt105 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0 APEX 0.484531 0.5 0 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0 APEX 0.375 0.609531 0 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.0154687 APEX 0.375 0.5 0.109531 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.125 RAD 0.03125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.125 APEX 0.484531 0.5 0.125 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.125 APEX 0.375 0.609531 0.125 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.140469 APEX 0.375 0.5 0.234531 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.25 RAD 0.03125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.25 APEX 0.484531 0.5 0.25 RAD 0.0078125 + txt106 +TEXDEF txt106 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.25 APEX 0.375 0.609531 0.25 RAD 0.0078125 + txt106 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.265469 APEX 0.375 0.5 0.359531 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.375 RAD 0.03125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.375 APEX 0.484531 0.5 0.375 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.375 APEX 0.375 0.609531 0.375 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.390469 APEX 0.375 0.5 0.484531 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.5 RAD 0.03125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.5 APEX 0.484531 0.5 0.5 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.5 APEX 0.375 0.609531 0.5 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.515469 APEX 0.375 0.5 0.609531 RAD 0.0078125 + txt107 +TEXDEF txt107 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.625 RAD 0.03125 + txt107 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.625 APEX 0.484531 0.5 0.625 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.625 APEX 0.375 0.609531 0.625 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.640469 APEX 0.375 0.5 0.734531 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.75 RAD 0.03125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.75 APEX 0.484531 0.5 0.75 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.75 APEX 0.375 0.609531 0.75 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.765469 APEX 0.375 0.5 0.859531 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 0.875 RAD 0.03125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 0.875 APEX 0.484531 0.5 0.875 RAD 0.0078125 + txt108 +TEXDEF txt108 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 0.875 APEX 0.375 0.609531 0.875 RAD 0.0078125 + txt108 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.5 0.890469 APEX 0.375 0.5 0.984531 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.5 1 RAD 0.03125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.5 1 APEX 0.484531 0.5 1 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.515469 1 APEX 0.375 0.609531 1 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0 RAD 0.03125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0 APEX 0.484531 0.625 0 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0 APEX 0.375 0.734531 0 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.0154687 APEX 0.375 0.625 0.109531 RAD 0.0078125 + txt109 +TEXDEF txt109 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.125 RAD 0.03125 + txt109 +TEXDEF txt109 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.125 APEX 0.484531 0.625 0.125 RAD 0.0078125 + txt109 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.125 APEX 0.375 0.734531 0.125 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.140469 APEX 0.375 0.625 0.234531 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.25 RAD 0.03125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.25 APEX 0.484531 0.625 0.25 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.25 APEX 0.375 0.734531 0.25 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.265469 APEX 0.375 0.625 0.359531 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.375 RAD 0.03125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.375 APEX 0.484531 0.625 0.375 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.375 APEX 0.375 0.734531 0.375 RAD 0.0078125 + txt110 +TEXDEF txt110 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.390469 APEX 0.375 0.625 0.484531 RAD 0.0078125 + txt110 +TEXDEF txt111 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.5 RAD 0.03125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.5 APEX 0.484531 0.625 0.5 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.5 APEX 0.375 0.734531 0.5 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.515469 APEX 0.375 0.625 0.609531 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.625 RAD 0.03125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.625 APEX 0.484531 0.625 0.625 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.625 APEX 0.375 0.734531 0.625 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.640469 APEX 0.375 0.625 0.734531 RAD 0.0078125 + txt111 +TEXDEF txt111 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.75 RAD 0.03125 + txt111 +TEXDEF txt111 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.75 APEX 0.484531 0.625 0.75 RAD 0.0078125 + txt111 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.75 APEX 0.375 0.734531 0.75 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.765469 APEX 0.375 0.625 0.859531 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 0.875 RAD 0.03125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 0.875 APEX 0.484531 0.625 0.875 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 0.875 APEX 0.375 0.734531 0.875 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.625 0.890469 APEX 0.375 0.625 0.984531 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.625 1 RAD 0.03125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.625 1 APEX 0.484531 0.625 1 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.640469 1 APEX 0.375 0.734531 1 RAD 0.0078125 + txt112 +TEXDEF txt112 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0 RAD 0.03125 + txt112 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0 APEX 0.484531 0.75 0 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0 APEX 0.375 0.859531 0 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.0154687 APEX 0.375 0.75 0.109531 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.125 RAD 0.03125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.125 APEX 0.484531 0.75 0.125 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.125 APEX 0.375 0.859531 0.125 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.140469 APEX 0.375 0.75 0.234531 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.25 RAD 0.03125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.25 APEX 0.484531 0.75 0.25 RAD 0.0078125 + txt113 +TEXDEF txt113 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.25 APEX 0.375 0.859531 0.25 RAD 0.0078125 + txt113 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.265469 APEX 0.375 0.75 0.359531 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.375 RAD 0.03125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.375 APEX 0.484531 0.75 0.375 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.375 APEX 0.375 0.859531 0.375 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.390469 APEX 0.375 0.75 0.484531 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.5 RAD 0.03125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.5 APEX 0.484531 0.75 0.5 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.5 APEX 0.375 0.859531 0.5 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.515469 APEX 0.375 0.75 0.609531 RAD 0.0078125 + txt114 +TEXDEF txt114 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.625 RAD 0.03125 + txt114 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.625 APEX 0.484531 0.75 0.625 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.625 APEX 0.375 0.859531 0.625 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.640469 APEX 0.375 0.75 0.734531 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.75 RAD 0.03125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.75 APEX 0.484531 0.75 0.75 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.75 APEX 0.375 0.859531 0.75 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.765469 APEX 0.375 0.75 0.859531 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 0.875 RAD 0.03125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 0.875 APEX 0.484531 0.75 0.875 RAD 0.0078125 + txt115 +TEXDEF txt115 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 0.875 APEX 0.375 0.859531 0.875 RAD 0.0078125 + txt115 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.75 0.890469 APEX 0.375 0.75 0.984531 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.75 1 RAD 0.03125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.75 1 APEX 0.484531 0.75 1 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.765469 1 APEX 0.375 0.859531 1 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0 RAD 0.03125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0 APEX 0.484531 0.875 0 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0 APEX 0.375 0.984531 0 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.0154687 APEX 0.375 0.875 0.109531 RAD 0.0078125 + txt116 +TEXDEF txt116 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.125 RAD 0.03125 + txt116 +TEXDEF txt116 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.125 APEX 0.484531 0.875 0.125 RAD 0.0078125 + txt116 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.125 APEX 0.375 0.984531 0.125 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.140469 APEX 0.375 0.875 0.234531 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.25 RAD 0.03125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.25 APEX 0.484531 0.875 0.25 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.25 APEX 0.375 0.984531 0.25 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.265469 APEX 0.375 0.875 0.359531 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.375 RAD 0.03125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.375 APEX 0.484531 0.875 0.375 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.375 APEX 0.375 0.984531 0.375 RAD 0.0078125 + txt117 +TEXDEF txt117 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.390469 APEX 0.375 0.875 0.484531 RAD 0.0078125 + txt117 +TEXDEF txt118 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.5 RAD 0.03125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.5 APEX 0.484531 0.875 0.5 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.5 APEX 0.375 0.984531 0.5 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.515469 APEX 0.375 0.875 0.609531 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.625 RAD 0.03125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.625 APEX 0.484531 0.875 0.625 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.625 APEX 0.375 0.984531 0.625 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.640469 APEX 0.375 0.875 0.734531 RAD 0.0078125 + txt118 +TEXDEF txt118 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.75 RAD 0.03125 + txt118 +TEXDEF txt118 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.75 APEX 0.484531 0.875 0.75 RAD 0.0078125 + txt118 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.75 APEX 0.375 0.984531 0.75 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.765469 APEX 0.375 0.875 0.859531 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 0.875 RAD 0.03125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 0.875 APEX 0.484531 0.875 0.875 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 0.875 APEX 0.375 0.984531 0.875 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.875 0.890469 APEX 0.375 0.875 0.984531 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 0.875 1 RAD 0.03125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 0.875 1 APEX 0.484531 0.875 1 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 0.890469 1 APEX 0.375 0.984531 1 RAD 0.0078125 + txt119 +TEXDEF txt119 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0 RAD 0.03125 + txt119 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0 APEX 0.484531 1 0 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.0154687 APEX 0.375 1 0.109531 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.125 RAD 0.03125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.125 APEX 0.484531 1 0.125 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.140469 APEX 0.375 1 0.234531 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.25 RAD 0.03125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.25 APEX 0.484531 1 0.25 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.265469 APEX 0.375 1 0.359531 RAD 0.0078125 + txt120 +TEXDEF txt120 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.375 RAD 0.03125 + txt120 +TEXDEF txt120 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.375 APEX 0.484531 1 0.375 RAD 0.0078125 + txt120 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.390469 APEX 0.375 1 0.484531 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.5 RAD 0.03125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.5 APEX 0.484531 1 0.5 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.515469 APEX 0.375 1 0.609531 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.625 RAD 0.03125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.625 APEX 0.484531 1 0.625 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.640469 APEX 0.375 1 0.734531 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.75 RAD 0.03125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.75 APEX 0.484531 1 0.75 RAD 0.0078125 + txt121 +TEXDEF txt121 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.765469 APEX 0.375 1 0.859531 RAD 0.0078125 + txt121 +TEXDEF txt122 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 0.875 RAD 0.03125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 0.875 APEX 0.484531 1 0.875 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.375 1 0.890469 APEX 0.375 1 0.984531 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.375 1 1 RAD 0.03125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.390469 1 1 APEX 0.484531 1 1 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0 RAD 0.03125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0 APEX 0.609531 0 0 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0 APEX 0.5 0.109531 0 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.0154687 APEX 0.5 0 0.109531 RAD 0.0078125 + txt122 +TEXDEF txt122 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.125 RAD 0.03125 + txt122 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.125 APEX 0.609531 0 0.125 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.125 APEX 0.5 0.109531 0.125 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.140469 APEX 0.5 0 0.234531 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.25 RAD 0.03125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.25 APEX 0.609531 0 0.25 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.25 APEX 0.5 0.109531 0.25 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.265469 APEX 0.5 0 0.359531 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.375 RAD 0.03125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.375 APEX 0.609531 0 0.375 RAD 0.0078125 + txt123 +TEXDEF txt123 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.375 APEX 0.5 0.109531 0.375 RAD 0.0078125 + txt123 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.390469 APEX 0.5 0 0.484531 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.5 RAD 0.03125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.5 APEX 0.609531 0 0.5 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.5 APEX 0.5 0.109531 0.5 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.515469 APEX 0.5 0 0.609531 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.625 RAD 0.03125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.625 APEX 0.609531 0 0.625 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.625 APEX 0.5 0.109531 0.625 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.640469 APEX 0.5 0 0.734531 RAD 0.0078125 + txt124 +TEXDEF txt124 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.75 RAD 0.03125 + txt124 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.75 APEX 0.609531 0 0.75 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.75 APEX 0.5 0.109531 0.75 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.765469 APEX 0.5 0 0.859531 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 0.875 RAD 0.03125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 0.875 APEX 0.609531 0 0.875 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 0.875 APEX 0.5 0.109531 0.875 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0 0.890469 APEX 0.5 0 0.984531 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0 1 RAD 0.03125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0 1 APEX 0.609531 0 1 RAD 0.0078125 + txt125 +TEXDEF txt125 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.0154687 1 APEX 0.5 0.109531 1 RAD 0.0078125 + txt125 +TEXDEF txt126 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0 RAD 0.03125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0 APEX 0.609531 0.125 0 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0 APEX 0.5 0.234531 0 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.0154687 APEX 0.5 0.125 0.109531 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.125 RAD 0.03125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.125 APEX 0.609531 0.125 0.125 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.125 APEX 0.5 0.234531 0.125 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.140469 APEX 0.5 0.125 0.234531 RAD 0.0078125 + txt126 +TEXDEF txt126 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.25 RAD 0.03125 + txt126 +TEXDEF txt126 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.25 APEX 0.609531 0.125 0.25 RAD 0.0078125 + txt126 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.25 APEX 0.5 0.234531 0.25 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.265469 APEX 0.5 0.125 0.359531 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.375 RAD 0.03125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.375 APEX 0.609531 0.125 0.375 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.375 APEX 0.5 0.234531 0.375 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.390469 APEX 0.5 0.125 0.484531 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.5 RAD 0.03125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.5 APEX 0.609531 0.125 0.5 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.5 APEX 0.5 0.234531 0.5 RAD 0.0078125 + txt127 +TEXDEF txt127 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.515469 APEX 0.5 0.125 0.609531 RAD 0.0078125 + txt127 +TEXDEF txt128 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.625 RAD 0.03125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.625 APEX 0.609531 0.125 0.625 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.625 APEX 0.5 0.234531 0.625 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.640469 APEX 0.5 0.125 0.734531 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.75 RAD 0.03125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.75 APEX 0.609531 0.125 0.75 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.75 APEX 0.5 0.234531 0.75 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.765469 APEX 0.5 0.125 0.859531 RAD 0.0078125 + txt128 +TEXDEF txt128 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 0.875 RAD 0.03125 + txt128 +TEXDEF txt128 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 0.875 APEX 0.609531 0.125 0.875 RAD 0.0078125 + txt128 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 0.875 APEX 0.5 0.234531 0.875 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.125 0.890469 APEX 0.5 0.125 0.984531 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.125 1 RAD 0.03125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.125 1 APEX 0.609531 0.125 1 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.140469 1 APEX 0.5 0.234531 1 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0 RAD 0.03125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0 APEX 0.609531 0.25 0 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0 APEX 0.5 0.359531 0 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.0154687 APEX 0.5 0.25 0.109531 RAD 0.0078125 + txt129 +TEXDEF txt129 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.125 RAD 0.03125 + txt129 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.125 APEX 0.609531 0.25 0.125 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.125 APEX 0.5 0.359531 0.125 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.140469 APEX 0.5 0.25 0.234531 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.25 RAD 0.03125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.25 APEX 0.609531 0.25 0.25 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.25 APEX 0.5 0.359531 0.25 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.265469 APEX 0.5 0.25 0.359531 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.375 RAD 0.03125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.375 APEX 0.609531 0.25 0.375 RAD 0.0078125 + txt130 +TEXDEF txt130 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.375 APEX 0.5 0.359531 0.375 RAD 0.0078125 + txt130 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.390469 APEX 0.5 0.25 0.484531 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.5 RAD 0.03125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.5 APEX 0.609531 0.25 0.5 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.5 APEX 0.5 0.359531 0.5 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.515469 APEX 0.5 0.25 0.609531 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.625 RAD 0.03125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.625 APEX 0.609531 0.25 0.625 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.625 APEX 0.5 0.359531 0.625 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.640469 APEX 0.5 0.25 0.734531 RAD 0.0078125 + txt131 +TEXDEF txt131 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.75 RAD 0.03125 + txt131 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.75 APEX 0.609531 0.25 0.75 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.75 APEX 0.5 0.359531 0.75 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.765469 APEX 0.5 0.25 0.859531 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 0.875 RAD 0.03125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 0.875 APEX 0.609531 0.25 0.875 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 0.875 APEX 0.5 0.359531 0.875 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.25 0.890469 APEX 0.5 0.25 0.984531 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.25 1 RAD 0.03125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.25 1 APEX 0.609531 0.25 1 RAD 0.0078125 + txt132 +TEXDEF txt132 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.265469 1 APEX 0.5 0.359531 1 RAD 0.0078125 + txt132 +TEXDEF txt133 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0 RAD 0.03125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0 APEX 0.609531 0.375 0 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0 APEX 0.5 0.484531 0 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.0154687 APEX 0.5 0.375 0.109531 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.125 RAD 0.03125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.125 APEX 0.609531 0.375 0.125 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.125 APEX 0.5 0.484531 0.125 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.140469 APEX 0.5 0.375 0.234531 RAD 0.0078125 + txt133 +TEXDEF txt133 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.25 RAD 0.03125 + txt133 +TEXDEF txt133 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.25 APEX 0.609531 0.375 0.25 RAD 0.0078125 + txt133 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.25 APEX 0.5 0.484531 0.25 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.265469 APEX 0.5 0.375 0.359531 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.375 RAD 0.03125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.375 APEX 0.609531 0.375 0.375 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.375 APEX 0.5 0.484531 0.375 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.390469 APEX 0.5 0.375 0.484531 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.5 RAD 0.03125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.5 APEX 0.609531 0.375 0.5 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.5 APEX 0.5 0.484531 0.5 RAD 0.0078125 + txt134 +TEXDEF txt134 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.515469 APEX 0.5 0.375 0.609531 RAD 0.0078125 + txt134 +TEXDEF txt135 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.625 RAD 0.03125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.625 APEX 0.609531 0.375 0.625 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.625 APEX 0.5 0.484531 0.625 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.640469 APEX 0.5 0.375 0.734531 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.75 RAD 0.03125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.75 APEX 0.609531 0.375 0.75 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.75 APEX 0.5 0.484531 0.75 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.765469 APEX 0.5 0.375 0.859531 RAD 0.0078125 + txt135 +TEXDEF txt135 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 0.875 RAD 0.03125 + txt135 +TEXDEF txt135 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 0.875 APEX 0.609531 0.375 0.875 RAD 0.0078125 + txt135 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 0.875 APEX 0.5 0.484531 0.875 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.375 0.890469 APEX 0.5 0.375 0.984531 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.375 1 RAD 0.03125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.375 1 APEX 0.609531 0.375 1 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.390469 1 APEX 0.5 0.484531 1 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0 RAD 0.03125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0 APEX 0.609531 0.5 0 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0 APEX 0.5 0.609531 0 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.0154687 APEX 0.5 0.5 0.109531 RAD 0.0078125 + txt136 +TEXDEF txt136 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.125 RAD 0.03125 + txt136 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.125 APEX 0.609531 0.5 0.125 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.125 APEX 0.5 0.609531 0.125 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.140469 APEX 0.5 0.5 0.234531 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.25 RAD 0.03125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.25 APEX 0.609531 0.5 0.25 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.25 APEX 0.5 0.609531 0.25 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.265469 APEX 0.5 0.5 0.359531 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.375 RAD 0.03125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.375 APEX 0.609531 0.5 0.375 RAD 0.0078125 + txt137 +TEXDEF txt137 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.375 APEX 0.5 0.609531 0.375 RAD 0.0078125 + txt137 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.390469 APEX 0.5 0.5 0.484531 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.5 RAD 0.03125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.5 APEX 0.609531 0.5 0.5 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.5 APEX 0.5 0.609531 0.5 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.515469 APEX 0.5 0.5 0.609531 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.625 RAD 0.03125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.625 APEX 0.609531 0.5 0.625 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.625 APEX 0.5 0.609531 0.625 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.640469 APEX 0.5 0.5 0.734531 RAD 0.0078125 + txt138 +TEXDEF txt138 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.75 RAD 0.03125 + txt138 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.75 APEX 0.609531 0.5 0.75 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.75 APEX 0.5 0.609531 0.75 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.765469 APEX 0.5 0.5 0.859531 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 0.875 RAD 0.03125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 0.875 APEX 0.609531 0.5 0.875 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 0.875 APEX 0.5 0.609531 0.875 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.5 0.890469 APEX 0.5 0.5 0.984531 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.5 1 RAD 0.03125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.5 1 APEX 0.609531 0.5 1 RAD 0.0078125 + txt139 +TEXDEF txt139 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.515469 1 APEX 0.5 0.609531 1 RAD 0.0078125 + txt139 +TEXDEF txt140 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0 RAD 0.03125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0 APEX 0.609531 0.625 0 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0 APEX 0.5 0.734531 0 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.0154687 APEX 0.5 0.625 0.109531 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.125 RAD 0.03125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.125 APEX 0.609531 0.625 0.125 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.125 APEX 0.5 0.734531 0.125 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.140469 APEX 0.5 0.625 0.234531 RAD 0.0078125 + txt140 +TEXDEF txt140 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.25 RAD 0.03125 + txt140 +TEXDEF txt140 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.25 APEX 0.609531 0.625 0.25 RAD 0.0078125 + txt140 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.25 APEX 0.5 0.734531 0.25 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.265469 APEX 0.5 0.625 0.359531 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.375 RAD 0.03125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.375 APEX 0.609531 0.625 0.375 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.375 APEX 0.5 0.734531 0.375 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.390469 APEX 0.5 0.625 0.484531 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.5 RAD 0.03125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.5 APEX 0.609531 0.625 0.5 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.5 APEX 0.5 0.734531 0.5 RAD 0.0078125 + txt141 +TEXDEF txt141 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.515469 APEX 0.5 0.625 0.609531 RAD 0.0078125 + txt141 +TEXDEF txt142 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.625 RAD 0.03125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.625 APEX 0.609531 0.625 0.625 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.625 APEX 0.5 0.734531 0.625 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.640469 APEX 0.5 0.625 0.734531 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.75 RAD 0.03125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.75 APEX 0.609531 0.625 0.75 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.75 APEX 0.5 0.734531 0.75 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.765469 APEX 0.5 0.625 0.859531 RAD 0.0078125 + txt142 +TEXDEF txt142 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 0.875 RAD 0.03125 + txt142 +TEXDEF txt142 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 0.875 APEX 0.609531 0.625 0.875 RAD 0.0078125 + txt142 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 0.875 APEX 0.5 0.734531 0.875 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.625 0.890469 APEX 0.5 0.625 0.984531 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.625 1 RAD 0.03125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.625 1 APEX 0.609531 0.625 1 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.640469 1 APEX 0.5 0.734531 1 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0 RAD 0.03125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0 APEX 0.609531 0.75 0 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0 APEX 0.5 0.859531 0 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.0154687 APEX 0.5 0.75 0.109531 RAD 0.0078125 + txt143 +TEXDEF txt143 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.125 RAD 0.03125 + txt143 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.125 APEX 0.609531 0.75 0.125 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.125 APEX 0.5 0.859531 0.125 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.140469 APEX 0.5 0.75 0.234531 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.25 RAD 0.03125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.25 APEX 0.609531 0.75 0.25 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.25 APEX 0.5 0.859531 0.25 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.265469 APEX 0.5 0.75 0.359531 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.375 RAD 0.03125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.375 APEX 0.609531 0.75 0.375 RAD 0.0078125 + txt144 +TEXDEF txt144 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.375 APEX 0.5 0.859531 0.375 RAD 0.0078125 + txt144 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.390469 APEX 0.5 0.75 0.484531 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.5 RAD 0.03125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.5 APEX 0.609531 0.75 0.5 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.5 APEX 0.5 0.859531 0.5 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.515469 APEX 0.5 0.75 0.609531 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.625 RAD 0.03125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.625 APEX 0.609531 0.75 0.625 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.625 APEX 0.5 0.859531 0.625 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.640469 APEX 0.5 0.75 0.734531 RAD 0.0078125 + txt145 +TEXDEF txt145 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.75 RAD 0.03125 + txt145 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.75 APEX 0.609531 0.75 0.75 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.75 APEX 0.5 0.859531 0.75 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.765469 APEX 0.5 0.75 0.859531 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 0.875 RAD 0.03125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 0.875 APEX 0.609531 0.75 0.875 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 0.875 APEX 0.5 0.859531 0.875 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.75 0.890469 APEX 0.5 0.75 0.984531 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.75 1 RAD 0.03125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.75 1 APEX 0.609531 0.75 1 RAD 0.0078125 + txt146 +TEXDEF txt146 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.765469 1 APEX 0.5 0.859531 1 RAD 0.0078125 + txt146 +TEXDEF txt147 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0 RAD 0.03125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0 APEX 0.609531 0.875 0 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0 APEX 0.5 0.984531 0 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.0154687 APEX 0.5 0.875 0.109531 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.125 RAD 0.03125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.125 APEX 0.609531 0.875 0.125 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.125 APEX 0.5 0.984531 0.125 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.140469 APEX 0.5 0.875 0.234531 RAD 0.0078125 + txt147 +TEXDEF txt147 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.25 RAD 0.03125 + txt147 +TEXDEF txt147 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.25 APEX 0.609531 0.875 0.25 RAD 0.0078125 + txt147 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.25 APEX 0.5 0.984531 0.25 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.265469 APEX 0.5 0.875 0.359531 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.375 RAD 0.03125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.375 APEX 0.609531 0.875 0.375 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.375 APEX 0.5 0.984531 0.375 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.390469 APEX 0.5 0.875 0.484531 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.5 RAD 0.03125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.5 APEX 0.609531 0.875 0.5 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.5 APEX 0.5 0.984531 0.5 RAD 0.0078125 + txt148 +TEXDEF txt148 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.515469 APEX 0.5 0.875 0.609531 RAD 0.0078125 + txt148 +TEXDEF txt149 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.625 RAD 0.03125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.625 APEX 0.609531 0.875 0.625 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.625 APEX 0.5 0.984531 0.625 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.640469 APEX 0.5 0.875 0.734531 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.75 RAD 0.03125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.75 APEX 0.609531 0.875 0.75 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.75 APEX 0.5 0.984531 0.75 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.765469 APEX 0.5 0.875 0.859531 RAD 0.0078125 + txt149 +TEXDEF txt149 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 0.875 RAD 0.03125 + txt149 +TEXDEF txt149 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 0.875 APEX 0.609531 0.875 0.875 RAD 0.0078125 + txt149 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 0.875 APEX 0.5 0.984531 0.875 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.875 0.890469 APEX 0.5 0.875 0.984531 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 0.875 1 RAD 0.03125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 0.875 1 APEX 0.609531 0.875 1 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 0.890469 1 APEX 0.5 0.984531 1 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0 RAD 0.03125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0 APEX 0.609531 1 0 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.0154687 APEX 0.5 1 0.109531 RAD 0.0078125 + txt150 +TEXDEF txt150 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.125 RAD 0.03125 + txt150 +TEXDEF txt150 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.125 APEX 0.609531 1 0.125 RAD 0.0078125 + txt150 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.140469 APEX 0.5 1 0.234531 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.25 RAD 0.03125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.25 APEX 0.609531 1 0.25 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.265469 APEX 0.5 1 0.359531 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.375 RAD 0.03125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.375 APEX 0.609531 1 0.375 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.390469 APEX 0.5 1 0.484531 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.5 RAD 0.03125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.5 APEX 0.609531 1 0.5 RAD 0.0078125 + txt151 +TEXDEF txt151 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.515469 APEX 0.5 1 0.609531 RAD 0.0078125 + txt151 +TEXDEF txt152 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.625 RAD 0.03125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.625 APEX 0.609531 1 0.625 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.640469 APEX 0.5 1 0.734531 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.75 RAD 0.03125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.75 APEX 0.609531 1 0.75 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.765469 APEX 0.5 1 0.859531 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 0.875 RAD 0.03125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 0.875 APEX 0.609531 1 0.875 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.5 1 0.890469 APEX 0.5 1 0.984531 RAD 0.0078125 + txt152 +TEXDEF txt152 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.5 1 1 RAD 0.03125 + txt152 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.515469 1 1 APEX 0.609531 1 1 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0 RAD 0.03125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0 APEX 0.734531 0 0 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0 APEX 0.625 0.109531 0 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.0154687 APEX 0.625 0 0.109531 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.125 RAD 0.03125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.125 APEX 0.734531 0 0.125 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.125 APEX 0.625 0.109531 0.125 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.140469 APEX 0.625 0 0.234531 RAD 0.0078125 + txt153 +TEXDEF txt153 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.25 RAD 0.03125 + txt153 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.25 APEX 0.734531 0 0.25 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.25 APEX 0.625 0.109531 0.25 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.265469 APEX 0.625 0 0.359531 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.375 RAD 0.03125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.375 APEX 0.734531 0 0.375 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.375 APEX 0.625 0.109531 0.375 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.390469 APEX 0.625 0 0.484531 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.5 RAD 0.03125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.5 APEX 0.734531 0 0.5 RAD 0.0078125 + txt154 +TEXDEF txt154 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.5 APEX 0.625 0.109531 0.5 RAD 0.0078125 + txt154 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.515469 APEX 0.625 0 0.609531 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.625 RAD 0.03125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.625 APEX 0.734531 0 0.625 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.625 APEX 0.625 0.109531 0.625 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.640469 APEX 0.625 0 0.734531 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.75 RAD 0.03125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.75 APEX 0.734531 0 0.75 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.75 APEX 0.625 0.109531 0.75 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.765469 APEX 0.625 0 0.859531 RAD 0.0078125 + txt155 +TEXDEF txt155 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 0.875 RAD 0.03125 + txt155 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 0.875 APEX 0.734531 0 0.875 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 0.875 APEX 0.625 0.109531 0.875 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0 0.890469 APEX 0.625 0 0.984531 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0 1 RAD 0.03125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0 1 APEX 0.734531 0 1 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.0154687 1 APEX 0.625 0.109531 1 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0 RAD 0.03125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0 APEX 0.734531 0.125 0 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0 APEX 0.625 0.234531 0 RAD 0.0078125 + txt156 +TEXDEF txt156 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.0154687 APEX 0.625 0.125 0.109531 RAD 0.0078125 + txt156 +TEXDEF txt157 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.125 RAD 0.03125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.125 APEX 0.734531 0.125 0.125 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.125 APEX 0.625 0.234531 0.125 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.140469 APEX 0.625 0.125 0.234531 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.25 RAD 0.03125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.25 APEX 0.734531 0.125 0.25 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.25 APEX 0.625 0.234531 0.25 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.265469 APEX 0.625 0.125 0.359531 RAD 0.0078125 + txt157 +TEXDEF txt157 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.375 RAD 0.03125 + txt157 +TEXDEF txt157 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.375 APEX 0.734531 0.125 0.375 RAD 0.0078125 + txt157 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.375 APEX 0.625 0.234531 0.375 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.390469 APEX 0.625 0.125 0.484531 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.5 RAD 0.03125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.5 APEX 0.734531 0.125 0.5 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.5 APEX 0.625 0.234531 0.5 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.515469 APEX 0.625 0.125 0.609531 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.625 RAD 0.03125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.625 APEX 0.734531 0.125 0.625 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.625 APEX 0.625 0.234531 0.625 RAD 0.0078125 + txt158 +TEXDEF txt158 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.640469 APEX 0.625 0.125 0.734531 RAD 0.0078125 + txt158 +TEXDEF txt159 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.75 RAD 0.03125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.75 APEX 0.734531 0.125 0.75 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.75 APEX 0.625 0.234531 0.75 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.765469 APEX 0.625 0.125 0.859531 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 0.875 RAD 0.03125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 0.875 APEX 0.734531 0.125 0.875 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 0.875 APEX 0.625 0.234531 0.875 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.125 0.890469 APEX 0.625 0.125 0.984531 RAD 0.0078125 + txt159 +TEXDEF txt159 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.125 1 RAD 0.03125 + txt159 +TEXDEF txt159 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.125 1 APEX 0.734531 0.125 1 RAD 0.0078125 + txt159 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.140469 1 APEX 0.625 0.234531 1 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0 RAD 0.03125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0 APEX 0.734531 0.25 0 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0 APEX 0.625 0.359531 0 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.0154687 APEX 0.625 0.25 0.109531 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.125 RAD 0.03125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.125 APEX 0.734531 0.25 0.125 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.125 APEX 0.625 0.359531 0.125 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.140469 APEX 0.625 0.25 0.234531 RAD 0.0078125 + txt160 +TEXDEF txt160 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.25 RAD 0.03125 + txt160 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.25 APEX 0.734531 0.25 0.25 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.25 APEX 0.625 0.359531 0.25 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.265469 APEX 0.625 0.25 0.359531 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.375 RAD 0.03125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.375 APEX 0.734531 0.25 0.375 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.375 APEX 0.625 0.359531 0.375 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.390469 APEX 0.625 0.25 0.484531 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.5 RAD 0.03125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.5 APEX 0.734531 0.25 0.5 RAD 0.0078125 + txt161 +TEXDEF txt161 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.5 APEX 0.625 0.359531 0.5 RAD 0.0078125 + txt161 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.515469 APEX 0.625 0.25 0.609531 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.625 RAD 0.03125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.625 APEX 0.734531 0.25 0.625 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.625 APEX 0.625 0.359531 0.625 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.640469 APEX 0.625 0.25 0.734531 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.75 RAD 0.03125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.75 APEX 0.734531 0.25 0.75 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.75 APEX 0.625 0.359531 0.75 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.765469 APEX 0.625 0.25 0.859531 RAD 0.0078125 + txt162 +TEXDEF txt162 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 0.875 RAD 0.03125 + txt162 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 0.875 APEX 0.734531 0.25 0.875 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 0.875 APEX 0.625 0.359531 0.875 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.25 0.890469 APEX 0.625 0.25 0.984531 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.25 1 RAD 0.03125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.25 1 APEX 0.734531 0.25 1 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.265469 1 APEX 0.625 0.359531 1 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0 RAD 0.03125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0 APEX 0.734531 0.375 0 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0 APEX 0.625 0.484531 0 RAD 0.0078125 + txt163 +TEXDEF txt163 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.0154687 APEX 0.625 0.375 0.109531 RAD 0.0078125 + txt163 +TEXDEF txt164 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.125 RAD 0.03125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.125 APEX 0.734531 0.375 0.125 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.125 APEX 0.625 0.484531 0.125 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.140469 APEX 0.625 0.375 0.234531 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.25 RAD 0.03125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.25 APEX 0.734531 0.375 0.25 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.25 APEX 0.625 0.484531 0.25 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.265469 APEX 0.625 0.375 0.359531 RAD 0.0078125 + txt164 +TEXDEF txt164 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.375 RAD 0.03125 + txt164 +TEXDEF txt164 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.375 APEX 0.734531 0.375 0.375 RAD 0.0078125 + txt164 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.375 APEX 0.625 0.484531 0.375 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.390469 APEX 0.625 0.375 0.484531 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.5 RAD 0.03125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.5 APEX 0.734531 0.375 0.5 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.5 APEX 0.625 0.484531 0.5 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.515469 APEX 0.625 0.375 0.609531 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.625 RAD 0.03125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.625 APEX 0.734531 0.375 0.625 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.625 APEX 0.625 0.484531 0.625 RAD 0.0078125 + txt165 +TEXDEF txt165 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.640469 APEX 0.625 0.375 0.734531 RAD 0.0078125 + txt165 +TEXDEF txt166 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.75 RAD 0.03125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.75 APEX 0.734531 0.375 0.75 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.75 APEX 0.625 0.484531 0.75 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.765469 APEX 0.625 0.375 0.859531 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 0.875 RAD 0.03125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 0.875 APEX 0.734531 0.375 0.875 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 0.875 APEX 0.625 0.484531 0.875 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.375 0.890469 APEX 0.625 0.375 0.984531 RAD 0.0078125 + txt166 +TEXDEF txt166 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.375 1 RAD 0.03125 + txt166 +TEXDEF txt166 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.375 1 APEX 0.734531 0.375 1 RAD 0.0078125 + txt166 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.390469 1 APEX 0.625 0.484531 1 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0 RAD 0.03125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0 APEX 0.734531 0.5 0 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0 APEX 0.625 0.609531 0 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.0154687 APEX 0.625 0.5 0.109531 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.125 RAD 0.03125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.125 APEX 0.734531 0.5 0.125 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.125 APEX 0.625 0.609531 0.125 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.140469 APEX 0.625 0.5 0.234531 RAD 0.0078125 + txt167 +TEXDEF txt167 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.25 RAD 0.03125 + txt167 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.25 APEX 0.734531 0.5 0.25 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.25 APEX 0.625 0.609531 0.25 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.265469 APEX 0.625 0.5 0.359531 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.375 RAD 0.03125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.375 APEX 0.734531 0.5 0.375 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.375 APEX 0.625 0.609531 0.375 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.390469 APEX 0.625 0.5 0.484531 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.5 RAD 0.03125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.5 APEX 0.734531 0.5 0.5 RAD 0.0078125 + txt168 +TEXDEF txt168 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.5 APEX 0.625 0.609531 0.5 RAD 0.0078125 + txt168 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.515469 APEX 0.625 0.5 0.609531 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.625 RAD 0.03125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.625 APEX 0.734531 0.5 0.625 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.625 APEX 0.625 0.609531 0.625 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.640469 APEX 0.625 0.5 0.734531 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.75 RAD 0.03125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.75 APEX 0.734531 0.5 0.75 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.75 APEX 0.625 0.609531 0.75 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.765469 APEX 0.625 0.5 0.859531 RAD 0.0078125 + txt169 +TEXDEF txt169 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 0.875 RAD 0.03125 + txt169 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 0.875 APEX 0.734531 0.5 0.875 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 0.875 APEX 0.625 0.609531 0.875 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.5 0.890469 APEX 0.625 0.5 0.984531 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.5 1 RAD 0.03125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.5 1 APEX 0.734531 0.5 1 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.515469 1 APEX 0.625 0.609531 1 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0 RAD 0.03125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0 APEX 0.734531 0.625 0 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0 APEX 0.625 0.734531 0 RAD 0.0078125 + txt170 +TEXDEF txt170 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.0154687 APEX 0.625 0.625 0.109531 RAD 0.0078125 + txt170 +TEXDEF txt171 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.125 RAD 0.03125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.125 APEX 0.734531 0.625 0.125 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.125 APEX 0.625 0.734531 0.125 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.140469 APEX 0.625 0.625 0.234531 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.25 RAD 0.03125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.25 APEX 0.734531 0.625 0.25 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.25 APEX 0.625 0.734531 0.25 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.265469 APEX 0.625 0.625 0.359531 RAD 0.0078125 + txt171 +TEXDEF txt171 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.375 RAD 0.03125 + txt171 +TEXDEF txt171 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.375 APEX 0.734531 0.625 0.375 RAD 0.0078125 + txt171 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.375 APEX 0.625 0.734531 0.375 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.390469 APEX 0.625 0.625 0.484531 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.5 RAD 0.03125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.5 APEX 0.734531 0.625 0.5 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.5 APEX 0.625 0.734531 0.5 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.515469 APEX 0.625 0.625 0.609531 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.625 RAD 0.03125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.625 APEX 0.734531 0.625 0.625 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.625 APEX 0.625 0.734531 0.625 RAD 0.0078125 + txt172 +TEXDEF txt172 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.640469 APEX 0.625 0.625 0.734531 RAD 0.0078125 + txt172 +TEXDEF txt173 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.75 RAD 0.03125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.75 APEX 0.734531 0.625 0.75 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.75 APEX 0.625 0.734531 0.75 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.765469 APEX 0.625 0.625 0.859531 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 0.875 RAD 0.03125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 0.875 APEX 0.734531 0.625 0.875 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 0.875 APEX 0.625 0.734531 0.875 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.625 0.890469 APEX 0.625 0.625 0.984531 RAD 0.0078125 + txt173 +TEXDEF txt173 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.625 1 RAD 0.03125 + txt173 +TEXDEF txt173 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.625 1 APEX 0.734531 0.625 1 RAD 0.0078125 + txt173 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.640469 1 APEX 0.625 0.734531 1 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0 RAD 0.03125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0 APEX 0.734531 0.75 0 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0 APEX 0.625 0.859531 0 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.0154687 APEX 0.625 0.75 0.109531 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.125 RAD 0.03125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.125 APEX 0.734531 0.75 0.125 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.125 APEX 0.625 0.859531 0.125 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.140469 APEX 0.625 0.75 0.234531 RAD 0.0078125 + txt174 +TEXDEF txt174 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.25 RAD 0.03125 + txt174 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.25 APEX 0.734531 0.75 0.25 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.25 APEX 0.625 0.859531 0.25 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.265469 APEX 0.625 0.75 0.359531 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.375 RAD 0.03125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.375 APEX 0.734531 0.75 0.375 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.375 APEX 0.625 0.859531 0.375 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.390469 APEX 0.625 0.75 0.484531 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.5 RAD 0.03125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.5 APEX 0.734531 0.75 0.5 RAD 0.0078125 + txt175 +TEXDEF txt175 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.5 APEX 0.625 0.859531 0.5 RAD 0.0078125 + txt175 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.515469 APEX 0.625 0.75 0.609531 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.625 RAD 0.03125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.625 APEX 0.734531 0.75 0.625 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.625 APEX 0.625 0.859531 0.625 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.640469 APEX 0.625 0.75 0.734531 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.75 RAD 0.03125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.75 APEX 0.734531 0.75 0.75 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.75 APEX 0.625 0.859531 0.75 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.765469 APEX 0.625 0.75 0.859531 RAD 0.0078125 + txt176 +TEXDEF txt176 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 0.875 RAD 0.03125 + txt176 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 0.875 APEX 0.734531 0.75 0.875 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 0.875 APEX 0.625 0.859531 0.875 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.75 0.890469 APEX 0.625 0.75 0.984531 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.75 1 RAD 0.03125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.75 1 APEX 0.734531 0.75 1 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.765469 1 APEX 0.625 0.859531 1 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0 RAD 0.03125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0 APEX 0.734531 0.875 0 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0 APEX 0.625 0.984531 0 RAD 0.0078125 + txt177 +TEXDEF txt177 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.0154687 APEX 0.625 0.875 0.109531 RAD 0.0078125 + txt177 +TEXDEF txt178 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.125 RAD 0.03125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.125 APEX 0.734531 0.875 0.125 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.125 APEX 0.625 0.984531 0.125 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.140469 APEX 0.625 0.875 0.234531 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.25 RAD 0.03125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.25 APEX 0.734531 0.875 0.25 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.25 APEX 0.625 0.984531 0.25 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.265469 APEX 0.625 0.875 0.359531 RAD 0.0078125 + txt178 +TEXDEF txt178 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.375 RAD 0.03125 + txt178 +TEXDEF txt178 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.375 APEX 0.734531 0.875 0.375 RAD 0.0078125 + txt178 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.375 APEX 0.625 0.984531 0.375 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.390469 APEX 0.625 0.875 0.484531 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.5 RAD 0.03125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.5 APEX 0.734531 0.875 0.5 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.5 APEX 0.625 0.984531 0.5 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.515469 APEX 0.625 0.875 0.609531 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.625 RAD 0.03125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.625 APEX 0.734531 0.875 0.625 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.625 APEX 0.625 0.984531 0.625 RAD 0.0078125 + txt179 +TEXDEF txt179 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.640469 APEX 0.625 0.875 0.734531 RAD 0.0078125 + txt179 +TEXDEF txt180 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.75 RAD 0.03125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.75 APEX 0.734531 0.875 0.75 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.75 APEX 0.625 0.984531 0.75 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.765469 APEX 0.625 0.875 0.859531 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 0.875 RAD 0.03125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 0.875 APEX 0.734531 0.875 0.875 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 0.875 APEX 0.625 0.984531 0.875 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.875 0.890469 APEX 0.625 0.875 0.984531 RAD 0.0078125 + txt180 +TEXDEF txt180 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 0.875 1 RAD 0.03125 + txt180 +TEXDEF txt180 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 0.875 1 APEX 0.734531 0.875 1 RAD 0.0078125 + txt180 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 0.890469 1 APEX 0.625 0.984531 1 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0 RAD 0.03125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0 APEX 0.734531 1 0 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.0154687 APEX 0.625 1 0.109531 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.125 RAD 0.03125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.125 APEX 0.734531 1 0.125 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.140469 APEX 0.625 1 0.234531 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.25 RAD 0.03125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.25 APEX 0.734531 1 0.25 RAD 0.0078125 + txt181 +TEXDEF txt181 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.265469 APEX 0.625 1 0.359531 RAD 0.0078125 + txt181 +TEXDEF txt182 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.375 RAD 0.03125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.375 APEX 0.734531 1 0.375 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.390469 APEX 0.625 1 0.484531 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.5 RAD 0.03125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.5 APEX 0.734531 1 0.5 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.515469 APEX 0.625 1 0.609531 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.625 RAD 0.03125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.625 APEX 0.734531 1 0.625 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.640469 APEX 0.625 1 0.734531 RAD 0.0078125 + txt182 +TEXDEF txt182 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.75 RAD 0.03125 + txt182 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.75 APEX 0.734531 1 0.75 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.765469 APEX 0.625 1 0.859531 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 0.875 RAD 0.03125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 0.875 APEX 0.734531 1 0.875 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.625 1 0.890469 APEX 0.625 1 0.984531 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.625 1 1 RAD 0.03125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.640469 1 1 APEX 0.734531 1 1 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0 RAD 0.03125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0 APEX 0.859531 0 0 RAD 0.0078125 + txt183 +TEXDEF txt183 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0 APEX 0.75 0.109531 0 RAD 0.0078125 + txt183 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.0154687 APEX 0.75 0 0.109531 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.125 RAD 0.03125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.125 APEX 0.859531 0 0.125 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.125 APEX 0.75 0.109531 0.125 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.140469 APEX 0.75 0 0.234531 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.25 RAD 0.03125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.25 APEX 0.859531 0 0.25 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.25 APEX 0.75 0.109531 0.25 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.265469 APEX 0.75 0 0.359531 RAD 0.0078125 + txt184 +TEXDEF txt184 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.375 RAD 0.03125 + txt184 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.375 APEX 0.859531 0 0.375 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.375 APEX 0.75 0.109531 0.375 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.390469 APEX 0.75 0 0.484531 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.5 RAD 0.03125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.5 APEX 0.859531 0 0.5 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.5 APEX 0.75 0.109531 0.5 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.515469 APEX 0.75 0 0.609531 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.625 RAD 0.03125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.625 APEX 0.859531 0 0.625 RAD 0.0078125 + txt185 +TEXDEF txt185 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.625 APEX 0.75 0.109531 0.625 RAD 0.0078125 + txt185 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.640469 APEX 0.75 0 0.734531 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.75 RAD 0.03125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.75 APEX 0.859531 0 0.75 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.75 APEX 0.75 0.109531 0.75 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.765469 APEX 0.75 0 0.859531 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 0.875 RAD 0.03125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 0.875 APEX 0.859531 0 0.875 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 0.875 APEX 0.75 0.109531 0.875 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0 0.890469 APEX 0.75 0 0.984531 RAD 0.0078125 + txt186 +TEXDEF txt186 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0 1 RAD 0.03125 + txt186 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0 1 APEX 0.859531 0 1 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.0154687 1 APEX 0.75 0.109531 1 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0 RAD 0.03125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0 APEX 0.859531 0.125 0 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0 APEX 0.75 0.234531 0 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.0154687 APEX 0.75 0.125 0.109531 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.125 RAD 0.03125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.125 APEX 0.859531 0.125 0.125 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.125 APEX 0.75 0.234531 0.125 RAD 0.0078125 + txt187 +TEXDEF txt187 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.140469 APEX 0.75 0.125 0.234531 RAD 0.0078125 + txt187 +TEXDEF txt188 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.25 RAD 0.03125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.25 APEX 0.859531 0.125 0.25 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.25 APEX 0.75 0.234531 0.25 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.265469 APEX 0.75 0.125 0.359531 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.375 RAD 0.03125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.375 APEX 0.859531 0.125 0.375 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.375 APEX 0.75 0.234531 0.375 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.390469 APEX 0.75 0.125 0.484531 RAD 0.0078125 + txt188 +TEXDEF txt188 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.5 RAD 0.03125 + txt188 +TEXDEF txt188 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.5 APEX 0.859531 0.125 0.5 RAD 0.0078125 + txt188 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.5 APEX 0.75 0.234531 0.5 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.515469 APEX 0.75 0.125 0.609531 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.625 RAD 0.03125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.625 APEX 0.859531 0.125 0.625 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.625 APEX 0.75 0.234531 0.625 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.640469 APEX 0.75 0.125 0.734531 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.75 RAD 0.03125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.75 APEX 0.859531 0.125 0.75 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.75 APEX 0.75 0.234531 0.75 RAD 0.0078125 + txt189 +TEXDEF txt189 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.765469 APEX 0.75 0.125 0.859531 RAD 0.0078125 + txt189 +TEXDEF txt190 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 0.875 RAD 0.03125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 0.875 APEX 0.859531 0.125 0.875 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 0.875 APEX 0.75 0.234531 0.875 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.125 0.890469 APEX 0.75 0.125 0.984531 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.125 1 RAD 0.03125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.125 1 APEX 0.859531 0.125 1 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.140469 1 APEX 0.75 0.234531 1 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0 RAD 0.03125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0 APEX 0.859531 0.25 0 RAD 0.0078125 + txt190 +TEXDEF txt190 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0 APEX 0.75 0.359531 0 RAD 0.0078125 + txt190 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.0154687 APEX 0.75 0.25 0.109531 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.125 RAD 0.03125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.125 APEX 0.859531 0.25 0.125 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.125 APEX 0.75 0.359531 0.125 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.140469 APEX 0.75 0.25 0.234531 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.25 RAD 0.03125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.25 APEX 0.859531 0.25 0.25 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.25 APEX 0.75 0.359531 0.25 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.265469 APEX 0.75 0.25 0.359531 RAD 0.0078125 + txt191 +TEXDEF txt191 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.375 RAD 0.03125 + txt191 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.375 APEX 0.859531 0.25 0.375 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.375 APEX 0.75 0.359531 0.375 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.390469 APEX 0.75 0.25 0.484531 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.5 RAD 0.03125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.5 APEX 0.859531 0.25 0.5 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.5 APEX 0.75 0.359531 0.5 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.515469 APEX 0.75 0.25 0.609531 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.625 RAD 0.03125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.625 APEX 0.859531 0.25 0.625 RAD 0.0078125 + txt192 +TEXDEF txt192 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.625 APEX 0.75 0.359531 0.625 RAD 0.0078125 + txt192 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.640469 APEX 0.75 0.25 0.734531 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.75 RAD 0.03125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.75 APEX 0.859531 0.25 0.75 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.75 APEX 0.75 0.359531 0.75 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.765469 APEX 0.75 0.25 0.859531 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 0.875 RAD 0.03125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 0.875 APEX 0.859531 0.25 0.875 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 0.875 APEX 0.75 0.359531 0.875 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.25 0.890469 APEX 0.75 0.25 0.984531 RAD 0.0078125 + txt193 +TEXDEF txt193 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.25 1 RAD 0.03125 + txt193 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.25 1 APEX 0.859531 0.25 1 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.265469 1 APEX 0.75 0.359531 1 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0 RAD 0.03125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0 APEX 0.859531 0.375 0 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0 APEX 0.75 0.484531 0 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.0154687 APEX 0.75 0.375 0.109531 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.125 RAD 0.03125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.125 APEX 0.859531 0.375 0.125 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.125 APEX 0.75 0.484531 0.125 RAD 0.0078125 + txt194 +TEXDEF txt194 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.140469 APEX 0.75 0.375 0.234531 RAD 0.0078125 + txt194 +TEXDEF txt195 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.25 RAD 0.03125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.25 APEX 0.859531 0.375 0.25 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.25 APEX 0.75 0.484531 0.25 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.265469 APEX 0.75 0.375 0.359531 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.375 RAD 0.03125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.375 APEX 0.859531 0.375 0.375 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.375 APEX 0.75 0.484531 0.375 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.390469 APEX 0.75 0.375 0.484531 RAD 0.0078125 + txt195 +TEXDEF txt195 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.5 RAD 0.03125 + txt195 +TEXDEF txt195 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.5 APEX 0.859531 0.375 0.5 RAD 0.0078125 + txt195 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.5 APEX 0.75 0.484531 0.5 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.515469 APEX 0.75 0.375 0.609531 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.625 RAD 0.03125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.625 APEX 0.859531 0.375 0.625 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.625 APEX 0.75 0.484531 0.625 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.640469 APEX 0.75 0.375 0.734531 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.75 RAD 0.03125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.75 APEX 0.859531 0.375 0.75 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.75 APEX 0.75 0.484531 0.75 RAD 0.0078125 + txt196 +TEXDEF txt196 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.765469 APEX 0.75 0.375 0.859531 RAD 0.0078125 + txt196 +TEXDEF txt197 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 0.875 RAD 0.03125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 0.875 APEX 0.859531 0.375 0.875 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 0.875 APEX 0.75 0.484531 0.875 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.375 0.890469 APEX 0.75 0.375 0.984531 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.375 1 RAD 0.03125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.375 1 APEX 0.859531 0.375 1 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.390469 1 APEX 0.75 0.484531 1 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0 RAD 0.03125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0 APEX 0.859531 0.5 0 RAD 0.0078125 + txt197 +TEXDEF txt197 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0 APEX 0.75 0.609531 0 RAD 0.0078125 + txt197 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.0154687 APEX 0.75 0.5 0.109531 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.125 RAD 0.03125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.125 APEX 0.859531 0.5 0.125 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.125 APEX 0.75 0.609531 0.125 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.140469 APEX 0.75 0.5 0.234531 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.25 RAD 0.03125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.25 APEX 0.859531 0.5 0.25 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.25 APEX 0.75 0.609531 0.25 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.265469 APEX 0.75 0.5 0.359531 RAD 0.0078125 + txt198 +TEXDEF txt198 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.375 RAD 0.03125 + txt198 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.375 APEX 0.859531 0.5 0.375 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.375 APEX 0.75 0.609531 0.375 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.390469 APEX 0.75 0.5 0.484531 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.5 RAD 0.03125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.5 APEX 0.859531 0.5 0.5 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.5 APEX 0.75 0.609531 0.5 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.515469 APEX 0.75 0.5 0.609531 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.625 RAD 0.03125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.625 APEX 0.859531 0.5 0.625 RAD 0.0078125 + txt199 +TEXDEF txt199 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.625 APEX 0.75 0.609531 0.625 RAD 0.0078125 + txt199 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.640469 APEX 0.75 0.5 0.734531 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.75 RAD 0.03125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.75 APEX 0.859531 0.5 0.75 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.75 APEX 0.75 0.609531 0.75 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.765469 APEX 0.75 0.5 0.859531 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 0.875 RAD 0.03125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 0.875 APEX 0.859531 0.5 0.875 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 0.875 APEX 0.75 0.609531 0.875 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.5 0.890469 APEX 0.75 0.5 0.984531 RAD 0.0078125 + txt200 +TEXDEF txt200 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.5 1 RAD 0.03125 + txt200 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.5 1 APEX 0.859531 0.5 1 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.515469 1 APEX 0.75 0.609531 1 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0 RAD 0.03125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0 APEX 0.859531 0.625 0 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0 APEX 0.75 0.734531 0 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.0154687 APEX 0.75 0.625 0.109531 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.125 RAD 0.03125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.125 APEX 0.859531 0.625 0.125 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.125 APEX 0.75 0.734531 0.125 RAD 0.0078125 + txt201 +TEXDEF txt201 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.140469 APEX 0.75 0.625 0.234531 RAD 0.0078125 + txt201 +TEXDEF txt202 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.25 RAD 0.03125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.25 APEX 0.859531 0.625 0.25 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.25 APEX 0.75 0.734531 0.25 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.265469 APEX 0.75 0.625 0.359531 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.375 RAD 0.03125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.375 APEX 0.859531 0.625 0.375 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.375 APEX 0.75 0.734531 0.375 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.390469 APEX 0.75 0.625 0.484531 RAD 0.0078125 + txt202 +TEXDEF txt202 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.5 RAD 0.03125 + txt202 +TEXDEF txt202 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.5 APEX 0.859531 0.625 0.5 RAD 0.0078125 + txt202 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.5 APEX 0.75 0.734531 0.5 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.515469 APEX 0.75 0.625 0.609531 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.625 RAD 0.03125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.625 APEX 0.859531 0.625 0.625 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.625 APEX 0.75 0.734531 0.625 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.640469 APEX 0.75 0.625 0.734531 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.75 RAD 0.03125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.75 APEX 0.859531 0.625 0.75 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.75 APEX 0.75 0.734531 0.75 RAD 0.0078125 + txt203 +TEXDEF txt203 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.765469 APEX 0.75 0.625 0.859531 RAD 0.0078125 + txt203 +TEXDEF txt204 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 0.875 RAD 0.03125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 0.875 APEX 0.859531 0.625 0.875 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 0.875 APEX 0.75 0.734531 0.875 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.625 0.890469 APEX 0.75 0.625 0.984531 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.625 1 RAD 0.03125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.625 1 APEX 0.859531 0.625 1 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.640469 1 APEX 0.75 0.734531 1 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0 RAD 0.03125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0 APEX 0.859531 0.75 0 RAD 0.0078125 + txt204 +TEXDEF txt204 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0 APEX 0.75 0.859531 0 RAD 0.0078125 + txt204 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.0154687 APEX 0.75 0.75 0.109531 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.125 RAD 0.03125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.125 APEX 0.859531 0.75 0.125 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.125 APEX 0.75 0.859531 0.125 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.140469 APEX 0.75 0.75 0.234531 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.25 RAD 0.03125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.25 APEX 0.859531 0.75 0.25 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.25 APEX 0.75 0.859531 0.25 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.265469 APEX 0.75 0.75 0.359531 RAD 0.0078125 + txt205 +TEXDEF txt205 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.375 RAD 0.03125 + txt205 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.375 APEX 0.859531 0.75 0.375 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.375 APEX 0.75 0.859531 0.375 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.390469 APEX 0.75 0.75 0.484531 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.5 RAD 0.03125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.5 APEX 0.859531 0.75 0.5 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.5 APEX 0.75 0.859531 0.5 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.515469 APEX 0.75 0.75 0.609531 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.625 RAD 0.03125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.625 APEX 0.859531 0.75 0.625 RAD 0.0078125 + txt206 +TEXDEF txt206 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.625 APEX 0.75 0.859531 0.625 RAD 0.0078125 + txt206 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.640469 APEX 0.75 0.75 0.734531 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.75 RAD 0.03125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.75 APEX 0.859531 0.75 0.75 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.75 APEX 0.75 0.859531 0.75 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.765469 APEX 0.75 0.75 0.859531 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 0.875 RAD 0.03125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 0.875 APEX 0.859531 0.75 0.875 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 0.875 APEX 0.75 0.859531 0.875 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.75 0.890469 APEX 0.75 0.75 0.984531 RAD 0.0078125 + txt207 +TEXDEF txt207 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.75 1 RAD 0.03125 + txt207 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.75 1 APEX 0.859531 0.75 1 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.765469 1 APEX 0.75 0.859531 1 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0 RAD 0.03125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0 APEX 0.859531 0.875 0 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0 APEX 0.75 0.984531 0 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.0154687 APEX 0.75 0.875 0.109531 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.125 RAD 0.03125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.125 APEX 0.859531 0.875 0.125 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.125 APEX 0.75 0.984531 0.125 RAD 0.0078125 + txt208 +TEXDEF txt208 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.140469 APEX 0.75 0.875 0.234531 RAD 0.0078125 + txt208 +TEXDEF txt209 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.25 RAD 0.03125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.25 APEX 0.859531 0.875 0.25 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.25 APEX 0.75 0.984531 0.25 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.265469 APEX 0.75 0.875 0.359531 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.375 RAD 0.03125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.375 APEX 0.859531 0.875 0.375 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.375 APEX 0.75 0.984531 0.375 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.390469 APEX 0.75 0.875 0.484531 RAD 0.0078125 + txt209 +TEXDEF txt209 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.5 RAD 0.03125 + txt209 +TEXDEF txt209 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.5 APEX 0.859531 0.875 0.5 RAD 0.0078125 + txt209 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.5 APEX 0.75 0.984531 0.5 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.515469 APEX 0.75 0.875 0.609531 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.625 RAD 0.03125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.625 APEX 0.859531 0.875 0.625 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.625 APEX 0.75 0.984531 0.625 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.640469 APEX 0.75 0.875 0.734531 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.75 RAD 0.03125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.75 APEX 0.859531 0.875 0.75 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.75 APEX 0.75 0.984531 0.75 RAD 0.0078125 + txt210 +TEXDEF txt210 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.765469 APEX 0.75 0.875 0.859531 RAD 0.0078125 + txt210 +TEXDEF txt211 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 0.875 RAD 0.03125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 0.875 APEX 0.859531 0.875 0.875 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 0.875 APEX 0.75 0.984531 0.875 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.875 0.890469 APEX 0.75 0.875 0.984531 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 0.875 1 RAD 0.03125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 0.875 1 APEX 0.859531 0.875 1 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 0.890469 1 APEX 0.75 0.984531 1 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0 RAD 0.03125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0 APEX 0.859531 1 0 RAD 0.0078125 + txt211 +TEXDEF txt211 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.0154687 APEX 0.75 1 0.109531 RAD 0.0078125 + txt211 +TEXDEF txt212 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.125 RAD 0.03125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.125 APEX 0.859531 1 0.125 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.140469 APEX 0.75 1 0.234531 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.25 RAD 0.03125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.25 APEX 0.859531 1 0.25 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.265469 APEX 0.75 1 0.359531 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.375 RAD 0.03125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.375 APEX 0.859531 1 0.375 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.390469 APEX 0.75 1 0.484531 RAD 0.0078125 + txt212 +TEXDEF txt212 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.5 RAD 0.03125 + txt212 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.5 APEX 0.859531 1 0.5 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.515469 APEX 0.75 1 0.609531 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.625 RAD 0.03125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.625 APEX 0.859531 1 0.625 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.640469 APEX 0.75 1 0.734531 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.75 RAD 0.03125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.75 APEX 0.859531 1 0.75 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.765469 APEX 0.75 1 0.859531 RAD 0.0078125 + txt213 +TEXDEF txt213 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 0.875 RAD 0.03125 + txt213 +TEXDEF txt213 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 0.875 APEX 0.859531 1 0.875 RAD 0.0078125 + txt213 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.75 1 0.890469 APEX 0.75 1 0.984531 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.75 1 1 RAD 0.03125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.765469 1 1 APEX 0.859531 1 1 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0 RAD 0.03125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0 APEX 0.984531 0 0 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0 APEX 0.875 0.109531 0 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.0154687 APEX 0.875 0 0.109531 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.125 RAD 0.03125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.125 APEX 0.984531 0 0.125 RAD 0.0078125 + txt214 +TEXDEF txt214 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.125 APEX 0.875 0.109531 0.125 RAD 0.0078125 + txt214 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.140469 APEX 0.875 0 0.234531 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.25 RAD 0.03125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.25 APEX 0.984531 0 0.25 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.25 APEX 0.875 0.109531 0.25 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.265469 APEX 0.875 0 0.359531 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.375 RAD 0.03125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.375 APEX 0.984531 0 0.375 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.375 APEX 0.875 0.109531 0.375 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.390469 APEX 0.875 0 0.484531 RAD 0.0078125 + txt215 +TEXDEF txt215 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.5 RAD 0.03125 + txt215 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.5 APEX 0.984531 0 0.5 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.5 APEX 0.875 0.109531 0.5 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.515469 APEX 0.875 0 0.609531 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.625 RAD 0.03125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.625 APEX 0.984531 0 0.625 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.625 APEX 0.875 0.109531 0.625 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.640469 APEX 0.875 0 0.734531 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.75 RAD 0.03125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.75 APEX 0.984531 0 0.75 RAD 0.0078125 + txt216 +TEXDEF txt216 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.75 APEX 0.875 0.109531 0.75 RAD 0.0078125 + txt216 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.765469 APEX 0.875 0 0.859531 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 0.875 RAD 0.03125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 0.875 APEX 0.984531 0 0.875 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 0.875 APEX 0.875 0.109531 0.875 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0 0.890469 APEX 0.875 0 0.984531 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0 1 RAD 0.03125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0 1 APEX 0.984531 0 1 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.0154687 1 APEX 0.875 0.109531 1 RAD 0.0078125 + txt217 +TEXDEF txt217 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0 RAD 0.03125 + txt217 +TEXDEF txt217 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0 APEX 0.984531 0.125 0 RAD 0.0078125 + txt217 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0 APEX 0.875 0.234531 0 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.0154687 APEX 0.875 0.125 0.109531 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.125 RAD 0.03125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.125 APEX 0.984531 0.125 0.125 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.125 APEX 0.875 0.234531 0.125 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.140469 APEX 0.875 0.125 0.234531 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.25 RAD 0.03125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.25 APEX 0.984531 0.125 0.25 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.25 APEX 0.875 0.234531 0.25 RAD 0.0078125 + txt218 +TEXDEF txt218 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.265469 APEX 0.875 0.125 0.359531 RAD 0.0078125 + txt218 +TEXDEF txt219 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.375 RAD 0.03125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.375 APEX 0.984531 0.125 0.375 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.375 APEX 0.875 0.234531 0.375 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.390469 APEX 0.875 0.125 0.484531 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.5 RAD 0.03125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.5 APEX 0.984531 0.125 0.5 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.5 APEX 0.875 0.234531 0.5 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.515469 APEX 0.875 0.125 0.609531 RAD 0.0078125 + txt219 +TEXDEF txt219 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.625 RAD 0.03125 + txt219 +TEXDEF txt219 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.625 APEX 0.984531 0.125 0.625 RAD 0.0078125 + txt219 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.625 APEX 0.875 0.234531 0.625 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.640469 APEX 0.875 0.125 0.734531 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.75 RAD 0.03125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.75 APEX 0.984531 0.125 0.75 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.75 APEX 0.875 0.234531 0.75 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.765469 APEX 0.875 0.125 0.859531 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 0.875 RAD 0.03125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 0.875 APEX 0.984531 0.125 0.875 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 0.875 APEX 0.875 0.234531 0.875 RAD 0.0078125 + txt220 +TEXDEF txt220 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.125 0.890469 APEX 0.875 0.125 0.984531 RAD 0.0078125 + txt220 +TEXDEF txt221 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.125 1 RAD 0.03125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.125 1 APEX 0.984531 0.125 1 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.140469 1 APEX 0.875 0.234531 1 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0 RAD 0.03125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0 APEX 0.984531 0.25 0 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0 APEX 0.875 0.359531 0 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.0154687 APEX 0.875 0.25 0.109531 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.125 RAD 0.03125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.125 APEX 0.984531 0.25 0.125 RAD 0.0078125 + txt221 +TEXDEF txt221 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.125 APEX 0.875 0.359531 0.125 RAD 0.0078125 + txt221 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.140469 APEX 0.875 0.25 0.234531 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.25 RAD 0.03125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.25 APEX 0.984531 0.25 0.25 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.25 APEX 0.875 0.359531 0.25 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.265469 APEX 0.875 0.25 0.359531 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.375 RAD 0.03125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.375 APEX 0.984531 0.25 0.375 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.375 APEX 0.875 0.359531 0.375 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.390469 APEX 0.875 0.25 0.484531 RAD 0.0078125 + txt222 +TEXDEF txt222 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.5 RAD 0.03125 + txt222 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.5 APEX 0.984531 0.25 0.5 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.5 APEX 0.875 0.359531 0.5 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.515469 APEX 0.875 0.25 0.609531 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.625 RAD 0.03125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.625 APEX 0.984531 0.25 0.625 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.625 APEX 0.875 0.359531 0.625 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.640469 APEX 0.875 0.25 0.734531 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.75 RAD 0.03125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.75 APEX 0.984531 0.25 0.75 RAD 0.0078125 + txt223 +TEXDEF txt223 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.75 APEX 0.875 0.359531 0.75 RAD 0.0078125 + txt223 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.765469 APEX 0.875 0.25 0.859531 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 0.875 RAD 0.03125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 0.875 APEX 0.984531 0.25 0.875 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 0.875 APEX 0.875 0.359531 0.875 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.25 0.890469 APEX 0.875 0.25 0.984531 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.25 1 RAD 0.03125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.25 1 APEX 0.984531 0.25 1 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.265469 1 APEX 0.875 0.359531 1 RAD 0.0078125 + txt224 +TEXDEF txt224 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0 RAD 0.03125 + txt224 +TEXDEF txt224 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0 APEX 0.984531 0.375 0 RAD 0.0078125 + txt224 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0 APEX 0.875 0.484531 0 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.0154687 APEX 0.875 0.375 0.109531 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.125 RAD 0.03125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.125 APEX 0.984531 0.375 0.125 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.125 APEX 0.875 0.484531 0.125 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.140469 APEX 0.875 0.375 0.234531 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.25 RAD 0.03125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.25 APEX 0.984531 0.375 0.25 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.25 APEX 0.875 0.484531 0.25 RAD 0.0078125 + txt225 +TEXDEF txt225 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.265469 APEX 0.875 0.375 0.359531 RAD 0.0078125 + txt225 +TEXDEF txt226 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.375 RAD 0.03125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.375 APEX 0.984531 0.375 0.375 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.375 APEX 0.875 0.484531 0.375 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.390469 APEX 0.875 0.375 0.484531 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.5 RAD 0.03125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.5 APEX 0.984531 0.375 0.5 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.5 APEX 0.875 0.484531 0.5 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.515469 APEX 0.875 0.375 0.609531 RAD 0.0078125 + txt226 +TEXDEF txt226 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.625 RAD 0.03125 + txt226 +TEXDEF txt226 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.625 APEX 0.984531 0.375 0.625 RAD 0.0078125 + txt226 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.625 APEX 0.875 0.484531 0.625 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.640469 APEX 0.875 0.375 0.734531 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.75 RAD 0.03125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.75 APEX 0.984531 0.375 0.75 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.75 APEX 0.875 0.484531 0.75 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.765469 APEX 0.875 0.375 0.859531 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 0.875 RAD 0.03125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 0.875 APEX 0.984531 0.375 0.875 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 0.875 APEX 0.875 0.484531 0.875 RAD 0.0078125 + txt227 +TEXDEF txt227 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.375 0.890469 APEX 0.875 0.375 0.984531 RAD 0.0078125 + txt227 +TEXDEF txt228 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.375 1 RAD 0.03125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.375 1 APEX 0.984531 0.375 1 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.390469 1 APEX 0.875 0.484531 1 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0 RAD 0.03125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0 APEX 0.984531 0.5 0 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0 APEX 0.875 0.609531 0 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.0154687 APEX 0.875 0.5 0.109531 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.125 RAD 0.03125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.125 APEX 0.984531 0.5 0.125 RAD 0.0078125 + txt228 +TEXDEF txt228 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.125 APEX 0.875 0.609531 0.125 RAD 0.0078125 + txt228 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.140469 APEX 0.875 0.5 0.234531 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.25 RAD 0.03125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.25 APEX 0.984531 0.5 0.25 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.25 APEX 0.875 0.609531 0.25 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.265469 APEX 0.875 0.5 0.359531 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.375 RAD 0.03125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.375 APEX 0.984531 0.5 0.375 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.375 APEX 0.875 0.609531 0.375 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.390469 APEX 0.875 0.5 0.484531 RAD 0.0078125 + txt229 +TEXDEF txt229 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.5 RAD 0.03125 + txt229 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.5 APEX 0.984531 0.5 0.5 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.5 APEX 0.875 0.609531 0.5 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.515469 APEX 0.875 0.5 0.609531 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.625 RAD 0.03125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.625 APEX 0.984531 0.5 0.625 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.625 APEX 0.875 0.609531 0.625 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.640469 APEX 0.875 0.5 0.734531 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.75 RAD 0.03125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.75 APEX 0.984531 0.5 0.75 RAD 0.0078125 + txt230 +TEXDEF txt230 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.75 APEX 0.875 0.609531 0.75 RAD 0.0078125 + txt230 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.765469 APEX 0.875 0.5 0.859531 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 0.875 RAD 0.03125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 0.875 APEX 0.984531 0.5 0.875 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 0.875 APEX 0.875 0.609531 0.875 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.5 0.890469 APEX 0.875 0.5 0.984531 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.5 1 RAD 0.03125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.5 1 APEX 0.984531 0.5 1 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.515469 1 APEX 0.875 0.609531 1 RAD 0.0078125 + txt231 +TEXDEF txt231 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0 RAD 0.03125 + txt231 +TEXDEF txt231 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0 APEX 0.984531 0.625 0 RAD 0.0078125 + txt231 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0 APEX 0.875 0.734531 0 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.0154687 APEX 0.875 0.625 0.109531 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.125 RAD 0.03125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.125 APEX 0.984531 0.625 0.125 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.125 APEX 0.875 0.734531 0.125 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.140469 APEX 0.875 0.625 0.234531 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.25 RAD 0.03125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.25 APEX 0.984531 0.625 0.25 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.25 APEX 0.875 0.734531 0.25 RAD 0.0078125 + txt232 +TEXDEF txt232 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.265469 APEX 0.875 0.625 0.359531 RAD 0.0078125 + txt232 +TEXDEF txt233 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.375 RAD 0.03125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.375 APEX 0.984531 0.625 0.375 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.375 APEX 0.875 0.734531 0.375 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.390469 APEX 0.875 0.625 0.484531 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.5 RAD 0.03125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.5 APEX 0.984531 0.625 0.5 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.5 APEX 0.875 0.734531 0.5 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.515469 APEX 0.875 0.625 0.609531 RAD 0.0078125 + txt233 +TEXDEF txt233 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.625 RAD 0.03125 + txt233 +TEXDEF txt233 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.625 APEX 0.984531 0.625 0.625 RAD 0.0078125 + txt233 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.625 APEX 0.875 0.734531 0.625 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.640469 APEX 0.875 0.625 0.734531 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.75 RAD 0.03125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.75 APEX 0.984531 0.625 0.75 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.75 APEX 0.875 0.734531 0.75 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.765469 APEX 0.875 0.625 0.859531 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 0.875 RAD 0.03125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 0.875 APEX 0.984531 0.625 0.875 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 0.875 APEX 0.875 0.734531 0.875 RAD 0.0078125 + txt234 +TEXDEF txt234 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.625 0.890469 APEX 0.875 0.625 0.984531 RAD 0.0078125 + txt234 +TEXDEF txt235 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.625 1 RAD 0.03125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.625 1 APEX 0.984531 0.625 1 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.640469 1 APEX 0.875 0.734531 1 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0 RAD 0.03125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0 APEX 0.984531 0.75 0 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0 APEX 0.875 0.859531 0 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.0154687 APEX 0.875 0.75 0.109531 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.125 RAD 0.03125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.125 APEX 0.984531 0.75 0.125 RAD 0.0078125 + txt235 +TEXDEF txt235 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.125 APEX 0.875 0.859531 0.125 RAD 0.0078125 + txt235 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.140469 APEX 0.875 0.75 0.234531 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.25 RAD 0.03125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.25 APEX 0.984531 0.75 0.25 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.25 APEX 0.875 0.859531 0.25 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.265469 APEX 0.875 0.75 0.359531 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.375 RAD 0.03125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.375 APEX 0.984531 0.75 0.375 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.375 APEX 0.875 0.859531 0.375 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.390469 APEX 0.875 0.75 0.484531 RAD 0.0078125 + txt236 +TEXDEF txt236 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.5 RAD 0.03125 + txt236 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.5 APEX 0.984531 0.75 0.5 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.5 APEX 0.875 0.859531 0.5 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.515469 APEX 0.875 0.75 0.609531 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.625 RAD 0.03125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.625 APEX 0.984531 0.75 0.625 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.625 APEX 0.875 0.859531 0.625 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.640469 APEX 0.875 0.75 0.734531 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.75 RAD 0.03125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.75 APEX 0.984531 0.75 0.75 RAD 0.0078125 + txt237 +TEXDEF txt237 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.75 APEX 0.875 0.859531 0.75 RAD 0.0078125 + txt237 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.765469 APEX 0.875 0.75 0.859531 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 0.875 RAD 0.03125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 0.875 APEX 0.984531 0.75 0.875 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 0.875 APEX 0.875 0.859531 0.875 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.75 0.890469 APEX 0.875 0.75 0.984531 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.75 1 RAD 0.03125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.75 1 APEX 0.984531 0.75 1 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.765469 1 APEX 0.875 0.859531 1 RAD 0.0078125 + txt238 +TEXDEF txt238 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0 RAD 0.03125 + txt238 +TEXDEF txt238 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0 APEX 0.984531 0.875 0 RAD 0.0078125 + txt238 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0 APEX 0.875 0.984531 0 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.0154687 APEX 0.875 0.875 0.109531 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.125 RAD 0.03125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.125 APEX 0.984531 0.875 0.125 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.125 APEX 0.875 0.984531 0.125 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.140469 APEX 0.875 0.875 0.234531 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.25 RAD 0.03125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.25 APEX 0.984531 0.875 0.25 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.25 APEX 0.875 0.984531 0.25 RAD 0.0078125 + txt239 +TEXDEF txt239 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.265469 APEX 0.875 0.875 0.359531 RAD 0.0078125 + txt239 +TEXDEF txt240 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.375 RAD 0.03125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.375 APEX 0.984531 0.875 0.375 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.375 APEX 0.875 0.984531 0.375 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.390469 APEX 0.875 0.875 0.484531 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.5 RAD 0.03125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.5 APEX 0.984531 0.875 0.5 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.5 APEX 0.875 0.984531 0.5 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.515469 APEX 0.875 0.875 0.609531 RAD 0.0078125 + txt240 +TEXDEF txt240 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.625 RAD 0.03125 + txt240 +TEXDEF txt240 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.625 APEX 0.984531 0.875 0.625 RAD 0.0078125 + txt240 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.625 APEX 0.875 0.984531 0.625 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.640469 APEX 0.875 0.875 0.734531 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.75 RAD 0.03125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.75 APEX 0.984531 0.875 0.75 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.75 APEX 0.875 0.984531 0.75 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.765469 APEX 0.875 0.875 0.859531 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 0.875 RAD 0.03125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 0.875 APEX 0.984531 0.875 0.875 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 0.875 APEX 0.875 0.984531 0.875 RAD 0.0078125 + txt241 +TEXDEF txt241 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.875 0.890469 APEX 0.875 0.875 0.984531 RAD 0.0078125 + txt241 +TEXDEF txt242 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 0.875 1 RAD 0.03125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 0.875 1 APEX 0.984531 0.875 1 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 0.890469 1 APEX 0.875 0.984531 1 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0 RAD 0.03125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0 APEX 0.984531 1 0 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.0154687 APEX 0.875 1 0.109531 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.125 RAD 0.03125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.125 APEX 0.984531 1 0.125 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.140469 APEX 0.875 1 0.234531 RAD 0.0078125 + txt242 +TEXDEF txt242 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.25 RAD 0.03125 + txt242 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.25 APEX 0.984531 1 0.25 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.265469 APEX 0.875 1 0.359531 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.375 RAD 0.03125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.375 APEX 0.984531 1 0.375 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.390469 APEX 0.875 1 0.484531 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.5 RAD 0.03125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.5 APEX 0.984531 1 0.5 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.515469 APEX 0.875 1 0.609531 RAD 0.0078125 + txt243 +TEXDEF txt243 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.625 RAD 0.03125 + txt243 +TEXDEF txt243 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.625 APEX 0.984531 1 0.625 RAD 0.0078125 + txt243 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.640469 APEX 0.875 1 0.734531 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.75 RAD 0.03125 + txt244 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.75 APEX 0.984531 1 0.75 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.765469 APEX 0.875 1 0.859531 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 0.875 RAD 0.03125 + txt244 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 0.875 APEX 0.984531 1 0.875 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 0.875 1 0.890469 APEX 0.875 1 0.984531 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 0.875 1 1 RAD 0.03125 + txt244 +TEXDEF txt244 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.9 0.1 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 0.890469 1 1 APEX 0.984531 1 1 RAD 0.0078125 + txt244 +TEXDEF txt244 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0 RAD 0.03125 + txt244 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0 APEX 1 0.109531 0 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.0154687 APEX 1 0 0.109531 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.125 RAD 0.03125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.125 APEX 1 0.109531 0.125 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.140469 APEX 1 0 0.234531 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.25 RAD 0.03125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.25 APEX 1 0.109531 0.25 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.265469 APEX 1 0 0.359531 RAD 0.0078125 + txt245 +TEXDEF txt245 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.375 RAD 0.03125 + txt245 +TEXDEF txt245 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.375 APEX 1 0.109531 0.375 RAD 0.0078125 + txt245 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.390469 APEX 1 0 0.484531 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.5 RAD 0.03125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.5 APEX 1 0.109531 0.5 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.515469 APEX 1 0 0.609531 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.625 RAD 0.03125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.625 APEX 1 0.109531 0.625 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.640469 APEX 1 0 0.734531 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.75 RAD 0.03125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.75 APEX 1 0.109531 0.75 RAD 0.0078125 + txt246 +TEXDEF txt246 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.765469 APEX 1 0 0.859531 RAD 0.0078125 + txt246 +TEXDEF txt247 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 0.875 RAD 0.03125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 0.875 APEX 1 0.109531 0.875 RAD 0.0078125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0 0.890469 APEX 1 0 0.984531 RAD 0.0078125 + txt247 +TEXDEF txt247 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0 1 RAD 0.03125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.0154687 1 APEX 1 0.109531 1 RAD 0.0078125 + txt247 +TEXDEF txt247 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0 RAD 0.03125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0 APEX 1 0.234531 0 RAD 0.0078125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.0154687 APEX 1 0.125 0.109531 RAD 0.0078125 + txt247 +TEXDEF txt247 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.125 RAD 0.03125 + txt247 +TEXDEF txt247 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.125 APEX 1 0.234531 0.125 RAD 0.0078125 + txt247 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.140469 APEX 1 0.125 0.234531 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.25 RAD 0.03125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.25 APEX 1 0.234531 0.25 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.265469 APEX 1 0.125 0.359531 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.375 RAD 0.03125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.375 APEX 1 0.234531 0.375 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.390469 APEX 1 0.125 0.484531 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.5 RAD 0.03125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.5 APEX 1 0.234531 0.5 RAD 0.0078125 + txt248 +TEXDEF txt248 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.515469 APEX 1 0.125 0.609531 RAD 0.0078125 + txt248 +TEXDEF txt249 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.625 RAD 0.03125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.625 APEX 1 0.234531 0.625 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.640469 APEX 1 0.125 0.734531 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.75 RAD 0.03125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.75 APEX 1 0.234531 0.75 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.765469 APEX 1 0.125 0.859531 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 0.875 RAD 0.03125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 0.875 APEX 1 0.234531 0.875 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.125 0.890469 APEX 1 0.125 0.984531 RAD 0.0078125 + txt249 +TEXDEF txt249 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.125 1 RAD 0.03125 + txt249 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.140469 1 APEX 1 0.234531 1 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0 RAD 0.03125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0 APEX 1 0.359531 0 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.0154687 APEX 1 0.25 0.109531 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.125 RAD 0.03125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.125 APEX 1 0.359531 0.125 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.140469 APEX 1 0.25 0.234531 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.25 RAD 0.03125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.25 APEX 1 0.359531 0.25 RAD 0.0078125 + txt250 +TEXDEF txt250 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.265469 APEX 1 0.25 0.359531 RAD 0.0078125 + txt250 +TEXDEF txt251 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.375 RAD 0.03125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.375 APEX 1 0.359531 0.375 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.390469 APEX 1 0.25 0.484531 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.5 RAD 0.03125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.5 APEX 1 0.359531 0.5 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.515469 APEX 1 0.25 0.609531 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.625 RAD 0.03125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.625 APEX 1 0.359531 0.625 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.640469 APEX 1 0.25 0.734531 RAD 0.0078125 + txt251 +TEXDEF txt251 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.75 RAD 0.03125 + txt251 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.75 APEX 1 0.359531 0.75 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.765469 APEX 1 0.25 0.859531 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 0.875 RAD 0.03125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 0.875 APEX 1 0.359531 0.875 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.25 0.890469 APEX 1 0.25 0.984531 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.25 1 RAD 0.03125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.265469 1 APEX 1 0.359531 1 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0 RAD 0.03125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0 APEX 1 0.484531 0 RAD 0.0078125 + txt252 +TEXDEF txt252 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.0154687 APEX 1 0.375 0.109531 RAD 0.0078125 + txt252 +TEXDEF txt253 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.125 RAD 0.03125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.125 APEX 1 0.484531 0.125 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.140469 APEX 1 0.375 0.234531 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.25 RAD 0.03125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.25 APEX 1 0.484531 0.25 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.265469 APEX 1 0.375 0.359531 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.375 RAD 0.03125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.375 APEX 1 0.484531 0.375 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.390469 APEX 1 0.375 0.484531 RAD 0.0078125 + txt253 +TEXDEF txt253 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.5 RAD 0.03125 + txt253 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.5 APEX 1 0.484531 0.5 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.515469 APEX 1 0.375 0.609531 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.625 RAD 0.03125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.625 APEX 1 0.484531 0.625 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.640469 APEX 1 0.375 0.734531 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.75 RAD 0.03125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.75 APEX 1 0.484531 0.75 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.765469 APEX 1 0.375 0.859531 RAD 0.0078125 + txt254 +TEXDEF txt254 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 0.875 RAD 0.03125 + txt254 +TEXDEF txt254 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 0.875 APEX 1 0.484531 0.875 RAD 0.0078125 + txt254 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.375 0.890469 APEX 1 0.375 0.984531 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.375 1 RAD 0.03125 + txt255 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.390469 1 APEX 1 0.484531 1 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0 RAD 0.03125 + txt255 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0 APEX 1 0.609531 0 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.0154687 APEX 1 0.5 0.109531 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.125 RAD 0.03125 + txt255 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.125 APEX 1 0.609531 0.125 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.140469 APEX 1 0.5 0.234531 RAD 0.0078125 + txt255 +TEXDEF txt255 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.25 RAD 0.03125 + txt255 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.25 APEX 1 0.609531 0.25 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.265469 APEX 1 0.5 0.359531 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.375 RAD 0.03125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.375 APEX 1 0.609531 0.375 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.390469 APEX 1 0.5 0.484531 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.5 RAD 0.03125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.5 APEX 1 0.609531 0.5 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.515469 APEX 1 0.5 0.609531 RAD 0.0078125 + txt256 +TEXDEF txt256 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.625 RAD 0.03125 + txt256 +TEXDEF txt256 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.625 APEX 1 0.609531 0.625 RAD 0.0078125 + txt256 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.640469 APEX 1 0.5 0.734531 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.75 RAD 0.03125 + txt257 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.75 APEX 1 0.609531 0.75 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.765469 APEX 1 0.5 0.859531 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 0.875 RAD 0.03125 + txt257 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 0.875 APEX 1 0.609531 0.875 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.5 0.890469 APEX 1 0.5 0.984531 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.5 1 RAD 0.03125 + txt257 +TEXDEF txt257 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.515469 1 APEX 1 0.609531 1 RAD 0.0078125 + txt257 +TEXDEF txt257 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0 RAD 0.03125 + txt257 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0 APEX 1 0.734531 0 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.0154687 APEX 1 0.625 0.109531 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.125 RAD 0.03125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.125 APEX 1 0.734531 0.125 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.140469 APEX 1 0.625 0.234531 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.25 RAD 0.03125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.25 APEX 1 0.734531 0.25 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.265469 APEX 1 0.625 0.359531 RAD 0.0078125 + txt258 +TEXDEF txt258 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.375 RAD 0.03125 + txt258 +TEXDEF txt258 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.375 APEX 1 0.734531 0.375 RAD 0.0078125 + txt258 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.390469 APEX 1 0.625 0.484531 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.5 RAD 0.03125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.5 APEX 1 0.734531 0.5 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.515469 APEX 1 0.625 0.609531 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.625 RAD 0.03125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.625 APEX 1 0.734531 0.625 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.640469 APEX 1 0.625 0.734531 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.75 RAD 0.03125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.75 APEX 1 0.734531 0.75 RAD 0.0078125 + txt259 +TEXDEF txt259 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.765469 APEX 1 0.625 0.859531 RAD 0.0078125 + txt259 +TEXDEF txt260 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 0.875 RAD 0.03125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 0.875 APEX 1 0.734531 0.875 RAD 0.0078125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.625 0.890469 APEX 1 0.625 0.984531 RAD 0.0078125 + txt260 +TEXDEF txt260 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.625 1 RAD 0.03125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.640469 1 APEX 1 0.734531 1 RAD 0.0078125 + txt260 +TEXDEF txt260 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0 RAD 0.03125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0 APEX 1 0.859531 0 RAD 0.0078125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.0154687 APEX 1 0.75 0.109531 RAD 0.0078125 + txt260 +TEXDEF txt260 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.125 RAD 0.03125 + txt260 +TEXDEF txt260 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.125 APEX 1 0.859531 0.125 RAD 0.0078125 + txt260 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.140469 APEX 1 0.75 0.234531 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.25 RAD 0.03125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.25 APEX 1 0.859531 0.25 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.265469 APEX 1 0.75 0.359531 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.375 RAD 0.03125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.375 APEX 1 0.859531 0.375 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.390469 APEX 1 0.75 0.484531 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.5 RAD 0.03125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.5 APEX 1 0.859531 0.5 RAD 0.0078125 + txt261 +TEXDEF txt261 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.515469 APEX 1 0.75 0.609531 RAD 0.0078125 + txt261 +TEXDEF txt262 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.625 RAD 0.03125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.625 APEX 1 0.859531 0.625 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.640469 APEX 1 0.75 0.734531 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.75 RAD 0.03125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.75 APEX 1 0.859531 0.75 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.765469 APEX 1 0.75 0.859531 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 0.875 RAD 0.03125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 0.875 APEX 1 0.859531 0.875 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.75 0.890469 APEX 1 0.75 0.984531 RAD 0.0078125 + txt262 +TEXDEF txt262 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.75 1 RAD 0.03125 + txt262 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.765469 1 APEX 1 0.859531 1 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0 RAD 0.03125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0 APEX 1 0.984531 0 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.0154687 APEX 1 0.875 0.109531 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.125 RAD 0.03125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.125 APEX 1 0.984531 0.125 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.140469 APEX 1 0.875 0.234531 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.25 RAD 0.03125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.25 APEX 1 0.984531 0.25 RAD 0.0078125 + txt263 +TEXDEF txt263 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.265469 APEX 1 0.875 0.359531 RAD 0.0078125 + txt263 +TEXDEF txt264 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.375 RAD 0.03125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.375 APEX 1 0.984531 0.375 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.390469 APEX 1 0.875 0.484531 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.5 RAD 0.03125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.5 APEX 1 0.984531 0.5 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.515469 APEX 1 0.875 0.609531 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.625 RAD 0.03125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.625 APEX 1 0.984531 0.625 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.640469 APEX 1 0.875 0.734531 RAD 0.0078125 + txt264 +TEXDEF txt264 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.75 RAD 0.03125 + txt264 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.75 APEX 1 0.984531 0.75 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.765469 APEX 1 0.875 0.859531 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 0.875 RAD 0.03125 + txt265 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 0.875 APEX 1 0.984531 0.875 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.875 0.890469 APEX 1 0.875 0.984531 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 0.875 1 RAD 0.03125 + txt265 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.9 0.1 + TEXFUNC 0 + +FCYLINDER + BASE 1 0.890469 1 APEX 1 0.984531 1 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0 RAD 0.03125 + txt265 +TEXDEF txt265 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.0154687 APEX 1 1 0.109531 RAD 0.0078125 + txt265 +TEXDEF txt265 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.125 RAD 0.03125 + txt265 +TEXDEF txt266 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.140469 APEX 1 1 0.234531 RAD 0.0078125 + txt266 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.25 RAD 0.03125 + txt266 +TEXDEF txt266 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.265469 APEX 1 1 0.359531 RAD 0.0078125 + txt266 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.375 RAD 0.03125 + txt266 +TEXDEF txt266 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.390469 APEX 1 1 0.484531 RAD 0.0078125 + txt266 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.5 RAD 0.03125 + txt266 +TEXDEF txt266 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.515469 APEX 1 1 0.609531 RAD 0.0078125 + txt266 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.625 RAD 0.03125 + txt266 +TEXDEF txt266 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.640469 APEX 1 1 0.734531 RAD 0.0078125 + txt266 +TEXDEF txt266 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.75 RAD 0.03125 + txt266 +TEXDEF txt267 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.765469 APEX 1 1 0.859531 RAD 0.0078125 + txt267 +TEXDEF txt267 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 0.875 RAD 0.03125 + txt267 +TEXDEF txt267 AMBIENT 0.1 DIFFUSE 0.99 SPECULAR 0 OPACITY 1 + COLOR 0.1 0.1 0.9 + TEXFUNC 0 + +FCYLINDER + BASE 1 1 0.890469 APEX 1 1 0.984531 RAD 0.0078125 + txt267 +TEXDEF txt267 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 + COLOR 0.9 0.9 0.9 + TEXFUNC 0 + + SPHERE CENTER 1 1 1 RAD 0.03125 + txt267 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/model2.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/model2.dat new file mode 100644 index 0000000000..c57ce49ceb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/model2.dat @@ -0,0 +1,104 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 512 512 + VERBOSE 0 + +CAMERA + ZOOM 1.0 + ASPECTRATIO 1.0 + ANTIALIASING 1 + RAYDEPTH 12 + CENTER 0.0 0.0 -5.0 + VIEWDIR 0.0 0.0 1.0 + UPDIR 0.0 1.0 0.0 +END_CAMERA + +LIGHT + CENTER -5.0 0.0 -4.0 + RAD 0.2 + COLOR 1.0 0.1 0.0 + +LIGHT + CENTER 4.0 5.0 -4.0 + RAD 0.2 + COLOR 0.0 0.1 1.0 + +LIGHT + CENTER 4.0 1.5 3.0 + RAD 0.2 + COLOR 0.5 0.5 0.5 + +TRI + V0 0.0 -4.0 12.0 + V1 4.0 -4.0 8.0 + V2 -4.0 -4.0 8.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.2 SPECULAR 0.7 OPACITY 1.0 + COLOR 1.0 1.0 1.0 + TEXFUNC 0 + +SPHERE + CENTER 0.0 0.0 5.0 + RAD 1.3 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.0 SPECULAR 0.9 OPACITY 1.0 + COLOR 1.0 1.0 1.0 + TEXFUNC 0 + +SPHERE + CENTER 1.0 0.0 4.3 + RAD 0.8 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 0.3 0.3 1.0 + TEXFUNC 3 + CENTER 1.0 0.0 4.3 + ROTATE 0. 0.0 0.0 + SCALE 1.0 1.0 1.0 + +SPHERE + CENTER 0.0 2.0 8.0 + RAD 1.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 0.0 1.0 + TEXFUNC 4 + CENTER 0.0 1.0 8.0 + ROTATE 0. 0.0 0.0 + SCALE 1.0 1.0 1.0 + +SPHERE + CENTER -1.0 -0.5 5.0 + RAD 1.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 1.0 0.5 + TEXFUNC 6 + CENTER -1.0 -0.5 5.0 + ROTATE 0. 0.0 0.0 + SCALE 1.0 1.0 1.0 + +PLANE + CENTER 0.0 -5.0 0.0 + NORMAL 0.0 1.0 0.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 1.0 1.0 + TEXFUNC 1 + CENTER 0.0 -5.0 0.0 + ROTATE 0. 0.0 0.0 + SCALE 1.0 1.0 1.0 + +PLANE + CENTER 0.0 0.0 15.0 + NORMAL 0.0 0.0 -1.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 1.0 1.0 + TEXFUNC 3 + CENTER 0.0 0.0 15.0 + ROTATE 0. 0.0 0.0 + SCALE 1.0 1.0 1.0 + +END_SCENE + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/teapot.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/teapot.dat new file mode 100644 index 0000000000..105afcddb1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/teapot.dat @@ -0,0 +1,9279 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 512 512 + VERBOSE 0 + +CAMERA + ZOOM 1.20711 +ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 5 + CENTER 4.86 7.2 5.4 + VIEWDIR -0.475149 -0.703924 -0.527943 + UPDIR -0.29537 -0.437585 0.84928 + +END_CAMERA + +BACKGROUND 0.078 0.361 0.753 + +LIGHT CENTER -3.1 9.8 12.1 RAD 0.002 COLOR 0.5 0.5 0.5 + +LIGHT CENTER 11.3 5.1 8.8 RAD 0.002 COLOR 0.5 0.5 0.5 + +TEXDEF txt001 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 +PHONG METAL 0.5 PHONG_SIZE 4.81884 + COLOR 1 1 1 + TEXFUNC 0 + +TRI + V0 -4 -2.66667 0 V1 -2.66667 -2.66667 0 V2 -4 -1.33333 0 + txt001 +TRI + V0 -2.66667 -2.66667 0 V1 -2.66667 -1.33333 0 V2 -4 -1.33333 0 + txt001 +TRI + V0 -4 0 0 V1 -2.66667 0 0 V2 -4 1.33333 0 + txt001 +TRI + V0 -2.66667 0 0 V1 -2.66667 1.33333 0 V2 -4 1.33333 0 + txt001 +TRI + V0 -4 2.66667 0 V1 -2.66667 2.66667 0 V2 -4 4 0 + txt001 +TRI + V0 -2.66667 2.66667 0 V1 -2.66667 4 0 V2 -4 4 0 + txt001 +TRI + V0 -2.66667 -4 0 V1 -1.33333 -4 0 V2 -2.66667 -2.66667 0 + txt001 +TRI + V0 -1.33333 -4 0 V1 -1.33333 -2.66667 0 V2 -2.66667 -2.66667 0 + txt001 +TRI + V0 -2.66667 -1.33333 0 V1 -1.33333 -1.33333 0 V2 -2.66667 0 0 + txt001 +TRI + V0 -1.33333 -1.33333 0 V1 -1.33333 0 0 V2 -2.66667 0 0 + txt001 +TRI + V0 -2.66667 1.33333 0 V1 -1.33333 1.33333 0 V2 -2.66667 2.66667 0 + txt001 +TRI + V0 -1.33333 1.33333 0 V1 -1.33333 2.66667 0 V2 -2.66667 2.66667 0 + txt001 +TRI + V0 -1.33333 -2.66667 0 V1 0 -2.66667 0 V2 -1.33333 -1.33333 0 + txt001 +TRI + V0 0 -2.66667 0 V1 0 -1.33333 0 V2 -1.33333 -1.33333 0 + txt001 +TRI + V0 -1.33333 0 0 V1 0 0 0 V2 -1.33333 1.33333 0 + txt001 +TRI + V0 0 0 0 V1 0 1.33333 0 V2 -1.33333 1.33333 0 + txt001 +TRI + V0 -1.33333 2.66667 0 V1 0 2.66667 0 V2 -1.33333 4 0 + txt001 +TRI + V0 0 2.66667 0 V1 0 4 0 V2 -1.33333 4 0 + txt001 +TRI + V0 0 -4 0 V1 1.33333 -4 0 V2 0 -2.66667 0 + txt001 +TRI + V0 1.33333 -4 0 V1 1.33333 -2.66667 0 V2 0 -2.66667 0 + txt001 +TRI + V0 0 -1.33333 0 V1 1.33333 -1.33333 0 V2 0 0 0 + txt001 +TRI + V0 1.33333 -1.33333 0 V1 1.33333 0 0 V2 0 0 0 + txt001 +TRI + V0 0 1.33333 0 V1 1.33333 1.33333 0 V2 0 2.66667 0 + txt001 +TRI + V0 1.33333 1.33333 0 V1 1.33333 2.66667 0 V2 0 2.66667 0 + txt001 +TRI + V0 1.33333 -2.66667 0 V1 2.66667 -2.66667 0 V2 1.33333 -1.33333 0 + txt001 +TRI + V0 2.66667 -2.66667 0 V1 2.66667 -1.33333 0 V2 1.33333 -1.33333 0 + txt001 +TRI + V0 1.33333 0 0 V1 2.66667 0 0 V2 1.33333 1.33333 0 + txt001 +TRI + V0 2.66667 0 0 V1 2.66667 1.33333 0 V2 1.33333 1.33333 0 + txt001 +TRI + V0 1.33333 2.66667 0 V1 2.66667 2.66667 0 V2 1.33333 4 0 + txt001 +TRI + V0 2.66667 2.66667 0 V1 2.66667 4 0 V2 1.33333 4 0 + txt001 +TRI + V0 2.66667 -4 0 V1 4 -4 0 V2 2.66667 -2.66667 0 + txt001 +TRI + V0 4 -4 0 V1 4 -2.66667 0 V2 2.66667 -2.66667 0 + txt001 +TRI + V0 2.66667 -1.33333 0 V1 4 -1.33333 0 V2 2.66667 0 0 + txt001 +TRI + V0 4 -1.33333 0 V1 4 0 0 V2 2.66667 0 0 + txt001 +TRI + V0 2.66667 1.33333 0 V1 4 1.33333 0 V2 2.66667 2.66667 0 + txt001 +TRI + V0 4 1.33333 0 V1 4 2.66667 0 V2 2.66667 2.66667 0 + txt001 +TEXDEF txt002 AMBIENT 0 DIFFUSE 0.5 SPECULAR 0.5 OPACITY 1 +PHONG METAL 0.5 PHONG_SIZE 4.81884 + COLOR 0.5 0.5 0.5 + TEXFUNC 0 + +TRI + V0 -4 -4 0 V1 -2.66667 -4 0 V2 -4 -2.66667 0 + txt002 +TRI + V0 -2.66667 -4 0 V1 -2.66667 -2.66667 0 V2 -4 -2.66667 0 + txt002 +TRI + V0 -4 -1.33333 0 V1 -2.66667 -1.33333 0 V2 -4 0 0 + txt002 +TRI + V0 -2.66667 -1.33333 0 V1 -2.66667 0 0 V2 -4 0 0 + txt002 +TRI + V0 -4 1.33333 0 V1 -2.66667 1.33333 0 V2 -4 2.66667 0 + txt002 +TRI + V0 -2.66667 1.33333 0 V1 -2.66667 2.66667 0 V2 -4 2.66667 0 + txt002 +TRI + V0 -2.66667 -2.66667 0 V1 -1.33333 -2.66667 0 V2 -2.66667 -1.33333 0 + txt002 +TRI + V0 -1.33333 -2.66667 0 V1 -1.33333 -1.33333 0 V2 -2.66667 -1.33333 0 + txt002 +TRI + V0 -2.66667 0 0 V1 -1.33333 0 0 V2 -2.66667 1.33333 0 + txt002 +TRI + V0 -1.33333 0 0 V1 -1.33333 1.33333 0 V2 -2.66667 1.33333 0 + txt002 +TRI + V0 -2.66667 2.66667 0 V1 -1.33333 2.66667 0 V2 -2.66667 4 0 + txt002 +TRI + V0 -1.33333 2.66667 0 V1 -1.33333 4 0 V2 -2.66667 4 0 + txt002 +TRI + V0 -1.33333 -4 0 V1 0 -4 0 V2 -1.33333 -2.66667 0 + txt002 +TRI + V0 0 -4 0 V1 0 -2.66667 0 V2 -1.33333 -2.66667 0 + txt002 +TRI + V0 -1.33333 -1.33333 0 V1 0 -1.33333 0 V2 -1.33333 0 0 + txt002 +TRI + V0 0 -1.33333 0 V1 0 0 0 V2 -1.33333 0 0 + txt002 +TRI + V0 -1.33333 1.33333 0 V1 0 1.33333 0 V2 -1.33333 2.66667 0 + txt002 +TRI + V0 0 1.33333 0 V1 0 2.66667 0 V2 -1.33333 2.66667 0 + txt002 +TRI + V0 0 -2.66667 0 V1 1.33333 -2.66667 0 V2 0 -1.33333 0 + txt002 +TRI + V0 1.33333 -2.66667 0 V1 1.33333 -1.33333 0 V2 0 -1.33333 0 + txt002 +TRI + V0 0 0 0 V1 1.33333 0 0 V2 0 1.33333 0 + txt002 +TRI + V0 1.33333 0 0 V1 1.33333 1.33333 0 V2 0 1.33333 0 + txt002 +TRI + V0 0 2.66667 0 V1 1.33333 2.66667 0 V2 0 4 0 + txt002 +TRI + V0 1.33333 2.66667 0 V1 1.33333 4 0 V2 0 4 0 + txt002 +TRI + V0 1.33333 -4 0 V1 2.66667 -4 0 V2 1.33333 -2.66667 0 + txt002 +TRI + V0 2.66667 -4 0 V1 2.66667 -2.66667 0 V2 1.33333 -2.66667 0 + txt002 +TRI + V0 1.33333 -1.33333 0 V1 2.66667 -1.33333 0 V2 1.33333 0 0 + txt002 +TRI + V0 2.66667 -1.33333 0 V1 2.66667 0 0 V2 1.33333 0 0 + txt002 +TRI + V0 1.33333 1.33333 0 V1 2.66667 1.33333 0 V2 1.33333 2.66667 0 + txt002 +TRI + V0 2.66667 1.33333 0 V1 2.66667 2.66667 0 V2 1.33333 2.66667 0 + txt002 +TRI + V0 2.66667 -2.66667 0 V1 4 -2.66667 0 V2 2.66667 -1.33333 0 + txt002 +TRI + V0 4 -2.66667 0 V1 4 -1.33333 0 V2 2.66667 -1.33333 0 + txt002 +TRI + V0 2.66667 0 0 V1 4 0 0 V2 2.66667 1.33333 0 + txt002 +TRI + V0 4 0 0 V1 4 1.33333 0 V2 2.66667 1.33333 0 + txt002 +TRI + V0 2.66667 2.66667 0 V1 4 2.66667 0 V2 2.66667 4 0 + txt002 +TRI + V0 4 2.66667 0 V1 4 4 0 V2 2.66667 4 0 + txt002 +TEXDEF txt003 AMBIENT 0 DIFFUSE 0.75 SPECULAR 0.25 OPACITY 1 +PHONG PLASTIC 0.25 PHONG_SIZE 45.2776 + COLOR 1 0.5 0.1 + TEXFUNC 0 + +STRI + V0 1.4 0 2.4 V1 1.35074 -0.375926 2.4 V2 1.33276 -0.370922 2.45469 + N0 -0.902861 -0 -0.429934 N1 -0.871509 0.234929 -0.430442 N2 -0.953562 0.257047 -0.156989 + txt003 +STRI + V0 1.33276 -0.370922 2.45469 V1 1.38137 0 2.45469 V2 1.4 0 2.4 + N0 -0.953562 0.257047 -0.156989 N1 -0.987636 -0 -0.156768 N2 -0.902861 -0 -0.429934 + txt003 +STRI + V0 1.35074 -0.375926 2.4 V1 1.21126 -0.711407 2.4 V2 1.19514 -0.701938 2.45469 + N0 -0.871509 0.234929 -0.430442 N1 -0.780517 0.4527 -0.43111 N2 -0.854265 0.495474 -0.157281 + txt003 +STRI + V0 1.19514 -0.701938 2.45469 V1 1.33276 -0.370922 2.45469 V2 1.35074 -0.375926 2.4 + N0 -0.854265 0.495474 -0.157281 N1 -0.953562 0.257047 -0.156989 N2 -0.871509 0.234929 -0.430442 + txt003 +STRI + V0 1.21126 -0.711407 2.4 V1 0.994 -0.994 2.4 V2 0.98077 -0.98077 2.45469 + N0 -0.780517 0.4527 -0.43111 N1 -0.637936 0.637936 -0.431366 N2 -0.698293 0.698293 -0.157393 + txt003 +STRI + V0 0.98077 -0.98077 2.45469 V1 1.19514 -0.701938 2.45469 V2 1.21126 -0.711407 2.4 + N0 -0.698293 0.698293 -0.157393 N1 -0.854265 0.495474 -0.157281 N2 -0.780517 0.4527 -0.43111 + txt003 +STRI + V0 0.994 -0.994 2.4 V1 0.711407 -1.21126 2.4 V2 0.701938 -1.19514 2.45469 + N0 -0.637936 0.637936 -0.431366 N1 -0.4527 0.780517 -0.43111 N2 -0.495474 0.854265 -0.157281 + txt003 +STRI + V0 0.701938 -1.19514 2.45469 V1 0.98077 -0.98077 2.45469 V2 0.994 -0.994 2.4 + N0 -0.495474 0.854265 -0.157281 N1 -0.698293 0.698293 -0.157393 N2 -0.637936 0.637936 -0.431366 + txt003 +STRI + V0 0.711407 -1.21126 2.4 V1 0.375926 -1.35074 2.4 V2 0.370922 -1.33276 2.45469 + N0 -0.4527 0.780517 -0.43111 N1 -0.234929 0.871509 -0.430442 N2 -0.257047 0.953562 -0.156989 + txt003 +STRI + V0 0.370922 -1.33276 2.45469 V1 0.701938 -1.19514 2.45469 V2 0.711407 -1.21126 2.4 + N0 -0.257047 0.953562 -0.156989 N1 -0.495474 0.854265 -0.157281 N2 -0.4527 0.780517 -0.43111 + txt003 +STRI + V0 0.375926 -1.35074 2.4 V1 0 -1.4 2.4 V2 0 -1.38137 2.45469 + N0 -0.234929 0.871509 -0.430442 N1 7.30595e-17 0.902861 -0.429934 N2 -9.89971e-17 0.987636 -0.156768 + txt003 +STRI + V0 0 -1.38137 2.45469 V1 0.370922 -1.33276 2.45469 V2 0.375926 -1.35074 2.4 + N0 -9.89971e-17 0.987636 -0.156768 N1 -0.257047 0.953562 -0.156989 N2 -0.234929 0.871509 -0.430442 + txt003 +STRI + V0 1.38137 0 2.45469 V1 1.33276 -0.370922 2.45469 V2 1.33555 -0.371699 2.4875 + N0 -0.987636 -0 -0.156768 N1 -0.953562 0.257047 -0.156989 N2 -0.849414 0.228972 0.475466 + txt003 +STRI + V0 1.33555 -0.371699 2.4875 V1 1.38426 0 2.4875 V2 1.38137 0 2.45469 + N0 -0.849414 0.228972 0.475466 N1 -0.880022 0 0.474933 N2 -0.987636 -0 -0.156768 + txt003 +STRI + V0 1.33276 -0.370922 2.45469 V1 1.19514 -0.701938 2.45469 V2 1.19764 -0.703409 2.4875 + N0 -0.953562 0.257047 -0.156989 N1 -0.854265 0.495474 -0.157281 N2 -0.760669 0.441188 0.476167 + txt003 +STRI + V0 1.19764 -0.703409 2.4875 V1 1.33555 -0.371699 2.4875 V2 1.33276 -0.370922 2.45469 + N0 -0.760669 0.441188 0.476167 N1 -0.849414 0.228972 0.475466 N2 -0.953562 0.257047 -0.156989 + txt003 +STRI + V0 1.19514 -0.701938 2.45469 V1 0.98077 -0.98077 2.45469 V2 0.982824 -0.982824 2.4875 + N0 -0.854265 0.495474 -0.157281 N1 -0.698293 0.698293 -0.157393 N2 -0.621695 0.621695 0.476435 + txt003 +STRI + V0 0.982824 -0.982824 2.4875 V1 1.19764 -0.703409 2.4875 V2 1.19514 -0.701938 2.45469 + N0 -0.621695 0.621695 0.476435 N1 -0.760669 0.441188 0.476167 N2 -0.854265 0.495474 -0.157281 + txt003 +STRI + V0 0.98077 -0.98077 2.45469 V1 0.701938 -1.19514 2.45469 V2 0.703409 -1.19764 2.4875 + N0 -0.698293 0.698293 -0.157393 N1 -0.495474 0.854265 -0.157281 N2 -0.441188 0.760669 0.476167 + txt003 +STRI + V0 0.703409 -1.19764 2.4875 V1 0.982824 -0.982824 2.4875 V2 0.98077 -0.98077 2.45469 + N0 -0.441188 0.760669 0.476167 N1 -0.621695 0.621695 0.476435 N2 -0.698293 0.698293 -0.157393 + txt003 +STRI + V0 0.701938 -1.19514 2.45469 V1 0.370922 -1.33276 2.45469 V2 0.371699 -1.33555 2.4875 + N0 -0.495474 0.854265 -0.157281 N1 -0.257047 0.953562 -0.156989 N2 -0.228972 0.849414 0.475466 + txt003 +STRI + V0 0.371699 -1.33555 2.4875 V1 0.703409 -1.19764 2.4875 V2 0.701938 -1.19514 2.45469 + N0 -0.228972 0.849414 0.475466 N1 -0.441188 0.760669 0.476167 N2 -0.495474 0.854265 -0.157281 + txt003 +STRI + V0 0.370922 -1.33276 2.45469 V1 0 -1.38137 2.45469 V2 0 -1.38426 2.4875 + N0 -0.257047 0.953562 -0.156989 N1 -9.89971e-17 0.987636 -0.156768 N2 -6.08179e-16 0.880022 0.474933 + txt003 +STRI + V0 0 -1.38426 2.4875 V1 0.371699 -1.33555 2.4875 V2 0.370922 -1.33276 2.45469 + N0 -6.08179e-16 0.880022 0.474933 N1 -0.228972 0.849414 0.475466 N2 -0.257047 0.953562 -0.156989 + txt003 +STRI + V0 1.38426 0 2.4875 V1 1.33555 -0.371699 2.4875 V2 1.35376 -0.376765 2.49844 + N0 -0.880022 0 0.474933 N1 -0.849414 0.228972 0.475466 N2 2.13636e-15 -5.93089e-16 1 + txt003 +STRI + V0 1.35376 -0.376765 2.49844 V1 1.40312 0 2.49844 V2 1.38426 0 2.4875 + N0 2.13636e-15 -5.93089e-16 1 N1 2.22045e-15 0 1 N2 -0.880022 0 0.474933 + txt003 +STRI + V0 1.33555 -0.371699 2.4875 V1 1.19764 -0.703409 2.4875 V2 1.21396 -0.712995 2.49844 + N0 -0.849414 0.228972 0.475466 N1 -0.760669 0.441188 0.476167 N2 1.87966e-15 -1.16933e-15 1 + txt003 +STRI + V0 1.21396 -0.712995 2.49844 V1 1.35376 -0.376765 2.49844 V2 1.33555 -0.371699 2.4875 + N0 1.87966e-15 -1.16933e-15 1 N1 2.13636e-15 -5.93089e-16 1 N2 -0.849414 0.228972 0.475466 + txt003 +STRI + V0 1.19764 -0.703409 2.4875 V1 0.982824 -0.982824 2.4875 V2 0.996219 -0.996219 2.49844 + N0 -0.760669 0.441188 0.476167 N1 -0.621695 0.621695 0.476435 N2 1.4538e-15 -1.67359e-15 1 + txt003 +STRI + V0 0.996219 -0.996219 2.49844 V1 1.21396 -0.712995 2.49844 V2 1.19764 -0.703409 2.4875 + N0 1.4538e-15 -1.67359e-15 1 N1 1.87966e-15 -1.16933e-15 1 N2 -0.760669 0.441188 0.476167 + txt003 +STRI + V0 0.982824 -0.982824 2.4875 V1 0.703409 -1.19764 2.4875 V2 0.712995 -1.21396 2.49844 + N0 -0.621695 0.621695 0.476435 N1 -0.441188 0.760669 0.476167 N2 8.74229e-16 -2.05298e-15 1 + txt003 +STRI + V0 0.712995 -1.21396 2.49844 V1 0.996219 -0.996219 2.49844 V2 0.982824 -0.982824 2.4875 + N0 8.74229e-16 -2.05298e-15 1 N1 1.4538e-15 -1.67359e-15 1 N2 -0.621695 0.621695 0.476435 + txt003 +STRI + V0 0.703409 -1.19764 2.4875 V1 0.371699 -1.33555 2.4875 V2 0.376765 -1.35376 2.49844 + N0 -0.441188 0.760669 0.476167 N1 -0.228972 0.849414 0.475466 N2 1.77072e-16 -2.25214e-15 1 + txt003 +STRI + V0 0.376765 -1.35376 2.49844 V1 0.712995 -1.21396 2.49844 V2 0.703409 -1.19764 2.4875 + N0 1.77072e-16 -2.25214e-15 1 N1 8.74229e-16 -2.05298e-15 1 N2 -0.441188 0.760669 0.476167 + txt003 +STRI + V0 0.371699 -1.33555 2.4875 V1 0 -1.38426 2.4875 V2 0 -1.40312 2.49844 + N0 -0.228972 0.849414 0.475466 N1 -6.08179e-16 0.880022 0.474933 N2 -5.65179e-16 -2.22045e-15 1 + txt003 +STRI + V0 0 -1.40312 2.49844 V1 0.376765 -1.35376 2.49844 V2 0.371699 -1.33555 2.4875 + N0 -5.65179e-16 -2.22045e-15 1 N1 1.77072e-16 -2.25214e-15 1 N2 -0.228972 0.849414 0.475466 + txt003 +STRI + V0 1.40312 0 2.49844 V1 1.35376 -0.376765 2.49844 V2 1.38201 -0.384628 2.4875 + N0 2.22045e-15 0 1 N1 2.13636e-15 -5.93089e-16 1 N2 0.537012 -0.14476 0.831061 + txt003 +STRI + V0 1.38201 -0.384628 2.4875 V1 1.43241 0 2.4875 V2 1.40312 0 2.49844 + N0 0.537012 -0.14476 0.831061 N1 0.556738 0 0.830688 N2 2.22045e-15 0 1 + txt003 +STRI + V0 1.35376 -0.376765 2.49844 V1 1.21396 -0.712995 2.49844 V2 1.2393 -0.727875 2.4875 + N0 2.13636e-15 -5.93089e-16 1 N1 1.87966e-15 -1.16933e-15 1 N2 0.480481 -0.278679 0.83155 + txt003 +STRI + V0 1.2393 -0.727875 2.4875 V1 1.38201 -0.384628 2.4875 V2 1.35376 -0.376765 2.49844 + N0 0.480481 -0.278679 0.83155 N1 0.537012 -0.14476 0.831061 N2 2.13636e-15 -5.93089e-16 1 + txt003 +STRI + V0 1.21396 -0.712995 2.49844 V1 0.996219 -0.996219 2.49844 V2 1.01701 -1.01701 2.4875 + N0 1.87966e-15 -1.16933e-15 1 N1 1.4538e-15 -1.67359e-15 1 N2 0.392564 -0.392564 0.831737 + txt003 +STRI + V0 1.01701 -1.01701 2.4875 V1 1.2393 -0.727875 2.4875 V2 1.21396 -0.712995 2.49844 + N0 0.392564 -0.392564 0.831737 N1 0.480481 -0.278679 0.83155 N2 1.87966e-15 -1.16933e-15 1 + txt003 +STRI + V0 0.996219 -0.996219 2.49844 V1 0.712995 -1.21396 2.49844 V2 0.727875 -1.2393 2.4875 + N0 1.4538e-15 -1.67359e-15 1 N1 8.74229e-16 -2.05298e-15 1 N2 0.278679 -0.480481 0.83155 + txt003 +STRI + V0 0.727875 -1.2393 2.4875 V1 1.01701 -1.01701 2.4875 V2 0.996219 -0.996219 2.49844 + N0 0.278679 -0.480481 0.83155 N1 0.392564 -0.392564 0.831737 N2 1.4538e-15 -1.67359e-15 1 + txt003 +STRI + V0 0.712995 -1.21396 2.49844 V1 0.376765 -1.35376 2.49844 V2 0.384628 -1.38201 2.4875 + N0 8.74229e-16 -2.05298e-15 1 N1 1.77072e-16 -2.25214e-15 1 N2 0.14476 -0.537012 0.831061 + txt003 +STRI + V0 0.384628 -1.38201 2.4875 V1 0.727875 -1.2393 2.4875 V2 0.712995 -1.21396 2.49844 + N0 0.14476 -0.537012 0.831061 N1 0.278679 -0.480481 0.83155 N2 8.74229e-16 -2.05298e-15 1 + txt003 +STRI + V0 0.376765 -1.35376 2.49844 V1 0 -1.40312 2.49844 V2 0 -1.43241 2.4875 + N0 1.77072e-16 -2.25214e-15 1 N1 -5.65179e-16 -2.22045e-15 1 N2 -4.5989e-16 -0.556738 0.830688 + txt003 +STRI + V0 0 -1.43241 2.4875 V1 0.384628 -1.38201 2.4875 V2 0.376765 -1.35376 2.49844 + N0 -4.5989e-16 -0.556738 0.830688 N1 0.14476 -0.537012 0.831061 N2 1.77072e-16 -2.25214e-15 1 + txt003 +STRI + V0 1.43241 0 2.4875 V1 1.38201 -0.384628 2.4875 V2 1.41495 -0.393796 2.45469 + N0 0.556738 0 0.830688 N1 0.537012 -0.14476 0.831061 N2 0.755869 -0.203756 0.622211 + txt003 +STRI + V0 1.41495 -0.393796 2.45469 V1 1.46655 0 2.45469 V2 1.43241 0 2.4875 + N0 0.755869 -0.203756 0.622211 N1 0.783289 0 0.621658 N2 0.556738 0 0.830688 + txt003 +STRI + V0 1.38201 -0.384628 2.4875 V1 1.2393 -0.727875 2.4875 V2 1.26884 -0.745225 2.45469 + N0 0.537012 -0.14476 0.831061 N1 0.480481 -0.278679 0.83155 N2 0.67669 -0.39248 0.622937 + txt003 +STRI + V0 1.26884 -0.745225 2.45469 V1 1.41495 -0.393796 2.45469 V2 1.38201 -0.384628 2.4875 + N0 0.67669 -0.39248 0.622937 N1 0.755869 -0.203756 0.622211 N2 0.537012 -0.14476 0.831061 + txt003 +STRI + V0 1.2393 -0.727875 2.4875 V1 1.01701 -1.01701 2.4875 V2 1.04125 -1.04125 2.45469 + N0 0.480481 -0.278679 0.83155 N1 0.392564 -0.392564 0.831737 N2 0.552993 -0.552993 0.623215 + txt003 +STRI + V0 1.04125 -1.04125 2.45469 V1 1.26884 -0.745225 2.45469 V2 1.2393 -0.727875 2.4875 + N0 0.552993 -0.552993 0.623215 N1 0.67669 -0.39248 0.622937 N2 0.480481 -0.278679 0.83155 + txt003 +STRI + V0 1.01701 -1.01701 2.4875 V1 0.727875 -1.2393 2.4875 V2 0.745225 -1.26884 2.45469 + N0 0.392564 -0.392564 0.831737 N1 0.278679 -0.480481 0.83155 N2 0.39248 -0.67669 0.622937 + txt003 +STRI + V0 0.745225 -1.26884 2.45469 V1 1.04125 -1.04125 2.45469 V2 1.01701 -1.01701 2.4875 + N0 0.39248 -0.67669 0.622937 N1 0.552993 -0.552993 0.623215 N2 0.392564 -0.392564 0.831737 + txt003 +STRI + V0 0.727875 -1.2393 2.4875 V1 0.384628 -1.38201 2.4875 V2 0.393796 -1.41495 2.45469 + N0 0.278679 -0.480481 0.83155 N1 0.14476 -0.537012 0.831061 N2 0.203756 -0.755869 0.622211 + txt003 +STRI + V0 0.393796 -1.41495 2.45469 V1 0.745225 -1.26884 2.45469 V2 0.727875 -1.2393 2.4875 + N0 0.203756 -0.755869 0.622211 N1 0.39248 -0.67669 0.622937 N2 0.278679 -0.480481 0.83155 + txt003 +STRI + V0 0.384628 -1.38201 2.4875 V1 0 -1.43241 2.4875 V2 0 -1.46655 2.45469 + N0 0.14476 -0.537012 0.831061 N1 -4.5989e-16 -0.556738 0.830688 N2 -1.94969e-16 -0.783289 0.621658 + txt003 +STRI + V0 0 -1.46655 2.45469 V1 0.393796 -1.41495 2.45469 V2 0.384628 -1.38201 2.4875 + N0 -1.94969e-16 -0.783289 0.621658 N1 0.203756 -0.755869 0.622211 N2 0.14476 -0.537012 0.831061 + txt003 +STRI + V0 1.46655 0 2.45469 V1 1.41495 -0.393796 2.45469 V2 1.44722 -0.402778 2.4 + N0 0.783289 0 0.621658 N1 0.755869 -0.203756 0.622211 N2 0.871509 -0.234929 0.430442 + txt003 +STRI + V0 1.44722 -0.402778 2.4 V1 1.5 0 2.4 V2 1.46655 0 2.45469 + N0 0.871509 -0.234929 0.430442 N1 0.902861 0 0.429934 N2 0.783289 0 0.621658 + txt003 +STRI + V0 1.41495 -0.393796 2.45469 V1 1.26884 -0.745225 2.45469 V2 1.29778 -0.762222 2.4 + N0 0.755869 -0.203756 0.622211 N1 0.67669 -0.39248 0.622937 N2 0.780517 -0.4527 0.43111 + txt003 +STRI + V0 1.29778 -0.762222 2.4 V1 1.44722 -0.402778 2.4 V2 1.41495 -0.393796 2.45469 + N0 0.780517 -0.4527 0.43111 N1 0.871509 -0.234929 0.430442 N2 0.755869 -0.203756 0.622211 + txt003 +STRI + V0 1.26884 -0.745225 2.45469 V1 1.04125 -1.04125 2.45469 V2 1.065 -1.065 2.4 + N0 0.67669 -0.39248 0.622937 N1 0.552993 -0.552993 0.623215 N2 0.637936 -0.637936 0.431366 + txt003 +STRI + V0 1.065 -1.065 2.4 V1 1.29778 -0.762222 2.4 V2 1.26884 -0.745225 2.45469 + N0 0.637936 -0.637936 0.431366 N1 0.780517 -0.4527 0.43111 N2 0.67669 -0.39248 0.622937 + txt003 +STRI + V0 1.04125 -1.04125 2.45469 V1 0.745225 -1.26884 2.45469 V2 0.762222 -1.29778 2.4 + N0 0.552993 -0.552993 0.623215 N1 0.39248 -0.67669 0.622937 N2 0.4527 -0.780517 0.43111 + txt003 +STRI + V0 0.762222 -1.29778 2.4 V1 1.065 -1.065 2.4 V2 1.04125 -1.04125 2.45469 + N0 0.4527 -0.780517 0.43111 N1 0.637936 -0.637936 0.431366 N2 0.552993 -0.552993 0.623215 + txt003 +STRI + V0 0.745225 -1.26884 2.45469 V1 0.393796 -1.41495 2.45469 V2 0.402778 -1.44722 2.4 + N0 0.39248 -0.67669 0.622937 N1 0.203756 -0.755869 0.622211 N2 0.234929 -0.871509 0.430442 + txt003 +STRI + V0 0.402778 -1.44722 2.4 V1 0.762222 -1.29778 2.4 V2 0.745225 -1.26884 2.45469 + N0 0.234929 -0.871509 0.430442 N1 0.4527 -0.780517 0.43111 N2 0.39248 -0.67669 0.622937 + txt003 +STRI + V0 0.393796 -1.41495 2.45469 V1 0 -1.46655 2.45469 V2 0 -1.5 2.4 + N0 0.203756 -0.755869 0.622211 N1 -1.94969e-16 -0.783289 0.621658 N2 -6.81889e-17 -0.902861 0.429934 + txt003 +STRI + V0 0 -1.5 2.4 V1 0.402778 -1.44722 2.4 V2 0.393796 -1.41495 2.45469 + N0 -6.81889e-17 -0.902861 0.429934 N1 0.234929 -0.871509 0.430442 N2 0.203756 -0.755869 0.622211 + txt003 +STRI + V0 0 -1.4 2.4 V1 -0.375926 -1.35074 2.4 V2 -0.370922 -1.33276 2.45469 + N0 0 0.902861 -0.429934 N1 0.234929 0.871509 -0.430442 N2 0.257047 0.953562 -0.156989 + txt003 +STRI + V0 -0.370922 -1.33276 2.45469 V1 0 -1.38137 2.45469 V2 0 -1.4 2.4 + N0 0.257047 0.953562 -0.156989 N1 0 0.987636 -0.156768 N2 0 0.902861 -0.429934 + txt003 +STRI + V0 -0.375926 -1.35074 2.4 V1 -0.711407 -1.21126 2.4 V2 -0.701938 -1.19514 2.45469 + N0 0.234929 0.871509 -0.430442 N1 0.4527 0.780517 -0.43111 N2 0.495474 0.854265 -0.157281 + txt003 +STRI + V0 -0.701938 -1.19514 2.45469 V1 -0.370922 -1.33276 2.45469 V2 -0.375926 -1.35074 2.4 + N0 0.495474 0.854265 -0.157281 N1 0.257047 0.953562 -0.156989 N2 0.234929 0.871509 -0.430442 + txt003 +STRI + V0 -0.711407 -1.21126 2.4 V1 -0.994 -0.994 2.4 V2 -0.98077 -0.98077 2.45469 + N0 0.4527 0.780517 -0.43111 N1 0.637936 0.637936 -0.431366 N2 0.698293 0.698293 -0.157393 + txt003 +STRI + V0 -0.98077 -0.98077 2.45469 V1 -0.701938 -1.19514 2.45469 V2 -0.711407 -1.21126 2.4 + N0 0.698293 0.698293 -0.157393 N1 0.495474 0.854265 -0.157281 N2 0.4527 0.780517 -0.43111 + txt003 +STRI + V0 -0.994 -0.994 2.4 V1 -1.21126 -0.711407 2.4 V2 -1.19514 -0.701938 2.45469 + N0 0.637936 0.637936 -0.431366 N1 0.780517 0.4527 -0.43111 N2 0.854265 0.495474 -0.157281 + txt003 +STRI + V0 -1.19514 -0.701938 2.45469 V1 -0.98077 -0.98077 2.45469 V2 -0.994 -0.994 2.4 + N0 0.854265 0.495474 -0.157281 N1 0.698293 0.698293 -0.157393 N2 0.637936 0.637936 -0.431366 + txt003 +STRI + V0 -1.21126 -0.711407 2.4 V1 -1.35074 -0.375926 2.4 V2 -1.33276 -0.370922 2.45469 + N0 0.780517 0.4527 -0.43111 N1 0.871509 0.234929 -0.430442 N2 0.953562 0.257047 -0.156989 + txt003 +STRI + V0 -1.33276 -0.370922 2.45469 V1 -1.19514 -0.701938 2.45469 V2 -1.21126 -0.711407 2.4 + N0 0.953562 0.257047 -0.156989 N1 0.854265 0.495474 -0.157281 N2 0.780517 0.4527 -0.43111 + txt003 +STRI + V0 -1.35074 -0.375926 2.4 V1 -1.4 0 2.4 V2 -1.38137 0 2.45469 + N0 0.871509 0.234929 -0.430442 N1 0.902861 -7.30595e-17 -0.429934 N2 0.987636 9.89971e-17 -0.156768 + txt003 +STRI + V0 -1.38137 0 2.45469 V1 -1.33276 -0.370922 2.45469 V2 -1.35074 -0.375926 2.4 + N0 0.987636 9.89971e-17 -0.156768 N1 0.953562 0.257047 -0.156989 N2 0.871509 0.234929 -0.430442 + txt003 +STRI + V0 0 -1.38137 2.45469 V1 -0.370922 -1.33276 2.45469 V2 -0.371699 -1.33555 2.4875 + N0 0 0.987636 -0.156768 N1 0.257047 0.953562 -0.156989 N2 0.228972 0.849414 0.475466 + txt003 +STRI + V0 -0.371699 -1.33555 2.4875 V1 0 -1.38426 2.4875 V2 0 -1.38137 2.45469 + N0 0.228972 0.849414 0.475466 N1 0 0.880022 0.474933 N2 0 0.987636 -0.156768 + txt003 +STRI + V0 -0.370922 -1.33276 2.45469 V1 -0.701938 -1.19514 2.45469 V2 -0.703409 -1.19764 2.4875 + N0 0.257047 0.953562 -0.156989 N1 0.495474 0.854265 -0.157281 N2 0.441188 0.760669 0.476167 + txt003 +STRI + V0 -0.703409 -1.19764 2.4875 V1 -0.371699 -1.33555 2.4875 V2 -0.370922 -1.33276 2.45469 + N0 0.441188 0.760669 0.476167 N1 0.228972 0.849414 0.475466 N2 0.257047 0.953562 -0.156989 + txt003 +STRI + V0 -0.701938 -1.19514 2.45469 V1 -0.98077 -0.98077 2.45469 V2 -0.982824 -0.982824 2.4875 + N0 0.495474 0.854265 -0.157281 N1 0.698293 0.698293 -0.157393 N2 0.621695 0.621695 0.476435 + txt003 +STRI + V0 -0.982824 -0.982824 2.4875 V1 -0.703409 -1.19764 2.4875 V2 -0.701938 -1.19514 2.45469 + N0 0.621695 0.621695 0.476435 N1 0.441188 0.760669 0.476167 N2 0.495474 0.854265 -0.157281 + txt003 +STRI + V0 -0.98077 -0.98077 2.45469 V1 -1.19514 -0.701938 2.45469 V2 -1.19764 -0.703409 2.4875 + N0 0.698293 0.698293 -0.157393 N1 0.854265 0.495474 -0.157281 N2 0.760669 0.441188 0.476167 + txt003 +STRI + V0 -1.19764 -0.703409 2.4875 V1 -0.982824 -0.982824 2.4875 V2 -0.98077 -0.98077 2.45469 + N0 0.760669 0.441188 0.476167 N1 0.621695 0.621695 0.476435 N2 0.698293 0.698293 -0.157393 + txt003 +STRI + V0 -1.19514 -0.701938 2.45469 V1 -1.33276 -0.370922 2.45469 V2 -1.33555 -0.371699 2.4875 + N0 0.854265 0.495474 -0.157281 N1 0.953562 0.257047 -0.156989 N2 0.849414 0.228972 0.475466 + txt003 +STRI + V0 -1.33555 -0.371699 2.4875 V1 -1.19764 -0.703409 2.4875 V2 -1.19514 -0.701938 2.45469 + N0 0.849414 0.228972 0.475466 N1 0.760669 0.441188 0.476167 N2 0.854265 0.495474 -0.157281 + txt003 +STRI + V0 -1.33276 -0.370922 2.45469 V1 -1.38137 0 2.45469 V2 -1.38426 0 2.4875 + N0 0.953562 0.257047 -0.156989 N1 0.987636 9.89971e-17 -0.156768 N2 0.880022 6.08179e-16 0.474933 + txt003 +STRI + V0 -1.38426 0 2.4875 V1 -1.33555 -0.371699 2.4875 V2 -1.33276 -0.370922 2.45469 + N0 0.880022 6.08179e-16 0.474933 N1 0.849414 0.228972 0.475466 N2 0.953562 0.257047 -0.156989 + txt003 +STRI + V0 0 -1.38426 2.4875 V1 -0.371699 -1.33555 2.4875 V2 -0.376765 -1.35376 2.49844 + N0 0 0.880022 0.474933 N1 0.228972 0.849414 0.475466 N2 -5.93089e-16 -2.13636e-15 1 + txt003 +STRI + V0 -0.376765 -1.35376 2.49844 V1 0 -1.40312 2.49844 V2 0 -1.38426 2.4875 + N0 -5.93089e-16 -2.13636e-15 1 N1 0 -2.22045e-15 1 N2 0 0.880022 0.474933 + txt003 +STRI + V0 -0.371699 -1.33555 2.4875 V1 -0.703409 -1.19764 2.4875 V2 -0.712995 -1.21396 2.49844 + N0 0.228972 0.849414 0.475466 N1 0.441188 0.760669 0.476167 N2 -1.16933e-15 -1.87966e-15 1 + txt003 +STRI + V0 -0.712995 -1.21396 2.49844 V1 -0.376765 -1.35376 2.49844 V2 -0.371699 -1.33555 2.4875 + N0 -1.16933e-15 -1.87966e-15 1 N1 -5.93089e-16 -2.13636e-15 1 N2 0.228972 0.849414 0.475466 + txt003 +STRI + V0 -0.703409 -1.19764 2.4875 V1 -0.982824 -0.982824 2.4875 V2 -0.996219 -0.996219 2.49844 + N0 0.441188 0.760669 0.476167 N1 0.621695 0.621695 0.476435 N2 -1.67359e-15 -1.4538e-15 1 + txt003 +STRI + V0 -0.996219 -0.996219 2.49844 V1 -0.712995 -1.21396 2.49844 V2 -0.703409 -1.19764 2.4875 + N0 -1.67359e-15 -1.4538e-15 1 N1 -1.16933e-15 -1.87966e-15 1 N2 0.441188 0.760669 0.476167 + txt003 +STRI + V0 -0.982824 -0.982824 2.4875 V1 -1.19764 -0.703409 2.4875 V2 -1.21396 -0.712995 2.49844 + N0 0.621695 0.621695 0.476435 N1 0.760669 0.441188 0.476167 N2 -2.05298e-15 -8.74229e-16 1 + txt003 +STRI + V0 -1.21396 -0.712995 2.49844 V1 -0.996219 -0.996219 2.49844 V2 -0.982824 -0.982824 2.4875 + N0 -2.05298e-15 -8.74229e-16 1 N1 -1.67359e-15 -1.4538e-15 1 N2 0.621695 0.621695 0.476435 + txt003 +STRI + V0 -1.19764 -0.703409 2.4875 V1 -1.33555 -0.371699 2.4875 V2 -1.35376 -0.376765 2.49844 + N0 0.760669 0.441188 0.476167 N1 0.849414 0.228972 0.475466 N2 -2.25214e-15 -1.77072e-16 1 + txt003 +STRI + V0 -1.35376 -0.376765 2.49844 V1 -1.21396 -0.712995 2.49844 V2 -1.19764 -0.703409 2.4875 + N0 -2.25214e-15 -1.77072e-16 1 N1 -2.05298e-15 -8.74229e-16 1 N2 0.760669 0.441188 0.476167 + txt003 +STRI + V0 -1.33555 -0.371699 2.4875 V1 -1.38426 0 2.4875 V2 -1.40312 0 2.49844 + N0 0.849414 0.228972 0.475466 N1 0.880022 6.08179e-16 0.474933 N2 -2.22045e-15 5.65179e-16 1 + txt003 +STRI + V0 -1.40312 0 2.49844 V1 -1.35376 -0.376765 2.49844 V2 -1.33555 -0.371699 2.4875 + N0 -2.22045e-15 5.65179e-16 1 N1 -2.25214e-15 -1.77072e-16 1 N2 0.849414 0.228972 0.475466 + txt003 +STRI + V0 0 -1.40312 2.49844 V1 -0.376765 -1.35376 2.49844 V2 -0.384628 -1.38201 2.4875 + N0 0 -2.22045e-15 1 N1 -5.93089e-16 -2.13636e-15 1 N2 -0.14476 -0.537012 0.831061 + txt003 +STRI + V0 -0.384628 -1.38201 2.4875 V1 0 -1.43241 2.4875 V2 0 -1.40312 2.49844 + N0 -0.14476 -0.537012 0.831061 N1 0 -0.556738 0.830688 N2 0 -2.22045e-15 1 + txt003 +STRI + V0 -0.376765 -1.35376 2.49844 V1 -0.712995 -1.21396 2.49844 V2 -0.727875 -1.2393 2.4875 + N0 -5.93089e-16 -2.13636e-15 1 N1 -1.16933e-15 -1.87966e-15 1 N2 -0.278679 -0.480481 0.83155 + txt003 +STRI + V0 -0.727875 -1.2393 2.4875 V1 -0.384628 -1.38201 2.4875 V2 -0.376765 -1.35376 2.49844 + N0 -0.278679 -0.480481 0.83155 N1 -0.14476 -0.537012 0.831061 N2 -5.93089e-16 -2.13636e-15 1 + txt003 +STRI + V0 -0.712995 -1.21396 2.49844 V1 -0.996219 -0.996219 2.49844 V2 -1.01701 -1.01701 2.4875 + N0 -1.16933e-15 -1.87966e-15 1 N1 -1.67359e-15 -1.4538e-15 1 N2 -0.392564 -0.392564 0.831737 + txt003 +STRI + V0 -1.01701 -1.01701 2.4875 V1 -0.727875 -1.2393 2.4875 V2 -0.712995 -1.21396 2.49844 + N0 -0.392564 -0.392564 0.831737 N1 -0.278679 -0.480481 0.83155 N2 -1.16933e-15 -1.87966e-15 1 + txt003 +STRI + V0 -0.996219 -0.996219 2.49844 V1 -1.21396 -0.712995 2.49844 V2 -1.2393 -0.727875 2.4875 + N0 -1.67359e-15 -1.4538e-15 1 N1 -2.05298e-15 -8.74229e-16 1 N2 -0.480481 -0.278679 0.83155 + txt003 +STRI + V0 -1.2393 -0.727875 2.4875 V1 -1.01701 -1.01701 2.4875 V2 -0.996219 -0.996219 2.49844 + N0 -0.480481 -0.278679 0.83155 N1 -0.392564 -0.392564 0.831737 N2 -1.67359e-15 -1.4538e-15 1 + txt003 +STRI + V0 -1.21396 -0.712995 2.49844 V1 -1.35376 -0.376765 2.49844 V2 -1.38201 -0.384628 2.4875 + N0 -2.05298e-15 -8.74229e-16 1 N1 -2.25214e-15 -1.77072e-16 1 N2 -0.537012 -0.14476 0.831061 + txt003 +STRI + V0 -1.38201 -0.384628 2.4875 V1 -1.2393 -0.727875 2.4875 V2 -1.21396 -0.712995 2.49844 + N0 -0.537012 -0.14476 0.831061 N1 -0.480481 -0.278679 0.83155 N2 -2.05298e-15 -8.74229e-16 1 + txt003 +STRI + V0 -1.35376 -0.376765 2.49844 V1 -1.40312 0 2.49844 V2 -1.43241 0 2.4875 + N0 -2.25214e-15 -1.77072e-16 1 N1 -2.22045e-15 5.65179e-16 1 N2 -0.556738 4.5989e-16 0.830688 + txt003 +STRI + V0 -1.43241 0 2.4875 V1 -1.38201 -0.384628 2.4875 V2 -1.35376 -0.376765 2.49844 + N0 -0.556738 4.5989e-16 0.830688 N1 -0.537012 -0.14476 0.831061 N2 -2.25214e-15 -1.77072e-16 1 + txt003 +STRI + V0 0 -1.43241 2.4875 V1 -0.384628 -1.38201 2.4875 V2 -0.393796 -1.41495 2.45469 + N0 0 -0.556738 0.830688 N1 -0.14476 -0.537012 0.831061 N2 -0.203756 -0.755869 0.622211 + txt003 +STRI + V0 -0.393796 -1.41495 2.45469 V1 0 -1.46655 2.45469 V2 0 -1.43241 2.4875 + N0 -0.203756 -0.755869 0.622211 N1 0 -0.783289 0.621658 N2 0 -0.556738 0.830688 + txt003 +STRI + V0 -0.384628 -1.38201 2.4875 V1 -0.727875 -1.2393 2.4875 V2 -0.745225 -1.26884 2.45469 + N0 -0.14476 -0.537012 0.831061 N1 -0.278679 -0.480481 0.83155 N2 -0.39248 -0.67669 0.622937 + txt003 +STRI + V0 -0.745225 -1.26884 2.45469 V1 -0.393796 -1.41495 2.45469 V2 -0.384628 -1.38201 2.4875 + N0 -0.39248 -0.67669 0.622937 N1 -0.203756 -0.755869 0.622211 N2 -0.14476 -0.537012 0.831061 + txt003 +STRI + V0 -0.727875 -1.2393 2.4875 V1 -1.01701 -1.01701 2.4875 V2 -1.04125 -1.04125 2.45469 + N0 -0.278679 -0.480481 0.83155 N1 -0.392564 -0.392564 0.831737 N2 -0.552993 -0.552993 0.623215 + txt003 +STRI + V0 -1.04125 -1.04125 2.45469 V1 -0.745225 -1.26884 2.45469 V2 -0.727875 -1.2393 2.4875 + N0 -0.552993 -0.552993 0.623215 N1 -0.39248 -0.67669 0.622937 N2 -0.278679 -0.480481 0.83155 + txt003 +STRI + V0 -1.01701 -1.01701 2.4875 V1 -1.2393 -0.727875 2.4875 V2 -1.26884 -0.745225 2.45469 + N0 -0.392564 -0.392564 0.831737 N1 -0.480481 -0.278679 0.83155 N2 -0.67669 -0.39248 0.622937 + txt003 +STRI + V0 -1.26884 -0.745225 2.45469 V1 -1.04125 -1.04125 2.45469 V2 -1.01701 -1.01701 2.4875 + N0 -0.67669 -0.39248 0.622937 N1 -0.552993 -0.552993 0.623215 N2 -0.392564 -0.392564 0.831737 + txt003 +STRI + V0 -1.2393 -0.727875 2.4875 V1 -1.38201 -0.384628 2.4875 V2 -1.41495 -0.393796 2.45469 + N0 -0.480481 -0.278679 0.83155 N1 -0.537012 -0.14476 0.831061 N2 -0.755869 -0.203756 0.622211 + txt003 +STRI + V0 -1.41495 -0.393796 2.45469 V1 -1.26884 -0.745225 2.45469 V2 -1.2393 -0.727875 2.4875 + N0 -0.755869 -0.203756 0.622211 N1 -0.67669 -0.39248 0.622937 N2 -0.480481 -0.278679 0.83155 + txt003 +STRI + V0 -1.38201 -0.384628 2.4875 V1 -1.43241 0 2.4875 V2 -1.46655 0 2.45469 + N0 -0.537012 -0.14476 0.831061 N1 -0.556738 4.5989e-16 0.830688 N2 -0.783289 1.94969e-16 0.621658 + txt003 +STRI + V0 -1.46655 0 2.45469 V1 -1.41495 -0.393796 2.45469 V2 -1.38201 -0.384628 2.4875 + N0 -0.783289 1.94969e-16 0.621658 N1 -0.755869 -0.203756 0.622211 N2 -0.537012 -0.14476 0.831061 + txt003 +STRI + V0 0 -1.46655 2.45469 V1 -0.393796 -1.41495 2.45469 V2 -0.402778 -1.44722 2.4 + N0 0 -0.783289 0.621658 N1 -0.203756 -0.755869 0.622211 N2 -0.234929 -0.871509 0.430442 + txt003 +STRI + V0 -0.402778 -1.44722 2.4 V1 0 -1.5 2.4 V2 0 -1.46655 2.45469 + N0 -0.234929 -0.871509 0.430442 N1 0 -0.902861 0.429934 N2 0 -0.783289 0.621658 + txt003 +STRI + V0 -0.393796 -1.41495 2.45469 V1 -0.745225 -1.26884 2.45469 V2 -0.762222 -1.29778 2.4 + N0 -0.203756 -0.755869 0.622211 N1 -0.39248 -0.67669 0.622937 N2 -0.4527 -0.780517 0.43111 + txt003 +STRI + V0 -0.762222 -1.29778 2.4 V1 -0.402778 -1.44722 2.4 V2 -0.393796 -1.41495 2.45469 + N0 -0.4527 -0.780517 0.43111 N1 -0.234929 -0.871509 0.430442 N2 -0.203756 -0.755869 0.622211 + txt003 +STRI + V0 -0.745225 -1.26884 2.45469 V1 -1.04125 -1.04125 2.45469 V2 -1.065 -1.065 2.4 + N0 -0.39248 -0.67669 0.622937 N1 -0.552993 -0.552993 0.623215 N2 -0.637936 -0.637936 0.431366 + txt003 +STRI + V0 -1.065 -1.065 2.4 V1 -0.762222 -1.29778 2.4 V2 -0.745225 -1.26884 2.45469 + N0 -0.637936 -0.637936 0.431366 N1 -0.4527 -0.780517 0.43111 N2 -0.39248 -0.67669 0.622937 + txt003 +STRI + V0 -1.04125 -1.04125 2.45469 V1 -1.26884 -0.745225 2.45469 V2 -1.29778 -0.762222 2.4 + N0 -0.552993 -0.552993 0.623215 N1 -0.67669 -0.39248 0.622937 N2 -0.780517 -0.4527 0.43111 + txt003 +STRI + V0 -1.29778 -0.762222 2.4 V1 -1.065 -1.065 2.4 V2 -1.04125 -1.04125 2.45469 + N0 -0.780517 -0.4527 0.43111 N1 -0.637936 -0.637936 0.431366 N2 -0.552993 -0.552993 0.623215 + txt003 +STRI + V0 -1.26884 -0.745225 2.45469 V1 -1.41495 -0.393796 2.45469 V2 -1.44722 -0.402778 2.4 + N0 -0.67669 -0.39248 0.622937 N1 -0.755869 -0.203756 0.622211 N2 -0.871509 -0.234929 0.430442 + txt003 +STRI + V0 -1.44722 -0.402778 2.4 V1 -1.29778 -0.762222 2.4 V2 -1.26884 -0.745225 2.45469 + N0 -0.871509 -0.234929 0.430442 N1 -0.780517 -0.4527 0.43111 N2 -0.67669 -0.39248 0.622937 + txt003 +STRI + V0 -1.41495 -0.393796 2.45469 V1 -1.46655 0 2.45469 V2 -1.5 0 2.4 + N0 -0.755869 -0.203756 0.622211 N1 -0.783289 1.94969e-16 0.621658 N2 -0.902861 6.81889e-17 0.429934 + txt003 +STRI + V0 -1.5 0 2.4 V1 -1.44722 -0.402778 2.4 V2 -1.41495 -0.393796 2.45469 + N0 -0.902861 6.81889e-17 0.429934 N1 -0.871509 -0.234929 0.430442 N2 -0.755869 -0.203756 0.622211 + txt003 +STRI + V0 -1.4 0 2.4 V1 -1.35074 0.375926 2.4 V2 -1.33276 0.370922 2.45469 + N0 0.902861 0 -0.429934 N1 0.871509 -0.234929 -0.430442 N2 0.953562 -0.257047 -0.156989 + txt003 +STRI + V0 -1.33276 0.370922 2.45469 V1 -1.38137 0 2.45469 V2 -1.4 0 2.4 + N0 0.953562 -0.257047 -0.156989 N1 0.987636 0 -0.156768 N2 0.902861 0 -0.429934 + txt003 +STRI + V0 -1.35074 0.375926 2.4 V1 -1.21126 0.711407 2.4 V2 -1.19514 0.701938 2.45469 + N0 0.871509 -0.234929 -0.430442 N1 0.780517 -0.4527 -0.43111 N2 0.854265 -0.495474 -0.157281 + txt003 +STRI + V0 -1.19514 0.701938 2.45469 V1 -1.33276 0.370922 2.45469 V2 -1.35074 0.375926 2.4 + N0 0.854265 -0.495474 -0.157281 N1 0.953562 -0.257047 -0.156989 N2 0.871509 -0.234929 -0.430442 + txt003 +STRI + V0 -1.21126 0.711407 2.4 V1 -0.994 0.994 2.4 V2 -0.98077 0.98077 2.45469 + N0 0.780517 -0.4527 -0.43111 N1 0.637936 -0.637936 -0.431366 N2 0.698293 -0.698293 -0.157393 + txt003 +STRI + V0 -0.98077 0.98077 2.45469 V1 -1.19514 0.701938 2.45469 V2 -1.21126 0.711407 2.4 + N0 0.698293 -0.698293 -0.157393 N1 0.854265 -0.495474 -0.157281 N2 0.780517 -0.4527 -0.43111 + txt003 +STRI + V0 -0.994 0.994 2.4 V1 -0.711407 1.21126 2.4 V2 -0.701938 1.19514 2.45469 + N0 0.637936 -0.637936 -0.431366 N1 0.4527 -0.780517 -0.43111 N2 0.495474 -0.854265 -0.157281 + txt003 +STRI + V0 -0.701938 1.19514 2.45469 V1 -0.98077 0.98077 2.45469 V2 -0.994 0.994 2.4 + N0 0.495474 -0.854265 -0.157281 N1 0.698293 -0.698293 -0.157393 N2 0.637936 -0.637936 -0.431366 + txt003 +STRI + V0 -0.711407 1.21126 2.4 V1 -0.375926 1.35074 2.4 V2 -0.370922 1.33276 2.45469 + N0 0.4527 -0.780517 -0.43111 N1 0.234929 -0.871509 -0.430442 N2 0.257047 -0.953562 -0.156989 + txt003 +STRI + V0 -0.370922 1.33276 2.45469 V1 -0.701938 1.19514 2.45469 V2 -0.711407 1.21126 2.4 + N0 0.257047 -0.953562 -0.156989 N1 0.495474 -0.854265 -0.157281 N2 0.4527 -0.780517 -0.43111 + txt003 +STRI + V0 -0.375926 1.35074 2.4 V1 0 1.4 2.4 V2 0 1.38137 2.45469 + N0 0.234929 -0.871509 -0.430442 N1 -7.30595e-17 -0.902861 -0.429934 N2 9.89971e-17 -0.987636 -0.156768 + txt003 +STRI + V0 0 1.38137 2.45469 V1 -0.370922 1.33276 2.45469 V2 -0.375926 1.35074 2.4 + N0 9.89971e-17 -0.987636 -0.156768 N1 0.257047 -0.953562 -0.156989 N2 0.234929 -0.871509 -0.430442 + txt003 +STRI + V0 -1.38137 0 2.45469 V1 -1.33276 0.370922 2.45469 V2 -1.33555 0.371699 2.4875 + N0 0.987636 0 -0.156768 N1 0.953562 -0.257047 -0.156989 N2 0.849414 -0.228972 0.475466 + txt003 +STRI + V0 -1.33555 0.371699 2.4875 V1 -1.38426 0 2.4875 V2 -1.38137 0 2.45469 + N0 0.849414 -0.228972 0.475466 N1 0.880022 -0 0.474933 N2 0.987636 0 -0.156768 + txt003 +STRI + V0 -1.33276 0.370922 2.45469 V1 -1.19514 0.701938 2.45469 V2 -1.19764 0.703409 2.4875 + N0 0.953562 -0.257047 -0.156989 N1 0.854265 -0.495474 -0.157281 N2 0.760669 -0.441188 0.476167 + txt003 +STRI + V0 -1.19764 0.703409 2.4875 V1 -1.33555 0.371699 2.4875 V2 -1.33276 0.370922 2.45469 + N0 0.760669 -0.441188 0.476167 N1 0.849414 -0.228972 0.475466 N2 0.953562 -0.257047 -0.156989 + txt003 +STRI + V0 -1.19514 0.701938 2.45469 V1 -0.98077 0.98077 2.45469 V2 -0.982824 0.982824 2.4875 + N0 0.854265 -0.495474 -0.157281 N1 0.698293 -0.698293 -0.157393 N2 0.621695 -0.621695 0.476435 + txt003 +STRI + V0 -0.982824 0.982824 2.4875 V1 -1.19764 0.703409 2.4875 V2 -1.19514 0.701938 2.45469 + N0 0.621695 -0.621695 0.476435 N1 0.760669 -0.441188 0.476167 N2 0.854265 -0.495474 -0.157281 + txt003 +STRI + V0 -0.98077 0.98077 2.45469 V1 -0.701938 1.19514 2.45469 V2 -0.703409 1.19764 2.4875 + N0 0.698293 -0.698293 -0.157393 N1 0.495474 -0.854265 -0.157281 N2 0.441188 -0.760669 0.476167 + txt003 +STRI + V0 -0.703409 1.19764 2.4875 V1 -0.982824 0.982824 2.4875 V2 -0.98077 0.98077 2.45469 + N0 0.441188 -0.760669 0.476167 N1 0.621695 -0.621695 0.476435 N2 0.698293 -0.698293 -0.157393 + txt003 +STRI + V0 -0.701938 1.19514 2.45469 V1 -0.370922 1.33276 2.45469 V2 -0.371699 1.33555 2.4875 + N0 0.495474 -0.854265 -0.157281 N1 0.257047 -0.953562 -0.156989 N2 0.228972 -0.849414 0.475466 + txt003 +STRI + V0 -0.371699 1.33555 2.4875 V1 -0.703409 1.19764 2.4875 V2 -0.701938 1.19514 2.45469 + N0 0.228972 -0.849414 0.475466 N1 0.441188 -0.760669 0.476167 N2 0.495474 -0.854265 -0.157281 + txt003 +STRI + V0 -0.370922 1.33276 2.45469 V1 0 1.38137 2.45469 V2 0 1.38426 2.4875 + N0 0.257047 -0.953562 -0.156989 N1 9.89971e-17 -0.987636 -0.156768 N2 6.08179e-16 -0.880022 0.474933 + txt003 +STRI + V0 0 1.38426 2.4875 V1 -0.371699 1.33555 2.4875 V2 -0.370922 1.33276 2.45469 + N0 6.08179e-16 -0.880022 0.474933 N1 0.228972 -0.849414 0.475466 N2 0.257047 -0.953562 -0.156989 + txt003 +STRI + V0 -1.38426 0 2.4875 V1 -1.33555 0.371699 2.4875 V2 -1.35376 0.376765 2.49844 + N0 0.880022 -0 0.474933 N1 0.849414 -0.228972 0.475466 N2 -2.13636e-15 5.93089e-16 1 + txt003 +STRI + V0 -1.35376 0.376765 2.49844 V1 -1.40312 0 2.49844 V2 -1.38426 0 2.4875 + N0 -2.13636e-15 5.93089e-16 1 N1 -2.22045e-15 0 1 N2 0.880022 -0 0.474933 + txt003 +STRI + V0 -1.33555 0.371699 2.4875 V1 -1.19764 0.703409 2.4875 V2 -1.21396 0.712995 2.49844 + N0 0.849414 -0.228972 0.475466 N1 0.760669 -0.441188 0.476167 N2 -1.87966e-15 1.16933e-15 1 + txt003 +STRI + V0 -1.21396 0.712995 2.49844 V1 -1.35376 0.376765 2.49844 V2 -1.33555 0.371699 2.4875 + N0 -1.87966e-15 1.16933e-15 1 N1 -2.13636e-15 5.93089e-16 1 N2 0.849414 -0.228972 0.475466 + txt003 +STRI + V0 -1.19764 0.703409 2.4875 V1 -0.982824 0.982824 2.4875 V2 -0.996219 0.996219 2.49844 + N0 0.760669 -0.441188 0.476167 N1 0.621695 -0.621695 0.476435 N2 -1.4538e-15 1.67359e-15 1 + txt003 +STRI + V0 -0.996219 0.996219 2.49844 V1 -1.21396 0.712995 2.49844 V2 -1.19764 0.703409 2.4875 + N0 -1.4538e-15 1.67359e-15 1 N1 -1.87966e-15 1.16933e-15 1 N2 0.760669 -0.441188 0.476167 + txt003 +STRI + V0 -0.982824 0.982824 2.4875 V1 -0.703409 1.19764 2.4875 V2 -0.712995 1.21396 2.49844 + N0 0.621695 -0.621695 0.476435 N1 0.441188 -0.760669 0.476167 N2 -8.74229e-16 2.05298e-15 1 + txt003 +STRI + V0 -0.712995 1.21396 2.49844 V1 -0.996219 0.996219 2.49844 V2 -0.982824 0.982824 2.4875 + N0 -8.74229e-16 2.05298e-15 1 N1 -1.4538e-15 1.67359e-15 1 N2 0.621695 -0.621695 0.476435 + txt003 +STRI + V0 -0.703409 1.19764 2.4875 V1 -0.371699 1.33555 2.4875 V2 -0.376765 1.35376 2.49844 + N0 0.441188 -0.760669 0.476167 N1 0.228972 -0.849414 0.475466 N2 -1.77072e-16 2.25214e-15 1 + txt003 +STRI + V0 -0.376765 1.35376 2.49844 V1 -0.712995 1.21396 2.49844 V2 -0.703409 1.19764 2.4875 + N0 -1.77072e-16 2.25214e-15 1 N1 -8.74229e-16 2.05298e-15 1 N2 0.441188 -0.760669 0.476167 + txt003 +STRI + V0 -0.371699 1.33555 2.4875 V1 0 1.38426 2.4875 V2 0 1.40312 2.49844 + N0 0.228972 -0.849414 0.475466 N1 6.08179e-16 -0.880022 0.474933 N2 5.65179e-16 2.22045e-15 1 + txt003 +STRI + V0 0 1.40312 2.49844 V1 -0.376765 1.35376 2.49844 V2 -0.371699 1.33555 2.4875 + N0 5.65179e-16 2.22045e-15 1 N1 -1.77072e-16 2.25214e-15 1 N2 0.228972 -0.849414 0.475466 + txt003 +STRI + V0 -1.40312 0 2.49844 V1 -1.35376 0.376765 2.49844 V2 -1.38201 0.384628 2.4875 + N0 -2.22045e-15 0 1 N1 -2.13636e-15 5.93089e-16 1 N2 -0.537012 0.14476 0.831061 + txt003 +STRI + V0 -1.38201 0.384628 2.4875 V1 -1.43241 0 2.4875 V2 -1.40312 0 2.49844 + N0 -0.537012 0.14476 0.831061 N1 -0.556738 0 0.830688 N2 -2.22045e-15 0 1 + txt003 +STRI + V0 -1.35376 0.376765 2.49844 V1 -1.21396 0.712995 2.49844 V2 -1.2393 0.727875 2.4875 + N0 -2.13636e-15 5.93089e-16 1 N1 -1.87966e-15 1.16933e-15 1 N2 -0.480481 0.278679 0.83155 + txt003 +STRI + V0 -1.2393 0.727875 2.4875 V1 -1.38201 0.384628 2.4875 V2 -1.35376 0.376765 2.49844 + N0 -0.480481 0.278679 0.83155 N1 -0.537012 0.14476 0.831061 N2 -2.13636e-15 5.93089e-16 1 + txt003 +STRI + V0 -1.21396 0.712995 2.49844 V1 -0.996219 0.996219 2.49844 V2 -1.01701 1.01701 2.4875 + N0 -1.87966e-15 1.16933e-15 1 N1 -1.4538e-15 1.67359e-15 1 N2 -0.392564 0.392564 0.831737 + txt003 +STRI + V0 -1.01701 1.01701 2.4875 V1 -1.2393 0.727875 2.4875 V2 -1.21396 0.712995 2.49844 + N0 -0.392564 0.392564 0.831737 N1 -0.480481 0.278679 0.83155 N2 -1.87966e-15 1.16933e-15 1 + txt003 +STRI + V0 -0.996219 0.996219 2.49844 V1 -0.712995 1.21396 2.49844 V2 -0.727875 1.2393 2.4875 + N0 -1.4538e-15 1.67359e-15 1 N1 -8.74229e-16 2.05298e-15 1 N2 -0.278679 0.480481 0.83155 + txt003 +STRI + V0 -0.727875 1.2393 2.4875 V1 -1.01701 1.01701 2.4875 V2 -0.996219 0.996219 2.49844 + N0 -0.278679 0.480481 0.83155 N1 -0.392564 0.392564 0.831737 N2 -1.4538e-15 1.67359e-15 1 + txt003 +STRI + V0 -0.712995 1.21396 2.49844 V1 -0.376765 1.35376 2.49844 V2 -0.384628 1.38201 2.4875 + N0 -8.74229e-16 2.05298e-15 1 N1 -1.77072e-16 2.25214e-15 1 N2 -0.14476 0.537012 0.831061 + txt003 +STRI + V0 -0.384628 1.38201 2.4875 V1 -0.727875 1.2393 2.4875 V2 -0.712995 1.21396 2.49844 + N0 -0.14476 0.537012 0.831061 N1 -0.278679 0.480481 0.83155 N2 -8.74229e-16 2.05298e-15 1 + txt003 +STRI + V0 -0.376765 1.35376 2.49844 V1 0 1.40312 2.49844 V2 0 1.43241 2.4875 + N0 -1.77072e-16 2.25214e-15 1 N1 5.65179e-16 2.22045e-15 1 N2 4.5989e-16 0.556738 0.830688 + txt003 +STRI + V0 0 1.43241 2.4875 V1 -0.384628 1.38201 2.4875 V2 -0.376765 1.35376 2.49844 + N0 4.5989e-16 0.556738 0.830688 N1 -0.14476 0.537012 0.831061 N2 -1.77072e-16 2.25214e-15 1 + txt003 +STRI + V0 -1.43241 0 2.4875 V1 -1.38201 0.384628 2.4875 V2 -1.41495 0.393796 2.45469 + N0 -0.556738 0 0.830688 N1 -0.537012 0.14476 0.831061 N2 -0.755869 0.203756 0.622211 + txt003 +STRI + V0 -1.41495 0.393796 2.45469 V1 -1.46655 0 2.45469 V2 -1.43241 0 2.4875 + N0 -0.755869 0.203756 0.622211 N1 -0.783289 0 0.621658 N2 -0.556738 0 0.830688 + txt003 +STRI + V0 -1.38201 0.384628 2.4875 V1 -1.2393 0.727875 2.4875 V2 -1.26884 0.745225 2.45469 + N0 -0.537012 0.14476 0.831061 N1 -0.480481 0.278679 0.83155 N2 -0.67669 0.39248 0.622937 + txt003 +STRI + V0 -1.26884 0.745225 2.45469 V1 -1.41495 0.393796 2.45469 V2 -1.38201 0.384628 2.4875 + N0 -0.67669 0.39248 0.622937 N1 -0.755869 0.203756 0.622211 N2 -0.537012 0.14476 0.831061 + txt003 +STRI + V0 -1.2393 0.727875 2.4875 V1 -1.01701 1.01701 2.4875 V2 -1.04125 1.04125 2.45469 + N0 -0.480481 0.278679 0.83155 N1 -0.392564 0.392564 0.831737 N2 -0.552993 0.552993 0.623215 + txt003 +STRI + V0 -1.04125 1.04125 2.45469 V1 -1.26884 0.745225 2.45469 V2 -1.2393 0.727875 2.4875 + N0 -0.552993 0.552993 0.623215 N1 -0.67669 0.39248 0.622937 N2 -0.480481 0.278679 0.83155 + txt003 +STRI + V0 -1.01701 1.01701 2.4875 V1 -0.727875 1.2393 2.4875 V2 -0.745225 1.26884 2.45469 + N0 -0.392564 0.392564 0.831737 N1 -0.278679 0.480481 0.83155 N2 -0.39248 0.67669 0.622937 + txt003 +STRI + V0 -0.745225 1.26884 2.45469 V1 -1.04125 1.04125 2.45469 V2 -1.01701 1.01701 2.4875 + N0 -0.39248 0.67669 0.622937 N1 -0.552993 0.552993 0.623215 N2 -0.392564 0.392564 0.831737 + txt003 +STRI + V0 -0.727875 1.2393 2.4875 V1 -0.384628 1.38201 2.4875 V2 -0.393796 1.41495 2.45469 + N0 -0.278679 0.480481 0.83155 N1 -0.14476 0.537012 0.831061 N2 -0.203756 0.755869 0.622211 + txt003 +STRI + V0 -0.393796 1.41495 2.45469 V1 -0.745225 1.26884 2.45469 V2 -0.727875 1.2393 2.4875 + N0 -0.203756 0.755869 0.622211 N1 -0.39248 0.67669 0.622937 N2 -0.278679 0.480481 0.83155 + txt003 +STRI + V0 -0.384628 1.38201 2.4875 V1 0 1.43241 2.4875 V2 0 1.46655 2.45469 + N0 -0.14476 0.537012 0.831061 N1 4.5989e-16 0.556738 0.830688 N2 1.94969e-16 0.783289 0.621658 + txt003 +STRI + V0 0 1.46655 2.45469 V1 -0.393796 1.41495 2.45469 V2 -0.384628 1.38201 2.4875 + N0 1.94969e-16 0.783289 0.621658 N1 -0.203756 0.755869 0.622211 N2 -0.14476 0.537012 0.831061 + txt003 +STRI + V0 -1.46655 0 2.45469 V1 -1.41495 0.393796 2.45469 V2 -1.44722 0.402778 2.4 + N0 -0.783289 0 0.621658 N1 -0.755869 0.203756 0.622211 N2 -0.871509 0.234929 0.430442 + txt003 +STRI + V0 -1.44722 0.402778 2.4 V1 -1.5 0 2.4 V2 -1.46655 0 2.45469 + N0 -0.871509 0.234929 0.430442 N1 -0.902861 0 0.429934 N2 -0.783289 0 0.621658 + txt003 +STRI + V0 -1.41495 0.393796 2.45469 V1 -1.26884 0.745225 2.45469 V2 -1.29778 0.762222 2.4 + N0 -0.755869 0.203756 0.622211 N1 -0.67669 0.39248 0.622937 N2 -0.780517 0.4527 0.43111 + txt003 +STRI + V0 -1.29778 0.762222 2.4 V1 -1.44722 0.402778 2.4 V2 -1.41495 0.393796 2.45469 + N0 -0.780517 0.4527 0.43111 N1 -0.871509 0.234929 0.430442 N2 -0.755869 0.203756 0.622211 + txt003 +STRI + V0 -1.26884 0.745225 2.45469 V1 -1.04125 1.04125 2.45469 V2 -1.065 1.065 2.4 + N0 -0.67669 0.39248 0.622937 N1 -0.552993 0.552993 0.623215 N2 -0.637936 0.637936 0.431366 + txt003 +STRI + V0 -1.065 1.065 2.4 V1 -1.29778 0.762222 2.4 V2 -1.26884 0.745225 2.45469 + N0 -0.637936 0.637936 0.431366 N1 -0.780517 0.4527 0.43111 N2 -0.67669 0.39248 0.622937 + txt003 +STRI + V0 -1.04125 1.04125 2.45469 V1 -0.745225 1.26884 2.45469 V2 -0.762222 1.29778 2.4 + N0 -0.552993 0.552993 0.623215 N1 -0.39248 0.67669 0.622937 N2 -0.4527 0.780517 0.43111 + txt003 +STRI + V0 -0.762222 1.29778 2.4 V1 -1.065 1.065 2.4 V2 -1.04125 1.04125 2.45469 + N0 -0.4527 0.780517 0.43111 N1 -0.637936 0.637936 0.431366 N2 -0.552993 0.552993 0.623215 + txt003 +STRI + V0 -0.745225 1.26884 2.45469 V1 -0.393796 1.41495 2.45469 V2 -0.402778 1.44722 2.4 + N0 -0.39248 0.67669 0.622937 N1 -0.203756 0.755869 0.622211 N2 -0.234929 0.871509 0.430442 + txt003 +STRI + V0 -0.402778 1.44722 2.4 V1 -0.762222 1.29778 2.4 V2 -0.745225 1.26884 2.45469 + N0 -0.234929 0.871509 0.430442 N1 -0.4527 0.780517 0.43111 N2 -0.39248 0.67669 0.622937 + txt003 +STRI + V0 -0.393796 1.41495 2.45469 V1 0 1.46655 2.45469 V2 0 1.5 2.4 + N0 -0.203756 0.755869 0.622211 N1 1.94969e-16 0.783289 0.621658 N2 6.81889e-17 0.902861 0.429934 + txt003 +STRI + V0 0 1.5 2.4 V1 -0.402778 1.44722 2.4 V2 -0.393796 1.41495 2.45469 + N0 6.81889e-17 0.902861 0.429934 N1 -0.234929 0.871509 0.430442 N2 -0.203756 0.755869 0.622211 + txt003 +STRI + V0 0 1.4 2.4 V1 0.375926 1.35074 2.4 V2 0.370922 1.33276 2.45469 + N0 0 -0.902861 -0.429934 N1 -0.234929 -0.871509 -0.430442 N2 -0.257047 -0.953562 -0.156989 + txt003 +STRI + V0 0.370922 1.33276 2.45469 V1 0 1.38137 2.45469 V2 0 1.4 2.4 + N0 -0.257047 -0.953562 -0.156989 N1 0 -0.987636 -0.156768 N2 0 -0.902861 -0.429934 + txt003 +STRI + V0 0.375926 1.35074 2.4 V1 0.711407 1.21126 2.4 V2 0.701938 1.19514 2.45469 + N0 -0.234929 -0.871509 -0.430442 N1 -0.4527 -0.780517 -0.43111 N2 -0.495474 -0.854265 -0.157281 + txt003 +STRI + V0 0.701938 1.19514 2.45469 V1 0.370922 1.33276 2.45469 V2 0.375926 1.35074 2.4 + N0 -0.495474 -0.854265 -0.157281 N1 -0.257047 -0.953562 -0.156989 N2 -0.234929 -0.871509 -0.430442 + txt003 +STRI + V0 0.711407 1.21126 2.4 V1 0.994 0.994 2.4 V2 0.98077 0.98077 2.45469 + N0 -0.4527 -0.780517 -0.43111 N1 -0.637936 -0.637936 -0.431366 N2 -0.698293 -0.698293 -0.157393 + txt003 +STRI + V0 0.98077 0.98077 2.45469 V1 0.701938 1.19514 2.45469 V2 0.711407 1.21126 2.4 + N0 -0.698293 -0.698293 -0.157393 N1 -0.495474 -0.854265 -0.157281 N2 -0.4527 -0.780517 -0.43111 + txt003 +STRI + V0 0.994 0.994 2.4 V1 1.21126 0.711407 2.4 V2 1.19514 0.701938 2.45469 + N0 -0.637936 -0.637936 -0.431366 N1 -0.780517 -0.4527 -0.43111 N2 -0.854265 -0.495474 -0.157281 + txt003 +STRI + V0 1.19514 0.701938 2.45469 V1 0.98077 0.98077 2.45469 V2 0.994 0.994 2.4 + N0 -0.854265 -0.495474 -0.157281 N1 -0.698293 -0.698293 -0.157393 N2 -0.637936 -0.637936 -0.431366 + txt003 +STRI + V0 1.21126 0.711407 2.4 V1 1.35074 0.375926 2.4 V2 1.33276 0.370922 2.45469 + N0 -0.780517 -0.4527 -0.43111 N1 -0.871509 -0.234929 -0.430442 N2 -0.953562 -0.257047 -0.156989 + txt003 +STRI + V0 1.33276 0.370922 2.45469 V1 1.19514 0.701938 2.45469 V2 1.21126 0.711407 2.4 + N0 -0.953562 -0.257047 -0.156989 N1 -0.854265 -0.495474 -0.157281 N2 -0.780517 -0.4527 -0.43111 + txt003 +STRI + V0 1.35074 0.375926 2.4 V1 1.4 0 2.4 V2 1.38137 0 2.45469 + N0 -0.871509 -0.234929 -0.430442 N1 -0.902861 7.30595e-17 -0.429934 N2 -0.987636 -9.89971e-17 -0.156768 + txt003 +STRI + V0 1.38137 0 2.45469 V1 1.33276 0.370922 2.45469 V2 1.35074 0.375926 2.4 + N0 -0.987636 -9.89971e-17 -0.156768 N1 -0.953562 -0.257047 -0.156989 N2 -0.871509 -0.234929 -0.430442 + txt003 +STRI + V0 0 1.38137 2.45469 V1 0.370922 1.33276 2.45469 V2 0.371699 1.33555 2.4875 + N0 0 -0.987636 -0.156768 N1 -0.257047 -0.953562 -0.156989 N2 -0.228972 -0.849414 0.475466 + txt003 +STRI + V0 0.371699 1.33555 2.4875 V1 0 1.38426 2.4875 V2 0 1.38137 2.45469 + N0 -0.228972 -0.849414 0.475466 N1 0 -0.880022 0.474933 N2 0 -0.987636 -0.156768 + txt003 +STRI + V0 0.370922 1.33276 2.45469 V1 0.701938 1.19514 2.45469 V2 0.703409 1.19764 2.4875 + N0 -0.257047 -0.953562 -0.156989 N1 -0.495474 -0.854265 -0.157281 N2 -0.441188 -0.760669 0.476167 + txt003 +STRI + V0 0.703409 1.19764 2.4875 V1 0.371699 1.33555 2.4875 V2 0.370922 1.33276 2.45469 + N0 -0.441188 -0.760669 0.476167 N1 -0.228972 -0.849414 0.475466 N2 -0.257047 -0.953562 -0.156989 + txt003 +STRI + V0 0.701938 1.19514 2.45469 V1 0.98077 0.98077 2.45469 V2 0.982824 0.982824 2.4875 + N0 -0.495474 -0.854265 -0.157281 N1 -0.698293 -0.698293 -0.157393 N2 -0.621695 -0.621695 0.476435 + txt003 +STRI + V0 0.982824 0.982824 2.4875 V1 0.703409 1.19764 2.4875 V2 0.701938 1.19514 2.45469 + N0 -0.621695 -0.621695 0.476435 N1 -0.441188 -0.760669 0.476167 N2 -0.495474 -0.854265 -0.157281 + txt003 +STRI + V0 0.98077 0.98077 2.45469 V1 1.19514 0.701938 2.45469 V2 1.19764 0.703409 2.4875 + N0 -0.698293 -0.698293 -0.157393 N1 -0.854265 -0.495474 -0.157281 N2 -0.760669 -0.441188 0.476167 + txt003 +STRI + V0 1.19764 0.703409 2.4875 V1 0.982824 0.982824 2.4875 V2 0.98077 0.98077 2.45469 + N0 -0.760669 -0.441188 0.476167 N1 -0.621695 -0.621695 0.476435 N2 -0.698293 -0.698293 -0.157393 + txt003 +STRI + V0 1.19514 0.701938 2.45469 V1 1.33276 0.370922 2.45469 V2 1.33555 0.371699 2.4875 + N0 -0.854265 -0.495474 -0.157281 N1 -0.953562 -0.257047 -0.156989 N2 -0.849414 -0.228972 0.475466 + txt003 +STRI + V0 1.33555 0.371699 2.4875 V1 1.19764 0.703409 2.4875 V2 1.19514 0.701938 2.45469 + N0 -0.849414 -0.228972 0.475466 N1 -0.760669 -0.441188 0.476167 N2 -0.854265 -0.495474 -0.157281 + txt003 +STRI + V0 1.33276 0.370922 2.45469 V1 1.38137 0 2.45469 V2 1.38426 0 2.4875 + N0 -0.953562 -0.257047 -0.156989 N1 -0.987636 -9.89971e-17 -0.156768 N2 -0.880022 -6.08179e-16 0.474933 + txt003 +STRI + V0 1.38426 0 2.4875 V1 1.33555 0.371699 2.4875 V2 1.33276 0.370922 2.45469 + N0 -0.880022 -6.08179e-16 0.474933 N1 -0.849414 -0.228972 0.475466 N2 -0.953562 -0.257047 -0.156989 + txt003 +STRI + V0 0 1.38426 2.4875 V1 0.371699 1.33555 2.4875 V2 0.376765 1.35376 2.49844 + N0 0 -0.880022 0.474933 N1 -0.228972 -0.849414 0.475466 N2 5.93089e-16 2.13636e-15 1 + txt003 +STRI + V0 0.376765 1.35376 2.49844 V1 0 1.40312 2.49844 V2 0 1.38426 2.4875 + N0 5.93089e-16 2.13636e-15 1 N1 -0 2.22045e-15 1 N2 0 -0.880022 0.474933 + txt003 +STRI + V0 0.371699 1.33555 2.4875 V1 0.703409 1.19764 2.4875 V2 0.712995 1.21396 2.49844 + N0 -0.228972 -0.849414 0.475466 N1 -0.441188 -0.760669 0.476167 N2 1.16933e-15 1.87966e-15 1 + txt003 +STRI + V0 0.712995 1.21396 2.49844 V1 0.376765 1.35376 2.49844 V2 0.371699 1.33555 2.4875 + N0 1.16933e-15 1.87966e-15 1 N1 5.93089e-16 2.13636e-15 1 N2 -0.228972 -0.849414 0.475466 + txt003 +STRI + V0 0.703409 1.19764 2.4875 V1 0.982824 0.982824 2.4875 V2 0.996219 0.996219 2.49844 + N0 -0.441188 -0.760669 0.476167 N1 -0.621695 -0.621695 0.476435 N2 1.67359e-15 1.4538e-15 1 + txt003 +STRI + V0 0.996219 0.996219 2.49844 V1 0.712995 1.21396 2.49844 V2 0.703409 1.19764 2.4875 + N0 1.67359e-15 1.4538e-15 1 N1 1.16933e-15 1.87966e-15 1 N2 -0.441188 -0.760669 0.476167 + txt003 +STRI + V0 0.982824 0.982824 2.4875 V1 1.19764 0.703409 2.4875 V2 1.21396 0.712995 2.49844 + N0 -0.621695 -0.621695 0.476435 N1 -0.760669 -0.441188 0.476167 N2 2.05298e-15 8.74229e-16 1 + txt003 +STRI + V0 1.21396 0.712995 2.49844 V1 0.996219 0.996219 2.49844 V2 0.982824 0.982824 2.4875 + N0 2.05298e-15 8.74229e-16 1 N1 1.67359e-15 1.4538e-15 1 N2 -0.621695 -0.621695 0.476435 + txt003 +STRI + V0 1.19764 0.703409 2.4875 V1 1.33555 0.371699 2.4875 V2 1.35376 0.376765 2.49844 + N0 -0.760669 -0.441188 0.476167 N1 -0.849414 -0.228972 0.475466 N2 2.25214e-15 1.77072e-16 1 + txt003 +STRI + V0 1.35376 0.376765 2.49844 V1 1.21396 0.712995 2.49844 V2 1.19764 0.703409 2.4875 + N0 2.25214e-15 1.77072e-16 1 N1 2.05298e-15 8.74229e-16 1 N2 -0.760669 -0.441188 0.476167 + txt003 +STRI + V0 1.33555 0.371699 2.4875 V1 1.38426 0 2.4875 V2 1.40312 0 2.49844 + N0 -0.849414 -0.228972 0.475466 N1 -0.880022 -6.08179e-16 0.474933 N2 2.22045e-15 -5.65179e-16 1 + txt003 +STRI + V0 1.40312 0 2.49844 V1 1.35376 0.376765 2.49844 V2 1.33555 0.371699 2.4875 + N0 2.22045e-15 -5.65179e-16 1 N1 2.25214e-15 1.77072e-16 1 N2 -0.849414 -0.228972 0.475466 + txt003 +STRI + V0 0 1.40312 2.49844 V1 0.376765 1.35376 2.49844 V2 0.384628 1.38201 2.4875 + N0 -0 2.22045e-15 1 N1 5.93089e-16 2.13636e-15 1 N2 0.14476 0.537012 0.831061 + txt003 +STRI + V0 0.384628 1.38201 2.4875 V1 0 1.43241 2.4875 V2 0 1.40312 2.49844 + N0 0.14476 0.537012 0.831061 N1 -0 0.556738 0.830688 N2 -0 2.22045e-15 1 + txt003 +STRI + V0 0.376765 1.35376 2.49844 V1 0.712995 1.21396 2.49844 V2 0.727875 1.2393 2.4875 + N0 5.93089e-16 2.13636e-15 1 N1 1.16933e-15 1.87966e-15 1 N2 0.278679 0.480481 0.83155 + txt003 +STRI + V0 0.727875 1.2393 2.4875 V1 0.384628 1.38201 2.4875 V2 0.376765 1.35376 2.49844 + N0 0.278679 0.480481 0.83155 N1 0.14476 0.537012 0.831061 N2 5.93089e-16 2.13636e-15 1 + txt003 +STRI + V0 0.712995 1.21396 2.49844 V1 0.996219 0.996219 2.49844 V2 1.01701 1.01701 2.4875 + N0 1.16933e-15 1.87966e-15 1 N1 1.67359e-15 1.4538e-15 1 N2 0.392564 0.392564 0.831737 + txt003 +STRI + V0 1.01701 1.01701 2.4875 V1 0.727875 1.2393 2.4875 V2 0.712995 1.21396 2.49844 + N0 0.392564 0.392564 0.831737 N1 0.278679 0.480481 0.83155 N2 1.16933e-15 1.87966e-15 1 + txt003 +STRI + V0 0.996219 0.996219 2.49844 V1 1.21396 0.712995 2.49844 V2 1.2393 0.727875 2.4875 + N0 1.67359e-15 1.4538e-15 1 N1 2.05298e-15 8.74229e-16 1 N2 0.480481 0.278679 0.83155 + txt003 +STRI + V0 1.2393 0.727875 2.4875 V1 1.01701 1.01701 2.4875 V2 0.996219 0.996219 2.49844 + N0 0.480481 0.278679 0.83155 N1 0.392564 0.392564 0.831737 N2 1.67359e-15 1.4538e-15 1 + txt003 +STRI + V0 1.21396 0.712995 2.49844 V1 1.35376 0.376765 2.49844 V2 1.38201 0.384628 2.4875 + N0 2.05298e-15 8.74229e-16 1 N1 2.25214e-15 1.77072e-16 1 N2 0.537012 0.14476 0.831061 + txt003 +STRI + V0 1.38201 0.384628 2.4875 V1 1.2393 0.727875 2.4875 V2 1.21396 0.712995 2.49844 + N0 0.537012 0.14476 0.831061 N1 0.480481 0.278679 0.83155 N2 2.05298e-15 8.74229e-16 1 + txt003 +STRI + V0 1.35376 0.376765 2.49844 V1 1.40312 0 2.49844 V2 1.43241 0 2.4875 + N0 2.25214e-15 1.77072e-16 1 N1 2.22045e-15 -5.65179e-16 1 N2 0.556738 -4.5989e-16 0.830688 + txt003 +STRI + V0 1.43241 0 2.4875 V1 1.38201 0.384628 2.4875 V2 1.35376 0.376765 2.49844 + N0 0.556738 -4.5989e-16 0.830688 N1 0.537012 0.14476 0.831061 N2 2.25214e-15 1.77072e-16 1 + txt003 +STRI + V0 0 1.43241 2.4875 V1 0.384628 1.38201 2.4875 V2 0.393796 1.41495 2.45469 + N0 -0 0.556738 0.830688 N1 0.14476 0.537012 0.831061 N2 0.203756 0.755869 0.622211 + txt003 +STRI + V0 0.393796 1.41495 2.45469 V1 0 1.46655 2.45469 V2 0 1.43241 2.4875 + N0 0.203756 0.755869 0.622211 N1 -0 0.783289 0.621658 N2 -0 0.556738 0.830688 + txt003 +STRI + V0 0.384628 1.38201 2.4875 V1 0.727875 1.2393 2.4875 V2 0.745225 1.26884 2.45469 + N0 0.14476 0.537012 0.831061 N1 0.278679 0.480481 0.83155 N2 0.39248 0.67669 0.622937 + txt003 +STRI + V0 0.745225 1.26884 2.45469 V1 0.393796 1.41495 2.45469 V2 0.384628 1.38201 2.4875 + N0 0.39248 0.67669 0.622937 N1 0.203756 0.755869 0.622211 N2 0.14476 0.537012 0.831061 + txt003 +STRI + V0 0.727875 1.2393 2.4875 V1 1.01701 1.01701 2.4875 V2 1.04125 1.04125 2.45469 + N0 0.278679 0.480481 0.83155 N1 0.392564 0.392564 0.831737 N2 0.552993 0.552993 0.623215 + txt003 +STRI + V0 1.04125 1.04125 2.45469 V1 0.745225 1.26884 2.45469 V2 0.727875 1.2393 2.4875 + N0 0.552993 0.552993 0.623215 N1 0.39248 0.67669 0.622937 N2 0.278679 0.480481 0.83155 + txt003 +STRI + V0 1.01701 1.01701 2.4875 V1 1.2393 0.727875 2.4875 V2 1.26884 0.745225 2.45469 + N0 0.392564 0.392564 0.831737 N1 0.480481 0.278679 0.83155 N2 0.67669 0.39248 0.622937 + txt003 +STRI + V0 1.26884 0.745225 2.45469 V1 1.04125 1.04125 2.45469 V2 1.01701 1.01701 2.4875 + N0 0.67669 0.39248 0.622937 N1 0.552993 0.552993 0.623215 N2 0.392564 0.392564 0.831737 + txt003 +STRI + V0 1.2393 0.727875 2.4875 V1 1.38201 0.384628 2.4875 V2 1.41495 0.393796 2.45469 + N0 0.480481 0.278679 0.83155 N1 0.537012 0.14476 0.831061 N2 0.755869 0.203756 0.622211 + txt003 +STRI + V0 1.41495 0.393796 2.45469 V1 1.26884 0.745225 2.45469 V2 1.2393 0.727875 2.4875 + N0 0.755869 0.203756 0.622211 N1 0.67669 0.39248 0.622937 N2 0.480481 0.278679 0.83155 + txt003 +STRI + V0 1.38201 0.384628 2.4875 V1 1.43241 0 2.4875 V2 1.46655 0 2.45469 + N0 0.537012 0.14476 0.831061 N1 0.556738 -4.5989e-16 0.830688 N2 0.783289 -1.94969e-16 0.621658 + txt003 +STRI + V0 1.46655 0 2.45469 V1 1.41495 0.393796 2.45469 V2 1.38201 0.384628 2.4875 + N0 0.783289 -1.94969e-16 0.621658 N1 0.755869 0.203756 0.622211 N2 0.537012 0.14476 0.831061 + txt003 +STRI + V0 0 1.46655 2.45469 V1 0.393796 1.41495 2.45469 V2 0.402778 1.44722 2.4 + N0 -0 0.783289 0.621658 N1 0.203756 0.755869 0.622211 N2 0.234929 0.871509 0.430442 + txt003 +STRI + V0 0.402778 1.44722 2.4 V1 0 1.5 2.4 V2 0 1.46655 2.45469 + N0 0.234929 0.871509 0.430442 N1 -0 0.902861 0.429934 N2 -0 0.783289 0.621658 + txt003 +STRI + V0 0.393796 1.41495 2.45469 V1 0.745225 1.26884 2.45469 V2 0.762222 1.29778 2.4 + N0 0.203756 0.755869 0.622211 N1 0.39248 0.67669 0.622937 N2 0.4527 0.780517 0.43111 + txt003 +STRI + V0 0.762222 1.29778 2.4 V1 0.402778 1.44722 2.4 V2 0.393796 1.41495 2.45469 + N0 0.4527 0.780517 0.43111 N1 0.234929 0.871509 0.430442 N2 0.203756 0.755869 0.622211 + txt003 +STRI + V0 0.745225 1.26884 2.45469 V1 1.04125 1.04125 2.45469 V2 1.065 1.065 2.4 + N0 0.39248 0.67669 0.622937 N1 0.552993 0.552993 0.623215 N2 0.637936 0.637936 0.431366 + txt003 +STRI + V0 1.065 1.065 2.4 V1 0.762222 1.29778 2.4 V2 0.745225 1.26884 2.45469 + N0 0.637936 0.637936 0.431366 N1 0.4527 0.780517 0.43111 N2 0.39248 0.67669 0.622937 + txt003 +STRI + V0 1.04125 1.04125 2.45469 V1 1.26884 0.745225 2.45469 V2 1.29778 0.762222 2.4 + N0 0.552993 0.552993 0.623215 N1 0.67669 0.39248 0.622937 N2 0.780517 0.4527 0.43111 + txt003 +STRI + V0 1.29778 0.762222 2.4 V1 1.065 1.065 2.4 V2 1.04125 1.04125 2.45469 + N0 0.780517 0.4527 0.43111 N1 0.637936 0.637936 0.431366 N2 0.552993 0.552993 0.623215 + txt003 +STRI + V0 1.26884 0.745225 2.45469 V1 1.41495 0.393796 2.45469 V2 1.44722 0.402778 2.4 + N0 0.67669 0.39248 0.622937 N1 0.755869 0.203756 0.622211 N2 0.871509 0.234929 0.430442 + txt003 +STRI + V0 1.44722 0.402778 2.4 V1 1.29778 0.762222 2.4 V2 1.26884 0.745225 2.45469 + N0 0.871509 0.234929 0.430442 N1 0.780517 0.4527 0.43111 N2 0.67669 0.39248 0.622937 + txt003 +STRI + V0 1.41495 0.393796 2.45469 V1 1.46655 0 2.45469 V2 1.5 0 2.4 + N0 0.755869 0.203756 0.622211 N1 0.783289 -1.94969e-16 0.621658 N2 0.902861 -6.81889e-17 0.429934 + txt003 +STRI + V0 1.5 0 2.4 V1 1.44722 0.402778 2.4 V2 1.41495 0.393796 2.45469 + N0 0.902861 -6.81889e-17 0.429934 N1 0.871509 0.234929 0.430442 N2 0.755869 0.203756 0.622211 + txt003 +STRI + V0 1.5 0 2.4 V1 1.44722 -0.402778 2.4 V2 1.56671 -0.436032 2.13785 + N0 0.902861 0 0.429934 N1 0.871509 -0.234929 0.430442 N2 0.875348 -0.235963 0.422003 + txt003 +STRI + V0 1.56671 -0.436032 2.13785 V1 1.62384 0 2.13785 V2 1.5 0 2.4 + N0 0.875348 -0.235963 0.422003 N1 0.906828 0 0.4215 N2 0.902861 0 0.429934 + txt003 +STRI + V0 1.44722 -0.402778 2.4 V1 1.29778 -0.762222 2.4 V2 1.40492 -0.825153 2.13785 + N0 0.871509 -0.234929 0.430442 N1 0.780517 -0.4527 0.43111 N2 0.783966 -0.4547 0.422664 + txt003 +STRI + V0 1.40492 -0.825153 2.13785 V1 1.56671 -0.436032 2.13785 V2 1.44722 -0.402778 2.4 + N0 0.783966 -0.4547 0.422664 N1 0.875348 -0.235963 0.422003 N2 0.871509 -0.234929 0.430442 + txt003 +STRI + V0 1.29778 -0.762222 2.4 V1 1.065 -1.065 2.4 V2 1.15293 -1.15293 2.13785 + N0 0.780517 -0.4527 0.43111 N1 0.637936 -0.637936 0.431366 N2 0.640758 -0.640758 0.422917 + txt003 +STRI + V0 1.15293 -1.15293 2.13785 V1 1.40492 -0.825153 2.13785 V2 1.29778 -0.762222 2.4 + N0 0.640758 -0.640758 0.422917 N1 0.783966 -0.4547 0.422664 N2 0.780517 -0.4527 0.43111 + txt003 +STRI + V0 1.065 -1.065 2.4 V1 0.762222 -1.29778 2.4 V2 0.825153 -1.40492 2.13785 + N0 0.637936 -0.637936 0.431366 N1 0.4527 -0.780517 0.43111 N2 0.4547 -0.783966 0.422664 + txt003 +STRI + V0 0.825153 -1.40492 2.13785 V1 1.15293 -1.15293 2.13785 V2 1.065 -1.065 2.4 + N0 0.4547 -0.783966 0.422664 N1 0.640758 -0.640758 0.422917 N2 0.637936 -0.637936 0.431366 + txt003 +STRI + V0 0.762222 -1.29778 2.4 V1 0.402778 -1.44722 2.4 V2 0.436032 -1.56671 2.13785 + N0 0.4527 -0.780517 0.43111 N1 0.234929 -0.871509 0.430442 N2 0.235963 -0.875348 0.422003 + txt003 +STRI + V0 0.436032 -1.56671 2.13785 V1 0.825153 -1.40492 2.13785 V2 0.762222 -1.29778 2.4 + N0 0.235963 -0.875348 0.422003 N1 0.4547 -0.783966 0.422664 N2 0.4527 -0.780517 0.43111 + txt003 +STRI + V0 0.402778 -1.44722 2.4 V1 0 -1.5 2.4 V2 2.22045e-16 -1.62384 2.13785 + N0 0.234929 -0.871509 0.430442 N1 -2.27296e-16 -0.902861 0.429934 N2 -2.05843e-16 -0.906828 0.4215 + txt003 +STRI + V0 2.22045e-16 -1.62384 2.13785 V1 0.436032 -1.56671 2.13785 V2 0.402778 -1.44722 2.4 + N0 -2.05843e-16 -0.906828 0.4215 N1 0.235963 -0.875348 0.422003 N2 0.234929 -0.871509 0.430442 + txt003 +STRI + V0 1.62384 0 2.13785 V1 1.56671 -0.436032 2.13785 V2 1.67949 -0.467421 1.87778 + N0 0.906828 0 0.4215 N1 0.875348 -0.235963 0.422003 N2 0.886771 -0.239043 0.395595 + txt003 +STRI + V0 1.67949 -0.467421 1.87778 V1 1.74074 0 1.87778 V2 1.62384 0 2.13785 + N0 0.886771 -0.239043 0.395595 N1 0.918633 0 0.395111 N2 0.906828 0 0.4215 + txt003 +STRI + V0 1.56671 -0.436032 2.13785 V1 1.40492 -0.825153 2.13785 V2 1.50606 -0.884554 1.87778 + N0 0.875348 -0.235963 0.422003 N1 0.783966 -0.4547 0.422664 N2 0.794229 -0.460653 0.39623 + txt003 +STRI + V0 1.50606 -0.884554 1.87778 V1 1.67949 -0.467421 1.87778 V2 1.56671 -0.436032 2.13785 + N0 0.794229 -0.460653 0.39623 N1 0.886771 -0.239043 0.395595 N2 0.875348 -0.235963 0.422003 + txt003 +STRI + V0 1.40492 -0.825153 2.13785 V1 1.15293 -1.15293 2.13785 V2 1.23593 -1.23593 1.87778 + N0 0.783966 -0.4547 0.422664 N1 0.640758 -0.640758 0.422917 N2 0.649156 -0.649156 0.396474 + txt003 +STRI + V0 1.23593 -1.23593 1.87778 V1 1.50606 -0.884554 1.87778 V2 1.40492 -0.825153 2.13785 + N0 0.649156 -0.649156 0.396474 N1 0.794229 -0.460653 0.39623 N2 0.783966 -0.4547 0.422664 + txt003 +STRI + V0 1.15293 -1.15293 2.13785 V1 0.825153 -1.40492 2.13785 V2 0.884554 -1.50606 1.87778 + N0 0.640758 -0.640758 0.422917 N1 0.4547 -0.783966 0.422664 N2 0.460653 -0.794229 0.39623 + txt003 +STRI + V0 0.884554 -1.50606 1.87778 V1 1.23593 -1.23593 1.87778 V2 1.15293 -1.15293 2.13785 + N0 0.460653 -0.794229 0.39623 N1 0.649156 -0.649156 0.396474 N2 0.640758 -0.640758 0.422917 + txt003 +STRI + V0 0.825153 -1.40492 2.13785 V1 0.436032 -1.56671 2.13785 V2 0.467421 -1.67949 1.87778 + N0 0.4547 -0.783966 0.422664 N1 0.235963 -0.875348 0.422003 N2 0.239043 -0.886771 0.395595 + txt003 +STRI + V0 0.467421 -1.67949 1.87778 V1 0.884554 -1.50606 1.87778 V2 0.825153 -1.40492 2.13785 + N0 0.239043 -0.886771 0.395595 N1 0.460653 -0.794229 0.39623 N2 0.4547 -0.783966 0.422664 + txt003 +STRI + V0 0.436032 -1.56671 2.13785 V1 2.22045e-16 -1.62384 2.13785 V2 0 -1.74074 1.87778 + N0 0.235963 -0.875348 0.422003 N1 -2.05843e-16 -0.906828 0.4215 N2 -1.79998e-16 -0.918633 0.395111 + txt003 +STRI + V0 0 -1.74074 1.87778 V1 0.467421 -1.67949 1.87778 V2 0.436032 -1.56671 2.13785 + N0 -1.79998e-16 -0.918633 0.395111 N1 0.239043 -0.886771 0.395595 N2 0.235963 -0.875348 0.422003 + txt003 +STRI + V0 1.74074 0 1.87778 V1 1.67949 -0.467421 1.87778 V2 1.77888 -0.495081 1.62188 + N0 0.918633 0 0.395111 N1 0.886771 -0.239043 0.395595 N2 0.90527 -0.244029 0.347757 + txt003 +STRI + V0 1.77888 -0.495081 1.62188 V1 1.84375 0 1.62188 V2 1.74074 0 1.87778 + N0 0.90527 -0.244029 0.347757 N1 0.937749 0 0.347314 N2 0.918633 0 0.395111 + txt003 +STRI + V0 1.67949 -0.467421 1.87778 V1 1.50606 -0.884554 1.87778 V2 1.59519 -0.936898 1.62188 + N0 0.886771 -0.239043 0.395595 N1 0.794229 -0.460653 0.39623 N2 0.810853 -0.470295 0.34834 + txt003 +STRI + V0 1.59519 -0.936898 1.62188 V1 1.77888 -0.495081 1.62188 V2 1.67949 -0.467421 1.87778 + N0 0.810853 -0.470295 0.34834 N1 0.90527 -0.244029 0.347757 N2 0.886771 -0.239043 0.395595 + txt003 +STRI + V0 1.50606 -0.884554 1.87778 V1 1.23593 -1.23593 1.87778 V2 1.30906 -1.30906 1.62188 + N0 0.794229 -0.460653 0.39623 N1 0.649156 -0.649156 0.396474 N2 0.662761 -0.662761 0.348563 + txt003 +STRI + V0 1.30906 -1.30906 1.62188 V1 1.59519 -0.936898 1.62188 V2 1.50606 -0.884554 1.87778 + N0 0.662761 -0.662761 0.348563 N1 0.810853 -0.470295 0.34834 N2 0.794229 -0.460653 0.39623 + txt003 +STRI + V0 1.23593 -1.23593 1.87778 V1 0.884554 -1.50606 1.87778 V2 0.936898 -1.59519 1.62187 + N0 0.649156 -0.649156 0.396474 N1 0.460653 -0.794229 0.39623 N2 0.470295 -0.810853 0.34834 + txt003 +STRI + V0 0.936898 -1.59519 1.62187 V1 1.30906 -1.30906 1.62188 V2 1.23593 -1.23593 1.87778 + N0 0.470295 -0.810853 0.34834 N1 0.662761 -0.662761 0.348563 N2 0.649156 -0.649156 0.396474 + txt003 +STRI + V0 0.884554 -1.50606 1.87778 V1 0.467421 -1.67949 1.87778 V2 0.495081 -1.77888 1.62187 + N0 0.460653 -0.794229 0.39623 N1 0.239043 -0.886771 0.395595 N2 0.244029 -0.90527 0.347757 + txt003 +STRI + V0 0.495081 -1.77888 1.62187 V1 0.936898 -1.59519 1.62187 V2 0.884554 -1.50606 1.87778 + N0 0.244029 -0.90527 0.347757 N1 0.470295 -0.810853 0.34834 N2 0.460653 -0.794229 0.39623 + txt003 +STRI + V0 0.467421 -1.67949 1.87778 V1 0 -1.74074 1.87778 V2 0 -1.84375 1.62187 + N0 0.239043 -0.886771 0.395595 N1 -1.79998e-16 -0.918633 0.395111 N2 -1.49384e-16 -0.937749 0.347314 + txt003 +STRI + V0 0 -1.84375 1.62187 V1 0.495081 -1.77888 1.62187 V2 0.467421 -1.67949 1.87778 + N0 -1.49384e-16 -0.937749 0.347314 N1 0.244029 -0.90527 0.347757 N2 0.239043 -0.886771 0.395595 + txt003 +STRI + V0 1.84375 0 1.62188 V1 1.77888 -0.495081 1.62188 V2 1.85816 -0.517147 1.37222 + N0 0.937749 0 0.347314 N1 0.90527 -0.244029 0.347757 N2 0.929073 -0.250446 0.272213 + txt003 +STRI + V0 1.85816 -0.517147 1.37222 V1 1.92593 0 1.37222 V2 1.84375 0 1.62188 + N0 0.929073 -0.250446 0.272213 N1 0.96234 0 0.271848 N2 0.937749 0 0.347314 + txt003 +STRI + V0 1.77888 -0.495081 1.62188 V1 1.59519 -0.936898 1.62188 V2 1.66628 -0.978656 1.37222 + N0 0.90527 -0.244029 0.347757 N1 0.810853 -0.470295 0.34834 N2 0.832247 -0.482704 0.272693 + txt003 +STRI + V0 1.66628 -0.978656 1.37222 V1 1.85816 -0.517147 1.37222 V2 1.77888 -0.495081 1.62188 + N0 0.832247 -0.482704 0.272693 N1 0.929073 -0.250446 0.272213 N2 0.90527 -0.244029 0.347757 + txt003 +STRI + V0 1.59519 -0.936898 1.62188 V1 1.30906 -1.30906 1.62188 V2 1.36741 -1.36741 1.37222 + N0 0.810853 -0.470295 0.34834 N1 0.662761 -0.662761 0.348563 N2 0.680271 -0.680271 0.272877 + txt003 +STRI + V0 1.36741 -1.36741 1.37222 V1 1.66628 -0.978656 1.37222 V2 1.59519 -0.936898 1.62188 + N0 0.680271 -0.680271 0.272877 N1 0.832247 -0.482704 0.272693 N2 0.810853 -0.470295 0.34834 + txt003 +STRI + V0 1.30906 -1.30906 1.62188 V1 0.936898 -1.59519 1.62187 V2 0.978656 -1.66628 1.37222 + N0 0.662761 -0.662761 0.348563 N1 0.470295 -0.810853 0.34834 N2 0.482704 -0.832247 0.272693 + txt003 +STRI + V0 0.978656 -1.66628 1.37222 V1 1.36741 -1.36741 1.37222 V2 1.30906 -1.30906 1.62188 + N0 0.482704 -0.832247 0.272693 N1 0.680271 -0.680271 0.272877 N2 0.662761 -0.662761 0.348563 + txt003 +STRI + V0 0.936898 -1.59519 1.62187 V1 0.495081 -1.77888 1.62187 V2 0.517147 -1.85816 1.37222 + N0 0.470295 -0.810853 0.34834 N1 0.244029 -0.90527 0.347757 N2 0.250446 -0.929073 0.272213 + txt003 +STRI + V0 0.517147 -1.85816 1.37222 V1 0.978656 -1.66628 1.37222 V2 0.936898 -1.59519 1.62187 + N0 0.250446 -0.929073 0.272213 N1 0.482704 -0.832247 0.272693 N2 0.470295 -0.810853 0.34834 + txt003 +STRI + V0 0.495081 -1.77888 1.62187 V1 0 -1.84375 1.62187 V2 2.22045e-16 -1.92593 1.37222 + N0 0.244029 -0.90527 0.347757 N1 -1.49384e-16 -0.937749 0.347314 N2 -1.11936e-16 -0.96234 0.271848 + txt003 +STRI + V0 2.22045e-16 -1.92593 1.37222 V1 0.517147 -1.85816 1.37222 V2 0.495081 -1.77888 1.62187 + N0 -1.11936e-16 -0.96234 0.271848 N1 0.250446 -0.929073 0.272213 N2 0.244029 -0.90527 0.347757 + txt003 +STRI + V0 1.92593 0 1.37222 V1 1.85816 -0.517147 1.37222 V2 1.91065 -0.531754 1.1309 + N0 0.96234 0 0.271848 N1 0.929073 -0.250446 0.272213 N2 0.953145 -0.256935 0.159686 + txt003 +STRI + V0 1.91065 -0.531754 1.1309 V1 1.98032 0 1.1309 V2 1.92593 0 1.37222 + N0 0.953145 -0.256935 0.159686 N1 0.987204 0 0.15946 N2 0.96234 0 0.271848 + txt003 +STRI + V0 1.85816 -0.517147 1.37222 V1 1.66628 -0.978656 1.37222 V2 1.71335 -1.0063 1.1309 + N0 0.929073 -0.250446 0.272213 N1 0.832247 -0.482704 0.272693 N2 0.853889 -0.495256 0.159982 + txt003 +STRI + V0 1.71335 -1.0063 1.1309 V1 1.91065 -0.531754 1.1309 V2 1.85816 -0.517147 1.37222 + N0 0.853889 -0.495256 0.159982 N1 0.953145 -0.256935 0.159686 N2 0.929073 -0.250446 0.272213 + txt003 +STRI + V0 1.66628 -0.978656 1.37222 V1 1.36741 -1.36741 1.37222 V2 1.40603 -1.40603 1.1309 + N0 0.832247 -0.482704 0.272693 N1 0.680271 -0.680271 0.272877 N2 0.697986 -0.697986 0.160096 + txt003 +STRI + V0 1.40603 -1.40603 1.1309 V1 1.71335 -1.0063 1.1309 V2 1.66628 -0.978656 1.37222 + N0 0.697986 -0.697986 0.160096 N1 0.853889 -0.495256 0.159982 N2 0.832247 -0.482704 0.272693 + txt003 +STRI + V0 1.36741 -1.36741 1.37222 V1 0.978656 -1.66628 1.37222 V2 1.0063 -1.71335 1.1309 + N0 0.680271 -0.680271 0.272877 N1 0.482704 -0.832247 0.272693 N2 0.495256 -0.853889 0.159982 + txt003 +STRI + V0 1.0063 -1.71335 1.1309 V1 1.40603 -1.40603 1.1309 V2 1.36741 -1.36741 1.37222 + N0 0.495256 -0.853889 0.159982 N1 0.697986 -0.697986 0.160096 N2 0.680271 -0.680271 0.272877 + txt003 +STRI + V0 0.978656 -1.66628 1.37222 V1 0.517147 -1.85816 1.37222 V2 0.531754 -1.91065 1.1309 + N0 0.482704 -0.832247 0.272693 N1 0.250446 -0.929073 0.272213 N2 0.256935 -0.953145 0.159686 + txt003 +STRI + V0 0.531754 -1.91065 1.1309 V1 1.0063 -1.71335 1.1309 V2 0.978656 -1.66628 1.37222 + N0 0.256935 -0.953145 0.159686 N1 0.495256 -0.853889 0.159982 N2 0.482704 -0.832247 0.272693 + txt003 +STRI + V0 0.517147 -1.85816 1.37222 V1 2.22045e-16 -1.92593 1.37222 V2 -2.22045e-16 -1.98032 1.1309 + N0 0.250446 -0.929073 0.272213 N1 -1.11936e-16 -0.96234 0.271848 N2 -6.38555e-17 -0.987204 0.15946 + txt003 +STRI + V0 -2.22045e-16 -1.98032 1.1309 V1 0.531754 -1.91065 1.1309 V2 0.517147 -1.85816 1.37222 + N0 -6.38555e-17 -0.987204 0.15946 N1 0.256935 -0.953145 0.159686 N2 0.250446 -0.929073 0.272213 + txt003 +STRI + V0 1.98032 0 1.1309 V1 1.91065 -0.531754 1.1309 V2 1.92963 -0.537037 0.9 + N0 0.987204 0 0.15946 N1 0.953145 -0.256935 0.159686 N2 0.965535 -0.260275 5.17854e-17 + txt003 +STRI + V0 1.92963 -0.537037 0.9 V1 2 0 0.9 V2 1.98032 0 1.1309 + N0 0.965535 -0.260275 5.17854e-17 N1 1 0 0 N2 0.987204 0 0.15946 + txt003 +STRI + V0 1.91065 -0.531754 1.1309 V1 1.71335 -1.0063 1.1309 V2 1.73037 -1.0163 0.9 + N0 0.953145 -0.256935 0.159686 N1 0.853889 -0.495256 0.159982 N2 0.865031 -0.501718 1.36587e-16 + txt003 +STRI + V0 1.73037 -1.0163 0.9 V1 1.92963 -0.537037 0.9 V2 1.91065 -0.531754 1.1309 + N0 0.865031 -0.501718 1.36587e-16 N1 0.965535 -0.260275 5.17854e-17 N2 0.953145 -0.256935 0.159686 + txt003 +STRI + V0 1.71335 -1.0063 1.1309 V1 1.40603 -1.40603 1.1309 V2 1.42 -1.42 0.9 + N0 0.853889 -0.495256 0.159982 N1 0.697986 -0.697986 0.160096 N2 0.707107 -0.707107 1.74455e-16 + txt003 +STRI + V0 1.42 -1.42 0.9 V1 1.73037 -1.0163 0.9 V2 1.71335 -1.0063 1.1309 + N0 0.707107 -0.707107 1.74455e-16 N1 0.865031 -0.501718 1.36587e-16 N2 0.853889 -0.495256 0.159982 + txt003 +STRI + V0 1.40603 -1.40603 1.1309 V1 1.0063 -1.71335 1.1309 V2 1.0163 -1.73037 0.9 + N0 0.697986 -0.697986 0.160096 N1 0.495256 -0.853889 0.159982 N2 0.501718 -0.865031 1.36587e-16 + txt003 +STRI + V0 1.0163 -1.73037 0.9 V1 1.42 -1.42 0.9 V2 1.40603 -1.40603 1.1309 + N0 0.501718 -0.865031 1.36587e-16 N1 0.707107 -0.707107 1.74455e-16 N2 0.697986 -0.697986 0.160096 + txt003 +STRI + V0 1.0063 -1.71335 1.1309 V1 0.531754 -1.91065 1.1309 V2 0.537037 -1.92963 0.9 + N0 0.495256 -0.853889 0.159982 N1 0.256935 -0.953145 0.159686 N2 0.260275 -0.965535 5.17854e-17 + txt003 +STRI + V0 0.537037 -1.92963 0.9 V1 1.0163 -1.73037 0.9 V2 1.0063 -1.71335 1.1309 + N0 0.260275 -0.965535 5.17854e-17 N1 0.501718 -0.865031 1.36587e-16 N2 0.495256 -0.853889 0.159982 + txt003 +STRI + V0 0.531754 -1.91065 1.1309 V1 -2.22045e-16 -1.98032 1.1309 V2 0 -2 0.9 + N0 0.256935 -0.953145 0.159686 N1 -6.38555e-17 -0.987204 0.15946 N2 0 -1 -0 + txt003 +STRI + V0 0 -2 0.9 V1 0.537037 -1.92963 0.9 V2 0.531754 -1.91065 1.1309 + N0 0 -1 -0 N1 0.260275 -0.965535 5.17854e-17 N2 0.256935 -0.953145 0.159686 + txt003 +STRI + V0 0 -1.5 2.4 V1 -0.402778 -1.44722 2.4 V2 -0.436032 -1.56671 2.13785 + N0 0 -0.902861 0.429934 N1 -0.234929 -0.871509 0.430442 N2 -0.235963 -0.875348 0.422003 + txt003 +STRI + V0 -0.436032 -1.56671 2.13785 V1 0 -1.62384 2.13785 V2 0 -1.5 2.4 + N0 -0.235963 -0.875348 0.422003 N1 0 -0.906828 0.4215 N2 0 -0.902861 0.429934 + txt003 +STRI + V0 -0.402778 -1.44722 2.4 V1 -0.762222 -1.29778 2.4 V2 -0.825153 -1.40492 2.13785 + N0 -0.234929 -0.871509 0.430442 N1 -0.4527 -0.780517 0.43111 N2 -0.4547 -0.783966 0.422664 + txt003 +STRI + V0 -0.825153 -1.40492 2.13785 V1 -0.436032 -1.56671 2.13785 V2 -0.402778 -1.44722 2.4 + N0 -0.4547 -0.783966 0.422664 N1 -0.235963 -0.875348 0.422003 N2 -0.234929 -0.871509 0.430442 + txt003 +STRI + V0 -0.762222 -1.29778 2.4 V1 -1.065 -1.065 2.4 V2 -1.15293 -1.15293 2.13785 + N0 -0.4527 -0.780517 0.43111 N1 -0.637936 -0.637936 0.431366 N2 -0.640758 -0.640758 0.422917 + txt003 +STRI + V0 -1.15293 -1.15293 2.13785 V1 -0.825153 -1.40492 2.13785 V2 -0.762222 -1.29778 2.4 + N0 -0.640758 -0.640758 0.422917 N1 -0.4547 -0.783966 0.422664 N2 -0.4527 -0.780517 0.43111 + txt003 +STRI + V0 -1.065 -1.065 2.4 V1 -1.29778 -0.762222 2.4 V2 -1.40492 -0.825153 2.13785 + N0 -0.637936 -0.637936 0.431366 N1 -0.780517 -0.4527 0.43111 N2 -0.783966 -0.4547 0.422664 + txt003 +STRI + V0 -1.40492 -0.825153 2.13785 V1 -1.15293 -1.15293 2.13785 V2 -1.065 -1.065 2.4 + N0 -0.783966 -0.4547 0.422664 N1 -0.640758 -0.640758 0.422917 N2 -0.637936 -0.637936 0.431366 + txt003 +STRI + V0 -1.29778 -0.762222 2.4 V1 -1.44722 -0.402778 2.4 V2 -1.56671 -0.436032 2.13785 + N0 -0.780517 -0.4527 0.43111 N1 -0.871509 -0.234929 0.430442 N2 -0.875348 -0.235963 0.422003 + txt003 +STRI + V0 -1.56671 -0.436032 2.13785 V1 -1.40492 -0.825153 2.13785 V2 -1.29778 -0.762222 2.4 + N0 -0.875348 -0.235963 0.422003 N1 -0.783966 -0.4547 0.422664 N2 -0.780517 -0.4527 0.43111 + txt003 +STRI + V0 -1.44722 -0.402778 2.4 V1 -1.5 0 2.4 V2 -1.62384 -2.22045e-16 2.13785 + N0 -0.871509 -0.234929 0.430442 N1 -0.902861 2.27296e-16 0.429934 N2 -0.906828 2.05843e-16 0.4215 + txt003 +STRI + V0 -1.62384 -2.22045e-16 2.13785 V1 -1.56671 -0.436032 2.13785 V2 -1.44722 -0.402778 2.4 + N0 -0.906828 2.05843e-16 0.4215 N1 -0.875348 -0.235963 0.422003 N2 -0.871509 -0.234929 0.430442 + txt003 +STRI + V0 0 -1.62384 2.13785 V1 -0.436032 -1.56671 2.13785 V2 -0.467421 -1.67949 1.87778 + N0 0 -0.906828 0.4215 N1 -0.235963 -0.875348 0.422003 N2 -0.239043 -0.886771 0.395595 + txt003 +STRI + V0 -0.467421 -1.67949 1.87778 V1 0 -1.74074 1.87778 V2 0 -1.62384 2.13785 + N0 -0.239043 -0.886771 0.395595 N1 0 -0.918633 0.395111 N2 0 -0.906828 0.4215 + txt003 +STRI + V0 -0.436032 -1.56671 2.13785 V1 -0.825153 -1.40492 2.13785 V2 -0.884554 -1.50606 1.87778 + N0 -0.235963 -0.875348 0.422003 N1 -0.4547 -0.783966 0.422664 N2 -0.460653 -0.794229 0.39623 + txt003 +STRI + V0 -0.884554 -1.50606 1.87778 V1 -0.467421 -1.67949 1.87778 V2 -0.436032 -1.56671 2.13785 + N0 -0.460653 -0.794229 0.39623 N1 -0.239043 -0.886771 0.395595 N2 -0.235963 -0.875348 0.422003 + txt003 +STRI + V0 -0.825153 -1.40492 2.13785 V1 -1.15293 -1.15293 2.13785 V2 -1.23593 -1.23593 1.87778 + N0 -0.4547 -0.783966 0.422664 N1 -0.640758 -0.640758 0.422917 N2 -0.649156 -0.649156 0.396474 + txt003 +STRI + V0 -1.23593 -1.23593 1.87778 V1 -0.884554 -1.50606 1.87778 V2 -0.825153 -1.40492 2.13785 + N0 -0.649156 -0.649156 0.396474 N1 -0.460653 -0.794229 0.39623 N2 -0.4547 -0.783966 0.422664 + txt003 +STRI + V0 -1.15293 -1.15293 2.13785 V1 -1.40492 -0.825153 2.13785 V2 -1.50606 -0.884554 1.87778 + N0 -0.640758 -0.640758 0.422917 N1 -0.783966 -0.4547 0.422664 N2 -0.794229 -0.460653 0.39623 + txt003 +STRI + V0 -1.50606 -0.884554 1.87778 V1 -1.23593 -1.23593 1.87778 V2 -1.15293 -1.15293 2.13785 + N0 -0.794229 -0.460653 0.39623 N1 -0.649156 -0.649156 0.396474 N2 -0.640758 -0.640758 0.422917 + txt003 +STRI + V0 -1.40492 -0.825153 2.13785 V1 -1.56671 -0.436032 2.13785 V2 -1.67949 -0.467421 1.87778 + N0 -0.783966 -0.4547 0.422664 N1 -0.875348 -0.235963 0.422003 N2 -0.886771 -0.239043 0.395595 + txt003 +STRI + V0 -1.67949 -0.467421 1.87778 V1 -1.50606 -0.884554 1.87778 V2 -1.40492 -0.825153 2.13785 + N0 -0.886771 -0.239043 0.395595 N1 -0.794229 -0.460653 0.39623 N2 -0.783966 -0.4547 0.422664 + txt003 +STRI + V0 -1.56671 -0.436032 2.13785 V1 -1.62384 -2.22045e-16 2.13785 V2 -1.74074 0 1.87778 + N0 -0.875348 -0.235963 0.422003 N1 -0.906828 2.05843e-16 0.4215 N2 -0.918633 1.79998e-16 0.395111 + txt003 +STRI + V0 -1.74074 0 1.87778 V1 -1.67949 -0.467421 1.87778 V2 -1.56671 -0.436032 2.13785 + N0 -0.918633 1.79998e-16 0.395111 N1 -0.886771 -0.239043 0.395595 N2 -0.875348 -0.235963 0.422003 + txt003 +STRI + V0 0 -1.74074 1.87778 V1 -0.467421 -1.67949 1.87778 V2 -0.495081 -1.77888 1.62188 + N0 0 -0.918633 0.395111 N1 -0.239043 -0.886771 0.395595 N2 -0.244029 -0.90527 0.347757 + txt003 +STRI + V0 -0.495081 -1.77888 1.62188 V1 0 -1.84375 1.62188 V2 0 -1.74074 1.87778 + N0 -0.244029 -0.90527 0.347757 N1 0 -0.937749 0.347314 N2 0 -0.918633 0.395111 + txt003 +STRI + V0 -0.467421 -1.67949 1.87778 V1 -0.884554 -1.50606 1.87778 V2 -0.936898 -1.59519 1.62188 + N0 -0.239043 -0.886771 0.395595 N1 -0.460653 -0.794229 0.39623 N2 -0.470295 -0.810853 0.34834 + txt003 +STRI + V0 -0.936898 -1.59519 1.62188 V1 -0.495081 -1.77888 1.62188 V2 -0.467421 -1.67949 1.87778 + N0 -0.470295 -0.810853 0.34834 N1 -0.244029 -0.90527 0.347757 N2 -0.239043 -0.886771 0.395595 + txt003 +STRI + V0 -0.884554 -1.50606 1.87778 V1 -1.23593 -1.23593 1.87778 V2 -1.30906 -1.30906 1.62188 + N0 -0.460653 -0.794229 0.39623 N1 -0.649156 -0.649156 0.396474 N2 -0.662761 -0.662761 0.348563 + txt003 +STRI + V0 -1.30906 -1.30906 1.62188 V1 -0.936898 -1.59519 1.62188 V2 -0.884554 -1.50606 1.87778 + N0 -0.662761 -0.662761 0.348563 N1 -0.470295 -0.810853 0.34834 N2 -0.460653 -0.794229 0.39623 + txt003 +STRI + V0 -1.23593 -1.23593 1.87778 V1 -1.50606 -0.884554 1.87778 V2 -1.59519 -0.936898 1.62187 + N0 -0.649156 -0.649156 0.396474 N1 -0.794229 -0.460653 0.39623 N2 -0.810853 -0.470295 0.34834 + txt003 +STRI + V0 -1.59519 -0.936898 1.62187 V1 -1.30906 -1.30906 1.62188 V2 -1.23593 -1.23593 1.87778 + N0 -0.810853 -0.470295 0.34834 N1 -0.662761 -0.662761 0.348563 N2 -0.649156 -0.649156 0.396474 + txt003 +STRI + V0 -1.50606 -0.884554 1.87778 V1 -1.67949 -0.467421 1.87778 V2 -1.77888 -0.495081 1.62187 + N0 -0.794229 -0.460653 0.39623 N1 -0.886771 -0.239043 0.395595 N2 -0.90527 -0.244029 0.347757 + txt003 +STRI + V0 -1.77888 -0.495081 1.62187 V1 -1.59519 -0.936898 1.62187 V2 -1.50606 -0.884554 1.87778 + N0 -0.90527 -0.244029 0.347757 N1 -0.810853 -0.470295 0.34834 N2 -0.794229 -0.460653 0.39623 + txt003 +STRI + V0 -1.67949 -0.467421 1.87778 V1 -1.74074 0 1.87778 V2 -1.84375 0 1.62187 + N0 -0.886771 -0.239043 0.395595 N1 -0.918633 1.79998e-16 0.395111 N2 -0.937749 1.49384e-16 0.347314 + txt003 +STRI + V0 -1.84375 0 1.62187 V1 -1.77888 -0.495081 1.62187 V2 -1.67949 -0.467421 1.87778 + N0 -0.937749 1.49384e-16 0.347314 N1 -0.90527 -0.244029 0.347757 N2 -0.886771 -0.239043 0.395595 + txt003 +STRI + V0 0 -1.84375 1.62188 V1 -0.495081 -1.77888 1.62188 V2 -0.517147 -1.85816 1.37222 + N0 0 -0.937749 0.347314 N1 -0.244029 -0.90527 0.347757 N2 -0.250446 -0.929073 0.272213 + txt003 +STRI + V0 -0.517147 -1.85816 1.37222 V1 0 -1.92593 1.37222 V2 0 -1.84375 1.62188 + N0 -0.250446 -0.929073 0.272213 N1 0 -0.96234 0.271848 N2 0 -0.937749 0.347314 + txt003 +STRI + V0 -0.495081 -1.77888 1.62188 V1 -0.936898 -1.59519 1.62188 V2 -0.978656 -1.66628 1.37222 + N0 -0.244029 -0.90527 0.347757 N1 -0.470295 -0.810853 0.34834 N2 -0.482704 -0.832247 0.272693 + txt003 +STRI + V0 -0.978656 -1.66628 1.37222 V1 -0.517147 -1.85816 1.37222 V2 -0.495081 -1.77888 1.62188 + N0 -0.482704 -0.832247 0.272693 N1 -0.250446 -0.929073 0.272213 N2 -0.244029 -0.90527 0.347757 + txt003 +STRI + V0 -0.936898 -1.59519 1.62188 V1 -1.30906 -1.30906 1.62188 V2 -1.36741 -1.36741 1.37222 + N0 -0.470295 -0.810853 0.34834 N1 -0.662761 -0.662761 0.348563 N2 -0.680271 -0.680271 0.272877 + txt003 +STRI + V0 -1.36741 -1.36741 1.37222 V1 -0.978656 -1.66628 1.37222 V2 -0.936898 -1.59519 1.62188 + N0 -0.680271 -0.680271 0.272877 N1 -0.482704 -0.832247 0.272693 N2 -0.470295 -0.810853 0.34834 + txt003 +STRI + V0 -1.30906 -1.30906 1.62188 V1 -1.59519 -0.936898 1.62187 V2 -1.66628 -0.978656 1.37222 + N0 -0.662761 -0.662761 0.348563 N1 -0.810853 -0.470295 0.34834 N2 -0.832247 -0.482704 0.272693 + txt003 +STRI + V0 -1.66628 -0.978656 1.37222 V1 -1.36741 -1.36741 1.37222 V2 -1.30906 -1.30906 1.62188 + N0 -0.832247 -0.482704 0.272693 N1 -0.680271 -0.680271 0.272877 N2 -0.662761 -0.662761 0.348563 + txt003 +STRI + V0 -1.59519 -0.936898 1.62187 V1 -1.77888 -0.495081 1.62187 V2 -1.85816 -0.517147 1.37222 + N0 -0.810853 -0.470295 0.34834 N1 -0.90527 -0.244029 0.347757 N2 -0.929073 -0.250446 0.272213 + txt003 +STRI + V0 -1.85816 -0.517147 1.37222 V1 -1.66628 -0.978656 1.37222 V2 -1.59519 -0.936898 1.62187 + N0 -0.929073 -0.250446 0.272213 N1 -0.832247 -0.482704 0.272693 N2 -0.810853 -0.470295 0.34834 + txt003 +STRI + V0 -1.77888 -0.495081 1.62187 V1 -1.84375 0 1.62187 V2 -1.92593 -2.22045e-16 1.37222 + N0 -0.90527 -0.244029 0.347757 N1 -0.937749 1.49384e-16 0.347314 N2 -0.96234 1.11936e-16 0.271848 + txt003 +STRI + V0 -1.92593 -2.22045e-16 1.37222 V1 -1.85816 -0.517147 1.37222 V2 -1.77888 -0.495081 1.62187 + N0 -0.96234 1.11936e-16 0.271848 N1 -0.929073 -0.250446 0.272213 N2 -0.90527 -0.244029 0.347757 + txt003 +STRI + V0 0 -1.92593 1.37222 V1 -0.517147 -1.85816 1.37222 V2 -0.531754 -1.91065 1.1309 + N0 0 -0.96234 0.271848 N1 -0.250446 -0.929073 0.272213 N2 -0.256935 -0.953145 0.159686 + txt003 +STRI + V0 -0.531754 -1.91065 1.1309 V1 0 -1.98032 1.1309 V2 0 -1.92593 1.37222 + N0 -0.256935 -0.953145 0.159686 N1 0 -0.987204 0.15946 N2 0 -0.96234 0.271848 + txt003 +STRI + V0 -0.517147 -1.85816 1.37222 V1 -0.978656 -1.66628 1.37222 V2 -1.0063 -1.71335 1.1309 + N0 -0.250446 -0.929073 0.272213 N1 -0.482704 -0.832247 0.272693 N2 -0.495256 -0.853889 0.159982 + txt003 +STRI + V0 -1.0063 -1.71335 1.1309 V1 -0.531754 -1.91065 1.1309 V2 -0.517147 -1.85816 1.37222 + N0 -0.495256 -0.853889 0.159982 N1 -0.256935 -0.953145 0.159686 N2 -0.250446 -0.929073 0.272213 + txt003 +STRI + V0 -0.978656 -1.66628 1.37222 V1 -1.36741 -1.36741 1.37222 V2 -1.40603 -1.40603 1.1309 + N0 -0.482704 -0.832247 0.272693 N1 -0.680271 -0.680271 0.272877 N2 -0.697986 -0.697986 0.160096 + txt003 +STRI + V0 -1.40603 -1.40603 1.1309 V1 -1.0063 -1.71335 1.1309 V2 -0.978656 -1.66628 1.37222 + N0 -0.697986 -0.697986 0.160096 N1 -0.495256 -0.853889 0.159982 N2 -0.482704 -0.832247 0.272693 + txt003 +STRI + V0 -1.36741 -1.36741 1.37222 V1 -1.66628 -0.978656 1.37222 V2 -1.71335 -1.0063 1.1309 + N0 -0.680271 -0.680271 0.272877 N1 -0.832247 -0.482704 0.272693 N2 -0.853889 -0.495256 0.159982 + txt003 +STRI + V0 -1.71335 -1.0063 1.1309 V1 -1.40603 -1.40603 1.1309 V2 -1.36741 -1.36741 1.37222 + N0 -0.853889 -0.495256 0.159982 N1 -0.697986 -0.697986 0.160096 N2 -0.680271 -0.680271 0.272877 + txt003 +STRI + V0 -1.66628 -0.978656 1.37222 V1 -1.85816 -0.517147 1.37222 V2 -1.91065 -0.531754 1.1309 + N0 -0.832247 -0.482704 0.272693 N1 -0.929073 -0.250446 0.272213 N2 -0.953145 -0.256935 0.159686 + txt003 +STRI + V0 -1.91065 -0.531754 1.1309 V1 -1.71335 -1.0063 1.1309 V2 -1.66628 -0.978656 1.37222 + N0 -0.953145 -0.256935 0.159686 N1 -0.853889 -0.495256 0.159982 N2 -0.832247 -0.482704 0.272693 + txt003 +STRI + V0 -1.85816 -0.517147 1.37222 V1 -1.92593 -2.22045e-16 1.37222 V2 -1.98032 2.22045e-16 1.1309 + N0 -0.929073 -0.250446 0.272213 N1 -0.96234 1.11936e-16 0.271848 N2 -0.987204 6.38555e-17 0.15946 + txt003 +STRI + V0 -1.98032 2.22045e-16 1.1309 V1 -1.91065 -0.531754 1.1309 V2 -1.85816 -0.517147 1.37222 + N0 -0.987204 6.38555e-17 0.15946 N1 -0.953145 -0.256935 0.159686 N2 -0.929073 -0.250446 0.272213 + txt003 +STRI + V0 0 -1.98032 1.1309 V1 -0.531754 -1.91065 1.1309 V2 -0.537037 -1.92963 0.9 + N0 0 -0.987204 0.15946 N1 -0.256935 -0.953145 0.159686 N2 -0.260275 -0.965535 5.17854e-17 + txt003 +STRI + V0 -0.537037 -1.92963 0.9 V1 0 -2 0.9 V2 0 -1.98032 1.1309 + N0 -0.260275 -0.965535 5.17854e-17 N1 -0 -1 -0 N2 0 -0.987204 0.15946 + txt003 +STRI + V0 -0.531754 -1.91065 1.1309 V1 -1.0063 -1.71335 1.1309 V2 -1.0163 -1.73037 0.9 + N0 -0.256935 -0.953145 0.159686 N1 -0.495256 -0.853889 0.159982 N2 -0.501718 -0.865031 1.36587e-16 + txt003 +STRI + V0 -1.0163 -1.73037 0.9 V1 -0.537037 -1.92963 0.9 V2 -0.531754 -1.91065 1.1309 + N0 -0.501718 -0.865031 1.36587e-16 N1 -0.260275 -0.965535 5.17854e-17 N2 -0.256935 -0.953145 0.159686 + txt003 +STRI + V0 -1.0063 -1.71335 1.1309 V1 -1.40603 -1.40603 1.1309 V2 -1.42 -1.42 0.9 + N0 -0.495256 -0.853889 0.159982 N1 -0.697986 -0.697986 0.160096 N2 -0.707107 -0.707107 1.74455e-16 + txt003 +STRI + V0 -1.42 -1.42 0.9 V1 -1.0163 -1.73037 0.9 V2 -1.0063 -1.71335 1.1309 + N0 -0.707107 -0.707107 1.74455e-16 N1 -0.501718 -0.865031 1.36587e-16 N2 -0.495256 -0.853889 0.159982 + txt003 +STRI + V0 -1.40603 -1.40603 1.1309 V1 -1.71335 -1.0063 1.1309 V2 -1.73037 -1.0163 0.9 + N0 -0.697986 -0.697986 0.160096 N1 -0.853889 -0.495256 0.159982 N2 -0.865031 -0.501718 1.36587e-16 + txt003 +STRI + V0 -1.73037 -1.0163 0.9 V1 -1.42 -1.42 0.9 V2 -1.40603 -1.40603 1.1309 + N0 -0.865031 -0.501718 1.36587e-16 N1 -0.707107 -0.707107 1.74455e-16 N2 -0.697986 -0.697986 0.160096 + txt003 +STRI + V0 -1.71335 -1.0063 1.1309 V1 -1.91065 -0.531754 1.1309 V2 -1.92963 -0.537037 0.9 + N0 -0.853889 -0.495256 0.159982 N1 -0.953145 -0.256935 0.159686 N2 -0.965535 -0.260275 5.17854e-17 + txt003 +STRI + V0 -1.92963 -0.537037 0.9 V1 -1.73037 -1.0163 0.9 V2 -1.71335 -1.0063 1.1309 + N0 -0.965535 -0.260275 5.17854e-17 N1 -0.865031 -0.501718 1.36587e-16 N2 -0.853889 -0.495256 0.159982 + txt003 +STRI + V0 -1.91065 -0.531754 1.1309 V1 -1.98032 2.22045e-16 1.1309 V2 -2 0 0.9 + N0 -0.953145 -0.256935 0.159686 N1 -0.987204 6.38555e-17 0.15946 N2 -1 0 0 + txt003 +STRI + V0 -2 0 0.9 V1 -1.92963 -0.537037 0.9 V2 -1.91065 -0.531754 1.1309 + N0 -1 0 0 N1 -0.965535 -0.260275 5.17854e-17 N2 -0.953145 -0.256935 0.159686 + txt003 +STRI + V0 -1.5 0 2.4 V1 -1.44722 0.402778 2.4 V2 -1.56671 0.436032 2.13785 + N0 -0.902861 0 0.429934 N1 -0.871509 0.234929 0.430442 N2 -0.875348 0.235963 0.422003 + txt003 +STRI + V0 -1.56671 0.436032 2.13785 V1 -1.62384 0 2.13785 V2 -1.5 0 2.4 + N0 -0.875348 0.235963 0.422003 N1 -0.906828 0 0.4215 N2 -0.902861 0 0.429934 + txt003 +STRI + V0 -1.44722 0.402778 2.4 V1 -1.29778 0.762222 2.4 V2 -1.40492 0.825153 2.13785 + N0 -0.871509 0.234929 0.430442 N1 -0.780517 0.4527 0.43111 N2 -0.783966 0.4547 0.422664 + txt003 +STRI + V0 -1.40492 0.825153 2.13785 V1 -1.56671 0.436032 2.13785 V2 -1.44722 0.402778 2.4 + N0 -0.783966 0.4547 0.422664 N1 -0.875348 0.235963 0.422003 N2 -0.871509 0.234929 0.430442 + txt003 +STRI + V0 -1.29778 0.762222 2.4 V1 -1.065 1.065 2.4 V2 -1.15293 1.15293 2.13785 + N0 -0.780517 0.4527 0.43111 N1 -0.637936 0.637936 0.431366 N2 -0.640758 0.640758 0.422917 + txt003 +STRI + V0 -1.15293 1.15293 2.13785 V1 -1.40492 0.825153 2.13785 V2 -1.29778 0.762222 2.4 + N0 -0.640758 0.640758 0.422917 N1 -0.783966 0.4547 0.422664 N2 -0.780517 0.4527 0.43111 + txt003 +STRI + V0 -1.065 1.065 2.4 V1 -0.762222 1.29778 2.4 V2 -0.825153 1.40492 2.13785 + N0 -0.637936 0.637936 0.431366 N1 -0.4527 0.780517 0.43111 N2 -0.4547 0.783966 0.422664 + txt003 +STRI + V0 -0.825153 1.40492 2.13785 V1 -1.15293 1.15293 2.13785 V2 -1.065 1.065 2.4 + N0 -0.4547 0.783966 0.422664 N1 -0.640758 0.640758 0.422917 N2 -0.637936 0.637936 0.431366 + txt003 +STRI + V0 -0.762222 1.29778 2.4 V1 -0.402778 1.44722 2.4 V2 -0.436032 1.56671 2.13785 + N0 -0.4527 0.780517 0.43111 N1 -0.234929 0.871509 0.430442 N2 -0.235963 0.875348 0.422003 + txt003 +STRI + V0 -0.436032 1.56671 2.13785 V1 -0.825153 1.40492 2.13785 V2 -0.762222 1.29778 2.4 + N0 -0.235963 0.875348 0.422003 N1 -0.4547 0.783966 0.422664 N2 -0.4527 0.780517 0.43111 + txt003 +STRI + V0 -0.402778 1.44722 2.4 V1 0 1.5 2.4 V2 -2.22045e-16 1.62384 2.13785 + N0 -0.234929 0.871509 0.430442 N1 2.27296e-16 0.902861 0.429934 N2 2.05843e-16 0.906828 0.4215 + txt003 +STRI + V0 -2.22045e-16 1.62384 2.13785 V1 -0.436032 1.56671 2.13785 V2 -0.402778 1.44722 2.4 + N0 2.05843e-16 0.906828 0.4215 N1 -0.235963 0.875348 0.422003 N2 -0.234929 0.871509 0.430442 + txt003 +STRI + V0 -1.62384 0 2.13785 V1 -1.56671 0.436032 2.13785 V2 -1.67949 0.467421 1.87778 + N0 -0.906828 0 0.4215 N1 -0.875348 0.235963 0.422003 N2 -0.886771 0.239043 0.395595 + txt003 +STRI + V0 -1.67949 0.467421 1.87778 V1 -1.74074 0 1.87778 V2 -1.62384 0 2.13785 + N0 -0.886771 0.239043 0.395595 N1 -0.918633 0 0.395111 N2 -0.906828 0 0.4215 + txt003 +STRI + V0 -1.56671 0.436032 2.13785 V1 -1.40492 0.825153 2.13785 V2 -1.50606 0.884554 1.87778 + N0 -0.875348 0.235963 0.422003 N1 -0.783966 0.4547 0.422664 N2 -0.794229 0.460653 0.39623 + txt003 +STRI + V0 -1.50606 0.884554 1.87778 V1 -1.67949 0.467421 1.87778 V2 -1.56671 0.436032 2.13785 + N0 -0.794229 0.460653 0.39623 N1 -0.886771 0.239043 0.395595 N2 -0.875348 0.235963 0.422003 + txt003 +STRI + V0 -1.40492 0.825153 2.13785 V1 -1.15293 1.15293 2.13785 V2 -1.23593 1.23593 1.87778 + N0 -0.783966 0.4547 0.422664 N1 -0.640758 0.640758 0.422917 N2 -0.649156 0.649156 0.396474 + txt003 +STRI + V0 -1.23593 1.23593 1.87778 V1 -1.50606 0.884554 1.87778 V2 -1.40492 0.825153 2.13785 + N0 -0.649156 0.649156 0.396474 N1 -0.794229 0.460653 0.39623 N2 -0.783966 0.4547 0.422664 + txt003 +STRI + V0 -1.15293 1.15293 2.13785 V1 -0.825153 1.40492 2.13785 V2 -0.884554 1.50606 1.87778 + N0 -0.640758 0.640758 0.422917 N1 -0.4547 0.783966 0.422664 N2 -0.460653 0.794229 0.39623 + txt003 +STRI + V0 -0.884554 1.50606 1.87778 V1 -1.23593 1.23593 1.87778 V2 -1.15293 1.15293 2.13785 + N0 -0.460653 0.794229 0.39623 N1 -0.649156 0.649156 0.396474 N2 -0.640758 0.640758 0.422917 + txt003 +STRI + V0 -0.825153 1.40492 2.13785 V1 -0.436032 1.56671 2.13785 V2 -0.467421 1.67949 1.87778 + N0 -0.4547 0.783966 0.422664 N1 -0.235963 0.875348 0.422003 N2 -0.239043 0.886771 0.395595 + txt003 +STRI + V0 -0.467421 1.67949 1.87778 V1 -0.884554 1.50606 1.87778 V2 -0.825153 1.40492 2.13785 + N0 -0.239043 0.886771 0.395595 N1 -0.460653 0.794229 0.39623 N2 -0.4547 0.783966 0.422664 + txt003 +STRI + V0 -0.436032 1.56671 2.13785 V1 -2.22045e-16 1.62384 2.13785 V2 0 1.74074 1.87778 + N0 -0.235963 0.875348 0.422003 N1 2.05843e-16 0.906828 0.4215 N2 1.79998e-16 0.918633 0.395111 + txt003 +STRI + V0 0 1.74074 1.87778 V1 -0.467421 1.67949 1.87778 V2 -0.436032 1.56671 2.13785 + N0 1.79998e-16 0.918633 0.395111 N1 -0.239043 0.886771 0.395595 N2 -0.235963 0.875348 0.422003 + txt003 +STRI + V0 -1.74074 0 1.87778 V1 -1.67949 0.467421 1.87778 V2 -1.77888 0.495081 1.62188 + N0 -0.918633 0 0.395111 N1 -0.886771 0.239043 0.395595 N2 -0.90527 0.244029 0.347757 + txt003 +STRI + V0 -1.77888 0.495081 1.62188 V1 -1.84375 0 1.62188 V2 -1.74074 0 1.87778 + N0 -0.90527 0.244029 0.347757 N1 -0.937749 0 0.347314 N2 -0.918633 0 0.395111 + txt003 +STRI + V0 -1.67949 0.467421 1.87778 V1 -1.50606 0.884554 1.87778 V2 -1.59519 0.936898 1.62188 + N0 -0.886771 0.239043 0.395595 N1 -0.794229 0.460653 0.39623 N2 -0.810853 0.470295 0.34834 + txt003 +STRI + V0 -1.59519 0.936898 1.62188 V1 -1.77888 0.495081 1.62188 V2 -1.67949 0.467421 1.87778 + N0 -0.810853 0.470295 0.34834 N1 -0.90527 0.244029 0.347757 N2 -0.886771 0.239043 0.395595 + txt003 +STRI + V0 -1.50606 0.884554 1.87778 V1 -1.23593 1.23593 1.87778 V2 -1.30906 1.30906 1.62188 + N0 -0.794229 0.460653 0.39623 N1 -0.649156 0.649156 0.396474 N2 -0.662761 0.662761 0.348563 + txt003 +STRI + V0 -1.30906 1.30906 1.62188 V1 -1.59519 0.936898 1.62188 V2 -1.50606 0.884554 1.87778 + N0 -0.662761 0.662761 0.348563 N1 -0.810853 0.470295 0.34834 N2 -0.794229 0.460653 0.39623 + txt003 +STRI + V0 -1.23593 1.23593 1.87778 V1 -0.884554 1.50606 1.87778 V2 -0.936898 1.59519 1.62187 + N0 -0.649156 0.649156 0.396474 N1 -0.460653 0.794229 0.39623 N2 -0.470295 0.810853 0.34834 + txt003 +STRI + V0 -0.936898 1.59519 1.62187 V1 -1.30906 1.30906 1.62188 V2 -1.23593 1.23593 1.87778 + N0 -0.470295 0.810853 0.34834 N1 -0.662761 0.662761 0.348563 N2 -0.649156 0.649156 0.396474 + txt003 +STRI + V0 -0.884554 1.50606 1.87778 V1 -0.467421 1.67949 1.87778 V2 -0.495081 1.77888 1.62187 + N0 -0.460653 0.794229 0.39623 N1 -0.239043 0.886771 0.395595 N2 -0.244029 0.90527 0.347757 + txt003 +STRI + V0 -0.495081 1.77888 1.62187 V1 -0.936898 1.59519 1.62187 V2 -0.884554 1.50606 1.87778 + N0 -0.244029 0.90527 0.347757 N1 -0.470295 0.810853 0.34834 N2 -0.460653 0.794229 0.39623 + txt003 +STRI + V0 -0.467421 1.67949 1.87778 V1 0 1.74074 1.87778 V2 0 1.84375 1.62187 + N0 -0.239043 0.886771 0.395595 N1 1.79998e-16 0.918633 0.395111 N2 1.49384e-16 0.937749 0.347314 + txt003 +STRI + V0 0 1.84375 1.62187 V1 -0.495081 1.77888 1.62187 V2 -0.467421 1.67949 1.87778 + N0 1.49384e-16 0.937749 0.347314 N1 -0.244029 0.90527 0.347757 N2 -0.239043 0.886771 0.395595 + txt003 +STRI + V0 -1.84375 0 1.62188 V1 -1.77888 0.495081 1.62188 V2 -1.85816 0.517147 1.37222 + N0 -0.937749 0 0.347314 N1 -0.90527 0.244029 0.347757 N2 -0.929073 0.250446 0.272213 + txt003 +STRI + V0 -1.85816 0.517147 1.37222 V1 -1.92593 0 1.37222 V2 -1.84375 0 1.62188 + N0 -0.929073 0.250446 0.272213 N1 -0.96234 0 0.271848 N2 -0.937749 0 0.347314 + txt003 +STRI + V0 -1.77888 0.495081 1.62188 V1 -1.59519 0.936898 1.62188 V2 -1.66628 0.978656 1.37222 + N0 -0.90527 0.244029 0.347757 N1 -0.810853 0.470295 0.34834 N2 -0.832247 0.482704 0.272693 + txt003 +STRI + V0 -1.66628 0.978656 1.37222 V1 -1.85816 0.517147 1.37222 V2 -1.77888 0.495081 1.62188 + N0 -0.832247 0.482704 0.272693 N1 -0.929073 0.250446 0.272213 N2 -0.90527 0.244029 0.347757 + txt003 +STRI + V0 -1.59519 0.936898 1.62188 V1 -1.30906 1.30906 1.62188 V2 -1.36741 1.36741 1.37222 + N0 -0.810853 0.470295 0.34834 N1 -0.662761 0.662761 0.348563 N2 -0.680271 0.680271 0.272877 + txt003 +STRI + V0 -1.36741 1.36741 1.37222 V1 -1.66628 0.978656 1.37222 V2 -1.59519 0.936898 1.62188 + N0 -0.680271 0.680271 0.272877 N1 -0.832247 0.482704 0.272693 N2 -0.810853 0.470295 0.34834 + txt003 +STRI + V0 -1.30906 1.30906 1.62188 V1 -0.936898 1.59519 1.62187 V2 -0.978656 1.66628 1.37222 + N0 -0.662761 0.662761 0.348563 N1 -0.470295 0.810853 0.34834 N2 -0.482704 0.832247 0.272693 + txt003 +STRI + V0 -0.978656 1.66628 1.37222 V1 -1.36741 1.36741 1.37222 V2 -1.30906 1.30906 1.62188 + N0 -0.482704 0.832247 0.272693 N1 -0.680271 0.680271 0.272877 N2 -0.662761 0.662761 0.348563 + txt003 +STRI + V0 -0.936898 1.59519 1.62187 V1 -0.495081 1.77888 1.62187 V2 -0.517147 1.85816 1.37222 + N0 -0.470295 0.810853 0.34834 N1 -0.244029 0.90527 0.347757 N2 -0.250446 0.929073 0.272213 + txt003 +STRI + V0 -0.517147 1.85816 1.37222 V1 -0.978656 1.66628 1.37222 V2 -0.936898 1.59519 1.62187 + N0 -0.250446 0.929073 0.272213 N1 -0.482704 0.832247 0.272693 N2 -0.470295 0.810853 0.34834 + txt003 +STRI + V0 -0.495081 1.77888 1.62187 V1 0 1.84375 1.62187 V2 -2.22045e-16 1.92593 1.37222 + N0 -0.244029 0.90527 0.347757 N1 1.49384e-16 0.937749 0.347314 N2 1.11936e-16 0.96234 0.271848 + txt003 +STRI + V0 -2.22045e-16 1.92593 1.37222 V1 -0.517147 1.85816 1.37222 V2 -0.495081 1.77888 1.62187 + N0 1.11936e-16 0.96234 0.271848 N1 -0.250446 0.929073 0.272213 N2 -0.244029 0.90527 0.347757 + txt003 +STRI + V0 -1.92593 0 1.37222 V1 -1.85816 0.517147 1.37222 V2 -1.91065 0.531754 1.1309 + N0 -0.96234 0 0.271848 N1 -0.929073 0.250446 0.272213 N2 -0.953145 0.256935 0.159686 + txt003 +STRI + V0 -1.91065 0.531754 1.1309 V1 -1.98032 0 1.1309 V2 -1.92593 0 1.37222 + N0 -0.953145 0.256935 0.159686 N1 -0.987204 0 0.15946 N2 -0.96234 0 0.271848 + txt003 +STRI + V0 -1.85816 0.517147 1.37222 V1 -1.66628 0.978656 1.37222 V2 -1.71335 1.0063 1.1309 + N0 -0.929073 0.250446 0.272213 N1 -0.832247 0.482704 0.272693 N2 -0.853889 0.495256 0.159982 + txt003 +STRI + V0 -1.71335 1.0063 1.1309 V1 -1.91065 0.531754 1.1309 V2 -1.85816 0.517147 1.37222 + N0 -0.853889 0.495256 0.159982 N1 -0.953145 0.256935 0.159686 N2 -0.929073 0.250446 0.272213 + txt003 +STRI + V0 -1.66628 0.978656 1.37222 V1 -1.36741 1.36741 1.37222 V2 -1.40603 1.40603 1.1309 + N0 -0.832247 0.482704 0.272693 N1 -0.680271 0.680271 0.272877 N2 -0.697986 0.697986 0.160096 + txt003 +STRI + V0 -1.40603 1.40603 1.1309 V1 -1.71335 1.0063 1.1309 V2 -1.66628 0.978656 1.37222 + N0 -0.697986 0.697986 0.160096 N1 -0.853889 0.495256 0.159982 N2 -0.832247 0.482704 0.272693 + txt003 +STRI + V0 -1.36741 1.36741 1.37222 V1 -0.978656 1.66628 1.37222 V2 -1.0063 1.71335 1.1309 + N0 -0.680271 0.680271 0.272877 N1 -0.482704 0.832247 0.272693 N2 -0.495256 0.853889 0.159982 + txt003 +STRI + V0 -1.0063 1.71335 1.1309 V1 -1.40603 1.40603 1.1309 V2 -1.36741 1.36741 1.37222 + N0 -0.495256 0.853889 0.159982 N1 -0.697986 0.697986 0.160096 N2 -0.680271 0.680271 0.272877 + txt003 +STRI + V0 -0.978656 1.66628 1.37222 V1 -0.517147 1.85816 1.37222 V2 -0.531754 1.91065 1.1309 + N0 -0.482704 0.832247 0.272693 N1 -0.250446 0.929073 0.272213 N2 -0.256935 0.953145 0.159686 + txt003 +STRI + V0 -0.531754 1.91065 1.1309 V1 -1.0063 1.71335 1.1309 V2 -0.978656 1.66628 1.37222 + N0 -0.256935 0.953145 0.159686 N1 -0.495256 0.853889 0.159982 N2 -0.482704 0.832247 0.272693 + txt003 +STRI + V0 -0.517147 1.85816 1.37222 V1 -2.22045e-16 1.92593 1.37222 V2 2.22045e-16 1.98032 1.1309 + N0 -0.250446 0.929073 0.272213 N1 1.11936e-16 0.96234 0.271848 N2 6.38555e-17 0.987204 0.15946 + txt003 +STRI + V0 2.22045e-16 1.98032 1.1309 V1 -0.531754 1.91065 1.1309 V2 -0.517147 1.85816 1.37222 + N0 6.38555e-17 0.987204 0.15946 N1 -0.256935 0.953145 0.159686 N2 -0.250446 0.929073 0.272213 + txt003 +STRI + V0 -1.98032 0 1.1309 V1 -1.91065 0.531754 1.1309 V2 -1.92963 0.537037 0.9 + N0 -0.987204 0 0.15946 N1 -0.953145 0.256935 0.159686 N2 -0.965535 0.260275 5.17854e-17 + txt003 +STRI + V0 -1.92963 0.537037 0.9 V1 -2 0 0.9 V2 -1.98032 0 1.1309 + N0 -0.965535 0.260275 5.17854e-17 N1 -1 0 0 N2 -0.987204 0 0.15946 + txt003 +STRI + V0 -1.91065 0.531754 1.1309 V1 -1.71335 1.0063 1.1309 V2 -1.73037 1.0163 0.9 + N0 -0.953145 0.256935 0.159686 N1 -0.853889 0.495256 0.159982 N2 -0.865031 0.501718 1.36587e-16 + txt003 +STRI + V0 -1.73037 1.0163 0.9 V1 -1.92963 0.537037 0.9 V2 -1.91065 0.531754 1.1309 + N0 -0.865031 0.501718 1.36587e-16 N1 -0.965535 0.260275 5.17854e-17 N2 -0.953145 0.256935 0.159686 + txt003 +STRI + V0 -1.71335 1.0063 1.1309 V1 -1.40603 1.40603 1.1309 V2 -1.42 1.42 0.9 + N0 -0.853889 0.495256 0.159982 N1 -0.697986 0.697986 0.160096 N2 -0.707107 0.707107 1.74455e-16 + txt003 +STRI + V0 -1.42 1.42 0.9 V1 -1.73037 1.0163 0.9 V2 -1.71335 1.0063 1.1309 + N0 -0.707107 0.707107 1.74455e-16 N1 -0.865031 0.501718 1.36587e-16 N2 -0.853889 0.495256 0.159982 + txt003 +STRI + V0 -1.40603 1.40603 1.1309 V1 -1.0063 1.71335 1.1309 V2 -1.0163 1.73037 0.9 + N0 -0.697986 0.697986 0.160096 N1 -0.495256 0.853889 0.159982 N2 -0.501718 0.865031 1.36587e-16 + txt003 +STRI + V0 -1.0163 1.73037 0.9 V1 -1.42 1.42 0.9 V2 -1.40603 1.40603 1.1309 + N0 -0.501718 0.865031 1.36587e-16 N1 -0.707107 0.707107 1.74455e-16 N2 -0.697986 0.697986 0.160096 + txt003 +STRI + V0 -1.0063 1.71335 1.1309 V1 -0.531754 1.91065 1.1309 V2 -0.537037 1.92963 0.9 + N0 -0.495256 0.853889 0.159982 N1 -0.256935 0.953145 0.159686 N2 -0.260275 0.965535 5.17854e-17 + txt003 +STRI + V0 -0.537037 1.92963 0.9 V1 -1.0163 1.73037 0.9 V2 -1.0063 1.71335 1.1309 + N0 -0.260275 0.965535 5.17854e-17 N1 -0.501718 0.865031 1.36587e-16 N2 -0.495256 0.853889 0.159982 + txt003 +STRI + V0 -0.531754 1.91065 1.1309 V1 2.22045e-16 1.98032 1.1309 V2 0 2 0.9 + N0 -0.256935 0.953145 0.159686 N1 6.38555e-17 0.987204 0.15946 N2 0 1 0 + txt003 +STRI + V0 0 2 0.9 V1 -0.537037 1.92963 0.9 V2 -0.531754 1.91065 1.1309 + N0 0 1 0 N1 -0.260275 0.965535 5.17854e-17 N2 -0.256935 0.953145 0.159686 + txt003 +STRI + V0 0 1.5 2.4 V1 0.402778 1.44722 2.4 V2 0.436032 1.56671 2.13785 + N0 -0 0.902861 0.429934 N1 0.234929 0.871509 0.430442 N2 0.235963 0.875348 0.422003 + txt003 +STRI + V0 0.436032 1.56671 2.13785 V1 0 1.62384 2.13785 V2 0 1.5 2.4 + N0 0.235963 0.875348 0.422003 N1 -0 0.906828 0.4215 N2 -0 0.902861 0.429934 + txt003 +STRI + V0 0.402778 1.44722 2.4 V1 0.762222 1.29778 2.4 V2 0.825153 1.40492 2.13785 + N0 0.234929 0.871509 0.430442 N1 0.4527 0.780517 0.43111 N2 0.4547 0.783966 0.422664 + txt003 +STRI + V0 0.825153 1.40492 2.13785 V1 0.436032 1.56671 2.13785 V2 0.402778 1.44722 2.4 + N0 0.4547 0.783966 0.422664 N1 0.235963 0.875348 0.422003 N2 0.234929 0.871509 0.430442 + txt003 +STRI + V0 0.762222 1.29778 2.4 V1 1.065 1.065 2.4 V2 1.15293 1.15293 2.13785 + N0 0.4527 0.780517 0.43111 N1 0.637936 0.637936 0.431366 N2 0.640758 0.640758 0.422917 + txt003 +STRI + V0 1.15293 1.15293 2.13785 V1 0.825153 1.40492 2.13785 V2 0.762222 1.29778 2.4 + N0 0.640758 0.640758 0.422917 N1 0.4547 0.783966 0.422664 N2 0.4527 0.780517 0.43111 + txt003 +STRI + V0 1.065 1.065 2.4 V1 1.29778 0.762222 2.4 V2 1.40492 0.825153 2.13785 + N0 0.637936 0.637936 0.431366 N1 0.780517 0.4527 0.43111 N2 0.783966 0.4547 0.422664 + txt003 +STRI + V0 1.40492 0.825153 2.13785 V1 1.15293 1.15293 2.13785 V2 1.065 1.065 2.4 + N0 0.783966 0.4547 0.422664 N1 0.640758 0.640758 0.422917 N2 0.637936 0.637936 0.431366 + txt003 +STRI + V0 1.29778 0.762222 2.4 V1 1.44722 0.402778 2.4 V2 1.56671 0.436032 2.13785 + N0 0.780517 0.4527 0.43111 N1 0.871509 0.234929 0.430442 N2 0.875348 0.235963 0.422003 + txt003 +STRI + V0 1.56671 0.436032 2.13785 V1 1.40492 0.825153 2.13785 V2 1.29778 0.762222 2.4 + N0 0.875348 0.235963 0.422003 N1 0.783966 0.4547 0.422664 N2 0.780517 0.4527 0.43111 + txt003 +STRI + V0 1.44722 0.402778 2.4 V1 1.5 0 2.4 V2 1.62384 2.22045e-16 2.13785 + N0 0.871509 0.234929 0.430442 N1 0.902861 -2.27296e-16 0.429934 N2 0.906828 -2.05843e-16 0.4215 + txt003 +STRI + V0 1.62384 2.22045e-16 2.13785 V1 1.56671 0.436032 2.13785 V2 1.44722 0.402778 2.4 + N0 0.906828 -2.05843e-16 0.4215 N1 0.875348 0.235963 0.422003 N2 0.871509 0.234929 0.430442 + txt003 +STRI + V0 0 1.62384 2.13785 V1 0.436032 1.56671 2.13785 V2 0.467421 1.67949 1.87778 + N0 -0 0.906828 0.4215 N1 0.235963 0.875348 0.422003 N2 0.239043 0.886771 0.395595 + txt003 +STRI + V0 0.467421 1.67949 1.87778 V1 0 1.74074 1.87778 V2 0 1.62384 2.13785 + N0 0.239043 0.886771 0.395595 N1 -0 0.918633 0.395111 N2 -0 0.906828 0.4215 + txt003 +STRI + V0 0.436032 1.56671 2.13785 V1 0.825153 1.40492 2.13785 V2 0.884554 1.50606 1.87778 + N0 0.235963 0.875348 0.422003 N1 0.4547 0.783966 0.422664 N2 0.460653 0.794229 0.39623 + txt003 +STRI + V0 0.884554 1.50606 1.87778 V1 0.467421 1.67949 1.87778 V2 0.436032 1.56671 2.13785 + N0 0.460653 0.794229 0.39623 N1 0.239043 0.886771 0.395595 N2 0.235963 0.875348 0.422003 + txt003 +STRI + V0 0.825153 1.40492 2.13785 V1 1.15293 1.15293 2.13785 V2 1.23593 1.23593 1.87778 + N0 0.4547 0.783966 0.422664 N1 0.640758 0.640758 0.422917 N2 0.649156 0.649156 0.396474 + txt003 +STRI + V0 1.23593 1.23593 1.87778 V1 0.884554 1.50606 1.87778 V2 0.825153 1.40492 2.13785 + N0 0.649156 0.649156 0.396474 N1 0.460653 0.794229 0.39623 N2 0.4547 0.783966 0.422664 + txt003 +STRI + V0 1.15293 1.15293 2.13785 V1 1.40492 0.825153 2.13785 V2 1.50606 0.884554 1.87778 + N0 0.640758 0.640758 0.422917 N1 0.783966 0.4547 0.422664 N2 0.794229 0.460653 0.39623 + txt003 +STRI + V0 1.50606 0.884554 1.87778 V1 1.23593 1.23593 1.87778 V2 1.15293 1.15293 2.13785 + N0 0.794229 0.460653 0.39623 N1 0.649156 0.649156 0.396474 N2 0.640758 0.640758 0.422917 + txt003 +STRI + V0 1.40492 0.825153 2.13785 V1 1.56671 0.436032 2.13785 V2 1.67949 0.467421 1.87778 + N0 0.783966 0.4547 0.422664 N1 0.875348 0.235963 0.422003 N2 0.886771 0.239043 0.395595 + txt003 +STRI + V0 1.67949 0.467421 1.87778 V1 1.50606 0.884554 1.87778 V2 1.40492 0.825153 2.13785 + N0 0.886771 0.239043 0.395595 N1 0.794229 0.460653 0.39623 N2 0.783966 0.4547 0.422664 + txt003 +STRI + V0 1.56671 0.436032 2.13785 V1 1.62384 2.22045e-16 2.13785 V2 1.74074 0 1.87778 + N0 0.875348 0.235963 0.422003 N1 0.906828 -2.05843e-16 0.4215 N2 0.918633 -1.79998e-16 0.395111 + txt003 +STRI + V0 1.74074 0 1.87778 V1 1.67949 0.467421 1.87778 V2 1.56671 0.436032 2.13785 + N0 0.918633 -1.79998e-16 0.395111 N1 0.886771 0.239043 0.395595 N2 0.875348 0.235963 0.422003 + txt003 +STRI + V0 0 1.74074 1.87778 V1 0.467421 1.67949 1.87778 V2 0.495081 1.77888 1.62188 + N0 -0 0.918633 0.395111 N1 0.239043 0.886771 0.395595 N2 0.244029 0.90527 0.347757 + txt003 +STRI + V0 0.495081 1.77888 1.62188 V1 0 1.84375 1.62188 V2 0 1.74074 1.87778 + N0 0.244029 0.90527 0.347757 N1 -0 0.937749 0.347314 N2 -0 0.918633 0.395111 + txt003 +STRI + V0 0.467421 1.67949 1.87778 V1 0.884554 1.50606 1.87778 V2 0.936898 1.59519 1.62188 + N0 0.239043 0.886771 0.395595 N1 0.460653 0.794229 0.39623 N2 0.470295 0.810853 0.34834 + txt003 +STRI + V0 0.936898 1.59519 1.62188 V1 0.495081 1.77888 1.62188 V2 0.467421 1.67949 1.87778 + N0 0.470295 0.810853 0.34834 N1 0.244029 0.90527 0.347757 N2 0.239043 0.886771 0.395595 + txt003 +STRI + V0 0.884554 1.50606 1.87778 V1 1.23593 1.23593 1.87778 V2 1.30906 1.30906 1.62188 + N0 0.460653 0.794229 0.39623 N1 0.649156 0.649156 0.396474 N2 0.662761 0.662761 0.348563 + txt003 +STRI + V0 1.30906 1.30906 1.62188 V1 0.936898 1.59519 1.62188 V2 0.884554 1.50606 1.87778 + N0 0.662761 0.662761 0.348563 N1 0.470295 0.810853 0.34834 N2 0.460653 0.794229 0.39623 + txt003 +STRI + V0 1.23593 1.23593 1.87778 V1 1.50606 0.884554 1.87778 V2 1.59519 0.936898 1.62187 + N0 0.649156 0.649156 0.396474 N1 0.794229 0.460653 0.39623 N2 0.810853 0.470295 0.34834 + txt003 +STRI + V0 1.59519 0.936898 1.62187 V1 1.30906 1.30906 1.62188 V2 1.23593 1.23593 1.87778 + N0 0.810853 0.470295 0.34834 N1 0.662761 0.662761 0.348563 N2 0.649156 0.649156 0.396474 + txt003 +STRI + V0 1.50606 0.884554 1.87778 V1 1.67949 0.467421 1.87778 V2 1.77888 0.495081 1.62187 + N0 0.794229 0.460653 0.39623 N1 0.886771 0.239043 0.395595 N2 0.90527 0.244029 0.347757 + txt003 +STRI + V0 1.77888 0.495081 1.62187 V1 1.59519 0.936898 1.62187 V2 1.50606 0.884554 1.87778 + N0 0.90527 0.244029 0.347757 N1 0.810853 0.470295 0.34834 N2 0.794229 0.460653 0.39623 + txt003 +STRI + V0 1.67949 0.467421 1.87778 V1 1.74074 0 1.87778 V2 1.84375 0 1.62187 + N0 0.886771 0.239043 0.395595 N1 0.918633 -1.79998e-16 0.395111 N2 0.937749 -1.49384e-16 0.347314 + txt003 +STRI + V0 1.84375 0 1.62187 V1 1.77888 0.495081 1.62187 V2 1.67949 0.467421 1.87778 + N0 0.937749 -1.49384e-16 0.347314 N1 0.90527 0.244029 0.347757 N2 0.886771 0.239043 0.395595 + txt003 +STRI + V0 0 1.84375 1.62188 V1 0.495081 1.77888 1.62188 V2 0.517147 1.85816 1.37222 + N0 -0 0.937749 0.347314 N1 0.244029 0.90527 0.347757 N2 0.250446 0.929073 0.272213 + txt003 +STRI + V0 0.517147 1.85816 1.37222 V1 0 1.92593 1.37222 V2 0 1.84375 1.62188 + N0 0.250446 0.929073 0.272213 N1 -0 0.96234 0.271848 N2 -0 0.937749 0.347314 + txt003 +STRI + V0 0.495081 1.77888 1.62188 V1 0.936898 1.59519 1.62188 V2 0.978656 1.66628 1.37222 + N0 0.244029 0.90527 0.347757 N1 0.470295 0.810853 0.34834 N2 0.482704 0.832247 0.272693 + txt003 +STRI + V0 0.978656 1.66628 1.37222 V1 0.517147 1.85816 1.37222 V2 0.495081 1.77888 1.62188 + N0 0.482704 0.832247 0.272693 N1 0.250446 0.929073 0.272213 N2 0.244029 0.90527 0.347757 + txt003 +STRI + V0 0.936898 1.59519 1.62188 V1 1.30906 1.30906 1.62188 V2 1.36741 1.36741 1.37222 + N0 0.470295 0.810853 0.34834 N1 0.662761 0.662761 0.348563 N2 0.680271 0.680271 0.272877 + txt003 +STRI + V0 1.36741 1.36741 1.37222 V1 0.978656 1.66628 1.37222 V2 0.936898 1.59519 1.62188 + N0 0.680271 0.680271 0.272877 N1 0.482704 0.832247 0.272693 N2 0.470295 0.810853 0.34834 + txt003 +STRI + V0 1.30906 1.30906 1.62188 V1 1.59519 0.936898 1.62187 V2 1.66628 0.978656 1.37222 + N0 0.662761 0.662761 0.348563 N1 0.810853 0.470295 0.34834 N2 0.832247 0.482704 0.272693 + txt003 +STRI + V0 1.66628 0.978656 1.37222 V1 1.36741 1.36741 1.37222 V2 1.30906 1.30906 1.62188 + N0 0.832247 0.482704 0.272693 N1 0.680271 0.680271 0.272877 N2 0.662761 0.662761 0.348563 + txt003 +STRI + V0 1.59519 0.936898 1.62187 V1 1.77888 0.495081 1.62187 V2 1.85816 0.517147 1.37222 + N0 0.810853 0.470295 0.34834 N1 0.90527 0.244029 0.347757 N2 0.929073 0.250446 0.272213 + txt003 +STRI + V0 1.85816 0.517147 1.37222 V1 1.66628 0.978656 1.37222 V2 1.59519 0.936898 1.62187 + N0 0.929073 0.250446 0.272213 N1 0.832247 0.482704 0.272693 N2 0.810853 0.470295 0.34834 + txt003 +STRI + V0 1.77888 0.495081 1.62187 V1 1.84375 0 1.62187 V2 1.92593 2.22045e-16 1.37222 + N0 0.90527 0.244029 0.347757 N1 0.937749 -1.49384e-16 0.347314 N2 0.96234 -1.11936e-16 0.271848 + txt003 +STRI + V0 1.92593 2.22045e-16 1.37222 V1 1.85816 0.517147 1.37222 V2 1.77888 0.495081 1.62187 + N0 0.96234 -1.11936e-16 0.271848 N1 0.929073 0.250446 0.272213 N2 0.90527 0.244029 0.347757 + txt003 +STRI + V0 0 1.92593 1.37222 V1 0.517147 1.85816 1.37222 V2 0.531754 1.91065 1.1309 + N0 -0 0.96234 0.271848 N1 0.250446 0.929073 0.272213 N2 0.256935 0.953145 0.159686 + txt003 +STRI + V0 0.531754 1.91065 1.1309 V1 0 1.98032 1.1309 V2 0 1.92593 1.37222 + N0 0.256935 0.953145 0.159686 N1 -0 0.987204 0.15946 N2 -0 0.96234 0.271848 + txt003 +STRI + V0 0.517147 1.85816 1.37222 V1 0.978656 1.66628 1.37222 V2 1.0063 1.71335 1.1309 + N0 0.250446 0.929073 0.272213 N1 0.482704 0.832247 0.272693 N2 0.495256 0.853889 0.159982 + txt003 +STRI + V0 1.0063 1.71335 1.1309 V1 0.531754 1.91065 1.1309 V2 0.517147 1.85816 1.37222 + N0 0.495256 0.853889 0.159982 N1 0.256935 0.953145 0.159686 N2 0.250446 0.929073 0.272213 + txt003 +STRI + V0 0.978656 1.66628 1.37222 V1 1.36741 1.36741 1.37222 V2 1.40603 1.40603 1.1309 + N0 0.482704 0.832247 0.272693 N1 0.680271 0.680271 0.272877 N2 0.697986 0.697986 0.160096 + txt003 +STRI + V0 1.40603 1.40603 1.1309 V1 1.0063 1.71335 1.1309 V2 0.978656 1.66628 1.37222 + N0 0.697986 0.697986 0.160096 N1 0.495256 0.853889 0.159982 N2 0.482704 0.832247 0.272693 + txt003 +STRI + V0 1.36741 1.36741 1.37222 V1 1.66628 0.978656 1.37222 V2 1.71335 1.0063 1.1309 + N0 0.680271 0.680271 0.272877 N1 0.832247 0.482704 0.272693 N2 0.853889 0.495256 0.159982 + txt003 +STRI + V0 1.71335 1.0063 1.1309 V1 1.40603 1.40603 1.1309 V2 1.36741 1.36741 1.37222 + N0 0.853889 0.495256 0.159982 N1 0.697986 0.697986 0.160096 N2 0.680271 0.680271 0.272877 + txt003 +STRI + V0 1.66628 0.978656 1.37222 V1 1.85816 0.517147 1.37222 V2 1.91065 0.531754 1.1309 + N0 0.832247 0.482704 0.272693 N1 0.929073 0.250446 0.272213 N2 0.953145 0.256935 0.159686 + txt003 +STRI + V0 1.91065 0.531754 1.1309 V1 1.71335 1.0063 1.1309 V2 1.66628 0.978656 1.37222 + N0 0.953145 0.256935 0.159686 N1 0.853889 0.495256 0.159982 N2 0.832247 0.482704 0.272693 + txt003 +STRI + V0 1.85816 0.517147 1.37222 V1 1.92593 2.22045e-16 1.37222 V2 1.98032 -2.22045e-16 1.1309 + N0 0.929073 0.250446 0.272213 N1 0.96234 -1.11936e-16 0.271848 N2 0.987204 -6.38555e-17 0.15946 + txt003 +STRI + V0 1.98032 -2.22045e-16 1.1309 V1 1.91065 0.531754 1.1309 V2 1.85816 0.517147 1.37222 + N0 0.987204 -6.38555e-17 0.15946 N1 0.953145 0.256935 0.159686 N2 0.929073 0.250446 0.272213 + txt003 +STRI + V0 0 1.98032 1.1309 V1 0.531754 1.91065 1.1309 V2 0.537037 1.92963 0.9 + N0 -0 0.987204 0.15946 N1 0.256935 0.953145 0.159686 N2 0.260275 0.965535 5.17854e-17 + txt003 +STRI + V0 0.537037 1.92963 0.9 V1 0 2 0.9 V2 0 1.98032 1.1309 + N0 0.260275 0.965535 5.17854e-17 N1 -0 1 0 N2 -0 0.987204 0.15946 + txt003 +STRI + V0 0.531754 1.91065 1.1309 V1 1.0063 1.71335 1.1309 V2 1.0163 1.73037 0.9 + N0 0.256935 0.953145 0.159686 N1 0.495256 0.853889 0.159982 N2 0.501718 0.865031 1.36587e-16 + txt003 +STRI + V0 1.0163 1.73037 0.9 V1 0.537037 1.92963 0.9 V2 0.531754 1.91065 1.1309 + N0 0.501718 0.865031 1.36587e-16 N1 0.260275 0.965535 5.17854e-17 N2 0.256935 0.953145 0.159686 + txt003 +STRI + V0 1.0063 1.71335 1.1309 V1 1.40603 1.40603 1.1309 V2 1.42 1.42 0.9 + N0 0.495256 0.853889 0.159982 N1 0.697986 0.697986 0.160096 N2 0.707107 0.707107 1.74455e-16 + txt003 +STRI + V0 1.42 1.42 0.9 V1 1.0163 1.73037 0.9 V2 1.0063 1.71335 1.1309 + N0 0.707107 0.707107 1.74455e-16 N1 0.501718 0.865031 1.36587e-16 N2 0.495256 0.853889 0.159982 + txt003 +STRI + V0 1.40603 1.40603 1.1309 V1 1.71335 1.0063 1.1309 V2 1.73037 1.0163 0.9 + N0 0.697986 0.697986 0.160096 N1 0.853889 0.495256 0.159982 N2 0.865031 0.501718 1.36587e-16 + txt003 +STRI + V0 1.73037 1.0163 0.9 V1 1.42 1.42 0.9 V2 1.40603 1.40603 1.1309 + N0 0.865031 0.501718 1.36587e-16 N1 0.707107 0.707107 1.74455e-16 N2 0.697986 0.697986 0.160096 + txt003 +STRI + V0 1.71335 1.0063 1.1309 V1 1.91065 0.531754 1.1309 V2 1.92963 0.537037 0.9 + N0 0.853889 0.495256 0.159982 N1 0.953145 0.256935 0.159686 N2 0.965535 0.260275 5.17854e-17 + txt003 +STRI + V0 1.92963 0.537037 0.9 V1 1.73037 1.0163 0.9 V2 1.71335 1.0063 1.1309 + N0 0.965535 0.260275 5.17854e-17 N1 0.865031 0.501718 1.36587e-16 N2 0.853889 0.495256 0.159982 + txt003 +STRI + V0 1.91065 0.531754 1.1309 V1 1.98032 -2.22045e-16 1.1309 V2 2 0 0.9 + N0 0.953145 0.256935 0.159686 N1 0.987204 -6.38555e-17 0.15946 N2 1 0 0 + txt003 +STRI + V0 2 0 0.9 V1 1.92963 0.537037 0.9 V2 1.91065 0.531754 1.1309 + N0 1 0 0 N1 0.965535 0.260275 5.17854e-17 N2 0.953145 0.256935 0.159686 + txt003 +STRI + V0 2 0 0.9 V1 1.92963 -0.537037 0.9 V2 1.8939 -0.527092 0.693403 + N0 1 0 0 N1 0.965535 -0.260275 0 N2 0.905874 -0.244192 -0.346067 + txt003 +STRI + V0 1.8939 -0.527092 0.693403 V1 1.96296 0 0.693403 V2 2 0 0.9 + N0 0.905874 -0.244192 -0.346067 N1 0.938373 0 -0.345625 N2 1 0 0 + txt003 +STRI + V0 1.92963 -0.537037 0.9 V1 1.73037 -1.0163 0.9 V2 1.69833 -0.997476 0.693403 + N0 0.965535 -0.260275 0 N1 0.865031 -0.501718 0 N2 0.811395 -0.470609 -0.346647 + txt003 +STRI + V0 1.69833 -0.997476 0.693403 V1 1.8939 -0.527092 0.693403 V2 1.92963 -0.537037 0.9 + N0 0.811395 -0.470609 -0.346647 N1 0.905874 -0.244192 -0.346067 N2 0.965535 -0.260275 0 + txt003 +STRI + V0 1.73037 -1.0163 0.9 V1 1.42 -1.42 0.9 V2 1.3937 -1.3937 0.693403 + N0 0.865031 -0.501718 0 N1 0.707107 -0.707107 0 N2 0.663205 -0.663205 -0.34687 + txt003 +STRI + V0 1.3937 -1.3937 0.693403 V1 1.69833 -0.997476 0.693403 V2 1.73037 -1.0163 0.9 + N0 0.663205 -0.663205 -0.34687 N1 0.811395 -0.470609 -0.346647 N2 0.865031 -0.501718 0 + txt003 +STRI + V0 1.42 -1.42 0.9 V1 1.0163 -1.73037 0.9 V2 0.997476 -1.69833 0.693403 + N0 0.707107 -0.707107 0 N1 0.501718 -0.865031 0 N2 0.470609 -0.811395 -0.346647 + txt003 +STRI + V0 0.997476 -1.69833 0.693403 V1 1.3937 -1.3937 0.693403 V2 1.42 -1.42 0.9 + N0 0.470609 -0.811395 -0.346647 N1 0.663205 -0.663205 -0.34687 N2 0.707107 -0.707107 0 + txt003 +STRI + V0 1.0163 -1.73037 0.9 V1 0.537037 -1.92963 0.9 V2 0.527092 -1.8939 0.693403 + N0 0.501718 -0.865031 0 N1 0.260275 -0.965535 0 N2 0.244192 -0.905874 -0.346067 + txt003 +STRI + V0 0.527092 -1.8939 0.693403 V1 0.997476 -1.69833 0.693403 V2 1.0163 -1.73037 0.9 + N0 0.244192 -0.905874 -0.346067 N1 0.470609 -0.811395 -0.346647 N2 0.501718 -0.865031 0 + txt003 +STRI + V0 0.537037 -1.92963 0.9 V1 0 -2 0.9 V2 2.22045e-16 -1.96296 0.693403 + N0 0.260275 -0.965535 0 N1 -0 -1 -0 N2 -3.49072e-17 -0.938373 -0.345625 + txt003 +STRI + V0 2.22045e-16 -1.96296 0.693403 V1 0.527092 -1.8939 0.693403 V2 0.537037 -1.92963 0.9 + N0 -3.49072e-17 -0.938373 -0.345625 N1 0.244192 -0.905874 -0.346067 N2 0.260275 -0.965535 0 + txt003 +STRI + V0 1.96296 0 0.693403 V1 1.8939 -0.527092 0.693403 V2 1.80456 -0.502229 0.522222 + N0 0.938373 0 -0.345625 N1 0.905874 -0.244192 -0.346067 N2 0.782908 -0.211045 -0.585248 + txt003 +STRI + V0 1.80456 -0.502229 0.522222 V1 1.87037 0 0.522222 V2 1.96296 0 0.693403 + N0 0.782908 -0.211045 -0.585248 N1 0.811257 0 -0.58469 N2 0.938373 0 -0.345625 + txt003 +STRI + V0 1.8939 -0.527092 0.693403 V1 1.69833 -0.997476 0.693403 V2 1.61822 -0.950425 0.522222 + N0 0.905874 -0.244192 -0.346067 N1 0.811395 -0.470609 -0.346647 N2 0.700957 -0.406555 -0.58598 + txt003 +STRI + V0 1.61822 -0.950425 0.522222 V1 1.80456 -0.502229 0.522222 V2 1.8939 -0.527092 0.693403 + N0 0.700957 -0.406555 -0.58598 N1 0.782908 -0.211045 -0.585248 N2 0.905874 -0.244192 -0.346067 + txt003 +STRI + V0 1.69833 -0.997476 0.693403 V1 1.3937 -1.3937 0.693403 V2 1.32796 -1.32796 0.522222 + N0 0.811395 -0.470609 -0.346647 N1 0.663205 -0.663205 -0.34687 N2 0.572843 -0.572843 -0.586261 + txt003 +STRI + V0 1.32796 -1.32796 0.522222 V1 1.61822 -0.950425 0.522222 V2 1.69833 -0.997476 0.693403 + N0 0.572843 -0.572843 -0.586261 N1 0.700957 -0.406555 -0.58598 N2 0.811395 -0.470609 -0.346647 + txt003 +STRI + V0 1.3937 -1.3937 0.693403 V1 0.997476 -1.69833 0.693403 V2 0.950425 -1.61822 0.522222 + N0 0.663205 -0.663205 -0.34687 N1 0.470609 -0.811395 -0.346647 N2 0.406555 -0.700957 -0.58598 + txt003 +STRI + V0 0.950425 -1.61822 0.522222 V1 1.32796 -1.32796 0.522222 V2 1.3937 -1.3937 0.693403 + N0 0.406555 -0.700957 -0.58598 N1 0.572843 -0.572843 -0.586261 N2 0.663205 -0.663205 -0.34687 + txt003 +STRI + V0 0.997476 -1.69833 0.693403 V1 0.527092 -1.8939 0.693403 V2 0.502229 -1.80456 0.522222 + N0 0.470609 -0.811395 -0.346647 N1 0.244192 -0.905874 -0.346067 N2 0.211045 -0.782908 -0.585248 + txt003 +STRI + V0 0.502229 -1.80456 0.522222 V1 0.950425 -1.61822 0.522222 V2 0.997476 -1.69833 0.693403 + N0 0.211045 -0.782908 -0.585248 N1 0.406555 -0.700957 -0.58598 N2 0.470609 -0.811395 -0.346647 + txt003 +STRI + V0 0.527092 -1.8939 0.693403 V1 2.22045e-16 -1.96296 0.693403 V2 2.22045e-16 -1.87037 0.522222 + N0 0.244192 -0.905874 -0.346067 N1 -3.49072e-17 -0.938373 -0.345625 N2 -6.19755e-17 -0.811257 -0.58469 + txt003 +STRI + V0 2.22045e-16 -1.87037 0.522222 V1 0.502229 -1.80456 0.522222 V2 0.527092 -1.8939 0.693403 + N0 -6.19755e-17 -0.811257 -0.58469 N1 0.211045 -0.782908 -0.585248 N2 0.244192 -0.905874 -0.346067 + txt003 +STRI + V0 1.87037 0 0.522222 V1 1.80456 -0.502229 0.522222 V2 1.68843 -0.469907 0.384375 + N0 0.811257 0 -0.58469 N1 0.782908 -0.211045 -0.585248 N2 0.673539 -0.181563 -0.716506 + txt003 +STRI + V0 1.68843 -0.469907 0.384375 V1 1.75 0 0.384375 V2 1.87037 0 0.522222 + N0 0.673539 -0.181563 -0.716506 N1 0.6981 0 -0.716 N2 0.811257 0 -0.58469 + txt003 +STRI + V0 1.80456 -0.502229 0.522222 V1 1.61822 -0.950425 0.522222 V2 1.51407 -0.889259 0.384375 + N0 0.782908 -0.211045 -0.585248 N1 0.700957 -0.406555 -0.58598 N2 0.602839 -0.349647 -0.717169 + txt003 +STRI + V0 1.51407 -0.889259 0.384375 V1 1.68843 -0.469907 0.384375 V2 1.80456 -0.502229 0.522222 + N0 0.602839 -0.349647 -0.717169 N1 0.673539 -0.181563 -0.716506 N2 0.782908 -0.211045 -0.585248 + txt003 +STRI + V0 1.61822 -0.950425 0.522222 V1 1.32796 -1.32796 0.522222 V2 1.2425 -1.2425 0.384375 + N0 0.700957 -0.406555 -0.58598 N1 0.572843 -0.572843 -0.586261 N2 0.492597 -0.492597 -0.717423 + txt003 +STRI + V0 1.2425 -1.2425 0.384375 V1 1.51407 -0.889259 0.384375 V2 1.61822 -0.950425 0.522222 + N0 0.492597 -0.492597 -0.717423 N1 0.602839 -0.349647 -0.717169 N2 0.700957 -0.406555 -0.58598 + txt003 +STRI + V0 1.32796 -1.32796 0.522222 V1 0.950425 -1.61822 0.522222 V2 0.889259 -1.51407 0.384375 + N0 0.572843 -0.572843 -0.586261 N1 0.406555 -0.700957 -0.58598 N2 0.349647 -0.602839 -0.717169 + txt003 +STRI + V0 0.889259 -1.51407 0.384375 V1 1.2425 -1.2425 0.384375 V2 1.32796 -1.32796 0.522222 + N0 0.349647 -0.602839 -0.717169 N1 0.492597 -0.492597 -0.717423 N2 0.572843 -0.572843 -0.586261 + txt003 +STRI + V0 0.950425 -1.61822 0.522222 V1 0.502229 -1.80456 0.522222 V2 0.469907 -1.68843 0.384375 + N0 0.406555 -0.700957 -0.58598 N1 0.211045 -0.782908 -0.585248 N2 0.181563 -0.673539 -0.716506 + txt003 +STRI + V0 0.469907 -1.68843 0.384375 V1 0.889259 -1.51407 0.384375 V2 0.950425 -1.61822 0.522222 + N0 0.181563 -0.673539 -0.716506 N1 0.349647 -0.602839 -0.717169 N2 0.406555 -0.700957 -0.58598 + txt003 +STRI + V0 0.502229 -1.80456 0.522222 V1 2.22045e-16 -1.87037 0.522222 V2 2.22045e-16 -1.75 0.384375 + N0 0.211045 -0.782908 -0.585248 N1 -6.19755e-17 -0.811257 -0.58469 N2 -8.11143e-17 -0.6981 -0.716 + txt003 +STRI + V0 2.22045e-16 -1.75 0.384375 V1 0.469907 -1.68843 0.384375 V2 0.502229 -1.80456 0.522222 + N0 -8.11143e-17 -0.6981 -0.716 N1 0.181563 -0.673539 -0.716506 N2 0.211045 -0.782908 -0.585248 + txt003 +STRI + V0 1.75 0 0.384375 V1 1.68843 -0.469907 0.384375 V2 1.57229 -0.437586 0.277778 + N0 0.6981 0 -0.716 N1 0.673539 -0.181563 -0.716506 N2 0.61392 -0.165491 -0.771826 + txt003 +STRI + V0 1.57229 -0.437586 0.277778 V1 1.62963 0 0.277778 V2 1.75 0 0.384375 + N0 0.61392 -0.165491 -0.771826 N1 0.636383 0 -0.771373 N2 0.6981 0 -0.716 + txt003 +STRI + V0 1.68843 -0.469907 0.384375 V1 1.51407 -0.889259 0.384375 V2 1.40993 -0.828093 0.277778 + N0 0.673539 -0.181563 -0.716506 N1 0.602839 -0.349647 -0.717169 N2 0.549392 -0.318647 -0.77242 + txt003 +STRI + V0 1.40993 -0.828093 0.277778 V1 1.57229 -0.437586 0.277778 V2 1.68843 -0.469907 0.384375 + N0 0.549392 -0.318647 -0.77242 N1 0.61392 -0.165491 -0.771826 N2 0.673539 -0.181563 -0.716506 + txt003 +STRI + V0 1.51407 -0.889259 0.384375 V1 1.2425 -1.2425 0.384375 V2 1.15704 -1.15704 0.277778 + N0 0.602839 -0.349647 -0.717169 N1 0.492597 -0.492597 -0.717423 N2 0.448897 -0.448897 -0.772647 + txt003 +STRI + V0 1.15704 -1.15704 0.277778 V1 1.40993 -0.828093 0.277778 V2 1.51407 -0.889259 0.384375 + N0 0.448897 -0.448897 -0.772647 N1 0.549392 -0.318647 -0.77242 N2 0.602839 -0.349647 -0.717169 + txt003 +STRI + V0 1.2425 -1.2425 0.384375 V1 0.889259 -1.51407 0.384375 V2 0.828093 -1.40993 0.277778 + N0 0.492597 -0.492597 -0.717423 N1 0.349647 -0.602839 -0.717169 N2 0.318647 -0.549392 -0.77242 + txt003 +STRI + V0 0.828093 -1.40993 0.277778 V1 1.15704 -1.15704 0.277778 V2 1.2425 -1.2425 0.384375 + N0 0.318647 -0.549392 -0.77242 N1 0.448897 -0.448897 -0.772647 N2 0.492597 -0.492597 -0.717423 + txt003 +STRI + V0 0.889259 -1.51407 0.384375 V1 0.469907 -1.68843 0.384375 V2 0.437586 -1.57229 0.277778 + N0 0.349647 -0.602839 -0.717169 N1 0.181563 -0.673539 -0.716506 N2 0.165491 -0.61392 -0.771826 + txt003 +STRI + V0 0.437586 -1.57229 0.277778 V1 0.828093 -1.40993 0.277778 V2 0.889259 -1.51407 0.384375 + N0 0.165491 -0.61392 -0.771826 N1 0.318647 -0.549392 -0.77242 N2 0.349647 -0.602839 -0.717169 + txt003 +STRI + V0 0.469907 -1.68843 0.384375 V1 2.22045e-16 -1.75 0.384375 V2 0 -1.62963 0.277778 + N0 0.181563 -0.673539 -0.716506 N1 -8.11143e-17 -0.6981 -0.716 N2 -1.97068e-16 -0.636383 -0.771373 + txt003 +STRI + V0 0 -1.62963 0.277778 V1 0.437586 -1.57229 0.277778 V2 0.469907 -1.68843 0.384375 + N0 -1.97068e-16 -0.636383 -0.771373 N1 0.165491 -0.61392 -0.771826 N2 0.181563 -0.673539 -0.716506 + txt003 +STRI + V0 1.62963 0 0.277778 V1 1.57229 -0.437586 0.277778 V2 1.48296 -0.412723 0.200347 + N0 0.636383 0 -0.771373 N1 0.61392 -0.165491 -0.771826 N2 0.651276 -0.175561 -0.738253 + txt003 +STRI + V0 1.48296 -0.412723 0.200347 V1 1.53704 0 0.200347 V2 1.62963 0 0.277778 + N0 0.651276 -0.175561 -0.738253 N1 0.675056 0 -0.737766 N2 0.636383 0 -0.771373 + txt003 +STRI + V0 1.57229 -0.437586 0.277778 V1 1.40993 -0.828093 0.277778 V2 1.32982 -0.781043 0.200347 + N0 0.61392 -0.165491 -0.771826 N1 0.549392 -0.318647 -0.77242 N2 0.582878 -0.338069 -0.738893 + txt003 +STRI + V0 1.32982 -0.781043 0.200347 V1 1.48296 -0.412723 0.200347 V2 1.57229 -0.437586 0.277778 + N0 0.582878 -0.338069 -0.738893 N1 0.651276 -0.175561 -0.738253 N2 0.61392 -0.165491 -0.771826 + txt003 +STRI + V0 1.40993 -0.828093 0.277778 V1 1.15704 -1.15704 0.277778 V2 1.0913 -1.0913 0.200347 + N0 0.549392 -0.318647 -0.77242 N1 0.448897 -0.448897 -0.772647 N2 0.476275 -0.476275 -0.739137 + txt003 +STRI + V0 1.0913 -1.0913 0.200347 V1 1.32982 -0.781043 0.200347 V2 1.40993 -0.828093 0.277778 + N0 0.476275 -0.476275 -0.739137 N1 0.582878 -0.338069 -0.738893 N2 0.549392 -0.318647 -0.77242 + txt003 +STRI + V0 1.15704 -1.15704 0.277778 V1 0.828093 -1.40993 0.277778 V2 0.781043 -1.32982 0.200347 + N0 0.448897 -0.448897 -0.772647 N1 0.318647 -0.549392 -0.77242 N2 0.338069 -0.582878 -0.738893 + txt003 +STRI + V0 0.781043 -1.32982 0.200347 V1 1.0913 -1.0913 0.200347 V2 1.15704 -1.15704 0.277778 + N0 0.338069 -0.582878 -0.738893 N1 0.476275 -0.476275 -0.739137 N2 0.448897 -0.448897 -0.772647 + txt003 +STRI + V0 0.828093 -1.40993 0.277778 V1 0.437586 -1.57229 0.277778 V2 0.412723 -1.48296 0.200347 + N0 0.318647 -0.549392 -0.77242 N1 0.165491 -0.61392 -0.771826 N2 0.175561 -0.651276 -0.738253 + txt003 +STRI + V0 0.412723 -1.48296 0.200347 V1 0.781043 -1.32982 0.200347 V2 0.828093 -1.40993 0.277778 + N0 0.175561 -0.651276 -0.738253 N1 0.338069 -0.582878 -0.738893 N2 0.318647 -0.549392 -0.77242 + txt003 +STRI + V0 0.437586 -1.57229 0.277778 V1 0 -1.62963 0.277778 V2 0 -1.53704 0.200347 + N0 0.165491 -0.61392 -0.771826 N1 -1.97068e-16 -0.636383 -0.771373 N2 -9.51605e-17 -0.675056 -0.737766 + txt003 +STRI + V0 0 -1.53704 0.200347 V1 0.412723 -1.48296 0.200347 V2 0.437586 -1.57229 0.277778 + N0 -9.51605e-17 -0.675056 -0.737766 N1 0.175561 -0.651276 -0.738253 N2 0.165491 -0.61392 -0.771826 + txt003 +STRI + V0 1.53704 0 0.200347 V1 1.48296 -0.412723 0.200347 V2 1.44722 -0.402778 0.15 + N0 0.675056 0 -0.737766 N1 0.651276 -0.175561 -0.738253 N2 0.965535 -0.260275 0 + txt003 +STRI + V0 1.44722 -0.402778 0.15 V1 1.5 0 0.15 V2 1.53704 0 0.200347 + N0 0.965535 -0.260275 0 N1 1 0 0 N2 0.675056 0 -0.737766 + txt003 +STRI + V0 1.48296 -0.412723 0.200347 V1 1.32982 -0.781043 0.200347 V2 1.29778 -0.762222 0.15 + N0 0.651276 -0.175561 -0.738253 N1 0.582878 -0.338069 -0.738893 N2 0.865031 -0.501718 0 + txt003 +STRI + V0 1.29778 -0.762222 0.15 V1 1.44722 -0.402778 0.15 V2 1.48296 -0.412723 0.200347 + N0 0.865031 -0.501718 0 N1 0.965535 -0.260275 0 N2 0.651276 -0.175561 -0.738253 + txt003 +STRI + V0 1.32982 -0.781043 0.200347 V1 1.0913 -1.0913 0.200347 V2 1.065 -1.065 0.15 + N0 0.582878 -0.338069 -0.738893 N1 0.476275 -0.476275 -0.739137 N2 0.707107 -0.707107 0 + txt003 +STRI + V0 1.065 -1.065 0.15 V1 1.29778 -0.762222 0.15 V2 1.32982 -0.781043 0.200347 + N0 0.707107 -0.707107 0 N1 0.865031 -0.501718 0 N2 0.582878 -0.338069 -0.738893 + txt003 +STRI + V0 1.0913 -1.0913 0.200347 V1 0.781043 -1.32982 0.200347 V2 0.762222 -1.29778 0.15 + N0 0.476275 -0.476275 -0.739137 N1 0.338069 -0.582878 -0.738893 N2 0.501718 -0.865031 0 + txt003 +STRI + V0 0.762222 -1.29778 0.15 V1 1.065 -1.065 0.15 V2 1.0913 -1.0913 0.200347 + N0 0.501718 -0.865031 0 N1 0.707107 -0.707107 0 N2 0.476275 -0.476275 -0.739137 + txt003 +STRI + V0 0.781043 -1.32982 0.200347 V1 0.412723 -1.48296 0.200347 V2 0.402778 -1.44722 0.15 + N0 0.338069 -0.582878 -0.738893 N1 0.175561 -0.651276 -0.738253 N2 0.260275 -0.965535 0 + txt003 +STRI + V0 0.402778 -1.44722 0.15 V1 0.762222 -1.29778 0.15 V2 0.781043 -1.32982 0.200347 + N0 0.260275 -0.965535 0 N1 0.501718 -0.865031 0 N2 0.338069 -0.582878 -0.738893 + txt003 +STRI + V0 0.412723 -1.48296 0.200347 V1 0 -1.53704 0.200347 V2 0 -1.5 0.15 + N0 0.175561 -0.651276 -0.738253 N1 -9.51605e-17 -0.675056 -0.737766 N2 -0 -1 -0 + txt003 +STRI + V0 0 -1.5 0.15 V1 0.402778 -1.44722 0.15 V2 0.412723 -1.48296 0.200347 + N0 -0 -1 -0 N1 0.260275 -0.965535 0 N2 0.175561 -0.651276 -0.738253 + txt003 +STRI + V0 0 -2 0.9 V1 -0.537037 -1.92963 0.9 V2 -0.527092 -1.8939 0.693403 + N0 -0 -1 -0 N1 -0.260275 -0.965535 -0 N2 -0.244192 -0.905874 -0.346067 + txt003 +STRI + V0 -0.527092 -1.8939 0.693403 V1 0 -1.96296 0.693403 V2 0 -2 0.9 + N0 -0.244192 -0.905874 -0.346067 N1 -0 -0.938373 -0.345625 N2 -0 -1 -0 + txt003 +STRI + V0 -0.537037 -1.92963 0.9 V1 -1.0163 -1.73037 0.9 V2 -0.997476 -1.69833 0.693403 + N0 -0.260275 -0.965535 -0 N1 -0.501718 -0.865031 -0 N2 -0.470609 -0.811395 -0.346647 + txt003 +STRI + V0 -0.997476 -1.69833 0.693403 V1 -0.527092 -1.8939 0.693403 V2 -0.537037 -1.92963 0.9 + N0 -0.470609 -0.811395 -0.346647 N1 -0.244192 -0.905874 -0.346067 N2 -0.260275 -0.965535 -0 + txt003 +STRI + V0 -1.0163 -1.73037 0.9 V1 -1.42 -1.42 0.9 V2 -1.3937 -1.3937 0.693403 + N0 -0.501718 -0.865031 -0 N1 -0.707107 -0.707107 -0 N2 -0.663205 -0.663205 -0.34687 + txt003 +STRI + V0 -1.3937 -1.3937 0.693403 V1 -0.997476 -1.69833 0.693403 V2 -1.0163 -1.73037 0.9 + N0 -0.663205 -0.663205 -0.34687 N1 -0.470609 -0.811395 -0.346647 N2 -0.501718 -0.865031 -0 + txt003 +STRI + V0 -1.42 -1.42 0.9 V1 -1.73037 -1.0163 0.9 V2 -1.69833 -0.997476 0.693403 + N0 -0.707107 -0.707107 -0 N1 -0.865031 -0.501718 -0 N2 -0.811395 -0.470609 -0.346647 + txt003 +STRI + V0 -1.69833 -0.997476 0.693403 V1 -1.3937 -1.3937 0.693403 V2 -1.42 -1.42 0.9 + N0 -0.811395 -0.470609 -0.346647 N1 -0.663205 -0.663205 -0.34687 N2 -0.707107 -0.707107 -0 + txt003 +STRI + V0 -1.73037 -1.0163 0.9 V1 -1.92963 -0.537037 0.9 V2 -1.8939 -0.527092 0.693403 + N0 -0.865031 -0.501718 -0 N1 -0.965535 -0.260275 -0 N2 -0.905874 -0.244192 -0.346067 + txt003 +STRI + V0 -1.8939 -0.527092 0.693403 V1 -1.69833 -0.997476 0.693403 V2 -1.73037 -1.0163 0.9 + N0 -0.905874 -0.244192 -0.346067 N1 -0.811395 -0.470609 -0.346647 N2 -0.865031 -0.501718 -0 + txt003 +STRI + V0 -1.92963 -0.537037 0.9 V1 -2 0 0.9 V2 -1.96296 -2.22045e-16 0.693403 + N0 -0.965535 -0.260275 -0 N1 -1 0 0 N2 -0.938373 3.49072e-17 -0.345625 + txt003 +STRI + V0 -1.96296 -2.22045e-16 0.693403 V1 -1.8939 -0.527092 0.693403 V2 -1.92963 -0.537037 0.9 + N0 -0.938373 3.49072e-17 -0.345625 N1 -0.905874 -0.244192 -0.346067 N2 -0.965535 -0.260275 -0 + txt003 +STRI + V0 0 -1.96296 0.693403 V1 -0.527092 -1.8939 0.693403 V2 -0.502229 -1.80456 0.522222 + N0 -0 -0.938373 -0.345625 N1 -0.244192 -0.905874 -0.346067 N2 -0.211045 -0.782908 -0.585248 + txt003 +STRI + V0 -0.502229 -1.80456 0.522222 V1 0 -1.87037 0.522222 V2 0 -1.96296 0.693403 + N0 -0.211045 -0.782908 -0.585248 N1 -0 -0.811257 -0.58469 N2 -0 -0.938373 -0.345625 + txt003 +STRI + V0 -0.527092 -1.8939 0.693403 V1 -0.997476 -1.69833 0.693403 V2 -0.950425 -1.61822 0.522222 + N0 -0.244192 -0.905874 -0.346067 N1 -0.470609 -0.811395 -0.346647 N2 -0.406555 -0.700957 -0.58598 + txt003 +STRI + V0 -0.950425 -1.61822 0.522222 V1 -0.502229 -1.80456 0.522222 V2 -0.527092 -1.8939 0.693403 + N0 -0.406555 -0.700957 -0.58598 N1 -0.211045 -0.782908 -0.585248 N2 -0.244192 -0.905874 -0.346067 + txt003 +STRI + V0 -0.997476 -1.69833 0.693403 V1 -1.3937 -1.3937 0.693403 V2 -1.32796 -1.32796 0.522222 + N0 -0.470609 -0.811395 -0.346647 N1 -0.663205 -0.663205 -0.34687 N2 -0.572843 -0.572843 -0.586261 + txt003 +STRI + V0 -1.32796 -1.32796 0.522222 V1 -0.950425 -1.61822 0.522222 V2 -0.997476 -1.69833 0.693403 + N0 -0.572843 -0.572843 -0.586261 N1 -0.406555 -0.700957 -0.58598 N2 -0.470609 -0.811395 -0.346647 + txt003 +STRI + V0 -1.3937 -1.3937 0.693403 V1 -1.69833 -0.997476 0.693403 V2 -1.61822 -0.950425 0.522222 + N0 -0.663205 -0.663205 -0.34687 N1 -0.811395 -0.470609 -0.346647 N2 -0.700957 -0.406555 -0.58598 + txt003 +STRI + V0 -1.61822 -0.950425 0.522222 V1 -1.32796 -1.32796 0.522222 V2 -1.3937 -1.3937 0.693403 + N0 -0.700957 -0.406555 -0.58598 N1 -0.572843 -0.572843 -0.586261 N2 -0.663205 -0.663205 -0.34687 + txt003 +STRI + V0 -1.69833 -0.997476 0.693403 V1 -1.8939 -0.527092 0.693403 V2 -1.80456 -0.502229 0.522222 + N0 -0.811395 -0.470609 -0.346647 N1 -0.905874 -0.244192 -0.346067 N2 -0.782908 -0.211045 -0.585248 + txt003 +STRI + V0 -1.80456 -0.502229 0.522222 V1 -1.61822 -0.950425 0.522222 V2 -1.69833 -0.997476 0.693403 + N0 -0.782908 -0.211045 -0.585248 N1 -0.700957 -0.406555 -0.58598 N2 -0.811395 -0.470609 -0.346647 + txt003 +STRI + V0 -1.8939 -0.527092 0.693403 V1 -1.96296 -2.22045e-16 0.693403 V2 -1.87037 -2.22045e-16 0.522222 + N0 -0.905874 -0.244192 -0.346067 N1 -0.938373 3.49072e-17 -0.345625 N2 -0.811257 6.19755e-17 -0.58469 + txt003 +STRI + V0 -1.87037 -2.22045e-16 0.522222 V1 -1.80456 -0.502229 0.522222 V2 -1.8939 -0.527092 0.693403 + N0 -0.811257 6.19755e-17 -0.58469 N1 -0.782908 -0.211045 -0.585248 N2 -0.905874 -0.244192 -0.346067 + txt003 +STRI + V0 0 -1.87037 0.522222 V1 -0.502229 -1.80456 0.522222 V2 -0.469907 -1.68843 0.384375 + N0 -0 -0.811257 -0.58469 N1 -0.211045 -0.782908 -0.585248 N2 -0.181563 -0.673539 -0.716506 + txt003 +STRI + V0 -0.469907 -1.68843 0.384375 V1 0 -1.75 0.384375 V2 0 -1.87037 0.522222 + N0 -0.181563 -0.673539 -0.716506 N1 -0 -0.6981 -0.716 N2 -0 -0.811257 -0.58469 + txt003 +STRI + V0 -0.502229 -1.80456 0.522222 V1 -0.950425 -1.61822 0.522222 V2 -0.889259 -1.51407 0.384375 + N0 -0.211045 -0.782908 -0.585248 N1 -0.406555 -0.700957 -0.58598 N2 -0.349647 -0.602839 -0.717169 + txt003 +STRI + V0 -0.889259 -1.51407 0.384375 V1 -0.469907 -1.68843 0.384375 V2 -0.502229 -1.80456 0.522222 + N0 -0.349647 -0.602839 -0.717169 N1 -0.181563 -0.673539 -0.716506 N2 -0.211045 -0.782908 -0.585248 + txt003 +STRI + V0 -0.950425 -1.61822 0.522222 V1 -1.32796 -1.32796 0.522222 V2 -1.2425 -1.2425 0.384375 + N0 -0.406555 -0.700957 -0.58598 N1 -0.572843 -0.572843 -0.586261 N2 -0.492597 -0.492597 -0.717423 + txt003 +STRI + V0 -1.2425 -1.2425 0.384375 V1 -0.889259 -1.51407 0.384375 V2 -0.950425 -1.61822 0.522222 + N0 -0.492597 -0.492597 -0.717423 N1 -0.349647 -0.602839 -0.717169 N2 -0.406555 -0.700957 -0.58598 + txt003 +STRI + V0 -1.32796 -1.32796 0.522222 V1 -1.61822 -0.950425 0.522222 V2 -1.51407 -0.889259 0.384375 + N0 -0.572843 -0.572843 -0.586261 N1 -0.700957 -0.406555 -0.58598 N2 -0.602839 -0.349647 -0.717169 + txt003 +STRI + V0 -1.51407 -0.889259 0.384375 V1 -1.2425 -1.2425 0.384375 V2 -1.32796 -1.32796 0.522222 + N0 -0.602839 -0.349647 -0.717169 N1 -0.492597 -0.492597 -0.717423 N2 -0.572843 -0.572843 -0.586261 + txt003 +STRI + V0 -1.61822 -0.950425 0.522222 V1 -1.80456 -0.502229 0.522222 V2 -1.68843 -0.469907 0.384375 + N0 -0.700957 -0.406555 -0.58598 N1 -0.782908 -0.211045 -0.585248 N2 -0.673539 -0.181563 -0.716506 + txt003 +STRI + V0 -1.68843 -0.469907 0.384375 V1 -1.51407 -0.889259 0.384375 V2 -1.61822 -0.950425 0.522222 + N0 -0.673539 -0.181563 -0.716506 N1 -0.602839 -0.349647 -0.717169 N2 -0.700957 -0.406555 -0.58598 + txt003 +STRI + V0 -1.80456 -0.502229 0.522222 V1 -1.87037 -2.22045e-16 0.522222 V2 -1.75 -2.22045e-16 0.384375 + N0 -0.782908 -0.211045 -0.585248 N1 -0.811257 6.19755e-17 -0.58469 N2 -0.6981 8.11143e-17 -0.716 + txt003 +STRI + V0 -1.75 -2.22045e-16 0.384375 V1 -1.68843 -0.469907 0.384375 V2 -1.80456 -0.502229 0.522222 + N0 -0.6981 8.11143e-17 -0.716 N1 -0.673539 -0.181563 -0.716506 N2 -0.782908 -0.211045 -0.585248 + txt003 +STRI + V0 0 -1.75 0.384375 V1 -0.469907 -1.68843 0.384375 V2 -0.437586 -1.57229 0.277778 + N0 -0 -0.6981 -0.716 N1 -0.181563 -0.673539 -0.716506 N2 -0.165491 -0.61392 -0.771826 + txt003 +STRI + V0 -0.437586 -1.57229 0.277778 V1 0 -1.62963 0.277778 V2 0 -1.75 0.384375 + N0 -0.165491 -0.61392 -0.771826 N1 -0 -0.636383 -0.771373 N2 -0 -0.6981 -0.716 + txt003 +STRI + V0 -0.469907 -1.68843 0.384375 V1 -0.889259 -1.51407 0.384375 V2 -0.828093 -1.40993 0.277778 + N0 -0.181563 -0.673539 -0.716506 N1 -0.349647 -0.602839 -0.717169 N2 -0.318647 -0.549392 -0.77242 + txt003 +STRI + V0 -0.828093 -1.40993 0.277778 V1 -0.437586 -1.57229 0.277778 V2 -0.469907 -1.68843 0.384375 + N0 -0.318647 -0.549392 -0.77242 N1 -0.165491 -0.61392 -0.771826 N2 -0.181563 -0.673539 -0.716506 + txt003 +STRI + V0 -0.889259 -1.51407 0.384375 V1 -1.2425 -1.2425 0.384375 V2 -1.15704 -1.15704 0.277778 + N0 -0.349647 -0.602839 -0.717169 N1 -0.492597 -0.492597 -0.717423 N2 -0.448897 -0.448897 -0.772647 + txt003 +STRI + V0 -1.15704 -1.15704 0.277778 V1 -0.828093 -1.40993 0.277778 V2 -0.889259 -1.51407 0.384375 + N0 -0.448897 -0.448897 -0.772647 N1 -0.318647 -0.549392 -0.77242 N2 -0.349647 -0.602839 -0.717169 + txt003 +STRI + V0 -1.2425 -1.2425 0.384375 V1 -1.51407 -0.889259 0.384375 V2 -1.40993 -0.828093 0.277778 + N0 -0.492597 -0.492597 -0.717423 N1 -0.602839 -0.349647 -0.717169 N2 -0.549392 -0.318647 -0.77242 + txt003 +STRI + V0 -1.40993 -0.828093 0.277778 V1 -1.15704 -1.15704 0.277778 V2 -1.2425 -1.2425 0.384375 + N0 -0.549392 -0.318647 -0.77242 N1 -0.448897 -0.448897 -0.772647 N2 -0.492597 -0.492597 -0.717423 + txt003 +STRI + V0 -1.51407 -0.889259 0.384375 V1 -1.68843 -0.469907 0.384375 V2 -1.57229 -0.437586 0.277778 + N0 -0.602839 -0.349647 -0.717169 N1 -0.673539 -0.181563 -0.716506 N2 -0.61392 -0.165491 -0.771826 + txt003 +STRI + V0 -1.57229 -0.437586 0.277778 V1 -1.40993 -0.828093 0.277778 V2 -1.51407 -0.889259 0.384375 + N0 -0.61392 -0.165491 -0.771826 N1 -0.549392 -0.318647 -0.77242 N2 -0.602839 -0.349647 -0.717169 + txt003 +STRI + V0 -1.68843 -0.469907 0.384375 V1 -1.75 -2.22045e-16 0.384375 V2 -1.62963 0 0.277778 + N0 -0.673539 -0.181563 -0.716506 N1 -0.6981 8.11143e-17 -0.716 N2 -0.636383 1.97068e-16 -0.771373 + txt003 +STRI + V0 -1.62963 0 0.277778 V1 -1.57229 -0.437586 0.277778 V2 -1.68843 -0.469907 0.384375 + N0 -0.636383 1.97068e-16 -0.771373 N1 -0.61392 -0.165491 -0.771826 N2 -0.673539 -0.181563 -0.716506 + txt003 +STRI + V0 0 -1.62963 0.277778 V1 -0.437586 -1.57229 0.277778 V2 -0.412723 -1.48296 0.200347 + N0 -0 -0.636383 -0.771373 N1 -0.165491 -0.61392 -0.771826 N2 -0.175561 -0.651276 -0.738253 + txt003 +STRI + V0 -0.412723 -1.48296 0.200347 V1 0 -1.53704 0.200347 V2 0 -1.62963 0.277778 + N0 -0.175561 -0.651276 -0.738253 N1 -0 -0.675056 -0.737766 N2 -0 -0.636383 -0.771373 + txt003 +STRI + V0 -0.437586 -1.57229 0.277778 V1 -0.828093 -1.40993 0.277778 V2 -0.781043 -1.32982 0.200347 + N0 -0.165491 -0.61392 -0.771826 N1 -0.318647 -0.549392 -0.77242 N2 -0.338069 -0.582878 -0.738893 + txt003 +STRI + V0 -0.781043 -1.32982 0.200347 V1 -0.412723 -1.48296 0.200347 V2 -0.437586 -1.57229 0.277778 + N0 -0.338069 -0.582878 -0.738893 N1 -0.175561 -0.651276 -0.738253 N2 -0.165491 -0.61392 -0.771826 + txt003 +STRI + V0 -0.828093 -1.40993 0.277778 V1 -1.15704 -1.15704 0.277778 V2 -1.0913 -1.0913 0.200347 + N0 -0.318647 -0.549392 -0.77242 N1 -0.448897 -0.448897 -0.772647 N2 -0.476275 -0.476275 -0.739137 + txt003 +STRI + V0 -1.0913 -1.0913 0.200347 V1 -0.781043 -1.32982 0.200347 V2 -0.828093 -1.40993 0.277778 + N0 -0.476275 -0.476275 -0.739137 N1 -0.338069 -0.582878 -0.738893 N2 -0.318647 -0.549392 -0.77242 + txt003 +STRI + V0 -1.15704 -1.15704 0.277778 V1 -1.40993 -0.828093 0.277778 V2 -1.32982 -0.781043 0.200347 + N0 -0.448897 -0.448897 -0.772647 N1 -0.549392 -0.318647 -0.77242 N2 -0.582878 -0.338069 -0.738893 + txt003 +STRI + V0 -1.32982 -0.781043 0.200347 V1 -1.0913 -1.0913 0.200347 V2 -1.15704 -1.15704 0.277778 + N0 -0.582878 -0.338069 -0.738893 N1 -0.476275 -0.476275 -0.739137 N2 -0.448897 -0.448897 -0.772647 + txt003 +STRI + V0 -1.40993 -0.828093 0.277778 V1 -1.57229 -0.437586 0.277778 V2 -1.48296 -0.412723 0.200347 + N0 -0.549392 -0.318647 -0.77242 N1 -0.61392 -0.165491 -0.771826 N2 -0.651276 -0.175561 -0.738253 + txt003 +STRI + V0 -1.48296 -0.412723 0.200347 V1 -1.32982 -0.781043 0.200347 V2 -1.40993 -0.828093 0.277778 + N0 -0.651276 -0.175561 -0.738253 N1 -0.582878 -0.338069 -0.738893 N2 -0.549392 -0.318647 -0.77242 + txt003 +STRI + V0 -1.57229 -0.437586 0.277778 V1 -1.62963 0 0.277778 V2 -1.53704 0 0.200347 + N0 -0.61392 -0.165491 -0.771826 N1 -0.636383 1.97068e-16 -0.771373 N2 -0.675056 9.51605e-17 -0.737766 + txt003 +STRI + V0 -1.53704 0 0.200347 V1 -1.48296 -0.412723 0.200347 V2 -1.57229 -0.437586 0.277778 + N0 -0.675056 9.51605e-17 -0.737766 N1 -0.651276 -0.175561 -0.738253 N2 -0.61392 -0.165491 -0.771826 + txt003 +STRI + V0 0 -1.53704 0.200347 V1 -0.412723 -1.48296 0.200347 V2 -0.402778 -1.44722 0.15 + N0 -0 -0.675056 -0.737766 N1 -0.175561 -0.651276 -0.738253 N2 -0.260275 -0.965535 -0 + txt003 +STRI + V0 -0.402778 -1.44722 0.15 V1 0 -1.5 0.15 V2 0 -1.53704 0.200347 + N0 -0.260275 -0.965535 -0 N1 -0 -1 -0 N2 -0 -0.675056 -0.737766 + txt003 +STRI + V0 -0.412723 -1.48296 0.200347 V1 -0.781043 -1.32982 0.200347 V2 -0.762222 -1.29778 0.15 + N0 -0.175561 -0.651276 -0.738253 N1 -0.338069 -0.582878 -0.738893 N2 -0.501718 -0.865031 -0 + txt003 +STRI + V0 -0.762222 -1.29778 0.15 V1 -0.402778 -1.44722 0.15 V2 -0.412723 -1.48296 0.200347 + N0 -0.501718 -0.865031 -0 N1 -0.260275 -0.965535 -0 N2 -0.175561 -0.651276 -0.738253 + txt003 +STRI + V0 -0.781043 -1.32982 0.200347 V1 -1.0913 -1.0913 0.200347 V2 -1.065 -1.065 0.15 + N0 -0.338069 -0.582878 -0.738893 N1 -0.476275 -0.476275 -0.739137 N2 -0.707107 -0.707107 -0 + txt003 +STRI + V0 -1.065 -1.065 0.15 V1 -0.762222 -1.29778 0.15 V2 -0.781043 -1.32982 0.200347 + N0 -0.707107 -0.707107 -0 N1 -0.501718 -0.865031 -0 N2 -0.338069 -0.582878 -0.738893 + txt003 +STRI + V0 -1.0913 -1.0913 0.200347 V1 -1.32982 -0.781043 0.200347 V2 -1.29778 -0.762222 0.15 + N0 -0.476275 -0.476275 -0.739137 N1 -0.582878 -0.338069 -0.738893 N2 -0.865031 -0.501718 -0 + txt003 +STRI + V0 -1.29778 -0.762222 0.15 V1 -1.065 -1.065 0.15 V2 -1.0913 -1.0913 0.200347 + N0 -0.865031 -0.501718 -0 N1 -0.707107 -0.707107 -0 N2 -0.476275 -0.476275 -0.739137 + txt003 +STRI + V0 -1.32982 -0.781043 0.200347 V1 -1.48296 -0.412723 0.200347 V2 -1.44722 -0.402778 0.15 + N0 -0.582878 -0.338069 -0.738893 N1 -0.651276 -0.175561 -0.738253 N2 -0.965535 -0.260275 -0 + txt003 +STRI + V0 -1.44722 -0.402778 0.15 V1 -1.29778 -0.762222 0.15 V2 -1.32982 -0.781043 0.200347 + N0 -0.965535 -0.260275 -0 N1 -0.865031 -0.501718 -0 N2 -0.582878 -0.338069 -0.738893 + txt003 +STRI + V0 -1.48296 -0.412723 0.200347 V1 -1.53704 0 0.200347 V2 -1.5 0 0.15 + N0 -0.651276 -0.175561 -0.738253 N1 -0.675056 9.51605e-17 -0.737766 N2 -1 0 0 + txt003 +STRI + V0 -1.5 0 0.15 V1 -1.44722 -0.402778 0.15 V2 -1.48296 -0.412723 0.200347 + N0 -1 0 0 N1 -0.965535 -0.260275 -0 N2 -0.651276 -0.175561 -0.738253 + txt003 +STRI + V0 -2 0 0.9 V1 -1.92963 0.537037 0.9 V2 -1.8939 0.527092 0.693403 + N0 -1 0 0 N1 -0.965535 0.260275 0 N2 -0.905874 0.244192 -0.346067 + txt003 +STRI + V0 -1.8939 0.527092 0.693403 V1 -1.96296 0 0.693403 V2 -2 0 0.9 + N0 -0.905874 0.244192 -0.346067 N1 -0.938373 0 -0.345625 N2 -1 0 0 + txt003 +STRI + V0 -1.92963 0.537037 0.9 V1 -1.73037 1.0163 0.9 V2 -1.69833 0.997476 0.693403 + N0 -0.965535 0.260275 0 N1 -0.865031 0.501718 0 N2 -0.811395 0.470609 -0.346647 + txt003 +STRI + V0 -1.69833 0.997476 0.693403 V1 -1.8939 0.527092 0.693403 V2 -1.92963 0.537037 0.9 + N0 -0.811395 0.470609 -0.346647 N1 -0.905874 0.244192 -0.346067 N2 -0.965535 0.260275 0 + txt003 +STRI + V0 -1.73037 1.0163 0.9 V1 -1.42 1.42 0.9 V2 -1.3937 1.3937 0.693403 + N0 -0.865031 0.501718 0 N1 -0.707107 0.707107 0 N2 -0.663205 0.663205 -0.34687 + txt003 +STRI + V0 -1.3937 1.3937 0.693403 V1 -1.69833 0.997476 0.693403 V2 -1.73037 1.0163 0.9 + N0 -0.663205 0.663205 -0.34687 N1 -0.811395 0.470609 -0.346647 N2 -0.865031 0.501718 0 + txt003 +STRI + V0 -1.42 1.42 0.9 V1 -1.0163 1.73037 0.9 V2 -0.997476 1.69833 0.693403 + N0 -0.707107 0.707107 0 N1 -0.501718 0.865031 0 N2 -0.470609 0.811395 -0.346647 + txt003 +STRI + V0 -0.997476 1.69833 0.693403 V1 -1.3937 1.3937 0.693403 V2 -1.42 1.42 0.9 + N0 -0.470609 0.811395 -0.346647 N1 -0.663205 0.663205 -0.34687 N2 -0.707107 0.707107 0 + txt003 +STRI + V0 -1.0163 1.73037 0.9 V1 -0.537037 1.92963 0.9 V2 -0.527092 1.8939 0.693403 + N0 -0.501718 0.865031 0 N1 -0.260275 0.965535 0 N2 -0.244192 0.905874 -0.346067 + txt003 +STRI + V0 -0.527092 1.8939 0.693403 V1 -0.997476 1.69833 0.693403 V2 -1.0163 1.73037 0.9 + N0 -0.244192 0.905874 -0.346067 N1 -0.470609 0.811395 -0.346647 N2 -0.501718 0.865031 0 + txt003 +STRI + V0 -0.537037 1.92963 0.9 V1 0 2 0.9 V2 -2.22045e-16 1.96296 0.693403 + N0 -0.260275 0.965535 0 N1 -0 1 0 N2 3.49072e-17 0.938373 -0.345625 + txt003 +STRI + V0 -2.22045e-16 1.96296 0.693403 V1 -0.527092 1.8939 0.693403 V2 -0.537037 1.92963 0.9 + N0 3.49072e-17 0.938373 -0.345625 N1 -0.244192 0.905874 -0.346067 N2 -0.260275 0.965535 0 + txt003 +STRI + V0 -1.96296 0 0.693403 V1 -1.8939 0.527092 0.693403 V2 -1.80456 0.502229 0.522222 + N0 -0.938373 0 -0.345625 N1 -0.905874 0.244192 -0.346067 N2 -0.782908 0.211045 -0.585248 + txt003 +STRI + V0 -1.80456 0.502229 0.522222 V1 -1.87037 0 0.522222 V2 -1.96296 0 0.693403 + N0 -0.782908 0.211045 -0.585248 N1 -0.811257 0 -0.58469 N2 -0.938373 0 -0.345625 + txt003 +STRI + V0 -1.8939 0.527092 0.693403 V1 -1.69833 0.997476 0.693403 V2 -1.61822 0.950425 0.522222 + N0 -0.905874 0.244192 -0.346067 N1 -0.811395 0.470609 -0.346647 N2 -0.700957 0.406555 -0.58598 + txt003 +STRI + V0 -1.61822 0.950425 0.522222 V1 -1.80456 0.502229 0.522222 V2 -1.8939 0.527092 0.693403 + N0 -0.700957 0.406555 -0.58598 N1 -0.782908 0.211045 -0.585248 N2 -0.905874 0.244192 -0.346067 + txt003 +STRI + V0 -1.69833 0.997476 0.693403 V1 -1.3937 1.3937 0.693403 V2 -1.32796 1.32796 0.522222 + N0 -0.811395 0.470609 -0.346647 N1 -0.663205 0.663205 -0.34687 N2 -0.572843 0.572843 -0.586261 + txt003 +STRI + V0 -1.32796 1.32796 0.522222 V1 -1.61822 0.950425 0.522222 V2 -1.69833 0.997476 0.693403 + N0 -0.572843 0.572843 -0.586261 N1 -0.700957 0.406555 -0.58598 N2 -0.811395 0.470609 -0.346647 + txt003 +STRI + V0 -1.3937 1.3937 0.693403 V1 -0.997476 1.69833 0.693403 V2 -0.950425 1.61822 0.522222 + N0 -0.663205 0.663205 -0.34687 N1 -0.470609 0.811395 -0.346647 N2 -0.406555 0.700957 -0.58598 + txt003 +STRI + V0 -0.950425 1.61822 0.522222 V1 -1.32796 1.32796 0.522222 V2 -1.3937 1.3937 0.693403 + N0 -0.406555 0.700957 -0.58598 N1 -0.572843 0.572843 -0.586261 N2 -0.663205 0.663205 -0.34687 + txt003 +STRI + V0 -0.997476 1.69833 0.693403 V1 -0.527092 1.8939 0.693403 V2 -0.502229 1.80456 0.522222 + N0 -0.470609 0.811395 -0.346647 N1 -0.244192 0.905874 -0.346067 N2 -0.211045 0.782908 -0.585248 + txt003 +STRI + V0 -0.502229 1.80456 0.522222 V1 -0.950425 1.61822 0.522222 V2 -0.997476 1.69833 0.693403 + N0 -0.211045 0.782908 -0.585248 N1 -0.406555 0.700957 -0.58598 N2 -0.470609 0.811395 -0.346647 + txt003 +STRI + V0 -0.527092 1.8939 0.693403 V1 -2.22045e-16 1.96296 0.693403 V2 -2.22045e-16 1.87037 0.522222 + N0 -0.244192 0.905874 -0.346067 N1 3.49072e-17 0.938373 -0.345625 N2 6.19755e-17 0.811257 -0.58469 + txt003 +STRI + V0 -2.22045e-16 1.87037 0.522222 V1 -0.502229 1.80456 0.522222 V2 -0.527092 1.8939 0.693403 + N0 6.19755e-17 0.811257 -0.58469 N1 -0.211045 0.782908 -0.585248 N2 -0.244192 0.905874 -0.346067 + txt003 +STRI + V0 -1.87037 0 0.522222 V1 -1.80456 0.502229 0.522222 V2 -1.68843 0.469907 0.384375 + N0 -0.811257 0 -0.58469 N1 -0.782908 0.211045 -0.585248 N2 -0.673539 0.181563 -0.716506 + txt003 +STRI + V0 -1.68843 0.469907 0.384375 V1 -1.75 0 0.384375 V2 -1.87037 0 0.522222 + N0 -0.673539 0.181563 -0.716506 N1 -0.6981 0 -0.716 N2 -0.811257 0 -0.58469 + txt003 +STRI + V0 -1.80456 0.502229 0.522222 V1 -1.61822 0.950425 0.522222 V2 -1.51407 0.889259 0.384375 + N0 -0.782908 0.211045 -0.585248 N1 -0.700957 0.406555 -0.58598 N2 -0.602839 0.349647 -0.717169 + txt003 +STRI + V0 -1.51407 0.889259 0.384375 V1 -1.68843 0.469907 0.384375 V2 -1.80456 0.502229 0.522222 + N0 -0.602839 0.349647 -0.717169 N1 -0.673539 0.181563 -0.716506 N2 -0.782908 0.211045 -0.585248 + txt003 +STRI + V0 -1.61822 0.950425 0.522222 V1 -1.32796 1.32796 0.522222 V2 -1.2425 1.2425 0.384375 + N0 -0.700957 0.406555 -0.58598 N1 -0.572843 0.572843 -0.586261 N2 -0.492597 0.492597 -0.717423 + txt003 +STRI + V0 -1.2425 1.2425 0.384375 V1 -1.51407 0.889259 0.384375 V2 -1.61822 0.950425 0.522222 + N0 -0.492597 0.492597 -0.717423 N1 -0.602839 0.349647 -0.717169 N2 -0.700957 0.406555 -0.58598 + txt003 +STRI + V0 -1.32796 1.32796 0.522222 V1 -0.950425 1.61822 0.522222 V2 -0.889259 1.51407 0.384375 + N0 -0.572843 0.572843 -0.586261 N1 -0.406555 0.700957 -0.58598 N2 -0.349647 0.602839 -0.717169 + txt003 +STRI + V0 -0.889259 1.51407 0.384375 V1 -1.2425 1.2425 0.384375 V2 -1.32796 1.32796 0.522222 + N0 -0.349647 0.602839 -0.717169 N1 -0.492597 0.492597 -0.717423 N2 -0.572843 0.572843 -0.586261 + txt003 +STRI + V0 -0.950425 1.61822 0.522222 V1 -0.502229 1.80456 0.522222 V2 -0.469907 1.68843 0.384375 + N0 -0.406555 0.700957 -0.58598 N1 -0.211045 0.782908 -0.585248 N2 -0.181563 0.673539 -0.716506 + txt003 +STRI + V0 -0.469907 1.68843 0.384375 V1 -0.889259 1.51407 0.384375 V2 -0.950425 1.61822 0.522222 + N0 -0.181563 0.673539 -0.716506 N1 -0.349647 0.602839 -0.717169 N2 -0.406555 0.700957 -0.58598 + txt003 +STRI + V0 -0.502229 1.80456 0.522222 V1 -2.22045e-16 1.87037 0.522222 V2 -2.22045e-16 1.75 0.384375 + N0 -0.211045 0.782908 -0.585248 N1 6.19755e-17 0.811257 -0.58469 N2 8.11143e-17 0.6981 -0.716 + txt003 +STRI + V0 -2.22045e-16 1.75 0.384375 V1 -0.469907 1.68843 0.384375 V2 -0.502229 1.80456 0.522222 + N0 8.11143e-17 0.6981 -0.716 N1 -0.181563 0.673539 -0.716506 N2 -0.211045 0.782908 -0.585248 + txt003 +STRI + V0 -1.75 0 0.384375 V1 -1.68843 0.469907 0.384375 V2 -1.57229 0.437586 0.277778 + N0 -0.6981 0 -0.716 N1 -0.673539 0.181563 -0.716506 N2 -0.61392 0.165491 -0.771826 + txt003 +STRI + V0 -1.57229 0.437586 0.277778 V1 -1.62963 0 0.277778 V2 -1.75 0 0.384375 + N0 -0.61392 0.165491 -0.771826 N1 -0.636383 0 -0.771373 N2 -0.6981 0 -0.716 + txt003 +STRI + V0 -1.68843 0.469907 0.384375 V1 -1.51407 0.889259 0.384375 V2 -1.40993 0.828093 0.277778 + N0 -0.673539 0.181563 -0.716506 N1 -0.602839 0.349647 -0.717169 N2 -0.549392 0.318647 -0.77242 + txt003 +STRI + V0 -1.40993 0.828093 0.277778 V1 -1.57229 0.437586 0.277778 V2 -1.68843 0.469907 0.384375 + N0 -0.549392 0.318647 -0.77242 N1 -0.61392 0.165491 -0.771826 N2 -0.673539 0.181563 -0.716506 + txt003 +STRI + V0 -1.51407 0.889259 0.384375 V1 -1.2425 1.2425 0.384375 V2 -1.15704 1.15704 0.277778 + N0 -0.602839 0.349647 -0.717169 N1 -0.492597 0.492597 -0.717423 N2 -0.448897 0.448897 -0.772647 + txt003 +STRI + V0 -1.15704 1.15704 0.277778 V1 -1.40993 0.828093 0.277778 V2 -1.51407 0.889259 0.384375 + N0 -0.448897 0.448897 -0.772647 N1 -0.549392 0.318647 -0.77242 N2 -0.602839 0.349647 -0.717169 + txt003 +STRI + V0 -1.2425 1.2425 0.384375 V1 -0.889259 1.51407 0.384375 V2 -0.828093 1.40993 0.277778 + N0 -0.492597 0.492597 -0.717423 N1 -0.349647 0.602839 -0.717169 N2 -0.318647 0.549392 -0.77242 + txt003 +STRI + V0 -0.828093 1.40993 0.277778 V1 -1.15704 1.15704 0.277778 V2 -1.2425 1.2425 0.384375 + N0 -0.318647 0.549392 -0.77242 N1 -0.448897 0.448897 -0.772647 N2 -0.492597 0.492597 -0.717423 + txt003 +STRI + V0 -0.889259 1.51407 0.384375 V1 -0.469907 1.68843 0.384375 V2 -0.437586 1.57229 0.277778 + N0 -0.349647 0.602839 -0.717169 N1 -0.181563 0.673539 -0.716506 N2 -0.165491 0.61392 -0.771826 + txt003 +STRI + V0 -0.437586 1.57229 0.277778 V1 -0.828093 1.40993 0.277778 V2 -0.889259 1.51407 0.384375 + N0 -0.165491 0.61392 -0.771826 N1 -0.318647 0.549392 -0.77242 N2 -0.349647 0.602839 -0.717169 + txt003 +STRI + V0 -0.469907 1.68843 0.384375 V1 -2.22045e-16 1.75 0.384375 V2 0 1.62963 0.277778 + N0 -0.181563 0.673539 -0.716506 N1 8.11143e-17 0.6981 -0.716 N2 1.97068e-16 0.636383 -0.771373 + txt003 +STRI + V0 0 1.62963 0.277778 V1 -0.437586 1.57229 0.277778 V2 -0.469907 1.68843 0.384375 + N0 1.97068e-16 0.636383 -0.771373 N1 -0.165491 0.61392 -0.771826 N2 -0.181563 0.673539 -0.716506 + txt003 +STRI + V0 -1.62963 0 0.277778 V1 -1.57229 0.437586 0.277778 V2 -1.48296 0.412723 0.200347 + N0 -0.636383 0 -0.771373 N1 -0.61392 0.165491 -0.771826 N2 -0.651276 0.175561 -0.738253 + txt003 +STRI + V0 -1.48296 0.412723 0.200347 V1 -1.53704 0 0.200347 V2 -1.62963 0 0.277778 + N0 -0.651276 0.175561 -0.738253 N1 -0.675056 0 -0.737766 N2 -0.636383 0 -0.771373 + txt003 +STRI + V0 -1.57229 0.437586 0.277778 V1 -1.40993 0.828093 0.277778 V2 -1.32982 0.781043 0.200347 + N0 -0.61392 0.165491 -0.771826 N1 -0.549392 0.318647 -0.77242 N2 -0.582878 0.338069 -0.738893 + txt003 +STRI + V0 -1.32982 0.781043 0.200347 V1 -1.48296 0.412723 0.200347 V2 -1.57229 0.437586 0.277778 + N0 -0.582878 0.338069 -0.738893 N1 -0.651276 0.175561 -0.738253 N2 -0.61392 0.165491 -0.771826 + txt003 +STRI + V0 -1.40993 0.828093 0.277778 V1 -1.15704 1.15704 0.277778 V2 -1.0913 1.0913 0.200347 + N0 -0.549392 0.318647 -0.77242 N1 -0.448897 0.448897 -0.772647 N2 -0.476275 0.476275 -0.739137 + txt003 +STRI + V0 -1.0913 1.0913 0.200347 V1 -1.32982 0.781043 0.200347 V2 -1.40993 0.828093 0.277778 + N0 -0.476275 0.476275 -0.739137 N1 -0.582878 0.338069 -0.738893 N2 -0.549392 0.318647 -0.77242 + txt003 +STRI + V0 -1.15704 1.15704 0.277778 V1 -0.828093 1.40993 0.277778 V2 -0.781043 1.32982 0.200347 + N0 -0.448897 0.448897 -0.772647 N1 -0.318647 0.549392 -0.77242 N2 -0.338069 0.582878 -0.738893 + txt003 +STRI + V0 -0.781043 1.32982 0.200347 V1 -1.0913 1.0913 0.200347 V2 -1.15704 1.15704 0.277778 + N0 -0.338069 0.582878 -0.738893 N1 -0.476275 0.476275 -0.739137 N2 -0.448897 0.448897 -0.772647 + txt003 +STRI + V0 -0.828093 1.40993 0.277778 V1 -0.437586 1.57229 0.277778 V2 -0.412723 1.48296 0.200347 + N0 -0.318647 0.549392 -0.77242 N1 -0.165491 0.61392 -0.771826 N2 -0.175561 0.651276 -0.738253 + txt003 +STRI + V0 -0.412723 1.48296 0.200347 V1 -0.781043 1.32982 0.200347 V2 -0.828093 1.40993 0.277778 + N0 -0.175561 0.651276 -0.738253 N1 -0.338069 0.582878 -0.738893 N2 -0.318647 0.549392 -0.77242 + txt003 +STRI + V0 -0.437586 1.57229 0.277778 V1 0 1.62963 0.277778 V2 0 1.53704 0.200347 + N0 -0.165491 0.61392 -0.771826 N1 1.97068e-16 0.636383 -0.771373 N2 9.51605e-17 0.675056 -0.737766 + txt003 +STRI + V0 0 1.53704 0.200347 V1 -0.412723 1.48296 0.200347 V2 -0.437586 1.57229 0.277778 + N0 9.51605e-17 0.675056 -0.737766 N1 -0.175561 0.651276 -0.738253 N2 -0.165491 0.61392 -0.771826 + txt003 +STRI + V0 -1.53704 0 0.200347 V1 -1.48296 0.412723 0.200347 V2 -1.44722 0.402778 0.15 + N0 -0.675056 0 -0.737766 N1 -0.651276 0.175561 -0.738253 N2 -0.965535 0.260275 0 + txt003 +STRI + V0 -1.44722 0.402778 0.15 V1 -1.5 0 0.15 V2 -1.53704 0 0.200347 + N0 -0.965535 0.260275 0 N1 -1 0 0 N2 -0.675056 0 -0.737766 + txt003 +STRI + V0 -1.48296 0.412723 0.200347 V1 -1.32982 0.781043 0.200347 V2 -1.29778 0.762222 0.15 + N0 -0.651276 0.175561 -0.738253 N1 -0.582878 0.338069 -0.738893 N2 -0.865031 0.501718 0 + txt003 +STRI + V0 -1.29778 0.762222 0.15 V1 -1.44722 0.402778 0.15 V2 -1.48296 0.412723 0.200347 + N0 -0.865031 0.501718 0 N1 -0.965535 0.260275 0 N2 -0.651276 0.175561 -0.738253 + txt003 +STRI + V0 -1.32982 0.781043 0.200347 V1 -1.0913 1.0913 0.200347 V2 -1.065 1.065 0.15 + N0 -0.582878 0.338069 -0.738893 N1 -0.476275 0.476275 -0.739137 N2 -0.707107 0.707107 0 + txt003 +STRI + V0 -1.065 1.065 0.15 V1 -1.29778 0.762222 0.15 V2 -1.32982 0.781043 0.200347 + N0 -0.707107 0.707107 0 N1 -0.865031 0.501718 0 N2 -0.582878 0.338069 -0.738893 + txt003 +STRI + V0 -1.0913 1.0913 0.200347 V1 -0.781043 1.32982 0.200347 V2 -0.762222 1.29778 0.15 + N0 -0.476275 0.476275 -0.739137 N1 -0.338069 0.582878 -0.738893 N2 -0.501718 0.865031 0 + txt003 +STRI + V0 -0.762222 1.29778 0.15 V1 -1.065 1.065 0.15 V2 -1.0913 1.0913 0.200347 + N0 -0.501718 0.865031 0 N1 -0.707107 0.707107 0 N2 -0.476275 0.476275 -0.739137 + txt003 +STRI + V0 -0.781043 1.32982 0.200347 V1 -0.412723 1.48296 0.200347 V2 -0.402778 1.44722 0.15 + N0 -0.338069 0.582878 -0.738893 N1 -0.175561 0.651276 -0.738253 N2 -0.260275 0.965535 0 + txt003 +STRI + V0 -0.402778 1.44722 0.15 V1 -0.762222 1.29778 0.15 V2 -0.781043 1.32982 0.200347 + N0 -0.260275 0.965535 0 N1 -0.501718 0.865031 0 N2 -0.338069 0.582878 -0.738893 + txt003 +STRI + V0 -0.412723 1.48296 0.200347 V1 0 1.53704 0.200347 V2 0 1.5 0.15 + N0 -0.175561 0.651276 -0.738253 N1 9.51605e-17 0.675056 -0.737766 N2 -0 1 0 + txt003 +STRI + V0 0 1.5 0.15 V1 -0.402778 1.44722 0.15 V2 -0.412723 1.48296 0.200347 + N0 -0 1 0 N1 -0.260275 0.965535 0 N2 -0.175561 0.651276 -0.738253 + txt003 +STRI + V0 0 2 0.9 V1 0.537037 1.92963 0.9 V2 0.527092 1.8939 0.693403 + N0 -0 1 0 N1 0.260275 0.965535 0 N2 0.244192 0.905874 -0.346067 + txt003 +STRI + V0 0.527092 1.8939 0.693403 V1 0 1.96296 0.693403 V2 0 2 0.9 + N0 0.244192 0.905874 -0.346067 N1 0 0.938373 -0.345625 N2 -0 1 0 + txt003 +STRI + V0 0.537037 1.92963 0.9 V1 1.0163 1.73037 0.9 V2 0.997476 1.69833 0.693403 + N0 0.260275 0.965535 0 N1 0.501718 0.865031 0 N2 0.470609 0.811395 -0.346647 + txt003 +STRI + V0 0.997476 1.69833 0.693403 V1 0.527092 1.8939 0.693403 V2 0.537037 1.92963 0.9 + N0 0.470609 0.811395 -0.346647 N1 0.244192 0.905874 -0.346067 N2 0.260275 0.965535 0 + txt003 +STRI + V0 1.0163 1.73037 0.9 V1 1.42 1.42 0.9 V2 1.3937 1.3937 0.693403 + N0 0.501718 0.865031 0 N1 0.707107 0.707107 0 N2 0.663205 0.663205 -0.34687 + txt003 +STRI + V0 1.3937 1.3937 0.693403 V1 0.997476 1.69833 0.693403 V2 1.0163 1.73037 0.9 + N0 0.663205 0.663205 -0.34687 N1 0.470609 0.811395 -0.346647 N2 0.501718 0.865031 0 + txt003 +STRI + V0 1.42 1.42 0.9 V1 1.73037 1.0163 0.9 V2 1.69833 0.997476 0.693403 + N0 0.707107 0.707107 0 N1 0.865031 0.501718 0 N2 0.811395 0.470609 -0.346647 + txt003 +STRI + V0 1.69833 0.997476 0.693403 V1 1.3937 1.3937 0.693403 V2 1.42 1.42 0.9 + N0 0.811395 0.470609 -0.346647 N1 0.663205 0.663205 -0.34687 N2 0.707107 0.707107 0 + txt003 +STRI + V0 1.73037 1.0163 0.9 V1 1.92963 0.537037 0.9 V2 1.8939 0.527092 0.693403 + N0 0.865031 0.501718 0 N1 0.965535 0.260275 0 N2 0.905874 0.244192 -0.346067 + txt003 +STRI + V0 1.8939 0.527092 0.693403 V1 1.69833 0.997476 0.693403 V2 1.73037 1.0163 0.9 + N0 0.905874 0.244192 -0.346067 N1 0.811395 0.470609 -0.346647 N2 0.865031 0.501718 0 + txt003 +STRI + V0 1.92963 0.537037 0.9 V1 2 0 0.9 V2 1.96296 2.22045e-16 0.693403 + N0 0.965535 0.260275 0 N1 1 0 0 N2 0.938373 -3.49072e-17 -0.345625 + txt003 +STRI + V0 1.96296 2.22045e-16 0.693403 V1 1.8939 0.527092 0.693403 V2 1.92963 0.537037 0.9 + N0 0.938373 -3.49072e-17 -0.345625 N1 0.905874 0.244192 -0.346067 N2 0.965535 0.260275 0 + txt003 +STRI + V0 0 1.96296 0.693403 V1 0.527092 1.8939 0.693403 V2 0.502229 1.80456 0.522222 + N0 0 0.938373 -0.345625 N1 0.244192 0.905874 -0.346067 N2 0.211045 0.782908 -0.585248 + txt003 +STRI + V0 0.502229 1.80456 0.522222 V1 0 1.87037 0.522222 V2 0 1.96296 0.693403 + N0 0.211045 0.782908 -0.585248 N1 0 0.811257 -0.58469 N2 0 0.938373 -0.345625 + txt003 +STRI + V0 0.527092 1.8939 0.693403 V1 0.997476 1.69833 0.693403 V2 0.950425 1.61822 0.522222 + N0 0.244192 0.905874 -0.346067 N1 0.470609 0.811395 -0.346647 N2 0.406555 0.700957 -0.58598 + txt003 +STRI + V0 0.950425 1.61822 0.522222 V1 0.502229 1.80456 0.522222 V2 0.527092 1.8939 0.693403 + N0 0.406555 0.700957 -0.58598 N1 0.211045 0.782908 -0.585248 N2 0.244192 0.905874 -0.346067 + txt003 +STRI + V0 0.997476 1.69833 0.693403 V1 1.3937 1.3937 0.693403 V2 1.32796 1.32796 0.522222 + N0 0.470609 0.811395 -0.346647 N1 0.663205 0.663205 -0.34687 N2 0.572843 0.572843 -0.586261 + txt003 +STRI + V0 1.32796 1.32796 0.522222 V1 0.950425 1.61822 0.522222 V2 0.997476 1.69833 0.693403 + N0 0.572843 0.572843 -0.586261 N1 0.406555 0.700957 -0.58598 N2 0.470609 0.811395 -0.346647 + txt003 +STRI + V0 1.3937 1.3937 0.693403 V1 1.69833 0.997476 0.693403 V2 1.61822 0.950425 0.522222 + N0 0.663205 0.663205 -0.34687 N1 0.811395 0.470609 -0.346647 N2 0.700957 0.406555 -0.58598 + txt003 +STRI + V0 1.61822 0.950425 0.522222 V1 1.32796 1.32796 0.522222 V2 1.3937 1.3937 0.693403 + N0 0.700957 0.406555 -0.58598 N1 0.572843 0.572843 -0.586261 N2 0.663205 0.663205 -0.34687 + txt003 +STRI + V0 1.69833 0.997476 0.693403 V1 1.8939 0.527092 0.693403 V2 1.80456 0.502229 0.522222 + N0 0.811395 0.470609 -0.346647 N1 0.905874 0.244192 -0.346067 N2 0.782908 0.211045 -0.585248 + txt003 +STRI + V0 1.80456 0.502229 0.522222 V1 1.61822 0.950425 0.522222 V2 1.69833 0.997476 0.693403 + N0 0.782908 0.211045 -0.585248 N1 0.700957 0.406555 -0.58598 N2 0.811395 0.470609 -0.346647 + txt003 +STRI + V0 1.8939 0.527092 0.693403 V1 1.96296 2.22045e-16 0.693403 V2 1.87037 2.22045e-16 0.522222 + N0 0.905874 0.244192 -0.346067 N1 0.938373 -3.49072e-17 -0.345625 N2 0.811257 -6.19755e-17 -0.58469 + txt003 +STRI + V0 1.87037 2.22045e-16 0.522222 V1 1.80456 0.502229 0.522222 V2 1.8939 0.527092 0.693403 + N0 0.811257 -6.19755e-17 -0.58469 N1 0.782908 0.211045 -0.585248 N2 0.905874 0.244192 -0.346067 + txt003 +STRI + V0 0 1.87037 0.522222 V1 0.502229 1.80456 0.522222 V2 0.469907 1.68843 0.384375 + N0 0 0.811257 -0.58469 N1 0.211045 0.782908 -0.585248 N2 0.181563 0.673539 -0.716506 + txt003 +STRI + V0 0.469907 1.68843 0.384375 V1 0 1.75 0.384375 V2 0 1.87037 0.522222 + N0 0.181563 0.673539 -0.716506 N1 0 0.6981 -0.716 N2 0 0.811257 -0.58469 + txt003 +STRI + V0 0.502229 1.80456 0.522222 V1 0.950425 1.61822 0.522222 V2 0.889259 1.51407 0.384375 + N0 0.211045 0.782908 -0.585248 N1 0.406555 0.700957 -0.58598 N2 0.349647 0.602839 -0.717169 + txt003 +STRI + V0 0.889259 1.51407 0.384375 V1 0.469907 1.68843 0.384375 V2 0.502229 1.80456 0.522222 + N0 0.349647 0.602839 -0.717169 N1 0.181563 0.673539 -0.716506 N2 0.211045 0.782908 -0.585248 + txt003 +STRI + V0 0.950425 1.61822 0.522222 V1 1.32796 1.32796 0.522222 V2 1.2425 1.2425 0.384375 + N0 0.406555 0.700957 -0.58598 N1 0.572843 0.572843 -0.586261 N2 0.492597 0.492597 -0.717423 + txt003 +STRI + V0 1.2425 1.2425 0.384375 V1 0.889259 1.51407 0.384375 V2 0.950425 1.61822 0.522222 + N0 0.492597 0.492597 -0.717423 N1 0.349647 0.602839 -0.717169 N2 0.406555 0.700957 -0.58598 + txt003 +STRI + V0 1.32796 1.32796 0.522222 V1 1.61822 0.950425 0.522222 V2 1.51407 0.889259 0.384375 + N0 0.572843 0.572843 -0.586261 N1 0.700957 0.406555 -0.58598 N2 0.602839 0.349647 -0.717169 + txt003 +STRI + V0 1.51407 0.889259 0.384375 V1 1.2425 1.2425 0.384375 V2 1.32796 1.32796 0.522222 + N0 0.602839 0.349647 -0.717169 N1 0.492597 0.492597 -0.717423 N2 0.572843 0.572843 -0.586261 + txt003 +STRI + V0 1.61822 0.950425 0.522222 V1 1.80456 0.502229 0.522222 V2 1.68843 0.469907 0.384375 + N0 0.700957 0.406555 -0.58598 N1 0.782908 0.211045 -0.585248 N2 0.673539 0.181563 -0.716506 + txt003 +STRI + V0 1.68843 0.469907 0.384375 V1 1.51407 0.889259 0.384375 V2 1.61822 0.950425 0.522222 + N0 0.673539 0.181563 -0.716506 N1 0.602839 0.349647 -0.717169 N2 0.700957 0.406555 -0.58598 + txt003 +STRI + V0 1.80456 0.502229 0.522222 V1 1.87037 2.22045e-16 0.522222 V2 1.75 2.22045e-16 0.384375 + N0 0.782908 0.211045 -0.585248 N1 0.811257 -6.19755e-17 -0.58469 N2 0.6981 -8.11143e-17 -0.716 + txt003 +STRI + V0 1.75 2.22045e-16 0.384375 V1 1.68843 0.469907 0.384375 V2 1.80456 0.502229 0.522222 + N0 0.6981 -8.11143e-17 -0.716 N1 0.673539 0.181563 -0.716506 N2 0.782908 0.211045 -0.585248 + txt003 +STRI + V0 0 1.75 0.384375 V1 0.469907 1.68843 0.384375 V2 0.437586 1.57229 0.277778 + N0 0 0.6981 -0.716 N1 0.181563 0.673539 -0.716506 N2 0.165491 0.61392 -0.771826 + txt003 +STRI + V0 0.437586 1.57229 0.277778 V1 0 1.62963 0.277778 V2 0 1.75 0.384375 + N0 0.165491 0.61392 -0.771826 N1 0 0.636383 -0.771373 N2 0 0.6981 -0.716 + txt003 +STRI + V0 0.469907 1.68843 0.384375 V1 0.889259 1.51407 0.384375 V2 0.828093 1.40993 0.277778 + N0 0.181563 0.673539 -0.716506 N1 0.349647 0.602839 -0.717169 N2 0.318647 0.549392 -0.77242 + txt003 +STRI + V0 0.828093 1.40993 0.277778 V1 0.437586 1.57229 0.277778 V2 0.469907 1.68843 0.384375 + N0 0.318647 0.549392 -0.77242 N1 0.165491 0.61392 -0.771826 N2 0.181563 0.673539 -0.716506 + txt003 +STRI + V0 0.889259 1.51407 0.384375 V1 1.2425 1.2425 0.384375 V2 1.15704 1.15704 0.277778 + N0 0.349647 0.602839 -0.717169 N1 0.492597 0.492597 -0.717423 N2 0.448897 0.448897 -0.772647 + txt003 +STRI + V0 1.15704 1.15704 0.277778 V1 0.828093 1.40993 0.277778 V2 0.889259 1.51407 0.384375 + N0 0.448897 0.448897 -0.772647 N1 0.318647 0.549392 -0.77242 N2 0.349647 0.602839 -0.717169 + txt003 +STRI + V0 1.2425 1.2425 0.384375 V1 1.51407 0.889259 0.384375 V2 1.40993 0.828093 0.277778 + N0 0.492597 0.492597 -0.717423 N1 0.602839 0.349647 -0.717169 N2 0.549392 0.318647 -0.77242 + txt003 +STRI + V0 1.40993 0.828093 0.277778 V1 1.15704 1.15704 0.277778 V2 1.2425 1.2425 0.384375 + N0 0.549392 0.318647 -0.77242 N1 0.448897 0.448897 -0.772647 N2 0.492597 0.492597 -0.717423 + txt003 +STRI + V0 1.51407 0.889259 0.384375 V1 1.68843 0.469907 0.384375 V2 1.57229 0.437586 0.277778 + N0 0.602839 0.349647 -0.717169 N1 0.673539 0.181563 -0.716506 N2 0.61392 0.165491 -0.771826 + txt003 +STRI + V0 1.57229 0.437586 0.277778 V1 1.40993 0.828093 0.277778 V2 1.51407 0.889259 0.384375 + N0 0.61392 0.165491 -0.771826 N1 0.549392 0.318647 -0.77242 N2 0.602839 0.349647 -0.717169 + txt003 +STRI + V0 1.68843 0.469907 0.384375 V1 1.75 2.22045e-16 0.384375 V2 1.62963 0 0.277778 + N0 0.673539 0.181563 -0.716506 N1 0.6981 -8.11143e-17 -0.716 N2 0.636383 -1.97068e-16 -0.771373 + txt003 +STRI + V0 1.62963 0 0.277778 V1 1.57229 0.437586 0.277778 V2 1.68843 0.469907 0.384375 + N0 0.636383 -1.97068e-16 -0.771373 N1 0.61392 0.165491 -0.771826 N2 0.673539 0.181563 -0.716506 + txt003 +STRI + V0 0 1.62963 0.277778 V1 0.437586 1.57229 0.277778 V2 0.412723 1.48296 0.200347 + N0 0 0.636383 -0.771373 N1 0.165491 0.61392 -0.771826 N2 0.175561 0.651276 -0.738253 + txt003 +STRI + V0 0.412723 1.48296 0.200347 V1 0 1.53704 0.200347 V2 0 1.62963 0.277778 + N0 0.175561 0.651276 -0.738253 N1 0 0.675056 -0.737766 N2 0 0.636383 -0.771373 + txt003 +STRI + V0 0.437586 1.57229 0.277778 V1 0.828093 1.40993 0.277778 V2 0.781043 1.32982 0.200347 + N0 0.165491 0.61392 -0.771826 N1 0.318647 0.549392 -0.77242 N2 0.338069 0.582878 -0.738893 + txt003 +STRI + V0 0.781043 1.32982 0.200347 V1 0.412723 1.48296 0.200347 V2 0.437586 1.57229 0.277778 + N0 0.338069 0.582878 -0.738893 N1 0.175561 0.651276 -0.738253 N2 0.165491 0.61392 -0.771826 + txt003 +STRI + V0 0.828093 1.40993 0.277778 V1 1.15704 1.15704 0.277778 V2 1.0913 1.0913 0.200347 + N0 0.318647 0.549392 -0.77242 N1 0.448897 0.448897 -0.772647 N2 0.476275 0.476275 -0.739137 + txt003 +STRI + V0 1.0913 1.0913 0.200347 V1 0.781043 1.32982 0.200347 V2 0.828093 1.40993 0.277778 + N0 0.476275 0.476275 -0.739137 N1 0.338069 0.582878 -0.738893 N2 0.318647 0.549392 -0.77242 + txt003 +STRI + V0 1.15704 1.15704 0.277778 V1 1.40993 0.828093 0.277778 V2 1.32982 0.781043 0.200347 + N0 0.448897 0.448897 -0.772647 N1 0.549392 0.318647 -0.77242 N2 0.582878 0.338069 -0.738893 + txt003 +STRI + V0 1.32982 0.781043 0.200347 V1 1.0913 1.0913 0.200347 V2 1.15704 1.15704 0.277778 + N0 0.582878 0.338069 -0.738893 N1 0.476275 0.476275 -0.739137 N2 0.448897 0.448897 -0.772647 + txt003 +STRI + V0 1.40993 0.828093 0.277778 V1 1.57229 0.437586 0.277778 V2 1.48296 0.412723 0.200347 + N0 0.549392 0.318647 -0.77242 N1 0.61392 0.165491 -0.771826 N2 0.651276 0.175561 -0.738253 + txt003 +STRI + V0 1.48296 0.412723 0.200347 V1 1.32982 0.781043 0.200347 V2 1.40993 0.828093 0.277778 + N0 0.651276 0.175561 -0.738253 N1 0.582878 0.338069 -0.738893 N2 0.549392 0.318647 -0.77242 + txt003 +STRI + V0 1.57229 0.437586 0.277778 V1 1.62963 0 0.277778 V2 1.53704 0 0.200347 + N0 0.61392 0.165491 -0.771826 N1 0.636383 -1.97068e-16 -0.771373 N2 0.675056 -9.51605e-17 -0.737766 + txt003 +STRI + V0 1.53704 0 0.200347 V1 1.48296 0.412723 0.200347 V2 1.57229 0.437586 0.277778 + N0 0.675056 -9.51605e-17 -0.737766 N1 0.651276 0.175561 -0.738253 N2 0.61392 0.165491 -0.771826 + txt003 +STRI + V0 0 1.53704 0.200347 V1 0.412723 1.48296 0.200347 V2 0.402778 1.44722 0.15 + N0 0 0.675056 -0.737766 N1 0.175561 0.651276 -0.738253 N2 0.260275 0.965535 0 + txt003 +STRI + V0 0.402778 1.44722 0.15 V1 0 1.5 0.15 V2 0 1.53704 0.200347 + N0 0.260275 0.965535 0 N1 -0 1 0 N2 0 0.675056 -0.737766 + txt003 +STRI + V0 0.412723 1.48296 0.200347 V1 0.781043 1.32982 0.200347 V2 0.762222 1.29778 0.15 + N0 0.175561 0.651276 -0.738253 N1 0.338069 0.582878 -0.738893 N2 0.501718 0.865031 0 + txt003 +STRI + V0 0.762222 1.29778 0.15 V1 0.402778 1.44722 0.15 V2 0.412723 1.48296 0.200347 + N0 0.501718 0.865031 0 N1 0.260275 0.965535 0 N2 0.175561 0.651276 -0.738253 + txt003 +STRI + V0 0.781043 1.32982 0.200347 V1 1.0913 1.0913 0.200347 V2 1.065 1.065 0.15 + N0 0.338069 0.582878 -0.738893 N1 0.476275 0.476275 -0.739137 N2 0.707107 0.707107 0 + txt003 +STRI + V0 1.065 1.065 0.15 V1 0.762222 1.29778 0.15 V2 0.781043 1.32982 0.200347 + N0 0.707107 0.707107 0 N1 0.501718 0.865031 0 N2 0.338069 0.582878 -0.738893 + txt003 +STRI + V0 1.0913 1.0913 0.200347 V1 1.32982 0.781043 0.200347 V2 1.29778 0.762222 0.15 + N0 0.476275 0.476275 -0.739137 N1 0.582878 0.338069 -0.738893 N2 0.865031 0.501718 0 + txt003 +STRI + V0 1.29778 0.762222 0.15 V1 1.065 1.065 0.15 V2 1.0913 1.0913 0.200347 + N0 0.865031 0.501718 0 N1 0.707107 0.707107 0 N2 0.476275 0.476275 -0.739137 + txt003 +STRI + V0 1.32982 0.781043 0.200347 V1 1.48296 0.412723 0.200347 V2 1.44722 0.402778 0.15 + N0 0.582878 0.338069 -0.738893 N1 0.651276 0.175561 -0.738253 N2 0.965535 0.260275 0 + txt003 +STRI + V0 1.44722 0.402778 0.15 V1 1.29778 0.762222 0.15 V2 1.32982 0.781043 0.200347 + N0 0.965535 0.260275 0 N1 0.865031 0.501718 0 N2 0.582878 0.338069 -0.738893 + txt003 +STRI + V0 1.48296 0.412723 0.200347 V1 1.53704 0 0.200347 V2 1.5 0 0.15 + N0 0.651276 0.175561 -0.738253 N1 0.675056 -9.51605e-17 -0.737766 N2 1 0 0 + txt003 +STRI + V0 1.5 0 0.15 V1 1.44722 0.402778 0.15 V2 1.48296 0.412723 0.200347 + N0 1 0 0 N1 0.965535 0.260275 0 N2 0.651276 0.175561 -0.738253 + txt003 +STRI + V0 -1.6 0 2.025 V1 -1.59259 -0.125 2.04167 V2 -1.92704 -0.125 2.04055 + N0 -0 -0 -1 N1 -0 -0.298275 -0.95448 N2 0.0104256 -0.297446 -0.954682 + txt003 +STRI + V0 -1.92704 -0.125 2.04055 V1 -1.92454 0 2.02396 V2 -1.6 0 2.025 + N0 0.0104256 -0.297446 -0.954682 N1 0.0104645 0 -0.999945 N2 -0 -0 -1 + txt003 +STRI + V0 -1.59259 -0.125 2.04167 V1 -1.57407 -0.2 2.08333 V2 -1.9333 -0.2 2.08202 + N0 -0 -0.298275 -0.95448 N1 -0 -0.707107 -0.707107 N2 0.00846382 -0.706077 -0.708084 + txt003 +STRI + V0 -1.9333 -0.2 2.08202 V1 -1.92704 -0.125 2.04055 V2 -1.59259 -0.125 2.04167 + N0 0.00846382 -0.706077 -0.708084 N1 0.0104256 -0.297446 -0.954682 N2 -0 -0.298275 -0.95448 + txt003 +STRI + V0 -1.57407 -0.2 2.08333 V1 -1.55 -0.225 2.1375 V2 -1.94144 -0.225 2.13594 + N0 -0 -0.707107 -0.707107 N1 0 -1 0 N2 -1.61364e-18 -1 -2.43505e-19 + txt003 +STRI + V0 -1.94144 -0.225 2.13594 V1 -1.9333 -0.2 2.08202 V2 -1.57407 -0.2 2.08333 + N0 -1.61364e-18 -1 -2.43505e-19 N1 0.00846382 -0.706077 -0.708084 N2 -0 -0.707107 -0.707107 + txt003 +STRI + V0 -1.55 -0.225 2.1375 V1 -1.52593 -0.2 2.19167 V2 -1.94957 -0.2 2.18985 + N0 0 -1 0 N1 0 -0.707107 0.707107 N2 -0.00997559 -0.706181 0.707961 + txt003 +STRI + V0 -1.94957 -0.2 2.18985 V1 -1.94144 -0.225 2.13594 V2 -1.55 -0.225 2.1375 + N0 -0.00997559 -0.706181 0.707961 N1 -1.61364e-18 -1 -2.43505e-19 N2 0 -1 0 + txt003 +STRI + V0 -1.52593 -0.2 2.19167 V1 -1.50741 -0.125 2.23333 V2 -1.95583 -0.125 2.23133 + N0 0 -0.707107 0.707107 N1 0 -0.298275 0.95448 N2 -0.0140841 -0.297589 0.95459 + txt003 +STRI + V0 -1.95583 -0.125 2.23133 V1 -1.94957 -0.2 2.18985 V2 -1.52593 -0.2 2.19167 + N0 -0.0140841 -0.297589 0.95459 N1 -0.00997559 -0.706181 0.707961 N2 0 -0.707107 0.707107 + txt003 +STRI + V0 -1.50741 -0.125 2.23333 V1 -1.5 0 2.25 V2 -1.95833 0 2.24792 + N0 0 -0.298275 0.95448 N1 0 1.97373e-15 1 N2 -0.0149983 1.96426e-15 0.999888 + txt003 +STRI + V0 -1.95833 0 2.24792 V1 -1.95583 -0.125 2.23133 V2 -1.50741 -0.125 2.23333 + N0 -0.0149983 1.96426e-15 0.999888 N1 -0.0140841 -0.297589 0.95459 N2 0 -0.298275 0.95448 + txt003 +STRI + V0 -1.92454 0 2.02396 V1 -1.92704 -0.125 2.04055 V2 -2.20645 -0.125 2.03272 + N0 0.0104645 0 -0.999945 N1 0.0104256 -0.297446 -0.954682 N2 0.0510028 -0.296675 -0.953616 + txt003 +STRI + V0 -2.20645 -0.125 2.03272 V1 -2.1963 0 2.01667 V2 -1.92454 0 2.02396 + N0 0.0510028 -0.296675 -0.953616 N1 0.0510696 0 -0.998695 N2 0.0104645 0 -0.999945 + txt003 +STRI + V0 -1.92704 -0.125 2.04055 V1 -1.9333 -0.2 2.08202 V2 -2.23182 -0.2 2.07284 + N0 0.0104256 -0.297446 -0.954682 N1 0.00846382 -0.706077 -0.708084 N2 0.0415994 -0.706072 -0.706918 + txt003 +STRI + V0 -2.23182 -0.2 2.07284 V1 -2.20645 -0.125 2.03272 V2 -1.92704 -0.125 2.04055 + N0 0.0415994 -0.706072 -0.706918 N1 0.0510028 -0.296675 -0.953616 N2 0.0104256 -0.297446 -0.954682 + txt003 +STRI + V0 -1.9333 -0.2 2.08202 V1 -1.94144 -0.225 2.13594 V2 -2.26481 -0.225 2.125 + N0 0.00846382 -0.706077 -0.708084 N1 -1.61364e-18 -1 -2.43505e-19 N2 -7.69071e-18 -1 -4.86421e-18 + txt003 +STRI + V0 -2.26481 -0.225 2.125 V1 -2.23182 -0.2 2.07284 V2 -1.9333 -0.2 2.08202 + N0 -7.69071e-18 -1 -4.86421e-18 N1 0.0415994 -0.706072 -0.706918 N2 0.00846382 -0.706077 -0.708084 + txt003 +STRI + V0 -1.94144 -0.225 2.13594 V1 -1.94957 -0.2 2.18985 V2 -2.29781 -0.2 2.17716 + N0 -1.61364e-18 -1 -2.43505e-19 N1 -0.00997559 -0.706181 0.707961 N2 -0.0493858 -0.708239 0.704243 + txt003 +STRI + V0 -2.29781 -0.2 2.17716 V1 -2.26481 -0.225 2.125 V2 -1.94144 -0.225 2.13594 + N0 -0.0493858 -0.708239 0.704243 N1 -7.69071e-18 -1 -4.86421e-18 N2 -1.61364e-18 -1 -2.43505e-19 + txt003 +STRI + V0 -1.94957 -0.2 2.18985 V1 -1.95583 -0.125 2.23133 V2 -2.32318 -0.125 2.21728 + N0 -0.00997559 -0.706181 0.707961 N1 -0.0140841 -0.297589 0.95459 N2 -0.0701017 -0.299663 0.951466 + txt003 +STRI + V0 -2.32318 -0.125 2.21728 V1 -2.29781 -0.2 2.17716 V2 -1.94957 -0.2 2.18985 + N0 -0.0701017 -0.299663 0.951466 N1 -0.0493858 -0.708239 0.704243 N2 -0.00997559 -0.706181 0.707961 + txt003 +STRI + V0 -1.95583 -0.125 2.23133 V1 -1.95833 0 2.24792 V2 -2.33333 0 2.23333 + N0 -0.0140841 -0.297589 0.95459 N1 -0.0149983 1.96426e-15 0.999888 N2 -0.0747899 1.66682e-15 0.997199 + txt003 +STRI + V0 -2.33333 0 2.23333 V1 -2.32318 -0.125 2.21728 V2 -1.95583 -0.125 2.23133 + N0 -0.0747899 1.66682e-15 0.997199 N1 -0.0701017 -0.299663 0.951466 N2 -0.0140841 -0.297589 0.95459 + txt003 +STRI + V0 -2.1963 0 2.01667 V1 -2.20645 -0.125 2.03272 V2 -2.42824 -0.125 2.01146 + N0 0.0510696 0 -0.998695 N1 0.0510028 -0.296675 -0.953616 N2 0.148104 -0.301279 -0.941964 + txt003 +STRI + V0 -2.42824 -0.125 2.01146 V1 -2.4125 0 1.99687 V2 -2.1963 0 2.01667 + N0 0.148104 -0.301279 -0.941964 N1 0.14834 0 -0.988936 N2 0.0510696 0 -0.998695 + txt003 +STRI + V0 -2.20645 -0.125 2.03272 V1 -2.23182 -0.2 2.07284 V2 -2.46759 -0.2 2.04792 + N0 0.0510028 -0.296675 -0.953616 N1 0.0415994 -0.706072 -0.706918 N2 0.119688 -0.715388 -0.6884 + txt003 +STRI + V0 -2.46759 -0.2 2.04792 V1 -2.42824 -0.125 2.01146 V2 -2.20645 -0.125 2.03272 + N0 0.119688 -0.715388 -0.6884 N1 0.148104 -0.301279 -0.941964 N2 0.0510028 -0.296675 -0.953616 + txt003 +STRI + V0 -2.23182 -0.2 2.07284 V1 -2.26481 -0.225 2.125 V2 -2.51875 -0.225 2.09531 + N0 0.0415994 -0.706072 -0.706918 N1 -7.69071e-18 -1 -4.86421e-18 N2 -1.96915e-17 -1 -2.12543e-17 + txt003 +STRI + V0 -2.51875 -0.225 2.09531 V1 -2.46759 -0.2 2.04792 V2 -2.23182 -0.2 2.07284 + N0 -1.96915e-17 -1 -2.12543e-17 N1 0.119688 -0.715388 -0.6884 N2 0.0415994 -0.706072 -0.706918 + txt003 +STRI + V0 -2.26481 -0.225 2.125 V1 -2.29781 -0.2 2.17716 V2 -2.56991 -0.2 2.14271 + N0 -7.69071e-18 -1 -4.86421e-18 N1 -0.0493858 -0.708239 0.704243 N2 -0.141352 -0.724137 0.675015 + txt003 +STRI + V0 -2.56991 -0.2 2.14271 V1 -2.51875 -0.225 2.09531 V2 -2.26481 -0.225 2.125 + N0 -0.141352 -0.724137 0.675015 N1 -1.96915e-17 -1 -2.12543e-17 N2 -7.69071e-18 -1 -4.86421e-18 + txt003 +STRI + V0 -2.29781 -0.2 2.17716 V1 -2.32318 -0.125 2.21728 V2 -2.60926 -0.125 2.17917 + N0 -0.0493858 -0.708239 0.704243 N1 -0.0701017 -0.299663 0.951466 N2 -0.204668 -0.313917 0.927128 + txt003 +STRI + V0 -2.60926 -0.125 2.17917 V1 -2.56991 -0.2 2.14271 V2 -2.29781 -0.2 2.17716 + N0 -0.204668 -0.313917 0.927128 N1 -0.141352 -0.724137 0.675015 N2 -0.0493858 -0.708239 0.704243 + txt003 +STRI + V0 -2.32318 -0.125 2.21728 V1 -2.33333 0 2.23333 V2 -2.625 0 2.19375 + N0 -0.0701017 -0.299663 0.951466 N1 -0.0747899 1.66682e-15 0.997199 N2 -0.219512 1.81728e-15 0.97561 + txt003 +STRI + V0 -2.625 0 2.19375 V1 -2.60926 -0.125 2.17917 V2 -2.32318 -0.125 2.21728 + N0 -0.219512 1.81728e-15 0.97561 N1 -0.204668 -0.313917 0.927128 N2 -0.0701017 -0.299663 0.951466 + txt003 +STRI + V0 -2.4125 0 1.99687 V1 -2.42824 -0.125 2.01146 V2 -2.58985 -0.125 1.97006 + N0 0.14834 0 -0.988936 N1 0.148104 -0.301279 -0.941964 N2 0.359682 -0.323804 -0.875089 + txt003 +STRI + V0 -2.58985 -0.125 1.97006 V1 -2.57037 0 1.95833 V2 -2.4125 0 1.99687 + N0 0.359682 -0.323804 -0.875089 N1 0.364399 0 -0.931243 N2 0.14834 0 -0.988936 + txt003 +STRI + V0 -2.42824 -0.125 2.01146 V1 -2.46759 -0.2 2.04792 V2 -2.63855 -0.2 1.99938 + N0 0.148104 -0.301279 -0.941964 N1 0.119688 -0.715388 -0.6884 N2 0.275915 -0.747596 -0.604128 + txt003 +STRI + V0 -2.63855 -0.2 1.99938 V1 -2.58985 -0.125 1.97006 V2 -2.42824 -0.125 2.01146 + N0 0.275915 -0.747596 -0.604128 N1 0.359682 -0.323804 -0.875089 N2 0.148104 -0.301279 -0.941964 + txt003 +STRI + V0 -2.46759 -0.2 2.04792 V1 -2.51875 -0.225 2.09531 V2 -2.70185 -0.225 2.0375 + N0 0.119688 -0.715388 -0.6884 N1 -1.96915e-17 -1 -2.12543e-17 N2 -3.40413e-17 -1 -5.65364e-17 + txt003 +STRI + V0 -2.70185 -0.225 2.0375 V1 -2.63855 -0.2 1.99938 V2 -2.46759 -0.2 2.04792 + N0 -3.40413e-17 -1 -5.65364e-17 N1 0.275915 -0.747596 -0.604128 N2 0.119688 -0.715388 -0.6884 + txt003 +STRI + V0 -2.51875 -0.225 2.09531 V1 -2.56991 -0.2 2.14271 V2 -2.76516 -0.2 2.07562 + N0 -1.96915e-17 -1 -2.12543e-17 N1 -0.141352 -0.724137 0.675015 N2 -0.313659 -0.763673 0.564289 + txt003 +STRI + V0 -2.76516 -0.2 2.07562 V1 -2.70185 -0.225 2.0375 V2 -2.51875 -0.225 2.09531 + N0 -0.313659 -0.763673 0.564289 N1 -3.40413e-17 -1 -5.65364e-17 N2 -1.96915e-17 -1 -2.12543e-17 + txt003 +STRI + V0 -2.56991 -0.2 2.14271 V1 -2.60926 -0.125 2.17917 V2 -2.81385 -0.125 2.10494 + N0 -0.141352 -0.724137 0.675015 N1 -0.204668 -0.313917 0.927128 N2 -0.474611 -0.350859 0.807244 + txt003 +STRI + V0 -2.81385 -0.125 2.10494 V1 -2.76516 -0.2 2.07562 V2 -2.56991 -0.2 2.14271 + N0 -0.474611 -0.350859 0.807244 N1 -0.313659 -0.763673 0.564289 N2 -0.141352 -0.724137 0.675015 + txt003 +STRI + V0 -2.60926 -0.125 2.17917 V1 -2.625 0 2.19375 V2 -2.83333 0 2.11667 + N0 -0.204668 -0.313917 0.927128 N1 -0.219512 1.81728e-15 0.97561 N2 -0.514496 1.6713e-15 0.857493 + txt003 +STRI + V0 -2.83333 0 2.11667 V1 -2.81385 -0.125 2.10494 V2 -2.60926 -0.125 2.17917 + N0 -0.514496 1.6713e-15 0.857493 N1 -0.474611 -0.350859 0.807244 N2 -0.204668 -0.313917 0.927128 + txt003 +STRI + V0 -2.57037 0 1.95833 V1 -2.58985 -0.125 1.97006 V2 -2.6887 -0.125 1.90181 + N0 0.364399 0 -0.931243 N1 0.359682 -0.323804 -0.875089 N2 0.727532 -0.37029 -0.577566 + txt003 +STRI + V0 -2.6887 -0.125 1.90181 V1 -2.66713 0 1.89479 V2 -2.57037 0 1.95833 + N0 0.727532 -0.37029 -0.577566 N1 0.767382 0 -0.64119 N2 0.364399 0 -0.931243 + txt003 +STRI + V0 -2.58985 -0.125 1.97006 V1 -2.63855 -0.2 1.99938 V2 -2.74263 -0.2 1.91937 + N0 0.359682 -0.323804 -0.875089 N1 0.275915 -0.747596 -0.604128 N2 0.497152 -0.792374 -0.35353 + txt003 +STRI + V0 -2.74263 -0.2 1.91937 V1 -2.6887 -0.125 1.90181 V2 -2.58985 -0.125 1.97006 + N0 0.497152 -0.792374 -0.35353 N1 0.727532 -0.37029 -0.577566 N2 0.359682 -0.323804 -0.875089 + txt003 +STRI + V0 -2.63855 -0.2 1.99938 V1 -2.70185 -0.225 2.0375 V2 -2.81273 -0.225 1.94219 + N0 0.275915 -0.747596 -0.604128 N1 -3.40413e-17 -1 -5.65364e-17 N2 -3.3285e-17 -1 -1.02253e-16 + txt003 +STRI + V0 -2.81273 -0.225 1.94219 V1 -2.74263 -0.2 1.91937 V2 -2.63855 -0.2 1.99938 + N0 -3.3285e-17 -1 -1.02253e-16 N1 0.497152 -0.792374 -0.35353 N2 0.275915 -0.747596 -0.604128 + txt003 +STRI + V0 -2.70185 -0.225 2.0375 V1 -2.76516 -0.2 2.07562 V2 -2.88284 -0.2 1.96501 + N0 -3.40413e-17 -1 -5.65364e-17 N1 -0.313659 -0.763673 0.564289 N2 -0.519903 -0.799556 0.300684 + txt003 +STRI + V0 -2.88284 -0.2 1.96501 V1 -2.81273 -0.225 1.94219 V2 -2.70185 -0.225 2.0375 + N0 -0.519903 -0.799556 0.300684 N1 -3.3285e-17 -1 -1.02253e-16 N2 -3.40413e-17 -1 -5.65364e-17 + txt003 +STRI + V0 -2.76516 -0.2 2.07562 V1 -2.81385 -0.125 2.10494 V2 -2.93676 -0.125 1.98256 + N0 -0.313659 -0.763673 0.564289 N1 -0.474611 -0.350859 0.807244 N2 -0.810111 -0.385772 0.441476 + txt003 +STRI + V0 -2.93676 -0.125 1.98256 V1 -2.88284 -0.2 1.96501 V2 -2.76516 -0.2 2.07562 + N0 -0.810111 -0.385772 0.441476 N1 -0.519903 -0.799556 0.300684 N2 -0.313659 -0.763673 0.564289 + txt003 +STRI + V0 -2.81385 -0.125 2.10494 V1 -2.83333 0 2.11667 V2 -2.95833 0 1.98958 + N0 -0.474611 -0.350859 0.807244 N1 -0.514496 1.6713e-15 0.857493 N2 -0.882353 9.28814e-16 0.470588 + txt003 +STRI + V0 -2.95833 0 1.98958 V1 -2.93676 -0.125 1.98256 V2 -2.81385 -0.125 2.10494 + N0 -0.882353 9.28814e-16 0.470588 N1 -0.810111 -0.385772 0.441476 N2 -0.474611 -0.350859 0.807244 + txt003 +STRI + V0 -2.66713 0 1.89479 V1 -2.6887 -0.125 1.90181 V2 -2.72222 -0.125 1.8 + N0 0.767382 0 -0.64119 N1 0.727532 -0.37029 -0.577566 N2 0.923077 -0.384615 2.05733e-15 + txt003 +STRI + V0 -2.72222 -0.125 1.8 V1 -2.7 0 1.8 V2 -2.66713 0 1.89479 + N0 0.923077 -0.384615 2.05733e-15 N1 1 0 2.63164e-15 N2 0.767382 0 -0.64119 + txt003 +STRI + V0 -2.6887 -0.125 1.90181 V1 -2.74263 -0.2 1.91937 V2 -2.77778 -0.2 1.8 + N0 0.727532 -0.37029 -0.577566 N1 0.497152 -0.792374 -0.35353 N2 0.6 -0.8 8.24322e-16 + txt003 +STRI + V0 -2.77778 -0.2 1.8 V1 -2.72222 -0.125 1.8 V2 -2.6887 -0.125 1.90181 + N0 0.6 -0.8 8.24322e-16 N1 0.923077 -0.384615 2.05733e-15 N2 0.727532 -0.37029 -0.577566 + txt003 +STRI + V0 -2.74263 -0.2 1.91937 V1 -2.81273 -0.225 1.94219 V2 -2.85 -0.225 1.8 + N0 0.497152 -0.792374 -0.35353 N1 -3.3285e-17 -1 -1.02253e-16 N2 -1.21738e-31 -1 -1.23358e-16 + txt003 +STRI + V0 -2.85 -0.225 1.8 V1 -2.77778 -0.2 1.8 V2 -2.74263 -0.2 1.91937 + N0 -1.21738e-31 -1 -1.23358e-16 N1 0.6 -0.8 8.24322e-16 N2 0.497152 -0.792374 -0.35353 + txt003 +STRI + V0 -2.81273 -0.225 1.94219 V1 -2.88284 -0.2 1.96501 V2 -2.92222 -0.2 1.8 + N0 -3.3285e-17 -1 -1.02253e-16 N1 -0.519903 -0.799556 0.300684 N2 -0.6 -0.8 -3.10757e-16 + txt003 +STRI + V0 -2.92222 -0.2 1.8 V1 -2.85 -0.225 1.8 V2 -2.81273 -0.225 1.94219 + N0 -0.6 -0.8 -3.10757e-16 N1 -1.21738e-31 -1 -1.23358e-16 N2 -3.3285e-17 -1 -1.02253e-16 + txt003 +STRI + V0 -2.88284 -0.2 1.96501 V1 -2.93676 -0.125 1.98256 V2 -2.97778 -0.125 1.8 + N0 -0.519903 -0.799556 0.300684 N1 -0.810111 -0.385772 0.441476 N2 -0.923077 -0.384615 -1.1396e-16 + txt003 +STRI + V0 -2.97778 -0.125 1.8 V1 -2.92222 -0.2 1.8 V2 -2.88284 -0.2 1.96501 + N0 -0.923077 -0.384615 -1.1396e-16 N1 -0.6 -0.8 -3.10757e-16 N2 -0.519903 -0.799556 0.300684 + txt003 +STRI + V0 -2.93676 -0.125 1.98256 V1 -2.95833 0 1.98958 V2 -3 0 1.8 + N0 -0.810111 -0.385772 0.441476 N1 -0.882353 9.28814e-16 0.470588 N2 -1 -4.93432e-16 -0 + txt003 +STRI + V0 -3 0 1.8 V1 -2.97778 -0.125 1.8 V2 -2.93676 -0.125 1.98256 + N0 -1 -4.93432e-16 -0 N1 -0.923077 -0.384615 -1.1396e-16 N2 -0.810111 -0.385772 0.441476 + txt003 +STRI + V0 -1.5 0 2.25 V1 -1.50741 0.125 2.23333 V2 -1.95583 0.125 2.23133 + N0 0 -0 1 N1 0 0.298275 0.95448 N2 -0.0140841 0.297589 0.95459 + txt003 +STRI + V0 -1.95583 0.125 2.23133 V1 -1.95833 0 2.24792 V2 -1.5 0 2.25 + N0 -0.0140841 0.297589 0.95459 N1 -0.0149983 0 0.999888 N2 0 -0 1 + txt003 +STRI + V0 -1.50741 0.125 2.23333 V1 -1.52593 0.2 2.19167 V2 -1.94957 0.2 2.18985 + N0 0 0.298275 0.95448 N1 0 0.707107 0.707107 N2 -0.00997559 0.706181 0.707961 + txt003 +STRI + V0 -1.94957 0.2 2.18985 V1 -1.95583 0.125 2.23133 V2 -1.50741 0.125 2.23333 + N0 -0.00997559 0.706181 0.707961 N1 -0.0140841 0.297589 0.95459 N2 0 0.298275 0.95448 + txt003 +STRI + V0 -1.52593 0.2 2.19167 V1 -1.55 0.225 2.1375 V2 -1.94144 0.225 2.13594 + N0 0 0.707107 0.707107 N1 0 1 0 N2 -1.61364e-18 1 -2.43505e-19 + txt003 +STRI + V0 -1.94144 0.225 2.13594 V1 -1.94957 0.2 2.18985 V2 -1.52593 0.2 2.19167 + N0 -1.61364e-18 1 -2.43505e-19 N1 -0.00997559 0.706181 0.707961 N2 0 0.707107 0.707107 + txt003 +STRI + V0 -1.55 0.225 2.1375 V1 -1.57407 0.2 2.08333 V2 -1.9333 0.2 2.08202 + N0 0 1 0 N1 0 0.707107 -0.707107 N2 0.00846382 0.706077 -0.708084 + txt003 +STRI + V0 -1.9333 0.2 2.08202 V1 -1.94144 0.225 2.13594 V2 -1.55 0.225 2.1375 + N0 0.00846382 0.706077 -0.708084 N1 -1.61364e-18 1 -2.43505e-19 N2 0 1 0 + txt003 +STRI + V0 -1.57407 0.2 2.08333 V1 -1.59259 0.125 2.04167 V2 -1.92704 0.125 2.04055 + N0 0 0.707107 -0.707107 N1 0 0.298275 -0.95448 N2 0.0104256 0.297446 -0.954682 + txt003 +STRI + V0 -1.92704 0.125 2.04055 V1 -1.9333 0.2 2.08202 V2 -1.57407 0.2 2.08333 + N0 0.0104256 0.297446 -0.954682 N1 0.00846382 0.706077 -0.708084 N2 0 0.707107 -0.707107 + txt003 +STRI + V0 -1.59259 0.125 2.04167 V1 -1.6 0 2.025 V2 -1.92454 0 2.02396 + N0 0 0.298275 -0.95448 N1 -0 -4.93432e-16 -1 N2 0.0104645 -4.86951e-16 -0.999945 + txt003 +STRI + V0 -1.92454 0 2.02396 V1 -1.92704 0.125 2.04055 V2 -1.59259 0.125 2.04167 + N0 0.0104645 -4.86951e-16 -0.999945 N1 0.0104256 0.297446 -0.954682 N2 0 0.298275 -0.95448 + txt003 +STRI + V0 -1.95833 0 2.24792 V1 -1.95583 0.125 2.23133 V2 -2.32318 0.125 2.21728 + N0 -0.0149983 0 0.999888 N1 -0.0140841 0.297589 0.95459 N2 -0.0701017 0.299663 0.951466 + txt003 +STRI + V0 -2.32318 0.125 2.21728 V1 -2.33333 0 2.23333 V2 -1.95833 0 2.24792 + N0 -0.0701017 0.299663 0.951466 N1 -0.0747899 0 0.997199 N2 -0.0149983 0 0.999888 + txt003 +STRI + V0 -1.95583 0.125 2.23133 V1 -1.94957 0.2 2.18985 V2 -2.29781 0.2 2.17716 + N0 -0.0140841 0.297589 0.95459 N1 -0.00997559 0.706181 0.707961 N2 -0.0493858 0.708239 0.704243 + txt003 +STRI + V0 -2.29781 0.2 2.17716 V1 -2.32318 0.125 2.21728 V2 -1.95583 0.125 2.23133 + N0 -0.0493858 0.708239 0.704243 N1 -0.0701017 0.299663 0.951466 N2 -0.0140841 0.297589 0.95459 + txt003 +STRI + V0 -1.94957 0.2 2.18985 V1 -1.94144 0.225 2.13594 V2 -2.26481 0.225 2.125 + N0 -0.00997559 0.706181 0.707961 N1 -1.61364e-18 1 -2.43505e-19 N2 -7.69071e-18 1 -4.86421e-18 + txt003 +STRI + V0 -2.26481 0.225 2.125 V1 -2.29781 0.2 2.17716 V2 -1.94957 0.2 2.18985 + N0 -7.69071e-18 1 -4.86421e-18 N1 -0.0493858 0.708239 0.704243 N2 -0.00997559 0.706181 0.707961 + txt003 +STRI + V0 -1.94144 0.225 2.13594 V1 -1.9333 0.2 2.08202 V2 -2.23182 0.2 2.07284 + N0 -1.61364e-18 1 -2.43505e-19 N1 0.00846382 0.706077 -0.708084 N2 0.0415994 0.706072 -0.706918 + txt003 +STRI + V0 -2.23182 0.2 2.07284 V1 -2.26481 0.225 2.125 V2 -1.94144 0.225 2.13594 + N0 0.0415994 0.706072 -0.706918 N1 -7.69071e-18 1 -4.86421e-18 N2 -1.61364e-18 1 -2.43505e-19 + txt003 +STRI + V0 -1.9333 0.2 2.08202 V1 -1.92704 0.125 2.04055 V2 -2.20645 0.125 2.03272 + N0 0.00846382 0.706077 -0.708084 N1 0.0104256 0.297446 -0.954682 N2 0.0510028 0.296675 -0.953616 + txt003 +STRI + V0 -2.20645 0.125 2.03272 V1 -2.23182 0.2 2.07284 V2 -1.9333 0.2 2.08202 + N0 0.0510028 0.296675 -0.953616 N1 0.0415994 0.706072 -0.706918 N2 0.00846382 0.706077 -0.708084 + txt003 +STRI + V0 -1.92704 0.125 2.04055 V1 -1.92454 0 2.02396 V2 -2.1963 0 2.01667 + N0 0.0104256 0.297446 -0.954682 N1 0.0104645 -4.86951e-16 -0.999945 N2 0.0510696 -2.08595e-16 -0.998695 + txt003 +STRI + V0 -2.1963 0 2.01667 V1 -2.20645 0.125 2.03272 V2 -1.92704 0.125 2.04055 + N0 0.0510696 -2.08595e-16 -0.998695 N1 0.0510028 0.296675 -0.953616 N2 0.0104256 0.297446 -0.954682 + txt003 +STRI + V0 -2.33333 0 2.23333 V1 -2.32318 0.125 2.21728 V2 -2.60926 0.125 2.17917 + N0 -0.0747899 0 0.997199 N1 -0.0701017 0.299663 0.951466 N2 -0.204668 0.313917 0.927128 + txt003 +STRI + V0 -2.60926 0.125 2.17917 V1 -2.625 0 2.19375 V2 -2.33333 0 2.23333 + N0 -0.204668 0.313917 0.927128 N1 -0.219512 0 0.97561 N2 -0.0747899 0 0.997199 + txt003 +STRI + V0 -2.32318 0.125 2.21728 V1 -2.29781 0.2 2.17716 V2 -2.56991 0.2 2.14271 + N0 -0.0701017 0.299663 0.951466 N1 -0.0493858 0.708239 0.704243 N2 -0.141352 0.724137 0.675015 + txt003 +STRI + V0 -2.56991 0.2 2.14271 V1 -2.60926 0.125 2.17917 V2 -2.32318 0.125 2.21728 + N0 -0.141352 0.724137 0.675015 N1 -0.204668 0.313917 0.927128 N2 -0.0701017 0.299663 0.951466 + txt003 +STRI + V0 -2.29781 0.2 2.17716 V1 -2.26481 0.225 2.125 V2 -2.51875 0.225 2.09531 + N0 -0.0493858 0.708239 0.704243 N1 -7.69071e-18 1 -4.86421e-18 N2 -1.96915e-17 1 -2.12543e-17 + txt003 +STRI + V0 -2.51875 0.225 2.09531 V1 -2.56991 0.2 2.14271 V2 -2.29781 0.2 2.17716 + N0 -1.96915e-17 1 -2.12543e-17 N1 -0.141352 0.724137 0.675015 N2 -0.0493858 0.708239 0.704243 + txt003 +STRI + V0 -2.26481 0.225 2.125 V1 -2.23182 0.2 2.07284 V2 -2.46759 0.2 2.04792 + N0 -7.69071e-18 1 -4.86421e-18 N1 0.0415994 0.706072 -0.706918 N2 0.119688 0.715388 -0.6884 + txt003 +STRI + V0 -2.46759 0.2 2.04792 V1 -2.51875 0.225 2.09531 V2 -2.26481 0.225 2.125 + N0 0.119688 0.715388 -0.6884 N1 -1.96915e-17 1 -2.12543e-17 N2 -7.69071e-18 1 -4.86421e-18 + txt003 +STRI + V0 -2.23182 0.2 2.07284 V1 -2.20645 0.125 2.03272 V2 -2.42824 0.125 2.01146 + N0 0.0415994 0.706072 -0.706918 N1 0.0510028 0.296675 -0.953616 N2 0.148104 0.301279 -0.941964 + txt003 +STRI + V0 -2.42824 0.125 2.01146 V1 -2.46759 0.2 2.04792 V2 -2.23182 0.2 2.07284 + N0 0.148104 0.301279 -0.941964 N1 0.119688 0.715388 -0.6884 N2 0.0415994 0.706072 -0.706918 + txt003 +STRI + V0 -2.20645 0.125 2.03272 V1 -2.1963 0 2.01667 V2 -2.4125 0 1.99687 + N0 0.0510028 0.296675 -0.953616 N1 0.0510696 -2.08595e-16 -0.998695 N2 0.14834 -4.14777e-16 -0.988936 + txt003 +STRI + V0 -2.4125 0 1.99687 V1 -2.42824 0.125 2.01146 V2 -2.20645 0.125 2.03272 + N0 0.14834 -4.14777e-16 -0.988936 N1 0.148104 0.301279 -0.941964 N2 0.0510028 0.296675 -0.953616 + txt003 +STRI + V0 -2.625 0 2.19375 V1 -2.60926 0.125 2.17917 V2 -2.81385 0.125 2.10494 + N0 -0.219512 0 0.97561 N1 -0.204668 0.313917 0.927128 N2 -0.474611 0.350859 0.807244 + txt003 +STRI + V0 -2.81385 0.125 2.10494 V1 -2.83333 0 2.11667 V2 -2.625 0 2.19375 + N0 -0.474611 0.350859 0.807244 N1 -0.514496 0 0.857493 N2 -0.219512 0 0.97561 + txt003 +STRI + V0 -2.60926 0.125 2.17917 V1 -2.56991 0.2 2.14271 V2 -2.76516 0.2 2.07562 + N0 -0.204668 0.313917 0.927128 N1 -0.141352 0.724137 0.675015 N2 -0.313659 0.763673 0.564289 + txt003 +STRI + V0 -2.76516 0.2 2.07562 V1 -2.81385 0.125 2.10494 V2 -2.60926 0.125 2.17917 + N0 -0.313659 0.763673 0.564289 N1 -0.474611 0.350859 0.807244 N2 -0.204668 0.313917 0.927128 + txt003 +STRI + V0 -2.56991 0.2 2.14271 V1 -2.51875 0.225 2.09531 V2 -2.70185 0.225 2.0375 + N0 -0.141352 0.724137 0.675015 N1 -1.96915e-17 1 -2.12543e-17 N2 -3.40413e-17 1 -5.65364e-17 + txt003 +STRI + V0 -2.70185 0.225 2.0375 V1 -2.76516 0.2 2.07562 V2 -2.56991 0.2 2.14271 + N0 -3.40413e-17 1 -5.65364e-17 N1 -0.313659 0.763673 0.564289 N2 -0.141352 0.724137 0.675015 + txt003 +STRI + V0 -2.51875 0.225 2.09531 V1 -2.46759 0.2 2.04792 V2 -2.63855 0.2 1.99938 + N0 -1.96915e-17 1 -2.12543e-17 N1 0.119688 0.715388 -0.6884 N2 0.275915 0.747596 -0.604128 + txt003 +STRI + V0 -2.63855 0.2 1.99938 V1 -2.70185 0.225 2.0375 V2 -2.51875 0.225 2.09531 + N0 0.275915 0.747596 -0.604128 N1 -3.40413e-17 1 -5.65364e-17 N2 -1.96915e-17 1 -2.12543e-17 + txt003 +STRI + V0 -2.46759 0.2 2.04792 V1 -2.42824 0.125 2.01146 V2 -2.58985 0.125 1.97006 + N0 0.119688 0.715388 -0.6884 N1 0.148104 0.301279 -0.941964 N2 0.359682 0.323804 -0.875089 + txt003 +STRI + V0 -2.58985 0.125 1.97006 V1 -2.63855 0.2 1.99938 V2 -2.46759 0.2 2.04792 + N0 0.359682 0.323804 -0.875089 N1 0.275915 0.747596 -0.604128 N2 0.119688 0.715388 -0.6884 + txt003 +STRI + V0 -2.42824 0.125 2.01146 V1 -2.4125 0 1.99687 V2 -2.57037 0 1.95833 + N0 0.148104 0.301279 -0.941964 N1 0.14834 -4.14777e-16 -0.988936 N2 0.364399 -4.84479e-16 -0.931243 + txt003 +STRI + V0 -2.57037 0 1.95833 V1 -2.58985 0.125 1.97006 V2 -2.42824 0.125 2.01146 + N0 0.364399 -4.84479e-16 -0.931243 N1 0.359682 0.323804 -0.875089 N2 0.148104 0.301279 -0.941964 + txt003 +STRI + V0 -2.83333 0 2.11667 V1 -2.81385 0.125 2.10494 V2 -2.93676 0.125 1.98256 + N0 -0.514496 0 0.857493 N1 -0.474611 0.350859 0.807244 N2 -0.810111 0.385772 0.441476 + txt003 +STRI + V0 -2.93676 0.125 1.98256 V1 -2.95833 0 1.98958 V2 -2.83333 0 2.11667 + N0 -0.810111 0.385772 0.441476 N1 -0.882353 0 0.470588 N2 -0.514496 0 0.857493 + txt003 +STRI + V0 -2.81385 0.125 2.10494 V1 -2.76516 0.2 2.07562 V2 -2.88284 0.2 1.96501 + N0 -0.474611 0.350859 0.807244 N1 -0.313659 0.763673 0.564289 N2 -0.519903 0.799556 0.300684 + txt003 +STRI + V0 -2.88284 0.2 1.96501 V1 -2.93676 0.125 1.98256 V2 -2.81385 0.125 2.10494 + N0 -0.519903 0.799556 0.300684 N1 -0.810111 0.385772 0.441476 N2 -0.474611 0.350859 0.807244 + txt003 +STRI + V0 -2.76516 0.2 2.07562 V1 -2.70185 0.225 2.0375 V2 -2.81273 0.225 1.94219 + N0 -0.313659 0.763673 0.564289 N1 -3.40413e-17 1 -5.65364e-17 N2 -3.3285e-17 1 -1.02253e-16 + txt003 +STRI + V0 -2.81273 0.225 1.94219 V1 -2.88284 0.2 1.96501 V2 -2.76516 0.2 2.07562 + N0 -3.3285e-17 1 -1.02253e-16 N1 -0.519903 0.799556 0.300684 N2 -0.313659 0.763673 0.564289 + txt003 +STRI + V0 -2.70185 0.225 2.0375 V1 -2.63855 0.2 1.99938 V2 -2.74263 0.2 1.91937 + N0 -3.40413e-17 1 -5.65364e-17 N1 0.275915 0.747596 -0.604128 N2 0.497152 0.792374 -0.35353 + txt003 +STRI + V0 -2.74263 0.2 1.91937 V1 -2.81273 0.225 1.94219 V2 -2.70185 0.225 2.0375 + N0 0.497152 0.792374 -0.35353 N1 -3.3285e-17 1 -1.02253e-16 N2 -3.40413e-17 1 -5.65364e-17 + txt003 +STRI + V0 -2.63855 0.2 1.99938 V1 -2.58985 0.125 1.97006 V2 -2.6887 0.125 1.90181 + N0 0.275915 0.747596 -0.604128 N1 0.359682 0.323804 -0.875089 N2 0.727532 0.37029 -0.577566 + txt003 +STRI + V0 -2.6887 0.125 1.90181 V1 -2.74263 0.2 1.91937 V2 -2.63855 0.2 1.99938 + N0 0.727532 0.37029 -0.577566 N1 0.497152 0.792374 -0.35353 N2 0.275915 0.747596 -0.604128 + txt003 +STRI + V0 -2.58985 0.125 1.97006 V1 -2.57037 0 1.95833 V2 -2.66713 0 1.89479 + N0 0.359682 0.323804 -0.875089 N1 0.364399 -4.84479e-16 -0.931243 N2 0.767382 -3.16384e-16 -0.64119 + txt003 +STRI + V0 -2.66713 0 1.89479 V1 -2.6887 0.125 1.90181 V2 -2.58985 0.125 1.97006 + N0 0.767382 -3.16384e-16 -0.64119 N1 0.727532 0.37029 -0.577566 N2 0.359682 0.323804 -0.875089 + txt003 +STRI + V0 -2.95833 0 1.98958 V1 -2.93676 0.125 1.98256 V2 -2.97778 0.125 1.8 + N0 -0.882353 0 0.470588 N1 -0.810111 0.385772 0.441476 N2 -0.923077 0.384615 -1.1396e-16 + txt003 +STRI + V0 -2.97778 0.125 1.8 V1 -3 0 1.8 V2 -2.95833 0 1.98958 + N0 -0.923077 0.384615 -1.1396e-16 N1 -1 0 0 N2 -0.882353 0 0.470588 + txt003 +STRI + V0 -2.93676 0.125 1.98256 V1 -2.88284 0.2 1.96501 V2 -2.92222 0.2 1.8 + N0 -0.810111 0.385772 0.441476 N1 -0.519903 0.799556 0.300684 N2 -0.6 0.8 -3.10757e-16 + txt003 +STRI + V0 -2.92222 0.2 1.8 V1 -2.97778 0.125 1.8 V2 -2.93676 0.125 1.98256 + N0 -0.6 0.8 -3.10757e-16 N1 -0.923077 0.384615 -1.1396e-16 N2 -0.810111 0.385772 0.441476 + txt003 +STRI + V0 -2.88284 0.2 1.96501 V1 -2.81273 0.225 1.94219 V2 -2.85 0.225 1.8 + N0 -0.519903 0.799556 0.300684 N1 -3.3285e-17 1 -1.02253e-16 N2 -2.13041e-31 1 -1.23358e-16 + txt003 +STRI + V0 -2.85 0.225 1.8 V1 -2.92222 0.2 1.8 V2 -2.88284 0.2 1.96501 + N0 -2.13041e-31 1 -1.23358e-16 N1 -0.6 0.8 -3.10757e-16 N2 -0.519903 0.799556 0.300684 + txt003 +STRI + V0 -2.81273 0.225 1.94219 V1 -2.74263 0.2 1.91937 V2 -2.77778 0.2 1.8 + N0 -3.3285e-17 1 -1.02253e-16 N1 0.497152 0.792374 -0.35353 N2 0.6 0.8 8.24322e-16 + txt003 +STRI + V0 -2.77778 0.2 1.8 V1 -2.85 0.225 1.8 V2 -2.81273 0.225 1.94219 + N0 0.6 0.8 8.24322e-16 N1 -2.13041e-31 1 -1.23358e-16 N2 -3.3285e-17 1 -1.02253e-16 + txt003 +STRI + V0 -2.74263 0.2 1.91937 V1 -2.6887 0.125 1.90181 V2 -2.72222 0.125 1.8 + N0 0.497152 0.792374 -0.35353 N1 0.727532 0.37029 -0.577566 N2 0.923077 0.384615 2.05733e-15 + txt003 +STRI + V0 -2.72222 0.125 1.8 V1 -2.77778 0.2 1.8 V2 -2.74263 0.2 1.91937 + N0 0.923077 0.384615 2.05733e-15 N1 0.6 0.8 8.24322e-16 N2 0.497152 0.792374 -0.35353 + txt003 +STRI + V0 -2.6887 0.125 1.90181 V1 -2.66713 0 1.89479 V2 -2.7 0 1.8 + N0 0.727532 0.37029 -0.577566 N1 0.767382 -3.16384e-16 -0.64119 N2 1 4.93432e-16 2.63164e-15 + txt003 +STRI + V0 -2.7 0 1.8 V1 -2.72222 0.125 1.8 V2 -2.6887 0.125 1.90181 + N0 1 4.93432e-16 2.63164e-15 N1 0.923077 0.384615 2.05733e-15 N2 0.727532 0.37029 -0.577566 + txt003 +STRI + V0 -2.7 0 1.8 V1 -2.72222 -0.125 1.8 V2 -2.70418 -0.125 1.66398 + N0 1 0 0 N1 0.923077 -0.384615 0 N2 0.895972 -0.38623 0.219226 + txt003 +STRI + V0 -2.70418 -0.125 1.66398 V1 -2.68287 0 1.67083 V2 -2.7 0 1.8 + N0 0.895972 -0.38623 0.219226 N1 0.972045 0 0.234794 N2 1 0 0 + txt003 +STRI + V0 -2.72222 -0.125 1.8 V1 -2.77778 -0.2 1.8 V2 -2.75747 -0.2 1.64684 + N0 0.923077 -0.384615 0 N1 0.6 -0.8 0 N2 0.57987 -0.801541 0.145888 + txt003 +STRI + V0 -2.75747 -0.2 1.64684 V1 -2.70418 -0.125 1.66398 V2 -2.72222 -0.125 1.8 + N0 0.57987 -0.801541 0.145888 N1 0.895972 -0.38623 0.219226 N2 0.923077 -0.384615 0 + txt003 +STRI + V0 -2.77778 -0.2 1.8 V1 -2.85 -0.225 1.8 V2 -2.82674 -0.225 1.62457 + N0 0.6 -0.8 0 N1 -0 -1 -0 N2 9.48478e-19 -1 -2.94924e-18 + txt003 +STRI + V0 -2.82674 -0.225 1.62457 V1 -2.75747 -0.2 1.64684 V2 -2.77778 -0.2 1.8 + N0 9.48478e-19 -1 -2.94924e-18 N1 0.57987 -0.801541 0.145888 N2 0.6 -0.8 0 + txt003 +STRI + V0 -2.85 -0.225 1.8 V1 -2.92222 -0.2 1.8 V2 -2.896 -0.2 1.60229 + N0 -0 -1 -0 N1 -0.6 -0.8 -0 N2 -0.577707 -0.801752 -0.153129 + txt003 +STRI + V0 -2.896 -0.2 1.60229 V1 -2.82674 -0.225 1.62457 V2 -2.85 -0.225 1.8 + N0 -0.577707 -0.801752 -0.153129 N1 9.48478e-19 -1 -2.94924e-18 N2 -0 -1 -0 + txt003 +STRI + V0 -2.92222 -0.2 1.8 V1 -2.97778 -0.125 1.8 V2 -2.94929 -0.125 1.58515 + N0 -0.6 -0.8 -0 N1 -0.923077 -0.384615 -0 N2 -0.890548 -0.386679 -0.23959 + txt003 +STRI + V0 -2.94929 -0.125 1.58515 V1 -2.896 -0.2 1.60229 V2 -2.92222 -0.2 1.8 + N0 -0.890548 -0.386679 -0.23959 N1 -0.577707 -0.801752 -0.153129 N2 -0.6 -0.8 -0 + txt003 +STRI + V0 -2.97778 -0.125 1.8 V1 -3 0 1.8 V2 -2.9706 0 1.5783 + N0 -0.923077 -0.384615 -0 N1 -1 -9.86865e-16 -0 N2 -0.965311 -7.59377e-16 -0.261102 + txt003 +STRI + V0 -2.9706 0 1.5783 V1 -2.94929 -0.125 1.58515 V2 -2.97778 -0.125 1.8 + N0 -0.965311 -7.59377e-16 -0.261102 N1 -0.890548 -0.386679 -0.23959 N2 -0.923077 -0.384615 -0 + txt003 +STRI + V0 -2.68287 0 1.67083 V1 -2.70418 -0.125 1.66398 V2 -2.64829 -0.125 1.50535 + N0 0.972045 0 0.234794 N1 0.895972 -0.38623 0.219226 N2 0.842942 -0.376421 0.38439 + txt003 +STRI + V0 -2.64829 -0.125 1.50535 V1 -2.62963 0 1.51667 V2 -2.68287 0 1.67083 + N0 0.842942 -0.376421 0.38439 N1 0.913812 0 0.406138 N2 0.972045 0 0.234794 + txt003 +STRI + V0 -2.70418 -0.125 1.66398 V1 -2.75747 -0.2 1.64684 V2 -2.69492 -0.2 1.47706 + N0 0.895972 -0.38623 0.219226 N1 0.57987 -0.801541 0.145888 N2 0.548194 -0.793356 0.264707 + txt003 +STRI + V0 -2.69492 -0.2 1.47706 V1 -2.64829 -0.125 1.50535 V2 -2.70418 -0.125 1.66398 + N0 0.548194 -0.793356 0.264707 N1 0.842942 -0.376421 0.38439 N2 0.895972 -0.38623 0.219226 + txt003 +STRI + V0 -2.75747 -0.2 1.64684 V1 -2.82674 -0.225 1.62457 V2 -2.75556 -0.225 1.44028 + N0 0.57987 -0.801541 0.145888 N1 9.48478e-19 -1 -2.94924e-18 N2 5.73642e-18 -1 -9.4564e-18 + txt003 +STRI + V0 -2.75556 -0.225 1.44028 V1 -2.69492 -0.2 1.47706 V2 -2.75747 -0.2 1.64684 + N0 5.73642e-18 -1 -9.4564e-18 N1 0.548194 -0.793356 0.264707 N2 0.57987 -0.801541 0.145888 + txt003 +STRI + V0 -2.82674 -0.225 1.62457 V1 -2.896 -0.2 1.60229 V2 -2.81619 -0.2 1.4035 + N0 9.48478e-19 -1 -2.94924e-18 N1 -0.577707 -0.801752 -0.153129 N2 -0.534196 -0.794341 -0.289235 + txt003 +STRI + V0 -2.81619 -0.2 1.4035 V1 -2.75556 -0.225 1.44028 V2 -2.82674 -0.225 1.62457 + N0 -0.534196 -0.794341 -0.289235 N1 5.73642e-18 -1 -9.4564e-18 N2 9.48478e-19 -1 -2.94924e-18 + txt003 +STRI + V0 -2.896 -0.2 1.60229 V1 -2.94929 -0.125 1.58515 V2 -2.86283 -0.125 1.37521 + N0 -0.577707 -0.801752 -0.153129 N1 -0.890548 -0.386679 -0.23959 N2 -0.807437 -0.378466 -0.452558 + txt003 +STRI + V0 -2.86283 -0.125 1.37521 V1 -2.81619 -0.2 1.4035 V2 -2.896 -0.2 1.60229 + N0 -0.807437 -0.378466 -0.452558 N1 -0.534196 -0.794341 -0.289235 N2 -0.577707 -0.801752 -0.153129 + txt003 +STRI + V0 -2.94929 -0.125 1.58515 V1 -2.9706 0 1.5783 V2 -2.88148 0 1.36389 + N0 -0.890548 -0.386679 -0.23959 N1 -0.965311 -7.59377e-16 -0.261102 N2 -0.869653 -7.07402e-16 -0.493664 + txt003 +STRI + V0 -2.88148 0 1.36389 V1 -2.86283 -0.125 1.37521 V2 -2.94929 -0.125 1.58515 + N0 -0.869653 -7.07402e-16 -0.493664 N1 -0.807437 -0.378466 -0.452558 N2 -0.890548 -0.386679 -0.23959 + txt003 +STRI + V0 -2.62963 0 1.51667 V1 -2.64829 -0.125 1.50535 V2 -2.55185 -0.125 1.33576 + N0 0.913812 0 0.406138 N1 0.842942 -0.376421 0.38439 N2 0.772293 -0.349434 0.530527 + txt003 +STRI + V0 -2.55185 -0.125 1.33576 V1 -2.5375 0 1.35 V2 -2.62963 0 1.51667 + N0 0.772293 -0.349434 0.530527 N1 0.83205 0 0.5547 N2 0.913812 0 0.406138 + txt003 +STRI + V0 -2.64829 -0.125 1.50535 V1 -2.69492 -0.2 1.47706 V2 -2.58773 -0.2 1.30017 + N0 0.842942 -0.376421 0.38439 N1 0.548194 -0.793356 0.264707 N2 0.515846 -0.768155 0.379264 + txt003 +STRI + V0 -2.58773 -0.2 1.30017 V1 -2.55185 -0.125 1.33576 V2 -2.64829 -0.125 1.50535 + N0 0.515846 -0.768155 0.379264 N1 0.772293 -0.349434 0.530527 N2 0.842942 -0.376421 0.38439 + txt003 +STRI + V0 -2.69492 -0.2 1.47706 V1 -2.75556 -0.225 1.44028 V2 -2.63437 -0.225 1.25391 + N0 0.548194 -0.793356 0.264707 N1 5.73642e-18 -1 -9.4564e-18 N2 1.5603e-17 -1 -1.57299e-17 + txt003 +STRI + V0 -2.63437 -0.225 1.25391 V1 -2.58773 -0.2 1.30017 V2 -2.69492 -0.2 1.47706 + N0 1.5603e-17 -1 -1.57299e-17 N1 0.515846 -0.768155 0.379264 N2 0.548194 -0.793356 0.264707 + txt003 +STRI + V0 -2.75556 -0.225 1.44028 V1 -2.81619 -0.2 1.4035 V2 -2.68102 -0.2 1.20764 + N0 5.73642e-18 -1 -9.4564e-18 N1 -0.534196 -0.794341 -0.289235 N2 -0.486433 -0.770599 -0.411777 + txt003 +STRI + V0 -2.68102 -0.2 1.20764 V1 -2.63437 -0.225 1.25391 V2 -2.75556 -0.225 1.44028 + N0 -0.486433 -0.770599 -0.411777 N1 1.5603e-17 -1 -1.57299e-17 N2 5.73642e-18 -1 -9.4564e-18 + txt003 +STRI + V0 -2.81619 -0.2 1.4035 V1 -2.86283 -0.125 1.37521 V2 -2.7169 -0.125 1.17205 + N0 -0.534196 -0.794341 -0.289235 N1 -0.807437 -0.378466 -0.452558 N2 -0.700515 -0.35392 -0.619694 + txt003 +STRI + V0 -2.7169 -0.125 1.17205 V1 -2.68102 -0.2 1.20764 V2 -2.81619 -0.2 1.4035 + N0 -0.700515 -0.35392 -0.619694 N1 -0.486433 -0.770599 -0.411777 N2 -0.534196 -0.794341 -0.289235 + txt003 +STRI + V0 -2.86283 -0.125 1.37521 V1 -2.88148 0 1.36389 V2 -2.73125 0 1.15781 + N0 -0.807437 -0.378466 -0.452558 N1 -0.869653 -7.07402e-16 -0.493664 N2 -0.743581 -2.38916e-16 -0.668646 + txt003 +STRI + V0 -2.73125 0 1.15781 V1 -2.7169 -0.125 1.17205 V2 -2.86283 -0.125 1.37521 + N0 -0.743581 -2.38916e-16 -0.668646 N1 -0.700515 -0.35392 -0.619694 N2 -0.807437 -0.378466 -0.452558 + txt003 +STRI + V0 -2.5375 0 1.35 V1 -2.55185 -0.125 1.33576 V2 -2.41221 -0.125 1.16687 + N0 0.83205 0 0.5547 N1 0.772293 -0.349434 0.530527 N2 0.676612 -0.31353 0.666255 + txt003 +STRI + V0 -2.41221 -0.125 1.16687 V1 -2.4037 0 1.18333 V2 -2.5375 0 1.35 + N0 0.676612 -0.31353 0.666255 N1 0.722374 0 0.691503 N2 0.83205 0 0.5547 + txt003 +STRI + V0 -2.55185 -0.125 1.33576 V1 -2.58773 -0.2 1.30017 V2 -2.43347 -0.2 1.12572 + N0 0.772293 -0.349434 0.530527 N1 0.515846 -0.768155 0.379264 N2 0.471519 -0.729692 0.495195 + txt003 +STRI + V0 -2.43347 -0.2 1.12572 V1 -2.41221 -0.125 1.16687 V2 -2.55185 -0.125 1.33576 + N0 0.471519 -0.729692 0.495195 N1 0.676612 -0.31353 0.666255 N2 0.772293 -0.349434 0.530527 + txt003 +STRI + V0 -2.58773 -0.2 1.30017 V1 -2.63437 -0.225 1.25391 V2 -2.46111 -0.225 1.07222 + N0 0.515846 -0.768155 0.379264 N1 1.5603e-17 -1 -1.57299e-17 N2 3.17396e-17 -1 -1.63988e-17 + txt003 +STRI + V0 -2.46111 -0.225 1.07222 V1 -2.43347 -0.2 1.12572 V2 -2.58773 -0.2 1.30017 + N0 3.17396e-17 -1 -1.63988e-17 N1 0.471519 -0.729692 0.495195 N2 0.515846 -0.768155 0.379264 + txt003 +STRI + V0 -2.63437 -0.225 1.25391 V1 -2.68102 -0.2 1.20764 V2 -2.48875 -0.2 1.01872 + N0 1.5603e-17 -1 -1.57299e-17 N1 -0.486433 -0.770599 -0.411777 N2 -0.433172 -0.735531 -0.520919 + txt003 +STRI + V0 -2.48875 -0.2 1.01872 V1 -2.46111 -0.225 1.07222 V2 -2.63437 -0.225 1.25391 + N0 -0.433172 -0.735531 -0.520919 N1 3.17396e-17 -1 -1.63988e-17 N2 1.5603e-17 -1 -1.57299e-17 + txt003 +STRI + V0 -2.68102 -0.2 1.20764 V1 -2.7169 -0.125 1.17205 V2 -2.51001 -0.125 0.977572 + N0 -0.486433 -0.770599 -0.411777 N1 -0.700515 -0.35392 -0.619694 N2 -0.589822 -0.322549 -0.740319 + txt003 +STRI + V0 -2.51001 -0.125 0.977572 V1 -2.48875 -0.2 1.01872 V2 -2.68102 -0.2 1.20764 + N0 -0.589822 -0.322549 -0.740319 N1 -0.433172 -0.735531 -0.520919 N2 -0.486433 -0.770599 -0.411777 + txt003 +STRI + V0 -2.7169 -0.125 1.17205 V1 -2.73125 0 1.15781 V2 -2.51852 0 0.961111 + N0 -0.700515 -0.35392 -0.619694 N1 -0.743581 -2.38916e-16 -0.668646 N2 -0.617031 -2.64751e-17 -0.786939 + txt003 +STRI + V0 -2.51852 0 0.961111 V1 -2.51001 -0.125 0.977572 V2 -2.7169 -0.125 1.17205 + N0 -0.617031 -2.64751e-17 -0.786939 N1 -0.589822 -0.322549 -0.740319 N2 -0.700515 -0.35392 -0.619694 + txt003 +STRI + V0 -2.4037 0 1.18333 V1 -2.41221 -0.125 1.16687 V2 -2.22668 -0.125 1.01033 + N0 0.722374 0 0.691503 N1 0.676612 -0.31353 0.666255 N2 0.548733 -0.289562 0.784249 + txt003 +STRI + V0 -2.22668 -0.125 1.01033 V1 -2.22546 0 1.02917 V2 -2.4037 0 1.18333 + N0 0.548733 -0.289562 0.784249 N1 0.580973 0 0.813923 N2 0.722374 0 0.691503 + txt003 +STRI + V0 -2.41221 -0.125 1.16687 V1 -2.43347 -0.2 1.12572 V2 -2.22972 -0.2 0.963227 + N0 0.676612 -0.31353 0.666255 N1 0.471519 -0.729692 0.495195 N2 0.396971 -0.700023 0.593618 + txt003 +STRI + V0 -2.22972 -0.2 0.963227 V1 -2.22668 -0.125 1.01033 V2 -2.41221 -0.125 1.16687 + N0 0.396971 -0.700023 0.593618 N1 0.548733 -0.289562 0.784249 N2 0.676612 -0.31353 0.666255 + txt003 +STRI + V0 -2.43347 -0.2 1.12572 V1 -2.46111 -0.225 1.07222 V2 -2.23368 -0.225 0.901997 + N0 0.471519 -0.729692 0.495195 N1 3.17396e-17 -1 -1.63988e-17 N2 5.4409e-17 -1 -3.51585e-18 + txt003 +STRI + V0 -2.23368 -0.225 0.901997 V1 -2.22972 -0.2 0.963227 V2 -2.43347 -0.2 1.12572 + N0 5.4409e-17 -1 -3.51585e-18 N1 0.396971 -0.700023 0.593618 N2 0.471519 -0.729692 0.495195 + txt003 +STRI + V0 -2.46111 -0.225 1.07222 V1 -2.48875 -0.2 1.01872 V2 -2.23764 -0.2 0.840766 + N0 3.17396e-17 -1 -1.63988e-17 N1 -0.433172 -0.735531 -0.520919 N2 -0.367048 -0.708353 -0.60292 + txt003 +STRI + V0 -2.23764 -0.2 0.840766 V1 -2.23368 -0.225 0.901997 V2 -2.46111 -0.225 1.07222 + N0 -0.367048 -0.708353 -0.60292 N1 5.4409e-17 -1 -3.51585e-18 N2 3.17396e-17 -1 -1.63988e-17 + txt003 +STRI + V0 -2.48875 -0.2 1.01872 V1 -2.51001 -0.125 0.977572 V2 -2.24068 -0.125 0.793666 + N0 -0.433172 -0.735531 -0.520919 N1 -0.589822 -0.322549 -0.740319 N2 -0.485318 -0.301052 -0.820874 + txt003 +STRI + V0 -2.24068 -0.125 0.793666 V1 -2.23764 -0.2 0.840766 V2 -2.48875 -0.2 1.01872 + N0 -0.485318 -0.301052 -0.820874 N1 -0.367048 -0.708353 -0.60292 N2 -0.433172 -0.735531 -0.520919 + txt003 +STRI + V0 -2.51001 -0.125 0.977572 V1 -2.51852 0 0.961111 V2 -2.2419 0 0.774826 + N0 -0.589822 -0.322549 -0.740319 N1 -0.617031 -2.64751e-17 -0.786939 N2 -0.504836 2.02979e-16 -0.863216 + txt003 +STRI + V0 -2.2419 0 0.774826 V1 -2.24068 -0.125 0.793666 V2 -2.51001 -0.125 0.977572 + N0 -0.504836 2.02979e-16 -0.863216 N1 -0.485318 -0.301052 -0.820874 N2 -0.589822 -0.322549 -0.740319 + txt003 +STRI + V0 -2.22546 0 1.02917 V1 -2.22668 -0.125 1.01033 V2 -1.99259 -0.125 0.877778 + N0 0.580973 0 0.813923 N1 0.548733 -0.289562 0.784249 N2 0.390503 -0.30734 0.867784 + txt003 +STRI + V0 -1.99259 -0.125 0.877778 V1 -2 0 0.9 V2 -2.22546 0 1.02917 + N0 0.390503 -0.30734 0.867784 N1 0.410365 0 0.911922 N2 0.580973 0 0.813923 + txt003 +STRI + V0 -2.22668 -0.125 1.01033 V1 -2.22972 -0.2 0.963227 V2 -1.97407 -0.2 0.822222 + N0 0.548733 -0.289562 0.784249 N1 0.396971 -0.700023 0.593618 N2 0.285351 -0.718662 0.634113 + txt003 +STRI + V0 -1.97407 -0.2 0.822222 V1 -1.99259 -0.125 0.877778 V2 -2.22668 -0.125 1.01033 + N0 0.285351 -0.718662 0.634113 N1 0.390503 -0.30734 0.867784 N2 0.548733 -0.289562 0.784249 + txt003 +STRI + V0 -2.22972 -0.2 0.963227 V1 -2.23368 -0.225 0.901997 V2 -1.95 -0.225 0.75 + N0 0.396971 -0.700023 0.593618 N1 5.4409e-17 -1 -3.51585e-18 N2 7.83687e-17 -1 2.61229e-17 + txt003 +STRI + V0 -1.95 -0.225 0.75 V1 -1.97407 -0.2 0.822222 V2 -2.22972 -0.2 0.963227 + N0 7.83687e-17 -1 2.61229e-17 N1 0.285351 -0.718662 0.634113 N2 0.396971 -0.700023 0.593618 + txt003 +STRI + V0 -2.23368 -0.225 0.901997 V1 -2.23764 -0.2 0.840766 V2 -1.92593 -0.2 0.677778 + N0 5.4409e-17 -1 -3.51585e-18 N1 -0.367048 -0.708353 -0.60292 N2 -0.285351 -0.718662 -0.634113 + txt003 +STRI + V0 -1.92593 -0.2 0.677778 V1 -1.95 -0.225 0.75 V2 -2.23368 -0.225 0.901997 + N0 -0.285351 -0.718662 -0.634113 N1 7.83687e-17 -1 2.61229e-17 N2 5.4409e-17 -1 -3.51585e-18 + txt003 +STRI + V0 -2.23764 -0.2 0.840766 V1 -2.24068 -0.125 0.793666 V2 -1.90741 -0.125 0.622222 + N0 -0.367048 -0.708353 -0.60292 N1 -0.485318 -0.301052 -0.820874 N2 -0.390503 -0.30734 -0.867784 + txt003 +STRI + V0 -1.90741 -0.125 0.622222 V1 -1.92593 -0.2 0.677778 V2 -2.23764 -0.2 0.840766 + N0 -0.390503 -0.30734 -0.867784 N1 -0.285351 -0.718662 -0.634113 N2 -0.367048 -0.708353 -0.60292 + txt003 +STRI + V0 -2.24068 -0.125 0.793666 V1 -2.2419 0 0.774826 V2 -1.9 0 0.6 + N0 -0.485318 -0.301052 -0.820874 N1 -0.504836 2.02979e-16 -0.863216 N2 -0.410365 4.49972e-17 -0.911922 + txt003 +STRI + V0 -1.9 0 0.6 V1 -1.90741 -0.125 0.622222 V2 -2.24068 -0.125 0.793666 + N0 -0.410365 4.49972e-17 -0.911922 N1 -0.390503 -0.30734 -0.867784 N2 -0.485318 -0.301052 -0.820874 + txt003 +STRI + V0 -3 0 1.8 V1 -2.97778 0.125 1.8 V2 -2.94929 0.125 1.58515 + N0 -1 0 0 N1 -0.923077 0.384615 0 N2 -0.890548 0.386679 -0.23959 + txt003 +STRI + V0 -2.94929 0.125 1.58515 V1 -2.9706 0 1.5783 V2 -3 0 1.8 + N0 -0.890548 0.386679 -0.23959 N1 -0.965311 0 -0.261102 N2 -1 0 0 + txt003 +STRI + V0 -2.97778 0.125 1.8 V1 -2.92222 0.2 1.8 V2 -2.896 0.2 1.60229 + N0 -0.923077 0.384615 0 N1 -0.6 0.8 0 N2 -0.577707 0.801752 -0.153129 + txt003 +STRI + V0 -2.896 0.2 1.60229 V1 -2.94929 0.125 1.58515 V2 -2.97778 0.125 1.8 + N0 -0.577707 0.801752 -0.153129 N1 -0.890548 0.386679 -0.23959 N2 -0.923077 0.384615 0 + txt003 +STRI + V0 -2.92222 0.2 1.8 V1 -2.85 0.225 1.8 V2 -2.82674 0.225 1.62457 + N0 -0.6 0.8 0 N1 -0 1 0 N2 9.48478e-19 1 -2.94924e-18 + txt003 +STRI + V0 -2.82674 0.225 1.62457 V1 -2.896 0.2 1.60229 V2 -2.92222 0.2 1.8 + N0 9.48478e-19 1 -2.94924e-18 N1 -0.577707 0.801752 -0.153129 N2 -0.6 0.8 0 + txt003 +STRI + V0 -2.85 0.225 1.8 V1 -2.77778 0.2 1.8 V2 -2.75747 0.2 1.64684 + N0 -0 1 0 N1 0.6 0.8 0 N2 0.57987 0.801541 0.145888 + txt003 +STRI + V0 -2.75747 0.2 1.64684 V1 -2.82674 0.225 1.62457 V2 -2.85 0.225 1.8 + N0 0.57987 0.801541 0.145888 N1 9.48478e-19 1 -2.94924e-18 N2 -0 1 0 + txt003 +STRI + V0 -2.77778 0.2 1.8 V1 -2.72222 0.125 1.8 V2 -2.70418 0.125 1.66398 + N0 0.6 0.8 0 N1 0.923077 0.384615 0 N2 0.895972 0.38623 0.219226 + txt003 +STRI + V0 -2.70418 0.125 1.66398 V1 -2.75747 0.2 1.64684 V2 -2.77778 0.2 1.8 + N0 0.895972 0.38623 0.219226 N1 0.57987 0.801541 0.145888 N2 0.6 0.8 0 + txt003 +STRI + V0 -2.72222 0.125 1.8 V1 -2.7 0 1.8 V2 -2.68287 0 1.67083 + N0 0.923077 0.384615 0 N1 1 9.86865e-16 0 N2 0.972045 1.13306e-15 0.234794 + txt003 +STRI + V0 -2.68287 0 1.67083 V1 -2.70418 0.125 1.66398 V2 -2.72222 0.125 1.8 + N0 0.972045 1.13306e-15 0.234794 N1 0.895972 0.38623 0.219226 N2 0.923077 0.384615 0 + txt003 +STRI + V0 -2.9706 0 1.5783 V1 -2.94929 0.125 1.58515 V2 -2.86283 0.125 1.37521 + N0 -0.965311 0 -0.261102 N1 -0.890548 0.386679 -0.23959 N2 -0.807437 0.378466 -0.452558 + txt003 +STRI + V0 -2.86283 0.125 1.37521 V1 -2.88148 0 1.36389 V2 -2.9706 0 1.5783 + N0 -0.807437 0.378466 -0.452558 N1 -0.869653 0 -0.493664 N2 -0.965311 0 -0.261102 + txt003 +STRI + V0 -2.94929 0.125 1.58515 V1 -2.896 0.2 1.60229 V2 -2.81619 0.2 1.4035 + N0 -0.890548 0.386679 -0.23959 N1 -0.577707 0.801752 -0.153129 N2 -0.534196 0.794341 -0.289235 + txt003 +STRI + V0 -2.81619 0.2 1.4035 V1 -2.86283 0.125 1.37521 V2 -2.94929 0.125 1.58515 + N0 -0.534196 0.794341 -0.289235 N1 -0.807437 0.378466 -0.452558 N2 -0.890548 0.386679 -0.23959 + txt003 +STRI + V0 -2.896 0.2 1.60229 V1 -2.82674 0.225 1.62457 V2 -2.75556 0.225 1.44028 + N0 -0.577707 0.801752 -0.153129 N1 9.48478e-19 1 -2.94924e-18 N2 5.73642e-18 1 -9.4564e-18 + txt003 +STRI + V0 -2.75556 0.225 1.44028 V1 -2.81619 0.2 1.4035 V2 -2.896 0.2 1.60229 + N0 5.73642e-18 1 -9.4564e-18 N1 -0.534196 0.794341 -0.289235 N2 -0.577707 0.801752 -0.153129 + txt003 +STRI + V0 -2.82674 0.225 1.62457 V1 -2.75747 0.2 1.64684 V2 -2.69492 0.2 1.47706 + N0 9.48478e-19 1 -2.94924e-18 N1 0.57987 0.801541 0.145888 N2 0.548194 0.793356 0.264707 + txt003 +STRI + V0 -2.69492 0.2 1.47706 V1 -2.75556 0.225 1.44028 V2 -2.82674 0.225 1.62457 + N0 0.548194 0.793356 0.264707 N1 5.73642e-18 1 -9.4564e-18 N2 9.48478e-19 1 -2.94924e-18 + txt003 +STRI + V0 -2.75747 0.2 1.64684 V1 -2.70418 0.125 1.66398 V2 -2.64829 0.125 1.50535 + N0 0.57987 0.801541 0.145888 N1 0.895972 0.38623 0.219226 N2 0.842942 0.376421 0.38439 + txt003 +STRI + V0 -2.64829 0.125 1.50535 V1 -2.69492 0.2 1.47706 V2 -2.75747 0.2 1.64684 + N0 0.842942 0.376421 0.38439 N1 0.548194 0.793356 0.264707 N2 0.57987 0.801541 0.145888 + txt003 +STRI + V0 -2.70418 0.125 1.66398 V1 -2.68287 0 1.67083 V2 -2.62963 0 1.51667 + N0 0.895972 0.38623 0.219226 N1 0.972045 1.13306e-15 0.234794 N2 0.913812 1.42786e-15 0.406138 + txt003 +STRI + V0 -2.62963 0 1.51667 V1 -2.64829 0.125 1.50535 V2 -2.70418 0.125 1.66398 + N0 0.913812 1.42786e-15 0.406138 N1 0.842942 0.376421 0.38439 N2 0.895972 0.38623 0.219226 + txt003 +STRI + V0 -2.88148 0 1.36389 V1 -2.86283 0.125 1.37521 V2 -2.7169 0.125 1.17205 + N0 -0.869653 0 -0.493664 N1 -0.807437 0.378466 -0.452558 N2 -0.700515 0.35392 -0.619694 + txt003 +STRI + V0 -2.7169 0.125 1.17205 V1 -2.73125 0 1.15781 V2 -2.88148 0 1.36389 + N0 -0.700515 0.35392 -0.619694 N1 -0.743581 0 -0.668646 N2 -0.869653 0 -0.493664 + txt003 +STRI + V0 -2.86283 0.125 1.37521 V1 -2.81619 0.2 1.4035 V2 -2.68102 0.2 1.20764 + N0 -0.807437 0.378466 -0.452558 N1 -0.534196 0.794341 -0.289235 N2 -0.486433 0.770599 -0.411777 + txt003 +STRI + V0 -2.68102 0.2 1.20764 V1 -2.7169 0.125 1.17205 V2 -2.86283 0.125 1.37521 + N0 -0.486433 0.770599 -0.411777 N1 -0.700515 0.35392 -0.619694 N2 -0.807437 0.378466 -0.452558 + txt003 +STRI + V0 -2.81619 0.2 1.4035 V1 -2.75556 0.225 1.44028 V2 -2.63437 0.225 1.25391 + N0 -0.534196 0.794341 -0.289235 N1 5.73642e-18 1 -9.4564e-18 N2 1.5603e-17 1 -1.57299e-17 + txt003 +STRI + V0 -2.63437 0.225 1.25391 V1 -2.68102 0.2 1.20764 V2 -2.81619 0.2 1.4035 + N0 1.5603e-17 1 -1.57299e-17 N1 -0.486433 0.770599 -0.411777 N2 -0.534196 0.794341 -0.289235 + txt003 +STRI + V0 -2.75556 0.225 1.44028 V1 -2.69492 0.2 1.47706 V2 -2.58773 0.2 1.30017 + N0 5.73642e-18 1 -9.4564e-18 N1 0.548194 0.793356 0.264707 N2 0.515846 0.768155 0.379264 + txt003 +STRI + V0 -2.58773 0.2 1.30017 V1 -2.63437 0.225 1.25391 V2 -2.75556 0.225 1.44028 + N0 0.515846 0.768155 0.379264 N1 1.5603e-17 1 -1.57299e-17 N2 5.73642e-18 1 -9.4564e-18 + txt003 +STRI + V0 -2.69492 0.2 1.47706 V1 -2.64829 0.125 1.50535 V2 -2.55185 0.125 1.33576 + N0 0.548194 0.793356 0.264707 N1 0.842942 0.376421 0.38439 N2 0.772293 0.349434 0.530527 + txt003 +STRI + V0 -2.55185 0.125 1.33576 V1 -2.58773 0.2 1.30017 V2 -2.69492 0.2 1.47706 + N0 0.772293 0.349434 0.530527 N1 0.515846 0.768155 0.379264 N2 0.548194 0.793356 0.264707 + txt003 +STRI + V0 -2.64829 0.125 1.50535 V1 -2.62963 0 1.51667 V2 -2.5375 0 1.35 + N0 0.842942 0.376421 0.38439 N1 0.913812 1.42786e-15 0.406138 N2 0.83205 1.23168e-15 0.5547 + txt003 +STRI + V0 -2.5375 0 1.35 V1 -2.55185 0.125 1.33576 V2 -2.64829 0.125 1.50535 + N0 0.83205 1.23168e-15 0.5547 N1 0.772293 0.349434 0.530527 N2 0.842942 0.376421 0.38439 + txt003 +STRI + V0 -2.73125 0 1.15781 V1 -2.7169 0.125 1.17205 V2 -2.51001 0.125 0.977572 + N0 -0.743581 0 -0.668646 N1 -0.700515 0.35392 -0.619694 N2 -0.589822 0.322549 -0.740319 + txt003 +STRI + V0 -2.51001 0.125 0.977572 V1 -2.51852 0 0.961111 V2 -2.73125 0 1.15781 + N0 -0.589822 0.322549 -0.740319 N1 -0.617031 0 -0.786939 N2 -0.743581 0 -0.668646 + txt003 +STRI + V0 -2.7169 0.125 1.17205 V1 -2.68102 0.2 1.20764 V2 -2.48875 0.2 1.01872 + N0 -0.700515 0.35392 -0.619694 N1 -0.486433 0.770599 -0.411777 N2 -0.433172 0.735531 -0.520919 + txt003 +STRI + V0 -2.48875 0.2 1.01872 V1 -2.51001 0.125 0.977572 V2 -2.7169 0.125 1.17205 + N0 -0.433172 0.735531 -0.520919 N1 -0.589822 0.322549 -0.740319 N2 -0.700515 0.35392 -0.619694 + txt003 +STRI + V0 -2.68102 0.2 1.20764 V1 -2.63437 0.225 1.25391 V2 -2.46111 0.225 1.07222 + N0 -0.486433 0.770599 -0.411777 N1 1.5603e-17 1 -1.57299e-17 N2 3.17396e-17 1 -1.63988e-17 + txt003 +STRI + V0 -2.46111 0.225 1.07222 V1 -2.48875 0.2 1.01872 V2 -2.68102 0.2 1.20764 + N0 3.17396e-17 1 -1.63988e-17 N1 -0.433172 0.735531 -0.520919 N2 -0.486433 0.770599 -0.411777 + txt003 +STRI + V0 -2.63437 0.225 1.25391 V1 -2.58773 0.2 1.30017 V2 -2.43347 0.2 1.12572 + N0 1.5603e-17 1 -1.57299e-17 N1 0.515846 0.768155 0.379264 N2 0.471519 0.729692 0.495195 + txt003 +STRI + V0 -2.43347 0.2 1.12572 V1 -2.46111 0.225 1.07222 V2 -2.63437 0.225 1.25391 + N0 0.471519 0.729692 0.495195 N1 3.17396e-17 1 -1.63988e-17 N2 1.5603e-17 1 -1.57299e-17 + txt003 +STRI + V0 -2.58773 0.2 1.30017 V1 -2.55185 0.125 1.33576 V2 -2.41221 0.125 1.16687 + N0 0.515846 0.768155 0.379264 N1 0.772293 0.349434 0.530527 N2 0.676612 0.31353 0.666255 + txt003 +STRI + V0 -2.41221 0.125 1.16687 V1 -2.43347 0.2 1.12572 V2 -2.58773 0.2 1.30017 + N0 0.676612 0.31353 0.666255 N1 0.471519 0.729692 0.495195 N2 0.515846 0.768155 0.379264 + txt003 +STRI + V0 -2.55185 0.125 1.33576 V1 -2.5375 0 1.35 V2 -2.4037 0 1.18333 + N0 0.772293 0.349434 0.530527 N1 0.83205 1.23168e-15 0.5547 N2 0.722374 1.2247e-15 0.691503 + txt003 +STRI + V0 -2.4037 0 1.18333 V1 -2.41221 0.125 1.16687 V2 -2.55185 0.125 1.33576 + N0 0.722374 1.2247e-15 0.691503 N1 0.676612 0.31353 0.666255 N2 0.772293 0.349434 0.530527 + txt003 +STRI + V0 -2.51852 0 0.961111 V1 -2.51001 0.125 0.977572 V2 -2.24068 0.125 0.793666 + N0 -0.617031 0 -0.786939 N1 -0.589822 0.322549 -0.740319 N2 -0.485318 0.301052 -0.820874 + txt003 +STRI + V0 -2.24068 0.125 0.793666 V1 -2.2419 0 0.774826 V2 -2.51852 0 0.961111 + N0 -0.485318 0.301052 -0.820874 N1 -0.504836 0 -0.863216 N2 -0.617031 0 -0.786939 + txt003 +STRI + V0 -2.51001 0.125 0.977572 V1 -2.48875 0.2 1.01872 V2 -2.23764 0.2 0.840766 + N0 -0.589822 0.322549 -0.740319 N1 -0.433172 0.735531 -0.520919 N2 -0.367048 0.708353 -0.60292 + txt003 +STRI + V0 -2.23764 0.2 0.840766 V1 -2.24068 0.125 0.793666 V2 -2.51001 0.125 0.977572 + N0 -0.367048 0.708353 -0.60292 N1 -0.485318 0.301052 -0.820874 N2 -0.589822 0.322549 -0.740319 + txt003 +STRI + V0 -2.48875 0.2 1.01872 V1 -2.46111 0.225 1.07222 V2 -2.23368 0.225 0.901997 + N0 -0.433172 0.735531 -0.520919 N1 3.17396e-17 1 -1.63988e-17 N2 5.4409e-17 1 -3.51585e-18 + txt003 +STRI + V0 -2.23368 0.225 0.901997 V1 -2.23764 0.2 0.840766 V2 -2.48875 0.2 1.01872 + N0 5.4409e-17 1 -3.51585e-18 N1 -0.367048 0.708353 -0.60292 N2 -0.433172 0.735531 -0.520919 + txt003 +STRI + V0 -2.46111 0.225 1.07222 V1 -2.43347 0.2 1.12572 V2 -2.22972 0.2 0.963227 + N0 3.17396e-17 1 -1.63988e-17 N1 0.471519 0.729692 0.495195 N2 0.396971 0.700023 0.593618 + txt003 +STRI + V0 -2.22972 0.2 0.963227 V1 -2.23368 0.225 0.901997 V2 -2.46111 0.225 1.07222 + N0 0.396971 0.700023 0.593618 N1 5.4409e-17 1 -3.51585e-18 N2 3.17396e-17 1 -1.63988e-17 + txt003 +STRI + V0 -2.43347 0.2 1.12572 V1 -2.41221 0.125 1.16687 V2 -2.22668 0.125 1.01033 + N0 0.471519 0.729692 0.495195 N1 0.676612 0.31353 0.666255 N2 0.548733 0.289562 0.784249 + txt003 +STRI + V0 -2.22668 0.125 1.01033 V1 -2.22972 0.2 0.963227 V2 -2.43347 0.2 1.12572 + N0 0.548733 0.289562 0.784249 N1 0.396971 0.700023 0.593618 N2 0.471519 0.729692 0.495195 + txt003 +STRI + V0 -2.41221 0.125 1.16687 V1 -2.4037 0 1.18333 V2 -2.22546 0 1.02917 + N0 0.676612 0.31353 0.666255 N1 0.722374 1.2247e-15 0.691503 N2 0.580973 1.1041e-15 0.813923 + txt003 +STRI + V0 -2.22546 0 1.02917 V1 -2.22668 0.125 1.01033 V2 -2.41221 0.125 1.16687 + N0 0.580973 1.1041e-15 0.813923 N1 0.548733 0.289562 0.784249 N2 0.676612 0.31353 0.666255 + txt003 +STRI + V0 -2.2419 0 0.774826 V1 -2.24068 0.125 0.793666 V2 -1.90741 0.125 0.622222 + N0 -0.504836 0 -0.863216 N1 -0.485318 0.301052 -0.820874 N2 -0.390503 0.30734 -0.867784 + txt003 +STRI + V0 -1.90741 0.125 0.622222 V1 -1.9 0 0.6 V2 -2.2419 0 0.774826 + N0 -0.390503 0.30734 -0.867784 N1 -0.410365 0 -0.911922 N2 -0.504836 0 -0.863216 + txt003 +STRI + V0 -2.24068 0.125 0.793666 V1 -2.23764 0.2 0.840766 V2 -1.92593 0.2 0.677778 + N0 -0.485318 0.301052 -0.820874 N1 -0.367048 0.708353 -0.60292 N2 -0.285351 0.718662 -0.634113 + txt003 +STRI + V0 -1.92593 0.2 0.677778 V1 -1.90741 0.125 0.622222 V2 -2.24068 0.125 0.793666 + N0 -0.285351 0.718662 -0.634113 N1 -0.390503 0.30734 -0.867784 N2 -0.485318 0.301052 -0.820874 + txt003 +STRI + V0 -2.23764 0.2 0.840766 V1 -2.23368 0.225 0.901997 V2 -1.95 0.225 0.75 + N0 -0.367048 0.708353 -0.60292 N1 5.4409e-17 1 -3.51585e-18 N2 7.83687e-17 1 2.61229e-17 + txt003 +STRI + V0 -1.95 0.225 0.75 V1 -1.92593 0.2 0.677778 V2 -2.23764 0.2 0.840766 + N0 7.83687e-17 1 2.61229e-17 N1 -0.285351 0.718662 -0.634113 N2 -0.367048 0.708353 -0.60292 + txt003 +STRI + V0 -2.23368 0.225 0.901997 V1 -2.22972 0.2 0.963227 V2 -1.97407 0.2 0.822222 + N0 5.4409e-17 1 -3.51585e-18 N1 0.396971 0.700023 0.593618 N2 0.285351 0.718662 0.634113 + txt003 +STRI + V0 -1.97407 0.2 0.822222 V1 -1.95 0.225 0.75 V2 -2.23368 0.225 0.901997 + N0 0.285351 0.718662 0.634113 N1 7.83687e-17 1 2.61229e-17 N2 5.4409e-17 1 -3.51585e-18 + txt003 +STRI + V0 -2.22972 0.2 0.963227 V1 -2.22668 0.125 1.01033 V2 -1.99259 0.125 0.877778 + N0 0.396971 0.700023 0.593618 N1 0.548733 0.289562 0.784249 N2 0.390503 0.30734 0.867784 + txt003 +STRI + V0 -1.99259 0.125 0.877778 V1 -1.97407 0.2 0.822222 V2 -2.22972 0.2 0.963227 + N0 0.390503 0.30734 0.867784 N1 0.285351 0.718662 0.634113 N2 0.396971 0.700023 0.593618 + txt003 +STRI + V0 -2.22668 0.125 1.01033 V1 -2.22546 0 1.02917 V2 -2 0 0.9 + N0 0.548733 0.289562 0.784249 N1 0.580973 1.1041e-15 0.813923 N2 0.410365 1.30492e-15 0.911922 + txt003 +STRI + V0 -2 0 0.9 V1 -1.99259 0.125 0.877778 V2 -2.22668 0.125 1.01033 + N0 0.410365 1.30492e-15 0.911922 N1 0.390503 0.30734 0.867784 N2 0.548733 0.289562 0.784249 + txt003 +STRI + V0 1.7 0 1.425 V1 1.7 -0.275 1.36389 V2 2.07238 -0.262346 1.42521 + N0 -0 0 1 N1 -0.0157732 -0.461877 0.886804 N2 -0.291732 -0.426807 0.855995 + txt003 +STRI + V0 2.07238 -0.262346 1.42521 V1 2.0588 0 1.47639 V2 1.7 0 1.425 + N0 -0.291732 -0.426807 0.855995 N1 -0.333935 0 0.942596 N2 -0 0 1 + txt003 +STRI + V0 1.7 -0.275 1.36389 V1 1.7 -0.44 1.21111 V2 2.10633 -0.419753 1.29725 + N0 -0.0157732 -0.461877 0.886804 N1 -0.0291362 -0.857129 0.514277 N2 -0.135104 -0.834377 0.534381 + txt003 +STRI + V0 2.10633 -0.419753 1.29725 V1 2.07238 -0.262346 1.42521 V2 1.7 -0.275 1.36389 + N0 -0.135104 -0.834377 0.534381 N1 -0.291732 -0.426807 0.855995 N2 -0.0157732 -0.461877 0.886804 + txt003 +STRI + V0 1.7 -0.44 1.21111 V1 1.7 -0.495 1.0125 V2 2.15046 -0.472222 1.1309 + N0 -0.0291362 -0.857129 0.514277 N1 0 -1 -0 N2 0.110195 -0.99348 0.0292376 + txt003 +STRI + V0 2.15046 -0.472222 1.1309 V1 2.10633 -0.419753 1.29725 V2 1.7 -0.44 1.21111 + N0 0.110195 -0.99348 0.0292376 N1 -0.135104 -0.834377 0.534381 N2 -0.0291362 -0.857129 0.514277 + txt003 +STRI + V0 1.7 -0.495 1.0125 V1 1.7 -0.44 0.813889 V2 2.1946 -0.419753 0.964558 + N0 0 -1 -0 N1 0.0673462 -0.855546 -0.513328 N2 0.348602 -0.814337 -0.464038 + txt003 +STRI + V0 2.1946 -0.419753 0.964558 V1 2.15046 -0.472222 1.1309 V2 1.7 -0.495 1.0125 + N0 0.348602 -0.814337 -0.464038 N1 0.110195 -0.99348 0.0292376 N2 0 -1 -0 + txt003 +STRI + V0 1.7 -0.44 0.813889 V1 1.7 -0.275 0.661111 V2 2.22855 -0.262346 0.8366 + N0 0.0673462 -0.855546 -0.513328 N1 0.134339 -0.457747 -0.878875 N2 0.492146 -0.41068 -0.767551 + txt003 +STRI + V0 2.22855 -0.262346 0.8366 V1 2.1946 -0.419753 0.964558 V2 1.7 -0.44 0.813889 + N0 0.492146 -0.41068 -0.767551 N1 0.348602 -0.814337 -0.464038 N2 0.0673462 -0.855546 -0.513328 + txt003 +STRI + V0 1.7 -0.275 0.661111 V1 1.7 0 0.6 V2 2.24213 0 0.785417 + N0 0.134339 -0.457747 -0.878875 N1 0.158678 9.39168e-16 -0.98733 N2 0.528678 6.47717e-16 -0.848822 + txt003 +STRI + V0 2.24213 0 0.785417 V1 2.22855 -0.262346 0.8366 V2 1.7 -0.275 0.661111 + N0 0.528678 6.47717e-16 -0.848822 N1 0.492146 -0.41068 -0.767551 N2 0.134339 -0.457747 -0.878875 + txt003 +STRI + V0 2.0588 0 1.47639 V1 2.07238 -0.262346 1.42521 V2 2.29012 -0.23071 1.57202 + N0 -0.333935 0 0.942596 N1 -0.291732 -0.426807 0.855995 N2 -0.64585 -0.390219 0.656206 + txt003 +STRI + V0 2.29012 -0.23071 1.57202 V1 2.27037 0 1.61111 V2 2.0588 0 1.47639 + N0 -0.64585 -0.390219 0.656206 N1 -0.731055 0 0.682318 N2 -0.333935 0 0.942596 + txt003 +STRI + V0 2.07238 -0.262346 1.42521 V1 2.10633 -0.419753 1.29725 V2 2.33951 -0.369136 1.47428 + N0 -0.291732 -0.426807 0.855995 N1 -0.135104 -0.834377 0.534381 N2 -0.312511 -0.816863 0.484842 + txt003 +STRI + V0 2.33951 -0.369136 1.47428 V1 2.29012 -0.23071 1.57202 V2 2.07238 -0.262346 1.42521 + N0 -0.312511 -0.816863 0.484842 N1 -0.64585 -0.390219 0.656206 N2 -0.291732 -0.426807 0.855995 + txt003 +STRI + V0 2.10633 -0.419753 1.29725 V1 2.15046 -0.472222 1.1309 V2 2.4037 -0.415278 1.34722 + N0 -0.135104 -0.834377 0.534381 N1 0.110195 -0.99348 0.0292376 N2 0.215359 -0.970454 0.108813 + txt003 +STRI + V0 2.4037 -0.415278 1.34722 V1 2.33951 -0.369136 1.47428 V2 2.10633 -0.419753 1.29725 + N0 0.215359 -0.970454 0.108813 N1 -0.312511 -0.816863 0.484842 N2 -0.135104 -0.834377 0.534381 + txt003 +STRI + V0 2.15046 -0.472222 1.1309 V1 2.1946 -0.419753 0.964558 V2 2.4679 -0.369136 1.22016 + N0 0.110195 -0.99348 0.0292376 N1 0.348602 -0.814337 -0.464038 N2 0.627607 -0.733748 -0.260237 + txt003 +STRI + V0 2.4679 -0.369136 1.22016 V1 2.4037 -0.415278 1.34722 V2 2.15046 -0.472222 1.1309 + N0 0.627607 -0.733748 -0.260237 N1 0.215359 -0.970454 0.108813 N2 0.110195 -0.99348 0.0292376 + txt003 +STRI + V0 2.1946 -0.419753 0.964558 V1 2.22855 -0.262346 0.8366 V2 2.51728 -0.23071 1.12243 + N0 0.348602 -0.814337 -0.464038 N1 0.492146 -0.41068 -0.767551 N2 0.813963 -0.348056 -0.465103 + txt003 +STRI + V0 2.51728 -0.23071 1.12243 V1 2.4679 -0.369136 1.22016 V2 2.1946 -0.419753 0.964558 + N0 0.813963 -0.348056 -0.465103 N1 0.627607 -0.733748 -0.260237 N2 0.348602 -0.814337 -0.464038 + txt003 +STRI + V0 2.22855 -0.262346 0.8366 V1 2.24213 0 0.785417 V2 2.53704 0 1.08333 + N0 0.492146 -0.41068 -0.767551 N1 0.528678 6.47717e-16 -0.848822 N2 0.854063 9.88017e-16 -0.52017 + txt003 +STRI + V0 2.53704 0 1.08333 V1 2.51728 -0.23071 1.12243 V2 2.22855 -0.262346 0.8366 + N0 0.854063 9.88017e-16 -0.52017 N1 0.813963 -0.348056 -0.465103 N2 0.492146 -0.41068 -0.767551 + txt003 +STRI + V0 2.27037 0 1.61111 V1 2.29012 -0.23071 1.57202 V2 2.40972 -0.189583 1.77361 + N0 -0.731055 0 0.682318 N1 -0.64585 -0.390219 0.656206 N2 -0.835237 -0.363942 0.412221 + txt003 +STRI + V0 2.40972 -0.189583 1.77361 V1 2.3875 0 1.8 V2 2.27037 0 1.61111 + N0 -0.835237 -0.363942 0.412221 N1 -0.920582 0 0.39055 N2 -0.731055 0 0.682318 + txt003 +STRI + V0 2.29012 -0.23071 1.57202 V1 2.33951 -0.369136 1.47428 V2 2.46528 -0.303333 1.70764 + N0 -0.64585 -0.390219 0.656206 N1 -0.312511 -0.816863 0.484842 N2 -0.451323 -0.803033 0.38916 + txt003 +STRI + V0 2.46528 -0.303333 1.70764 V1 2.40972 -0.189583 1.77361 V2 2.29012 -0.23071 1.57202 + N0 -0.451323 -0.803033 0.38916 N1 -0.835237 -0.363942 0.412221 N2 -0.64585 -0.390219 0.656206 + txt003 +STRI + V0 2.33951 -0.369136 1.47428 V1 2.4037 -0.415278 1.34722 V2 2.5375 -0.34125 1.62187 + N0 -0.312511 -0.816863 0.484842 N1 0.215359 -0.970454 0.108813 N2 0.214084 -0.960035 0.180281 + txt003 +STRI + V0 2.5375 -0.34125 1.62187 V1 2.46528 -0.303333 1.70764 V2 2.33951 -0.369136 1.47428 + N0 0.214084 -0.960035 0.180281 N1 -0.451323 -0.803033 0.38916 N2 -0.312511 -0.816863 0.484842 + txt003 +STRI + V0 2.4037 -0.415278 1.34722 V1 2.4679 -0.369136 1.22016 V2 2.60972 -0.303333 1.53611 + N0 0.215359 -0.970454 0.108813 N1 0.627607 -0.733748 -0.260237 N2 0.705424 -0.704198 -0.0805066 + txt003 +STRI + V0 2.60972 -0.303333 1.53611 V1 2.5375 -0.34125 1.62187 V2 2.4037 -0.415278 1.34722 + N0 0.705424 -0.704198 -0.0805066 N1 0.214084 -0.960035 0.180281 N2 0.215359 -0.970454 0.108813 + txt003 +STRI + V0 2.4679 -0.369136 1.22016 V1 2.51728 -0.23071 1.12243 V2 2.66528 -0.189583 1.47014 + N0 0.627607 -0.733748 -0.260237 N1 0.813963 -0.348056 -0.465103 N2 0.913262 -0.329186 -0.239977 + txt003 +STRI + V0 2.66528 -0.189583 1.47014 V1 2.60972 -0.303333 1.53611 V2 2.4679 -0.369136 1.22016 + N0 0.913262 -0.329186 -0.239977 N1 0.705424 -0.704198 -0.0805066 N2 0.627607 -0.733748 -0.260237 + txt003 +STRI + V0 2.51728 -0.23071 1.12243 V1 2.53704 0 1.08333 V2 2.6875 0 1.44375 + N0 0.813963 -0.348056 -0.465103 N1 0.854063 9.88017e-16 -0.52017 N2 0.957826 1.83855e-15 -0.287348 + txt003 +STRI + V0 2.6875 0 1.44375 V1 2.66528 -0.189583 1.47014 V2 2.51728 -0.23071 1.12243 + N0 0.957826 1.83855e-15 -0.287348 N1 0.913262 -0.329186 -0.239977 N2 0.813963 -0.348056 -0.465103 + txt003 +STRI + V0 2.3875 0 1.8 V1 2.40972 -0.189583 1.77361 V2 2.48765 -0.148457 1.99928 + N0 -0.920582 0 0.39055 N1 -0.835237 -0.363942 0.412221 N2 -0.842821 -0.409176 0.34961 + txt003 +STRI + V0 2.48765 -0.148457 1.99928 V1 2.46296 0 2.01389 V2 2.3875 0 1.8 + N0 -0.842821 -0.409176 0.34961 N1 -0.948683 0 0.316228 N2 -0.920582 0 0.39055 + txt003 +STRI + V0 2.40972 -0.189583 1.77361 V1 2.46528 -0.303333 1.70764 V2 2.54938 -0.237531 1.96276 + N0 -0.835237 -0.363942 0.412221 N1 -0.451323 -0.803033 0.38916 N2 -0.452673 -0.821162 0.347535 + txt003 +STRI + V0 2.54938 -0.237531 1.96276 V1 2.48765 -0.148457 1.99928 V2 2.40972 -0.189583 1.77361 + N0 -0.452673 -0.821162 0.347535 N1 -0.842821 -0.409176 0.34961 N2 -0.835237 -0.363942 0.412221 + txt003 +STRI + V0 2.46528 -0.303333 1.70764 V1 2.5375 -0.34125 1.62187 V2 2.62963 -0.267222 1.91528 + N0 -0.451323 -0.803033 0.38916 N1 0.214084 -0.960035 0.180281 N2 0.113546 -0.974822 0.191909 + txt003 +STRI + V0 2.62963 -0.267222 1.91528 V1 2.54938 -0.237531 1.96276 V2 2.46528 -0.303333 1.70764 + N0 0.113546 -0.974822 0.191909 N1 -0.452673 -0.821162 0.347535 N2 -0.451323 -0.803033 0.38916 + txt003 +STRI + V0 2.5375 -0.34125 1.62187 V1 2.60972 -0.303333 1.53611 V2 2.70988 -0.237531 1.8678 + N0 0.214084 -0.960035 0.180281 N1 0.705424 -0.704198 -0.0805066 N2 0.60461 -0.794635 -0.0547983 + txt003 +STRI + V0 2.70988 -0.237531 1.8678 V1 2.62963 -0.267222 1.91528 V2 2.5375 -0.34125 1.62187 + N0 0.60461 -0.794635 -0.0547983 N1 0.113546 -0.974822 0.191909 N2 0.214084 -0.960035 0.180281 + txt003 +STRI + V0 2.60972 -0.303333 1.53611 V1 2.66528 -0.189583 1.47014 V2 2.7716 -0.148457 1.83128 + N0 0.705424 -0.704198 -0.0805066 N1 0.913262 -0.329186 -0.239977 N2 0.880144 -0.401503 -0.253261 + txt003 +STRI + V0 2.7716 -0.148457 1.83128 V1 2.70988 -0.237531 1.8678 V2 2.60972 -0.303333 1.53611 + N0 0.880144 -0.401503 -0.253261 N1 0.60461 -0.794635 -0.0547983 N2 0.705424 -0.704198 -0.0805066 + txt003 +STRI + V0 2.66528 -0.189583 1.47014 V1 2.6875 0 1.44375 V2 2.7963 0 1.81667 + N0 0.913262 -0.329186 -0.239977 N1 0.957826 1.83855e-15 -0.287348 N2 0.947588 3.02585e-15 -0.319493 + txt003 +STRI + V0 2.7963 0 1.81667 V1 2.7716 -0.148457 1.83128 V2 2.66528 -0.189583 1.47014 + N0 0.947588 3.02585e-15 -0.319493 N1 0.880144 -0.401503 -0.253261 N2 0.913262 -0.329186 -0.239977 + txt003 +STRI + V0 2.46296 0 2.01389 V1 2.48765 -0.148457 1.99928 V2 2.5804 -0.116821 2.21831 + N0 -0.948683 0 0.316228 N1 -0.842821 -0.409176 0.34961 N2 -0.723795 -0.498863 0.476715 + txt003 +STRI + V0 2.5804 -0.116821 2.21831 V1 2.54954 0 2.22361 V2 2.46296 0 2.01389 + N0 -0.723795 -0.498863 0.476715 N1 -0.874591 0 0.484861 N2 -0.948683 0 0.316228 + txt003 +STRI + V0 2.48765 -0.148457 1.99928 V1 2.54938 -0.237531 1.96276 V2 2.65756 -0.186914 2.20507 + N0 -0.842821 -0.409176 0.34961 N1 -0.452673 -0.821162 0.347535 N2 -0.365378 -0.851743 0.375544 + txt003 +STRI + V0 2.65756 -0.186914 2.20507 V1 2.5804 -0.116821 2.21831 V2 2.48765 -0.148457 1.99928 + N0 -0.365378 -0.851743 0.375544 N1 -0.723795 -0.498863 0.476715 N2 -0.842821 -0.409176 0.34961 + txt003 +STRI + V0 2.54938 -0.237531 1.96276 V1 2.62963 -0.267222 1.91528 V2 2.75787 -0.210278 2.18785 + N0 -0.452673 -0.821162 0.347535 N1 0.113546 -0.974822 0.191909 N2 0.0260102 -0.988113 0.151516 + txt003 +STRI + V0 2.75787 -0.210278 2.18785 V1 2.65756 -0.186914 2.20507 V2 2.54938 -0.237531 1.96276 + N0 0.0260102 -0.988113 0.151516 N1 -0.365378 -0.851743 0.375544 N2 -0.452673 -0.821162 0.347535 + txt003 +STRI + V0 2.62963 -0.267222 1.91528 V1 2.70988 -0.237531 1.8678 V2 2.85818 -0.186914 2.17063 + N0 0.113546 -0.974822 0.191909 N1 0.60461 -0.794635 -0.0547983 N2 0.417243 -0.88974 -0.185122 + txt003 +STRI + V0 2.85818 -0.186914 2.17063 V1 2.75787 -0.210278 2.18785 V2 2.62963 -0.267222 1.91528 + N0 0.417243 -0.88974 -0.185122 N1 0.0260102 -0.988113 0.151516 N2 0.113546 -0.974822 0.191909 + txt003 +STRI + V0 2.70988 -0.237531 1.8678 V1 2.7716 -0.148457 1.83128 V2 2.93534 -0.116821 2.15738 + N0 0.60461 -0.794635 -0.0547983 N1 0.880144 -0.401503 -0.253261 N2 0.70819 -0.492319 -0.506053 + txt003 +STRI + V0 2.93534 -0.116821 2.15738 V1 2.85818 -0.186914 2.17063 V2 2.70988 -0.237531 1.8678 + N0 0.70819 -0.492319 -0.506053 N1 0.417243 -0.88974 -0.185122 N2 0.60461 -0.794635 -0.0547983 + txt003 +STRI + V0 2.7716 -0.148457 1.83128 V1 2.7963 0 1.81667 V2 2.9662 0 2.15208 + N0 0.880144 -0.401503 -0.253261 N1 0.947588 3.02585e-15 -0.319493 N2 0.787582 4.30265e-15 -0.61621 + txt003 +STRI + V0 2.9662 0 2.15208 V1 2.93534 -0.116821 2.15738 V2 2.7716 -0.148457 1.83128 + N0 0.787582 4.30265e-15 -0.61621 N1 0.70819 -0.492319 -0.506053 N2 0.880144 -0.401503 -0.253261 + txt003 +STRI + V0 2.54954 0 2.22361 V1 2.5804 -0.116821 2.21831 V2 2.74444 -0.104167 2.4 + N0 -0.874591 0 0.484861 N1 -0.723795 -0.498863 0.476715 N2 -0.497164 -0.497164 0.711095 + txt003 +STRI + V0 2.74444 -0.104167 2.4 V1 2.7 0 2.4 V2 2.54954 0 2.22361 + N0 -0.497164 -0.497164 0.711095 N1 -0.6 0 0.8 N2 -0.874591 0 0.484861 + txt003 +STRI + V0 2.5804 -0.116821 2.21831 V1 2.65756 -0.186914 2.20507 V2 2.85556 -0.166667 2.4 + N0 -0.723795 -0.498863 0.476715 N1 -0.365378 -0.851743 0.375544 N2 -0.267368 -0.855576 0.443288 + txt003 +STRI + V0 2.85556 -0.166667 2.4 V1 2.74444 -0.104167 2.4 V2 2.5804 -0.116821 2.21831 + N0 -0.267368 -0.855576 0.443288 N1 -0.497164 -0.497164 0.711095 N2 -0.723795 -0.498863 0.476715 + txt003 +STRI + V0 2.65756 -0.186914 2.20507 V1 2.75787 -0.210278 2.18785 V2 3 -0.1875 2.4 + N0 -0.365378 -0.851743 0.375544 N1 0.0260102 -0.988113 0.151516 N2 0 -1 2.19303e-16 + txt003 +STRI + V0 3 -0.1875 2.4 V1 2.85556 -0.166667 2.4 V2 2.65756 -0.186914 2.20507 + N0 0 -1 2.19303e-16 N1 -0.267368 -0.855576 0.443288 N2 -0.365378 -0.851743 0.375544 + txt003 +STRI + V0 2.75787 -0.210278 2.18785 V1 2.85818 -0.186914 2.17063 V2 3.14444 -0.166667 2.4 + N0 0.0260102 -0.988113 0.151516 N1 0.417243 -0.88974 -0.185122 N2 0.250514 -0.801644 -0.54278 + txt003 +STRI + V0 3.14444 -0.166667 2.4 V1 3 -0.1875 2.4 V2 2.75787 -0.210278 2.18785 + N0 0.250514 -0.801644 -0.54278 N1 0 -1 2.19303e-16 N2 0.0260102 -0.988113 0.151516 + txt003 +STRI + V0 2.85818 -0.186914 2.17063 V1 2.93534 -0.116821 2.15738 V2 3.25556 -0.104167 2.4 + N0 0.417243 -0.88974 -0.185122 N1 0.70819 -0.492319 -0.506053 N2 0.366221 -0.366221 -0.855433 + txt003 +STRI + V0 3.25556 -0.104167 2.4 V1 3.14444 -0.166667 2.4 V2 2.85818 -0.186914 2.17063 + N0 0.366221 -0.366221 -0.855433 N1 0.250514 -0.801644 -0.54278 N2 0.417243 -0.88974 -0.185122 + txt003 +STRI + V0 2.93534 -0.116821 2.15738 V1 2.9662 0 2.15208 V2 3.3 0 2.4 + N0 0.70819 -0.492319 -0.506053 N1 0.787582 4.30265e-15 -0.61621 N2 0.384615 6.46776e-15 -0.923077 + txt003 +STRI + V0 3.3 0 2.4 V1 3.25556 -0.104167 2.4 V2 2.93534 -0.116821 2.15738 + N0 0.384615 6.46776e-15 -0.923077 N1 0.366221 -0.366221 -0.855433 N2 0.70819 -0.492319 -0.506053 + txt003 +STRI + V0 1.7 0 0.6 V1 1.7 0.275 0.661111 V2 2.22855 0.262346 0.8366 + N0 0.158678 0 -0.98733 N1 0.134339 0.457747 -0.878875 N2 0.492146 0.41068 -0.767551 + txt003 +STRI + V0 2.22855 0.262346 0.8366 V1 2.24213 0 0.785417 V2 1.7 0 0.6 + N0 0.492146 0.41068 -0.767551 N1 0.528678 0 -0.848822 N2 0.158678 0 -0.98733 + txt003 +STRI + V0 1.7 0.275 0.661111 V1 1.7 0.44 0.813889 V2 2.1946 0.419753 0.964558 + N0 0.134339 0.457747 -0.878875 N1 0.0673462 0.855546 -0.513328 N2 0.348602 0.814337 -0.464038 + txt003 +STRI + V0 2.1946 0.419753 0.964558 V1 2.22855 0.262346 0.8366 V2 1.7 0.275 0.661111 + N0 0.348602 0.814337 -0.464038 N1 0.492146 0.41068 -0.767551 N2 0.134339 0.457747 -0.878875 + txt003 +STRI + V0 1.7 0.44 0.813889 V1 1.7 0.495 1.0125 V2 2.15046 0.472222 1.1309 + N0 0.0673462 0.855546 -0.513328 N1 0 1 -0 N2 0.110195 0.99348 0.0292376 + txt003 +STRI + V0 2.15046 0.472222 1.1309 V1 2.1946 0.419753 0.964558 V2 1.7 0.44 0.813889 + N0 0.110195 0.99348 0.0292376 N1 0.348602 0.814337 -0.464038 N2 0.0673462 0.855546 -0.513328 + txt003 +STRI + V0 1.7 0.495 1.0125 V1 1.7 0.44 1.21111 V2 2.10633 0.419753 1.29725 + N0 0 1 -0 N1 -0.0291362 0.857129 0.514277 N2 -0.135104 0.834377 0.534381 + txt003 +STRI + V0 2.10633 0.419753 1.29725 V1 2.15046 0.472222 1.1309 V2 1.7 0.495 1.0125 + N0 -0.135104 0.834377 0.534381 N1 0.110195 0.99348 0.0292376 N2 0 1 -0 + txt003 +STRI + V0 1.7 0.44 1.21111 V1 1.7 0.275 1.36389 V2 2.07238 0.262346 1.42521 + N0 -0.0291362 0.857129 0.514277 N1 -0.0157732 0.461877 0.886804 N2 -0.291732 0.426807 0.855995 + txt003 +STRI + V0 2.07238 0.262346 1.42521 V1 2.10633 0.419753 1.29725 V2 1.7 0.44 1.21111 + N0 -0.291732 0.426807 0.855995 N1 -0.135104 0.834377 0.534381 N2 -0.0291362 0.857129 0.514277 + txt003 +STRI + V0 1.7 0.275 1.36389 V1 1.7 0 1.425 V2 2.0588 0 1.47639 + N0 -0.0157732 0.461877 0.886804 N1 0 -4.48575e-16 1 N2 -0.333935 -3.25455e-16 0.942596 + txt003 +STRI + V0 2.0588 0 1.47639 V1 2.07238 0.262346 1.42521 V2 1.7 0.275 1.36389 + N0 -0.333935 -3.25455e-16 0.942596 N1 -0.291732 0.426807 0.855995 N2 -0.0157732 0.461877 0.886804 + txt003 +STRI + V0 2.24213 0 0.785417 V1 2.22855 0.262346 0.8366 V2 2.51728 0.23071 1.12243 + N0 0.528678 0 -0.848822 N1 0.492146 0.41068 -0.767551 N2 0.813963 0.348056 -0.465103 + txt003 +STRI + V0 2.51728 0.23071 1.12243 V1 2.53704 0 1.08333 V2 2.24213 0 0.785417 + N0 0.813963 0.348056 -0.465103 N1 0.854063 0 -0.52017 N2 0.528678 0 -0.848822 + txt003 +STRI + V0 2.22855 0.262346 0.8366 V1 2.1946 0.419753 0.964558 V2 2.4679 0.369136 1.22016 + N0 0.492146 0.41068 -0.767551 N1 0.348602 0.814337 -0.464038 N2 0.627607 0.733748 -0.260237 + txt003 +STRI + V0 2.4679 0.369136 1.22016 V1 2.51728 0.23071 1.12243 V2 2.22855 0.262346 0.8366 + N0 0.627607 0.733748 -0.260237 N1 0.813963 0.348056 -0.465103 N2 0.492146 0.41068 -0.767551 + txt003 +STRI + V0 2.1946 0.419753 0.964558 V1 2.15046 0.472222 1.1309 V2 2.4037 0.415278 1.34722 + N0 0.348602 0.814337 -0.464038 N1 0.110195 0.99348 0.0292376 N2 0.215359 0.970454 0.108813 + txt003 +STRI + V0 2.4037 0.415278 1.34722 V1 2.4679 0.369136 1.22016 V2 2.1946 0.419753 0.964558 + N0 0.215359 0.970454 0.108813 N1 0.627607 0.733748 -0.260237 N2 0.348602 0.814337 -0.464038 + txt003 +STRI + V0 2.15046 0.472222 1.1309 V1 2.10633 0.419753 1.29725 V2 2.33951 0.369136 1.47428 + N0 0.110195 0.99348 0.0292376 N1 -0.135104 0.834377 0.534381 N2 -0.312511 0.816863 0.484842 + txt003 +STRI + V0 2.33951 0.369136 1.47428 V1 2.4037 0.415278 1.34722 V2 2.15046 0.472222 1.1309 + N0 -0.312511 0.816863 0.484842 N1 0.215359 0.970454 0.108813 N2 0.110195 0.99348 0.0292376 + txt003 +STRI + V0 2.10633 0.419753 1.29725 V1 2.07238 0.262346 1.42521 V2 2.29012 0.23071 1.57202 + N0 -0.135104 0.834377 0.534381 N1 -0.291732 0.426807 0.855995 N2 -0.64585 0.390219 0.656206 + txt003 +STRI + V0 2.29012 0.23071 1.57202 V1 2.33951 0.369136 1.47428 V2 2.10633 0.419753 1.29725 + N0 -0.64585 0.390219 0.656206 N1 -0.312511 0.816863 0.484842 N2 -0.135104 0.834377 0.534381 + txt003 +STRI + V0 2.07238 0.262346 1.42521 V1 2.0588 0 1.47639 V2 2.27037 0 1.61111 + N0 -0.291732 0.426807 0.855995 N1 -0.333935 -3.25455e-16 0.942596 N2 -0.731055 -1.69385e-16 0.682318 + txt003 +STRI + V0 2.27037 0 1.61111 V1 2.29012 0.23071 1.57202 V2 2.07238 0.262346 1.42521 + N0 -0.731055 -1.69385e-16 0.682318 N1 -0.64585 0.390219 0.656206 N2 -0.291732 0.426807 0.855995 + txt003 +STRI + V0 2.53704 0 1.08333 V1 2.51728 0.23071 1.12243 V2 2.66528 0.189583 1.47014 + N0 0.854063 0 -0.52017 N1 0.813963 0.348056 -0.465103 N2 0.913262 0.329186 -0.239977 + txt003 +STRI + V0 2.66528 0.189583 1.47014 V1 2.6875 0 1.44375 V2 2.53704 0 1.08333 + N0 0.913262 0.329186 -0.239977 N1 0.957826 0 -0.287348 N2 0.854063 0 -0.52017 + txt003 +STRI + V0 2.51728 0.23071 1.12243 V1 2.4679 0.369136 1.22016 V2 2.60972 0.303333 1.53611 + N0 0.813963 0.348056 -0.465103 N1 0.627607 0.733748 -0.260237 N2 0.705424 0.704198 -0.0805066 + txt003 +STRI + V0 2.60972 0.303333 1.53611 V1 2.66528 0.189583 1.47014 V2 2.51728 0.23071 1.12243 + N0 0.705424 0.704198 -0.0805066 N1 0.913262 0.329186 -0.239977 N2 0.813963 0.348056 -0.465103 + txt003 +STRI + V0 2.4679 0.369136 1.22016 V1 2.4037 0.415278 1.34722 V2 2.5375 0.34125 1.62188 + N0 0.627607 0.733748 -0.260237 N1 0.215359 0.970454 0.108813 N2 0.214084 0.960035 0.180281 + txt003 +STRI + V0 2.5375 0.34125 1.62188 V1 2.60972 0.303333 1.53611 V2 2.4679 0.369136 1.22016 + N0 0.214084 0.960035 0.180281 N1 0.705424 0.704198 -0.0805066 N2 0.627607 0.733748 -0.260237 + txt003 +STRI + V0 2.4037 0.415278 1.34722 V1 2.33951 0.369136 1.47428 V2 2.46528 0.303333 1.70764 + N0 0.215359 0.970454 0.108813 N1 -0.312511 0.816863 0.484842 N2 -0.451323 0.803033 0.38916 + txt003 +STRI + V0 2.46528 0.303333 1.70764 V1 2.5375 0.34125 1.62188 V2 2.4037 0.415278 1.34722 + N0 -0.451323 0.803033 0.38916 N1 0.214084 0.960035 0.180281 N2 0.215359 0.970454 0.108813 + txt003 +STRI + V0 2.33951 0.369136 1.47428 V1 2.29012 0.23071 1.57202 V2 2.40972 0.189583 1.77361 + N0 -0.312511 0.816863 0.484842 N1 -0.64585 0.390219 0.656206 N2 -0.835237 0.363942 0.412221 + txt003 +STRI + V0 2.40972 0.189583 1.77361 V1 2.46528 0.303333 1.70764 V2 2.33951 0.369136 1.47428 + N0 -0.835237 0.363942 0.412221 N1 -0.451323 0.803033 0.38916 N2 -0.312511 0.816863 0.484842 + txt003 +STRI + V0 2.29012 0.23071 1.57202 V1 2.27037 0 1.61111 V2 2.3875 0 1.8 + N0 -0.64585 0.390219 0.656206 N1 -0.731055 -1.69385e-16 0.682318 N2 -0.920582 -2.76813e-16 0.39055 + txt003 +STRI + V0 2.3875 0 1.8 V1 2.40972 0.189583 1.77361 V2 2.29012 0.23071 1.57202 + N0 -0.920582 -2.76813e-16 0.39055 N1 -0.835237 0.363942 0.412221 N2 -0.64585 0.390219 0.656206 + txt003 +STRI + V0 2.6875 0 1.44375 V1 2.66528 0.189583 1.47014 V2 2.7716 0.148457 1.83128 + N0 0.957826 0 -0.287348 N1 0.913262 0.329186 -0.239977 N2 0.880144 0.401503 -0.253261 + txt003 +STRI + V0 2.7716 0.148457 1.83128 V1 2.7963 0 1.81667 V2 2.6875 0 1.44375 + N0 0.880144 0.401503 -0.253261 N1 0.947588 0 -0.319493 N2 0.957826 0 -0.287348 + txt003 +STRI + V0 2.66528 0.189583 1.47014 V1 2.60972 0.303333 1.53611 V2 2.70988 0.237531 1.8678 + N0 0.913262 0.329186 -0.239977 N1 0.705424 0.704198 -0.0805066 N2 0.60461 0.794635 -0.0547983 + txt003 +STRI + V0 2.70988 0.237531 1.8678 V1 2.7716 0.148457 1.83128 V2 2.66528 0.189583 1.47014 + N0 0.60461 0.794635 -0.0547983 N1 0.880144 0.401503 -0.253261 N2 0.913262 0.329186 -0.239977 + txt003 +STRI + V0 2.60972 0.303333 1.53611 V1 2.5375 0.34125 1.62188 V2 2.62963 0.267222 1.91528 + N0 0.705424 0.704198 -0.0805066 N1 0.214084 0.960035 0.180281 N2 0.113546 0.974822 0.191909 + txt003 +STRI + V0 2.62963 0.267222 1.91528 V1 2.70988 0.237531 1.8678 V2 2.60972 0.303333 1.53611 + N0 0.113546 0.974822 0.191909 N1 0.60461 0.794635 -0.0547983 N2 0.705424 0.704198 -0.0805066 + txt003 +STRI + V0 2.5375 0.34125 1.62188 V1 2.46528 0.303333 1.70764 V2 2.54938 0.237531 1.96276 + N0 0.214084 0.960035 0.180281 N1 -0.451323 0.803033 0.38916 N2 -0.452673 0.821162 0.347535 + txt003 +STRI + V0 2.54938 0.237531 1.96276 V1 2.62963 0.267222 1.91528 V2 2.5375 0.34125 1.62188 + N0 -0.452673 0.821162 0.347535 N1 0.113546 0.974822 0.191909 N2 0.214084 0.960035 0.180281 + txt003 +STRI + V0 2.46528 0.303333 1.70764 V1 2.40972 0.189583 1.77361 V2 2.48765 0.148457 1.99928 + N0 -0.451323 0.803033 0.38916 N1 -0.835237 0.363942 0.412221 N2 -0.842821 0.409176 0.34961 + txt003 +STRI + V0 2.48765 0.148457 1.99928 V1 2.54938 0.237531 1.96276 V2 2.46528 0.303333 1.70764 + N0 -0.842821 0.409176 0.34961 N1 -0.452673 0.821162 0.347535 N2 -0.451323 0.803033 0.38916 + txt003 +STRI + V0 2.40972 0.189583 1.77361 V1 2.3875 0 1.8 V2 2.46296 0 2.01389 + N0 -0.835237 0.363942 0.412221 N1 -0.920582 -2.76813e-16 0.39055 N2 -0.948683 -4.59839e-16 0.316228 + txt003 +STRI + V0 2.46296 0 2.01389 V1 2.48765 0.148457 1.99928 V2 2.40972 0.189583 1.77361 + N0 -0.948683 -4.59839e-16 0.316228 N1 -0.842821 0.409176 0.34961 N2 -0.835237 0.363942 0.412221 + txt003 +STRI + V0 2.7963 0 1.81667 V1 2.7716 0.148457 1.83128 V2 2.93534 0.116821 2.15738 + N0 0.947588 0 -0.319493 N1 0.880144 0.401503 -0.253261 N2 0.70819 0.492319 -0.506053 + txt003 +STRI + V0 2.93534 0.116821 2.15738 V1 2.9662 0 2.15208 V2 2.7963 0 1.81667 + N0 0.70819 0.492319 -0.506053 N1 0.787582 0 -0.61621 N2 0.947588 0 -0.319493 + txt003 +STRI + V0 2.7716 0.148457 1.83128 V1 2.70988 0.237531 1.8678 V2 2.85818 0.186914 2.17063 + N0 0.880144 0.401503 -0.253261 N1 0.60461 0.794635 -0.0547983 N2 0.417243 0.88974 -0.185122 + txt003 +STRI + V0 2.85818 0.186914 2.17063 V1 2.93534 0.116821 2.15738 V2 2.7716 0.148457 1.83128 + N0 0.417243 0.88974 -0.185122 N1 0.70819 0.492319 -0.506053 N2 0.880144 0.401503 -0.253261 + txt003 +STRI + V0 2.70988 0.237531 1.8678 V1 2.62963 0.267222 1.91528 V2 2.75787 0.210278 2.18785 + N0 0.60461 0.794635 -0.0547983 N1 0.113546 0.974822 0.191909 N2 0.0260102 0.988113 0.151516 + txt003 +STRI + V0 2.75787 0.210278 2.18785 V1 2.85818 0.186914 2.17063 V2 2.70988 0.237531 1.8678 + N0 0.0260102 0.988113 0.151516 N1 0.417243 0.88974 -0.185122 N2 0.60461 0.794635 -0.0547983 + txt003 +STRI + V0 2.62963 0.267222 1.91528 V1 2.54938 0.237531 1.96276 V2 2.65756 0.186914 2.20507 + N0 0.113546 0.974822 0.191909 N1 -0.452673 0.821162 0.347535 N2 -0.365378 0.851743 0.375544 + txt003 +STRI + V0 2.65756 0.186914 2.20507 V1 2.75787 0.210278 2.18785 V2 2.62963 0.267222 1.91528 + N0 -0.365378 0.851743 0.375544 N1 0.0260102 0.988113 0.151516 N2 0.113546 0.974822 0.191909 + txt003 +STRI + V0 2.54938 0.237531 1.96276 V1 2.48765 0.148457 1.99928 V2 2.5804 0.116821 2.21831 + N0 -0.452673 0.821162 0.347535 N1 -0.842821 0.409176 0.34961 N2 -0.723795 0.498863 0.476715 + txt003 +STRI + V0 2.5804 0.116821 2.21831 V1 2.65756 0.186914 2.20507 V2 2.54938 0.237531 1.96276 + N0 -0.723795 0.498863 0.476715 N1 -0.365378 0.851743 0.375544 N2 -0.452673 0.821162 0.347535 + txt003 +STRI + V0 2.48765 0.148457 1.99928 V1 2.46296 0 2.01389 V2 2.54954 0 2.22361 + N0 -0.842821 0.409176 0.34961 N1 -0.948683 -4.59839e-16 0.316228 N2 -0.874591 -1.30753e-15 0.484861 + txt003 +STRI + V0 2.54954 0 2.22361 V1 2.5804 0.116821 2.21831 V2 2.48765 0.148457 1.99928 + N0 -0.874591 -1.30753e-15 0.484861 N1 -0.723795 0.498863 0.476715 N2 -0.842821 0.409176 0.34961 + txt003 +STRI + V0 2.9662 0 2.15208 V1 2.93534 0.116821 2.15738 V2 3.25556 0.104167 2.4 + N0 0.787582 0 -0.61621 N1 0.70819 0.492319 -0.506053 N2 0.366221 0.366221 -0.855433 + txt003 +STRI + V0 3.25556 0.104167 2.4 V1 3.3 0 2.4 V2 2.9662 0 2.15208 + N0 0.366221 0.366221 -0.855433 N1 0.384615 0 -0.923077 N2 0.787582 0 -0.61621 + txt003 +STRI + V0 2.93534 0.116821 2.15738 V1 2.85818 0.186914 2.17063 V2 3.14444 0.166667 2.4 + N0 0.70819 0.492319 -0.506053 N1 0.417243 0.88974 -0.185122 N2 0.250514 0.801644 -0.54278 + txt003 +STRI + V0 3.14444 0.166667 2.4 V1 3.25556 0.104167 2.4 V2 2.93534 0.116821 2.15738 + N0 0.250514 0.801644 -0.54278 N1 0.366221 0.366221 -0.855433 N2 0.70819 0.492319 -0.506053 + txt003 +STRI + V0 2.85818 0.186914 2.17063 V1 2.75787 0.210278 2.18785 V2 3 0.1875 2.4 + N0 0.417243 0.88974 -0.185122 N1 0.0260102 0.988113 0.151516 N2 4.05793e-32 1 2.19303e-16 + txt003 +STRI + V0 3 0.1875 2.4 V1 3.14444 0.166667 2.4 V2 2.85818 0.186914 2.17063 + N0 4.05793e-32 1 2.19303e-16 N1 0.250514 0.801644 -0.54278 N2 0.417243 0.88974 -0.185122 + txt003 +STRI + V0 2.75787 0.210278 2.18785 V1 2.65756 0.186914 2.20507 V2 2.85556 0.166667 2.4 + N0 0.0260102 0.988113 0.151516 N1 -0.365378 0.851743 0.375544 N2 -0.267368 0.855576 0.443288 + txt003 +STRI + V0 2.85556 0.166667 2.4 V1 3 0.1875 2.4 V2 2.75787 0.210278 2.18785 + N0 -0.267368 0.855576 0.443288 N1 4.05793e-32 1 2.19303e-16 N2 0.0260102 0.988113 0.151516 + txt003 +STRI + V0 2.65756 0.186914 2.20507 V1 2.5804 0.116821 2.21831 V2 2.74444 0.104167 2.4 + N0 -0.365378 0.851743 0.375544 N1 -0.723795 0.498863 0.476715 N2 -0.497164 0.497164 0.711095 + txt003 +STRI + V0 2.74444 0.104167 2.4 V1 2.85556 0.166667 2.4 V2 2.65756 0.186914 2.20507 + N0 -0.497164 0.497164 0.711095 N1 -0.267368 0.855576 0.443288 N2 -0.365378 0.851743 0.375544 + txt003 +STRI + V0 2.5804 0.116821 2.21831 V1 2.54954 0 2.22361 V2 2.7 0 2.4 + N0 -0.723795 0.498863 0.476715 N1 -0.874591 -1.30753e-15 0.484861 N2 -0.6 -3.55271e-15 0.8 + txt003 +STRI + V0 2.7 0 2.4 V1 2.74444 0.104167 2.4 V2 2.5804 0.116821 2.21831 + N0 -0.6 -3.55271e-15 0.8 N1 -0.497164 0.497164 0.711095 N2 -0.723795 0.498863 0.476715 + txt003 +STRI + V0 2.7 0 2.4 V1 2.74444 -0.104167 2.4 V2 2.79641 -0.10108 2.43193 + N0 -0.6 0 0.8 N1 -0.497164 -0.497164 0.711095 N2 -0.387052 -0.411886 0.824949 + txt003 +STRI + V0 2.79641 -0.10108 2.43193 V1 2.74907 0 2.43125 V2 2.7 0 2.4 + N0 -0.387052 -0.411886 0.824949 N1 -0.467888 0 0.883788 N2 -0.6 0 0.8 + txt003 +STRI + V0 2.74444 -0.104167 2.4 V1 2.85556 -0.166667 2.4 V2 2.91474 -0.161728 2.43361 + N0 -0.497164 -0.497164 0.711095 N1 -0.267368 -0.855576 0.443288 N2 -0.215548 -0.724209 0.655027 + txt003 +STRI + V0 2.91474 -0.161728 2.43361 V1 2.79641 -0.10108 2.43193 V2 2.74444 -0.104167 2.4 + N0 -0.215548 -0.724209 0.655027 N1 -0.387052 -0.411886 0.824949 N2 -0.497164 -0.497164 0.711095 + txt003 +STRI + V0 2.85556 -0.166667 2.4 V1 3 -0.1875 2.4 V2 3.06858 -0.181944 2.43581 + N0 -0.267368 -0.855576 0.443288 N1 0 -1 0 N2 -0.00489618 -0.939227 0.343261 + txt003 +STRI + V0 3.06858 -0.181944 2.43581 V1 2.91474 -0.161728 2.43361 V2 2.85556 -0.166667 2.4 + N0 -0.00489618 -0.939227 0.343261 N1 -0.215548 -0.724209 0.655027 N2 -0.267368 -0.855576 0.443288 + txt003 +STRI + V0 3 -0.1875 2.4 V1 3.14444 -0.166667 2.4 V2 3.22241 -0.161728 2.438 + N0 0 -1 0 N1 0.250514 -0.801644 -0.54278 N2 0.269127 -0.933284 -0.237808 + txt003 +STRI + V0 3.22241 -0.161728 2.438 V1 3.06858 -0.181944 2.43581 V2 3 -0.1875 2.4 + N0 0.269127 -0.933284 -0.237808 N1 -0.00489618 -0.939227 0.343261 N2 0 -1 0 + txt003 +STRI + V0 3.14444 -0.166667 2.4 V1 3.25556 -0.104167 2.4 V2 3.34075 -0.10108 2.43969 + N0 0.250514 -0.801644 -0.54278 N1 0.366221 -0.366221 -0.855433 N2 0.442187 -0.473386 -0.761824 + txt003 +STRI + V0 3.34075 -0.10108 2.43969 V1 3.22241 -0.161728 2.438 V2 3.14444 -0.166667 2.4 + N0 0.442187 -0.473386 -0.761824 N1 0.269127 -0.933284 -0.237808 N2 0.250514 -0.801644 -0.54278 + txt003 +STRI + V0 3.25556 -0.104167 2.4 V1 3.3 0 2.4 V2 3.38808 0 2.44036 + N0 0.366221 -0.366221 -0.855433 N1 0.384615 -2.55067e-15 -0.923077 N2 0.463425 -2.75328e-15 -0.886136 + txt003 +STRI + V0 3.38808 0 2.44036 V1 3.34075 -0.10108 2.43969 V2 3.25556 -0.104167 2.4 + N0 0.463425 -2.75328e-15 -0.886136 N1 0.442187 -0.473386 -0.761824 N2 0.366221 -0.366221 -0.855433 + txt003 +STRI + V0 2.74907 0 2.43125 V1 2.79641 -0.10108 2.43193 V2 2.83978 -0.0933642 2.45123 + N0 -0.467888 0 0.883788 N1 -0.387052 -0.411886 0.824949 N2 -0.253997 -0.272114 0.928138 + txt003 +STRI + V0 2.83978 -0.0933642 2.45123 V1 2.79259 0 2.45 V2 2.74907 0 2.43125 + N0 -0.253997 -0.272114 0.928138 N1 -0.306009 0 0.952029 N2 -0.467888 0 0.883788 + txt003 +STRI + V0 2.79641 -0.10108 2.43193 V1 2.91474 -0.161728 2.43361 V2 2.95775 -0.149383 2.45432 + N0 -0.387052 -0.411886 0.824949 N1 -0.215548 -0.724209 0.655027 N2 -0.14959 -0.481391 0.863647 + txt003 +STRI + V0 2.95775 -0.149383 2.45432 V1 2.83978 -0.0933642 2.45123 V2 2.79641 -0.10108 2.43193 + N0 -0.14959 -0.481391 0.863647 N1 -0.253997 -0.272114 0.928138 N2 -0.387052 -0.411886 0.824949 + txt003 +STRI + V0 2.91474 -0.161728 2.43361 V1 3.06858 -0.181944 2.43581 V2 3.11111 -0.168056 2.45833 + N0 -0.215548 -0.724209 0.655027 N1 -0.00489618 -0.939227 0.343261 N2 -0.0195232 -0.665415 0.746219 + txt003 +STRI + V0 3.11111 -0.168056 2.45833 V1 2.95775 -0.149383 2.45432 V2 2.91474 -0.161728 2.43361 + N0 -0.0195232 -0.665415 0.746219 N1 -0.14959 -0.481391 0.863647 N2 -0.215548 -0.724209 0.655027 + txt003 +STRI + V0 3.06858 -0.181944 2.43581 V1 3.22241 -0.161728 2.438 V2 3.26447 -0.149383 2.46235 + N0 -0.00489618 -0.939227 0.343261 N1 0.269127 -0.933284 -0.237808 N2 0.218115 -0.87054 0.44112 + txt003 +STRI + V0 3.26447 -0.149383 2.46235 V1 3.11111 -0.168056 2.45833 V2 3.06858 -0.181944 2.43581 + N0 0.218115 -0.87054 0.44112 N1 -0.0195232 -0.665415 0.746219 N2 -0.00489618 -0.939227 0.343261 + txt003 +STRI + V0 3.22241 -0.161728 2.438 V1 3.34075 -0.10108 2.43969 V2 3.38244 -0.0933642 2.46543 + N0 0.269127 -0.933284 -0.237808 N1 0.442187 -0.473386 -0.761824 N2 0.612385 -0.714958 -0.337372 + txt003 +STRI + V0 3.38244 -0.0933642 2.46543 V1 3.26447 -0.149383 2.46235 V2 3.22241 -0.161728 2.438 + N0 0.612385 -0.714958 -0.337372 N1 0.218115 -0.87054 0.44112 N2 0.269127 -0.933284 -0.237808 + txt003 +STRI + V0 3.34075 -0.10108 2.43969 V1 3.38808 0 2.44036 V2 3.42963 0 2.46667 + N0 0.442187 -0.473386 -0.761824 N1 0.463425 -2.75328e-15 -0.886136 N2 0.694136 -3.24605e-15 -0.719844 + txt003 +STRI + V0 3.42963 0 2.46667 V1 3.38244 -0.0933642 2.46543 V2 3.34075 -0.10108 2.43969 + N0 0.694136 -3.24605e-15 -0.719844 N1 0.612385 -0.714958 -0.337372 N2 0.442187 -0.473386 -0.761824 + txt003 +STRI + V0 2.79259 0 2.45 V1 2.83978 -0.0933642 2.45123 V2 2.86968 -0.0833333 2.45781 + N0 -0.306009 0 0.952029 N1 -0.253997 -0.272114 0.928138 N2 -0.0182321 0.0210195 0.999613 + txt003 +STRI + V0 2.86968 -0.0833333 2.45781 V1 2.825 0 2.45625 V2 2.79259 0 2.45 + N0 -0.0182321 0.0210195 0.999613 N1 2.22045e-15 0 1 N2 -0.306009 0 0.952029 + txt003 +STRI + V0 2.83978 -0.0933642 2.45123 V1 2.95775 -0.149383 2.45432 V2 2.98137 -0.133333 2.46172 + N0 -0.253997 -0.272114 0.928138 N1 -0.14959 -0.481391 0.863647 N2 -0.0369301 -0.00796532 0.999286 + txt003 +STRI + V0 2.98137 -0.133333 2.46172 V1 2.86968 -0.0833333 2.45781 V2 2.83978 -0.0933642 2.45123 + N0 -0.0369301 -0.00796532 0.999286 N1 -0.0182321 0.0210195 0.999613 N2 -0.253997 -0.272114 0.928138 + txt003 +STRI + V0 2.95775 -0.149383 2.45432 V1 3.11111 -0.168056 2.45833 V2 3.12656 -0.15 2.4668 + N0 -0.14959 -0.481391 0.863647 N1 -0.0195232 -0.665415 0.746219 N2 -0.0348909 -0.0594438 0.997622 + txt003 +STRI + V0 3.12656 -0.15 2.4668 V1 2.98137 -0.133333 2.46172 V2 2.95775 -0.149383 2.45432 + N0 -0.0348909 -0.0594438 0.997622 N1 -0.0369301 -0.00796532 0.999286 N2 -0.14959 -0.481391 0.863647 + txt003 +STRI + V0 3.11111 -0.168056 2.45833 V1 3.26447 -0.149383 2.46235 V2 3.27176 -0.133333 2.47187 + N0 -0.0195232 -0.665415 0.746219 N1 0.218115 -0.87054 0.44112 N2 -0.00787186 -0.108144 0.994104 + txt003 +STRI + V0 3.27176 -0.133333 2.47187 V1 3.12656 -0.15 2.4668 V2 3.11111 -0.168056 2.45833 + N0 -0.00787186 -0.108144 0.994104 N1 -0.0348909 -0.0594438 0.997622 N2 -0.0195232 -0.665415 0.746219 + txt003 +STRI + V0 3.26447 -0.149383 2.46235 V1 3.38244 -0.0933642 2.46543 V2 3.38345 -0.0833333 2.47578 + N0 0.218115 -0.87054 0.44112 N1 0.612385 -0.714958 -0.337372 N2 0.0539577 -0.111406 0.992309 + txt003 +STRI + V0 3.38345 -0.0833333 2.47578 V1 3.27176 -0.133333 2.47187 V2 3.26447 -0.149383 2.46235 + N0 0.0539577 -0.111406 0.992309 N1 -0.00787186 -0.108144 0.994104 N2 0.218115 -0.87054 0.44112 + txt003 +STRI + V0 3.38244 -0.0933642 2.46543 V1 3.42963 0 2.46667 V2 3.42813 0 2.47734 + N0 0.612385 -0.714958 -0.337372 N1 0.694136 -3.24605e-15 -0.719844 N2 0.106533 1.89241e-15 0.994309 + txt003 +STRI + V0 3.42813 0 2.47734 V1 3.38345 -0.0833333 2.47578 V2 3.38244 -0.0933642 2.46543 + N0 0.106533 1.89241e-15 0.994309 N1 0.0539577 -0.111406 0.992309 N2 0.612385 -0.714958 -0.337372 + txt003 +STRI + V0 2.825 0 2.45625 V1 2.86968 -0.0833333 2.45781 V2 2.88121 -0.0733025 2.45154 + N0 2.22045e-15 0 1 N1 -0.0182321 0.0210195 0.999613 N2 0.507715 0.682832 0.525324 + txt003 +STRI + V0 2.88121 -0.0733025 2.45154 V1 2.84074 0 2.45 V2 2.825 0 2.45625 + N0 0.507715 0.682832 0.525324 N1 0.913812 0 0.406138 N2 2.22045e-15 0 1 + txt003 +STRI + V0 2.86968 -0.0833333 2.45781 V1 2.98137 -0.133333 2.46172 V2 2.98237 -0.117284 2.4554 + N0 -0.0182321 0.0210195 0.999613 N1 -0.0369301 -0.00796532 0.999286 N2 0.148477 0.721529 0.676277 + txt003 +STRI + V0 2.98237 -0.117284 2.4554 V1 2.88121 -0.0733025 2.45154 V2 2.86968 -0.0833333 2.45781 + N0 0.148477 0.721529 0.676277 N1 0.507715 0.682832 0.525324 N2 -0.0182321 0.0210195 0.999613 + txt003 +STRI + V0 2.98137 -0.133333 2.46172 V1 3.12656 -0.15 2.4668 V2 3.11389 -0.131944 2.46042 + N0 -0.0369301 -0.00796532 0.999286 N1 -0.0348909 -0.0594438 0.997622 N2 -0.0300305 0.615625 0.787467 + txt003 +STRI + V0 3.11389 -0.131944 2.46042 V1 2.98237 -0.117284 2.4554 V2 2.98137 -0.133333 2.46172 + N0 -0.0300305 0.615625 0.787467 N1 0.148477 0.721529 0.676277 N2 -0.0369301 -0.00796532 0.999286 + txt003 +STRI + V0 3.12656 -0.15 2.4668 V1 3.27176 -0.133333 2.47187 V2 3.2454 -0.117284 2.46543 + N0 -0.0348909 -0.0594438 0.997622 N1 -0.00787186 -0.108144 0.994104 N2 -0.144371 0.459364 0.876437 + txt003 +STRI + V0 3.2454 -0.117284 2.46543 V1 3.11389 -0.131944 2.46042 V2 3.12656 -0.15 2.4668 + N0 -0.144371 0.459364 0.876437 N1 -0.0300305 0.615625 0.787467 N2 -0.0348909 -0.0594438 0.997622 + txt003 +STRI + V0 3.27176 -0.133333 2.47187 V1 3.38345 -0.0833333 2.47578 V2 3.34657 -0.0733025 2.46929 + N0 -0.00787186 -0.108144 0.994104 N1 0.0539577 -0.111406 0.992309 N2 -0.223743 0.242919 0.943891 + txt003 +STRI + V0 3.34657 -0.0733025 2.46929 V1 3.2454 -0.117284 2.46543 V2 3.27176 -0.133333 2.47187 + N0 -0.223743 0.242919 0.943891 N1 -0.144371 0.459364 0.876437 N2 -0.00787186 -0.108144 0.994104 + txt003 +STRI + V0 3.38345 -0.0833333 2.47578 V1 3.42813 0 2.47734 V2 3.38704 0 2.47083 + N0 0.0539577 -0.111406 0.992309 N1 0.106533 1.89241e-15 0.994309 N2 -0.253109 3.19224e-15 0.967438 + txt003 +STRI + V0 3.38704 0 2.47083 V1 3.34657 -0.0733025 2.46929 V2 3.38345 -0.0833333 2.47578 + N0 -0.253109 3.19224e-15 0.967438 N1 -0.223743 0.242919 0.943891 N2 0.0539577 -0.111406 0.992309 + txt003 +STRI + V0 2.84074 0 2.45 V1 2.88121 -0.0733025 2.45154 V2 2.86949 -0.0655864 2.43231 + N0 0.913812 0 0.406138 N1 0.507715 0.682832 0.525324 N2 0.577416 0.711734 -0.400031 + txt003 +STRI + V0 2.86949 -0.0655864 2.43231 V1 2.83426 0 2.43125 V2 2.84074 0 2.45 + N0 0.577416 0.711734 -0.400031 N1 0.789352 0 -0.613941 N2 0.913812 0 0.406138 + txt003 +STRI + V0 2.88121 -0.0733025 2.45154 V1 2.98237 -0.117284 2.4554 V2 2.95756 -0.104938 2.43496 + N0 0.507715 0.682832 0.525324 N1 0.148477 0.721529 0.676277 N2 0.241288 0.970358 -0.0136399 + txt003 +STRI + V0 2.95756 -0.104938 2.43496 V1 2.86949 -0.0655864 2.43231 V2 2.88121 -0.0733025 2.45154 + N0 0.241288 0.970358 -0.0136399 N1 0.577416 0.711734 -0.400031 N2 0.507715 0.682832 0.525324 + txt003 +STRI + V0 2.98237 -0.117284 2.4554 V1 3.11389 -0.131944 2.46042 V2 3.07205 -0.118056 2.43841 + N0 0.148477 0.721529 0.676277 N1 -0.0300305 0.615625 0.787467 N2 -0.0103804 0.938666 0.344672 + txt003 +STRI + V0 3.07205 -0.118056 2.43841 V1 2.95756 -0.104938 2.43496 V2 2.98237 -0.117284 2.4554 + N0 -0.0103804 0.938666 0.344672 N1 0.241288 0.970358 -0.0136399 N2 0.148477 0.721529 0.676277 + txt003 +STRI + V0 3.11389 -0.131944 2.46042 V1 3.2454 -0.117284 2.46543 V2 3.18654 -0.104938 2.44186 + N0 -0.0300305 0.615625 0.787467 N1 -0.144371 0.459364 0.876437 N2 -0.199105 0.721639 0.663019 + txt003 +STRI + V0 3.18654 -0.104938 2.44186 V1 3.07205 -0.118056 2.43841 V2 3.11389 -0.131944 2.46042 + N0 -0.199105 0.721639 0.663019 N1 -0.0103804 0.938666 0.344672 N2 -0.0300305 0.615625 0.787467 + txt003 +STRI + V0 3.2454 -0.117284 2.46543 V1 3.34657 -0.0733025 2.46929 V2 3.27461 -0.0655864 2.44451 + N0 -0.144371 0.459364 0.876437 N1 -0.223743 0.242919 0.943891 N2 -0.316294 0.364979 0.875641 + txt003 +STRI + V0 3.27461 -0.0655864 2.44451 V1 3.18654 -0.104938 2.44186 V2 3.2454 -0.117284 2.46543 + N0 -0.316294 0.364979 0.875641 N1 -0.199105 0.721639 0.663019 N2 -0.144371 0.459364 0.876437 + txt003 +STRI + V0 3.34657 -0.0733025 2.46929 V1 3.38704 0 2.47083 V2 3.30984 0 2.44557 + N0 -0.223743 0.242919 0.943891 N1 -0.253109 3.19224e-15 0.967438 N2 -0.349987 4.0695e-15 0.936755 + txt003 +STRI + V0 3.30984 0 2.44557 V1 3.27461 -0.0655864 2.44451 V2 3.34657 -0.0733025 2.46929 + N0 -0.349987 4.0695e-15 0.936755 N1 -0.316294 0.364979 0.875641 N2 -0.223743 0.242919 0.943891 + txt003 +STRI + V0 2.83426 0 2.43125 V1 2.86949 -0.0655864 2.43231 V2 2.82963 -0.0625 2.4 + N0 0.789352 0 -0.613941 N1 0.577416 0.711734 -0.400031 N2 0.483629 0.537366 -0.690899 + txt003 +STRI + V0 2.82963 -0.0625 2.4 V1 2.8 0 2.4 V2 2.83426 0 2.43125 + N0 0.483629 0.537366 -0.690899 N1 0.6 0 -0.8 N2 0.789352 0 -0.613941 + txt003 +STRI + V0 2.86949 -0.0655864 2.43231 V1 2.95756 -0.104938 2.43496 V2 2.9037 -0.1 2.4 + N0 0.577416 0.711734 -0.400031 N1 0.241288 0.970358 -0.0136399 N2 0.247465 0.879877 -0.405681 + txt003 +STRI + V0 2.9037 -0.1 2.4 V1 2.82963 -0.0625 2.4 V2 2.86949 -0.0655864 2.43231 + N0 0.247465 0.879877 -0.405681 N1 0.483629 0.537366 -0.690899 N2 0.577416 0.711734 -0.400031 + txt003 +STRI + V0 2.95756 -0.104938 2.43496 V1 3.07205 -0.118056 2.43841 V2 3 -0.1125 2.4 + N0 0.241288 0.970358 -0.0136399 N1 -0.0103804 0.938666 0.344672 N2 0 1 0 + txt003 +STRI + V0 3 -0.1125 2.4 V1 2.9037 -0.1 2.4 V2 2.95756 -0.104938 2.43496 + N0 0 1 0 N1 0.247465 0.879877 -0.405681 N2 0.241288 0.970358 -0.0136399 + txt003 +STRI + V0 3.07205 -0.118056 2.43841 V1 3.18654 -0.104938 2.44186 V2 3.0963 -0.1 2.4 + N0 -0.0103804 0.938666 0.344672 N1 -0.199105 0.721639 0.663019 N2 -0.236617 0.841304 0.486024 + txt003 +STRI + V0 3.0963 -0.1 2.4 V1 3 -0.1125 2.4 V2 3.07205 -0.118056 2.43841 + N0 -0.236617 0.841304 0.486024 N1 0 1 0 N2 -0.0103804 0.938666 0.344672 + txt003 +STRI + V0 3.18654 -0.104938 2.44186 V1 3.27461 -0.0655864 2.44451 V2 3.17037 -0.0625 2.4 + N0 -0.199105 0.721639 0.663019 N1 -0.316294 0.364979 0.875641 N2 -0.378646 0.420717 0.824393 + txt003 +STRI + V0 3.17037 -0.0625 2.4 V1 3.0963 -0.1 2.4 V2 3.18654 -0.104938 2.44186 + N0 -0.378646 0.420717 0.824393 N1 -0.236617 0.841304 0.486024 N2 -0.199105 0.721639 0.663019 + txt003 +STRI + V0 3.27461 -0.0655864 2.44451 V1 3.30984 0 2.44557 V2 3.2 0 2.4 + N0 -0.316294 0.364979 0.875641 N1 -0.349987 4.0695e-15 0.936755 N2 -0.410365 4.31973e-15 0.911922 + txt003 +STRI + V0 3.2 0 2.4 V1 3.17037 -0.0625 2.4 V2 3.27461 -0.0655864 2.44451 + N0 -0.410365 4.31973e-15 0.911922 N1 -0.378646 0.420717 0.824393 N2 -0.316294 0.364979 0.875641 + txt003 +STRI + V0 3.3 0 2.4 V1 3.25556 0.104167 2.4 V2 3.34075 0.10108 2.43969 + N0 0.384615 0 -0.923077 N1 0.366221 0.366221 -0.855433 N2 0.442187 0.473386 -0.761824 + txt003 +STRI + V0 3.34075 0.10108 2.43969 V1 3.38808 0 2.44036 V2 3.3 0 2.4 + N0 0.442187 0.473386 -0.761824 N1 0.463425 0 -0.886136 N2 0.384615 0 -0.923077 + txt003 +STRI + V0 3.25556 0.104167 2.4 V1 3.14444 0.166667 2.4 V2 3.22241 0.161728 2.438 + N0 0.366221 0.366221 -0.855433 N1 0.250514 0.801644 -0.54278 N2 0.269127 0.933284 -0.237808 + txt003 +STRI + V0 3.22241 0.161728 2.438 V1 3.34075 0.10108 2.43969 V2 3.25556 0.104167 2.4 + N0 0.269127 0.933284 -0.237808 N1 0.442187 0.473386 -0.761824 N2 0.366221 0.366221 -0.855433 + txt003 +STRI + V0 3.14444 0.166667 2.4 V1 3 0.1875 2.4 V2 3.06858 0.181944 2.43581 + N0 0.250514 0.801644 -0.54278 N1 0 1 -0 N2 -0.00489618 0.939227 0.343261 + txt003 +STRI + V0 3.06858 0.181944 2.43581 V1 3.22241 0.161728 2.438 V2 3.14444 0.166667 2.4 + N0 -0.00489618 0.939227 0.343261 N1 0.269127 0.933284 -0.237808 N2 0.250514 0.801644 -0.54278 + txt003 +STRI + V0 3 0.1875 2.4 V1 2.85556 0.166667 2.4 V2 2.91474 0.161728 2.43361 + N0 0 1 -0 N1 -0.267368 0.855576 0.443288 N2 -0.215548 0.724209 0.655027 + txt003 +STRI + V0 2.91474 0.161728 2.43361 V1 3.06858 0.181944 2.43581 V2 3 0.1875 2.4 + N0 -0.215548 0.724209 0.655027 N1 -0.00489618 0.939227 0.343261 N2 0 1 -0 + txt003 +STRI + V0 2.85556 0.166667 2.4 V1 2.74444 0.104167 2.4 V2 2.79641 0.10108 2.43193 + N0 -0.267368 0.855576 0.443288 N1 -0.497164 0.497164 0.711095 N2 -0.387052 0.411886 0.824949 + txt003 +STRI + V0 2.79641 0.10108 2.43193 V1 2.91474 0.161728 2.43361 V2 2.85556 0.166667 2.4 + N0 -0.387052 0.411886 0.824949 N1 -0.215548 0.724209 0.655027 N2 -0.267368 0.855576 0.443288 + txt003 +STRI + V0 2.74444 0.104167 2.4 V1 2.7 0 2.4 V2 2.74907 0 2.43125 + N0 -0.497164 0.497164 0.711095 N1 -0.6 2.24387e-29 0.8 N2 -0.467888 -4.75841e-16 0.883788 + txt003 +STRI + V0 2.74907 0 2.43125 V1 2.79641 0.10108 2.43193 V2 2.74444 0.104167 2.4 + N0 -0.467888 -4.75841e-16 0.883788 N1 -0.387052 0.411886 0.824949 N2 -0.497164 0.497164 0.711095 + txt003 +STRI + V0 3.38808 0 2.44036 V1 3.34075 0.10108 2.43969 V2 3.38244 0.0933642 2.46543 + N0 0.463425 0 -0.886136 N1 0.442187 0.473386 -0.761824 N2 0.612385 0.714958 -0.337372 + txt003 +STRI + V0 3.38244 0.0933642 2.46543 V1 3.42963 0 2.46667 V2 3.38808 0 2.44036 + N0 0.612385 0.714958 -0.337372 N1 0.694136 0 -0.719844 N2 0.463425 0 -0.886136 + txt003 +STRI + V0 3.34075 0.10108 2.43969 V1 3.22241 0.161728 2.438 V2 3.26447 0.149383 2.46235 + N0 0.442187 0.473386 -0.761824 N1 0.269127 0.933284 -0.237808 N2 0.218115 0.87054 0.44112 + txt003 +STRI + V0 3.26447 0.149383 2.46235 V1 3.38244 0.0933642 2.46543 V2 3.34075 0.10108 2.43969 + N0 0.218115 0.87054 0.44112 N1 0.612385 0.714958 -0.337372 N2 0.442187 0.473386 -0.761824 + txt003 +STRI + V0 3.22241 0.161728 2.438 V1 3.06858 0.181944 2.43581 V2 3.11111 0.168056 2.45833 + N0 0.269127 0.933284 -0.237808 N1 -0.00489618 0.939227 0.343261 N2 -0.0195232 0.665415 0.746219 + txt003 +STRI + V0 3.11111 0.168056 2.45833 V1 3.26447 0.149383 2.46235 V2 3.22241 0.161728 2.438 + N0 -0.0195232 0.665415 0.746219 N1 0.218115 0.87054 0.44112 N2 0.269127 0.933284 -0.237808 + txt003 +STRI + V0 3.06858 0.181944 2.43581 V1 2.91474 0.161728 2.43361 V2 2.95775 0.149383 2.45432 + N0 -0.00489618 0.939227 0.343261 N1 -0.215548 0.724209 0.655027 N2 -0.14959 0.481391 0.863647 + txt003 +STRI + V0 2.95775 0.149383 2.45432 V1 3.11111 0.168056 2.45833 V2 3.06858 0.181944 2.43581 + N0 -0.14959 0.481391 0.863647 N1 -0.0195232 0.665415 0.746219 N2 -0.00489618 0.939227 0.343261 + txt003 +STRI + V0 2.91474 0.161728 2.43361 V1 2.79641 0.10108 2.43193 V2 2.83978 0.0933642 2.45123 + N0 -0.215548 0.724209 0.655027 N1 -0.387052 0.411886 0.824949 N2 -0.253997 0.272114 0.928138 + txt003 +STRI + V0 2.83978 0.0933642 2.45123 V1 2.95775 0.149383 2.45432 V2 2.91474 0.161728 2.43361 + N0 -0.253997 0.272114 0.928138 N1 -0.14959 0.481391 0.863647 N2 -0.215548 0.724209 0.655027 + txt003 +STRI + V0 2.79641 0.10108 2.43193 V1 2.74907 0 2.43125 V2 2.79259 0 2.45 + N0 -0.387052 0.411886 0.824949 N1 -0.467888 -4.75841e-16 0.883788 N2 -0.306009 -1.09783e-15 0.952029 + txt003 +STRI + V0 2.79259 0 2.45 V1 2.83978 0.0933642 2.45123 V2 2.79641 0.10108 2.43193 + N0 -0.306009 -1.09783e-15 0.952029 N1 -0.253997 0.272114 0.928138 N2 -0.387052 0.411886 0.824949 + txt003 +STRI + V0 3.42963 0 2.46667 V1 3.38244 0.0933642 2.46543 V2 3.38345 0.0833333 2.47578 + N0 0.694136 0 -0.719844 N1 0.612385 0.714958 -0.337372 N2 0.0539577 0.111406 0.992309 + txt003 +STRI + V0 3.38345 0.0833333 2.47578 V1 3.42813 0 2.47734 V2 3.42963 0 2.46667 + N0 0.0539577 0.111406 0.992309 N1 0.106533 -0 0.994309 N2 0.694136 0 -0.719844 + txt003 +STRI + V0 3.38244 0.0933642 2.46543 V1 3.26447 0.149383 2.46235 V2 3.27176 0.133333 2.47188 + N0 0.612385 0.714958 -0.337372 N1 0.218115 0.87054 0.44112 N2 -0.00787186 0.108144 0.994104 + txt003 +STRI + V0 3.27176 0.133333 2.47188 V1 3.38345 0.0833333 2.47578 V2 3.38244 0.0933642 2.46543 + N0 -0.00787186 0.108144 0.994104 N1 0.0539577 0.111406 0.992309 N2 0.612385 0.714958 -0.337372 + txt003 +STRI + V0 3.26447 0.149383 2.46235 V1 3.11111 0.168056 2.45833 V2 3.12656 0.15 2.4668 + N0 0.218115 0.87054 0.44112 N1 -0.0195232 0.665415 0.746219 N2 -0.0348909 0.0594438 0.997622 + txt003 +STRI + V0 3.12656 0.15 2.4668 V1 3.27176 0.133333 2.47188 V2 3.26447 0.149383 2.46235 + N0 -0.0348909 0.0594438 0.997622 N1 -0.00787186 0.108144 0.994104 N2 0.218115 0.87054 0.44112 + txt003 +STRI + V0 3.11111 0.168056 2.45833 V1 2.95775 0.149383 2.45432 V2 2.98137 0.133333 2.46172 + N0 -0.0195232 0.665415 0.746219 N1 -0.14959 0.481391 0.863647 N2 -0.0369301 0.00796532 0.999286 + txt003 +STRI + V0 2.98137 0.133333 2.46172 V1 3.12656 0.15 2.4668 V2 3.11111 0.168056 2.45833 + N0 -0.0369301 0.00796532 0.999286 N1 -0.0348909 0.0594438 0.997622 N2 -0.0195232 0.665415 0.746219 + txt003 +STRI + V0 2.95775 0.149383 2.45432 V1 2.83978 0.0933642 2.45123 V2 2.86968 0.0833333 2.45781 + N0 -0.14959 0.481391 0.863647 N1 -0.253997 0.272114 0.928138 N2 -0.0182321 -0.0210195 0.999613 + txt003 +STRI + V0 2.86968 0.0833333 2.45781 V1 2.98137 0.133333 2.46172 V2 2.95775 0.149383 2.45432 + N0 -0.0182321 -0.0210195 0.999613 N1 -0.0369301 0.00796532 0.999286 N2 -0.14959 0.481391 0.863647 + txt003 +STRI + V0 2.83978 0.0933642 2.45123 V1 2.79259 0 2.45 V2 2.825 0 2.45625 + N0 -0.253997 0.272114 0.928138 N1 -0.306009 -1.09783e-15 0.952029 N2 2.22045e-15 -2.22045e-15 1 + txt003 +STRI + V0 2.825 0 2.45625 V1 2.86968 0.0833333 2.45781 V2 2.83978 0.0933642 2.45123 + N0 2.22045e-15 -2.22045e-15 1 N1 -0.0182321 -0.0210195 0.999613 N2 -0.253997 0.272114 0.928138 + txt003 +STRI + V0 3.42813 0 2.47734 V1 3.38345 0.0833333 2.47578 V2 3.34657 0.0733025 2.46929 + N0 0.106533 -0 0.994309 N1 0.0539577 0.111406 0.992309 N2 -0.223743 -0.242919 0.943891 + txt003 +STRI + V0 3.34657 0.0733025 2.46929 V1 3.38704 0 2.47083 V2 3.42813 0 2.47734 + N0 -0.223743 -0.242919 0.943891 N1 -0.253109 0 0.967438 N2 0.106533 -0 0.994309 + txt003 +STRI + V0 3.38345 0.0833333 2.47578 V1 3.27176 0.133333 2.47188 V2 3.2454 0.117284 2.46543 + N0 0.0539577 0.111406 0.992309 N1 -0.00787186 0.108144 0.994104 N2 -0.144371 -0.459364 0.876437 + txt003 +STRI + V0 3.2454 0.117284 2.46543 V1 3.34657 0.0733025 2.46929 V2 3.38345 0.0833333 2.47578 + N0 -0.144371 -0.459364 0.876437 N1 -0.223743 -0.242919 0.943891 N2 0.0539577 0.111406 0.992309 + txt003 +STRI + V0 3.27176 0.133333 2.47188 V1 3.12656 0.15 2.4668 V2 3.11389 0.131944 2.46042 + N0 -0.00787186 0.108144 0.994104 N1 -0.0348909 0.0594438 0.997622 N2 -0.0300305 -0.615625 0.787467 + txt003 +STRI + V0 3.11389 0.131944 2.46042 V1 3.2454 0.117284 2.46543 V2 3.27176 0.133333 2.47188 + N0 -0.0300305 -0.615625 0.787467 N1 -0.144371 -0.459364 0.876437 N2 -0.00787186 0.108144 0.994104 + txt003 +STRI + V0 3.12656 0.15 2.4668 V1 2.98137 0.133333 2.46172 V2 2.98237 0.117284 2.4554 + N0 -0.0348909 0.0594438 0.997622 N1 -0.0369301 0.00796532 0.999286 N2 0.148477 -0.721529 0.676277 + txt003 +STRI + V0 2.98237 0.117284 2.4554 V1 3.11389 0.131944 2.46042 V2 3.12656 0.15 2.4668 + N0 0.148477 -0.721529 0.676277 N1 -0.0300305 -0.615625 0.787467 N2 -0.0348909 0.0594438 0.997622 + txt003 +STRI + V0 2.98137 0.133333 2.46172 V1 2.86968 0.0833333 2.45781 V2 2.88121 0.0733025 2.45154 + N0 -0.0369301 0.00796532 0.999286 N1 -0.0182321 -0.0210195 0.999613 N2 0.507715 -0.682832 0.525324 + txt003 +STRI + V0 2.88121 0.0733025 2.45154 V1 2.98237 0.117284 2.4554 V2 2.98137 0.133333 2.46172 + N0 0.507715 -0.682832 0.525324 N1 0.148477 -0.721529 0.676277 N2 -0.0369301 0.00796532 0.999286 + txt003 +STRI + V0 2.86968 0.0833333 2.45781 V1 2.825 0 2.45625 V2 2.84074 0 2.45 + N0 -0.0182321 -0.0210195 0.999613 N1 2.22045e-15 -2.22045e-15 1 N2 0.913812 -4.13289e-15 0.406138 + txt003 +STRI + V0 2.84074 0 2.45 V1 2.88121 0.0733025 2.45154 V2 2.86968 0.0833333 2.45781 + N0 0.913812 -4.13289e-15 0.406138 N1 0.507715 -0.682832 0.525324 N2 -0.0182321 -0.0210195 0.999613 + txt003 +STRI + V0 3.38704 0 2.47083 V1 3.34657 0.0733025 2.46929 V2 3.27461 0.0655864 2.44451 + N0 -0.253109 0 0.967438 N1 -0.223743 -0.242919 0.943891 N2 -0.316294 -0.364979 0.875641 + txt003 +STRI + V0 3.27461 0.0655864 2.44451 V1 3.30984 0 2.44557 V2 3.38704 0 2.47083 + N0 -0.316294 -0.364979 0.875641 N1 -0.349987 0 0.936755 N2 -0.253109 0 0.967438 + txt003 +STRI + V0 3.34657 0.0733025 2.46929 V1 3.2454 0.117284 2.46543 V2 3.18654 0.104938 2.44186 + N0 -0.223743 -0.242919 0.943891 N1 -0.144371 -0.459364 0.876437 N2 -0.199105 -0.721639 0.663019 + txt003 +STRI + V0 3.18654 0.104938 2.44186 V1 3.27461 0.0655864 2.44451 V2 3.34657 0.0733025 2.46929 + N0 -0.199105 -0.721639 0.663019 N1 -0.316294 -0.364979 0.875641 N2 -0.223743 -0.242919 0.943891 + txt003 +STRI + V0 3.2454 0.117284 2.46543 V1 3.11389 0.131944 2.46042 V2 3.07205 0.118056 2.43841 + N0 -0.144371 -0.459364 0.876437 N1 -0.0300305 -0.615625 0.787467 N2 -0.0103804 -0.938666 0.344672 + txt003 +STRI + V0 3.07205 0.118056 2.43841 V1 3.18654 0.104938 2.44186 V2 3.2454 0.117284 2.46543 + N0 -0.0103804 -0.938666 0.344672 N1 -0.199105 -0.721639 0.663019 N2 -0.144371 -0.459364 0.876437 + txt003 +STRI + V0 3.11389 0.131944 2.46042 V1 2.98237 0.117284 2.4554 V2 2.95756 0.104938 2.43496 + N0 -0.0300305 -0.615625 0.787467 N1 0.148477 -0.721529 0.676277 N2 0.241288 -0.970358 -0.0136399 + txt003 +STRI + V0 2.95756 0.104938 2.43496 V1 3.07205 0.118056 2.43841 V2 3.11389 0.131944 2.46042 + N0 0.241288 -0.970358 -0.0136399 N1 -0.0103804 -0.938666 0.344672 N2 -0.0300305 -0.615625 0.787467 + txt003 +STRI + V0 2.98237 0.117284 2.4554 V1 2.88121 0.0733025 2.45154 V2 2.86949 0.0655864 2.43231 + N0 0.148477 -0.721529 0.676277 N1 0.507715 -0.682832 0.525324 N2 0.577416 -0.711734 -0.400031 + txt003 +STRI + V0 2.86949 0.0655864 2.43231 V1 2.95756 0.104938 2.43496 V2 2.98237 0.117284 2.4554 + N0 0.577416 -0.711734 -0.400031 N1 0.241288 -0.970358 -0.0136399 N2 0.148477 -0.721529 0.676277 + txt003 +STRI + V0 2.88121 0.0733025 2.45154 V1 2.84074 0 2.45 V2 2.83426 0 2.43125 + N0 0.507715 -0.682832 0.525324 N1 0.913812 -4.13289e-15 0.406138 N2 0.789352 -1.30938e-15 -0.613941 + txt003 +STRI + V0 2.83426 0 2.43125 V1 2.86949 0.0655864 2.43231 V2 2.88121 0.0733025 2.45154 + N0 0.789352 -1.30938e-15 -0.613941 N1 0.577416 -0.711734 -0.400031 N2 0.507715 -0.682832 0.525324 + txt003 +STRI + V0 3.30984 0 2.44557 V1 3.27461 0.0655864 2.44451 V2 3.17037 0.0625 2.4 + N0 -0.349987 0 0.936755 N1 -0.316294 -0.364979 0.875641 N2 -0.378646 -0.420717 0.824393 + txt003 +STRI + V0 3.17037 0.0625 2.4 V1 3.2 0 2.4 V2 3.30984 0 2.44557 + N0 -0.378646 -0.420717 0.824393 N1 -0.410365 0 0.911922 N2 -0.349987 0 0.936755 + txt003 +STRI + V0 3.27461 0.0655864 2.44451 V1 3.18654 0.104938 2.44186 V2 3.0963 0.1 2.4 + N0 -0.316294 -0.364979 0.875641 N1 -0.199105 -0.721639 0.663019 N2 -0.236617 -0.841304 0.486024 + txt003 +STRI + V0 3.0963 0.1 2.4 V1 3.17037 0.0625 2.4 V2 3.27461 0.0655864 2.44451 + N0 -0.236617 -0.841304 0.486024 N1 -0.378646 -0.420717 0.824393 N2 -0.316294 -0.364979 0.875641 + txt003 +STRI + V0 3.18654 0.104938 2.44186 V1 3.07205 0.118056 2.43841 V2 3 0.1125 2.4 + N0 -0.199105 -0.721639 0.663019 N1 -0.0103804 -0.938666 0.344672 N2 0 -1 0 + txt003 +STRI + V0 3 0.1125 2.4 V1 3.0963 0.1 2.4 V2 3.18654 0.104938 2.44186 + N0 0 -1 0 N1 -0.236617 -0.841304 0.486024 N2 -0.199105 -0.721639 0.663019 + txt003 +STRI + V0 3.07205 0.118056 2.43841 V1 2.95756 0.104938 2.43496 V2 2.9037 0.1 2.4 + N0 -0.0103804 -0.938666 0.344672 N1 0.241288 -0.970358 -0.0136399 N2 0.247465 -0.879877 -0.405681 + txt003 +STRI + V0 2.9037 0.1 2.4 V1 3 0.1125 2.4 V2 3.07205 0.118056 2.43841 + N0 0.247465 -0.879877 -0.405681 N1 0 -1 0 N2 -0.0103804 -0.938666 0.344672 + txt003 +STRI + V0 2.95756 0.104938 2.43496 V1 2.86949 0.0655864 2.43231 V2 2.82963 0.0625 2.4 + N0 0.241288 -0.970358 -0.0136399 N1 0.577416 -0.711734 -0.400031 N2 0.483629 -0.537366 -0.690899 + txt003 +STRI + V0 2.82963 0.0625 2.4 V1 2.9037 0.1 2.4 V2 2.95756 0.104938 2.43496 + N0 0.483629 -0.537366 -0.690899 N1 0.247465 -0.879877 -0.405681 N2 0.241288 -0.970358 -0.0136399 + txt003 +STRI + V0 2.86949 0.0655864 2.43231 V1 2.83426 0 2.43125 V2 2.8 0 2.4 + N0 0.577416 -0.711734 -0.400031 N1 0.789352 -1.30938e-15 -0.613941 N2 0.6 -3.73979e-29 -0.8 + txt003 +STRI + V0 2.8 0 2.4 V1 2.82963 0.0625 2.4 V2 2.86949 0.0655864 2.43231 + N0 0.6 -3.73979e-29 -0.8 N1 0.483629 -0.537366 -0.690899 N2 0.577416 -0.711734 -0.400031 + txt003 +STRI + V0 0.268946 -0.0750782 3.12708 V1 0.278704 0 3.12708 V2 0 0 3.15 + N0 0.241077 -0.0645609 0.968356 N1 0.249998 0 0.968246 N2 0 0 1 + txt003 +STRI + V0 0.241285 -0.141931 3.12708 V1 0.268946 -0.0750782 3.12708 V2 0 0 3.15 + N0 0.215548 -0.124615 0.968509 N1 0.241077 -0.0645609 0.968356 N2 0 0 1 + txt003 +STRI + V0 0.19814 -0.19814 3.12708 V1 0.241285 -0.141931 3.12708 V2 0 0 3.15 + N0 0.175885 -0.175885 0.96857 N1 0.215548 -0.124615 0.968509 N2 0 0 1 + txt003 +STRI + V0 0.141931 -0.241285 3.12708 V1 0.19814 -0.19814 3.12708 V2 0 0 3.15 + N0 0.124615 -0.215548 0.968509 N1 0.175885 -0.175885 0.96857 N2 0 0 1 + txt003 +STRI + V0 0.0750782 -0.268946 3.12708 V1 0.141931 -0.241285 3.12708 V2 0 0 3.15 + N0 0.0645609 -0.241077 0.968356 N1 0.124615 -0.215548 0.968509 N2 0 0 1 + txt003 +STRI + V0 0 -0.278704 3.12708 V1 0.0750782 -0.268946 3.12708 V2 0 0 3.15 + N0 -2.80184e-15 -0.249998 0.968246 N1 0.0645609 -0.241077 0.968356 N2 0 0 1 + txt003 +STRI + V0 0.278704 0 3.12708 V1 0.268946 -0.0750782 3.12708 V2 0.350254 -0.0977709 3.06667 + N0 0.249998 0 0.968246 N1 0.241077 -0.0645609 0.968356 N2 0.955496 -0.255913 0.146755 + txt003 +STRI + V0 0.350254 -0.0977709 3.06667 V1 0.362963 0 3.06667 V2 0.278704 0 3.12708 + N0 0.955496 -0.255913 0.146755 N1 0.989203 0 0.146549 N2 0.249998 0 0.968246 + txt003 +STRI + V0 0.268946 -0.0750782 3.12708 V1 0.241285 -0.141931 3.12708 V2 0.314228 -0.184834 3.06667 + N0 0.241077 -0.0645609 0.968356 N1 0.215548 -0.124615 0.968509 N2 0.856312 -0.495088 0.147029 + txt003 +STRI + V0 0.314228 -0.184834 3.06667 V1 0.350254 -0.0977709 3.06667 V2 0.268946 -0.0750782 3.12708 + N0 0.856312 -0.495088 0.147029 N1 0.955496 -0.255913 0.146755 N2 0.241077 -0.0645609 0.968356 + txt003 +STRI + V0 0.241285 -0.141931 3.12708 V1 0.19814 -0.19814 3.12708 V2 0.258037 -0.258037 3.06667 + N0 0.215548 -0.124615 0.968509 N1 0.175885 -0.175885 0.96857 N2 0.699411 -0.699411 0.147135 + txt003 +STRI + V0 0.258037 -0.258037 3.06667 V1 0.314228 -0.184834 3.06667 V2 0.241285 -0.141931 3.12708 + N0 0.699411 -0.699411 0.147135 N1 0.856312 -0.495088 0.147029 N2 0.215548 -0.124615 0.968509 + txt003 +STRI + V0 0.19814 -0.19814 3.12708 V1 0.141931 -0.241285 3.12708 V2 0.184834 -0.314228 3.06667 + N0 0.175885 -0.175885 0.96857 N1 0.124615 -0.215548 0.968509 N2 0.495088 -0.856312 0.147029 + txt003 +STRI + V0 0.184834 -0.314228 3.06667 V1 0.258037 -0.258037 3.06667 V2 0.19814 -0.19814 3.12708 + N0 0.495088 -0.856312 0.147029 N1 0.699411 -0.699411 0.147135 N2 0.175885 -0.175885 0.96857 + txt003 +STRI + V0 0.141931 -0.241285 3.12708 V1 0.0750782 -0.268946 3.12708 V2 0.0977709 -0.350254 3.06667 + N0 0.124615 -0.215548 0.968509 N1 0.0645609 -0.241077 0.968356 N2 0.255913 -0.955496 0.146755 + txt003 +STRI + V0 0.0977709 -0.350254 3.06667 V1 0.184834 -0.314228 3.06667 V2 0.141931 -0.241285 3.12708 + N0 0.255913 -0.955496 0.146755 N1 0.495088 -0.856312 0.147029 N2 0.124615 -0.215548 0.968509 + txt003 +STRI + V0 0.0750782 -0.268946 3.12708 V1 0 -0.278704 3.12708 V2 0 -0.362963 3.06667 + N0 0.0645609 -0.241077 0.968356 N1 -2.80184e-15 -0.249998 0.968246 N2 -4.98112e-16 -0.989203 0.146549 + txt003 +STRI + V0 0 -0.362963 3.06667 V1 0.0977709 -0.350254 3.06667 V2 0.0750782 -0.268946 3.12708 + N0 -4.98112e-16 -0.989203 0.146549 N1 0.255913 -0.955496 0.146755 N2 0.0645609 -0.241077 0.968356 + txt003 +STRI + V0 0.362963 0 3.06667 V1 0.350254 -0.0977709 3.06667 V2 0.313617 -0.0875289 2.98125 + N0 0.989203 0 0.146549 N1 0.955496 -0.255913 0.146755 N2 0.753688 -0.201937 -0.625441 + txt003 +STRI + V0 0.313617 -0.0875289 2.98125 V1 0.325 0 2.98125 V2 0.362963 0 3.06667 + N0 0.753688 -0.201937 -0.625441 N1 0.780869 0 -0.624695 N2 0.989203 0 0.146549 + txt003 +STRI + V0 0.350254 -0.0977709 3.06667 V1 0.314228 -0.184834 3.06667 V2 0.281352 -0.165481 2.98125 + N0 0.955496 -0.255913 0.146755 N1 0.856312 -0.495088 0.147029 N2 0.674735 -0.390178 -0.626493 + txt003 +STRI + V0 0.281352 -0.165481 2.98125 V1 0.313617 -0.0875289 2.98125 V2 0.350254 -0.0977709 3.06667 + N0 0.674735 -0.390178 -0.626493 N1 0.753688 -0.201937 -0.625441 N2 0.955496 -0.255913 0.146755 + txt003 +STRI + V0 0.314228 -0.184834 3.06667 V1 0.258037 -0.258037 3.06667 V2 0.231031 -0.231031 2.98125 + N0 0.856312 -0.495088 0.147029 N1 0.699411 -0.699411 0.147135 N2 0.550896 -0.550896 -0.626919 + txt003 +STRI + V0 0.231031 -0.231031 2.98125 V1 0.281352 -0.165481 2.98125 V2 0.314228 -0.184834 3.06667 + N0 0.550896 -0.550896 -0.626919 N1 0.674735 -0.390178 -0.626493 N2 0.856312 -0.495088 0.147029 + txt003 +STRI + V0 0.258037 -0.258037 3.06667 V1 0.184834 -0.314228 3.06667 V2 0.165481 -0.281352 2.98125 + N0 0.699411 -0.699411 0.147135 N1 0.495088 -0.856312 0.147029 N2 0.390178 -0.674735 -0.626493 + txt003 +STRI + V0 0.165481 -0.281352 2.98125 V1 0.231031 -0.231031 2.98125 V2 0.258037 -0.258037 3.06667 + N0 0.390178 -0.674735 -0.626493 N1 0.550896 -0.550896 -0.626919 N2 0.699411 -0.699411 0.147135 + txt003 +STRI + V0 0.184834 -0.314228 3.06667 V1 0.0977709 -0.350254 3.06667 V2 0.0875289 -0.313617 2.98125 + N0 0.495088 -0.856312 0.147029 N1 0.255913 -0.955496 0.146755 N2 0.201937 -0.753688 -0.625441 + txt003 +STRI + V0 0.0875289 -0.313617 2.98125 V1 0.165481 -0.281352 2.98125 V2 0.184834 -0.314228 3.06667 + N0 0.201937 -0.753688 -0.625441 N1 0.390178 -0.674735 -0.626493 N2 0.495088 -0.856312 0.147029 + txt003 +STRI + V0 0.0977709 -0.350254 3.06667 V1 0 -0.362963 3.06667 V2 -1.11022e-16 -0.325 2.98125 + N0 0.255913 -0.955496 0.146755 N1 -4.98112e-16 -0.989203 0.146549 N2 1.51803e-15 -0.780869 -0.624695 + txt003 +STRI + V0 -1.11022e-16 -0.325 2.98125 V1 0.0875289 -0.313617 2.98125 V2 0.0977709 -0.350254 3.06667 + N0 1.51803e-15 -0.780869 -0.624695 N1 0.201937 -0.753688 -0.625441 N2 0.255913 -0.955496 0.146755 + txt003 +STRI + V0 0.325 0 2.98125 V1 0.313617 -0.0875289 2.98125 V2 0.228728 -0.0638032 2.88333 + N0 0.780869 0 -0.624695 N1 0.753688 -0.201937 -0.625441 N2 0.721244 -0.193465 -0.665116 + txt003 +STRI + V0 0.228728 -0.0638032 2.88333 V1 0.237037 0 2.88333 V2 0.325 0 2.98125 + N0 0.721244 -0.193465 -0.665116 N1 0.747409 0 -0.664364 N2 0.780869 0 -0.624695 + txt003 +STRI + V0 0.313617 -0.0875289 2.98125 V1 0.281352 -0.165481 2.98125 V2 0.20518 -0.120647 2.88333 + N0 0.753688 -0.201937 -0.625441 N1 0.674735 -0.390178 -0.626493 N2 0.645526 -0.373497 -0.66618 + txt003 +STRI + V0 0.20518 -0.120647 2.88333 V1 0.228728 -0.0638032 2.88333 V2 0.313617 -0.0875289 2.98125 + N0 0.645526 -0.373497 -0.66618 N1 0.721244 -0.193465 -0.665116 N2 0.753688 -0.201937 -0.625441 + txt003 +STRI + V0 0.281352 -0.165481 2.98125 V1 0.231031 -0.231031 2.98125 V2 0.168463 -0.168463 2.88333 + N0 0.674735 -0.390178 -0.626493 N1 0.550896 -0.550896 -0.626919 N2 0.527081 -0.527081 -0.666611 + txt003 +STRI + V0 0.168463 -0.168463 2.88333 V1 0.20518 -0.120647 2.88333 V2 0.281352 -0.165481 2.98125 + N0 0.527081 -0.527081 -0.666611 N1 0.645526 -0.373497 -0.66618 N2 0.674735 -0.390178 -0.626493 + txt003 +STRI + V0 0.231031 -0.231031 2.98125 V1 0.165481 -0.281352 2.98125 V2 0.120647 -0.20518 2.88333 + N0 0.550896 -0.550896 -0.626919 N1 0.390178 -0.674735 -0.626493 N2 0.373497 -0.645526 -0.66618 + txt003 +STRI + V0 0.120647 -0.20518 2.88333 V1 0.168463 -0.168463 2.88333 V2 0.231031 -0.231031 2.98125 + N0 0.373497 -0.645526 -0.66618 N1 0.527081 -0.527081 -0.666611 N2 0.550896 -0.550896 -0.626919 + txt003 +STRI + V0 0.165481 -0.281352 2.98125 V1 0.0875289 -0.313617 2.98125 V2 0.0638032 -0.228728 2.88333 + N0 0.390178 -0.674735 -0.626493 N1 0.201937 -0.753688 -0.625441 N2 0.193465 -0.721244 -0.665116 + txt003 +STRI + V0 0.0638032 -0.228728 2.88333 V1 0.120647 -0.20518 2.88333 V2 0.165481 -0.281352 2.98125 + N0 0.193465 -0.721244 -0.665116 N1 0.373497 -0.645526 -0.66618 N2 0.390178 -0.674735 -0.626493 + txt003 +STRI + V0 0.0875289 -0.313617 2.98125 V1 -1.11022e-16 -0.325 2.98125 V2 -1.11022e-16 -0.237037 2.88333 + N0 0.201937 -0.753688 -0.625441 N1 1.51803e-15 -0.780869 -0.624695 N2 2.42292e-15 -0.747409 -0.664364 + txt003 +STRI + V0 -1.11022e-16 -0.237037 2.88333 V1 0.0638032 -0.228728 2.88333 V2 0.0875289 -0.313617 2.98125 + N0 2.42292e-15 -0.747409 -0.664364 N1 0.193465 -0.721244 -0.665116 N2 0.201937 -0.753688 -0.625441 + txt003 +STRI + V0 0.237037 0 2.88333 V1 0.228728 -0.0638032 2.88333 V2 0.165279 -0.0460445 2.78542 + N0 0.747409 0 -0.664364 N1 0.721244 -0.193465 -0.665116 N2 0.917897 -0.246906 -0.310647 + txt003 +STRI + V0 0.165279 -0.0460445 2.78542 V1 0.171296 0 2.78542 V2 0.237037 0 2.88333 + N0 0.917897 -0.246906 -0.310647 N1 0.950775 0 -0.309882 N2 0.747409 0 -0.664364 + txt003 +STRI + V0 0.228728 -0.0638032 2.88333 V1 0.20518 -0.120647 2.88333 V2 0.148234 -0.0871056 2.78542 + N0 0.721244 -0.193465 -0.665116 N1 0.645526 -0.373497 -0.66618 N2 0.822132 -0.476337 -0.311772 + txt003 +STRI + V0 0.148234 -0.0871056 2.78542 V1 0.165279 -0.0460445 2.78542 V2 0.228728 -0.0638032 2.88333 + N0 0.822132 -0.476337 -0.311772 N1 0.917897 -0.246906 -0.310647 N2 0.721244 -0.193465 -0.665116 + txt003 +STRI + V0 0.20518 -0.120647 2.88333 V1 0.168463 -0.168463 2.88333 V2 0.121672 -0.121672 2.78542 + N0 0.645526 -0.373497 -0.66618 N1 0.527081 -0.527081 -0.666611 N2 0.671754 -0.671754 -0.312241 + txt003 +STRI + V0 0.121672 -0.121672 2.78542 V1 0.148234 -0.0871056 2.78542 V2 0.20518 -0.120647 2.88333 + N0 0.671754 -0.671754 -0.312241 N1 0.822132 -0.476337 -0.311772 N2 0.645526 -0.373497 -0.66618 + txt003 +STRI + V0 0.168463 -0.168463 2.88333 V1 0.120647 -0.20518 2.88333 V2 0.0871056 -0.148234 2.78542 + N0 0.527081 -0.527081 -0.666611 N1 0.373497 -0.645526 -0.66618 N2 0.476337 -0.822132 -0.311772 + txt003 +STRI + V0 0.0871056 -0.148234 2.78542 V1 0.121672 -0.121672 2.78542 V2 0.168463 -0.168463 2.88333 + N0 0.476337 -0.822132 -0.311772 N1 0.671754 -0.671754 -0.312241 N2 0.527081 -0.527081 -0.666611 + txt003 +STRI + V0 0.120647 -0.20518 2.88333 V1 0.0638032 -0.228728 2.88333 V2 0.0460445 -0.165279 2.78542 + N0 0.373497 -0.645526 -0.66618 N1 0.193465 -0.721244 -0.665116 N2 0.246906 -0.917897 -0.310647 + txt003 +STRI + V0 0.0460445 -0.165279 2.78542 V1 0.0871056 -0.148234 2.78542 V2 0.120647 -0.20518 2.88333 + N0 0.246906 -0.917897 -0.310647 N1 0.476337 -0.822132 -0.311772 N2 0.373497 -0.645526 -0.66618 + txt003 +STRI + V0 0.0638032 -0.228728 2.88333 V1 -1.11022e-16 -0.237037 2.88333 V2 -6.66134e-16 -0.171296 2.78542 + N0 0.193465 -0.721244 -0.665116 N1 2.42292e-15 -0.747409 -0.664364 N2 2.16507e-15 -0.950775 -0.309882 + txt003 +STRI + V0 -6.66134e-16 -0.171296 2.78542 V1 0.0460445 -0.165279 2.78542 V2 0.0638032 -0.228728 2.88333 + N0 2.16507e-15 -0.950775 -0.309882 N1 0.246906 -0.917897 -0.310647 N2 0.193465 -0.721244 -0.665116 + txt003 +STRI + V0 0.171296 0 2.78542 V1 0.165279 -0.0460445 2.78542 V2 0.192963 -0.0537037 2.7 + N0 0.950775 0 -0.309882 N1 0.917897 -0.246906 -0.310647 N2 0.578783 -0.15602 0.800417 + txt003 +STRI + V0 0.192963 -0.0537037 2.7 V1 0.2 0 2.7 V2 0.171296 0 2.78542 + N0 0.578783 -0.15602 0.800417 N1 0.6 0 0.8 N2 0.950775 0 -0.309882 + txt003 +STRI + V0 0.165279 -0.0460445 2.78542 V1 0.148234 -0.0871056 2.78542 V2 0.173037 -0.10163 2.7 + N0 0.917897 -0.246906 -0.310647 N1 0.822132 -0.476337 -0.311772 N2 0.517905 -0.300385 0.800964 + txt003 +STRI + V0 0.173037 -0.10163 2.7 V1 0.192963 -0.0537037 2.7 V2 0.165279 -0.0460445 2.78542 + N0 0.517905 -0.300385 0.800964 N1 0.578783 -0.15602 0.800417 N2 0.917897 -0.246906 -0.310647 + txt003 +STRI + V0 0.148234 -0.0871056 2.78542 V1 0.121672 -0.121672 2.78542 V2 0.142 -0.142 2.7 + N0 0.822132 -0.476337 -0.311772 N1 0.671754 -0.671754 -0.312241 N2 0.423155 -0.423155 0.801174 + txt003 +STRI + V0 0.142 -0.142 2.7 V1 0.173037 -0.10163 2.7 V2 0.148234 -0.0871056 2.78542 + N0 0.423155 -0.423155 0.801174 N1 0.517905 -0.300385 0.800964 N2 0.822132 -0.476337 -0.311772 + txt003 +STRI + V0 0.121672 -0.121672 2.78542 V1 0.0871056 -0.148234 2.78542 V2 0.10163 -0.173037 2.7 + N0 0.671754 -0.671754 -0.312241 N1 0.476337 -0.822132 -0.311772 N2 0.300385 -0.517905 0.800964 + txt003 +STRI + V0 0.10163 -0.173037 2.7 V1 0.142 -0.142 2.7 V2 0.121672 -0.121672 2.78542 + N0 0.300385 -0.517905 0.800964 N1 0.423155 -0.423155 0.801174 N2 0.671754 -0.671754 -0.312241 + txt003 +STRI + V0 0.0871056 -0.148234 2.78542 V1 0.0460445 -0.165279 2.78542 V2 0.0537037 -0.192963 2.7 + N0 0.476337 -0.822132 -0.311772 N1 0.246906 -0.917897 -0.310647 N2 0.15602 -0.578783 0.800417 + txt003 +STRI + V0 0.0537037 -0.192963 2.7 V1 0.10163 -0.173037 2.7 V2 0.0871056 -0.148234 2.78542 + N0 0.15602 -0.578783 0.800417 N1 0.300385 -0.517905 0.800964 N2 0.476337 -0.822132 -0.311772 + txt003 +STRI + V0 0.0460445 -0.165279 2.78542 V1 -6.66134e-16 -0.171296 2.78542 V2 0 -0.2 2.7 + N0 0.246906 -0.917897 -0.310647 N1 2.16507e-15 -0.950775 -0.309882 N2 -3.17207e-15 -0.6 0.8 + txt003 +STRI + V0 0 -0.2 2.7 V1 0.0537037 -0.192963 2.7 V2 0.0460445 -0.165279 2.78542 + N0 -3.17207e-15 -0.6 0.8 N1 0.15602 -0.578783 0.800417 N2 0.246906 -0.917897 -0.310647 + txt003 +STRI + V0 -0.0750782 -0.268946 3.12708 V1 0 -0.278704 3.12708 V2 0 0 3.15 + N0 -0.0645609 -0.241077 0.968356 N1 0 -0.249998 0.968246 N2 0 0 1 + txt003 +STRI + V0 -0.141931 -0.241285 3.12708 V1 -0.0750782 -0.268946 3.12708 V2 0 0 3.15 + N0 -0.124615 -0.215548 0.968509 N1 -0.0645609 -0.241077 0.968356 N2 0 0 1 + txt003 +STRI + V0 -0.19814 -0.19814 3.12708 V1 -0.141931 -0.241285 3.12708 V2 0 0 3.15 + N0 -0.175885 -0.175885 0.96857 N1 -0.124615 -0.215548 0.968509 N2 0 0 1 + txt003 +STRI + V0 -0.241285 -0.141931 3.12708 V1 -0.19814 -0.19814 3.12708 V2 0 0 3.15 + N0 -0.215548 -0.124615 0.968509 N1 -0.175885 -0.175885 0.96857 N2 0 0 1 + txt003 +STRI + V0 -0.268946 -0.0750782 3.12708 V1 -0.241285 -0.141931 3.12708 V2 0 0 3.15 + N0 -0.241077 -0.0645609 0.968356 N1 -0.215548 -0.124615 0.968509 N2 0 0 1 + txt003 +STRI + V0 -0.278704 0 3.12708 V1 -0.268946 -0.0750782 3.12708 V2 0 0 3.15 + N0 -0.249998 2.80184e-15 0.968246 N1 -0.241077 -0.0645609 0.968356 N2 0 0 1 + txt003 +STRI + V0 0 -0.278704 3.12708 V1 -0.0750782 -0.268946 3.12708 V2 -0.0977709 -0.350254 3.06667 + N0 0 -0.249998 0.968246 N1 -0.0645609 -0.241077 0.968356 N2 -0.255913 -0.955496 0.146755 + txt003 +STRI + V0 -0.0977709 -0.350254 3.06667 V1 0 -0.362963 3.06667 V2 0 -0.278704 3.12708 + N0 -0.255913 -0.955496 0.146755 N1 0 -0.989203 0.146549 N2 0 -0.249998 0.968246 + txt003 +STRI + V0 -0.0750782 -0.268946 3.12708 V1 -0.141931 -0.241285 3.12708 V2 -0.184834 -0.314228 3.06667 + N0 -0.0645609 -0.241077 0.968356 N1 -0.124615 -0.215548 0.968509 N2 -0.495088 -0.856312 0.147029 + txt003 +STRI + V0 -0.184834 -0.314228 3.06667 V1 -0.0977709 -0.350254 3.06667 V2 -0.0750782 -0.268946 3.12708 + N0 -0.495088 -0.856312 0.147029 N1 -0.255913 -0.955496 0.146755 N2 -0.0645609 -0.241077 0.968356 + txt003 +STRI + V0 -0.141931 -0.241285 3.12708 V1 -0.19814 -0.19814 3.12708 V2 -0.258037 -0.258037 3.06667 + N0 -0.124615 -0.215548 0.968509 N1 -0.175885 -0.175885 0.96857 N2 -0.699411 -0.699411 0.147135 + txt003 +STRI + V0 -0.258037 -0.258037 3.06667 V1 -0.184834 -0.314228 3.06667 V2 -0.141931 -0.241285 3.12708 + N0 -0.699411 -0.699411 0.147135 N1 -0.495088 -0.856312 0.147029 N2 -0.124615 -0.215548 0.968509 + txt003 +STRI + V0 -0.19814 -0.19814 3.12708 V1 -0.241285 -0.141931 3.12708 V2 -0.314228 -0.184834 3.06667 + N0 -0.175885 -0.175885 0.96857 N1 -0.215548 -0.124615 0.968509 N2 -0.856312 -0.495088 0.147029 + txt003 +STRI + V0 -0.314228 -0.184834 3.06667 V1 -0.258037 -0.258037 3.06667 V2 -0.19814 -0.19814 3.12708 + N0 -0.856312 -0.495088 0.147029 N1 -0.699411 -0.699411 0.147135 N2 -0.175885 -0.175885 0.96857 + txt003 +STRI + V0 -0.241285 -0.141931 3.12708 V1 -0.268946 -0.0750782 3.12708 V2 -0.350254 -0.0977709 3.06667 + N0 -0.215548 -0.124615 0.968509 N1 -0.241077 -0.0645609 0.968356 N2 -0.955496 -0.255913 0.146755 + txt003 +STRI + V0 -0.350254 -0.0977709 3.06667 V1 -0.314228 -0.184834 3.06667 V2 -0.241285 -0.141931 3.12708 + N0 -0.955496 -0.255913 0.146755 N1 -0.856312 -0.495088 0.147029 N2 -0.215548 -0.124615 0.968509 + txt003 +STRI + V0 -0.268946 -0.0750782 3.12708 V1 -0.278704 0 3.12708 V2 -0.362963 0 3.06667 + N0 -0.241077 -0.0645609 0.968356 N1 -0.249998 2.80184e-15 0.968246 N2 -0.989203 4.98112e-16 0.146549 + txt003 +STRI + V0 -0.362963 0 3.06667 V1 -0.350254 -0.0977709 3.06667 V2 -0.268946 -0.0750782 3.12708 + N0 -0.989203 4.98112e-16 0.146549 N1 -0.955496 -0.255913 0.146755 N2 -0.241077 -0.0645609 0.968356 + txt003 +STRI + V0 0 -0.362963 3.06667 V1 -0.0977709 -0.350254 3.06667 V2 -0.0875289 -0.313617 2.98125 + N0 0 -0.989203 0.146549 N1 -0.255913 -0.955496 0.146755 N2 -0.201937 -0.753688 -0.625441 + txt003 +STRI + V0 -0.0875289 -0.313617 2.98125 V1 0 -0.325 2.98125 V2 0 -0.362963 3.06667 + N0 -0.201937 -0.753688 -0.625441 N1 -0 -0.780869 -0.624695 N2 0 -0.989203 0.146549 + txt003 +STRI + V0 -0.0977709 -0.350254 3.06667 V1 -0.184834 -0.314228 3.06667 V2 -0.165481 -0.281352 2.98125 + N0 -0.255913 -0.955496 0.146755 N1 -0.495088 -0.856312 0.147029 N2 -0.390178 -0.674735 -0.626493 + txt003 +STRI + V0 -0.165481 -0.281352 2.98125 V1 -0.0875289 -0.313617 2.98125 V2 -0.0977709 -0.350254 3.06667 + N0 -0.390178 -0.674735 -0.626493 N1 -0.201937 -0.753688 -0.625441 N2 -0.255913 -0.955496 0.146755 + txt003 +STRI + V0 -0.184834 -0.314228 3.06667 V1 -0.258037 -0.258037 3.06667 V2 -0.231031 -0.231031 2.98125 + N0 -0.495088 -0.856312 0.147029 N1 -0.699411 -0.699411 0.147135 N2 -0.550896 -0.550896 -0.626919 + txt003 +STRI + V0 -0.231031 -0.231031 2.98125 V1 -0.165481 -0.281352 2.98125 V2 -0.184834 -0.314228 3.06667 + N0 -0.550896 -0.550896 -0.626919 N1 -0.390178 -0.674735 -0.626493 N2 -0.495088 -0.856312 0.147029 + txt003 +STRI + V0 -0.258037 -0.258037 3.06667 V1 -0.314228 -0.184834 3.06667 V2 -0.281352 -0.165481 2.98125 + N0 -0.699411 -0.699411 0.147135 N1 -0.856312 -0.495088 0.147029 N2 -0.674735 -0.390178 -0.626493 + txt003 +STRI + V0 -0.281352 -0.165481 2.98125 V1 -0.231031 -0.231031 2.98125 V2 -0.258037 -0.258037 3.06667 + N0 -0.674735 -0.390178 -0.626493 N1 -0.550896 -0.550896 -0.626919 N2 -0.699411 -0.699411 0.147135 + txt003 +STRI + V0 -0.314228 -0.184834 3.06667 V1 -0.350254 -0.0977709 3.06667 V2 -0.313617 -0.0875289 2.98125 + N0 -0.856312 -0.495088 0.147029 N1 -0.955496 -0.255913 0.146755 N2 -0.753688 -0.201937 -0.625441 + txt003 +STRI + V0 -0.313617 -0.0875289 2.98125 V1 -0.281352 -0.165481 2.98125 V2 -0.314228 -0.184834 3.06667 + N0 -0.753688 -0.201937 -0.625441 N1 -0.674735 -0.390178 -0.626493 N2 -0.856312 -0.495088 0.147029 + txt003 +STRI + V0 -0.350254 -0.0977709 3.06667 V1 -0.362963 0 3.06667 V2 -0.325 1.11022e-16 2.98125 + N0 -0.955496 -0.255913 0.146755 N1 -0.989203 4.98112e-16 0.146549 N2 -0.780869 -1.51803e-15 -0.624695 + txt003 +STRI + V0 -0.325 1.11022e-16 2.98125 V1 -0.313617 -0.0875289 2.98125 V2 -0.350254 -0.0977709 3.06667 + N0 -0.780869 -1.51803e-15 -0.624695 N1 -0.753688 -0.201937 -0.625441 N2 -0.955496 -0.255913 0.146755 + txt003 +STRI + V0 0 -0.325 2.98125 V1 -0.0875289 -0.313617 2.98125 V2 -0.0638032 -0.228728 2.88333 + N0 -0 -0.780869 -0.624695 N1 -0.201937 -0.753688 -0.625441 N2 -0.193465 -0.721244 -0.665116 + txt003 +STRI + V0 -0.0638032 -0.228728 2.88333 V1 0 -0.237037 2.88333 V2 0 -0.325 2.98125 + N0 -0.193465 -0.721244 -0.665116 N1 -0 -0.747409 -0.664364 N2 -0 -0.780869 -0.624695 + txt003 +STRI + V0 -0.0875289 -0.313617 2.98125 V1 -0.165481 -0.281352 2.98125 V2 -0.120647 -0.20518 2.88333 + N0 -0.201937 -0.753688 -0.625441 N1 -0.390178 -0.674735 -0.626493 N2 -0.373497 -0.645526 -0.66618 + txt003 +STRI + V0 -0.120647 -0.20518 2.88333 V1 -0.0638032 -0.228728 2.88333 V2 -0.0875289 -0.313617 2.98125 + N0 -0.373497 -0.645526 -0.66618 N1 -0.193465 -0.721244 -0.665116 N2 -0.201937 -0.753688 -0.625441 + txt003 +STRI + V0 -0.165481 -0.281352 2.98125 V1 -0.231031 -0.231031 2.98125 V2 -0.168463 -0.168463 2.88333 + N0 -0.390178 -0.674735 -0.626493 N1 -0.550896 -0.550896 -0.626919 N2 -0.527081 -0.527081 -0.666611 + txt003 +STRI + V0 -0.168463 -0.168463 2.88333 V1 -0.120647 -0.20518 2.88333 V2 -0.165481 -0.281352 2.98125 + N0 -0.527081 -0.527081 -0.666611 N1 -0.373497 -0.645526 -0.66618 N2 -0.390178 -0.674735 -0.626493 + txt003 +STRI + V0 -0.231031 -0.231031 2.98125 V1 -0.281352 -0.165481 2.98125 V2 -0.20518 -0.120647 2.88333 + N0 -0.550896 -0.550896 -0.626919 N1 -0.674735 -0.390178 -0.626493 N2 -0.645526 -0.373497 -0.66618 + txt003 +STRI + V0 -0.20518 -0.120647 2.88333 V1 -0.168463 -0.168463 2.88333 V2 -0.231031 -0.231031 2.98125 + N0 -0.645526 -0.373497 -0.66618 N1 -0.527081 -0.527081 -0.666611 N2 -0.550896 -0.550896 -0.626919 + txt003 +STRI + V0 -0.281352 -0.165481 2.98125 V1 -0.313617 -0.0875289 2.98125 V2 -0.228728 -0.0638032 2.88333 + N0 -0.674735 -0.390178 -0.626493 N1 -0.753688 -0.201937 -0.625441 N2 -0.721244 -0.193465 -0.665116 + txt003 +STRI + V0 -0.228728 -0.0638032 2.88333 V1 -0.20518 -0.120647 2.88333 V2 -0.281352 -0.165481 2.98125 + N0 -0.721244 -0.193465 -0.665116 N1 -0.645526 -0.373497 -0.66618 N2 -0.674735 -0.390178 -0.626493 + txt003 +STRI + V0 -0.313617 -0.0875289 2.98125 V1 -0.325 1.11022e-16 2.98125 V2 -0.237037 1.11022e-16 2.88333 + N0 -0.753688 -0.201937 -0.625441 N1 -0.780869 -1.51803e-15 -0.624695 N2 -0.747409 -2.42292e-15 -0.664364 + txt003 +STRI + V0 -0.237037 1.11022e-16 2.88333 V1 -0.228728 -0.0638032 2.88333 V2 -0.313617 -0.0875289 2.98125 + N0 -0.747409 -2.42292e-15 -0.664364 N1 -0.721244 -0.193465 -0.665116 N2 -0.753688 -0.201937 -0.625441 + txt003 +STRI + V0 0 -0.237037 2.88333 V1 -0.0638032 -0.228728 2.88333 V2 -0.0460445 -0.165279 2.78542 + N0 -0 -0.747409 -0.664364 N1 -0.193465 -0.721244 -0.665116 N2 -0.246906 -0.917897 -0.310647 + txt003 +STRI + V0 -0.0460445 -0.165279 2.78542 V1 0 -0.171296 2.78542 V2 0 -0.237037 2.88333 + N0 -0.246906 -0.917897 -0.310647 N1 -0 -0.950775 -0.309882 N2 -0 -0.747409 -0.664364 + txt003 +STRI + V0 -0.0638032 -0.228728 2.88333 V1 -0.120647 -0.20518 2.88333 V2 -0.0871056 -0.148234 2.78542 + N0 -0.193465 -0.721244 -0.665116 N1 -0.373497 -0.645526 -0.66618 N2 -0.476337 -0.822132 -0.311772 + txt003 +STRI + V0 -0.0871056 -0.148234 2.78542 V1 -0.0460445 -0.165279 2.78542 V2 -0.0638032 -0.228728 2.88333 + N0 -0.476337 -0.822132 -0.311772 N1 -0.246906 -0.917897 -0.310647 N2 -0.193465 -0.721244 -0.665116 + txt003 +STRI + V0 -0.120647 -0.20518 2.88333 V1 -0.168463 -0.168463 2.88333 V2 -0.121672 -0.121672 2.78542 + N0 -0.373497 -0.645526 -0.66618 N1 -0.527081 -0.527081 -0.666611 N2 -0.671754 -0.671754 -0.312241 + txt003 +STRI + V0 -0.121672 -0.121672 2.78542 V1 -0.0871056 -0.148234 2.78542 V2 -0.120647 -0.20518 2.88333 + N0 -0.671754 -0.671754 -0.312241 N1 -0.476337 -0.822132 -0.311772 N2 -0.373497 -0.645526 -0.66618 + txt003 +STRI + V0 -0.168463 -0.168463 2.88333 V1 -0.20518 -0.120647 2.88333 V2 -0.148234 -0.0871056 2.78542 + N0 -0.527081 -0.527081 -0.666611 N1 -0.645526 -0.373497 -0.66618 N2 -0.822132 -0.476337 -0.311772 + txt003 +STRI + V0 -0.148234 -0.0871056 2.78542 V1 -0.121672 -0.121672 2.78542 V2 -0.168463 -0.168463 2.88333 + N0 -0.822132 -0.476337 -0.311772 N1 -0.671754 -0.671754 -0.312241 N2 -0.527081 -0.527081 -0.666611 + txt003 +STRI + V0 -0.20518 -0.120647 2.88333 V1 -0.228728 -0.0638032 2.88333 V2 -0.165279 -0.0460445 2.78542 + N0 -0.645526 -0.373497 -0.66618 N1 -0.721244 -0.193465 -0.665116 N2 -0.917897 -0.246906 -0.310647 + txt003 +STRI + V0 -0.165279 -0.0460445 2.78542 V1 -0.148234 -0.0871056 2.78542 V2 -0.20518 -0.120647 2.88333 + N0 -0.917897 -0.246906 -0.310647 N1 -0.822132 -0.476337 -0.311772 N2 -0.645526 -0.373497 -0.66618 + txt003 +STRI + V0 -0.228728 -0.0638032 2.88333 V1 -0.237037 1.11022e-16 2.88333 V2 -0.171296 6.66134e-16 2.78542 + N0 -0.721244 -0.193465 -0.665116 N1 -0.747409 -2.42292e-15 -0.664364 N2 -0.950775 -2.16507e-15 -0.309882 + txt003 +STRI + V0 -0.171296 6.66134e-16 2.78542 V1 -0.165279 -0.0460445 2.78542 V2 -0.228728 -0.0638032 2.88333 + N0 -0.950775 -2.16507e-15 -0.309882 N1 -0.917897 -0.246906 -0.310647 N2 -0.721244 -0.193465 -0.665116 + txt003 +STRI + V0 0 -0.171296 2.78542 V1 -0.0460445 -0.165279 2.78542 V2 -0.0537037 -0.192963 2.7 + N0 -0 -0.950775 -0.309882 N1 -0.246906 -0.917897 -0.310647 N2 -0.15602 -0.578783 0.800417 + txt003 +STRI + V0 -0.0537037 -0.192963 2.7 V1 0 -0.2 2.7 V2 0 -0.171296 2.78542 + N0 -0.15602 -0.578783 0.800417 N1 0 -0.6 0.8 N2 -0 -0.950775 -0.309882 + txt003 +STRI + V0 -0.0460445 -0.165279 2.78542 V1 -0.0871056 -0.148234 2.78542 V2 -0.10163 -0.173037 2.7 + N0 -0.246906 -0.917897 -0.310647 N1 -0.476337 -0.822132 -0.311772 N2 -0.300385 -0.517905 0.800964 + txt003 +STRI + V0 -0.10163 -0.173037 2.7 V1 -0.0537037 -0.192963 2.7 V2 -0.0460445 -0.165279 2.78542 + N0 -0.300385 -0.517905 0.800964 N1 -0.15602 -0.578783 0.800417 N2 -0.246906 -0.917897 -0.310647 + txt003 +STRI + V0 -0.0871056 -0.148234 2.78542 V1 -0.121672 -0.121672 2.78542 V2 -0.142 -0.142 2.7 + N0 -0.476337 -0.822132 -0.311772 N1 -0.671754 -0.671754 -0.312241 N2 -0.423155 -0.423155 0.801174 + txt003 +STRI + V0 -0.142 -0.142 2.7 V1 -0.10163 -0.173037 2.7 V2 -0.0871056 -0.148234 2.78542 + N0 -0.423155 -0.423155 0.801174 N1 -0.300385 -0.517905 0.800964 N2 -0.476337 -0.822132 -0.311772 + txt003 +STRI + V0 -0.121672 -0.121672 2.78542 V1 -0.148234 -0.0871056 2.78542 V2 -0.173037 -0.10163 2.7 + N0 -0.671754 -0.671754 -0.312241 N1 -0.822132 -0.476337 -0.311772 N2 -0.517905 -0.300385 0.800964 + txt003 +STRI + V0 -0.173037 -0.10163 2.7 V1 -0.142 -0.142 2.7 V2 -0.121672 -0.121672 2.78542 + N0 -0.517905 -0.300385 0.800964 N1 -0.423155 -0.423155 0.801174 N2 -0.671754 -0.671754 -0.312241 + txt003 +STRI + V0 -0.148234 -0.0871056 2.78542 V1 -0.165279 -0.0460445 2.78542 V2 -0.192963 -0.0537037 2.7 + N0 -0.822132 -0.476337 -0.311772 N1 -0.917897 -0.246906 -0.310647 N2 -0.578783 -0.15602 0.800417 + txt003 +STRI + V0 -0.192963 -0.0537037 2.7 V1 -0.173037 -0.10163 2.7 V2 -0.148234 -0.0871056 2.78542 + N0 -0.578783 -0.15602 0.800417 N1 -0.517905 -0.300385 0.800964 N2 -0.822132 -0.476337 -0.311772 + txt003 +STRI + V0 -0.165279 -0.0460445 2.78542 V1 -0.171296 6.66134e-16 2.78542 V2 -0.2 0 2.7 + N0 -0.917897 -0.246906 -0.310647 N1 -0.950775 -2.16507e-15 -0.309882 N2 -0.6 3.17207e-15 0.8 + txt003 +STRI + V0 -0.2 0 2.7 V1 -0.192963 -0.0537037 2.7 V2 -0.165279 -0.0460445 2.78542 + N0 -0.6 3.17207e-15 0.8 N1 -0.578783 -0.15602 0.800417 N2 -0.917897 -0.246906 -0.310647 + txt003 +STRI + V0 -0.268946 0.0750782 3.12708 V1 -0.278704 0 3.12708 V2 0 0 3.15 + N0 -0.241077 0.0645609 0.968356 N1 -0.249998 0 0.968246 N2 0 0 1 + txt003 +STRI + V0 -0.241285 0.141931 3.12708 V1 -0.268946 0.0750782 3.12708 V2 0 0 3.15 + N0 -0.215548 0.124615 0.968509 N1 -0.241077 0.0645609 0.968356 N2 0 0 1 + txt003 +STRI + V0 -0.19814 0.19814 3.12708 V1 -0.241285 0.141931 3.12708 V2 0 0 3.15 + N0 -0.175885 0.175885 0.96857 N1 -0.215548 0.124615 0.968509 N2 0 0 1 + txt003 +STRI + V0 -0.141931 0.241285 3.12708 V1 -0.19814 0.19814 3.12708 V2 0 0 3.15 + N0 -0.124615 0.215548 0.968509 N1 -0.175885 0.175885 0.96857 N2 0 0 1 + txt003 +STRI + V0 -0.0750782 0.268946 3.12708 V1 -0.141931 0.241285 3.12708 V2 0 0 3.15 + N0 -0.0645609 0.241077 0.968356 N1 -0.124615 0.215548 0.968509 N2 0 0 1 + txt003 +STRI + V0 0 0.278704 3.12708 V1 -0.0750782 0.268946 3.12708 V2 0 0 3.15 + N0 2.80184e-15 0.249998 0.968246 N1 -0.0645609 0.241077 0.968356 N2 0 0 1 + txt003 +STRI + V0 -0.278704 0 3.12708 V1 -0.268946 0.0750782 3.12708 V2 -0.350254 0.0977709 3.06667 + N0 -0.249998 0 0.968246 N1 -0.241077 0.0645609 0.968356 N2 -0.955496 0.255913 0.146755 + txt003 +STRI + V0 -0.350254 0.0977709 3.06667 V1 -0.362963 0 3.06667 V2 -0.278704 0 3.12708 + N0 -0.955496 0.255913 0.146755 N1 -0.989203 0 0.146549 N2 -0.249998 0 0.968246 + txt003 +STRI + V0 -0.268946 0.0750782 3.12708 V1 -0.241285 0.141931 3.12708 V2 -0.314228 0.184834 3.06667 + N0 -0.241077 0.0645609 0.968356 N1 -0.215548 0.124615 0.968509 N2 -0.856312 0.495088 0.147029 + txt003 +STRI + V0 -0.314228 0.184834 3.06667 V1 -0.350254 0.0977709 3.06667 V2 -0.268946 0.0750782 3.12708 + N0 -0.856312 0.495088 0.147029 N1 -0.955496 0.255913 0.146755 N2 -0.241077 0.0645609 0.968356 + txt003 +STRI + V0 -0.241285 0.141931 3.12708 V1 -0.19814 0.19814 3.12708 V2 -0.258037 0.258037 3.06667 + N0 -0.215548 0.124615 0.968509 N1 -0.175885 0.175885 0.96857 N2 -0.699411 0.699411 0.147135 + txt003 +STRI + V0 -0.258037 0.258037 3.06667 V1 -0.314228 0.184834 3.06667 V2 -0.241285 0.141931 3.12708 + N0 -0.699411 0.699411 0.147135 N1 -0.856312 0.495088 0.147029 N2 -0.215548 0.124615 0.968509 + txt003 +STRI + V0 -0.19814 0.19814 3.12708 V1 -0.141931 0.241285 3.12708 V2 -0.184834 0.314228 3.06667 + N0 -0.175885 0.175885 0.96857 N1 -0.124615 0.215548 0.968509 N2 -0.495088 0.856312 0.147029 + txt003 +STRI + V0 -0.184834 0.314228 3.06667 V1 -0.258037 0.258037 3.06667 V2 -0.19814 0.19814 3.12708 + N0 -0.495088 0.856312 0.147029 N1 -0.699411 0.699411 0.147135 N2 -0.175885 0.175885 0.96857 + txt003 +STRI + V0 -0.141931 0.241285 3.12708 V1 -0.0750782 0.268946 3.12708 V2 -0.0977709 0.350254 3.06667 + N0 -0.124615 0.215548 0.968509 N1 -0.0645609 0.241077 0.968356 N2 -0.255913 0.955496 0.146755 + txt003 +STRI + V0 -0.0977709 0.350254 3.06667 V1 -0.184834 0.314228 3.06667 V2 -0.141931 0.241285 3.12708 + N0 -0.255913 0.955496 0.146755 N1 -0.495088 0.856312 0.147029 N2 -0.124615 0.215548 0.968509 + txt003 +STRI + V0 -0.0750782 0.268946 3.12708 V1 0 0.278704 3.12708 V2 0 0.362963 3.06667 + N0 -0.0645609 0.241077 0.968356 N1 2.80184e-15 0.249998 0.968246 N2 4.98112e-16 0.989203 0.146549 + txt003 +STRI + V0 0 0.362963 3.06667 V1 -0.0977709 0.350254 3.06667 V2 -0.0750782 0.268946 3.12708 + N0 4.98112e-16 0.989203 0.146549 N1 -0.255913 0.955496 0.146755 N2 -0.0645609 0.241077 0.968356 + txt003 +STRI + V0 -0.362963 0 3.06667 V1 -0.350254 0.0977709 3.06667 V2 -0.313617 0.0875289 2.98125 + N0 -0.989203 0 0.146549 N1 -0.955496 0.255913 0.146755 N2 -0.753688 0.201937 -0.625441 + txt003 +STRI + V0 -0.313617 0.0875289 2.98125 V1 -0.325 0 2.98125 V2 -0.362963 0 3.06667 + N0 -0.753688 0.201937 -0.625441 N1 -0.780869 0 -0.624695 N2 -0.989203 0 0.146549 + txt003 +STRI + V0 -0.350254 0.0977709 3.06667 V1 -0.314228 0.184834 3.06667 V2 -0.281352 0.165481 2.98125 + N0 -0.955496 0.255913 0.146755 N1 -0.856312 0.495088 0.147029 N2 -0.674735 0.390178 -0.626493 + txt003 +STRI + V0 -0.281352 0.165481 2.98125 V1 -0.313617 0.0875289 2.98125 V2 -0.350254 0.0977709 3.06667 + N0 -0.674735 0.390178 -0.626493 N1 -0.753688 0.201937 -0.625441 N2 -0.955496 0.255913 0.146755 + txt003 +STRI + V0 -0.314228 0.184834 3.06667 V1 -0.258037 0.258037 3.06667 V2 -0.231031 0.231031 2.98125 + N0 -0.856312 0.495088 0.147029 N1 -0.699411 0.699411 0.147135 N2 -0.550896 0.550896 -0.626919 + txt003 +STRI + V0 -0.231031 0.231031 2.98125 V1 -0.281352 0.165481 2.98125 V2 -0.314228 0.184834 3.06667 + N0 -0.550896 0.550896 -0.626919 N1 -0.674735 0.390178 -0.626493 N2 -0.856312 0.495088 0.147029 + txt003 +STRI + V0 -0.258037 0.258037 3.06667 V1 -0.184834 0.314228 3.06667 V2 -0.165481 0.281352 2.98125 + N0 -0.699411 0.699411 0.147135 N1 -0.495088 0.856312 0.147029 N2 -0.390178 0.674735 -0.626493 + txt003 +STRI + V0 -0.165481 0.281352 2.98125 V1 -0.231031 0.231031 2.98125 V2 -0.258037 0.258037 3.06667 + N0 -0.390178 0.674735 -0.626493 N1 -0.550896 0.550896 -0.626919 N2 -0.699411 0.699411 0.147135 + txt003 +STRI + V0 -0.184834 0.314228 3.06667 V1 -0.0977709 0.350254 3.06667 V2 -0.0875289 0.313617 2.98125 + N0 -0.495088 0.856312 0.147029 N1 -0.255913 0.955496 0.146755 N2 -0.201937 0.753688 -0.625441 + txt003 +STRI + V0 -0.0875289 0.313617 2.98125 V1 -0.165481 0.281352 2.98125 V2 -0.184834 0.314228 3.06667 + N0 -0.201937 0.753688 -0.625441 N1 -0.390178 0.674735 -0.626493 N2 -0.495088 0.856312 0.147029 + txt003 +STRI + V0 -0.0977709 0.350254 3.06667 V1 0 0.362963 3.06667 V2 1.11022e-16 0.325 2.98125 + N0 -0.255913 0.955496 0.146755 N1 4.98112e-16 0.989203 0.146549 N2 -1.51803e-15 0.780869 -0.624695 + txt003 +STRI + V0 1.11022e-16 0.325 2.98125 V1 -0.0875289 0.313617 2.98125 V2 -0.0977709 0.350254 3.06667 + N0 -1.51803e-15 0.780869 -0.624695 N1 -0.201937 0.753688 -0.625441 N2 -0.255913 0.955496 0.146755 + txt003 +STRI + V0 -0.325 0 2.98125 V1 -0.313617 0.0875289 2.98125 V2 -0.228728 0.0638032 2.88333 + N0 -0.780869 0 -0.624695 N1 -0.753688 0.201937 -0.625441 N2 -0.721244 0.193465 -0.665116 + txt003 +STRI + V0 -0.228728 0.0638032 2.88333 V1 -0.237037 0 2.88333 V2 -0.325 0 2.98125 + N0 -0.721244 0.193465 -0.665116 N1 -0.747409 0 -0.664364 N2 -0.780869 0 -0.624695 + txt003 +STRI + V0 -0.313617 0.0875289 2.98125 V1 -0.281352 0.165481 2.98125 V2 -0.20518 0.120647 2.88333 + N0 -0.753688 0.201937 -0.625441 N1 -0.674735 0.390178 -0.626493 N2 -0.645526 0.373497 -0.66618 + txt003 +STRI + V0 -0.20518 0.120647 2.88333 V1 -0.228728 0.0638032 2.88333 V2 -0.313617 0.0875289 2.98125 + N0 -0.645526 0.373497 -0.66618 N1 -0.721244 0.193465 -0.665116 N2 -0.753688 0.201937 -0.625441 + txt003 +STRI + V0 -0.281352 0.165481 2.98125 V1 -0.231031 0.231031 2.98125 V2 -0.168463 0.168463 2.88333 + N0 -0.674735 0.390178 -0.626493 N1 -0.550896 0.550896 -0.626919 N2 -0.527081 0.527081 -0.666611 + txt003 +STRI + V0 -0.168463 0.168463 2.88333 V1 -0.20518 0.120647 2.88333 V2 -0.281352 0.165481 2.98125 + N0 -0.527081 0.527081 -0.666611 N1 -0.645526 0.373497 -0.66618 N2 -0.674735 0.390178 -0.626493 + txt003 +STRI + V0 -0.231031 0.231031 2.98125 V1 -0.165481 0.281352 2.98125 V2 -0.120647 0.20518 2.88333 + N0 -0.550896 0.550896 -0.626919 N1 -0.390178 0.674735 -0.626493 N2 -0.373497 0.645526 -0.66618 + txt003 +STRI + V0 -0.120647 0.20518 2.88333 V1 -0.168463 0.168463 2.88333 V2 -0.231031 0.231031 2.98125 + N0 -0.373497 0.645526 -0.66618 N1 -0.527081 0.527081 -0.666611 N2 -0.550896 0.550896 -0.626919 + txt003 +STRI + V0 -0.165481 0.281352 2.98125 V1 -0.0875289 0.313617 2.98125 V2 -0.0638032 0.228728 2.88333 + N0 -0.390178 0.674735 -0.626493 N1 -0.201937 0.753688 -0.625441 N2 -0.193465 0.721244 -0.665116 + txt003 +STRI + V0 -0.0638032 0.228728 2.88333 V1 -0.120647 0.20518 2.88333 V2 -0.165481 0.281352 2.98125 + N0 -0.193465 0.721244 -0.665116 N1 -0.373497 0.645526 -0.66618 N2 -0.390178 0.674735 -0.626493 + txt003 +STRI + V0 -0.0875289 0.313617 2.98125 V1 1.11022e-16 0.325 2.98125 V2 1.11022e-16 0.237037 2.88333 + N0 -0.201937 0.753688 -0.625441 N1 -1.51803e-15 0.780869 -0.624695 N2 -2.42292e-15 0.747409 -0.664364 + txt003 +STRI + V0 1.11022e-16 0.237037 2.88333 V1 -0.0638032 0.228728 2.88333 V2 -0.0875289 0.313617 2.98125 + N0 -2.42292e-15 0.747409 -0.664364 N1 -0.193465 0.721244 -0.665116 N2 -0.201937 0.753688 -0.625441 + txt003 +STRI + V0 -0.237037 0 2.88333 V1 -0.228728 0.0638032 2.88333 V2 -0.165279 0.0460445 2.78542 + N0 -0.747409 0 -0.664364 N1 -0.721244 0.193465 -0.665116 N2 -0.917897 0.246906 -0.310647 + txt003 +STRI + V0 -0.165279 0.0460445 2.78542 V1 -0.171296 0 2.78542 V2 -0.237037 0 2.88333 + N0 -0.917897 0.246906 -0.310647 N1 -0.950775 0 -0.309882 N2 -0.747409 0 -0.664364 + txt003 +STRI + V0 -0.228728 0.0638032 2.88333 V1 -0.20518 0.120647 2.88333 V2 -0.148234 0.0871056 2.78542 + N0 -0.721244 0.193465 -0.665116 N1 -0.645526 0.373497 -0.66618 N2 -0.822132 0.476337 -0.311772 + txt003 +STRI + V0 -0.148234 0.0871056 2.78542 V1 -0.165279 0.0460445 2.78542 V2 -0.228728 0.0638032 2.88333 + N0 -0.822132 0.476337 -0.311772 N1 -0.917897 0.246906 -0.310647 N2 -0.721244 0.193465 -0.665116 + txt003 +STRI + V0 -0.20518 0.120647 2.88333 V1 -0.168463 0.168463 2.88333 V2 -0.121672 0.121672 2.78542 + N0 -0.645526 0.373497 -0.66618 N1 -0.527081 0.527081 -0.666611 N2 -0.671754 0.671754 -0.312241 + txt003 +STRI + V0 -0.121672 0.121672 2.78542 V1 -0.148234 0.0871056 2.78542 V2 -0.20518 0.120647 2.88333 + N0 -0.671754 0.671754 -0.312241 N1 -0.822132 0.476337 -0.311772 N2 -0.645526 0.373497 -0.66618 + txt003 +STRI + V0 -0.168463 0.168463 2.88333 V1 -0.120647 0.20518 2.88333 V2 -0.0871056 0.148234 2.78542 + N0 -0.527081 0.527081 -0.666611 N1 -0.373497 0.645526 -0.66618 N2 -0.476337 0.822132 -0.311772 + txt003 +STRI + V0 -0.0871056 0.148234 2.78542 V1 -0.121672 0.121672 2.78542 V2 -0.168463 0.168463 2.88333 + N0 -0.476337 0.822132 -0.311772 N1 -0.671754 0.671754 -0.312241 N2 -0.527081 0.527081 -0.666611 + txt003 +STRI + V0 -0.120647 0.20518 2.88333 V1 -0.0638032 0.228728 2.88333 V2 -0.0460445 0.165279 2.78542 + N0 -0.373497 0.645526 -0.66618 N1 -0.193465 0.721244 -0.665116 N2 -0.246906 0.917897 -0.310647 + txt003 +STRI + V0 -0.0460445 0.165279 2.78542 V1 -0.0871056 0.148234 2.78542 V2 -0.120647 0.20518 2.88333 + N0 -0.246906 0.917897 -0.310647 N1 -0.476337 0.822132 -0.311772 N2 -0.373497 0.645526 -0.66618 + txt003 +STRI + V0 -0.0638032 0.228728 2.88333 V1 1.11022e-16 0.237037 2.88333 V2 6.66134e-16 0.171296 2.78542 + N0 -0.193465 0.721244 -0.665116 N1 -2.42292e-15 0.747409 -0.664364 N2 -2.16507e-15 0.950775 -0.309882 + txt003 +STRI + V0 6.66134e-16 0.171296 2.78542 V1 -0.0460445 0.165279 2.78542 V2 -0.0638032 0.228728 2.88333 + N0 -2.16507e-15 0.950775 -0.309882 N1 -0.246906 0.917897 -0.310647 N2 -0.193465 0.721244 -0.665116 + txt003 +STRI + V0 -0.171296 0 2.78542 V1 -0.165279 0.0460445 2.78542 V2 -0.192963 0.0537037 2.7 + N0 -0.950775 0 -0.309882 N1 -0.917897 0.246906 -0.310647 N2 -0.578783 0.15602 0.800417 + txt003 +STRI + V0 -0.192963 0.0537037 2.7 V1 -0.2 0 2.7 V2 -0.171296 0 2.78542 + N0 -0.578783 0.15602 0.800417 N1 -0.6 0 0.8 N2 -0.950775 0 -0.309882 + txt003 +STRI + V0 -0.165279 0.0460445 2.78542 V1 -0.148234 0.0871056 2.78542 V2 -0.173037 0.10163 2.7 + N0 -0.917897 0.246906 -0.310647 N1 -0.822132 0.476337 -0.311772 N2 -0.517905 0.300385 0.800964 + txt003 +STRI + V0 -0.173037 0.10163 2.7 V1 -0.192963 0.0537037 2.7 V2 -0.165279 0.0460445 2.78542 + N0 -0.517905 0.300385 0.800964 N1 -0.578783 0.15602 0.800417 N2 -0.917897 0.246906 -0.310647 + txt003 +STRI + V0 -0.148234 0.0871056 2.78542 V1 -0.121672 0.121672 2.78542 V2 -0.142 0.142 2.7 + N0 -0.822132 0.476337 -0.311772 N1 -0.671754 0.671754 -0.312241 N2 -0.423155 0.423155 0.801174 + txt003 +STRI + V0 -0.142 0.142 2.7 V1 -0.173037 0.10163 2.7 V2 -0.148234 0.0871056 2.78542 + N0 -0.423155 0.423155 0.801174 N1 -0.517905 0.300385 0.800964 N2 -0.822132 0.476337 -0.311772 + txt003 +STRI + V0 -0.121672 0.121672 2.78542 V1 -0.0871056 0.148234 2.78542 V2 -0.10163 0.173037 2.7 + N0 -0.671754 0.671754 -0.312241 N1 -0.476337 0.822132 -0.311772 N2 -0.300385 0.517905 0.800964 + txt003 +STRI + V0 -0.10163 0.173037 2.7 V1 -0.142 0.142 2.7 V2 -0.121672 0.121672 2.78542 + N0 -0.300385 0.517905 0.800964 N1 -0.423155 0.423155 0.801174 N2 -0.671754 0.671754 -0.312241 + txt003 +STRI + V0 -0.0871056 0.148234 2.78542 V1 -0.0460445 0.165279 2.78542 V2 -0.0537037 0.192963 2.7 + N0 -0.476337 0.822132 -0.311772 N1 -0.246906 0.917897 -0.310647 N2 -0.15602 0.578783 0.800417 + txt003 +STRI + V0 -0.0537037 0.192963 2.7 V1 -0.10163 0.173037 2.7 V2 -0.0871056 0.148234 2.78542 + N0 -0.15602 0.578783 0.800417 N1 -0.300385 0.517905 0.800964 N2 -0.476337 0.822132 -0.311772 + txt003 +STRI + V0 -0.0460445 0.165279 2.78542 V1 6.66134e-16 0.171296 2.78542 V2 0 0.2 2.7 + N0 -0.246906 0.917897 -0.310647 N1 -2.16507e-15 0.950775 -0.309882 N2 3.17207e-15 0.6 0.8 + txt003 +STRI + V0 0 0.2 2.7 V1 -0.0537037 0.192963 2.7 V2 -0.0460445 0.165279 2.78542 + N0 3.17207e-15 0.6 0.8 N1 -0.15602 0.578783 0.800417 N2 -0.246906 0.917897 -0.310647 + txt003 +STRI + V0 0.0750782 0.268946 3.12708 V1 0 0.278704 3.12708 V2 0 0 3.15 + N0 0.0645609 0.241077 0.968356 N1 -0 0.249998 0.968246 N2 0 0 1 + txt003 +STRI + V0 0.141931 0.241285 3.12708 V1 0.0750782 0.268946 3.12708 V2 0 0 3.15 + N0 0.124615 0.215548 0.968509 N1 0.0645609 0.241077 0.968356 N2 0 0 1 + txt003 +STRI + V0 0.19814 0.19814 3.12708 V1 0.141931 0.241285 3.12708 V2 0 0 3.15 + N0 0.175885 0.175885 0.96857 N1 0.124615 0.215548 0.968509 N2 0 0 1 + txt003 +STRI + V0 0.241285 0.141931 3.12708 V1 0.19814 0.19814 3.12708 V2 0 0 3.15 + N0 0.215548 0.124615 0.968509 N1 0.175885 0.175885 0.96857 N2 0 0 1 + txt003 +STRI + V0 0.268946 0.0750782 3.12708 V1 0.241285 0.141931 3.12708 V2 0 0 3.15 + N0 0.241077 0.0645609 0.968356 N1 0.215548 0.124615 0.968509 N2 0 0 1 + txt003 +STRI + V0 0.278704 0 3.12708 V1 0.268946 0.0750782 3.12708 V2 0 0 3.15 + N0 0.249998 -2.80184e-15 0.968246 N1 0.241077 0.0645609 0.968356 N2 0 0 1 + txt003 +STRI + V0 0 0.278704 3.12708 V1 0.0750782 0.268946 3.12708 V2 0.0977709 0.350254 3.06667 + N0 -0 0.249998 0.968246 N1 0.0645609 0.241077 0.968356 N2 0.255913 0.955496 0.146755 + txt003 +STRI + V0 0.0977709 0.350254 3.06667 V1 0 0.362963 3.06667 V2 0 0.278704 3.12708 + N0 0.255913 0.955496 0.146755 N1 -0 0.989203 0.146549 N2 -0 0.249998 0.968246 + txt003 +STRI + V0 0.0750782 0.268946 3.12708 V1 0.141931 0.241285 3.12708 V2 0.184834 0.314228 3.06667 + N0 0.0645609 0.241077 0.968356 N1 0.124615 0.215548 0.968509 N2 0.495088 0.856312 0.147029 + txt003 +STRI + V0 0.184834 0.314228 3.06667 V1 0.0977709 0.350254 3.06667 V2 0.0750782 0.268946 3.12708 + N0 0.495088 0.856312 0.147029 N1 0.255913 0.955496 0.146755 N2 0.0645609 0.241077 0.968356 + txt003 +STRI + V0 0.141931 0.241285 3.12708 V1 0.19814 0.19814 3.12708 V2 0.258037 0.258037 3.06667 + N0 0.124615 0.215548 0.968509 N1 0.175885 0.175885 0.96857 N2 0.699411 0.699411 0.147135 + txt003 +STRI + V0 0.258037 0.258037 3.06667 V1 0.184834 0.314228 3.06667 V2 0.141931 0.241285 3.12708 + N0 0.699411 0.699411 0.147135 N1 0.495088 0.856312 0.147029 N2 0.124615 0.215548 0.968509 + txt003 +STRI + V0 0.19814 0.19814 3.12708 V1 0.241285 0.141931 3.12708 V2 0.314228 0.184834 3.06667 + N0 0.175885 0.175885 0.96857 N1 0.215548 0.124615 0.968509 N2 0.856312 0.495088 0.147029 + txt003 +STRI + V0 0.314228 0.184834 3.06667 V1 0.258037 0.258037 3.06667 V2 0.19814 0.19814 3.12708 + N0 0.856312 0.495088 0.147029 N1 0.699411 0.699411 0.147135 N2 0.175885 0.175885 0.96857 + txt003 +STRI + V0 0.241285 0.141931 3.12708 V1 0.268946 0.0750782 3.12708 V2 0.350254 0.0977709 3.06667 + N0 0.215548 0.124615 0.968509 N1 0.241077 0.0645609 0.968356 N2 0.955496 0.255913 0.146755 + txt003 +STRI + V0 0.350254 0.0977709 3.06667 V1 0.314228 0.184834 3.06667 V2 0.241285 0.141931 3.12708 + N0 0.955496 0.255913 0.146755 N1 0.856312 0.495088 0.147029 N2 0.215548 0.124615 0.968509 + txt003 +STRI + V0 0.268946 0.0750782 3.12708 V1 0.278704 0 3.12708 V2 0.362963 0 3.06667 + N0 0.241077 0.0645609 0.968356 N1 0.249998 -2.80184e-15 0.968246 N2 0.989203 -4.98112e-16 0.146549 + txt003 +STRI + V0 0.362963 0 3.06667 V1 0.350254 0.0977709 3.06667 V2 0.268946 0.0750782 3.12708 + N0 0.989203 -4.98112e-16 0.146549 N1 0.955496 0.255913 0.146755 N2 0.241077 0.0645609 0.968356 + txt003 +STRI + V0 0 0.362963 3.06667 V1 0.0977709 0.350254 3.06667 V2 0.0875289 0.313617 2.98125 + N0 -0 0.989203 0.146549 N1 0.255913 0.955496 0.146755 N2 0.201937 0.753688 -0.625441 + txt003 +STRI + V0 0.0875289 0.313617 2.98125 V1 0 0.325 2.98125 V2 0 0.362963 3.06667 + N0 0.201937 0.753688 -0.625441 N1 0 0.780869 -0.624695 N2 -0 0.989203 0.146549 + txt003 +STRI + V0 0.0977709 0.350254 3.06667 V1 0.184834 0.314228 3.06667 V2 0.165481 0.281352 2.98125 + N0 0.255913 0.955496 0.146755 N1 0.495088 0.856312 0.147029 N2 0.390178 0.674735 -0.626493 + txt003 +STRI + V0 0.165481 0.281352 2.98125 V1 0.0875289 0.313617 2.98125 V2 0.0977709 0.350254 3.06667 + N0 0.390178 0.674735 -0.626493 N1 0.201937 0.753688 -0.625441 N2 0.255913 0.955496 0.146755 + txt003 +STRI + V0 0.184834 0.314228 3.06667 V1 0.258037 0.258037 3.06667 V2 0.231031 0.231031 2.98125 + N0 0.495088 0.856312 0.147029 N1 0.699411 0.699411 0.147135 N2 0.550896 0.550896 -0.626919 + txt003 +STRI + V0 0.231031 0.231031 2.98125 V1 0.165481 0.281352 2.98125 V2 0.184834 0.314228 3.06667 + N0 0.550896 0.550896 -0.626919 N1 0.390178 0.674735 -0.626493 N2 0.495088 0.856312 0.147029 + txt003 +STRI + V0 0.258037 0.258037 3.06667 V1 0.314228 0.184834 3.06667 V2 0.281352 0.165481 2.98125 + N0 0.699411 0.699411 0.147135 N1 0.856312 0.495088 0.147029 N2 0.674735 0.390178 -0.626493 + txt003 +STRI + V0 0.281352 0.165481 2.98125 V1 0.231031 0.231031 2.98125 V2 0.258037 0.258037 3.06667 + N0 0.674735 0.390178 -0.626493 N1 0.550896 0.550896 -0.626919 N2 0.699411 0.699411 0.147135 + txt003 +STRI + V0 0.314228 0.184834 3.06667 V1 0.350254 0.0977709 3.06667 V2 0.313617 0.0875289 2.98125 + N0 0.856312 0.495088 0.147029 N1 0.955496 0.255913 0.146755 N2 0.753688 0.201937 -0.625441 + txt003 +STRI + V0 0.313617 0.0875289 2.98125 V1 0.281352 0.165481 2.98125 V2 0.314228 0.184834 3.06667 + N0 0.753688 0.201937 -0.625441 N1 0.674735 0.390178 -0.626493 N2 0.856312 0.495088 0.147029 + txt003 +STRI + V0 0.350254 0.0977709 3.06667 V1 0.362963 0 3.06667 V2 0.325 -1.11022e-16 2.98125 + N0 0.955496 0.255913 0.146755 N1 0.989203 -4.98112e-16 0.146549 N2 0.780869 1.51803e-15 -0.624695 + txt003 +STRI + V0 0.325 -1.11022e-16 2.98125 V1 0.313617 0.0875289 2.98125 V2 0.350254 0.0977709 3.06667 + N0 0.780869 1.51803e-15 -0.624695 N1 0.753688 0.201937 -0.625441 N2 0.955496 0.255913 0.146755 + txt003 +STRI + V0 0 0.325 2.98125 V1 0.0875289 0.313617 2.98125 V2 0.0638032 0.228728 2.88333 + N0 0 0.780869 -0.624695 N1 0.201937 0.753688 -0.625441 N2 0.193465 0.721244 -0.665116 + txt003 +STRI + V0 0.0638032 0.228728 2.88333 V1 0 0.237037 2.88333 V2 0 0.325 2.98125 + N0 0.193465 0.721244 -0.665116 N1 0 0.747409 -0.664364 N2 0 0.780869 -0.624695 + txt003 +STRI + V0 0.0875289 0.313617 2.98125 V1 0.165481 0.281352 2.98125 V2 0.120647 0.20518 2.88333 + N0 0.201937 0.753688 -0.625441 N1 0.390178 0.674735 -0.626493 N2 0.373497 0.645526 -0.66618 + txt003 +STRI + V0 0.120647 0.20518 2.88333 V1 0.0638032 0.228728 2.88333 V2 0.0875289 0.313617 2.98125 + N0 0.373497 0.645526 -0.66618 N1 0.193465 0.721244 -0.665116 N2 0.201937 0.753688 -0.625441 + txt003 +STRI + V0 0.165481 0.281352 2.98125 V1 0.231031 0.231031 2.98125 V2 0.168463 0.168463 2.88333 + N0 0.390178 0.674735 -0.626493 N1 0.550896 0.550896 -0.626919 N2 0.527081 0.527081 -0.666611 + txt003 +STRI + V0 0.168463 0.168463 2.88333 V1 0.120647 0.20518 2.88333 V2 0.165481 0.281352 2.98125 + N0 0.527081 0.527081 -0.666611 N1 0.373497 0.645526 -0.66618 N2 0.390178 0.674735 -0.626493 + txt003 +STRI + V0 0.231031 0.231031 2.98125 V1 0.281352 0.165481 2.98125 V2 0.20518 0.120647 2.88333 + N0 0.550896 0.550896 -0.626919 N1 0.674735 0.390178 -0.626493 N2 0.645526 0.373497 -0.66618 + txt003 +STRI + V0 0.20518 0.120647 2.88333 V1 0.168463 0.168463 2.88333 V2 0.231031 0.231031 2.98125 + N0 0.645526 0.373497 -0.66618 N1 0.527081 0.527081 -0.666611 N2 0.550896 0.550896 -0.626919 + txt003 +STRI + V0 0.281352 0.165481 2.98125 V1 0.313617 0.0875289 2.98125 V2 0.228728 0.0638032 2.88333 + N0 0.674735 0.390178 -0.626493 N1 0.753688 0.201937 -0.625441 N2 0.721244 0.193465 -0.665116 + txt003 +STRI + V0 0.228728 0.0638032 2.88333 V1 0.20518 0.120647 2.88333 V2 0.281352 0.165481 2.98125 + N0 0.721244 0.193465 -0.665116 N1 0.645526 0.373497 -0.66618 N2 0.674735 0.390178 -0.626493 + txt003 +STRI + V0 0.313617 0.0875289 2.98125 V1 0.325 -1.11022e-16 2.98125 V2 0.237037 -1.11022e-16 2.88333 + N0 0.753688 0.201937 -0.625441 N1 0.780869 1.51803e-15 -0.624695 N2 0.747409 2.42292e-15 -0.664364 + txt003 +STRI + V0 0.237037 -1.11022e-16 2.88333 V1 0.228728 0.0638032 2.88333 V2 0.313617 0.0875289 2.98125 + N0 0.747409 2.42292e-15 -0.664364 N1 0.721244 0.193465 -0.665116 N2 0.753688 0.201937 -0.625441 + txt003 +STRI + V0 0 0.237037 2.88333 V1 0.0638032 0.228728 2.88333 V2 0.0460445 0.165279 2.78542 + N0 0 0.747409 -0.664364 N1 0.193465 0.721244 -0.665116 N2 0.246906 0.917897 -0.310647 + txt003 +STRI + V0 0.0460445 0.165279 2.78542 V1 0 0.171296 2.78542 V2 0 0.237037 2.88333 + N0 0.246906 0.917897 -0.310647 N1 0 0.950775 -0.309882 N2 0 0.747409 -0.664364 + txt003 +STRI + V0 0.0638032 0.228728 2.88333 V1 0.120647 0.20518 2.88333 V2 0.0871056 0.148234 2.78542 + N0 0.193465 0.721244 -0.665116 N1 0.373497 0.645526 -0.66618 N2 0.476337 0.822132 -0.311772 + txt003 +STRI + V0 0.0871056 0.148234 2.78542 V1 0.0460445 0.165279 2.78542 V2 0.0638032 0.228728 2.88333 + N0 0.476337 0.822132 -0.311772 N1 0.246906 0.917897 -0.310647 N2 0.193465 0.721244 -0.665116 + txt003 +STRI + V0 0.120647 0.20518 2.88333 V1 0.168463 0.168463 2.88333 V2 0.121672 0.121672 2.78542 + N0 0.373497 0.645526 -0.66618 N1 0.527081 0.527081 -0.666611 N2 0.671754 0.671754 -0.312241 + txt003 +STRI + V0 0.121672 0.121672 2.78542 V1 0.0871056 0.148234 2.78542 V2 0.120647 0.20518 2.88333 + N0 0.671754 0.671754 -0.312241 N1 0.476337 0.822132 -0.311772 N2 0.373497 0.645526 -0.66618 + txt003 +STRI + V0 0.168463 0.168463 2.88333 V1 0.20518 0.120647 2.88333 V2 0.148234 0.0871056 2.78542 + N0 0.527081 0.527081 -0.666611 N1 0.645526 0.373497 -0.66618 N2 0.822132 0.476337 -0.311772 + txt003 +STRI + V0 0.148234 0.0871056 2.78542 V1 0.121672 0.121672 2.78542 V2 0.168463 0.168463 2.88333 + N0 0.822132 0.476337 -0.311772 N1 0.671754 0.671754 -0.312241 N2 0.527081 0.527081 -0.666611 + txt003 +STRI + V0 0.20518 0.120647 2.88333 V1 0.228728 0.0638032 2.88333 V2 0.165279 0.0460445 2.78542 + N0 0.645526 0.373497 -0.66618 N1 0.721244 0.193465 -0.665116 N2 0.917897 0.246906 -0.310647 + txt003 +STRI + V0 0.165279 0.0460445 2.78542 V1 0.148234 0.0871056 2.78542 V2 0.20518 0.120647 2.88333 + N0 0.917897 0.246906 -0.310647 N1 0.822132 0.476337 -0.311772 N2 0.645526 0.373497 -0.66618 + txt003 +STRI + V0 0.228728 0.0638032 2.88333 V1 0.237037 -1.11022e-16 2.88333 V2 0.171296 -6.66134e-16 2.78542 + N0 0.721244 0.193465 -0.665116 N1 0.747409 2.42292e-15 -0.664364 N2 0.950775 2.16507e-15 -0.309882 + txt003 +STRI + V0 0.171296 -6.66134e-16 2.78542 V1 0.165279 0.0460445 2.78542 V2 0.228728 0.0638032 2.88333 + N0 0.950775 2.16507e-15 -0.309882 N1 0.917897 0.246906 -0.310647 N2 0.721244 0.193465 -0.665116 + txt003 +STRI + V0 0 0.171296 2.78542 V1 0.0460445 0.165279 2.78542 V2 0.0537037 0.192963 2.7 + N0 0 0.950775 -0.309882 N1 0.246906 0.917897 -0.310647 N2 0.15602 0.578783 0.800417 + txt003 +STRI + V0 0.0537037 0.192963 2.7 V1 0 0.2 2.7 V2 0 0.171296 2.78542 + N0 0.15602 0.578783 0.800417 N1 -0 0.6 0.8 N2 0 0.950775 -0.309882 + txt003 +STRI + V0 0.0460445 0.165279 2.78542 V1 0.0871056 0.148234 2.78542 V2 0.10163 0.173037 2.7 + N0 0.246906 0.917897 -0.310647 N1 0.476337 0.822132 -0.311772 N2 0.300385 0.517905 0.800964 + txt003 +STRI + V0 0.10163 0.173037 2.7 V1 0.0537037 0.192963 2.7 V2 0.0460445 0.165279 2.78542 + N0 0.300385 0.517905 0.800964 N1 0.15602 0.578783 0.800417 N2 0.246906 0.917897 -0.310647 + txt003 +STRI + V0 0.0871056 0.148234 2.78542 V1 0.121672 0.121672 2.78542 V2 0.142 0.142 2.7 + N0 0.476337 0.822132 -0.311772 N1 0.671754 0.671754 -0.312241 N2 0.423155 0.423155 0.801174 + txt003 +STRI + V0 0.142 0.142 2.7 V1 0.10163 0.173037 2.7 V2 0.0871056 0.148234 2.78542 + N0 0.423155 0.423155 0.801174 N1 0.300385 0.517905 0.800964 N2 0.476337 0.822132 -0.311772 + txt003 +STRI + V0 0.121672 0.121672 2.78542 V1 0.148234 0.0871056 2.78542 V2 0.173037 0.10163 2.7 + N0 0.671754 0.671754 -0.312241 N1 0.822132 0.476337 -0.311772 N2 0.517905 0.300385 0.800964 + txt003 +STRI + V0 0.173037 0.10163 2.7 V1 0.142 0.142 2.7 V2 0.121672 0.121672 2.78542 + N0 0.517905 0.300385 0.800964 N1 0.423155 0.423155 0.801174 N2 0.671754 0.671754 -0.312241 + txt003 +STRI + V0 0.148234 0.0871056 2.78542 V1 0.165279 0.0460445 2.78542 V2 0.192963 0.0537037 2.7 + N0 0.822132 0.476337 -0.311772 N1 0.917897 0.246906 -0.310647 N2 0.578783 0.15602 0.800417 + txt003 +STRI + V0 0.192963 0.0537037 2.7 V1 0.173037 0.10163 2.7 V2 0.148234 0.0871056 2.78542 + N0 0.578783 0.15602 0.800417 N1 0.517905 0.300385 0.800964 N2 0.822132 0.476337 -0.311772 + txt003 +STRI + V0 0.165279 0.0460445 2.78542 V1 0.171296 -6.66134e-16 2.78542 V2 0.2 0 2.7 + N0 0.917897 0.246906 -0.310647 N1 0.950775 2.16507e-15 -0.309882 N2 0.6 -3.17207e-15 0.8 + txt003 +STRI + V0 0.2 0 2.7 V1 0.192963 0.0537037 2.7 V2 0.165279 0.0460445 2.78542 + N0 0.6 -3.17207e-15 0.8 N1 0.578783 0.15602 0.800417 N2 0.917897 0.246906 -0.310647 + txt003 +STRI + V0 0.2 0 2.7 V1 0.192963 -0.0537037 2.7 V2 0.338579 -0.0942301 2.63611 + N0 0.6 0 0.8 N1 0.578783 -0.15602 0.800417 N2 0.258756 -0.0697517 0.963421 + txt003 +STRI + V0 0.338579 -0.0942301 2.63611 V1 0.350926 0 2.63611 V2 0.2 0 2.7 + N0 0.258756 -0.0697517 0.963421 N1 0.268354 0 0.96332 N2 0.6 0 0.8 + txt003 +STRI + V0 0.192963 -0.0537037 2.7 V1 0.173037 -0.10163 2.7 V2 0.303616 -0.178322 2.63611 + N0 0.578783 -0.15602 0.800417 N1 0.517905 -0.300385 0.800964 N2 0.231413 -0.134219 0.963552 + txt003 +STRI + V0 0.303616 -0.178322 2.63611 V1 0.338579 -0.0942301 2.63611 V2 0.192963 -0.0537037 2.7 + N0 0.231413 -0.134219 0.963552 N1 0.258756 -0.0697517 0.963421 N2 0.578783 -0.15602 0.800417 + txt003 +STRI + V0 0.173037 -0.10163 2.7 V1 0.142 -0.142 2.7 V2 0.249157 -0.249157 2.63611 + N0 0.517905 -0.300385 0.800964 N1 0.423155 -0.423155 0.801174 N2 0.189037 -0.189037 0.963603 + txt003 +STRI + V0 0.249157 -0.249157 2.63611 V1 0.303616 -0.178322 2.63611 V2 0.173037 -0.10163 2.7 + N0 0.189037 -0.189037 0.963603 N1 0.231413 -0.134219 0.963552 N2 0.517905 -0.300385 0.800964 + txt003 +STRI + V0 0.142 -0.142 2.7 V1 0.10163 -0.173037 2.7 V2 0.178322 -0.303616 2.63611 + N0 0.423155 -0.423155 0.801174 N1 0.300385 -0.517905 0.800964 N2 0.134219 -0.231413 0.963552 + txt003 +STRI + V0 0.178322 -0.303616 2.63611 V1 0.249157 -0.249157 2.63611 V2 0.142 -0.142 2.7 + N0 0.134219 -0.231413 0.963552 N1 0.189037 -0.189037 0.963603 N2 0.423155 -0.423155 0.801174 + txt003 +STRI + V0 0.10163 -0.173037 2.7 V1 0.0537037 -0.192963 2.7 V2 0.0942301 -0.338579 2.63611 + N0 0.300385 -0.517905 0.800964 N1 0.15602 -0.578783 0.800417 N2 0.0697517 -0.258756 0.963421 + txt003 +STRI + V0 0.0942301 -0.338579 2.63611 V1 0.178322 -0.303616 2.63611 V2 0.10163 -0.173037 2.7 + N0 0.0697517 -0.258756 0.963421 N1 0.134219 -0.231413 0.963552 N2 0.300385 -0.517905 0.800964 + txt003 +STRI + V0 0.0537037 -0.192963 2.7 V1 0 -0.2 2.7 V2 5.55112e-17 -0.350926 2.63611 + N0 0.15602 -0.578783 0.800417 N1 -9.91271e-17 -0.6 0.8 N2 0 -0.268354 0.96332 + txt003 +STRI + V0 5.55112e-17 -0.350926 2.63611 V1 0.0942301 -0.338579 2.63611 V2 0.0537037 -0.192963 2.7 + N0 0 -0.268354 0.96332 N1 0.0697517 -0.258756 0.963421 N2 0.15602 -0.578783 0.800417 + txt003 +STRI + V0 0.350926 0 2.63611 V1 0.338579 -0.0942301 2.63611 V2 0.553875 -0.15415 2.58889 + N0 0.268354 0 0.96332 N1 0.258756 -0.0697517 0.963421 N2 0.162011 -0.0436726 0.985822 + txt003 +STRI + V0 0.553875 -0.15415 2.58889 V1 0.574074 0 2.58889 V2 0.350926 0 2.63611 + N0 0.162011 -0.0436726 0.985822 N1 0.168031 0 0.985782 N2 0.268354 0 0.96332 + txt003 +STRI + V0 0.338579 -0.0942301 2.63611 V1 0.303616 -0.178322 2.63611 V2 0.49668 -0.291715 2.58889 + N0 0.258756 -0.0697517 0.963421 N1 0.231413 -0.134219 0.963552 N2 0.144879 -0.0840299 0.985875 + txt003 +STRI + V0 0.49668 -0.291715 2.58889 V1 0.553875 -0.15415 2.58889 V2 0.338579 -0.0942301 2.63611 + N0 0.144879 -0.0840299 0.985875 N1 0.162011 -0.0436726 0.985822 N2 0.258756 -0.0697517 0.963421 + txt003 +STRI + V0 0.303616 -0.178322 2.63611 V1 0.249157 -0.249157 2.63611 V2 0.407593 -0.407593 2.58889 + N0 0.231413 -0.134219 0.963552 N1 0.189037 -0.189037 0.963603 N2 0.118345 -0.118345 0.985895 + txt003 +STRI + V0 0.407593 -0.407593 2.58889 V1 0.49668 -0.291715 2.58889 V2 0.303616 -0.178322 2.63611 + N0 0.118345 -0.118345 0.985895 N1 0.144879 -0.0840299 0.985875 N2 0.231413 -0.134219 0.963552 + txt003 +STRI + V0 0.249157 -0.249157 2.63611 V1 0.178322 -0.303616 2.63611 V2 0.291715 -0.49668 2.58889 + N0 0.189037 -0.189037 0.963603 N1 0.134219 -0.231413 0.963552 N2 0.0840299 -0.144879 0.985875 + txt003 +STRI + V0 0.291715 -0.49668 2.58889 V1 0.407593 -0.407593 2.58889 V2 0.249157 -0.249157 2.63611 + N0 0.0840299 -0.144879 0.985875 N1 0.118345 -0.118345 0.985895 N2 0.189037 -0.189037 0.963603 + txt003 +STRI + V0 0.178322 -0.303616 2.63611 V1 0.0942301 -0.338579 2.63611 V2 0.15415 -0.553875 2.58889 + N0 0.134219 -0.231413 0.963552 N1 0.0697517 -0.258756 0.963421 N2 0.0436726 -0.162011 0.985822 + txt003 +STRI + V0 0.15415 -0.553875 2.58889 V1 0.291715 -0.49668 2.58889 V2 0.178322 -0.303616 2.63611 + N0 0.0436726 -0.162011 0.985822 N1 0.0840299 -0.144879 0.985875 N2 0.134219 -0.231413 0.963552 + txt003 +STRI + V0 0.0942301 -0.338579 2.63611 V1 5.55112e-17 -0.350926 2.63611 V2 2.22045e-16 -0.574074 2.58889 + N0 0.0697517 -0.258756 0.963421 N1 0 -0.268354 0.96332 N2 -1.93429e-17 -0.168031 0.985782 + txt003 +STRI + V0 2.22045e-16 -0.574074 2.58889 V1 0.15415 -0.553875 2.58889 V2 0.0942301 -0.338579 2.63611 + N0 -1.93429e-17 -0.168031 0.985782 N1 0.0436726 -0.162011 0.985822 N2 0.0697517 -0.258756 0.963421 + txt003 +STRI + V0 0.574074 0 2.58889 V1 0.553875 -0.15415 2.58889 V2 0.795972 -0.221528 2.55 + N0 0.168031 0 0.985782 N1 0.162011 -0.0436726 0.985822 N2 0.143025 -0.0385545 0.988968 + txt003 +STRI + V0 0.795972 -0.221528 2.55 V1 0.825 0 2.55 V2 0.574074 0 2.58889 + N0 0.143025 -0.0385545 0.988968 N1 0.14834 0 0.988936 N2 0.168031 0 0.985782 + txt003 +STRI + V0 0.553875 -0.15415 2.58889 V1 0.49668 -0.291715 2.58889 V2 0.713778 -0.419222 2.55 + N0 0.162011 -0.0436726 0.985822 N1 0.144879 -0.0840299 0.985875 N2 0.127899 -0.0741814 0.989009 + txt003 +STRI + V0 0.713778 -0.419222 2.55 V1 0.795972 -0.221528 2.55 V2 0.553875 -0.15415 2.58889 + N0 0.127899 -0.0741814 0.989009 N1 0.143025 -0.0385545 0.988968 N2 0.162011 -0.0436726 0.985822 + txt003 +STRI + V0 0.49668 -0.291715 2.58889 V1 0.407593 -0.407593 2.58889 V2 0.58575 -0.58575 2.55 + N0 0.144879 -0.0840299 0.985875 N1 0.118345 -0.118345 0.985895 N2 0.104474 -0.104474 0.989025 + txt003 +STRI + V0 0.58575 -0.58575 2.55 V1 0.713778 -0.419222 2.55 V2 0.49668 -0.291715 2.58889 + N0 0.104474 -0.104474 0.989025 N1 0.127899 -0.0741814 0.989009 N2 0.144879 -0.0840299 0.985875 + txt003 +STRI + V0 0.407593 -0.407593 2.58889 V1 0.291715 -0.49668 2.58889 V2 0.419222 -0.713778 2.55 + N0 0.118345 -0.118345 0.985895 N1 0.0840299 -0.144879 0.985875 N2 0.0741814 -0.127899 0.989009 + txt003 +STRI + V0 0.419222 -0.713778 2.55 V1 0.58575 -0.58575 2.55 V2 0.407593 -0.407593 2.58889 + N0 0.0741814 -0.127899 0.989009 N1 0.104474 -0.104474 0.989025 N2 0.118345 -0.118345 0.985895 + txt003 +STRI + V0 0.291715 -0.49668 2.58889 V1 0.15415 -0.553875 2.58889 V2 0.221528 -0.795972 2.55 + N0 0.0840299 -0.144879 0.985875 N1 0.0436726 -0.162011 0.985822 N2 0.0385545 -0.143025 0.988968 + txt003 +STRI + V0 0.221528 -0.795972 2.55 V1 0.419222 -0.713778 2.55 V2 0.291715 -0.49668 2.58889 + N0 0.0385545 -0.143025 0.988968 N1 0.0741814 -0.127899 0.989009 N2 0.0840299 -0.144879 0.985875 + txt003 +STRI + V0 0.15415 -0.553875 2.58889 V1 2.22045e-16 -0.574074 2.58889 V2 1.11022e-16 -0.825 2.55 + N0 0.0436726 -0.162011 0.985822 N1 -1.93429e-17 -0.168031 0.985782 N2 -2.37649e-17 -0.14834 0.988936 + txt003 +STRI + V0 1.11022e-16 -0.825 2.55 V1 0.221528 -0.795972 2.55 V2 0.15415 -0.553875 2.58889 + N0 -2.37649e-17 -0.14834 0.988936 N1 0.0385545 -0.143025 0.988968 N2 0.0436726 -0.162011 0.985822 + txt003 +STRI + V0 0.825 0 2.55 V1 0.795972 -0.221528 2.55 V2 1.02199 -0.284431 2.51111 + N0 0.14834 0 0.988936 N1 0.143025 -0.0385545 0.988968 N2 0.186699 -0.0503275 0.981127 + txt003 +STRI + V0 1.02199 -0.284431 2.51111 V1 1.05926 0 2.51111 V2 0.825 0 2.55 + N0 0.186699 -0.0503275 0.981127 N1 0.193633 0 0.981074 N2 0.14834 0 0.988936 + txt003 +STRI + V0 0.795972 -0.221528 2.55 V1 0.713778 -0.419222 2.55 V2 0.916455 -0.538261 2.51111 + N0 0.143025 -0.0385545 0.988968 N1 0.127899 -0.0741814 0.989009 N2 0.166959 -0.0968361 0.981197 + txt003 +STRI + V0 0.916455 -0.538261 2.51111 V1 1.02199 -0.284431 2.51111 V2 0.795972 -0.221528 2.55 + N0 0.166959 -0.0968361 0.981197 N1 0.186699 -0.0503275 0.981127 N2 0.143025 -0.0385545 0.988968 + txt003 +STRI + V0 0.713778 -0.419222 2.55 V1 0.58575 -0.58575 2.55 V2 0.752074 -0.752074 2.51111 + N0 0.127899 -0.0741814 0.989009 N1 0.104474 -0.104474 0.989025 N2 0.136382 -0.136382 0.981224 + txt003 +STRI + V0 0.752074 -0.752074 2.51111 V1 0.916455 -0.538261 2.51111 V2 0.713778 -0.419222 2.55 + N0 0.136382 -0.136382 0.981224 N1 0.166959 -0.0968361 0.981197 N2 0.127899 -0.0741814 0.989009 + txt003 +STRI + V0 0.58575 -0.58575 2.55 V1 0.419222 -0.713778 2.55 V2 0.538261 -0.916455 2.51111 + N0 0.104474 -0.104474 0.989025 N1 0.0741814 -0.127899 0.989009 N2 0.0968361 -0.166959 0.981197 + txt003 +STRI + V0 0.538261 -0.916455 2.51111 V1 0.752074 -0.752074 2.51111 V2 0.58575 -0.58575 2.55 + N0 0.0968361 -0.166959 0.981197 N1 0.136382 -0.136382 0.981224 N2 0.104474 -0.104474 0.989025 + txt003 +STRI + V0 0.419222 -0.713778 2.55 V1 0.221528 -0.795972 2.55 V2 0.284431 -1.02199 2.51111 + N0 0.0741814 -0.127899 0.989009 N1 0.0385545 -0.143025 0.988968 N2 0.0503275 -0.186699 0.981127 + txt003 +STRI + V0 0.284431 -1.02199 2.51111 V1 0.538261 -0.916455 2.51111 V2 0.419222 -0.713778 2.55 + N0 0.0503275 -0.186699 0.981127 N1 0.0968361 -0.166959 0.981197 N2 0.0741814 -0.127899 0.989009 + txt003 +STRI + V0 0.221528 -0.795972 2.55 V1 1.11022e-16 -0.825 2.55 V2 4.44089e-16 -1.05926 2.51111 + N0 0.0385545 -0.143025 0.988968 N1 -2.37649e-17 -0.14834 0.988936 N2 -7.24819e-17 -0.193633 0.981074 + txt003 +STRI + V0 4.44089e-16 -1.05926 2.51111 V1 0.284431 -1.02199 2.51111 V2 0.221528 -0.795972 2.55 + N0 -7.24819e-17 -0.193633 0.981074 N1 0.0503275 -0.186699 0.981127 N2 0.0385545 -0.143025 0.988968 + txt003 +STRI + V0 1.05926 0 2.51111 V1 1.02199 -0.284431 2.51111 V2 1.18904 -0.330924 2.46389 + N0 0.193633 0 0.981074 N1 0.186699 -0.0503275 0.981127 N2 0.376378 -0.101459 0.920894 + txt003 +STRI + V0 1.18904 -0.330924 2.46389 V1 1.23241 0 2.46389 V2 1.05926 0 2.51111 + N0 0.376378 -0.101459 0.920894 N1 0.390293 0 0.920691 N2 0.193633 0 0.981074 + txt003 +STRI + V0 1.02199 -0.284431 2.51111 V1 0.916455 -0.538261 2.51111 V2 1.06626 -0.626246 2.46389 + N0 0.186699 -0.0503275 0.981127 N1 0.166959 -0.0968361 0.981197 N2 0.336657 -0.195261 0.92116 + txt003 +STRI + V0 1.06626 -0.626246 2.46389 V1 1.18904 -0.330924 2.46389 V2 1.02199 -0.284431 2.51111 + N0 0.336657 -0.195261 0.92116 N1 0.376378 -0.101459 0.920894 N2 0.186699 -0.0503275 0.981127 + txt003 +STRI + V0 0.916455 -0.538261 2.51111 V1 0.752074 -0.752074 2.51111 V2 0.875009 -0.875009 2.46389 + N0 0.166959 -0.0968361 0.981197 N1 0.136382 -0.136382 0.981224 N2 0.275025 -0.275025 0.921262 + txt003 +STRI + V0 0.875009 -0.875009 2.46389 V1 1.06626 -0.626246 2.46389 V2 0.916455 -0.538261 2.51111 + N0 0.275025 -0.275025 0.921262 N1 0.336657 -0.195261 0.92116 N2 0.166959 -0.0968361 0.981197 + txt003 +STRI + V0 0.752074 -0.752074 2.51111 V1 0.538261 -0.916455 2.51111 V2 0.626246 -1.06626 2.46389 + N0 0.136382 -0.136382 0.981224 N1 0.0968361 -0.166959 0.981197 N2 0.195261 -0.336657 0.92116 + txt003 +STRI + V0 0.626246 -1.06626 2.46389 V1 0.875009 -0.875009 2.46389 V2 0.752074 -0.752074 2.51111 + N0 0.195261 -0.336657 0.92116 N1 0.275025 -0.275025 0.921262 N2 0.136382 -0.136382 0.981224 + txt003 +STRI + V0 0.538261 -0.916455 2.51111 V1 0.284431 -1.02199 2.51111 V2 0.330924 -1.18904 2.46389 + N0 0.0968361 -0.166959 0.981197 N1 0.0503275 -0.186699 0.981127 N2 0.101459 -0.376378 0.920894 + txt003 +STRI + V0 0.330924 -1.18904 2.46389 V1 0.626246 -1.06626 2.46389 V2 0.538261 -0.916455 2.51111 + N0 0.101459 -0.376378 0.920894 N1 0.195261 -0.336657 0.92116 N2 0.0968361 -0.166959 0.981197 + txt003 +STRI + V0 0.284431 -1.02199 2.51111 V1 4.44089e-16 -1.05926 2.51111 V2 4.44089e-16 -1.23241 2.46389 + N0 0.0503275 -0.186699 0.981127 N1 -7.24819e-17 -0.193633 0.981074 N2 -8.37138e-17 -0.390293 0.920691 + txt003 +STRI + V0 4.44089e-16 -1.23241 2.46389 V1 0.330924 -1.18904 2.46389 V2 0.284431 -1.02199 2.51111 + N0 -8.37138e-17 -0.390293 0.920691 N1 0.101459 -0.376378 0.920894 N2 0.0503275 -0.186699 0.981127 + txt003 +STRI + V0 1.23241 0 2.46389 V1 1.18904 -0.330924 2.46389 V2 1.25426 -0.349074 2.4 + N0 0.390293 0 0.920691 N1 0.376378 -0.101459 0.920894 N2 0.965535 -0.260275 -1.02004e-15 + txt003 +STRI + V0 1.25426 -0.349074 2.4 V1 1.3 0 2.4 V2 1.23241 0 2.46389 + N0 0.965535 -0.260275 -1.02004e-15 N1 1 0 -9.86865e-16 N2 0.390293 0 0.920691 + txt003 +STRI + V0 1.18904 -0.330924 2.46389 V1 1.06626 -0.626246 2.46389 V2 1.12474 -0.660593 2.4 + N0 0.376378 -0.101459 0.920894 N1 0.336657 -0.195261 0.92116 N2 0.865031 -0.501718 -9.69705e-16 + txt003 +STRI + V0 1.12474 -0.660593 2.4 V1 1.25426 -0.349074 2.4 V2 1.18904 -0.330924 2.46389 + N0 0.865031 -0.501718 -9.69705e-16 N1 0.965535 -0.260275 -1.02004e-15 N2 0.376378 -0.101459 0.920894 + txt003 +STRI + V0 1.06626 -0.626246 2.46389 V1 0.875009 -0.875009 2.46389 V2 0.923 -0.923 2.4 + N0 0.336657 -0.195261 0.92116 N1 0.275025 -0.275025 0.921262 N2 0.707107 -0.707107 -7.41433e-16 + txt003 +STRI + V0 0.923 -0.923 2.4 V1 1.12474 -0.660593 2.4 V2 1.06626 -0.626246 2.46389 + N0 0.707107 -0.707107 -7.41433e-16 N1 0.865031 -0.501718 -9.69705e-16 N2 0.336657 -0.195261 0.92116 + txt003 +STRI + V0 0.875009 -0.875009 2.46389 V1 0.626246 -1.06626 2.46389 V2 0.660593 -1.12474 2.4 + N0 0.275025 -0.275025 0.921262 N1 0.195261 -0.336657 0.92116 N2 0.501718 -0.865031 -4.67305e-16 + txt003 +STRI + V0 0.660593 -1.12474 2.4 V1 0.923 -0.923 2.4 V2 0.875009 -0.875009 2.46389 + N0 0.501718 -0.865031 -4.67305e-16 N1 0.707107 -0.707107 -7.41433e-16 N2 0.275025 -0.275025 0.921262 + txt003 +STRI + V0 0.626246 -1.06626 2.46389 V1 0.330924 -1.18904 2.46389 V2 0.349074 -1.25426 2.4 + N0 0.195261 -0.336657 0.92116 N1 0.101459 -0.376378 0.920894 N2 0.260275 -0.965535 -5.24893e-16 + txt003 +STRI + V0 0.349074 -1.25426 2.4 V1 0.660593 -1.12474 2.4 V2 0.626246 -1.06626 2.46389 + N0 0.260275 -0.965535 -5.24893e-16 N1 0.501718 -0.865031 -4.67305e-16 N2 0.195261 -0.336657 0.92116 + txt003 +STRI + V0 0.330924 -1.18904 2.46389 V1 4.44089e-16 -1.23241 2.46389 V2 6.66134e-16 -1.3 2.4 + N0 0.101459 -0.376378 0.920894 N1 -8.37138e-17 -0.390293 0.920691 N2 -4.06675e-16 -1 -1.4803e-15 + txt003 +STRI + V0 6.66134e-16 -1.3 2.4 V1 0.349074 -1.25426 2.4 V2 0.330924 -1.18904 2.46389 + N0 -4.06675e-16 -1 -1.4803e-15 N1 0.260275 -0.965535 -5.24893e-16 N2 0.101459 -0.376378 0.920894 + txt003 +STRI + V0 0 -0.2 2.7 V1 -0.0537037 -0.192963 2.7 V2 -0.0942301 -0.338579 2.63611 + N0 0 -0.6 0.8 N1 -0.15602 -0.578783 0.800417 N2 -0.0697517 -0.258756 0.963421 + txt003 +STRI + V0 -0.0942301 -0.338579 2.63611 V1 0 -0.350926 2.63611 V2 0 -0.2 2.7 + N0 -0.0697517 -0.258756 0.963421 N1 0 -0.268354 0.96332 N2 0 -0.6 0.8 + txt003 +STRI + V0 -0.0537037 -0.192963 2.7 V1 -0.10163 -0.173037 2.7 V2 -0.178322 -0.303616 2.63611 + N0 -0.15602 -0.578783 0.800417 N1 -0.300385 -0.517905 0.800964 N2 -0.134219 -0.231413 0.963552 + txt003 +STRI + V0 -0.178322 -0.303616 2.63611 V1 -0.0942301 -0.338579 2.63611 V2 -0.0537037 -0.192963 2.7 + N0 -0.134219 -0.231413 0.963552 N1 -0.0697517 -0.258756 0.963421 N2 -0.15602 -0.578783 0.800417 + txt003 +STRI + V0 -0.10163 -0.173037 2.7 V1 -0.142 -0.142 2.7 V2 -0.249157 -0.249157 2.63611 + N0 -0.300385 -0.517905 0.800964 N1 -0.423155 -0.423155 0.801174 N2 -0.189037 -0.189037 0.963603 + txt003 +STRI + V0 -0.249157 -0.249157 2.63611 V1 -0.178322 -0.303616 2.63611 V2 -0.10163 -0.173037 2.7 + N0 -0.189037 -0.189037 0.963603 N1 -0.134219 -0.231413 0.963552 N2 -0.300385 -0.517905 0.800964 + txt003 +STRI + V0 -0.142 -0.142 2.7 V1 -0.173037 -0.10163 2.7 V2 -0.303616 -0.178322 2.63611 + N0 -0.423155 -0.423155 0.801174 N1 -0.517905 -0.300385 0.800964 N2 -0.231413 -0.134219 0.963552 + txt003 +STRI + V0 -0.303616 -0.178322 2.63611 V1 -0.249157 -0.249157 2.63611 V2 -0.142 -0.142 2.7 + N0 -0.231413 -0.134219 0.963552 N1 -0.189037 -0.189037 0.963603 N2 -0.423155 -0.423155 0.801174 + txt003 +STRI + V0 -0.173037 -0.10163 2.7 V1 -0.192963 -0.0537037 2.7 V2 -0.338579 -0.0942301 2.63611 + N0 -0.517905 -0.300385 0.800964 N1 -0.578783 -0.15602 0.800417 N2 -0.258756 -0.0697517 0.963421 + txt003 +STRI + V0 -0.338579 -0.0942301 2.63611 V1 -0.303616 -0.178322 2.63611 V2 -0.173037 -0.10163 2.7 + N0 -0.258756 -0.0697517 0.963421 N1 -0.231413 -0.134219 0.963552 N2 -0.517905 -0.300385 0.800964 + txt003 +STRI + V0 -0.192963 -0.0537037 2.7 V1 -0.2 0 2.7 V2 -0.350926 -5.55112e-17 2.63611 + N0 -0.578783 -0.15602 0.800417 N1 -0.6 9.91271e-17 0.8 N2 -0.268354 0 0.96332 + txt003 +STRI + V0 -0.350926 -5.55112e-17 2.63611 V1 -0.338579 -0.0942301 2.63611 V2 -0.192963 -0.0537037 2.7 + N0 -0.268354 0 0.96332 N1 -0.258756 -0.0697517 0.963421 N2 -0.578783 -0.15602 0.800417 + txt003 +STRI + V0 0 -0.350926 2.63611 V1 -0.0942301 -0.338579 2.63611 V2 -0.15415 -0.553875 2.58889 + N0 0 -0.268354 0.96332 N1 -0.0697517 -0.258756 0.963421 N2 -0.0436726 -0.162011 0.985822 + txt003 +STRI + V0 -0.15415 -0.553875 2.58889 V1 0 -0.574074 2.58889 V2 0 -0.350926 2.63611 + N0 -0.0436726 -0.162011 0.985822 N1 0 -0.168031 0.985782 N2 0 -0.268354 0.96332 + txt003 +STRI + V0 -0.0942301 -0.338579 2.63611 V1 -0.178322 -0.303616 2.63611 V2 -0.291715 -0.49668 2.58889 + N0 -0.0697517 -0.258756 0.963421 N1 -0.134219 -0.231413 0.963552 N2 -0.0840299 -0.144879 0.985875 + txt003 +STRI + V0 -0.291715 -0.49668 2.58889 V1 -0.15415 -0.553875 2.58889 V2 -0.0942301 -0.338579 2.63611 + N0 -0.0840299 -0.144879 0.985875 N1 -0.0436726 -0.162011 0.985822 N2 -0.0697517 -0.258756 0.963421 + txt003 +STRI + V0 -0.178322 -0.303616 2.63611 V1 -0.249157 -0.249157 2.63611 V2 -0.407593 -0.407593 2.58889 + N0 -0.134219 -0.231413 0.963552 N1 -0.189037 -0.189037 0.963603 N2 -0.118345 -0.118345 0.985895 + txt003 +STRI + V0 -0.407593 -0.407593 2.58889 V1 -0.291715 -0.49668 2.58889 V2 -0.178322 -0.303616 2.63611 + N0 -0.118345 -0.118345 0.985895 N1 -0.0840299 -0.144879 0.985875 N2 -0.134219 -0.231413 0.963552 + txt003 +STRI + V0 -0.249157 -0.249157 2.63611 V1 -0.303616 -0.178322 2.63611 V2 -0.49668 -0.291715 2.58889 + N0 -0.189037 -0.189037 0.963603 N1 -0.231413 -0.134219 0.963552 N2 -0.144879 -0.0840299 0.985875 + txt003 +STRI + V0 -0.49668 -0.291715 2.58889 V1 -0.407593 -0.407593 2.58889 V2 -0.249157 -0.249157 2.63611 + N0 -0.144879 -0.0840299 0.985875 N1 -0.118345 -0.118345 0.985895 N2 -0.189037 -0.189037 0.963603 + txt003 +STRI + V0 -0.303616 -0.178322 2.63611 V1 -0.338579 -0.0942301 2.63611 V2 -0.553875 -0.15415 2.58889 + N0 -0.231413 -0.134219 0.963552 N1 -0.258756 -0.0697517 0.963421 N2 -0.162011 -0.0436726 0.985822 + txt003 +STRI + V0 -0.553875 -0.15415 2.58889 V1 -0.49668 -0.291715 2.58889 V2 -0.303616 -0.178322 2.63611 + N0 -0.162011 -0.0436726 0.985822 N1 -0.144879 -0.0840299 0.985875 N2 -0.231413 -0.134219 0.963552 + txt003 +STRI + V0 -0.338579 -0.0942301 2.63611 V1 -0.350926 -5.55112e-17 2.63611 V2 -0.574074 -2.22045e-16 2.58889 + N0 -0.258756 -0.0697517 0.963421 N1 -0.268354 0 0.96332 N2 -0.168031 1.93429e-17 0.985782 + txt003 +STRI + V0 -0.574074 -2.22045e-16 2.58889 V1 -0.553875 -0.15415 2.58889 V2 -0.338579 -0.0942301 2.63611 + N0 -0.168031 1.93429e-17 0.985782 N1 -0.162011 -0.0436726 0.985822 N2 -0.258756 -0.0697517 0.963421 + txt003 +STRI + V0 0 -0.574074 2.58889 V1 -0.15415 -0.553875 2.58889 V2 -0.221528 -0.795972 2.55 + N0 0 -0.168031 0.985782 N1 -0.0436726 -0.162011 0.985822 N2 -0.0385545 -0.143025 0.988968 + txt003 +STRI + V0 -0.221528 -0.795972 2.55 V1 0 -0.825 2.55 V2 0 -0.574074 2.58889 + N0 -0.0385545 -0.143025 0.988968 N1 0 -0.14834 0.988936 N2 0 -0.168031 0.985782 + txt003 +STRI + V0 -0.15415 -0.553875 2.58889 V1 -0.291715 -0.49668 2.58889 V2 -0.419222 -0.713778 2.55 + N0 -0.0436726 -0.162011 0.985822 N1 -0.0840299 -0.144879 0.985875 N2 -0.0741814 -0.127899 0.989009 + txt003 +STRI + V0 -0.419222 -0.713778 2.55 V1 -0.221528 -0.795972 2.55 V2 -0.15415 -0.553875 2.58889 + N0 -0.0741814 -0.127899 0.989009 N1 -0.0385545 -0.143025 0.988968 N2 -0.0436726 -0.162011 0.985822 + txt003 +STRI + V0 -0.291715 -0.49668 2.58889 V1 -0.407593 -0.407593 2.58889 V2 -0.58575 -0.58575 2.55 + N0 -0.0840299 -0.144879 0.985875 N1 -0.118345 -0.118345 0.985895 N2 -0.104474 -0.104474 0.989025 + txt003 +STRI + V0 -0.58575 -0.58575 2.55 V1 -0.419222 -0.713778 2.55 V2 -0.291715 -0.49668 2.58889 + N0 -0.104474 -0.104474 0.989025 N1 -0.0741814 -0.127899 0.989009 N2 -0.0840299 -0.144879 0.985875 + txt003 +STRI + V0 -0.407593 -0.407593 2.58889 V1 -0.49668 -0.291715 2.58889 V2 -0.713778 -0.419222 2.55 + N0 -0.118345 -0.118345 0.985895 N1 -0.144879 -0.0840299 0.985875 N2 -0.127899 -0.0741814 0.989009 + txt003 +STRI + V0 -0.713778 -0.419222 2.55 V1 -0.58575 -0.58575 2.55 V2 -0.407593 -0.407593 2.58889 + N0 -0.127899 -0.0741814 0.989009 N1 -0.104474 -0.104474 0.989025 N2 -0.118345 -0.118345 0.985895 + txt003 +STRI + V0 -0.49668 -0.291715 2.58889 V1 -0.553875 -0.15415 2.58889 V2 -0.795972 -0.221528 2.55 + N0 -0.144879 -0.0840299 0.985875 N1 -0.162011 -0.0436726 0.985822 N2 -0.143025 -0.0385545 0.988968 + txt003 +STRI + V0 -0.795972 -0.221528 2.55 V1 -0.713778 -0.419222 2.55 V2 -0.49668 -0.291715 2.58889 + N0 -0.143025 -0.0385545 0.988968 N1 -0.127899 -0.0741814 0.989009 N2 -0.144879 -0.0840299 0.985875 + txt003 +STRI + V0 -0.553875 -0.15415 2.58889 V1 -0.574074 -2.22045e-16 2.58889 V2 -0.825 -1.11022e-16 2.55 + N0 -0.162011 -0.0436726 0.985822 N1 -0.168031 1.93429e-17 0.985782 N2 -0.14834 2.37649e-17 0.988936 + txt003 +STRI + V0 -0.825 -1.11022e-16 2.55 V1 -0.795972 -0.221528 2.55 V2 -0.553875 -0.15415 2.58889 + N0 -0.14834 2.37649e-17 0.988936 N1 -0.143025 -0.0385545 0.988968 N2 -0.162011 -0.0436726 0.985822 + txt003 +STRI + V0 0 -0.825 2.55 V1 -0.221528 -0.795972 2.55 V2 -0.284431 -1.02199 2.51111 + N0 0 -0.14834 0.988936 N1 -0.0385545 -0.143025 0.988968 N2 -0.0503275 -0.186699 0.981127 + txt003 +STRI + V0 -0.284431 -1.02199 2.51111 V1 0 -1.05926 2.51111 V2 0 -0.825 2.55 + N0 -0.0503275 -0.186699 0.981127 N1 0 -0.193633 0.981074 N2 0 -0.14834 0.988936 + txt003 +STRI + V0 -0.221528 -0.795972 2.55 V1 -0.419222 -0.713778 2.55 V2 -0.538261 -0.916455 2.51111 + N0 -0.0385545 -0.143025 0.988968 N1 -0.0741814 -0.127899 0.989009 N2 -0.0968361 -0.166959 0.981197 + txt003 +STRI + V0 -0.538261 -0.916455 2.51111 V1 -0.284431 -1.02199 2.51111 V2 -0.221528 -0.795972 2.55 + N0 -0.0968361 -0.166959 0.981197 N1 -0.0503275 -0.186699 0.981127 N2 -0.0385545 -0.143025 0.988968 + txt003 +STRI + V0 -0.419222 -0.713778 2.55 V1 -0.58575 -0.58575 2.55 V2 -0.752074 -0.752074 2.51111 + N0 -0.0741814 -0.127899 0.989009 N1 -0.104474 -0.104474 0.989025 N2 -0.136382 -0.136382 0.981224 + txt003 +STRI + V0 -0.752074 -0.752074 2.51111 V1 -0.538261 -0.916455 2.51111 V2 -0.419222 -0.713778 2.55 + N0 -0.136382 -0.136382 0.981224 N1 -0.0968361 -0.166959 0.981197 N2 -0.0741814 -0.127899 0.989009 + txt003 +STRI + V0 -0.58575 -0.58575 2.55 V1 -0.713778 -0.419222 2.55 V2 -0.916455 -0.538261 2.51111 + N0 -0.104474 -0.104474 0.989025 N1 -0.127899 -0.0741814 0.989009 N2 -0.166959 -0.0968361 0.981197 + txt003 +STRI + V0 -0.916455 -0.538261 2.51111 V1 -0.752074 -0.752074 2.51111 V2 -0.58575 -0.58575 2.55 + N0 -0.166959 -0.0968361 0.981197 N1 -0.136382 -0.136382 0.981224 N2 -0.104474 -0.104474 0.989025 + txt003 +STRI + V0 -0.713778 -0.419222 2.55 V1 -0.795972 -0.221528 2.55 V2 -1.02199 -0.284431 2.51111 + N0 -0.127899 -0.0741814 0.989009 N1 -0.143025 -0.0385545 0.988968 N2 -0.186699 -0.0503275 0.981127 + txt003 +STRI + V0 -1.02199 -0.284431 2.51111 V1 -0.916455 -0.538261 2.51111 V2 -0.713778 -0.419222 2.55 + N0 -0.186699 -0.0503275 0.981127 N1 -0.166959 -0.0968361 0.981197 N2 -0.127899 -0.0741814 0.989009 + txt003 +STRI + V0 -0.795972 -0.221528 2.55 V1 -0.825 -1.11022e-16 2.55 V2 -1.05926 -4.44089e-16 2.51111 + N0 -0.143025 -0.0385545 0.988968 N1 -0.14834 2.37649e-17 0.988936 N2 -0.193633 7.24819e-17 0.981074 + txt003 +STRI + V0 -1.05926 -4.44089e-16 2.51111 V1 -1.02199 -0.284431 2.51111 V2 -0.795972 -0.221528 2.55 + N0 -0.193633 7.24819e-17 0.981074 N1 -0.186699 -0.0503275 0.981127 N2 -0.143025 -0.0385545 0.988968 + txt003 +STRI + V0 0 -1.05926 2.51111 V1 -0.284431 -1.02199 2.51111 V2 -0.330924 -1.18904 2.46389 + N0 0 -0.193633 0.981074 N1 -0.0503275 -0.186699 0.981127 N2 -0.101459 -0.376378 0.920894 + txt003 +STRI + V0 -0.330924 -1.18904 2.46389 V1 0 -1.23241 2.46389 V2 0 -1.05926 2.51111 + N0 -0.101459 -0.376378 0.920894 N1 0 -0.390293 0.920691 N2 0 -0.193633 0.981074 + txt003 +STRI + V0 -0.284431 -1.02199 2.51111 V1 -0.538261 -0.916455 2.51111 V2 -0.626246 -1.06626 2.46389 + N0 -0.0503275 -0.186699 0.981127 N1 -0.0968361 -0.166959 0.981197 N2 -0.195261 -0.336657 0.92116 + txt003 +STRI + V0 -0.626246 -1.06626 2.46389 V1 -0.330924 -1.18904 2.46389 V2 -0.284431 -1.02199 2.51111 + N0 -0.195261 -0.336657 0.92116 N1 -0.101459 -0.376378 0.920894 N2 -0.0503275 -0.186699 0.981127 + txt003 +STRI + V0 -0.538261 -0.916455 2.51111 V1 -0.752074 -0.752074 2.51111 V2 -0.875009 -0.875009 2.46389 + N0 -0.0968361 -0.166959 0.981197 N1 -0.136382 -0.136382 0.981224 N2 -0.275025 -0.275025 0.921262 + txt003 +STRI + V0 -0.875009 -0.875009 2.46389 V1 -0.626246 -1.06626 2.46389 V2 -0.538261 -0.916455 2.51111 + N0 -0.275025 -0.275025 0.921262 N1 -0.195261 -0.336657 0.92116 N2 -0.0968361 -0.166959 0.981197 + txt003 +STRI + V0 -0.752074 -0.752074 2.51111 V1 -0.916455 -0.538261 2.51111 V2 -1.06626 -0.626246 2.46389 + N0 -0.136382 -0.136382 0.981224 N1 -0.166959 -0.0968361 0.981197 N2 -0.336657 -0.195261 0.92116 + txt003 +STRI + V0 -1.06626 -0.626246 2.46389 V1 -0.875009 -0.875009 2.46389 V2 -0.752074 -0.752074 2.51111 + N0 -0.336657 -0.195261 0.92116 N1 -0.275025 -0.275025 0.921262 N2 -0.136382 -0.136382 0.981224 + txt003 +STRI + V0 -0.916455 -0.538261 2.51111 V1 -1.02199 -0.284431 2.51111 V2 -1.18904 -0.330924 2.46389 + N0 -0.166959 -0.0968361 0.981197 N1 -0.186699 -0.0503275 0.981127 N2 -0.376378 -0.101459 0.920894 + txt003 +STRI + V0 -1.18904 -0.330924 2.46389 V1 -1.06626 -0.626246 2.46389 V2 -0.916455 -0.538261 2.51111 + N0 -0.376378 -0.101459 0.920894 N1 -0.336657 -0.195261 0.92116 N2 -0.166959 -0.0968361 0.981197 + txt003 +STRI + V0 -1.02199 -0.284431 2.51111 V1 -1.05926 -4.44089e-16 2.51111 V2 -1.23241 -4.44089e-16 2.46389 + N0 -0.186699 -0.0503275 0.981127 N1 -0.193633 7.24819e-17 0.981074 N2 -0.390293 8.37138e-17 0.920691 + txt003 +STRI + V0 -1.23241 -4.44089e-16 2.46389 V1 -1.18904 -0.330924 2.46389 V2 -1.02199 -0.284431 2.51111 + N0 -0.390293 8.37138e-17 0.920691 N1 -0.376378 -0.101459 0.920894 N2 -0.186699 -0.0503275 0.981127 + txt003 +STRI + V0 0 -1.23241 2.46389 V1 -0.330924 -1.18904 2.46389 V2 -0.349074 -1.25426 2.4 + N0 0 -0.390293 0.920691 N1 -0.101459 -0.376378 0.920894 N2 -0.260275 -0.965535 -1.02004e-15 + txt003 +STRI + V0 -0.349074 -1.25426 2.4 V1 0 -1.3 2.4 V2 0 -1.23241 2.46389 + N0 -0.260275 -0.965535 -1.02004e-15 N1 -0 -1 -9.86865e-16 N2 0 -0.390293 0.920691 + txt003 +STRI + V0 -0.330924 -1.18904 2.46389 V1 -0.626246 -1.06626 2.46389 V2 -0.660593 -1.12474 2.4 + N0 -0.101459 -0.376378 0.920894 N1 -0.195261 -0.336657 0.92116 N2 -0.501718 -0.865031 -9.69705e-16 + txt003 +STRI + V0 -0.660593 -1.12474 2.4 V1 -0.349074 -1.25426 2.4 V2 -0.330924 -1.18904 2.46389 + N0 -0.501718 -0.865031 -9.69705e-16 N1 -0.260275 -0.965535 -1.02004e-15 N2 -0.101459 -0.376378 0.920894 + txt003 +STRI + V0 -0.626246 -1.06626 2.46389 V1 -0.875009 -0.875009 2.46389 V2 -0.923 -0.923 2.4 + N0 -0.195261 -0.336657 0.92116 N1 -0.275025 -0.275025 0.921262 N2 -0.707107 -0.707107 -7.41433e-16 + txt003 +STRI + V0 -0.923 -0.923 2.4 V1 -0.660593 -1.12474 2.4 V2 -0.626246 -1.06626 2.46389 + N0 -0.707107 -0.707107 -7.41433e-16 N1 -0.501718 -0.865031 -9.69705e-16 N2 -0.195261 -0.336657 0.92116 + txt003 +STRI + V0 -0.875009 -0.875009 2.46389 V1 -1.06626 -0.626246 2.46389 V2 -1.12474 -0.660593 2.4 + N0 -0.275025 -0.275025 0.921262 N1 -0.336657 -0.195261 0.92116 N2 -0.865031 -0.501718 -4.67305e-16 + txt003 +STRI + V0 -1.12474 -0.660593 2.4 V1 -0.923 -0.923 2.4 V2 -0.875009 -0.875009 2.46389 + N0 -0.865031 -0.501718 -4.67305e-16 N1 -0.707107 -0.707107 -7.41433e-16 N2 -0.275025 -0.275025 0.921262 + txt003 +STRI + V0 -1.06626 -0.626246 2.46389 V1 -1.18904 -0.330924 2.46389 V2 -1.25426 -0.349074 2.4 + N0 -0.336657 -0.195261 0.92116 N1 -0.376378 -0.101459 0.920894 N2 -0.965535 -0.260275 -5.24893e-16 + txt003 +STRI + V0 -1.25426 -0.349074 2.4 V1 -1.12474 -0.660593 2.4 V2 -1.06626 -0.626246 2.46389 + N0 -0.965535 -0.260275 -5.24893e-16 N1 -0.865031 -0.501718 -4.67305e-16 N2 -0.336657 -0.195261 0.92116 + txt003 +STRI + V0 -1.18904 -0.330924 2.46389 V1 -1.23241 -4.44089e-16 2.46389 V2 -1.3 -6.66134e-16 2.4 + N0 -0.376378 -0.101459 0.920894 N1 -0.390293 8.37138e-17 0.920691 N2 -1 4.06675e-16 -1.4803e-15 + txt003 +STRI + V0 -1.3 -6.66134e-16 2.4 V1 -1.25426 -0.349074 2.4 V2 -1.18904 -0.330924 2.46389 + N0 -1 4.06675e-16 -1.4803e-15 N1 -0.965535 -0.260275 -5.24893e-16 N2 -0.376378 -0.101459 0.920894 + txt003 +STRI + V0 -0.2 0 2.7 V1 -0.192963 0.0537037 2.7 V2 -0.338579 0.0942301 2.63611 + N0 -0.6 0 0.8 N1 -0.578783 0.15602 0.800417 N2 -0.258756 0.0697517 0.963421 + txt003 +STRI + V0 -0.338579 0.0942301 2.63611 V1 -0.350926 0 2.63611 V2 -0.2 0 2.7 + N0 -0.258756 0.0697517 0.963421 N1 -0.268354 0 0.96332 N2 -0.6 0 0.8 + txt003 +STRI + V0 -0.192963 0.0537037 2.7 V1 -0.173037 0.10163 2.7 V2 -0.303616 0.178322 2.63611 + N0 -0.578783 0.15602 0.800417 N1 -0.517905 0.300385 0.800964 N2 -0.231413 0.134219 0.963552 + txt003 +STRI + V0 -0.303616 0.178322 2.63611 V1 -0.338579 0.0942301 2.63611 V2 -0.192963 0.0537037 2.7 + N0 -0.231413 0.134219 0.963552 N1 -0.258756 0.0697517 0.963421 N2 -0.578783 0.15602 0.800417 + txt003 +STRI + V0 -0.173037 0.10163 2.7 V1 -0.142 0.142 2.7 V2 -0.249157 0.249157 2.63611 + N0 -0.517905 0.300385 0.800964 N1 -0.423155 0.423155 0.801174 N2 -0.189037 0.189037 0.963603 + txt003 +STRI + V0 -0.249157 0.249157 2.63611 V1 -0.303616 0.178322 2.63611 V2 -0.173037 0.10163 2.7 + N0 -0.189037 0.189037 0.963603 N1 -0.231413 0.134219 0.963552 N2 -0.517905 0.300385 0.800964 + txt003 +STRI + V0 -0.142 0.142 2.7 V1 -0.10163 0.173037 2.7 V2 -0.178322 0.303616 2.63611 + N0 -0.423155 0.423155 0.801174 N1 -0.300385 0.517905 0.800964 N2 -0.134219 0.231413 0.963552 + txt003 +STRI + V0 -0.178322 0.303616 2.63611 V1 -0.249157 0.249157 2.63611 V2 -0.142 0.142 2.7 + N0 -0.134219 0.231413 0.963552 N1 -0.189037 0.189037 0.963603 N2 -0.423155 0.423155 0.801174 + txt003 +STRI + V0 -0.10163 0.173037 2.7 V1 -0.0537037 0.192963 2.7 V2 -0.0942301 0.338579 2.63611 + N0 -0.300385 0.517905 0.800964 N1 -0.15602 0.578783 0.800417 N2 -0.0697517 0.258756 0.963421 + txt003 +STRI + V0 -0.0942301 0.338579 2.63611 V1 -0.178322 0.303616 2.63611 V2 -0.10163 0.173037 2.7 + N0 -0.0697517 0.258756 0.963421 N1 -0.134219 0.231413 0.963552 N2 -0.300385 0.517905 0.800964 + txt003 +STRI + V0 -0.0537037 0.192963 2.7 V1 0 0.2 2.7 V2 -5.55112e-17 0.350926 2.63611 + N0 -0.15602 0.578783 0.800417 N1 9.91271e-17 0.6 0.8 N2 -0 0.268354 0.96332 + txt003 +STRI + V0 -5.55112e-17 0.350926 2.63611 V1 -0.0942301 0.338579 2.63611 V2 -0.0537037 0.192963 2.7 + N0 -0 0.268354 0.96332 N1 -0.0697517 0.258756 0.963421 N2 -0.15602 0.578783 0.800417 + txt003 +STRI + V0 -0.350926 0 2.63611 V1 -0.338579 0.0942301 2.63611 V2 -0.553875 0.15415 2.58889 + N0 -0.268354 0 0.96332 N1 -0.258756 0.0697517 0.963421 N2 -0.162011 0.0436726 0.985822 + txt003 +STRI + V0 -0.553875 0.15415 2.58889 V1 -0.574074 0 2.58889 V2 -0.350926 0 2.63611 + N0 -0.162011 0.0436726 0.985822 N1 -0.168031 0 0.985782 N2 -0.268354 0 0.96332 + txt003 +STRI + V0 -0.338579 0.0942301 2.63611 V1 -0.303616 0.178322 2.63611 V2 -0.49668 0.291715 2.58889 + N0 -0.258756 0.0697517 0.963421 N1 -0.231413 0.134219 0.963552 N2 -0.144879 0.0840299 0.985875 + txt003 +STRI + V0 -0.49668 0.291715 2.58889 V1 -0.553875 0.15415 2.58889 V2 -0.338579 0.0942301 2.63611 + N0 -0.144879 0.0840299 0.985875 N1 -0.162011 0.0436726 0.985822 N2 -0.258756 0.0697517 0.963421 + txt003 +STRI + V0 -0.303616 0.178322 2.63611 V1 -0.249157 0.249157 2.63611 V2 -0.407593 0.407593 2.58889 + N0 -0.231413 0.134219 0.963552 N1 -0.189037 0.189037 0.963603 N2 -0.118345 0.118345 0.985895 + txt003 +STRI + V0 -0.407593 0.407593 2.58889 V1 -0.49668 0.291715 2.58889 V2 -0.303616 0.178322 2.63611 + N0 -0.118345 0.118345 0.985895 N1 -0.144879 0.0840299 0.985875 N2 -0.231413 0.134219 0.963552 + txt003 +STRI + V0 -0.249157 0.249157 2.63611 V1 -0.178322 0.303616 2.63611 V2 -0.291715 0.49668 2.58889 + N0 -0.189037 0.189037 0.963603 N1 -0.134219 0.231413 0.963552 N2 -0.0840299 0.144879 0.985875 + txt003 +STRI + V0 -0.291715 0.49668 2.58889 V1 -0.407593 0.407593 2.58889 V2 -0.249157 0.249157 2.63611 + N0 -0.0840299 0.144879 0.985875 N1 -0.118345 0.118345 0.985895 N2 -0.189037 0.189037 0.963603 + txt003 +STRI + V0 -0.178322 0.303616 2.63611 V1 -0.0942301 0.338579 2.63611 V2 -0.15415 0.553875 2.58889 + N0 -0.134219 0.231413 0.963552 N1 -0.0697517 0.258756 0.963421 N2 -0.0436726 0.162011 0.985822 + txt003 +STRI + V0 -0.15415 0.553875 2.58889 V1 -0.291715 0.49668 2.58889 V2 -0.178322 0.303616 2.63611 + N0 -0.0436726 0.162011 0.985822 N1 -0.0840299 0.144879 0.985875 N2 -0.134219 0.231413 0.963552 + txt003 +STRI + V0 -0.0942301 0.338579 2.63611 V1 -5.55112e-17 0.350926 2.63611 V2 -2.22045e-16 0.574074 2.58889 + N0 -0.0697517 0.258756 0.963421 N1 -0 0.268354 0.96332 N2 1.93429e-17 0.168031 0.985782 + txt003 +STRI + V0 -2.22045e-16 0.574074 2.58889 V1 -0.15415 0.553875 2.58889 V2 -0.0942301 0.338579 2.63611 + N0 1.93429e-17 0.168031 0.985782 N1 -0.0436726 0.162011 0.985822 N2 -0.0697517 0.258756 0.963421 + txt003 +STRI + V0 -0.574074 0 2.58889 V1 -0.553875 0.15415 2.58889 V2 -0.795972 0.221528 2.55 + N0 -0.168031 0 0.985782 N1 -0.162011 0.0436726 0.985822 N2 -0.143025 0.0385545 0.988968 + txt003 +STRI + V0 -0.795972 0.221528 2.55 V1 -0.825 0 2.55 V2 -0.574074 0 2.58889 + N0 -0.143025 0.0385545 0.988968 N1 -0.14834 0 0.988936 N2 -0.168031 0 0.985782 + txt003 +STRI + V0 -0.553875 0.15415 2.58889 V1 -0.49668 0.291715 2.58889 V2 -0.713778 0.419222 2.55 + N0 -0.162011 0.0436726 0.985822 N1 -0.144879 0.0840299 0.985875 N2 -0.127899 0.0741814 0.989009 + txt003 +STRI + V0 -0.713778 0.419222 2.55 V1 -0.795972 0.221528 2.55 V2 -0.553875 0.15415 2.58889 + N0 -0.127899 0.0741814 0.989009 N1 -0.143025 0.0385545 0.988968 N2 -0.162011 0.0436726 0.985822 + txt003 +STRI + V0 -0.49668 0.291715 2.58889 V1 -0.407593 0.407593 2.58889 V2 -0.58575 0.58575 2.55 + N0 -0.144879 0.0840299 0.985875 N1 -0.118345 0.118345 0.985895 N2 -0.104474 0.104474 0.989025 + txt003 +STRI + V0 -0.58575 0.58575 2.55 V1 -0.713778 0.419222 2.55 V2 -0.49668 0.291715 2.58889 + N0 -0.104474 0.104474 0.989025 N1 -0.127899 0.0741814 0.989009 N2 -0.144879 0.0840299 0.985875 + txt003 +STRI + V0 -0.407593 0.407593 2.58889 V1 -0.291715 0.49668 2.58889 V2 -0.419222 0.713778 2.55 + N0 -0.118345 0.118345 0.985895 N1 -0.0840299 0.144879 0.985875 N2 -0.0741814 0.127899 0.989009 + txt003 +STRI + V0 -0.419222 0.713778 2.55 V1 -0.58575 0.58575 2.55 V2 -0.407593 0.407593 2.58889 + N0 -0.0741814 0.127899 0.989009 N1 -0.104474 0.104474 0.989025 N2 -0.118345 0.118345 0.985895 + txt003 +STRI + V0 -0.291715 0.49668 2.58889 V1 -0.15415 0.553875 2.58889 V2 -0.221528 0.795972 2.55 + N0 -0.0840299 0.144879 0.985875 N1 -0.0436726 0.162011 0.985822 N2 -0.0385545 0.143025 0.988968 + txt003 +STRI + V0 -0.221528 0.795972 2.55 V1 -0.419222 0.713778 2.55 V2 -0.291715 0.49668 2.58889 + N0 -0.0385545 0.143025 0.988968 N1 -0.0741814 0.127899 0.989009 N2 -0.0840299 0.144879 0.985875 + txt003 +STRI + V0 -0.15415 0.553875 2.58889 V1 -2.22045e-16 0.574074 2.58889 V2 -1.11022e-16 0.825 2.55 + N0 -0.0436726 0.162011 0.985822 N1 1.93429e-17 0.168031 0.985782 N2 2.37649e-17 0.14834 0.988936 + txt003 +STRI + V0 -1.11022e-16 0.825 2.55 V1 -0.221528 0.795972 2.55 V2 -0.15415 0.553875 2.58889 + N0 2.37649e-17 0.14834 0.988936 N1 -0.0385545 0.143025 0.988968 N2 -0.0436726 0.162011 0.985822 + txt003 +STRI + V0 -0.825 0 2.55 V1 -0.795972 0.221528 2.55 V2 -1.02199 0.284431 2.51111 + N0 -0.14834 0 0.988936 N1 -0.143025 0.0385545 0.988968 N2 -0.186699 0.0503275 0.981127 + txt003 +STRI + V0 -1.02199 0.284431 2.51111 V1 -1.05926 0 2.51111 V2 -0.825 0 2.55 + N0 -0.186699 0.0503275 0.981127 N1 -0.193633 0 0.981074 N2 -0.14834 0 0.988936 + txt003 +STRI + V0 -0.795972 0.221528 2.55 V1 -0.713778 0.419222 2.55 V2 -0.916455 0.538261 2.51111 + N0 -0.143025 0.0385545 0.988968 N1 -0.127899 0.0741814 0.989009 N2 -0.166959 0.0968361 0.981197 + txt003 +STRI + V0 -0.916455 0.538261 2.51111 V1 -1.02199 0.284431 2.51111 V2 -0.795972 0.221528 2.55 + N0 -0.166959 0.0968361 0.981197 N1 -0.186699 0.0503275 0.981127 N2 -0.143025 0.0385545 0.988968 + txt003 +STRI + V0 -0.713778 0.419222 2.55 V1 -0.58575 0.58575 2.55 V2 -0.752074 0.752074 2.51111 + N0 -0.127899 0.0741814 0.989009 N1 -0.104474 0.104474 0.989025 N2 -0.136382 0.136382 0.981224 + txt003 +STRI + V0 -0.752074 0.752074 2.51111 V1 -0.916455 0.538261 2.51111 V2 -0.713778 0.419222 2.55 + N0 -0.136382 0.136382 0.981224 N1 -0.166959 0.0968361 0.981197 N2 -0.127899 0.0741814 0.989009 + txt003 +STRI + V0 -0.58575 0.58575 2.55 V1 -0.419222 0.713778 2.55 V2 -0.538261 0.916455 2.51111 + N0 -0.104474 0.104474 0.989025 N1 -0.0741814 0.127899 0.989009 N2 -0.0968361 0.166959 0.981197 + txt003 +STRI + V0 -0.538261 0.916455 2.51111 V1 -0.752074 0.752074 2.51111 V2 -0.58575 0.58575 2.55 + N0 -0.0968361 0.166959 0.981197 N1 -0.136382 0.136382 0.981224 N2 -0.104474 0.104474 0.989025 + txt003 +STRI + V0 -0.419222 0.713778 2.55 V1 -0.221528 0.795972 2.55 V2 -0.284431 1.02199 2.51111 + N0 -0.0741814 0.127899 0.989009 N1 -0.0385545 0.143025 0.988968 N2 -0.0503275 0.186699 0.981127 + txt003 +STRI + V0 -0.284431 1.02199 2.51111 V1 -0.538261 0.916455 2.51111 V2 -0.419222 0.713778 2.55 + N0 -0.0503275 0.186699 0.981127 N1 -0.0968361 0.166959 0.981197 N2 -0.0741814 0.127899 0.989009 + txt003 +STRI + V0 -0.221528 0.795972 2.55 V1 -1.11022e-16 0.825 2.55 V2 -4.44089e-16 1.05926 2.51111 + N0 -0.0385545 0.143025 0.988968 N1 2.37649e-17 0.14834 0.988936 N2 7.24819e-17 0.193633 0.981074 + txt003 +STRI + V0 -4.44089e-16 1.05926 2.51111 V1 -0.284431 1.02199 2.51111 V2 -0.221528 0.795972 2.55 + N0 7.24819e-17 0.193633 0.981074 N1 -0.0503275 0.186699 0.981127 N2 -0.0385545 0.143025 0.988968 + txt003 +STRI + V0 -1.05926 0 2.51111 V1 -1.02199 0.284431 2.51111 V2 -1.18904 0.330924 2.46389 + N0 -0.193633 0 0.981074 N1 -0.186699 0.0503275 0.981127 N2 -0.376378 0.101459 0.920894 + txt003 +STRI + V0 -1.18904 0.330924 2.46389 V1 -1.23241 0 2.46389 V2 -1.05926 0 2.51111 + N0 -0.376378 0.101459 0.920894 N1 -0.390293 0 0.920691 N2 -0.193633 0 0.981074 + txt003 +STRI + V0 -1.02199 0.284431 2.51111 V1 -0.916455 0.538261 2.51111 V2 -1.06626 0.626246 2.46389 + N0 -0.186699 0.0503275 0.981127 N1 -0.166959 0.0968361 0.981197 N2 -0.336657 0.195261 0.92116 + txt003 +STRI + V0 -1.06626 0.626246 2.46389 V1 -1.18904 0.330924 2.46389 V2 -1.02199 0.284431 2.51111 + N0 -0.336657 0.195261 0.92116 N1 -0.376378 0.101459 0.920894 N2 -0.186699 0.0503275 0.981127 + txt003 +STRI + V0 -0.916455 0.538261 2.51111 V1 -0.752074 0.752074 2.51111 V2 -0.875009 0.875009 2.46389 + N0 -0.166959 0.0968361 0.981197 N1 -0.136382 0.136382 0.981224 N2 -0.275025 0.275025 0.921262 + txt003 +STRI + V0 -0.875009 0.875009 2.46389 V1 -1.06626 0.626246 2.46389 V2 -0.916455 0.538261 2.51111 + N0 -0.275025 0.275025 0.921262 N1 -0.336657 0.195261 0.92116 N2 -0.166959 0.0968361 0.981197 + txt003 +STRI + V0 -0.752074 0.752074 2.51111 V1 -0.538261 0.916455 2.51111 V2 -0.626246 1.06626 2.46389 + N0 -0.136382 0.136382 0.981224 N1 -0.0968361 0.166959 0.981197 N2 -0.195261 0.336657 0.92116 + txt003 +STRI + V0 -0.626246 1.06626 2.46389 V1 -0.875009 0.875009 2.46389 V2 -0.752074 0.752074 2.51111 + N0 -0.195261 0.336657 0.92116 N1 -0.275025 0.275025 0.921262 N2 -0.136382 0.136382 0.981224 + txt003 +STRI + V0 -0.538261 0.916455 2.51111 V1 -0.284431 1.02199 2.51111 V2 -0.330924 1.18904 2.46389 + N0 -0.0968361 0.166959 0.981197 N1 -0.0503275 0.186699 0.981127 N2 -0.101459 0.376378 0.920894 + txt003 +STRI + V0 -0.330924 1.18904 2.46389 V1 -0.626246 1.06626 2.46389 V2 -0.538261 0.916455 2.51111 + N0 -0.101459 0.376378 0.920894 N1 -0.195261 0.336657 0.92116 N2 -0.0968361 0.166959 0.981197 + txt003 +STRI + V0 -0.284431 1.02199 2.51111 V1 -4.44089e-16 1.05926 2.51111 V2 -4.44089e-16 1.23241 2.46389 + N0 -0.0503275 0.186699 0.981127 N1 7.24819e-17 0.193633 0.981074 N2 8.37138e-17 0.390293 0.920691 + txt003 +STRI + V0 -4.44089e-16 1.23241 2.46389 V1 -0.330924 1.18904 2.46389 V2 -0.284431 1.02199 2.51111 + N0 8.37138e-17 0.390293 0.920691 N1 -0.101459 0.376378 0.920894 N2 -0.0503275 0.186699 0.981127 + txt003 +STRI + V0 -1.23241 0 2.46389 V1 -1.18904 0.330924 2.46389 V2 -1.25426 0.349074 2.4 + N0 -0.390293 0 0.920691 N1 -0.376378 0.101459 0.920894 N2 -0.965535 0.260275 -1.02004e-15 + txt003 +STRI + V0 -1.25426 0.349074 2.4 V1 -1.3 0 2.4 V2 -1.23241 0 2.46389 + N0 -0.965535 0.260275 -1.02004e-15 N1 -1 0 -9.86865e-16 N2 -0.390293 0 0.920691 + txt003 +STRI + V0 -1.18904 0.330924 2.46389 V1 -1.06626 0.626246 2.46389 V2 -1.12474 0.660593 2.4 + N0 -0.376378 0.101459 0.920894 N1 -0.336657 0.195261 0.92116 N2 -0.865031 0.501718 -9.69705e-16 + txt003 +STRI + V0 -1.12474 0.660593 2.4 V1 -1.25426 0.349074 2.4 V2 -1.18904 0.330924 2.46389 + N0 -0.865031 0.501718 -9.69705e-16 N1 -0.965535 0.260275 -1.02004e-15 N2 -0.376378 0.101459 0.920894 + txt003 +STRI + V0 -1.06626 0.626246 2.46389 V1 -0.875009 0.875009 2.46389 V2 -0.923 0.923 2.4 + N0 -0.336657 0.195261 0.92116 N1 -0.275025 0.275025 0.921262 N2 -0.707107 0.707107 -7.41433e-16 + txt003 +STRI + V0 -0.923 0.923 2.4 V1 -1.12474 0.660593 2.4 V2 -1.06626 0.626246 2.46389 + N0 -0.707107 0.707107 -7.41433e-16 N1 -0.865031 0.501718 -9.69705e-16 N2 -0.336657 0.195261 0.92116 + txt003 +STRI + V0 -0.875009 0.875009 2.46389 V1 -0.626246 1.06626 2.46389 V2 -0.660593 1.12474 2.4 + N0 -0.275025 0.275025 0.921262 N1 -0.195261 0.336657 0.92116 N2 -0.501718 0.865031 -4.67305e-16 + txt003 +STRI + V0 -0.660593 1.12474 2.4 V1 -0.923 0.923 2.4 V2 -0.875009 0.875009 2.46389 + N0 -0.501718 0.865031 -4.67305e-16 N1 -0.707107 0.707107 -7.41433e-16 N2 -0.275025 0.275025 0.921262 + txt003 +STRI + V0 -0.626246 1.06626 2.46389 V1 -0.330924 1.18904 2.46389 V2 -0.349074 1.25426 2.4 + N0 -0.195261 0.336657 0.92116 N1 -0.101459 0.376378 0.920894 N2 -0.260275 0.965535 -5.24893e-16 + txt003 +STRI + V0 -0.349074 1.25426 2.4 V1 -0.660593 1.12474 2.4 V2 -0.626246 1.06626 2.46389 + N0 -0.260275 0.965535 -5.24893e-16 N1 -0.501718 0.865031 -4.67305e-16 N2 -0.195261 0.336657 0.92116 + txt003 +STRI + V0 -0.330924 1.18904 2.46389 V1 -4.44089e-16 1.23241 2.46389 V2 -6.66134e-16 1.3 2.4 + N0 -0.101459 0.376378 0.920894 N1 8.37138e-17 0.390293 0.920691 N2 4.06675e-16 1 -1.4803e-15 + txt003 +STRI + V0 -6.66134e-16 1.3 2.4 V1 -0.349074 1.25426 2.4 V2 -0.330924 1.18904 2.46389 + N0 4.06675e-16 1 -1.4803e-15 N1 -0.260275 0.965535 -5.24893e-16 N2 -0.101459 0.376378 0.920894 + txt003 +STRI + V0 0 0.2 2.7 V1 0.0537037 0.192963 2.7 V2 0.0942301 0.338579 2.63611 + N0 -0 0.6 0.8 N1 0.15602 0.578783 0.800417 N2 0.0697517 0.258756 0.963421 + txt003 +STRI + V0 0.0942301 0.338579 2.63611 V1 0 0.350926 2.63611 V2 0 0.2 2.7 + N0 0.0697517 0.258756 0.963421 N1 -0 0.268354 0.96332 N2 -0 0.6 0.8 + txt003 +STRI + V0 0.0537037 0.192963 2.7 V1 0.10163 0.173037 2.7 V2 0.178322 0.303616 2.63611 + N0 0.15602 0.578783 0.800417 N1 0.300385 0.517905 0.800964 N2 0.134219 0.231413 0.963552 + txt003 +STRI + V0 0.178322 0.303616 2.63611 V1 0.0942301 0.338579 2.63611 V2 0.0537037 0.192963 2.7 + N0 0.134219 0.231413 0.963552 N1 0.0697517 0.258756 0.963421 N2 0.15602 0.578783 0.800417 + txt003 +STRI + V0 0.10163 0.173037 2.7 V1 0.142 0.142 2.7 V2 0.249157 0.249157 2.63611 + N0 0.300385 0.517905 0.800964 N1 0.423155 0.423155 0.801174 N2 0.189037 0.189037 0.963603 + txt003 +STRI + V0 0.249157 0.249157 2.63611 V1 0.178322 0.303616 2.63611 V2 0.10163 0.173037 2.7 + N0 0.189037 0.189037 0.963603 N1 0.134219 0.231413 0.963552 N2 0.300385 0.517905 0.800964 + txt003 +STRI + V0 0.142 0.142 2.7 V1 0.173037 0.10163 2.7 V2 0.303616 0.178322 2.63611 + N0 0.423155 0.423155 0.801174 N1 0.517905 0.300385 0.800964 N2 0.231413 0.134219 0.963552 + txt003 +STRI + V0 0.303616 0.178322 2.63611 V1 0.249157 0.249157 2.63611 V2 0.142 0.142 2.7 + N0 0.231413 0.134219 0.963552 N1 0.189037 0.189037 0.963603 N2 0.423155 0.423155 0.801174 + txt003 +STRI + V0 0.173037 0.10163 2.7 V1 0.192963 0.0537037 2.7 V2 0.338579 0.0942301 2.63611 + N0 0.517905 0.300385 0.800964 N1 0.578783 0.15602 0.800417 N2 0.258756 0.0697517 0.963421 + txt003 +STRI + V0 0.338579 0.0942301 2.63611 V1 0.303616 0.178322 2.63611 V2 0.173037 0.10163 2.7 + N0 0.258756 0.0697517 0.963421 N1 0.231413 0.134219 0.963552 N2 0.517905 0.300385 0.800964 + txt003 +STRI + V0 0.192963 0.0537037 2.7 V1 0.2 0 2.7 V2 0.350926 5.55112e-17 2.63611 + N0 0.578783 0.15602 0.800417 N1 0.6 -9.91271e-17 0.8 N2 0.268354 0 0.96332 + txt003 +STRI + V0 0.350926 5.55112e-17 2.63611 V1 0.338579 0.0942301 2.63611 V2 0.192963 0.0537037 2.7 + N0 0.268354 0 0.96332 N1 0.258756 0.0697517 0.963421 N2 0.578783 0.15602 0.800417 + txt003 +STRI + V0 0 0.350926 2.63611 V1 0.0942301 0.338579 2.63611 V2 0.15415 0.553875 2.58889 + N0 -0 0.268354 0.96332 N1 0.0697517 0.258756 0.963421 N2 0.0436726 0.162011 0.985822 + txt003 +STRI + V0 0.15415 0.553875 2.58889 V1 0 0.574074 2.58889 V2 0 0.350926 2.63611 + N0 0.0436726 0.162011 0.985822 N1 -0 0.168031 0.985782 N2 -0 0.268354 0.96332 + txt003 +STRI + V0 0.0942301 0.338579 2.63611 V1 0.178322 0.303616 2.63611 V2 0.291715 0.49668 2.58889 + N0 0.0697517 0.258756 0.963421 N1 0.134219 0.231413 0.963552 N2 0.0840299 0.144879 0.985875 + txt003 +STRI + V0 0.291715 0.49668 2.58889 V1 0.15415 0.553875 2.58889 V2 0.0942301 0.338579 2.63611 + N0 0.0840299 0.144879 0.985875 N1 0.0436726 0.162011 0.985822 N2 0.0697517 0.258756 0.963421 + txt003 +STRI + V0 0.178322 0.303616 2.63611 V1 0.249157 0.249157 2.63611 V2 0.407593 0.407593 2.58889 + N0 0.134219 0.231413 0.963552 N1 0.189037 0.189037 0.963603 N2 0.118345 0.118345 0.985895 + txt003 +STRI + V0 0.407593 0.407593 2.58889 V1 0.291715 0.49668 2.58889 V2 0.178322 0.303616 2.63611 + N0 0.118345 0.118345 0.985895 N1 0.0840299 0.144879 0.985875 N2 0.134219 0.231413 0.963552 + txt003 +STRI + V0 0.249157 0.249157 2.63611 V1 0.303616 0.178322 2.63611 V2 0.49668 0.291715 2.58889 + N0 0.189037 0.189037 0.963603 N1 0.231413 0.134219 0.963552 N2 0.144879 0.0840299 0.985875 + txt003 +STRI + V0 0.49668 0.291715 2.58889 V1 0.407593 0.407593 2.58889 V2 0.249157 0.249157 2.63611 + N0 0.144879 0.0840299 0.985875 N1 0.118345 0.118345 0.985895 N2 0.189037 0.189037 0.963603 + txt003 +STRI + V0 0.303616 0.178322 2.63611 V1 0.338579 0.0942301 2.63611 V2 0.553875 0.15415 2.58889 + N0 0.231413 0.134219 0.963552 N1 0.258756 0.0697517 0.963421 N2 0.162011 0.0436726 0.985822 + txt003 +STRI + V0 0.553875 0.15415 2.58889 V1 0.49668 0.291715 2.58889 V2 0.303616 0.178322 2.63611 + N0 0.162011 0.0436726 0.985822 N1 0.144879 0.0840299 0.985875 N2 0.231413 0.134219 0.963552 + txt003 +STRI + V0 0.338579 0.0942301 2.63611 V1 0.350926 5.55112e-17 2.63611 V2 0.574074 2.22045e-16 2.58889 + N0 0.258756 0.0697517 0.963421 N1 0.268354 0 0.96332 N2 0.168031 -1.93429e-17 0.985782 + txt003 +STRI + V0 0.574074 2.22045e-16 2.58889 V1 0.553875 0.15415 2.58889 V2 0.338579 0.0942301 2.63611 + N0 0.168031 -1.93429e-17 0.985782 N1 0.162011 0.0436726 0.985822 N2 0.258756 0.0697517 0.963421 + txt003 +STRI + V0 0 0.574074 2.58889 V1 0.15415 0.553875 2.58889 V2 0.221528 0.795972 2.55 + N0 -0 0.168031 0.985782 N1 0.0436726 0.162011 0.985822 N2 0.0385545 0.143025 0.988968 + txt003 +STRI + V0 0.221528 0.795972 2.55 V1 0 0.825 2.55 V2 0 0.574074 2.58889 + N0 0.0385545 0.143025 0.988968 N1 -0 0.14834 0.988936 N2 -0 0.168031 0.985782 + txt003 +STRI + V0 0.15415 0.553875 2.58889 V1 0.291715 0.49668 2.58889 V2 0.419222 0.713778 2.55 + N0 0.0436726 0.162011 0.985822 N1 0.0840299 0.144879 0.985875 N2 0.0741814 0.127899 0.989009 + txt003 +STRI + V0 0.419222 0.713778 2.55 V1 0.221528 0.795972 2.55 V2 0.15415 0.553875 2.58889 + N0 0.0741814 0.127899 0.989009 N1 0.0385545 0.143025 0.988968 N2 0.0436726 0.162011 0.985822 + txt003 +STRI + V0 0.291715 0.49668 2.58889 V1 0.407593 0.407593 2.58889 V2 0.58575 0.58575 2.55 + N0 0.0840299 0.144879 0.985875 N1 0.118345 0.118345 0.985895 N2 0.104474 0.104474 0.989025 + txt003 +STRI + V0 0.58575 0.58575 2.55 V1 0.419222 0.713778 2.55 V2 0.291715 0.49668 2.58889 + N0 0.104474 0.104474 0.989025 N1 0.0741814 0.127899 0.989009 N2 0.0840299 0.144879 0.985875 + txt003 +STRI + V0 0.407593 0.407593 2.58889 V1 0.49668 0.291715 2.58889 V2 0.713778 0.419222 2.55 + N0 0.118345 0.118345 0.985895 N1 0.144879 0.0840299 0.985875 N2 0.127899 0.0741814 0.989009 + txt003 +STRI + V0 0.713778 0.419222 2.55 V1 0.58575 0.58575 2.55 V2 0.407593 0.407593 2.58889 + N0 0.127899 0.0741814 0.989009 N1 0.104474 0.104474 0.989025 N2 0.118345 0.118345 0.985895 + txt003 +STRI + V0 0.49668 0.291715 2.58889 V1 0.553875 0.15415 2.58889 V2 0.795972 0.221528 2.55 + N0 0.144879 0.0840299 0.985875 N1 0.162011 0.0436726 0.985822 N2 0.143025 0.0385545 0.988968 + txt003 +STRI + V0 0.795972 0.221528 2.55 V1 0.713778 0.419222 2.55 V2 0.49668 0.291715 2.58889 + N0 0.143025 0.0385545 0.988968 N1 0.127899 0.0741814 0.989009 N2 0.144879 0.0840299 0.985875 + txt003 +STRI + V0 0.553875 0.15415 2.58889 V1 0.574074 2.22045e-16 2.58889 V2 0.825 1.11022e-16 2.55 + N0 0.162011 0.0436726 0.985822 N1 0.168031 -1.93429e-17 0.985782 N2 0.14834 -2.37649e-17 0.988936 + txt003 +STRI + V0 0.825 1.11022e-16 2.55 V1 0.795972 0.221528 2.55 V2 0.553875 0.15415 2.58889 + N0 0.14834 -2.37649e-17 0.988936 N1 0.143025 0.0385545 0.988968 N2 0.162011 0.0436726 0.985822 + txt003 +STRI + V0 0 0.825 2.55 V1 0.221528 0.795972 2.55 V2 0.284431 1.02199 2.51111 + N0 -0 0.14834 0.988936 N1 0.0385545 0.143025 0.988968 N2 0.0503275 0.186699 0.981127 + txt003 +STRI + V0 0.284431 1.02199 2.51111 V1 0 1.05926 2.51111 V2 0 0.825 2.55 + N0 0.0503275 0.186699 0.981127 N1 -0 0.193633 0.981074 N2 -0 0.14834 0.988936 + txt003 +STRI + V0 0.221528 0.795972 2.55 V1 0.419222 0.713778 2.55 V2 0.538261 0.916455 2.51111 + N0 0.0385545 0.143025 0.988968 N1 0.0741814 0.127899 0.989009 N2 0.0968361 0.166959 0.981197 + txt003 +STRI + V0 0.538261 0.916455 2.51111 V1 0.284431 1.02199 2.51111 V2 0.221528 0.795972 2.55 + N0 0.0968361 0.166959 0.981197 N1 0.0503275 0.186699 0.981127 N2 0.0385545 0.143025 0.988968 + txt003 +STRI + V0 0.419222 0.713778 2.55 V1 0.58575 0.58575 2.55 V2 0.752074 0.752074 2.51111 + N0 0.0741814 0.127899 0.989009 N1 0.104474 0.104474 0.989025 N2 0.136382 0.136382 0.981224 + txt003 +STRI + V0 0.752074 0.752074 2.51111 V1 0.538261 0.916455 2.51111 V2 0.419222 0.713778 2.55 + N0 0.136382 0.136382 0.981224 N1 0.0968361 0.166959 0.981197 N2 0.0741814 0.127899 0.989009 + txt003 +STRI + V0 0.58575 0.58575 2.55 V1 0.713778 0.419222 2.55 V2 0.916455 0.538261 2.51111 + N0 0.104474 0.104474 0.989025 N1 0.127899 0.0741814 0.989009 N2 0.166959 0.0968361 0.981197 + txt003 +STRI + V0 0.916455 0.538261 2.51111 V1 0.752074 0.752074 2.51111 V2 0.58575 0.58575 2.55 + N0 0.166959 0.0968361 0.981197 N1 0.136382 0.136382 0.981224 N2 0.104474 0.104474 0.989025 + txt003 +STRI + V0 0.713778 0.419222 2.55 V1 0.795972 0.221528 2.55 V2 1.02199 0.284431 2.51111 + N0 0.127899 0.0741814 0.989009 N1 0.143025 0.0385545 0.988968 N2 0.186699 0.0503275 0.981127 + txt003 +STRI + V0 1.02199 0.284431 2.51111 V1 0.916455 0.538261 2.51111 V2 0.713778 0.419222 2.55 + N0 0.186699 0.0503275 0.981127 N1 0.166959 0.0968361 0.981197 N2 0.127899 0.0741814 0.989009 + txt003 +STRI + V0 0.795972 0.221528 2.55 V1 0.825 1.11022e-16 2.55 V2 1.05926 4.44089e-16 2.51111 + N0 0.143025 0.0385545 0.988968 N1 0.14834 -2.37649e-17 0.988936 N2 0.193633 -7.24819e-17 0.981074 + txt003 +STRI + V0 1.05926 4.44089e-16 2.51111 V1 1.02199 0.284431 2.51111 V2 0.795972 0.221528 2.55 + N0 0.193633 -7.24819e-17 0.981074 N1 0.186699 0.0503275 0.981127 N2 0.143025 0.0385545 0.988968 + txt003 +STRI + V0 0 1.05926 2.51111 V1 0.284431 1.02199 2.51111 V2 0.330924 1.18904 2.46389 + N0 -0 0.193633 0.981074 N1 0.0503275 0.186699 0.981127 N2 0.101459 0.376378 0.920894 + txt003 +STRI + V0 0.330924 1.18904 2.46389 V1 0 1.23241 2.46389 V2 0 1.05926 2.51111 + N0 0.101459 0.376378 0.920894 N1 -0 0.390293 0.920691 N2 -0 0.193633 0.981074 + txt003 +STRI + V0 0.284431 1.02199 2.51111 V1 0.538261 0.916455 2.51111 V2 0.626246 1.06626 2.46389 + N0 0.0503275 0.186699 0.981127 N1 0.0968361 0.166959 0.981197 N2 0.195261 0.336657 0.92116 + txt003 +STRI + V0 0.626246 1.06626 2.46389 V1 0.330924 1.18904 2.46389 V2 0.284431 1.02199 2.51111 + N0 0.195261 0.336657 0.92116 N1 0.101459 0.376378 0.920894 N2 0.0503275 0.186699 0.981127 + txt003 +STRI + V0 0.538261 0.916455 2.51111 V1 0.752074 0.752074 2.51111 V2 0.875009 0.875009 2.46389 + N0 0.0968361 0.166959 0.981197 N1 0.136382 0.136382 0.981224 N2 0.275025 0.275025 0.921262 + txt003 +STRI + V0 0.875009 0.875009 2.46389 V1 0.626246 1.06626 2.46389 V2 0.538261 0.916455 2.51111 + N0 0.275025 0.275025 0.921262 N1 0.195261 0.336657 0.92116 N2 0.0968361 0.166959 0.981197 + txt003 +STRI + V0 0.752074 0.752074 2.51111 V1 0.916455 0.538261 2.51111 V2 1.06626 0.626246 2.46389 + N0 0.136382 0.136382 0.981224 N1 0.166959 0.0968361 0.981197 N2 0.336657 0.195261 0.92116 + txt003 +STRI + V0 1.06626 0.626246 2.46389 V1 0.875009 0.875009 2.46389 V2 0.752074 0.752074 2.51111 + N0 0.336657 0.195261 0.92116 N1 0.275025 0.275025 0.921262 N2 0.136382 0.136382 0.981224 + txt003 +STRI + V0 0.916455 0.538261 2.51111 V1 1.02199 0.284431 2.51111 V2 1.18904 0.330924 2.46389 + N0 0.166959 0.0968361 0.981197 N1 0.186699 0.0503275 0.981127 N2 0.376378 0.101459 0.920894 + txt003 +STRI + V0 1.18904 0.330924 2.46389 V1 1.06626 0.626246 2.46389 V2 0.916455 0.538261 2.51111 + N0 0.376378 0.101459 0.920894 N1 0.336657 0.195261 0.92116 N2 0.166959 0.0968361 0.981197 + txt003 +STRI + V0 1.02199 0.284431 2.51111 V1 1.05926 4.44089e-16 2.51111 V2 1.23241 4.44089e-16 2.46389 + N0 0.186699 0.0503275 0.981127 N1 0.193633 -7.24819e-17 0.981074 N2 0.390293 -8.37138e-17 0.920691 + txt003 +STRI + V0 1.23241 4.44089e-16 2.46389 V1 1.18904 0.330924 2.46389 V2 1.02199 0.284431 2.51111 + N0 0.390293 -8.37138e-17 0.920691 N1 0.376378 0.101459 0.920894 N2 0.186699 0.0503275 0.981127 + txt003 +STRI + V0 0 1.23241 2.46389 V1 0.330924 1.18904 2.46389 V2 0.349074 1.25426 2.4 + N0 -0 0.390293 0.920691 N1 0.101459 0.376378 0.920894 N2 0.260275 0.965535 -1.02004e-15 + txt003 +STRI + V0 0.349074 1.25426 2.4 V1 0 1.3 2.4 V2 0 1.23241 2.46389 + N0 0.260275 0.965535 -1.02004e-15 N1 0 1 -9.86865e-16 N2 -0 0.390293 0.920691 + txt003 +STRI + V0 0.330924 1.18904 2.46389 V1 0.626246 1.06626 2.46389 V2 0.660593 1.12474 2.4 + N0 0.101459 0.376378 0.920894 N1 0.195261 0.336657 0.92116 N2 0.501718 0.865031 -9.69705e-16 + txt003 +STRI + V0 0.660593 1.12474 2.4 V1 0.349074 1.25426 2.4 V2 0.330924 1.18904 2.46389 + N0 0.501718 0.865031 -9.69705e-16 N1 0.260275 0.965535 -1.02004e-15 N2 0.101459 0.376378 0.920894 + txt003 +STRI + V0 0.626246 1.06626 2.46389 V1 0.875009 0.875009 2.46389 V2 0.923 0.923 2.4 + N0 0.195261 0.336657 0.92116 N1 0.275025 0.275025 0.921262 N2 0.707107 0.707107 -7.41433e-16 + txt003 +STRI + V0 0.923 0.923 2.4 V1 0.660593 1.12474 2.4 V2 0.626246 1.06626 2.46389 + N0 0.707107 0.707107 -7.41433e-16 N1 0.501718 0.865031 -9.69705e-16 N2 0.195261 0.336657 0.92116 + txt003 +STRI + V0 0.875009 0.875009 2.46389 V1 1.06626 0.626246 2.46389 V2 1.12474 0.660593 2.4 + N0 0.275025 0.275025 0.921262 N1 0.336657 0.195261 0.92116 N2 0.865031 0.501718 -4.67305e-16 + txt003 +STRI + V0 1.12474 0.660593 2.4 V1 0.923 0.923 2.4 V2 0.875009 0.875009 2.46389 + N0 0.865031 0.501718 -4.67305e-16 N1 0.707107 0.707107 -7.41433e-16 N2 0.275025 0.275025 0.921262 + txt003 +STRI + V0 1.06626 0.626246 2.46389 V1 1.18904 0.330924 2.46389 V2 1.25426 0.349074 2.4 + N0 0.336657 0.195261 0.92116 N1 0.376378 0.101459 0.920894 N2 0.965535 0.260275 -5.24893e-16 + txt003 +STRI + V0 1.25426 0.349074 2.4 V1 1.12474 0.660593 2.4 V2 1.06626 0.626246 2.46389 + N0 0.965535 0.260275 -5.24893e-16 N1 0.865031 0.501718 -4.67305e-16 N2 0.336657 0.195261 0.92116 + txt003 +STRI + V0 1.18904 0.330924 2.46389 V1 1.23241 4.44089e-16 2.46389 V2 1.3 6.66134e-16 2.4 + N0 0.376378 0.101459 0.920894 N1 0.390293 -8.37138e-17 0.920691 N2 1 -4.06675e-16 -1.4803e-15 + txt003 +STRI + V0 1.3 6.66134e-16 2.4 V1 1.25426 0.349074 2.4 V2 1.18904 0.330924 2.46389 + N0 1 -4.06675e-16 -1.4803e-15 N1 0.965535 0.260275 -5.24893e-16 N2 0.376378 0.101459 0.920894 + txt003 +STRI + V0 0.584584 0.162696 0.00590278 V1 0.605903 0 0.00590278 V2 0 0 0 + N0 0.0218614 0.00589307 -0.999744 N1 0.0226746 0 -0.999743 N2 0 0 -1 + txt003 +STRI + V0 0.524218 0.307888 0.00590278 V1 0.584584 0.162696 0.00590278 V2 0 0 0 + N0 0.0195486 0.0113382 -0.999745 N1 0.0218614 0.00589307 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 0.430191 0.430191 0.00590278 V1 0.524218 0.307888 0.00590278 V2 0 0 0 + N0 0.015968 0.015968 -0.999745 N1 0.0195486 0.0113382 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0.307888 0.524218 0.00590278 V1 0.430191 0.430191 0.00590278 V2 0 0 0 + N0 0.0113382 0.0195486 -0.999745 N1 0.015968 0.015968 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0.162696 0.584584 0.00590278 V1 0.307888 0.524218 0.00590278 V2 0 0 0 + N0 0.00589307 0.0218614 -0.999744 N1 0.0113382 0.0195486 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0 0.605903 0.00590278 V1 0.162696 0.584584 0.00590278 V2 0 0 0 + N0 4.94615e-18 0.0226746 -0.999743 N1 0.00589307 0.0218614 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 0.605903 0 0.00590278 V1 0.584584 0.162696 0.00590278 V2 0.986255 0.274486 0.0222222 + N0 0.0226746 0 -0.999743 N1 0.0218614 0.00589307 -0.999744 N2 0.0601415 0.0162121 -0.998058 + txt003 +STRI + V0 0.986255 0.274486 0.0222222 V1 1.02222 0 0.0222222 V2 0.605903 0 0.00590278 + N0 0.0601415 0.0162121 -0.998058 N1 0.0623783 0 -0.998053 N2 0.0226746 0 -0.999743 + txt003 +STRI + V0 0.584584 0.162696 0.00590278 V1 0.524218 0.307888 0.00590278 V2 0.884412 0.51944 0.0222222 + N0 0.0218614 0.00589307 -0.999744 N1 0.0195486 0.0113382 -0.999745 N2 0.0537792 0.0311919 -0.998066 + txt003 +STRI + V0 0.884412 0.51944 0.0222222 V1 0.986255 0.274486 0.0222222 V2 0.584584 0.162696 0.00590278 + N0 0.0537792 0.0311919 -0.998066 N1 0.0601415 0.0162121 -0.998058 N2 0.0218614 0.00589307 -0.999744 + txt003 +STRI + V0 0.524218 0.307888 0.00590278 V1 0.430191 0.430191 0.00590278 V2 0.725778 0.725778 0.0222222 + N0 0.0195486 0.0113382 -0.999745 N1 0.015968 0.015968 -0.999745 N2 0.0439291 0.0439291 -0.998068 + txt003 +STRI + V0 0.725778 0.725778 0.0222222 V1 0.884412 0.51944 0.0222222 V2 0.524218 0.307888 0.00590278 + N0 0.0439291 0.0439291 -0.998068 N1 0.0537792 0.0311919 -0.998066 N2 0.0195486 0.0113382 -0.999745 + txt003 +STRI + V0 0.430191 0.430191 0.00590278 V1 0.307888 0.524218 0.00590278 V2 0.51944 0.884412 0.0222222 + N0 0.015968 0.015968 -0.999745 N1 0.0113382 0.0195486 -0.999745 N2 0.0311919 0.0537792 -0.998066 + txt003 +STRI + V0 0.51944 0.884412 0.0222222 V1 0.725778 0.725778 0.0222222 V2 0.430191 0.430191 0.00590278 + N0 0.0311919 0.0537792 -0.998066 N1 0.0439291 0.0439291 -0.998068 N2 0.015968 0.015968 -0.999745 + txt003 +STRI + V0 0.307888 0.524218 0.00590278 V1 0.162696 0.584584 0.00590278 V2 0.274486 0.986255 0.0222222 + N0 0.0113382 0.0195486 -0.999745 N1 0.00589307 0.0218614 -0.999744 N2 0.0162121 0.0601415 -0.998058 + txt003 +STRI + V0 0.274486 0.986255 0.0222222 V1 0.51944 0.884412 0.0222222 V2 0.307888 0.524218 0.00590278 + N0 0.0162121 0.0601415 -0.998058 N1 0.0311919 0.0537792 -0.998066 N2 0.0113382 0.0195486 -0.999745 + txt003 +STRI + V0 0.162696 0.584584 0.00590278 V1 0 0.605903 0.00590278 V2 -2.22045e-16 1.02222 0.0222222 + N0 0.00589307 0.0218614 -0.999744 N1 4.94615e-18 0.0226746 -0.999743 N2 0 0.0623783 -0.998053 + txt003 +STRI + V0 -2.22045e-16 1.02222 0.0222222 V1 0.274486 0.986255 0.0222222 V2 0.162696 0.584584 0.00590278 + N0 0 0.0623783 -0.998053 N1 0.0162121 0.0601415 -0.998058 N2 0.00589307 0.0218614 -0.999744 + txt003 +STRI + V0 1.02222 0 0.0222222 V1 0.986255 0.274486 0.0222222 V2 1.23918 0.344878 0.046875 + N0 0.0623783 0 -0.998053 N1 0.0601415 0.0162121 -0.998058 N2 0.136353 0.0367561 -0.989978 + txt003 +STRI + V0 1.23918 0.344878 0.046875 V1 1.28438 0 0.046875 V2 1.02222 0 0.0222222 + N0 0.136353 0.0367561 -0.989978 N1 0.141421 0 -0.989949 N2 0.0623783 0 -0.998053 + txt003 +STRI + V0 0.986255 0.274486 0.0222222 V1 0.884412 0.51944 0.0222222 V2 1.11122 0.652653 0.046875 + N0 0.0601415 0.0162121 -0.998058 N1 0.0537792 0.0311919 -0.998066 N2 0.121932 0.0707208 -0.990016 + txt003 +STRI + V0 1.11122 0.652653 0.046875 V1 1.23918 0.344878 0.046875 V2 0.986255 0.274486 0.0222222 + N0 0.121932 0.0707208 -0.990016 N1 0.136353 0.0367561 -0.989978 N2 0.0601415 0.0162121 -0.998058 + txt003 +STRI + V0 0.884412 0.51944 0.0222222 V1 0.725778 0.725778 0.0222222 V2 0.911906 0.911906 0.046875 + N0 0.0537792 0.0311919 -0.998066 N1 0.0439291 0.0439291 -0.998068 N2 0.0996006 0.0996006 -0.99003 + txt003 +STRI + V0 0.911906 0.911906 0.046875 V1 1.11122 0.652653 0.046875 V2 0.884412 0.51944 0.0222222 + N0 0.0996006 0.0996006 -0.99003 N1 0.121932 0.0707208 -0.990016 N2 0.0537792 0.0311919 -0.998066 + txt003 +STRI + V0 0.725778 0.725778 0.0222222 V1 0.51944 0.884412 0.0222222 V2 0.652653 1.11122 0.046875 + N0 0.0439291 0.0439291 -0.998068 N1 0.0311919 0.0537792 -0.998066 N2 0.0707208 0.121932 -0.990016 + txt003 +STRI + V0 0.652653 1.11122 0.046875 V1 0.911906 0.911906 0.046875 V2 0.725778 0.725778 0.0222222 + N0 0.0707208 0.121932 -0.990016 N1 0.0996006 0.0996006 -0.99003 N2 0.0439291 0.0439291 -0.998068 + txt003 +STRI + V0 0.51944 0.884412 0.0222222 V1 0.274486 0.986255 0.0222222 V2 0.344878 1.23918 0.046875 + N0 0.0311919 0.0537792 -0.998066 N1 0.0162121 0.0601415 -0.998058 N2 0.0367561 0.136353 -0.989978 + txt003 +STRI + V0 0.344878 1.23918 0.046875 V1 0.652653 1.11122 0.046875 V2 0.51944 0.884412 0.0222222 + N0 0.0367561 0.136353 -0.989978 N1 0.0707208 0.121932 -0.990016 N2 0.0311919 0.0537792 -0.998066 + txt003 +STRI + V0 0.274486 0.986255 0.0222222 V1 -2.22045e-16 1.02222 0.0222222 V2 2.22045e-16 1.28437 0.046875 + N0 0.0162121 0.0601415 -0.998058 N1 0 0.0623783 -0.998053 N2 0 0.141421 -0.989949 + txt003 +STRI + V0 2.22045e-16 1.28437 0.046875 V1 0.344878 1.23918 0.046875 V2 0.274486 0.986255 0.0222222 + N0 0 0.141421 -0.989949 N1 0.0367561 0.136353 -0.989978 N2 0.0162121 0.0601415 -0.998058 + txt003 +STRI + V0 1.28438 0 0.046875 V1 1.23918 0.344878 0.046875 V2 1.37754 0.383385 0.0777778 + N0 0.141421 0 -0.989949 N1 0.136353 0.0367561 -0.989978 N2 0.316788 0.085395 -0.944644 + txt003 +STRI + V0 1.37754 0.383385 0.0777778 V1 1.42778 0 0.0777778 V2 1.28438 0 0.046875 + N0 0.316788 0.085395 -0.944644 N1 0.328521 0 -0.944497 N2 0.141421 0 -0.989949 + txt003 +STRI + V0 1.23918 0.344878 0.046875 V1 1.11122 0.652653 0.046875 V2 1.23529 0.725523 0.0777778 + N0 0.136353 0.0367561 -0.989978 N1 0.121932 0.0707208 -0.990016 N2 0.283331 0.164332 -0.944838 + txt003 +STRI + V0 1.23529 0.725523 0.0777778 V1 1.37754 0.383385 0.0777778 V2 1.23918 0.344878 0.046875 + N0 0.283331 0.164332 -0.944838 N1 0.316788 0.085395 -0.944644 N2 0.136353 0.0367561 -0.989978 + txt003 +STRI + V0 1.11122 0.652653 0.046875 V1 0.911906 0.911906 0.046875 V2 1.01372 1.01372 0.0777778 + N0 0.121932 0.0707208 -0.990016 N1 0.0996006 0.0996006 -0.99003 N2 0.231454 0.231454 -0.944912 + txt003 +STRI + V0 1.01372 1.01372 0.0777778 V1 1.23529 0.725523 0.0777778 V2 1.11122 0.652653 0.046875 + N0 0.231454 0.231454 -0.944912 N1 0.283331 0.164332 -0.944838 N2 0.121932 0.0707208 -0.990016 + txt003 +STRI + V0 0.911906 0.911906 0.046875 V1 0.652653 1.11122 0.046875 V2 0.725523 1.23529 0.0777778 + N0 0.0996006 0.0996006 -0.99003 N1 0.0707208 0.121932 -0.990016 N2 0.164332 0.283331 -0.944838 + txt003 +STRI + V0 0.725523 1.23529 0.0777778 V1 1.01372 1.01372 0.0777778 V2 0.911906 0.911906 0.046875 + N0 0.164332 0.283331 -0.944838 N1 0.231454 0.231454 -0.944912 N2 0.0996006 0.0996006 -0.99003 + txt003 +STRI + V0 0.652653 1.11122 0.046875 V1 0.344878 1.23918 0.046875 V2 0.383385 1.37754 0.0777778 + N0 0.0707208 0.121932 -0.990016 N1 0.0367561 0.136353 -0.989978 N2 0.085395 0.316788 -0.944644 + txt003 +STRI + V0 0.383385 1.37754 0.0777778 V1 0.725523 1.23529 0.0777778 V2 0.652653 1.11122 0.046875 + N0 0.085395 0.316788 -0.944644 N1 0.164332 0.283331 -0.944838 N2 0.0707208 0.121932 -0.990016 + txt003 +STRI + V0 0.344878 1.23918 0.046875 V1 2.22045e-16 1.28437 0.046875 V2 -2.22045e-16 1.42778 0.0777778 + N0 0.0367561 0.136353 -0.989978 N1 0 0.141421 -0.989949 N2 6.08223e-17 0.328521 -0.944497 + txt003 +STRI + V0 -2.22045e-16 1.42778 0.0777778 V1 0.383385 1.37754 0.0777778 V2 0.344878 1.23918 0.046875 + N0 6.08223e-17 0.328521 -0.944497 N1 0.085395 0.316788 -0.944644 N2 0.0367561 0.136353 -0.989978 + txt003 +STRI + V0 1.42778 0 0.0777778 V1 1.37754 0.383385 0.0777778 V2 1.4355 0.399515 0.112847 + N0 0.328521 0 -0.944497 N1 0.316788 0.085395 -0.944644 N2 0.743044 0.200299 -0.638566 + txt003 +STRI + V0 1.4355 0.399515 0.112847 V1 1.48785 0 0.112847 V2 1.42778 0 0.0777778 + N0 0.743044 0.200299 -0.638566 N1 0.770022 0 -0.638018 N2 0.328521 0 -0.944497 + txt003 +STRI + V0 1.37754 0.383385 0.0777778 V1 1.23529 0.725523 0.0777778 V2 1.28726 0.756047 0.112847 + N0 0.316788 0.085395 -0.944644 N1 0.283331 0.164332 -0.944838 N2 0.665182 0.385806 -0.639286 + txt003 +STRI + V0 1.28726 0.756047 0.112847 V1 1.4355 0.399515 0.112847 V2 1.37754 0.383385 0.0777778 + N0 0.665182 0.385806 -0.639286 N1 0.743044 0.200299 -0.638566 N2 0.316788 0.085395 -0.944644 + txt003 +STRI + V0 1.23529 0.725523 0.0777778 V1 1.01372 1.01372 0.0777778 V2 1.05637 1.05637 0.112847 + N0 0.283331 0.164332 -0.944838 N1 0.231454 0.231454 -0.944912 N2 0.543581 0.543581 -0.639562 + txt003 +STRI + V0 1.05637 1.05637 0.112847 V1 1.28726 0.756047 0.112847 V2 1.23529 0.725523 0.0777778 + N0 0.543581 0.543581 -0.639562 N1 0.665182 0.385806 -0.639286 N2 0.283331 0.164332 -0.944838 + txt003 +STRI + V0 1.01372 1.01372 0.0777778 V1 0.725523 1.23529 0.0777778 V2 0.756047 1.28726 0.112847 + N0 0.231454 0.231454 -0.944912 N1 0.164332 0.283331 -0.944838 N2 0.385806 0.665182 -0.639286 + txt003 +STRI + V0 0.756047 1.28726 0.112847 V1 1.05637 1.05637 0.112847 V2 1.01372 1.01372 0.0777778 + N0 0.385806 0.665182 -0.639286 N1 0.543581 0.543581 -0.639562 N2 0.231454 0.231454 -0.944912 + txt003 +STRI + V0 0.725523 1.23529 0.0777778 V1 0.383385 1.37754 0.0777778 V2 0.399515 1.4355 0.112847 + N0 0.164332 0.283331 -0.944838 N1 0.085395 0.316788 -0.944644 N2 0.200299 0.743044 -0.638566 + txt003 +STRI + V0 0.399515 1.4355 0.112847 V1 0.756047 1.28726 0.112847 V2 0.725523 1.23529 0.0777778 + N0 0.200299 0.743044 -0.638566 N1 0.385806 0.665182 -0.639286 N2 0.164332 0.283331 -0.944838 + txt003 +STRI + V0 0.383385 1.37754 0.0777778 V1 -2.22045e-16 1.42778 0.0777778 V2 0 1.48785 0.112847 + N0 0.085395 0.316788 -0.944644 N1 6.08223e-17 0.328521 -0.944497 N2 1.36806e-16 0.770022 -0.638018 + txt003 +STRI + V0 0 1.48785 0.112847 V1 0.399515 1.4355 0.112847 V2 0.383385 1.37754 0.0777778 + N0 1.36806e-16 0.770022 -0.638018 N1 0.200299 0.743044 -0.638566 N2 0.085395 0.316788 -0.944644 + txt003 +STRI + V0 1.48785 0 0.112847 V1 1.4355 0.399515 0.112847 V2 1.44722 0.402778 0.15 + N0 0.770022 0 -0.638018 N1 0.743044 0.200299 -0.638566 N2 0.965535 0.260275 -2.07142e-16 + txt003 +STRI + V0 1.44722 0.402778 0.15 V1 1.5 0 0.15 V2 1.48785 0 0.112847 + N0 0.965535 0.260275 -2.07142e-16 N1 1 0 0 N2 0.770022 0 -0.638018 + txt003 +STRI + V0 1.4355 0.399515 0.112847 V1 1.28726 0.756047 0.112847 V2 1.29778 0.762222 0.15 + N0 0.743044 0.200299 -0.638566 N1 0.665182 0.385806 -0.639286 N2 0.865031 0.501718 -5.46348e-16 + txt003 +STRI + V0 1.29778 0.762222 0.15 V1 1.44722 0.402778 0.15 V2 1.4355 0.399515 0.112847 + N0 0.865031 0.501718 -5.46348e-16 N1 0.965535 0.260275 -2.07142e-16 N2 0.743044 0.200299 -0.638566 + txt003 +STRI + V0 1.28726 0.756047 0.112847 V1 1.05637 1.05637 0.112847 V2 1.065 1.065 0.15 + N0 0.665182 0.385806 -0.639286 N1 0.543581 0.543581 -0.639562 N2 0.707107 0.707107 -6.97819e-16 + txt003 +STRI + V0 1.065 1.065 0.15 V1 1.29778 0.762222 0.15 V2 1.28726 0.756047 0.112847 + N0 0.707107 0.707107 -6.97819e-16 N1 0.865031 0.501718 -5.46348e-16 N2 0.665182 0.385806 -0.639286 + txt003 +STRI + V0 1.05637 1.05637 0.112847 V1 0.756047 1.28726 0.112847 V2 0.762222 1.29778 0.15 + N0 0.543581 0.543581 -0.639562 N1 0.385806 0.665182 -0.639286 N2 0.501718 0.865031 -5.46348e-16 + txt003 +STRI + V0 0.762222 1.29778 0.15 V1 1.065 1.065 0.15 V2 1.05637 1.05637 0.112847 + N0 0.501718 0.865031 -5.46348e-16 N1 0.707107 0.707107 -6.97819e-16 N2 0.543581 0.543581 -0.639562 + txt003 +STRI + V0 0.756047 1.28726 0.112847 V1 0.399515 1.4355 0.112847 V2 0.402778 1.44722 0.15 + N0 0.385806 0.665182 -0.639286 N1 0.200299 0.743044 -0.638566 N2 0.260275 0.965535 -2.07142e-16 + txt003 +STRI + V0 0.402778 1.44722 0.15 V1 0.762222 1.29778 0.15 V2 0.756047 1.28726 0.112847 + N0 0.260275 0.965535 -2.07142e-16 N1 0.501718 0.865031 -5.46348e-16 N2 0.385806 0.665182 -0.639286 + txt003 +STRI + V0 0.399515 1.4355 0.112847 V1 0 1.48785 0.112847 V2 0 1.5 0.15 + N0 0.200299 0.743044 -0.638566 N1 1.36806e-16 0.770022 -0.638018 N2 0 1 -0 + txt003 +STRI + V0 0 1.5 0.15 V1 0.402778 1.44722 0.15 V2 0.399515 1.4355 0.112847 + N0 0 1 -0 N1 0.260275 0.965535 -2.07142e-16 N2 0.200299 0.743044 -0.638566 + txt003 +STRI + V0 -0.162696 0.584584 0.00590278 V1 0 0.605903 0.00590278 V2 0 0 0 + N0 -0.00589307 0.0218614 -0.999744 N1 0 0.0226746 -0.999743 N2 0 0 -1 + txt003 +STRI + V0 -0.307888 0.524218 0.00590278 V1 -0.162696 0.584584 0.00590278 V2 0 0 0 + N0 -0.0113382 0.0195486 -0.999745 N1 -0.00589307 0.0218614 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 -0.430191 0.430191 0.00590278 V1 -0.307888 0.524218 0.00590278 V2 0 0 0 + N0 -0.015968 0.015968 -0.999745 N1 -0.0113382 0.0195486 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 -0.524218 0.307888 0.00590278 V1 -0.430191 0.430191 0.00590278 V2 0 0 0 + N0 -0.0195486 0.0113382 -0.999745 N1 -0.015968 0.015968 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 -0.584584 0.162696 0.00590278 V1 -0.524218 0.307888 0.00590278 V2 0 0 0 + N0 -0.0218614 0.00589307 -0.999744 N1 -0.0195486 0.0113382 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 -0.605903 0 0.00590278 V1 -0.584584 0.162696 0.00590278 V2 0 0 0 + N0 -0.0226746 4.94615e-18 -0.999743 N1 -0.0218614 0.00589307 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 0 0.605903 0.00590278 V1 -0.162696 0.584584 0.00590278 V2 -0.274486 0.986255 0.0222222 + N0 0 0.0226746 -0.999743 N1 -0.00589307 0.0218614 -0.999744 N2 -0.0162121 0.0601415 -0.998058 + txt003 +STRI + V0 -0.274486 0.986255 0.0222222 V1 0 1.02222 0.0222222 V2 0 0.605903 0.00590278 + N0 -0.0162121 0.0601415 -0.998058 N1 0 0.0623783 -0.998053 N2 0 0.0226746 -0.999743 + txt003 +STRI + V0 -0.162696 0.584584 0.00590278 V1 -0.307888 0.524218 0.00590278 V2 -0.51944 0.884412 0.0222222 + N0 -0.00589307 0.0218614 -0.999744 N1 -0.0113382 0.0195486 -0.999745 N2 -0.0311919 0.0537792 -0.998066 + txt003 +STRI + V0 -0.51944 0.884412 0.0222222 V1 -0.274486 0.986255 0.0222222 V2 -0.162696 0.584584 0.00590278 + N0 -0.0311919 0.0537792 -0.998066 N1 -0.0162121 0.0601415 -0.998058 N2 -0.00589307 0.0218614 -0.999744 + txt003 +STRI + V0 -0.307888 0.524218 0.00590278 V1 -0.430191 0.430191 0.00590278 V2 -0.725778 0.725778 0.0222222 + N0 -0.0113382 0.0195486 -0.999745 N1 -0.015968 0.015968 -0.999745 N2 -0.0439291 0.0439291 -0.998068 + txt003 +STRI + V0 -0.725778 0.725778 0.0222222 V1 -0.51944 0.884412 0.0222222 V2 -0.307888 0.524218 0.00590278 + N0 -0.0439291 0.0439291 -0.998068 N1 -0.0311919 0.0537792 -0.998066 N2 -0.0113382 0.0195486 -0.999745 + txt003 +STRI + V0 -0.430191 0.430191 0.00590278 V1 -0.524218 0.307888 0.00590278 V2 -0.884412 0.51944 0.0222222 + N0 -0.015968 0.015968 -0.999745 N1 -0.0195486 0.0113382 -0.999745 N2 -0.0537792 0.0311919 -0.998066 + txt003 +STRI + V0 -0.884412 0.51944 0.0222222 V1 -0.725778 0.725778 0.0222222 V2 -0.430191 0.430191 0.00590278 + N0 -0.0537792 0.0311919 -0.998066 N1 -0.0439291 0.0439291 -0.998068 N2 -0.015968 0.015968 -0.999745 + txt003 +STRI + V0 -0.524218 0.307888 0.00590278 V1 -0.584584 0.162696 0.00590278 V2 -0.986255 0.274486 0.0222222 + N0 -0.0195486 0.0113382 -0.999745 N1 -0.0218614 0.00589307 -0.999744 N2 -0.0601415 0.0162121 -0.998058 + txt003 +STRI + V0 -0.986255 0.274486 0.0222222 V1 -0.884412 0.51944 0.0222222 V2 -0.524218 0.307888 0.00590278 + N0 -0.0601415 0.0162121 -0.998058 N1 -0.0537792 0.0311919 -0.998066 N2 -0.0195486 0.0113382 -0.999745 + txt003 +STRI + V0 -0.584584 0.162696 0.00590278 V1 -0.605903 0 0.00590278 V2 -1.02222 -2.22045e-16 0.0222222 + N0 -0.0218614 0.00589307 -0.999744 N1 -0.0226746 4.94615e-18 -0.999743 N2 -0.0623783 -0 -0.998053 + txt003 +STRI + V0 -1.02222 -2.22045e-16 0.0222222 V1 -0.986255 0.274486 0.0222222 V2 -0.584584 0.162696 0.00590278 + N0 -0.0623783 -0 -0.998053 N1 -0.0601415 0.0162121 -0.998058 N2 -0.0218614 0.00589307 -0.999744 + txt003 +STRI + V0 0 1.02222 0.0222222 V1 -0.274486 0.986255 0.0222222 V2 -0.344878 1.23918 0.046875 + N0 0 0.0623783 -0.998053 N1 -0.0162121 0.0601415 -0.998058 N2 -0.0367561 0.136353 -0.989978 + txt003 +STRI + V0 -0.344878 1.23918 0.046875 V1 0 1.28438 0.046875 V2 0 1.02222 0.0222222 + N0 -0.0367561 0.136353 -0.989978 N1 0 0.141421 -0.989949 N2 0 0.0623783 -0.998053 + txt003 +STRI + V0 -0.274486 0.986255 0.0222222 V1 -0.51944 0.884412 0.0222222 V2 -0.652653 1.11122 0.046875 + N0 -0.0162121 0.0601415 -0.998058 N1 -0.0311919 0.0537792 -0.998066 N2 -0.0707208 0.121932 -0.990016 + txt003 +STRI + V0 -0.652653 1.11122 0.046875 V1 -0.344878 1.23918 0.046875 V2 -0.274486 0.986255 0.0222222 + N0 -0.0707208 0.121932 -0.990016 N1 -0.0367561 0.136353 -0.989978 N2 -0.0162121 0.0601415 -0.998058 + txt003 +STRI + V0 -0.51944 0.884412 0.0222222 V1 -0.725778 0.725778 0.0222222 V2 -0.911906 0.911906 0.046875 + N0 -0.0311919 0.0537792 -0.998066 N1 -0.0439291 0.0439291 -0.998068 N2 -0.0996006 0.0996006 -0.99003 + txt003 +STRI + V0 -0.911906 0.911906 0.046875 V1 -0.652653 1.11122 0.046875 V2 -0.51944 0.884412 0.0222222 + N0 -0.0996006 0.0996006 -0.99003 N1 -0.0707208 0.121932 -0.990016 N2 -0.0311919 0.0537792 -0.998066 + txt003 +STRI + V0 -0.725778 0.725778 0.0222222 V1 -0.884412 0.51944 0.0222222 V2 -1.11122 0.652653 0.046875 + N0 -0.0439291 0.0439291 -0.998068 N1 -0.0537792 0.0311919 -0.998066 N2 -0.121932 0.0707208 -0.990016 + txt003 +STRI + V0 -1.11122 0.652653 0.046875 V1 -0.911906 0.911906 0.046875 V2 -0.725778 0.725778 0.0222222 + N0 -0.121932 0.0707208 -0.990016 N1 -0.0996006 0.0996006 -0.99003 N2 -0.0439291 0.0439291 -0.998068 + txt003 +STRI + V0 -0.884412 0.51944 0.0222222 V1 -0.986255 0.274486 0.0222222 V2 -1.23918 0.344878 0.046875 + N0 -0.0537792 0.0311919 -0.998066 N1 -0.0601415 0.0162121 -0.998058 N2 -0.136353 0.0367561 -0.989978 + txt003 +STRI + V0 -1.23918 0.344878 0.046875 V1 -1.11122 0.652653 0.046875 V2 -0.884412 0.51944 0.0222222 + N0 -0.136353 0.0367561 -0.989978 N1 -0.121932 0.0707208 -0.990016 N2 -0.0537792 0.0311919 -0.998066 + txt003 +STRI + V0 -0.986255 0.274486 0.0222222 V1 -1.02222 -2.22045e-16 0.0222222 V2 -1.28437 2.22045e-16 0.046875 + N0 -0.0601415 0.0162121 -0.998058 N1 -0.0623783 -0 -0.998053 N2 -0.141421 -0 -0.989949 + txt003 +STRI + V0 -1.28437 2.22045e-16 0.046875 V1 -1.23918 0.344878 0.046875 V2 -0.986255 0.274486 0.0222222 + N0 -0.141421 -0 -0.989949 N1 -0.136353 0.0367561 -0.989978 N2 -0.0601415 0.0162121 -0.998058 + txt003 +STRI + V0 0 1.28438 0.046875 V1 -0.344878 1.23918 0.046875 V2 -0.383385 1.37754 0.0777778 + N0 0 0.141421 -0.989949 N1 -0.0367561 0.136353 -0.989978 N2 -0.085395 0.316788 -0.944644 + txt003 +STRI + V0 -0.383385 1.37754 0.0777778 V1 0 1.42778 0.0777778 V2 0 1.28438 0.046875 + N0 -0.085395 0.316788 -0.944644 N1 0 0.328521 -0.944497 N2 0 0.141421 -0.989949 + txt003 +STRI + V0 -0.344878 1.23918 0.046875 V1 -0.652653 1.11122 0.046875 V2 -0.725523 1.23529 0.0777778 + N0 -0.0367561 0.136353 -0.989978 N1 -0.0707208 0.121932 -0.990016 N2 -0.164332 0.283331 -0.944838 + txt003 +STRI + V0 -0.725523 1.23529 0.0777778 V1 -0.383385 1.37754 0.0777778 V2 -0.344878 1.23918 0.046875 + N0 -0.164332 0.283331 -0.944838 N1 -0.085395 0.316788 -0.944644 N2 -0.0367561 0.136353 -0.989978 + txt003 +STRI + V0 -0.652653 1.11122 0.046875 V1 -0.911906 0.911906 0.046875 V2 -1.01372 1.01372 0.0777778 + N0 -0.0707208 0.121932 -0.990016 N1 -0.0996006 0.0996006 -0.99003 N2 -0.231454 0.231454 -0.944912 + txt003 +STRI + V0 -1.01372 1.01372 0.0777778 V1 -0.725523 1.23529 0.0777778 V2 -0.652653 1.11122 0.046875 + N0 -0.231454 0.231454 -0.944912 N1 -0.164332 0.283331 -0.944838 N2 -0.0707208 0.121932 -0.990016 + txt003 +STRI + V0 -0.911906 0.911906 0.046875 V1 -1.11122 0.652653 0.046875 V2 -1.23529 0.725523 0.0777778 + N0 -0.0996006 0.0996006 -0.99003 N1 -0.121932 0.0707208 -0.990016 N2 -0.283331 0.164332 -0.944838 + txt003 +STRI + V0 -1.23529 0.725523 0.0777778 V1 -1.01372 1.01372 0.0777778 V2 -0.911906 0.911906 0.046875 + N0 -0.283331 0.164332 -0.944838 N1 -0.231454 0.231454 -0.944912 N2 -0.0996006 0.0996006 -0.99003 + txt003 +STRI + V0 -1.11122 0.652653 0.046875 V1 -1.23918 0.344878 0.046875 V2 -1.37754 0.383385 0.0777778 + N0 -0.121932 0.0707208 -0.990016 N1 -0.136353 0.0367561 -0.989978 N2 -0.316788 0.085395 -0.944644 + txt003 +STRI + V0 -1.37754 0.383385 0.0777778 V1 -1.23529 0.725523 0.0777778 V2 -1.11122 0.652653 0.046875 + N0 -0.316788 0.085395 -0.944644 N1 -0.283331 0.164332 -0.944838 N2 -0.121932 0.0707208 -0.990016 + txt003 +STRI + V0 -1.23918 0.344878 0.046875 V1 -1.28437 2.22045e-16 0.046875 V2 -1.42778 -2.22045e-16 0.0777778 + N0 -0.136353 0.0367561 -0.989978 N1 -0.141421 -0 -0.989949 N2 -0.328521 6.08223e-17 -0.944497 + txt003 +STRI + V0 -1.42778 -2.22045e-16 0.0777778 V1 -1.37754 0.383385 0.0777778 V2 -1.23918 0.344878 0.046875 + N0 -0.328521 6.08223e-17 -0.944497 N1 -0.316788 0.085395 -0.944644 N2 -0.136353 0.0367561 -0.989978 + txt003 +STRI + V0 0 1.42778 0.0777778 V1 -0.383385 1.37754 0.0777778 V2 -0.399515 1.4355 0.112847 + N0 0 0.328521 -0.944497 N1 -0.085395 0.316788 -0.944644 N2 -0.200299 0.743044 -0.638566 + txt003 +STRI + V0 -0.399515 1.4355 0.112847 V1 0 1.48785 0.112847 V2 0 1.42778 0.0777778 + N0 -0.200299 0.743044 -0.638566 N1 0 0.770022 -0.638018 N2 0 0.328521 -0.944497 + txt003 +STRI + V0 -0.383385 1.37754 0.0777778 V1 -0.725523 1.23529 0.0777778 V2 -0.756047 1.28726 0.112847 + N0 -0.085395 0.316788 -0.944644 N1 -0.164332 0.283331 -0.944838 N2 -0.385806 0.665182 -0.639286 + txt003 +STRI + V0 -0.756047 1.28726 0.112847 V1 -0.399515 1.4355 0.112847 V2 -0.383385 1.37754 0.0777778 + N0 -0.385806 0.665182 -0.639286 N1 -0.200299 0.743044 -0.638566 N2 -0.085395 0.316788 -0.944644 + txt003 +STRI + V0 -0.725523 1.23529 0.0777778 V1 -1.01372 1.01372 0.0777778 V2 -1.05637 1.05637 0.112847 + N0 -0.164332 0.283331 -0.944838 N1 -0.231454 0.231454 -0.944912 N2 -0.543581 0.543581 -0.639562 + txt003 +STRI + V0 -1.05637 1.05637 0.112847 V1 -0.756047 1.28726 0.112847 V2 -0.725523 1.23529 0.0777778 + N0 -0.543581 0.543581 -0.639562 N1 -0.385806 0.665182 -0.639286 N2 -0.164332 0.283331 -0.944838 + txt003 +STRI + V0 -1.01372 1.01372 0.0777778 V1 -1.23529 0.725523 0.0777778 V2 -1.28726 0.756047 0.112847 + N0 -0.231454 0.231454 -0.944912 N1 -0.283331 0.164332 -0.944838 N2 -0.665182 0.385806 -0.639286 + txt003 +STRI + V0 -1.28726 0.756047 0.112847 V1 -1.05637 1.05637 0.112847 V2 -1.01372 1.01372 0.0777778 + N0 -0.665182 0.385806 -0.639286 N1 -0.543581 0.543581 -0.639562 N2 -0.231454 0.231454 -0.944912 + txt003 +STRI + V0 -1.23529 0.725523 0.0777778 V1 -1.37754 0.383385 0.0777778 V2 -1.4355 0.399515 0.112847 + N0 -0.283331 0.164332 -0.944838 N1 -0.316788 0.085395 -0.944644 N2 -0.743044 0.200299 -0.638566 + txt003 +STRI + V0 -1.4355 0.399515 0.112847 V1 -1.28726 0.756047 0.112847 V2 -1.23529 0.725523 0.0777778 + N0 -0.743044 0.200299 -0.638566 N1 -0.665182 0.385806 -0.639286 N2 -0.283331 0.164332 -0.944838 + txt003 +STRI + V0 -1.37754 0.383385 0.0777778 V1 -1.42778 -2.22045e-16 0.0777778 V2 -1.48785 0 0.112847 + N0 -0.316788 0.085395 -0.944644 N1 -0.328521 6.08223e-17 -0.944497 N2 -0.770022 1.36806e-16 -0.638018 + txt003 +STRI + V0 -1.48785 0 0.112847 V1 -1.4355 0.399515 0.112847 V2 -1.37754 0.383385 0.0777778 + N0 -0.770022 1.36806e-16 -0.638018 N1 -0.743044 0.200299 -0.638566 N2 -0.316788 0.085395 -0.944644 + txt003 +STRI + V0 0 1.48785 0.112847 V1 -0.399515 1.4355 0.112847 V2 -0.402778 1.44722 0.15 + N0 0 0.770022 -0.638018 N1 -0.200299 0.743044 -0.638566 N2 -0.260275 0.965535 -2.07142e-16 + txt003 +STRI + V0 -0.402778 1.44722 0.15 V1 0 1.5 0.15 V2 0 1.48785 0.112847 + N0 -0.260275 0.965535 -2.07142e-16 N1 0 1 -0 N2 0 0.770022 -0.638018 + txt003 +STRI + V0 -0.399515 1.4355 0.112847 V1 -0.756047 1.28726 0.112847 V2 -0.762222 1.29778 0.15 + N0 -0.200299 0.743044 -0.638566 N1 -0.385806 0.665182 -0.639286 N2 -0.501718 0.865031 -5.46348e-16 + txt003 +STRI + V0 -0.762222 1.29778 0.15 V1 -0.402778 1.44722 0.15 V2 -0.399515 1.4355 0.112847 + N0 -0.501718 0.865031 -5.46348e-16 N1 -0.260275 0.965535 -2.07142e-16 N2 -0.200299 0.743044 -0.638566 + txt003 +STRI + V0 -0.756047 1.28726 0.112847 V1 -1.05637 1.05637 0.112847 V2 -1.065 1.065 0.15 + N0 -0.385806 0.665182 -0.639286 N1 -0.543581 0.543581 -0.639562 N2 -0.707107 0.707107 -6.97819e-16 + txt003 +STRI + V0 -1.065 1.065 0.15 V1 -0.762222 1.29778 0.15 V2 -0.756047 1.28726 0.112847 + N0 -0.707107 0.707107 -6.97819e-16 N1 -0.501718 0.865031 -5.46348e-16 N2 -0.385806 0.665182 -0.639286 + txt003 +STRI + V0 -1.05637 1.05637 0.112847 V1 -1.28726 0.756047 0.112847 V2 -1.29778 0.762222 0.15 + N0 -0.543581 0.543581 -0.639562 N1 -0.665182 0.385806 -0.639286 N2 -0.865031 0.501718 -5.46348e-16 + txt003 +STRI + V0 -1.29778 0.762222 0.15 V1 -1.065 1.065 0.15 V2 -1.05637 1.05637 0.112847 + N0 -0.865031 0.501718 -5.46348e-16 N1 -0.707107 0.707107 -6.97819e-16 N2 -0.543581 0.543581 -0.639562 + txt003 +STRI + V0 -1.28726 0.756047 0.112847 V1 -1.4355 0.399515 0.112847 V2 -1.44722 0.402778 0.15 + N0 -0.665182 0.385806 -0.639286 N1 -0.743044 0.200299 -0.638566 N2 -0.965535 0.260275 -2.07142e-16 + txt003 +STRI + V0 -1.44722 0.402778 0.15 V1 -1.29778 0.762222 0.15 V2 -1.28726 0.756047 0.112847 + N0 -0.965535 0.260275 -2.07142e-16 N1 -0.865031 0.501718 -5.46348e-16 N2 -0.665182 0.385806 -0.639286 + txt003 +STRI + V0 -1.4355 0.399515 0.112847 V1 -1.48785 0 0.112847 V2 -1.5 0 0.15 + N0 -0.743044 0.200299 -0.638566 N1 -0.770022 1.36806e-16 -0.638018 N2 -1 0 0 + txt003 +STRI + V0 -1.5 0 0.15 V1 -1.44722 0.402778 0.15 V2 -1.4355 0.399515 0.112847 + N0 -1 0 0 N1 -0.965535 0.260275 -2.07142e-16 N2 -0.743044 0.200299 -0.638566 + txt003 +STRI + V0 -0.584584 -0.162696 0.00590278 V1 -0.605903 0 0.00590278 V2 0 0 0 + N0 -0.0218614 -0.00589307 -0.999744 N1 -0.0226746 -0 -0.999743 N2 0 0 -1 + txt003 +STRI + V0 -0.524218 -0.307888 0.00590278 V1 -0.584584 -0.162696 0.00590278 V2 0 0 0 + N0 -0.0195486 -0.0113382 -0.999745 N1 -0.0218614 -0.00589307 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 -0.430191 -0.430191 0.00590278 V1 -0.524218 -0.307888 0.00590278 V2 0 0 0 + N0 -0.015968 -0.015968 -0.999745 N1 -0.0195486 -0.0113382 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 -0.307888 -0.524218 0.00590278 V1 -0.430191 -0.430191 0.00590278 V2 0 0 0 + N0 -0.0113382 -0.0195486 -0.999745 N1 -0.015968 -0.015968 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 -0.162696 -0.584584 0.00590278 V1 -0.307888 -0.524218 0.00590278 V2 0 0 0 + N0 -0.00589307 -0.0218614 -0.999744 N1 -0.0113382 -0.0195486 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0 -0.605903 0.00590278 V1 -0.162696 -0.584584 0.00590278 V2 0 0 0 + N0 -4.94615e-18 -0.0226746 -0.999743 N1 -0.00589307 -0.0218614 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 -0.605903 0 0.00590278 V1 -0.584584 -0.162696 0.00590278 V2 -0.986255 -0.274486 0.0222222 + N0 -0.0226746 -0 -0.999743 N1 -0.0218614 -0.00589307 -0.999744 N2 -0.0601415 -0.0162121 -0.998058 + txt003 +STRI + V0 -0.986255 -0.274486 0.0222222 V1 -1.02222 0 0.0222222 V2 -0.605903 0 0.00590278 + N0 -0.0601415 -0.0162121 -0.998058 N1 -0.0623783 -0 -0.998053 N2 -0.0226746 -0 -0.999743 + txt003 +STRI + V0 -0.584584 -0.162696 0.00590278 V1 -0.524218 -0.307888 0.00590278 V2 -0.884412 -0.51944 0.0222222 + N0 -0.0218614 -0.00589307 -0.999744 N1 -0.0195486 -0.0113382 -0.999745 N2 -0.0537792 -0.0311919 -0.998066 + txt003 +STRI + V0 -0.884412 -0.51944 0.0222222 V1 -0.986255 -0.274486 0.0222222 V2 -0.584584 -0.162696 0.00590278 + N0 -0.0537792 -0.0311919 -0.998066 N1 -0.0601415 -0.0162121 -0.998058 N2 -0.0218614 -0.00589307 -0.999744 + txt003 +STRI + V0 -0.524218 -0.307888 0.00590278 V1 -0.430191 -0.430191 0.00590278 V2 -0.725778 -0.725778 0.0222222 + N0 -0.0195486 -0.0113382 -0.999745 N1 -0.015968 -0.015968 -0.999745 N2 -0.0439291 -0.0439291 -0.998068 + txt003 +STRI + V0 -0.725778 -0.725778 0.0222222 V1 -0.884412 -0.51944 0.0222222 V2 -0.524218 -0.307888 0.00590278 + N0 -0.0439291 -0.0439291 -0.998068 N1 -0.0537792 -0.0311919 -0.998066 N2 -0.0195486 -0.0113382 -0.999745 + txt003 +STRI + V0 -0.430191 -0.430191 0.00590278 V1 -0.307888 -0.524218 0.00590278 V2 -0.51944 -0.884412 0.0222222 + N0 -0.015968 -0.015968 -0.999745 N1 -0.0113382 -0.0195486 -0.999745 N2 -0.0311919 -0.0537792 -0.998066 + txt003 +STRI + V0 -0.51944 -0.884412 0.0222222 V1 -0.725778 -0.725778 0.0222222 V2 -0.430191 -0.430191 0.00590278 + N0 -0.0311919 -0.0537792 -0.998066 N1 -0.0439291 -0.0439291 -0.998068 N2 -0.015968 -0.015968 -0.999745 + txt003 +STRI + V0 -0.307888 -0.524218 0.00590278 V1 -0.162696 -0.584584 0.00590278 V2 -0.274486 -0.986255 0.0222222 + N0 -0.0113382 -0.0195486 -0.999745 N1 -0.00589307 -0.0218614 -0.999744 N2 -0.0162121 -0.0601415 -0.998058 + txt003 +STRI + V0 -0.274486 -0.986255 0.0222222 V1 -0.51944 -0.884412 0.0222222 V2 -0.307888 -0.524218 0.00590278 + N0 -0.0162121 -0.0601415 -0.998058 N1 -0.0311919 -0.0537792 -0.998066 N2 -0.0113382 -0.0195486 -0.999745 + txt003 +STRI + V0 -0.162696 -0.584584 0.00590278 V1 0 -0.605903 0.00590278 V2 2.22045e-16 -1.02222 0.0222222 + N0 -0.00589307 -0.0218614 -0.999744 N1 -4.94615e-18 -0.0226746 -0.999743 N2 0 -0.0623783 -0.998053 + txt003 +STRI + V0 2.22045e-16 -1.02222 0.0222222 V1 -0.274486 -0.986255 0.0222222 V2 -0.162696 -0.584584 0.00590278 + N0 0 -0.0623783 -0.998053 N1 -0.0162121 -0.0601415 -0.998058 N2 -0.00589307 -0.0218614 -0.999744 + txt003 +STRI + V0 -1.02222 0 0.0222222 V1 -0.986255 -0.274486 0.0222222 V2 -1.23918 -0.344878 0.046875 + N0 -0.0623783 -0 -0.998053 N1 -0.0601415 -0.0162121 -0.998058 N2 -0.136353 -0.0367561 -0.989978 + txt003 +STRI + V0 -1.23918 -0.344878 0.046875 V1 -1.28438 0 0.046875 V2 -1.02222 0 0.0222222 + N0 -0.136353 -0.0367561 -0.989978 N1 -0.141421 -0 -0.989949 N2 -0.0623783 -0 -0.998053 + txt003 +STRI + V0 -0.986255 -0.274486 0.0222222 V1 -0.884412 -0.51944 0.0222222 V2 -1.11122 -0.652653 0.046875 + N0 -0.0601415 -0.0162121 -0.998058 N1 -0.0537792 -0.0311919 -0.998066 N2 -0.121932 -0.0707208 -0.990016 + txt003 +STRI + V0 -1.11122 -0.652653 0.046875 V1 -1.23918 -0.344878 0.046875 V2 -0.986255 -0.274486 0.0222222 + N0 -0.121932 -0.0707208 -0.990016 N1 -0.136353 -0.0367561 -0.989978 N2 -0.0601415 -0.0162121 -0.998058 + txt003 +STRI + V0 -0.884412 -0.51944 0.0222222 V1 -0.725778 -0.725778 0.0222222 V2 -0.911906 -0.911906 0.046875 + N0 -0.0537792 -0.0311919 -0.998066 N1 -0.0439291 -0.0439291 -0.998068 N2 -0.0996006 -0.0996006 -0.99003 + txt003 +STRI + V0 -0.911906 -0.911906 0.046875 V1 -1.11122 -0.652653 0.046875 V2 -0.884412 -0.51944 0.0222222 + N0 -0.0996006 -0.0996006 -0.99003 N1 -0.121932 -0.0707208 -0.990016 N2 -0.0537792 -0.0311919 -0.998066 + txt003 +STRI + V0 -0.725778 -0.725778 0.0222222 V1 -0.51944 -0.884412 0.0222222 V2 -0.652653 -1.11122 0.046875 + N0 -0.0439291 -0.0439291 -0.998068 N1 -0.0311919 -0.0537792 -0.998066 N2 -0.0707208 -0.121932 -0.990016 + txt003 +STRI + V0 -0.652653 -1.11122 0.046875 V1 -0.911906 -0.911906 0.046875 V2 -0.725778 -0.725778 0.0222222 + N0 -0.0707208 -0.121932 -0.990016 N1 -0.0996006 -0.0996006 -0.99003 N2 -0.0439291 -0.0439291 -0.998068 + txt003 +STRI + V0 -0.51944 -0.884412 0.0222222 V1 -0.274486 -0.986255 0.0222222 V2 -0.344878 -1.23918 0.046875 + N0 -0.0311919 -0.0537792 -0.998066 N1 -0.0162121 -0.0601415 -0.998058 N2 -0.0367561 -0.136353 -0.989978 + txt003 +STRI + V0 -0.344878 -1.23918 0.046875 V1 -0.652653 -1.11122 0.046875 V2 -0.51944 -0.884412 0.0222222 + N0 -0.0367561 -0.136353 -0.989978 N1 -0.0707208 -0.121932 -0.990016 N2 -0.0311919 -0.0537792 -0.998066 + txt003 +STRI + V0 -0.274486 -0.986255 0.0222222 V1 2.22045e-16 -1.02222 0.0222222 V2 -2.22045e-16 -1.28437 0.046875 + N0 -0.0162121 -0.0601415 -0.998058 N1 0 -0.0623783 -0.998053 N2 0 -0.141421 -0.989949 + txt003 +STRI + V0 -2.22045e-16 -1.28437 0.046875 V1 -0.344878 -1.23918 0.046875 V2 -0.274486 -0.986255 0.0222222 + N0 0 -0.141421 -0.989949 N1 -0.0367561 -0.136353 -0.989978 N2 -0.0162121 -0.0601415 -0.998058 + txt003 +STRI + V0 -1.28438 0 0.046875 V1 -1.23918 -0.344878 0.046875 V2 -1.37754 -0.383385 0.0777778 + N0 -0.141421 -0 -0.989949 N1 -0.136353 -0.0367561 -0.989978 N2 -0.316788 -0.085395 -0.944644 + txt003 +STRI + V0 -1.37754 -0.383385 0.0777778 V1 -1.42778 0 0.0777778 V2 -1.28438 0 0.046875 + N0 -0.316788 -0.085395 -0.944644 N1 -0.328521 -0 -0.944497 N2 -0.141421 -0 -0.989949 + txt003 +STRI + V0 -1.23918 -0.344878 0.046875 V1 -1.11122 -0.652653 0.046875 V2 -1.23529 -0.725523 0.0777778 + N0 -0.136353 -0.0367561 -0.989978 N1 -0.121932 -0.0707208 -0.990016 N2 -0.283331 -0.164332 -0.944838 + txt003 +STRI + V0 -1.23529 -0.725523 0.0777778 V1 -1.37754 -0.383385 0.0777778 V2 -1.23918 -0.344878 0.046875 + N0 -0.283331 -0.164332 -0.944838 N1 -0.316788 -0.085395 -0.944644 N2 -0.136353 -0.0367561 -0.989978 + txt003 +STRI + V0 -1.11122 -0.652653 0.046875 V1 -0.911906 -0.911906 0.046875 V2 -1.01372 -1.01372 0.0777778 + N0 -0.121932 -0.0707208 -0.990016 N1 -0.0996006 -0.0996006 -0.99003 N2 -0.231454 -0.231454 -0.944912 + txt003 +STRI + V0 -1.01372 -1.01372 0.0777778 V1 -1.23529 -0.725523 0.0777778 V2 -1.11122 -0.652653 0.046875 + N0 -0.231454 -0.231454 -0.944912 N1 -0.283331 -0.164332 -0.944838 N2 -0.121932 -0.0707208 -0.990016 + txt003 +STRI + V0 -0.911906 -0.911906 0.046875 V1 -0.652653 -1.11122 0.046875 V2 -0.725523 -1.23529 0.0777778 + N0 -0.0996006 -0.0996006 -0.99003 N1 -0.0707208 -0.121932 -0.990016 N2 -0.164332 -0.283331 -0.944838 + txt003 +STRI + V0 -0.725523 -1.23529 0.0777778 V1 -1.01372 -1.01372 0.0777778 V2 -0.911906 -0.911906 0.046875 + N0 -0.164332 -0.283331 -0.944838 N1 -0.231454 -0.231454 -0.944912 N2 -0.0996006 -0.0996006 -0.99003 + txt003 +STRI + V0 -0.652653 -1.11122 0.046875 V1 -0.344878 -1.23918 0.046875 V2 -0.383385 -1.37754 0.0777778 + N0 -0.0707208 -0.121932 -0.990016 N1 -0.0367561 -0.136353 -0.989978 N2 -0.085395 -0.316788 -0.944644 + txt003 +STRI + V0 -0.383385 -1.37754 0.0777778 V1 -0.725523 -1.23529 0.0777778 V2 -0.652653 -1.11122 0.046875 + N0 -0.085395 -0.316788 -0.944644 N1 -0.164332 -0.283331 -0.944838 N2 -0.0707208 -0.121932 -0.990016 + txt003 +STRI + V0 -0.344878 -1.23918 0.046875 V1 -2.22045e-16 -1.28437 0.046875 V2 2.22045e-16 -1.42778 0.0777778 + N0 -0.0367561 -0.136353 -0.989978 N1 0 -0.141421 -0.989949 N2 -6.08223e-17 -0.328521 -0.944497 + txt003 +STRI + V0 2.22045e-16 -1.42778 0.0777778 V1 -0.383385 -1.37754 0.0777778 V2 -0.344878 -1.23918 0.046875 + N0 -6.08223e-17 -0.328521 -0.944497 N1 -0.085395 -0.316788 -0.944644 N2 -0.0367561 -0.136353 -0.989978 + txt003 +STRI + V0 -1.42778 0 0.0777778 V1 -1.37754 -0.383385 0.0777778 V2 -1.4355 -0.399515 0.112847 + N0 -0.328521 -0 -0.944497 N1 -0.316788 -0.085395 -0.944644 N2 -0.743044 -0.200299 -0.638566 + txt003 +STRI + V0 -1.4355 -0.399515 0.112847 V1 -1.48785 0 0.112847 V2 -1.42778 0 0.0777778 + N0 -0.743044 -0.200299 -0.638566 N1 -0.770022 -0 -0.638018 N2 -0.328521 -0 -0.944497 + txt003 +STRI + V0 -1.37754 -0.383385 0.0777778 V1 -1.23529 -0.725523 0.0777778 V2 -1.28726 -0.756047 0.112847 + N0 -0.316788 -0.085395 -0.944644 N1 -0.283331 -0.164332 -0.944838 N2 -0.665182 -0.385806 -0.639286 + txt003 +STRI + V0 -1.28726 -0.756047 0.112847 V1 -1.4355 -0.399515 0.112847 V2 -1.37754 -0.383385 0.0777778 + N0 -0.665182 -0.385806 -0.639286 N1 -0.743044 -0.200299 -0.638566 N2 -0.316788 -0.085395 -0.944644 + txt003 +STRI + V0 -1.23529 -0.725523 0.0777778 V1 -1.01372 -1.01372 0.0777778 V2 -1.05637 -1.05637 0.112847 + N0 -0.283331 -0.164332 -0.944838 N1 -0.231454 -0.231454 -0.944912 N2 -0.543581 -0.543581 -0.639562 + txt003 +STRI + V0 -1.05637 -1.05637 0.112847 V1 -1.28726 -0.756047 0.112847 V2 -1.23529 -0.725523 0.0777778 + N0 -0.543581 -0.543581 -0.639562 N1 -0.665182 -0.385806 -0.639286 N2 -0.283331 -0.164332 -0.944838 + txt003 +STRI + V0 -1.01372 -1.01372 0.0777778 V1 -0.725523 -1.23529 0.0777778 V2 -0.756047 -1.28726 0.112847 + N0 -0.231454 -0.231454 -0.944912 N1 -0.164332 -0.283331 -0.944838 N2 -0.385806 -0.665182 -0.639286 + txt003 +STRI + V0 -0.756047 -1.28726 0.112847 V1 -1.05637 -1.05637 0.112847 V2 -1.01372 -1.01372 0.0777778 + N0 -0.385806 -0.665182 -0.639286 N1 -0.543581 -0.543581 -0.639562 N2 -0.231454 -0.231454 -0.944912 + txt003 +STRI + V0 -0.725523 -1.23529 0.0777778 V1 -0.383385 -1.37754 0.0777778 V2 -0.399515 -1.4355 0.112847 + N0 -0.164332 -0.283331 -0.944838 N1 -0.085395 -0.316788 -0.944644 N2 -0.200299 -0.743044 -0.638566 + txt003 +STRI + V0 -0.399515 -1.4355 0.112847 V1 -0.756047 -1.28726 0.112847 V2 -0.725523 -1.23529 0.0777778 + N0 -0.200299 -0.743044 -0.638566 N1 -0.385806 -0.665182 -0.639286 N2 -0.164332 -0.283331 -0.944838 + txt003 +STRI + V0 -0.383385 -1.37754 0.0777778 V1 2.22045e-16 -1.42778 0.0777778 V2 0 -1.48785 0.112847 + N0 -0.085395 -0.316788 -0.944644 N1 -6.08223e-17 -0.328521 -0.944497 N2 -1.36806e-16 -0.770022 -0.638018 + txt003 +STRI + V0 0 -1.48785 0.112847 V1 -0.399515 -1.4355 0.112847 V2 -0.383385 -1.37754 0.0777778 + N0 -1.36806e-16 -0.770022 -0.638018 N1 -0.200299 -0.743044 -0.638566 N2 -0.085395 -0.316788 -0.944644 + txt003 +STRI + V0 -1.48785 0 0.112847 V1 -1.4355 -0.399515 0.112847 V2 -1.44722 -0.402778 0.15 + N0 -0.770022 -0 -0.638018 N1 -0.743044 -0.200299 -0.638566 N2 -0.965535 -0.260275 -2.07142e-16 + txt003 +STRI + V0 -1.44722 -0.402778 0.15 V1 -1.5 0 0.15 V2 -1.48785 0 0.112847 + N0 -0.965535 -0.260275 -2.07142e-16 N1 -1 0 0 N2 -0.770022 -0 -0.638018 + txt003 +STRI + V0 -1.4355 -0.399515 0.112847 V1 -1.28726 -0.756047 0.112847 V2 -1.29778 -0.762222 0.15 + N0 -0.743044 -0.200299 -0.638566 N1 -0.665182 -0.385806 -0.639286 N2 -0.865031 -0.501718 -5.46348e-16 + txt003 +STRI + V0 -1.29778 -0.762222 0.15 V1 -1.44722 -0.402778 0.15 V2 -1.4355 -0.399515 0.112847 + N0 -0.865031 -0.501718 -5.46348e-16 N1 -0.965535 -0.260275 -2.07142e-16 N2 -0.743044 -0.200299 -0.638566 + txt003 +STRI + V0 -1.28726 -0.756047 0.112847 V1 -1.05637 -1.05637 0.112847 V2 -1.065 -1.065 0.15 + N0 -0.665182 -0.385806 -0.639286 N1 -0.543581 -0.543581 -0.639562 N2 -0.707107 -0.707107 -6.97819e-16 + txt003 +STRI + V0 -1.065 -1.065 0.15 V1 -1.29778 -0.762222 0.15 V2 -1.28726 -0.756047 0.112847 + N0 -0.707107 -0.707107 -6.97819e-16 N1 -0.865031 -0.501718 -5.46348e-16 N2 -0.665182 -0.385806 -0.639286 + txt003 +STRI + V0 -1.05637 -1.05637 0.112847 V1 -0.756047 -1.28726 0.112847 V2 -0.762222 -1.29778 0.15 + N0 -0.543581 -0.543581 -0.639562 N1 -0.385806 -0.665182 -0.639286 N2 -0.501718 -0.865031 -5.46348e-16 + txt003 +STRI + V0 -0.762222 -1.29778 0.15 V1 -1.065 -1.065 0.15 V2 -1.05637 -1.05637 0.112847 + N0 -0.501718 -0.865031 -5.46348e-16 N1 -0.707107 -0.707107 -6.97819e-16 N2 -0.543581 -0.543581 -0.639562 + txt003 +STRI + V0 -0.756047 -1.28726 0.112847 V1 -0.399515 -1.4355 0.112847 V2 -0.402778 -1.44722 0.15 + N0 -0.385806 -0.665182 -0.639286 N1 -0.200299 -0.743044 -0.638566 N2 -0.260275 -0.965535 -2.07142e-16 + txt003 +STRI + V0 -0.402778 -1.44722 0.15 V1 -0.762222 -1.29778 0.15 V2 -0.756047 -1.28726 0.112847 + N0 -0.260275 -0.965535 -2.07142e-16 N1 -0.501718 -0.865031 -5.46348e-16 N2 -0.385806 -0.665182 -0.639286 + txt003 +STRI + V0 -0.399515 -1.4355 0.112847 V1 0 -1.48785 0.112847 V2 0 -1.5 0.15 + N0 -0.200299 -0.743044 -0.638566 N1 -1.36806e-16 -0.770022 -0.638018 N2 0 -1 0 + txt003 +STRI + V0 0 -1.5 0.15 V1 -0.402778 -1.44722 0.15 V2 -0.399515 -1.4355 0.112847 + N0 0 -1 0 N1 -0.260275 -0.965535 -2.07142e-16 N2 -0.200299 -0.743044 -0.638566 + txt003 +STRI + V0 0.162696 -0.584584 0.00590278 V1 0 -0.605903 0.00590278 V2 0 0 0 + N0 0.00589307 -0.0218614 -0.999744 N1 0 -0.0226746 -0.999743 N2 0 0 -1 + txt003 +STRI + V0 0.307888 -0.524218 0.00590278 V1 0.162696 -0.584584 0.00590278 V2 0 0 0 + N0 0.0113382 -0.0195486 -0.999745 N1 0.00589307 -0.0218614 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 0.430191 -0.430191 0.00590278 V1 0.307888 -0.524218 0.00590278 V2 0 0 0 + N0 0.015968 -0.015968 -0.999745 N1 0.0113382 -0.0195486 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0.524218 -0.307888 0.00590278 V1 0.430191 -0.430191 0.00590278 V2 0 0 0 + N0 0.0195486 -0.0113382 -0.999745 N1 0.015968 -0.015968 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0.584584 -0.162696 0.00590278 V1 0.524218 -0.307888 0.00590278 V2 0 0 0 + N0 0.0218614 -0.00589307 -0.999744 N1 0.0195486 -0.0113382 -0.999745 N2 0 0 -1 + txt003 +STRI + V0 0.605903 0 0.00590278 V1 0.584584 -0.162696 0.00590278 V2 0 0 0 + N0 0.0226746 -4.94615e-18 -0.999743 N1 0.0218614 -0.00589307 -0.999744 N2 0 0 -1 + txt003 +STRI + V0 0 -0.605903 0.00590278 V1 0.162696 -0.584584 0.00590278 V2 0.274486 -0.986255 0.0222222 + N0 0 -0.0226746 -0.999743 N1 0.00589307 -0.0218614 -0.999744 N2 0.0162121 -0.0601415 -0.998058 + txt003 +STRI + V0 0.274486 -0.986255 0.0222222 V1 0 -1.02222 0.0222222 V2 0 -0.605903 0.00590278 + N0 0.0162121 -0.0601415 -0.998058 N1 0 -0.0623783 -0.998053 N2 0 -0.0226746 -0.999743 + txt003 +STRI + V0 0.162696 -0.584584 0.00590278 V1 0.307888 -0.524218 0.00590278 V2 0.51944 -0.884412 0.0222222 + N0 0.00589307 -0.0218614 -0.999744 N1 0.0113382 -0.0195486 -0.999745 N2 0.0311919 -0.0537792 -0.998066 + txt003 +STRI + V0 0.51944 -0.884412 0.0222222 V1 0.274486 -0.986255 0.0222222 V2 0.162696 -0.584584 0.00590278 + N0 0.0311919 -0.0537792 -0.998066 N1 0.0162121 -0.0601415 -0.998058 N2 0.00589307 -0.0218614 -0.999744 + txt003 +STRI + V0 0.307888 -0.524218 0.00590278 V1 0.430191 -0.430191 0.00590278 V2 0.725778 -0.725778 0.0222222 + N0 0.0113382 -0.0195486 -0.999745 N1 0.015968 -0.015968 -0.999745 N2 0.0439291 -0.0439291 -0.998068 + txt003 +STRI + V0 0.725778 -0.725778 0.0222222 V1 0.51944 -0.884412 0.0222222 V2 0.307888 -0.524218 0.00590278 + N0 0.0439291 -0.0439291 -0.998068 N1 0.0311919 -0.0537792 -0.998066 N2 0.0113382 -0.0195486 -0.999745 + txt003 +STRI + V0 0.430191 -0.430191 0.00590278 V1 0.524218 -0.307888 0.00590278 V2 0.884412 -0.51944 0.0222222 + N0 0.015968 -0.015968 -0.999745 N1 0.0195486 -0.0113382 -0.999745 N2 0.0537792 -0.0311919 -0.998066 + txt003 +STRI + V0 0.884412 -0.51944 0.0222222 V1 0.725778 -0.725778 0.0222222 V2 0.430191 -0.430191 0.00590278 + N0 0.0537792 -0.0311919 -0.998066 N1 0.0439291 -0.0439291 -0.998068 N2 0.015968 -0.015968 -0.999745 + txt003 +STRI + V0 0.524218 -0.307888 0.00590278 V1 0.584584 -0.162696 0.00590278 V2 0.986255 -0.274486 0.0222222 + N0 0.0195486 -0.0113382 -0.999745 N1 0.0218614 -0.00589307 -0.999744 N2 0.0601415 -0.0162121 -0.998058 + txt003 +STRI + V0 0.986255 -0.274486 0.0222222 V1 0.884412 -0.51944 0.0222222 V2 0.524218 -0.307888 0.00590278 + N0 0.0601415 -0.0162121 -0.998058 N1 0.0537792 -0.0311919 -0.998066 N2 0.0195486 -0.0113382 -0.999745 + txt003 +STRI + V0 0.584584 -0.162696 0.00590278 V1 0.605903 0 0.00590278 V2 1.02222 2.22045e-16 0.0222222 + N0 0.0218614 -0.00589307 -0.999744 N1 0.0226746 -4.94615e-18 -0.999743 N2 0.0623783 0 -0.998053 + txt003 +STRI + V0 1.02222 2.22045e-16 0.0222222 V1 0.986255 -0.274486 0.0222222 V2 0.584584 -0.162696 0.00590278 + N0 0.0623783 0 -0.998053 N1 0.0601415 -0.0162121 -0.998058 N2 0.0218614 -0.00589307 -0.999744 + txt003 +STRI + V0 0 -1.02222 0.0222222 V1 0.274486 -0.986255 0.0222222 V2 0.344878 -1.23918 0.046875 + N0 0 -0.0623783 -0.998053 N1 0.0162121 -0.0601415 -0.998058 N2 0.0367561 -0.136353 -0.989978 + txt003 +STRI + V0 0.344878 -1.23918 0.046875 V1 0 -1.28438 0.046875 V2 0 -1.02222 0.0222222 + N0 0.0367561 -0.136353 -0.989978 N1 0 -0.141421 -0.989949 N2 0 -0.0623783 -0.998053 + txt003 +STRI + V0 0.274486 -0.986255 0.0222222 V1 0.51944 -0.884412 0.0222222 V2 0.652653 -1.11122 0.046875 + N0 0.0162121 -0.0601415 -0.998058 N1 0.0311919 -0.0537792 -0.998066 N2 0.0707208 -0.121932 -0.990016 + txt003 +STRI + V0 0.652653 -1.11122 0.046875 V1 0.344878 -1.23918 0.046875 V2 0.274486 -0.986255 0.0222222 + N0 0.0707208 -0.121932 -0.990016 N1 0.0367561 -0.136353 -0.989978 N2 0.0162121 -0.0601415 -0.998058 + txt003 +STRI + V0 0.51944 -0.884412 0.0222222 V1 0.725778 -0.725778 0.0222222 V2 0.911906 -0.911906 0.046875 + N0 0.0311919 -0.0537792 -0.998066 N1 0.0439291 -0.0439291 -0.998068 N2 0.0996006 -0.0996006 -0.99003 + txt003 +STRI + V0 0.911906 -0.911906 0.046875 V1 0.652653 -1.11122 0.046875 V2 0.51944 -0.884412 0.0222222 + N0 0.0996006 -0.0996006 -0.99003 N1 0.0707208 -0.121932 -0.990016 N2 0.0311919 -0.0537792 -0.998066 + txt003 +STRI + V0 0.725778 -0.725778 0.0222222 V1 0.884412 -0.51944 0.0222222 V2 1.11122 -0.652653 0.046875 + N0 0.0439291 -0.0439291 -0.998068 N1 0.0537792 -0.0311919 -0.998066 N2 0.121932 -0.0707208 -0.990016 + txt003 +STRI + V0 1.11122 -0.652653 0.046875 V1 0.911906 -0.911906 0.046875 V2 0.725778 -0.725778 0.0222222 + N0 0.121932 -0.0707208 -0.990016 N1 0.0996006 -0.0996006 -0.99003 N2 0.0439291 -0.0439291 -0.998068 + txt003 +STRI + V0 0.884412 -0.51944 0.0222222 V1 0.986255 -0.274486 0.0222222 V2 1.23918 -0.344878 0.046875 + N0 0.0537792 -0.0311919 -0.998066 N1 0.0601415 -0.0162121 -0.998058 N2 0.136353 -0.0367561 -0.989978 + txt003 +STRI + V0 1.23918 -0.344878 0.046875 V1 1.11122 -0.652653 0.046875 V2 0.884412 -0.51944 0.0222222 + N0 0.136353 -0.0367561 -0.989978 N1 0.121932 -0.0707208 -0.990016 N2 0.0537792 -0.0311919 -0.998066 + txt003 +STRI + V0 0.986255 -0.274486 0.0222222 V1 1.02222 2.22045e-16 0.0222222 V2 1.28437 -2.22045e-16 0.046875 + N0 0.0601415 -0.0162121 -0.998058 N1 0.0623783 0 -0.998053 N2 0.141421 0 -0.989949 + txt003 +STRI + V0 1.28437 -2.22045e-16 0.046875 V1 1.23918 -0.344878 0.046875 V2 0.986255 -0.274486 0.0222222 + N0 0.141421 0 -0.989949 N1 0.136353 -0.0367561 -0.989978 N2 0.0601415 -0.0162121 -0.998058 + txt003 +STRI + V0 0 -1.28438 0.046875 V1 0.344878 -1.23918 0.046875 V2 0.383385 -1.37754 0.0777778 + N0 0 -0.141421 -0.989949 N1 0.0367561 -0.136353 -0.989978 N2 0.085395 -0.316788 -0.944644 + txt003 +STRI + V0 0.383385 -1.37754 0.0777778 V1 0 -1.42778 0.0777778 V2 0 -1.28438 0.046875 + N0 0.085395 -0.316788 -0.944644 N1 0 -0.328521 -0.944497 N2 0 -0.141421 -0.989949 + txt003 +STRI + V0 0.344878 -1.23918 0.046875 V1 0.652653 -1.11122 0.046875 V2 0.725523 -1.23529 0.0777778 + N0 0.0367561 -0.136353 -0.989978 N1 0.0707208 -0.121932 -0.990016 N2 0.164332 -0.283331 -0.944838 + txt003 +STRI + V0 0.725523 -1.23529 0.0777778 V1 0.383385 -1.37754 0.0777778 V2 0.344878 -1.23918 0.046875 + N0 0.164332 -0.283331 -0.944838 N1 0.085395 -0.316788 -0.944644 N2 0.0367561 -0.136353 -0.989978 + txt003 +STRI + V0 0.652653 -1.11122 0.046875 V1 0.911906 -0.911906 0.046875 V2 1.01372 -1.01372 0.0777778 + N0 0.0707208 -0.121932 -0.990016 N1 0.0996006 -0.0996006 -0.99003 N2 0.231454 -0.231454 -0.944912 + txt003 +STRI + V0 1.01372 -1.01372 0.0777778 V1 0.725523 -1.23529 0.0777778 V2 0.652653 -1.11122 0.046875 + N0 0.231454 -0.231454 -0.944912 N1 0.164332 -0.283331 -0.944838 N2 0.0707208 -0.121932 -0.990016 + txt003 +STRI + V0 0.911906 -0.911906 0.046875 V1 1.11122 -0.652653 0.046875 V2 1.23529 -0.725523 0.0777778 + N0 0.0996006 -0.0996006 -0.99003 N1 0.121932 -0.0707208 -0.990016 N2 0.283331 -0.164332 -0.944838 + txt003 +STRI + V0 1.23529 -0.725523 0.0777778 V1 1.01372 -1.01372 0.0777778 V2 0.911906 -0.911906 0.046875 + N0 0.283331 -0.164332 -0.944838 N1 0.231454 -0.231454 -0.944912 N2 0.0996006 -0.0996006 -0.99003 + txt003 +STRI + V0 1.11122 -0.652653 0.046875 V1 1.23918 -0.344878 0.046875 V2 1.37754 -0.383385 0.0777778 + N0 0.121932 -0.0707208 -0.990016 N1 0.136353 -0.0367561 -0.989978 N2 0.316788 -0.085395 -0.944644 + txt003 +STRI + V0 1.37754 -0.383385 0.0777778 V1 1.23529 -0.725523 0.0777778 V2 1.11122 -0.652653 0.046875 + N0 0.316788 -0.085395 -0.944644 N1 0.283331 -0.164332 -0.944838 N2 0.121932 -0.0707208 -0.990016 + txt003 +STRI + V0 1.23918 -0.344878 0.046875 V1 1.28437 -2.22045e-16 0.046875 V2 1.42778 2.22045e-16 0.0777778 + N0 0.136353 -0.0367561 -0.989978 N1 0.141421 0 -0.989949 N2 0.328521 -6.08223e-17 -0.944497 + txt003 +STRI + V0 1.42778 2.22045e-16 0.0777778 V1 1.37754 -0.383385 0.0777778 V2 1.23918 -0.344878 0.046875 + N0 0.328521 -6.08223e-17 -0.944497 N1 0.316788 -0.085395 -0.944644 N2 0.136353 -0.0367561 -0.989978 + txt003 +STRI + V0 0 -1.42778 0.0777778 V1 0.383385 -1.37754 0.0777778 V2 0.399515 -1.4355 0.112847 + N0 0 -0.328521 -0.944497 N1 0.085395 -0.316788 -0.944644 N2 0.200299 -0.743044 -0.638566 + txt003 +STRI + V0 0.399515 -1.4355 0.112847 V1 0 -1.48785 0.112847 V2 0 -1.42778 0.0777778 + N0 0.200299 -0.743044 -0.638566 N1 0 -0.770022 -0.638018 N2 0 -0.328521 -0.944497 + txt003 +STRI + V0 0.383385 -1.37754 0.0777778 V1 0.725523 -1.23529 0.0777778 V2 0.756047 -1.28726 0.112847 + N0 0.085395 -0.316788 -0.944644 N1 0.164332 -0.283331 -0.944838 N2 0.385806 -0.665182 -0.639286 + txt003 +STRI + V0 0.756047 -1.28726 0.112847 V1 0.399515 -1.4355 0.112847 V2 0.383385 -1.37754 0.0777778 + N0 0.385806 -0.665182 -0.639286 N1 0.200299 -0.743044 -0.638566 N2 0.085395 -0.316788 -0.944644 + txt003 +STRI + V0 0.725523 -1.23529 0.0777778 V1 1.01372 -1.01372 0.0777778 V2 1.05637 -1.05637 0.112847 + N0 0.164332 -0.283331 -0.944838 N1 0.231454 -0.231454 -0.944912 N2 0.543581 -0.543581 -0.639562 + txt003 +STRI + V0 1.05637 -1.05637 0.112847 V1 0.756047 -1.28726 0.112847 V2 0.725523 -1.23529 0.0777778 + N0 0.543581 -0.543581 -0.639562 N1 0.385806 -0.665182 -0.639286 N2 0.164332 -0.283331 -0.944838 + txt003 +STRI + V0 1.01372 -1.01372 0.0777778 V1 1.23529 -0.725523 0.0777778 V2 1.28726 -0.756047 0.112847 + N0 0.231454 -0.231454 -0.944912 N1 0.283331 -0.164332 -0.944838 N2 0.665182 -0.385806 -0.639286 + txt003 +STRI + V0 1.28726 -0.756047 0.112847 V1 1.05637 -1.05637 0.112847 V2 1.01372 -1.01372 0.0777778 + N0 0.665182 -0.385806 -0.639286 N1 0.543581 -0.543581 -0.639562 N2 0.231454 -0.231454 -0.944912 + txt003 +STRI + V0 1.23529 -0.725523 0.0777778 V1 1.37754 -0.383385 0.0777778 V2 1.4355 -0.399515 0.112847 + N0 0.283331 -0.164332 -0.944838 N1 0.316788 -0.085395 -0.944644 N2 0.743044 -0.200299 -0.638566 + txt003 +STRI + V0 1.4355 -0.399515 0.112847 V1 1.28726 -0.756047 0.112847 V2 1.23529 -0.725523 0.0777778 + N0 0.743044 -0.200299 -0.638566 N1 0.665182 -0.385806 -0.639286 N2 0.283331 -0.164332 -0.944838 + txt003 +STRI + V0 1.37754 -0.383385 0.0777778 V1 1.42778 2.22045e-16 0.0777778 V2 1.48785 0 0.112847 + N0 0.316788 -0.085395 -0.944644 N1 0.328521 -6.08223e-17 -0.944497 N2 0.770022 -1.36806e-16 -0.638018 + txt003 +STRI + V0 1.48785 0 0.112847 V1 1.4355 -0.399515 0.112847 V2 1.37754 -0.383385 0.0777778 + N0 0.770022 -1.36806e-16 -0.638018 N1 0.743044 -0.200299 -0.638566 N2 0.316788 -0.085395 -0.944644 + txt003 +STRI + V0 0 -1.48785 0.112847 V1 0.399515 -1.4355 0.112847 V2 0.402778 -1.44722 0.15 + N0 0 -0.770022 -0.638018 N1 0.200299 -0.743044 -0.638566 N2 0.260275 -0.965535 -2.07142e-16 + txt003 +STRI + V0 0.402778 -1.44722 0.15 V1 0 -1.5 0.15 V2 0 -1.48785 0.112847 + N0 0.260275 -0.965535 -2.07142e-16 N1 0 -1 0 N2 0 -0.770022 -0.638018 + txt003 +STRI + V0 0.399515 -1.4355 0.112847 V1 0.756047 -1.28726 0.112847 V2 0.762222 -1.29778 0.15 + N0 0.200299 -0.743044 -0.638566 N1 0.385806 -0.665182 -0.639286 N2 0.501718 -0.865031 -5.46348e-16 + txt003 +STRI + V0 0.762222 -1.29778 0.15 V1 0.402778 -1.44722 0.15 V2 0.399515 -1.4355 0.112847 + N0 0.501718 -0.865031 -5.46348e-16 N1 0.260275 -0.965535 -2.07142e-16 N2 0.200299 -0.743044 -0.638566 + txt003 +STRI + V0 0.756047 -1.28726 0.112847 V1 1.05637 -1.05637 0.112847 V2 1.065 -1.065 0.15 + N0 0.385806 -0.665182 -0.639286 N1 0.543581 -0.543581 -0.639562 N2 0.707107 -0.707107 -6.97819e-16 + txt003 +STRI + V0 1.065 -1.065 0.15 V1 0.762222 -1.29778 0.15 V2 0.756047 -1.28726 0.112847 + N0 0.707107 -0.707107 -6.97819e-16 N1 0.501718 -0.865031 -5.46348e-16 N2 0.385806 -0.665182 -0.639286 + txt003 +STRI + V0 1.05637 -1.05637 0.112847 V1 1.28726 -0.756047 0.112847 V2 1.29778 -0.762222 0.15 + N0 0.543581 -0.543581 -0.639562 N1 0.665182 -0.385806 -0.639286 N2 0.865031 -0.501718 -5.46348e-16 + txt003 +STRI + V0 1.29778 -0.762222 0.15 V1 1.065 -1.065 0.15 V2 1.05637 -1.05637 0.112847 + N0 0.865031 -0.501718 -5.46348e-16 N1 0.707107 -0.707107 -6.97819e-16 N2 0.543581 -0.543581 -0.639562 + txt003 +STRI + V0 1.28726 -0.756047 0.112847 V1 1.4355 -0.399515 0.112847 V2 1.44722 -0.402778 0.15 + N0 0.665182 -0.385806 -0.639286 N1 0.743044 -0.200299 -0.638566 N2 0.965535 -0.260275 -2.07142e-16 + txt003 +STRI + V0 1.44722 -0.402778 0.15 V1 1.29778 -0.762222 0.15 V2 1.28726 -0.756047 0.112847 + N0 0.965535 -0.260275 -2.07142e-16 N1 0.865031 -0.501718 -5.46348e-16 N2 0.665182 -0.385806 -0.639286 + txt003 +STRI + V0 1.4355 -0.399515 0.112847 V1 1.48785 0 0.112847 V2 1.5 0 0.15 + N0 0.743044 -0.200299 -0.638566 N1 0.770022 -1.36806e-16 -0.638018 N2 1 0 0 + txt003 +STRI + V0 1.5 0 0.15 V1 1.44722 -0.402778 0.15 V2 1.4355 -0.399515 0.112847 + N0 1 0 0 N1 0.965535 -0.260275 -2.07142e-16 N2 0.743044 -0.200299 -0.638566 + txt003 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/trypsin4pti.dat b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/trypsin4pti.dat new file mode 100644 index 0000000000..7d547f28d8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/dat/trypsin4pti.dat @@ -0,0 +1,538 @@ +BEGIN_SCENE + OUTFILE /dev/null + RESOLUTION 768 768 + VERBOSE 0 + +CAMERA + ZOOM 1.0 + ASPECTRATIO 1.0 + ANTIALIASING 0 + RAYDEPTH 4 + CENTER 15.0 20.0 -50.0 + VIEWDIR 0.0 0.0 1.0 + UPDIR 0.0 1.0 0.0 +END_CAMERA + + +LIGHT + CENTER 40.0 50.0 -40.0 + RAD 0.2 + COLOR 0.5 0.5 0.5 + +LIGHT + CENTER -40.0 20.0 -40.0 + RAD 0.2 + COLOR 0.5 0.5 0.5 + + +TEXDEF O AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + PHONG PLASTIC 0.5 PHONG_SIZE 24.8 + COLOR 1.0 0.0 0.0 TEXFUNC 0 +TEXALIAS OH O +TEXALIAS OD1 O +TEXALIAS OD2 O +TEXALIAS OE1 O +TEXALIAS OE2 O +TEXALIAS OG O +TEXALIAS OG1 O +TEXALIAS OG2 O +TEXALIAS OXT O + +TEXDEF C AMBIENT 0.1 DIFFUSE 0.5 SPECULAR 0.0 OPACITY 1.0 + PHONG PLASTIC 0.5 PHONG_SIZE 24.8 + COLOR 0.5 0.5 0.5 TEXFUNC 0 +TEXALIAS CA C +TEXALIAS CB C +TEXALIAS CD C +TEXALIAS CD1 C +TEXALIAS CD2 C +TEXALIAS CE C +TEXALIAS CE1 C +TEXALIAS CE2 C +TEXALIAS CG C +TEXALIAS CG1 C +TEXALIAS CG2 C +TEXALIAS CZ C + +TEXDEF N AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + PHONG PLASTIC 0.5 PHONG_SIZE 24.8 + COLOR 0.5 0.5 1.0 TEXFUNC 0 +TEXALIAS ND2 N +TEXALIAS NH1 N +TEXALIAS NH2 N +TEXALIAS NE N +TEXALIAS NE2 N +TEXALIAS NZ N + +TEXDEF SD AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + PHONG METAL 0.5 PHONG_SIZE 24.8 + COLOR 1.0 1.0 1.0 TEXFUNC 0 + +TEXDEF SG AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + PHONG PLASTIC 0.5 PHONG_SIZE 24.8 + COLOR 1.0 1.0 1.0 TEXFUNC 0 + +SPHERE CENTER 26.465000 27.452000 -2.490000 RAD 1.0 N +SPHERE CENTER 25.497000 26.862000 -1.573000 RAD 1.0 CA +SPHERE CENTER 26.193001 26.179001 -0.437000 RAD 1.0 C +SPHERE CENTER 27.270000 25.549000 -0.624000 RAD 1.0 O +SPHERE CENTER 24.583000 25.804001 -2.239000 RAD 1.0 CB +SPHERE CENTER 25.091000 24.375000 -2.409000 RAD 1.0 CG +SPHERE CENTER 24.018999 23.427999 -2.996000 RAD 1.0 CD +SPHERE CENTER 23.591000 24.028000 -4.287000 RAD 1.0 NE +SPHERE CENTER 24.299000 23.972000 -5.389000 RAD 1.0 CZ +SPHERE CENTER 25.431999 23.261000 -5.440000 RAD 1.0 NH1 +SPHERE CENTER 23.721001 24.372999 -6.467000 RAD 1.0 NH2 +SPHERE CENTER 25.667000 26.396000 0.708000 RAD 1.0 N +SPHERE CENTER 26.222000 25.760000 1.891000 RAD 1.0 CA +SPHERE CENTER 26.207001 24.242001 1.830000 RAD 1.0 C +SPHERE CENTER 25.400000 23.576000 1.139000 RAD 1.0 O +SPHERE CENTER 25.260000 26.207001 3.033000 RAD 1.0 CB +SPHERE CENTER 24.511999 27.427999 2.493000 RAD 1.0 CG +SPHERE CENTER 24.606001 27.382000 0.978000 RAD 1.0 CD +SPHERE CENTER 27.170000 23.634001 2.462000 RAD 1.0 N +SPHERE CENTER 27.284000 22.163000 2.498000 RAD 1.0 CA +SPHERE CENTER 26.042999 21.506001 3.085000 RAD 1.0 C +SPHERE CENTER 25.752001 20.350000 2.705000 RAD 1.0 O +SPHERE CENTER 28.424999 21.747000 3.461000 RAD 1.0 CB +SPHERE CENTER 29.791000 21.886000 2.787000 RAD 1.0 CG +SPHERE CENTER 29.875000 22.104000 1.543000 RAD 1.0 OD1 +SPHERE CENTER 30.806000 21.500999 3.431000 RAD 1.0 OD2 +SPHERE CENTER 25.393999 22.184000 4.041000 RAD 1.0 N +SPHERE CENTER 24.172001 21.584999 4.618000 RAD 1.0 CA +SPHERE CENTER 23.009001 21.375000 3.624000 RAD 1.0 C +SPHERE CENTER 22.082001 20.603001 3.921000 RAD 1.0 O +SPHERE CENTER 23.691999 22.330999 5.862000 RAD 1.0 CB +SPHERE CENTER 23.191999 23.778999 5.639000 RAD 1.0 CG +SPHERE CENTER 21.961000 24.002001 5.060000 RAD 1.0 CD1 +SPHERE CENTER 23.951000 24.841000 6.050000 RAD 1.0 CD2 +SPHERE CENTER 21.497000 25.281000 4.869000 RAD 1.0 CE1 +SPHERE CENTER 23.510000 26.124001 5.854000 RAD 1.0 CE2 +SPHERE CENTER 22.277000 26.363001 5.249000 RAD 1.0 CZ +SPHERE CENTER 23.094999 22.004000 2.522000 RAD 1.0 N +SPHERE CENTER 22.106001 21.863001 1.467000 RAD 1.0 CA +SPHERE CENTER 22.191999 20.518000 0.830000 RAD 1.0 C +SPHERE CENTER 21.230000 20.068001 0.167000 RAD 1.0 O +SPHERE CENTER 22.358000 22.903999 0.371000 RAD 1.0 CB +SPHERE CENTER 22.145000 24.591999 0.888000 RAD 1.0 SG +SPHERE CENTER 23.326000 19.826000 1.008000 RAD 1.0 N +SPHERE CENTER 23.436001 18.459999 0.459000 RAD 1.0 CA +SPHERE CENTER 22.958000 17.365000 1.407000 RAD 1.0 C +SPHERE CENTER 22.938000 16.180000 0.999000 RAD 1.0 O +SPHERE CENTER 24.898001 18.084000 0.131000 RAD 1.0 CB +SPHERE CENTER 25.572001 19.129000 -0.776000 RAD 1.0 CG +SPHERE CENTER 27.037001 18.695000 -1.116000 RAD 1.0 CD1 +SPHERE CENTER 24.791000 19.488001 -2.049000 RAD 1.0 CD2 +SPHERE CENTER 22.545000 17.716000 2.628000 RAD 1.0 N +SPHERE CENTER 22.039000 16.646000 3.528000 RAD 1.0 CA +SPHERE CENTER 20.615999 16.285000 3.113000 RAD 1.0 C +SPHERE CENTER 19.860001 17.136000 2.576000 RAD 1.0 O +SPHERE CENTER 21.764000 17.216999 4.920000 RAD 1.0 CB +SPHERE CENTER 22.813999 18.035000 5.647000 RAD 1.0 CG +SPHERE CENTER 22.152000 18.707001 6.870000 RAD 1.0 CD +SPHERE CENTER 22.980000 19.100000 7.718000 RAD 1.0 OE1 +SPHERE CENTER 21.086000 19.403999 6.779000 RAD 1.0 OE2 +SPHERE CENTER 20.254000 15.031000 3.334000 RAD 1.0 N +SPHERE CENTER 18.892000 14.554000 3.034000 RAD 1.0 CA +SPHERE CENTER 17.954000 15.160000 4.079000 RAD 1.0 C +SPHERE CENTER 18.443001 15.606000 5.146000 RAD 1.0 O +SPHERE CENTER 18.910000 13.045000 3.274000 RAD 1.0 CB +SPHERE CENTER 20.226000 12.742000 4.021000 RAD 1.0 CG +SPHERE CENTER 21.107000 14.009000 3.934000 RAD 1.0 CD +SPHERE CENTER 16.681999 15.232000 3.767000 RAD 1.0 N +SPHERE CENTER 15.690000 15.852000 4.661000 RAD 1.0 CA +SPHERE CENTER 15.550000 15.006000 5.916000 RAD 1.0 C +SPHERE CENTER 15.693000 13.769000 5.836000 RAD 1.0 O +SPHERE CENTER 14.367000 15.707000 3.867000 RAD 1.0 CB +SPHERE CENTER 14.571000 14.716000 2.710000 RAD 1.0 CG +SPHERE CENTER 16.090000 14.597000 2.574000 RAD 1.0 CD +SPHERE CENTER 15.365000 15.630000 7.042000 RAD 1.0 N +SPHERE CENTER 15.310000 14.908000 8.298000 RAD 1.0 CA +SPHERE CENTER 13.953000 15.177000 8.952000 RAD 1.0 C +SPHERE CENTER 13.699000 16.320000 9.382000 RAD 1.0 O +SPHERE CENTER 16.532000 15.383000 9.122000 RAD 1.0 CB +SPHERE CENTER 16.608000 14.781000 10.525000 RAD 1.0 CG +SPHERE CENTER 17.132000 13.535000 10.707000 RAD 1.0 CD1 +SPHERE CENTER 16.155001 15.523000 11.588000 RAD 1.0 CD2 +SPHERE CENTER 17.216000 12.999000 11.982000 RAD 1.0 CE1 +SPHERE CENTER 16.266001 14.985000 12.862000 RAD 1.0 CE2 +SPHERE CENTER 16.808001 13.746000 13.047000 RAD 1.0 CZ +SPHERE CENTER 16.878000 13.192000 14.372000 RAD 1.0 OH +SPHERE CENTER 13.161000 14.146000 9.088000 RAD 1.0 N +SPHERE CENTER 11.802000 14.321000 9.642000 RAD 1.0 CA +SPHERE CENTER 11.855000 14.484000 11.146000 RAD 1.0 C +SPHERE CENTER 11.105000 15.314000 11.759000 RAD 1.0 O +SPHERE CENTER 10.963000 13.105000 9.273000 RAD 1.0 CB +SPHERE CENTER 10.706000 13.192000 7.854000 RAD 1.0 OG1 +SPHERE CENTER 9.611000 13.152000 10.045000 RAD 1.0 CG2 +SPHERE CENTER 12.789000 13.760000 11.726000 RAD 1.0 N +SPHERE CENTER 13.002000 13.922000 13.198000 RAD 1.0 CA +SPHERE CENTER 12.107000 12.944000 13.909000 RAD 1.0 C +SPHERE CENTER 11.333000 12.212000 13.239000 RAD 1.0 O +SPHERE CENTER 12.235000 12.905000 15.210000 RAD 1.0 N +SPHERE CENTER 11.516000 11.958000 16.066999 RAD 1.0 CA +SPHERE CENTER 10.094000 12.319000 16.468000 RAD 1.0 C +SPHERE CENTER 9.440000 11.442000 17.052000 RAD 1.0 O +SPHERE CENTER 12.272000 11.936000 17.370001 RAD 1.0 CB +SPHERE CENTER 13.164000 13.172000 17.399000 RAD 1.0 CG +SPHERE CENTER 13.281000 13.627000 15.925000 RAD 1.0 CD +SPHERE CENTER 9.629000 13.519000 16.214001 RAD 1.0 N +SPHERE CENTER 8.290000 13.980000 16.615999 RAD 1.0 CA +SPHERE CENTER 7.268000 13.720000 15.515000 RAD 1.0 C +SPHERE CENTER 7.672000 13.397000 14.387000 RAD 1.0 O +SPHERE CENTER 8.279000 15.441000 16.966999 RAD 1.0 CB +SPHERE CENTER 9.221000 15.735000 18.490000 RAD 1.0 SG +SPHERE CENTER 6.027000 13.680000 15.869000 RAD 1.0 N +SPHERE CENTER 5.005000 13.220000 14.945000 RAD 1.0 CA +SPHERE CENTER 3.964000 14.283000 14.630000 RAD 1.0 C +SPHERE CENTER 2.777000 13.949000 14.377000 RAD 1.0 O +SPHERE CENTER 4.310000 11.998000 15.592000 RAD 1.0 CB +SPHERE CENTER 5.273000 10.848000 15.913000 RAD 1.0 CG +SPHERE CENTER 5.781000 10.034000 14.702000 RAD 1.0 CD +SPHERE CENTER 6.855000 9.016000 15.126000 RAD 1.0 CE +SPHERE CENTER 7.357000 8.291000 13.953000 RAD 1.0 NZ +SPHERE CENTER 4.325000 15.549000 14.618000 RAD 1.0 N +SPHERE CENTER 3.513000 16.639999 14.122000 RAD 1.0 CA +SPHERE CENTER 3.561000 16.615000 12.586000 RAD 1.0 C +SPHERE CENTER 4.270000 15.752000 12.023000 RAD 1.0 O +SPHERE CENTER 3.984000 17.995001 14.670000 RAD 1.0 CB +SPHERE CENTER 2.781000 17.424999 11.943000 RAD 1.0 N +SPHERE CENTER 2.700000 17.355000 10.457000 RAD 1.0 CA +SPHERE CENTER 2.875000 18.731001 9.887000 RAD 1.0 C +SPHERE CENTER 1.878000 19.469999 9.653000 RAD 1.0 O +SPHERE CENTER 1.320000 16.787001 9.970000 RAD 1.0 CB +SPHERE CENTER 1.186000 15.339000 10.395000 RAD 1.0 CG +SPHERE CENTER -0.170000 14.751000 9.963000 RAD 1.0 CD +SPHERE CENTER -1.132000 15.455000 10.801000 RAD 1.0 NE +SPHERE CENTER -1.531000 14.913000 11.939000 RAD 1.0 CZ +SPHERE CENTER -1.172000 13.658000 12.165000 RAD 1.0 NH1 +SPHERE CENTER -2.202000 15.647000 12.795000 RAD 1.0 NH2 +SPHERE CENTER 4.154000 19.110001 9.817000 RAD 1.0 N +SPHERE CENTER 4.595000 20.444000 9.391000 RAD 1.0 CA +SPHERE CENTER 5.249000 20.388000 8.012000 RAD 1.0 C +SPHERE CENTER 6.193000 19.612000 7.834000 RAD 1.0 O +SPHERE CENTER 5.590000 20.988001 10.452000 RAD 1.0 CB +SPHERE CENTER 4.792000 21.062000 11.815000 RAD 1.0 CG1 +SPHERE CENTER 5.985000 22.451000 10.085000 RAD 1.0 CG2 +SPHERE CENTER 5.689000 21.535999 12.955000 RAD 1.0 CD1 +SPHERE CENTER 4.586000 20.955999 7.035000 RAD 1.0 N +SPHERE CENTER 5.154000 20.879000 5.697000 RAD 1.0 CA +SPHERE CENTER 6.286000 21.912001 5.572000 RAD 1.0 C +SPHERE CENTER 6.156000 23.146000 5.785000 RAD 1.0 O +SPHERE CENTER 4.095000 21.205000 4.648000 RAD 1.0 CB +SPHERE CENTER 2.836000 20.316999 4.886000 RAD 1.0 CG1 +SPHERE CENTER 4.655000 20.930000 3.250000 RAD 1.0 CG2 +SPHERE CENTER 3.122000 18.813999 4.850000 RAD 1.0 CD1 +SPHERE CENTER 7.451000 21.372000 5.297000 RAD 1.0 N +SPHERE CENTER 8.602000 22.257000 5.060000 RAD 1.0 CA +SPHERE CENTER 9.150000 21.950001 3.673000 RAD 1.0 C +SPHERE CENTER 8.840000 20.896000 3.088000 RAD 1.0 O +SPHERE CENTER 9.698000 21.896999 6.092000 RAD 1.0 CB +SPHERE CENTER 9.226000 22.299999 7.493000 RAD 1.0 CG +SPHERE CENTER 9.248000 23.850000 7.622000 RAD 1.0 CD +SPHERE CENTER 8.810000 24.311001 8.962000 RAD 1.0 NE +SPHERE CENTER 9.575000 24.336000 10.075000 RAD 1.0 CZ +SPHERE CENTER 10.888000 24.077000 10.044000 RAD 1.0 NH1 +SPHERE CENTER 9.050000 24.893000 11.170000 RAD 1.0 NH2 +SPHERE CENTER 10.178000 22.695000 3.318000 RAD 1.0 N +SPHERE CENTER 10.959000 22.444000 2.085000 RAD 1.0 CA +SPHERE CENTER 12.407000 22.010000 2.386000 RAD 1.0 C +SPHERE CENTER 12.987000 22.511999 3.378000 RAD 1.0 O +SPHERE CENTER 10.997000 23.770000 1.282000 RAD 1.0 CB +SPHERE CENTER 9.641000 24.038000 0.627000 RAD 1.0 CG +SPHERE CENTER 8.639000 24.591999 1.399000 RAD 1.0 CD1 +SPHERE CENTER 9.451000 23.725000 -0.691000 RAD 1.0 CD2 +SPHERE CENTER 7.403000 24.861000 0.831000 RAD 1.0 CE1 +SPHERE CENTER 8.213000 23.993000 -1.249000 RAD 1.0 CE2 +SPHERE CENTER 7.215000 24.576000 -0.494000 RAD 1.0 CZ +SPHERE CENTER 5.879000 24.768999 -1.060000 RAD 1.0 OH +SPHERE CENTER 12.977000 21.141001 1.535000 RAD 1.0 N +SPHERE CENTER 14.449000 20.892000 1.626000 RAD 1.0 CA +SPHERE CENTER 15.018000 21.045000 0.237000 RAD 1.0 C +SPHERE CENTER 14.250000 20.837000 -0.740000 RAD 1.0 O +SPHERE CENTER 14.664000 19.434999 2.142000 RAD 1.0 CB +SPHERE CENTER 14.283000 18.275999 1.191000 RAD 1.0 CG +SPHERE CENTER 15.290000 17.639000 0.506000 RAD 1.0 CD1 +SPHERE CENTER 12.962000 17.907000 0.976000 RAD 1.0 CD2 +SPHERE CENTER 14.981000 16.632000 -0.392000 RAD 1.0 CE1 +SPHERE CENTER 12.638000 16.909000 0.061000 RAD 1.0 CE2 +SPHERE CENTER 13.673000 16.261999 -0.626000 RAD 1.0 CZ +SPHERE CENTER 16.336000 21.281000 0.152000 RAD 1.0 N +SPHERE CENTER 16.948000 21.292000 -1.153000 RAD 1.0 CA +SPHERE CENTER 17.365000 19.888000 -1.542000 RAD 1.0 C +SPHERE CENTER 18.009001 19.184000 -0.744000 RAD 1.0 O +SPHERE CENTER 18.188000 22.194000 -1.071000 RAD 1.0 CB +SPHERE CENTER 18.906000 22.263000 -2.442000 RAD 1.0 CG +SPHERE CENTER 20.089001 21.621000 -2.663000 RAD 1.0 CD1 +SPHERE CENTER 18.361000 23.033001 -3.436000 RAD 1.0 CD2 +SPHERE CENTER 20.733000 21.778999 -3.896000 RAD 1.0 CE1 +SPHERE CENTER 18.990999 23.184999 -4.662000 RAD 1.0 CE2 +SPHERE CENTER 20.184999 22.562000 -4.864000 RAD 1.0 CZ +SPHERE CENTER 20.826000 22.768000 -6.115000 RAD 1.0 OH +SPHERE CENTER 16.913000 19.452999 -2.726000 RAD 1.0 N +SPHERE CENTER 17.295000 18.160000 -3.291000 RAD 1.0 CA +SPHERE CENTER 18.406000 18.332001 -4.341000 RAD 1.0 C +SPHERE CENTER 18.166000 18.843000 -5.464000 RAD 1.0 O +SPHERE CENTER 16.052000 17.558001 -3.946000 RAD 1.0 CB +SPHERE CENTER 16.354000 16.226999 -4.626000 RAD 1.0 CG +SPHERE CENTER 17.531000 15.754000 -4.725000 RAD 1.0 OD1 +SPHERE CENTER 15.234000 15.549000 -4.870000 RAD 1.0 ND2 +SPHERE CENTER 19.655001 18.124001 -3.871000 RAD 1.0 N +SPHERE CENTER 20.851000 18.420000 -4.681000 RAD 1.0 CA +SPHERE CENTER 20.920000 17.650000 -6.010000 RAD 1.0 C +SPHERE CENTER 21.385000 18.257000 -6.997000 RAD 1.0 O +SPHERE CENTER 22.112000 18.070999 -3.866000 RAD 1.0 CB +SPHERE CENTER 20.333000 16.480000 -6.081000 RAD 1.0 N +SPHERE CENTER 20.243999 15.784000 -7.383000 RAD 1.0 CA +SPHERE CENTER 19.287001 16.482000 -8.327000 RAD 1.0 C +SPHERE CENTER 19.478001 16.368999 -9.556000 RAD 1.0 O +SPHERE CENTER 19.732000 14.353000 -7.259000 RAD 1.0 CB +SPHERE CENTER 20.799999 13.485000 -6.626000 RAD 1.0 CG +SPHERE CENTER 20.299000 12.037000 -6.533000 RAD 1.0 CD +SPHERE CENTER 21.386999 11.067000 -6.033000 RAD 1.0 CE +SPHERE CENTER 21.820999 11.437000 -4.681000 RAD 1.0 NZ +SPHERE CENTER 18.212999 17.041000 -7.772000 RAD 1.0 N +SPHERE CENTER 17.181999 17.617001 -8.631000 RAD 1.0 CA +SPHERE CENTER 17.468000 19.070000 -8.921000 RAD 1.0 C +SPHERE CENTER 16.909000 19.707001 -9.863000 RAD 1.0 O +SPHERE CENTER 15.833000 17.423000 -7.901000 RAD 1.0 CB +SPHERE CENTER 18.299000 19.622000 -8.061000 RAD 1.0 N +SPHERE CENTER 18.625999 21.035999 -8.237000 RAD 1.0 CA +SPHERE CENTER 17.587999 22.051001 -7.738000 RAD 1.0 C +SPHERE CENTER 17.702000 23.257999 -8.056000 RAD 1.0 O +SPHERE CENTER 16.632000 21.566000 -6.970000 RAD 1.0 N +SPHERE CENTER 15.576000 22.431999 -6.478000 RAD 1.0 CA +SPHERE CENTER 14.947000 21.879999 -5.199000 RAD 1.0 C +SPHERE CENTER 15.304000 20.784000 -4.719000 RAD 1.0 O +SPHERE CENTER 14.553000 22.764999 -7.568000 RAD 1.0 CB +SPHERE CENTER 14.018000 21.514000 -8.283000 RAD 1.0 CG +SPHERE CENTER 13.211000 20.593000 -7.394000 RAD 1.0 CD1 +SPHERE CENTER 13.189000 21.898001 -9.518000 RAD 1.0 CD2 +SPHERE CENTER 14.114000 22.691999 -4.605000 RAD 1.0 N +SPHERE CENTER 13.591000 22.299999 -3.306000 RAD 1.0 CA +SPHERE CENTER 12.246000 21.612000 -3.398000 RAD 1.0 C +SPHERE CENTER 11.508000 21.862000 -4.381000 RAD 1.0 O +SPHERE CENTER 13.406000 23.628000 -2.540000 RAD 1.0 CB +SPHERE CENTER 14.977000 24.433001 -2.196000 RAD 1.0 SG +SPHERE CENTER 12.005000 20.672001 -2.530000 RAD 1.0 N +SPHERE CENTER 10.813000 19.820999 -2.569000 RAD 1.0 CA +SPHERE CENTER 10.208000 19.822001 -1.167000 RAD 1.0 C +SPHERE CENTER 10.918000 20.218000 -0.210000 RAD 1.0 O +SPHERE CENTER 11.110000 18.377001 -3.007000 RAD 1.0 CB +SPHERE CENTER 11.604000 18.464001 -4.496000 RAD 1.0 CG +SPHERE CENTER 12.041000 17.093000 -4.992000 RAD 1.0 CD +SPHERE CENTER 12.104000 16.884001 -6.223000 RAD 1.0 OE1 +SPHERE CENTER 12.461000 16.246000 -4.115000 RAD 1.0 NE2 +SPHERE CENTER 8.983000 19.459000 -1.072000 RAD 1.0 N +SPHERE CENTER 8.377000 19.427999 0.280000 RAD 1.0 CA +SPHERE CENTER 8.573000 18.100000 0.950000 RAD 1.0 C +SPHERE CENTER 8.785000 17.013000 0.347000 RAD 1.0 O +SPHERE CENTER 6.844000 19.700001 0.273000 RAD 1.0 CB +SPHERE CENTER 6.304000 18.825001 -0.706000 RAD 1.0 OG1 +SPHERE CENTER 6.585000 21.149000 -0.177000 RAD 1.0 CG2 +SPHERE CENTER 8.526000 18.187000 2.280000 RAD 1.0 N +SPHERE CENTER 8.582000 16.999001 3.087000 RAD 1.0 CA +SPHERE CENTER 7.801000 17.273001 4.382000 RAD 1.0 C +SPHERE CENTER 7.554000 18.469000 4.665000 RAD 1.0 O +SPHERE CENTER 10.066000 16.503000 3.399000 RAD 1.0 CB +SPHERE CENTER 10.840000 17.323999 4.462000 RAD 1.0 CG +SPHERE CENTER 11.188000 16.711000 5.670000 RAD 1.0 CD1 +SPHERE CENTER 11.224000 18.618999 4.188000 RAD 1.0 CD2 +SPHERE CENTER 11.912000 17.452999 6.617000 RAD 1.0 CE1 +SPHERE CENTER 11.948000 19.333000 5.129000 RAD 1.0 CE2 +SPHERE CENTER 12.277000 18.763000 6.344000 RAD 1.0 CZ +SPHERE CENTER 7.455000 16.219999 5.116000 RAD 1.0 N +SPHERE CENTER 6.756000 16.414000 6.390000 RAD 1.0 CA +SPHERE CENTER 7.798000 16.358999 7.491000 RAD 1.0 C +SPHERE CENTER 8.422000 15.296000 7.692000 RAD 1.0 O +SPHERE CENTER 5.716000 15.281000 6.557000 RAD 1.0 CB +SPHERE CENTER 4.973000 15.432000 7.882000 RAD 1.0 CG1 +SPHERE CENTER 4.667000 15.326000 5.371000 RAD 1.0 CG2 +SPHERE CENTER 7.953000 17.509001 8.095000 RAD 1.0 N +SPHERE CENTER 8.816000 17.659000 9.286000 RAD 1.0 CA +SPHERE CENTER 7.941000 17.294001 10.498000 RAD 1.0 C +SPHERE CENTER 6.818000 17.832001 10.661000 RAD 1.0 O +SPHERE CENTER 9.260000 19.136000 9.274000 RAD 1.0 CB +SPHERE CENTER 10.066000 19.506001 10.540000 RAD 1.0 CG +SPHERE CENTER 11.058000 18.667999 11.032000 RAD 1.0 CD1 +SPHERE CENTER 9.728000 20.677999 11.181000 RAD 1.0 CD2 +SPHERE CENTER 11.713000 19.021999 12.217000 RAD 1.0 CE1 +SPHERE CENTER 10.401000 21.042000 12.346000 RAD 1.0 CE2 +SPHERE CENTER 11.371000 20.211000 12.851000 RAD 1.0 CZ +SPHERE CENTER 12.040000 20.579000 14.049000 RAD 1.0 OH +SPHERE CENTER 8.505000 16.504999 11.400000 RAD 1.0 N +SPHERE CENTER 7.774000 16.076000 12.622000 RAD 1.0 CA +SPHERE CENTER 7.696000 17.099001 13.728000 RAD 1.0 C +SPHERE CENTER 6.978000 16.834999 14.718000 RAD 1.0 O +SPHERE CENTER 8.385000 18.202000 13.646000 RAD 1.0 N +SPHERE CENTER 8.275000 19.365999 14.533000 RAD 1.0 CA +SPHERE CENTER 9.338000 19.430000 15.620000 RAD 1.0 C +SPHERE CENTER 9.309000 20.379999 16.415001 RAD 1.0 O +SPHERE CENTER 10.317000 18.555000 15.610000 RAD 1.0 N +SPHERE CENTER 11.453000 18.707001 16.541000 RAD 1.0 CA +SPHERE CENTER 12.763000 18.232000 15.950000 RAD 1.0 C +SPHERE CENTER 12.753000 17.224001 15.201000 RAD 1.0 O +SPHERE CENTER 11.179000 18.055000 17.937000 RAD 1.0 CB +SPHERE CENTER 11.154000 16.283001 17.922001 RAD 1.0 SG +SPHERE CENTER 13.828000 18.788000 16.528999 RAD 1.0 N +SPHERE CENTER 15.222000 18.386999 16.261999 RAD 1.0 CA +SPHERE CENTER 15.644000 18.605000 14.798000 RAD 1.0 C +SPHERE CENTER 16.306000 17.708000 14.224000 RAD 1.0 O +SPHERE CENTER 15.486000 16.941000 16.719000 RAD 1.0 CB +SPHERE CENTER 14.949000 16.624001 18.146999 RAD 1.0 CG +SPHERE CENTER 15.484000 17.593000 19.195000 RAD 1.0 CD +SPHERE CENTER 15.081000 17.068001 20.497000 RAD 1.0 NE +SPHERE CENTER 15.268000 17.830999 21.573999 RAD 1.0 CZ +SPHERE CENTER 15.870000 19.020000 21.452999 RAD 1.0 NH1 +SPHERE CENTER 14.930000 17.320999 22.753000 RAD 1.0 NH2 +SPHERE CENTER 15.154000 19.670000 14.180000 RAD 1.0 N +SPHERE CENTER 15.461000 19.893999 12.733000 RAD 1.0 CA +SPHERE CENTER 16.969000 19.924000 12.482000 RAD 1.0 C +SPHERE CENTER 17.752001 20.431000 13.327000 RAD 1.0 O +SPHERE CENTER 14.918000 21.275000 12.366000 RAD 1.0 CB +SPHERE CENTER 17.282000 19.622000 11.271000 RAD 1.0 N +SPHERE CENTER 18.584999 19.886999 10.687000 RAD 1.0 CA +SPHERE CENTER 18.461000 21.087000 9.753000 RAD 1.0 C +SPHERE CENTER 17.371000 21.708000 9.790000 RAD 1.0 O +SPHERE CENTER 18.961000 18.612000 9.934000 RAD 1.0 CB +SPHERE CENTER 19.486000 17.514999 10.843000 RAD 1.0 CG +SPHERE CENTER 20.042999 16.424999 9.926000 RAD 1.0 CD +SPHERE CENTER 20.782000 15.386000 10.779000 RAD 1.0 CE +SPHERE CENTER 20.985001 14.137000 10.021000 RAD 1.0 NZ +SPHERE CENTER 19.577000 21.643999 9.215000 RAD 1.0 N +SPHERE CENTER 19.570999 22.903000 8.543000 RAD 1.0 CA +SPHERE CENTER 18.898001 22.847000 7.144000 RAD 1.0 C +SPHERE CENTER 18.476000 23.930000 6.690000 RAD 1.0 O +SPHERE CENTER 20.981001 23.469999 8.429000 RAD 1.0 CB +SPHERE CENTER 21.461000 24.047001 9.786000 RAD 1.0 CG +SPHERE CENTER 22.614000 25.047001 9.608000 RAD 1.0 CD +SPHERE CENTER 22.118999 26.403999 9.384000 RAD 1.0 NE +SPHERE CENTER 22.948000 27.426001 9.370000 RAD 1.0 CZ +SPHERE CENTER 24.253000 27.187000 9.415000 RAD 1.0 NH1 +SPHERE CENTER 22.472000 28.634001 9.297000 RAD 1.0 NH2 +SPHERE CENTER 18.870001 21.715000 6.474000 RAD 1.0 N +SPHERE CENTER 18.209999 21.712999 5.169000 RAD 1.0 CA +SPHERE CENTER 16.671000 21.559000 5.372000 RAD 1.0 C +SPHERE CENTER 16.068001 20.466000 5.197000 RAD 1.0 O +SPHERE CENTER 18.745001 20.506001 4.379000 RAD 1.0 CB +SPHERE CENTER 18.295000 20.591999 2.909000 RAD 1.0 CG +SPHERE CENTER 17.721001 21.629000 2.499000 RAD 1.0 OD1 +SPHERE CENTER 18.664000 19.563999 2.134000 RAD 1.0 ND2 +SPHERE CENTER 16.097000 22.643000 5.820000 RAD 1.0 N +SPHERE CENTER 14.676000 22.662001 6.349000 RAD 1.0 CA +SPHERE CENTER 14.157000 24.101999 6.384000 RAD 1.0 C +SPHERE CENTER 14.715000 24.959000 7.120000 RAD 1.0 O +SPHERE CENTER 14.577000 21.951000 7.736000 RAD 1.0 CB +SPHERE CENTER 13.128000 21.861000 8.301000 RAD 1.0 CG +SPHERE CENTER 12.432000 22.889000 8.208000 RAD 1.0 OD1 +SPHERE CENTER 12.975000 21.035000 9.288000 RAD 1.0 ND2 +SPHERE CENTER 13.324000 24.438000 5.381000 RAD 1.0 N +SPHERE CENTER 12.918000 25.816999 5.120000 RAD 1.0 CA +SPHERE CENTER 11.388000 25.961000 5.164000 RAD 1.0 C +SPHERE CENTER 10.669000 24.966000 4.915000 RAD 1.0 O +SPHERE CENTER 13.372000 26.372999 3.741000 RAD 1.0 CB +SPHERE CENTER 14.913000 26.191999 3.701000 RAD 1.0 CG +SPHERE CENTER 15.492000 25.002001 3.268000 RAD 1.0 CD1 +SPHERE CENTER 15.705000 27.252001 4.053000 RAD 1.0 CD2 +SPHERE CENTER 16.877001 24.881001 3.132000 RAD 1.0 CE1 +SPHERE CENTER 17.108999 27.125999 3.941000 RAD 1.0 CE2 +SPHERE CENTER 17.659000 25.957001 3.487000 RAD 1.0 CZ +SPHERE CENTER 10.949000 27.146999 5.460000 RAD 1.0 N +SPHERE CENTER 9.480000 27.343000 5.498000 RAD 1.0 CA +SPHERE CENTER 8.875000 27.670000 4.157000 RAD 1.0 C +SPHERE CENTER 7.634000 27.622999 4.057000 RAD 1.0 O +SPHERE CENTER 9.045000 28.475000 6.433000 RAD 1.0 CB +SPHERE CENTER 9.258000 27.945999 7.875000 RAD 1.0 CG +SPHERE CENTER 9.119000 29.052000 8.948000 RAD 1.0 CD +SPHERE CENTER 10.025000 28.736000 10.167000 RAD 1.0 CE +SPHERE CENTER 9.826000 29.728001 11.231000 RAD 1.0 NZ +SPHERE CENTER 9.687000 27.909000 3.152000 RAD 1.0 N +SPHERE CENTER 9.124000 28.167999 1.840000 RAD 1.0 CA +SPHERE CENTER 10.108000 27.719000 0.765000 RAD 1.0 C +SPHERE CENTER 11.332000 27.660000 1.047000 RAD 1.0 O +SPHERE CENTER 8.778000 29.648001 1.642000 RAD 1.0 CB +SPHERE CENTER 10.000000 30.391001 1.484000 RAD 1.0 OG +SPHERE CENTER 9.604000 27.471001 -0.422000 RAD 1.0 N +SPHERE CENTER 10.526000 27.160999 -1.512000 RAD 1.0 CA +SPHERE CENTER 11.423000 28.346001 -1.863000 RAD 1.0 C +SPHERE CENTER 12.634000 28.115000 -2.136000 RAD 1.0 O +SPHERE CENTER 9.782000 26.679001 -2.783000 RAD 1.0 CB +SPHERE CENTER 10.966000 29.570000 -1.682000 RAD 1.0 N +SPHERE CENTER 11.751000 30.764000 -1.998000 RAD 1.0 CA +SPHERE CENTER 12.900000 30.964001 -1.040000 RAD 1.0 C +SPHERE CENTER 14.032000 31.282000 -1.463000 RAD 1.0 O +SPHERE CENTER 10.871000 32.021999 -2.024000 RAD 1.0 CB +SPHERE CENTER 9.868000 32.069000 -3.200000 RAD 1.0 CG +SPHERE CENTER 8.525000 31.417000 -2.847000 RAD 1.0 CD +SPHERE CENTER 7.573000 31.562000 -3.638000 RAD 1.0 OE1 +SPHERE CENTER 8.368000 30.636999 -1.865000 RAD 1.0 OE2 +SPHERE CENTER 12.658000 30.686001 0.225000 RAD 1.0 N +SPHERE CENTER 13.804000 30.775000 1.163000 RAD 1.0 CA +SPHERE CENTER 14.824000 29.667000 0.941000 RAD 1.0 C +SPHERE CENTER 16.058001 29.903999 1.049000 RAD 1.0 O +SPHERE CENTER 13.347000 30.500000 2.601000 RAD 1.0 CB +SPHERE CENTER 12.813000 31.775999 3.236000 RAD 1.0 CG +SPHERE CENTER 12.716000 32.875000 2.613000 RAD 1.0 OD1 +SPHERE CENTER 12.096000 31.598000 4.247000 RAD 1.0 OD2 +SPHERE CENTER 14.305000 28.478001 0.644000 RAD 1.0 N +SPHERE CENTER 15.128000 27.301001 0.379000 RAD 1.0 CA +SPHERE CENTER 16.006001 27.523001 -0.852000 RAD 1.0 C +SPHERE CENTER 17.247999 27.267000 -0.809000 RAD 1.0 O +SPHERE CENTER 14.238000 26.045000 0.259000 RAD 1.0 CB +SPHERE CENTER 15.047000 24.530001 -0.176000 RAD 1.0 SG +SPHERE CENTER 15.384000 28.062000 -1.870000 RAD 1.0 N +SPHERE CENTER 16.191999 28.302000 -3.048000 RAD 1.0 CA +SPHERE CENTER 17.171000 29.452999 -2.841000 RAD 1.0 C +SPHERE CENTER 18.246000 29.474001 -3.490000 RAD 1.0 O +SPHERE CENTER 15.267000 28.570999 -4.266000 RAD 1.0 CB +SPHERE CENTER 14.634000 27.261000 -4.708000 RAD 1.0 CG +SPHERE CENTER 15.759000 25.962000 -5.253000 RAD 1.0 SD +SPHERE CENTER 16.306999 26.625000 -6.805000 RAD 1.0 CE +SPHERE CENTER 16.775999 30.469999 -2.099000 RAD 1.0 N +SPHERE CENTER 17.652000 31.617001 -1.869000 RAD 1.0 CA +SPHERE CENTER 18.910000 31.125999 -1.141000 RAD 1.0 C +SPHERE CENTER 20.049999 31.469999 -1.556000 RAD 1.0 O +SPHERE CENTER 16.934000 32.595001 -0.930000 RAD 1.0 CB +SPHERE CENTER 17.721001 33.839001 -0.540000 RAD 1.0 CG +SPHERE CENTER 16.740999 35.039001 -0.291000 RAD 1.0 CD +SPHERE CENTER 15.472000 34.667999 0.404000 RAD 1.0 NE +SPHERE CENTER 14.256000 34.889999 -0.074000 RAD 1.0 CZ +SPHERE CENTER 13.983000 35.465000 -1.233000 RAD 1.0 NH1 +SPHERE CENTER 13.260000 34.542999 0.660000 RAD 1.0 NH2 +SPHERE CENTER 18.726999 30.198999 -0.237000 RAD 1.0 N +SPHERE CENTER 19.889999 29.693001 0.496000 RAD 1.0 CA +SPHERE CENTER 20.636999 28.649000 -0.297000 RAD 1.0 C +SPHERE CENTER 21.871000 28.686001 -0.287000 RAD 1.0 O +SPHERE CENTER 19.416000 29.106001 1.823000 RAD 1.0 CB +SPHERE CENTER 18.643999 30.132000 2.537000 RAD 1.0 OG1 +SPHERE CENTER 20.615999 28.506001 2.662000 RAD 1.0 CG2 +SPHERE CENTER 19.988001 27.747000 -0.961000 RAD 1.0 N +SPHERE CENTER 20.669001 26.563999 -1.471000 RAD 1.0 CA +SPHERE CENTER 20.773001 26.534000 -2.963000 RAD 1.0 C +SPHERE CENTER 21.341000 25.552999 -3.498000 RAD 1.0 O +SPHERE CENTER 19.955999 25.260000 -1.056000 RAD 1.0 CB +SPHERE CENTER 20.128000 24.914000 0.713000 RAD 1.0 SG +SPHERE CENTER 20.132000 27.441999 -3.608000 RAD 1.0 N +SPHERE CENTER 19.987000 27.268000 -5.071000 RAD 1.0 CA +SPHERE CENTER 21.257000 27.575001 -5.849000 RAD 1.0 C +SPHERE CENTER 21.386000 27.129000 -7.018000 RAD 1.0 O +SPHERE CENTER 22.225000 28.049999 -5.113000 RAD 1.0 N +SPHERE CENTER 23.639000 28.131001 -5.505000 RAD 1.0 CA +SPHERE CENTER 23.886999 29.393000 -6.316000 RAD 1.0 C +SPHERE CENTER 22.948999 30.065001 -6.822000 RAD 1.0 O +SPHERE CENTER 25.146000 29.681000 -6.493000 RAD 1.0 N +SPHERE CENTER 25.617001 30.840000 -7.256000 RAD 1.0 CA +SPHERE CENTER 25.247999 30.735001 -8.729000 RAD 1.0 C +SPHERE CENTER 24.962000 31.791000 -9.369000 RAD 1.0 O +SPHERE CENTER 27.160000 30.980000 -7.146000 RAD 1.0 CB +SPHERE CENTER 24.919001 29.594000 -9.172000 RAD 1.0 OXT + +PLANE + CENTER 0.0 -25.0 0.0 + NORMAL 0.0 1.0 0.0 + TEXTURE + AMBIENT 0.1 DIFFUSE 0.9 SPECULAR 0.0 OPACITY 1.0 + COLOR 1.0 1.0 1.0 + TEXFUNC 0 + +END_SCENE diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/index.html new file mode 100644 index 0000000000..328079b49a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/index.html @@ -0,0 +1,219 @@ + + + +

    Overview

    +Parallel raytracer / renderer that demonstrates the use of parallel_for. + +

    +This example includes software developed by John E. Stone. See +here for copyright information. +

    + +

    +This example is a 2-D raytracer/renderer that visually shows different parallel scheduling +methods and their resulting speedup. The code was parallelized by speculating +that each pixel could be rendered in parallel. The resulting parallel code was +then checked for correctness by using Intel® Thread Checker, which +pointed out where synchronization was needed. Minimal synchronization was then +inserted into the parallel code. The resulting parallel code exhibits good speedup. +

    + +

    +The following versions of the example are provided: +

    +
    serial +
    Original sequential version. +
    tbb1d +
    Parallel version that uses Intel® Threading Building Blocks (Intel® TBB) and blocked_range to parallelize + over tasks that are groups of scan-lines. +
      +
    • By default, this version uses one thread per available processor. To change this + default, set the TBB_NUM_THREADS environment variable to the desired number of threads before running. +
    • This version uses the preview feature: auto_range_partitioner. No grain size is provided to blocked_range. + The blocked_range class uses a default grain size of 1 when none is provided. However, the auto_range_partitioner + controls the amount of range splitting dynamically at runtime, resulting in sub-ranges of varying sizes. +
    +
    tbb +
    Parallel version that uses Intel TBB and blocked_range2d to parallelize + over tasks that are rectangular sub-areas. +
      +
    • By default, this version uses one thread per available processor. To change this + default, set the TBB_NUM_THREADS environment variable to the desired number of threads before running. +
    • This version uses a reasonable task grain size by default. To change this default, + set the TBB_GRAINSIZE environment variable to the desired grain size before running. + The grain size corresponds to the number of pixels (in the X or Y direction, for a + rectangular sub-area) in each parallel task. +
    +
    +

    + +

    Files

    +
    +
    src/main.cpp +
    Main program which parses command line options and runs the raytracer. +
    src/tachyon_video.cpp +
    Source code for GUI interfaces. +
    src/trace.serial.cpp +
    Source code for original sequential version of example. +
    src/trace.tbb1d.cpp +
    Source code for Intel TBB blocked_range (scan-line) version of example. +
    src/trace.tbb.cpp +
    Source code for Intel TBB blocked_range2d (rectangular sub-area) version of example. +
    (src/*.cpp) +
    Remainder of source code for example. +
    (src/*.h) +
    Remainder of include files for example. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    src +
    Contains source code and include files for the example. +
    dat +
    Contains data sets for running the example. +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. + +

    +For Windows* systems Microsoft* Visual Studio* projects are provided for each of the above + example versions. +

    + +

    +The Makefile supports the following build targets (in addition to the general ones). +Here, <version> is one of the above versions of the example, i.e., {serial, tbb1d, tbb}. +

    +
    +
    make <version>[_debug] +
    Build and run a single version (release or debug). + Equivalent to 'make build_<version>[_debug] run_<version>'. +
    make build_<version>[_debug] +
    Compile and link a single version (release or debug). + The resulting executable is left in the directory for the example. +
    make run_<version> +
    Run a single version previously produced by one of the above commands. +
    make [(above options or targets)] DATASET={820spheres, balls, balls3, lattice, model2, + teapot, trypsin4pti} +
    Build and run as above, but run with the specified data set. +
    make [(above options or targets)] ARGS=-D +
    Build and run as above, but run with disabled run-time display updating for use in making performance measurements + (strongly recommended when measuring performance or scalability; see note below). +
    make [(above options or targets)] UI={con, gdi, dd, d2d, x, mac} +
    Build and run as usual, but build with the specified GUI driver: console, GDI+*, DirectDraw*, + Direct2D*, X11, or OpenGL* + (see the description of the common GUI code + for more information on available graphics support). + For Linux* and Mac OS* X systems, the best available driver is detected automatically by the Makefile. + For Windows* systems, UI=gdi is the default GUI driver; compiling with UI=dd or + UI=d2d may offer superior + performance, but can only be used if the Microsoft* DirectX* SDK is installed on your system. + Use UI=con to build without the GUI for use in making performance measurements + (strongly recommended when measuring performance or scalability; see note below). +
    make [(above options or targets)] XARCH=x64 +
    Build and run as above, but + also specify XARCH=x64 (or XARCH=AMD64 for older compilers) when building the example on Windows* as a 64-bit binary. +
    make [(above options or targets)] DDLIB_DIR=<specify path to library directory of Direct Draw* SDK here> +
    If you experience ddraw.lib linking problems, specify the correct library directory via this option. +
    + +

    Usage

    +Building via the above make commands, or via Visual Studio projects on Windows* systems, produces executable files +named tachyon.<version>.exe. To run these executables directly, use one or more of the following commands. +
    +
    tachyon.<version> -h +
    Prints the help for command line options +
    tachyon.<version> [dataset=value] [boundthresh=value] [no-display-updating] [nobounding] [silent] +
    tachyon.<version> [dataset [boundthresh]] [no-display-updating] [nobounding] [silent] +
    dataset is the path/name of one of the *.dat files in the dat directory for the example.
    + boundthresh is a bounding threshold value.
    + no-display-updating - disable run-time display updating.
    + no-bounding - disable bounding technique.
    + silent - no output except elapsed time.
    +
    tachyon.<version> [dataset] [no-display-updating] +
    Run this version (release or debug), but run with disabled run-time display updating + for use in making performance measurements + (strongly recommended when measuring performance or scalability; see note below). +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the tbb example with the GUI turned off + (e.g., make UI=con tbb_debug; see also the build directions above). +
    Run it with a small dataset, e.g., tachyon.tbb.exe dat/820spheres.dat no-display-updating. +
    + +

    Keys

    +While running with the GUI display turned on the following keyboard keys can be used: +
    +
    ESC +
    Interrupt the rendering and exit +
    Any key +
    Enable repetition of rendering after the pause. Press ESC to stop the application. +
    Space +
    Toggle run-time display updating mode while rendering (see no-display-updating above). +
    p +
    Holds the picture after rendering completion. Press 'p' again to continue. +
    + +

    Notes

    +
      +
    • While running with the GUI display turned on should yield reasonable performance in most cases, running with the GUI + display turned off is strongly recommended in order to demonstrate the full performance and scalability of the example. +
    + + + +
    +
    Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + +

    +The original source for this example is +Copyright (c) 1994-2008 John E. Stone +All rights reserved. +

    + +

    +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +

      +
    1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +
    2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +
    3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. +
    +

    + +

    +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS +OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +

    +
    + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.ico b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.ico new file mode 100644 index 0000000000..d551aa3aaf Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.rc b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.rc new file mode 100644 index 0000000000..5a13d046b9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/gui.rc @@ -0,0 +1,90 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_GUI ICON "gui.ico" +IDI_SMALL ICON "small.ico" + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APP_TITLE "gui" + IDC_GUI "GUI" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/resource.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/resource.h new file mode 100644 index 0000000000..5f70f0cea5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/resource.h @@ -0,0 +1,8 @@ +#define IDC_MYICON 2 +#define IDD_GUI 102 +#define IDS_APP_TITLE 103 +#define IDI_GUI 107 +#define IDI_SMALL 108 +#define IDC_GUI 109 +#define IDR_MAINFRAME 128 +#define IDC_STATIC -1 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/small.ico b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/small.ico new file mode 100644 index 0000000000..d551aa3aaf Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/small.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.icproj new file mode 100644 index 0000000000..4d021ebc8a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.icproj new file mode 100644 index 0000000000..c449959ad5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.vcproj new file mode 100644 index 0000000000..e5a13b2e67 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.serial.vcproj @@ -0,0 +1,695 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.icproj new file mode 100644 index 0000000000..58ec5c67c8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.vcproj new file mode 100644 index 0000000000..2e4a4659eb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb.vcproj @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.icproj new file mode 100644 index 0000000000..1c0f608270 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.vcproj new file mode 100644 index 0000000000..5044e56efc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.tbb1d.vcproj @@ -0,0 +1,731 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.vcproj new file mode 100644 index 0000000000..ec91a771e3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon.vcproj @@ -0,0 +1,1046 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_cl.sln new file mode 100644 index 0000000000..8b2ff25f5a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_cl.sln @@ -0,0 +1,92 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb", "tachyon.tbb.vcproj", "{6E9B1702-78E0-4D64-B771-8B274D963B58}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.common", "tachyon.vcproj", "{924517DF-2B6A-47D5-8A11-CC247CC4D810}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.serial", "tachyon.serial.vcproj", "{924517DF-2B6A-47D5-8A11-CC047CC4D8E9}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tachyon.tbb1d", "tachyon.tbb1d.vcproj", "{924517DF-2B6A-47D5-8A11-CC347CC4D8E9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + Description = Tachyon ray-tracer example + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|x64.Build.0 = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|Win32.Build.0 = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|x64.Build.0 = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|x64.Build.0 = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|Win32.Build.0 = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|x64.Build.0 = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|x64.Build.0 = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|Win32.Build.0 = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|x64.Build.0 = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|x64.Build.0 = DDDebug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|Win32.Build.0 = DDRelease|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|x64.ActiveCfg = DDRelease|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|x64.Build.0 = DDRelease|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.Build.0 = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.ActiveCfg = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.Build.0 = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.ActiveCfg = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.Build.0 = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.ActiveCfg = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_icl.sln new file mode 100644 index 0000000000..f4eca61a8d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/msvs/tachyon_icl.sln @@ -0,0 +1,149 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "tachyon.tbb", "tachyon.tbb.icproj", "{2D08E05F-D0E0-48A7-9597-28B95ACE70B6}" + ProjectSection(ProjectDependencies) = postProject + {5F685DBD-9A04-4E94-A1CA-FC48FE799830} = {5F685DBD-9A04-4E94-A1CA-FC48FE799830} + EndProjectSection +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "tachyon.common", "tachyon.icproj", "{5F685DBD-9A04-4E94-A1CA-FC48FE799830}" +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "tachyon.serial", "tachyon.serial.icproj", "{E085A8DB-75D4-4927-9631-6368E6D0EE72}" + ProjectSection(ProjectDependencies) = postProject + {5F685DBD-9A04-4E94-A1CA-FC48FE799830} = {5F685DBD-9A04-4E94-A1CA-FC48FE799830} + EndProjectSection +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "tachyon.tbb1d", "tachyon.tbb1d.icproj", "{4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}" + ProjectSection(ProjectDependencies) = postProject + {5F685DBD-9A04-4E94-A1CA-FC48FE799830} = {5F685DBD-9A04-4E94-A1CA-FC48FE799830} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + Description = Tachyon ray-tracer example + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Debug|x64.Build.0 = DDDebug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|Win32.Build.0 = DDRelease|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|x64.ActiveCfg = DDRelease|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.DD Release|x64.Build.0 = DDRelease|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|Win32.Build.0 = Debug|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|x64.ActiveCfg = Debug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}.GDI Debug|x64.Build.0 = Debug|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|Win32.ActiveCfg = Release|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|Win32.Build.0 = Release|Win32 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|x64.ActiveCfg = Release|x64 + {2D08E05F-D0E0-48A7-9597-28B95ACE70B6}._GDI Release|x64.Build.0 = Release|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Debug|x64.Build.0 = DDDebug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|Win32.Build.0 = DDRelease|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|x64.ActiveCfg = DDRelease|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.DD Release|x64.Build.0 = DDRelease|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|Win32.Build.0 = Debug|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|x64.ActiveCfg = Debug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}.GDI Debug|x64.Build.0 = Debug|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|Win32.ActiveCfg = Release|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|Win32.Build.0 = Release|Win32 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|x64.ActiveCfg = Release|x64 + {5F685DBD-9A04-4E94-A1CA-FC48FE799830}._GDI Release|x64.Build.0 = Release|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Debug|x64.Build.0 = DDDebug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|Win32.Build.0 = DDRelease|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|x64.ActiveCfg = DDRelease|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.DD Release|x64.Build.0 = DDRelease|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|Win32.Build.0 = Debug|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|x64.ActiveCfg = Debug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}.GDI Debug|x64.Build.0 = Debug|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|Win32.ActiveCfg = Release|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|Win32.Build.0 = Release|Win32 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|x64.ActiveCfg = Release|x64 + {E085A8DB-75D4-4927-9631-6368E6D0EE72}._GDI Release|x64.Build.0 = Release|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Debug|x64.Build.0 = DDDebug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|Win32.Build.0 = DDRelease|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|x64.ActiveCfg = DDRelease|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.DD Release|x64.Build.0 = DDRelease|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|Win32.Build.0 = Debug|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|x64.ActiveCfg = Debug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}.GDI Debug|x64.Build.0 = Debug|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|Win32.ActiveCfg = Release|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|Win32.Build.0 = Release|Win32 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|x64.ActiveCfg = Release|x64 + {4F173D3A-AE8C-4F7E-A4D0-6527F46B8495}._GDI Release|x64.Build.0 = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.DD Release|x64.ActiveCfg = DDRelease|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|Win32.Build.0 = Debug|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.ActiveCfg = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}.GDI Debug|x64.Build.0 = Debug|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.ActiveCfg = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|Win32.Build.0 = Release|Win32 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.ActiveCfg = Release|x64 + {6E9B1702-78E0-4D64-B771-8B274D963B58}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC247CC4D810}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC047CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.DD Release|x64.ActiveCfg = DDRelease|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.ActiveCfg = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|Win32.Build.0 = Debug|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.ActiveCfg = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}.GDI Debug|x64.Build.0 = Debug|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.ActiveCfg = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|Win32.Build.0 = Release|Win32 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.ActiveCfg = Release|x64 + {924517DF-2B6A-47D5-8A11-CC347CC4D8E9}._GDI Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.cpp new file mode 100644 index 0000000000..5fcd45d794 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.cpp @@ -0,0 +1,428 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * api.c - This file contains all of the API calls that are defined for + * external driver code to use. + * + * $Id: api.cpp,v 1.5 2007-02-22 17:54:14 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" + +#include "box.h" +#include "cylinder.h" +#include "plane.h" +#include "quadric.h" +#include "ring.h" +#include "sphere.h" +#include "triangle.h" +#include "vol.h" +#include "extvol.h" + +#include "texture.h" +#include "light.h" +#include "render.h" +#include "camera.h" +#include "vector.h" +#include "intersect.h" +#include "shade.h" +#include "util.h" +#include "imap.h" +#include "global.h" + +#include "tachyon_video.h" + +typedef void * SceneHandle; +#include "api.h" + + +vector rt_vector(apiflt x, apiflt y, apiflt z) { + vector v; + + v.x = x; + v.y = y; + v.z = z; + + return v; +} + +color rt_color(apiflt r, apiflt g, apiflt b) { + color c; + + c.r = r; + c.g = g; + c.b = b; + + return c; +} + +void rt_initialize() { + rpcmsg msg; + + reset_object(); + reset_lights(); + InitTextures(); + + if (!parinitted) { + parinitted=1; + + msg.type=1; /* setup a ping message */ + } +} + +void rt_renderscene(SceneHandle voidscene) { + scenedef * scene = (scenedef *) voidscene; + renderscene(*scene); +} + +void rt_camerasetup(SceneHandle voidscene, apiflt zoom, apiflt aspectratio, + int antialiasing, int raydepth, + vector camcent, vector viewvec, vector upvec) { + scenedef * scene = (scenedef *) voidscene; + + vector newupvec; + vector newviewvec; + vector newrightvec; + + VCross((vector *) &upvec, &viewvec, &newrightvec); + VNorm(&newrightvec); + + VCross((vector *) &viewvec, &newrightvec, &newupvec); + VNorm(&newupvec); + + newviewvec=viewvec; + VNorm(&newviewvec); + + + scene->camzoom=zoom; + scene->aspectratio=aspectratio; + scene->antialiasing=antialiasing; + scene->raydepth=raydepth; + scene->camcent=camcent; + scene->camviewvec=newviewvec; + scene->camrightvec=newrightvec; + scene->camupvec=newupvec; +} + +void rt_outputfile(SceneHandle voidscene, const char * outname) { + scenedef * scene = (scenedef *) voidscene; + strcpy((char *) &scene->outfilename, outname); +} + +void rt_resolution(SceneHandle voidscene, int hres, int vres) { + scenedef * scene = (scenedef *) voidscene; + scene->hres=hres; + scene->vres=vres; +} + +void rt_verbose(SceneHandle voidscene, int v) { + scenedef * scene = (scenedef *) voidscene; + scene->verbosemode = v; +} + +void rt_rawimage(SceneHandle voidscene, unsigned char *rawimage) { + scenedef * scene = (scenedef *) voidscene; + scene->rawimage = rawimage; +} + +void rt_background(SceneHandle voidscene, color col) { + scenedef * scene = (scenedef *) voidscene; + scene->background.r = col.r; + scene->background.g = col.g; + scene->background.b = col.b; +} + +void rt_boundmode(SceneHandle voidscene, int mode) { + scenedef * scene = (scenedef *) voidscene; + scene->boundmode = mode; +} + +void rt_boundthresh(SceneHandle voidscene, int threshold) { + scenedef * scene = (scenedef *) voidscene; + + if (threshold > 1) { + scene->boundthresh = threshold; + } + else { + rtmesg("Ignoring out-of-range automatic bounding threshold.\n"); + rtmesg("Automatic bounding threshold reset to default.\n"); + scene->boundthresh = MAXOCTNODES; + } +} + +void rt_displaymode(SceneHandle voidscene, int mode) { + scenedef * scene = (scenedef *) voidscene; + scene->displaymode = mode; +} + + +void rt_scenesetup(SceneHandle voidscene, char * outname, int hres, int vres, int verbose) { + rt_outputfile(voidscene, outname); + rt_resolution(voidscene, hres, vres); + rt_verbose(voidscene, verbose); +} + +SceneHandle rt_newscene(void) { + scenedef * scene; + SceneHandle voidscene; + + scene = (scenedef *) malloc(sizeof(scenedef)); + memset(scene, 0, sizeof(scenedef)); /* clear all valuas to 0 */ + + voidscene = (SceneHandle) scene; + + rt_outputfile(voidscene, "/dev/null"); /* default output file (.tga) */ + rt_resolution(voidscene, 512, 512); /* 512x512 resolution */ + rt_verbose(voidscene, 0); /* verbose messages off */ + rt_rawimage(voidscene, NULL); /* raw image output off */ + rt_boundmode(voidscene, RT_BOUNDING_ENABLED); /* spatial subdivision on */ + rt_boundthresh(voidscene, MAXOCTNODES); /* default threshold */ + rt_displaymode(voidscene, RT_DISPLAY_ENABLED); /* video output on */ + rt_camerasetup(voidscene, 1.0, 1.0, 0, 6, + rt_vector(0.0, 0.0, 0.0), + rt_vector(0.0, 0.0, 1.0), + rt_vector(0.0, 1.0, 0.0)); + + return scene; +} + +void rt_deletescene(SceneHandle scene) { + if (scene != NULL) + free(scene); +} + +void apitextotex(apitexture * apitex, texture * tex) { + switch(apitex->texturefunc) { + case 0: + tex->texfunc=(color(*)(void *, void *, void *))(standard_texture); + break; + + case 1: + tex->texfunc=(color(*)(void *, void *, void *))(checker_texture); + break; + + case 2: + tex->texfunc=(color(*)(void *, void *, void *))(grit_texture); + break; + + case 3: + tex->texfunc=(color(*)(void *, void *, void *))(marble_texture); + break; + + case 4: + tex->texfunc=(color(*)(void *, void *, void *))(wood_texture); + break; + + case 5: + tex->texfunc=(color(*)(void *, void *, void *))(gnoise_texture); + break; + + case 6: + tex->texfunc=(color(*)(void *, void *, void *))(cyl_checker_texture); + break; + + case 7: + tex->texfunc=(color(*)(void *, void *, void *))(image_sphere_texture); + tex->img=AllocateImage((char *)apitex->imap); + break; + + case 8: + tex->texfunc=(color(*)(void *, void *, void *))(image_cyl_texture); + tex->img=AllocateImage((char *)apitex->imap); + break; + + case 9: + tex->texfunc=(color(*)(void *, void *, void *))(image_plane_texture); + tex->img=AllocateImage((char *)apitex->imap); + break; + + default: + tex->texfunc=(color(*)(void *, void *, void *))(standard_texture); + break; + } + + tex->ctr = apitex->ctr; + tex->rot = apitex->rot; + tex->scale = apitex->scale; + tex->uaxs = apitex->uaxs; + tex->vaxs = apitex->vaxs; + tex->ambient = apitex->ambient; + tex->diffuse = apitex->diffuse; + tex->specular = apitex->specular; + tex->opacity = apitex->opacity; + tex->col = apitex->col; + + tex->islight = 0; + tex->shadowcast = 1; + tex->phong = 0.0; + tex->phongexp = 0.0; + tex->phongtype = 0; +} + +void * rt_texture(apitexture * apitex) { + texture * tex; + + tex=(texture *)rt_getmem(sizeof(texture)); + apitextotex(apitex, tex); + return(tex); +} + +void rt_tex_color(void * voidtex, color col) { + texture * tex = (texture *) voidtex; + tex->col = col; +} + +void rt_tex_phong(void * voidtex, apiflt phong, apiflt phongexp, int type) { + texture * tex = (texture *) voidtex; + tex->phong = phong; + tex->phongexp = phongexp; + tex->phongtype = type; +} + +void rt_light(void * tex, vector ctr, apiflt rad) { + point_light * li; + + li=newlight(tex, (vector) ctr, rad); + + li->tex->islight=1; + li->tex->shadowcast=1; + li->tex->diffuse=0.0; + li->tex->specular=0.0; + li->tex->opacity=1.0; + + add_light(li); + add_object((object *)li); +} + +void rt_scalarvol(void * tex, vector min, vector max, + int xs, int ys, int zs, char * fname, void * invol) { + add_object((object *) newscalarvol(tex, (vector)min, (vector)max, xs, ys, zs, fname, (scalarvol *) invol)); +} + +void rt_extvol(void * tex, vector min, vector max, int samples, flt (* evaluator)(flt, flt, flt)) { + add_object((object *) newextvol(tex, (vector)min, (vector)max, samples, evaluator)); +} + +void rt_box(void * tex, vector min, vector max) { + add_object((object *) newbox(tex, (vector)min, (vector)max)); +} + +void rt_cylinder(void * tex, vector ctr, vector axis, apiflt rad) { + add_object(newcylinder(tex, (vector)ctr, (vector)axis, rad)); +} + +void rt_fcylinder(void * tex, vector ctr, vector axis, apiflt rad) { + add_object(newfcylinder(tex, (vector)ctr, (vector)axis, rad)); +} + +void rt_plane(void * tex, vector ctr, vector norm) { + add_object(newplane(tex, (vector)ctr, (vector)norm)); +} + +void rt_ring(void * tex, vector ctr, vector norm, apiflt a, apiflt b) { + add_object(newring(tex, (vector)ctr, (vector)norm, a, b)); +} + +void rt_sphere(void * tex, vector ctr, apiflt rad) { + add_object(newsphere(tex, (vector)ctr, rad)); +} + +void rt_tri(void * tex, vector v0, vector v1, vector v2) { + object * trn; + + trn = newtri(tex, (vector)v0, (vector)v1, (vector)v2); + + if (trn != NULL) { + add_object(trn); + } +} + +void rt_stri(void * tex, vector v0, vector v1, vector v2, + vector n0, vector n1, vector n2) { + object * trn; + + trn = newstri(tex, (vector)v0, (vector)v1, (vector)v2, (vector)n0, (vector)n1, (vector)n2); + + if (trn != NULL) { + add_object(trn); + } +} + +void rt_quadsphere(void * tex, vector ctr, apiflt rad) { + quadric * q; + flt factor; + q=(quadric *) newquadric(); + factor= 1.0 / (rad*rad); + q->tex=(texture *)tex; + q->ctr=ctr; + + q->mat.a=factor; + q->mat.b=0.0; + q->mat.c=0.0; + q->mat.d=0.0; + q->mat.e=factor; + q->mat.f=0.0; + q->mat.g=0.0; + q->mat.h=factor; + q->mat.i=0.0; + q->mat.j=-1.0; + + add_object((object *)q); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.h new file mode 100644 index 0000000000..78653dd227 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/api.h @@ -0,0 +1,216 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/***************************************************************************** + * api.h - The declarations and prototypes needed so that 3rd party driver * + * code can run the raytracer. Third party driver code should * + * only use the functions in this header file to interface with * + * the rendering engine. * + *************************************************************************** */ + + +/* + * $Id: api.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + + +/********************************************/ +/* Types defined for use with the API calls */ +/********************************************/ + +#ifdef USESINGLEFLT +typedef float apiflt; /* generic floating point number */ +#else +typedef double apiflt; /* generic floating point number */ +#endif + +typedef void * SceneHandle; + +typedef struct { + int texturefunc; /* which texture function to use */ + color col; /* base object color */ + int shadowcast; /* does the object cast a shadow */ + apiflt ambient; /* ambient lighting */ + apiflt diffuse; /* diffuse reflection */ + apiflt specular; /* specular reflection */ + apiflt opacity; /* how opaque the object is */ + vector ctr; /* origin of texture */ + vector rot; /* rotation of texture around origin */ + vector scale; /* scale of texture in x,y,z */ + vector uaxs; /* planar map u axis */ + vector vaxs; /* planar map v axis */ + char imap[96]; /* name of image map */ +} apitexture; + + +/******************************************************************* + * NOTE: The value passed in apitexture.texturefunc corresponds to + * the meanings given in this table: + * + * 0 - No texture function is applied other than standard lighting. + * 1 - 3D checkerboard texture. Red & Blue checkers through 3d space. + * 2 - Grit texture, roughens up the surface of the object a bit. + * 3 - 3D marble texture. Makes a 3D swirl pattern through the object. + * 4 - 3D wood texture. Makes a 3D wood pattern through the object. + * 5 - 3D gradient noise function. + * 6 - I've forgotten :-) + * 7 - Cylindrical Image Map **** IMAGE MAPS REQUIRE the filename + * 8 - Spherical Image Map of the image be put in imap[] + * 9 - Planar Image Map part of the texture... + * planar requires uaxs, and vaxs.. + * + *******************************************************************/ + +/********************************************/ +/* Functions implemented to provide the API */ +/********************************************/ + +vector rt_vector(apiflt x, apiflt y, apiflt z); /* helper to make vectors */ +color rt_color(apiflt r, apiflt g, apiflt b); /* helper to make colors */ + +void rt_initialize();/* reset raytracer, memory deallocation */ +void rt_finalize(void); /* close down for good.. */ + +SceneHandle rt_newscene(void); /* allocate new scene */ +void rt_deletescene(SceneHandle); /* delete a scene */ +void rt_renderscene(SceneHandle); /* raytrace the current scene */ +void rt_outputfile(SceneHandle, const char * outname); +void rt_resolution(SceneHandle, int hres, int vres); +void rt_verbose(SceneHandle, int v); +void rt_rawimage(SceneHandle, unsigned char *rawimage); +void rt_background(SceneHandle, color); + +/* Parameter values for rt_boundmode() */ +#define RT_BOUNDING_DISABLED 0 +#define RT_BOUNDING_ENABLED 1 + +void rt_boundmode(SceneHandle, int); +void rt_boundthresh(SceneHandle, int); + +/* Parameter values for rt_displaymode() */ +#define RT_DISPLAY_DISABLED 0 +#define RT_DISPLAY_ENABLED 1 + +void rt_displaymode(SceneHandle, int); + +void rt_scenesetup(SceneHandle, char *, int, int, int); + /* scene, output filename, horizontal resolution, vertical resolution, + verbose mode */ + + +void rt_camerasetup(SceneHandle, apiflt, apiflt, int, int, + vector, vector, vector); + /* camera parms: scene, zoom, aspectratio, antialiasing, raydepth, + camera center, view direction, up direction */ + + + +void * rt_texture(apitexture *); + /* pointer to the texture struct that would have been passed to each + object() call in older revisions.. */ + + + + +void rt_light(void * , vector, apiflt); /* add a light */ + /* light parms: texture, center, radius */ + +void rt_sphere(void *, vector, apiflt); /* add a sphere */ + /* sphere parms: texture, center, radius */ + +void rt_scalarvol(void *, vector, vector, + int, int, int, char *, void *); + +void rt_extvol(void *, vector, vector, int, apiflt (* evaluator)(apiflt, apiflt, apiflt)); + +void rt_box(void *, vector, vector); + /* box parms: texture, min, max */ + +void rt_plane(void *, vector, vector); + /* plane parms: texture, center, normal */ + +void rt_ring(void *, vector, vector, apiflt, apiflt); + /* ring parms: texture, center, normal, inner, outer */ + +void rt_tri(void *, vector, vector, vector); + /* tri parms: texture, vertex 0, vertex 1, vertex 2 */ + +void rt_stri(void *, vector, vector, vector, + vector, vector, vector); + /* stri parms: texture, vertex 0, vertex 1, vertex 2, norm 0, norm 1, norm 2 */ + +void rt_heightfield(void *, vector, int, int, apiflt *, apiflt, apiflt); + /* field parms: texture, center, m, n, field, wx, wy */ + +void rt_landscape(void *, int, int, vector, apiflt, apiflt); + +void rt_quadsphere(void *, vector, apiflt); /* add quadric sphere */ + /* sphere parms: texture, center, radius */ + +void rt_cylinder(void *, vector, vector, apiflt); + +void rt_fcylinder(void *, vector, vector, apiflt); + +void rt_polycylinder(void *, vector *, int, apiflt); + + +/* new texture handling routines */ +void rt_tex_color(void * voidtex, color col); + +#define RT_PHONG_PLASTIC 0 +#define RT_PHONG_METAL 1 +void rt_tex_phong(void * voidtex, apiflt phong, apiflt phongexp, int type); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/apigeom.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/apigeom.cpp new file mode 100644 index 0000000000..fff2644d06 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/apigeom.cpp @@ -0,0 +1,278 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * api.c - This file contains all of the API calls that are defined for + * external driver code to use. + * + * $Id: apigeom.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "api.h" +#include "macros.h" +#include "vector.h" + +#define MyVNorm(a) VNorm ((vector *) a) + +void rt_polycylinder(void * tex, vector * points, int numpts, apiflt rad) { + vector a; + int i; + + if ((points == NULL) || (numpts == 0)) { + return; + } + + if (numpts > 0) { + rt_sphere(tex, points[0], rad); + + if (numpts > 1) { + for (i=1; i (xres + yres)) v=(xres + yres); + base[x + (xres * y)]=v; + } +} + +static void subdivide(apiflt *base, int xres, int yres, apiflt wx, apiflt wy, + int x1, int y1, int x2, int y2) { + long x,y; + + if (((x2 - x1) < 2) && ((y2 - y1) < 2)) { return; } + + x=(x1 + x2) / 2; + y=(y1 + y2) / 2; + + adjust(base, xres, yres, wx, wy, x1, y1, x, y1, x2, y1); + adjust(base, xres, yres, wx, wy, x2, y1, x2, y, x2, y2); + adjust(base, xres, yres, wx, wy, x1, y2, x, y2, x2, y2); + adjust(base, xres, yres, wx, wy, x1, y1, x1, y, x1, y2); + + + if (base[x + xres*y]==0.0) { + base[x + (xres * y)]=(base[x1 + xres*y1] + base[x2 + xres*y1] + + base[x2 + xres*y2] + base[x1 + xres*y2] )/4.0; + } + + subdivide(base, xres, yres, wx, wy, x1, y1 ,x ,y); + subdivide(base, xres, yres, wx, wy, x, y1, x2, y); + subdivide(base, xres, yres, wx, wy, x, y, x2, y2); + subdivide(base, xres, yres, wx, wy, x1, y, x, y2); +} + +void rt_landscape(void * tex, int m, int n, + vector ctr, apiflt wx, apiflt wy) { + int totalsize, x, y; + apiflt * field; + + totalsize=m*n; + + srand(totalsize); + + field=(apiflt *) malloc(totalsize*sizeof(apiflt)); + + for (y=0; ymin=min; + b->max=max; + b->methods = &bndbox_methods; + + b->objlist=NULL; + b->tex=NULL; + b->nextobj=NULL; + return b; +} + + +static int bndbox_bbox(void * obj, vector * min, vector * max) { + bndbox * b = (bndbox *) obj; + + *min = b->min; + *max = b->max; + + return 1; +} + + +static void free_bndbox(void * v) { + bndbox * b = (bndbox *) v; + + free_objects(b->objlist); + + free(b); +} + + +static void bndbox_intersect(bndbox * bx, ray * ry) { + flt a, tx1, tx2, ty1, ty2, tz1, tz2; + flt tnear, tfar; + object * obj; + ray newray; + + /* eliminate bounded rays whose bounds do not intersect */ + /* the bounds of the box.. */ + if (ry->flags |= RT_RAY_BOUNDED) { + if ((ry->s.x > bx->max.x) && (ry->e.x > bx->max.x)) return; + if ((ry->s.x < bx->min.x) && (ry->e.x < bx->min.x)) return; + + if ((ry->s.y > bx->max.y) && (ry->e.y > bx->max.y)) return; + if ((ry->s.y < bx->min.y) && (ry->e.y < bx->min.y)) return; + + if ((ry->s.z > bx->max.z) && (ry->e.z > bx->max.z)) return; + if ((ry->s.z < bx->min.z) && (ry->e.z < bx->min.z)) return; + } + + tnear= -FHUGE; + tfar= FHUGE; + + if (ry->d.x == 0.0) { + if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) return; + } + else { + tx1 = (bx->min.x - ry->o.x) / ry->d.x; + tx2 = (bx->max.x - ry->o.x) / ry->d.x; + if (tx1 > tx2) { a=tx1; tx1=tx2; tx2=a; } + if (tx1 > tnear) tnear=tx1; + if (tx2 < tfar) tfar=tx2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + if (ry->d.y == 0.0) { + if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y)) return; + } + else { + ty1 = (bx->min.y - ry->o.y) / ry->d.y; + ty2 = (bx->max.y - ry->o.y) / ry->d.y; + if (ty1 > ty2) { a=ty1; ty1=ty2; ty2=a; } + if (ty1 > tnear) tnear=ty1; + if (ty2 < tfar) tfar=ty2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + if (ry->d.z == 0.0) { + if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z)) return; + } + else { + tz1 = (bx->min.z - ry->o.z) / ry->d.z; + tz2 = (bx->max.z - ry->o.z) / ry->d.z; + if (tz1 > tz2) { a=tz1; tz1=tz2; tz2=a; } + if (tz1 > tnear) tnear=tz1; + if (tz2 < tfar) tfar=tz2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + + /* intersect all of the enclosed objects */ + newray=*ry; + newray.flags |= RT_RAY_BOUNDED; + + RAYPNT(newray.s , (*ry) , tnear); + RAYPNT(newray.e , (*ry) , (tfar + EPSILON)); + + obj = bx->objlist; + while (obj != NULL) { + obj->methods->intersect(obj, &newray); + obj = (object *)obj->nextobj; + } +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/bndbox.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/bndbox.h new file mode 100644 index 0000000000..402ac9cbee --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/bndbox.h @@ -0,0 +1,82 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * bndbox.h - This file contains the defines for bounding boxes etc. + * + * $Id: bndbox.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector min; + vector max; + object * objlist; +} bndbox; + +bndbox * newbndbox(vector min, vector max); + +#ifdef BNDBOX_PRIVATE + +static int bndbox_bbox(void * obj, vector * min, vector * max); +static void free_bndbox(void * v); +static void bndbox_intersect(bndbox *, ray *); + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.cpp new file mode 100644 index 0000000000..3d2175cd1e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.cpp @@ -0,0 +1,178 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * box.c - This file contains the functions for dealing with boxes. + * + * $Id: box.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "box.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +int box_bbox(void * obj, vector * min, vector * max) { + box * b = (box *) obj; + + *min = b->min; + *max = b->max; + + return 1; +} + +static object_methods box_methods = { + (void (*)(void *, void *))(box_intersect), + (void (*)(void *, void *, void *, void *))(box_normal), + box_bbox, + free +}; + +box * newbox(void * tex, vector min, vector max) { + box * b; + + b=(box *) rt_getmem(sizeof(box)); + memset(b, 0, sizeof(box)); + b->methods = &box_methods; + b->tex = (texture *)tex; + b->min = min; + b->max = max; + + return b; +} + +void box_intersect(box * bx, ray * ry) { + flt a, tx1, tx2, ty1, ty2, tz1, tz2; + flt tnear, tfar; + + tnear= -FHUGE; + tfar= FHUGE; + + if (ry->d.x == 0.0) { + if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) return; + } + else { + tx1 = (bx->min.x - ry->o.x) / ry->d.x; + tx2 = (bx->max.x - ry->o.x) / ry->d.x; + if (tx1 > tx2) { a=tx1; tx1=tx2; tx2=a; } + if (tx1 > tnear) tnear=tx1; + if (tx2 < tfar) tfar=tx2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + if (ry->d.y == 0.0) { + if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y)) return; + } + else { + ty1 = (bx->min.y - ry->o.y) / ry->d.y; + ty2 = (bx->max.y - ry->o.y) / ry->d.y; + if (ty1 > ty2) { a=ty1; ty1=ty2; ty2=a; } + if (ty1 > tnear) tnear=ty1; + if (ty2 < tfar) tfar=ty2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + if (ry->d.z == 0.0) { + if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z)) return; + } + else { + tz1 = (bx->min.z - ry->o.z) / ry->d.z; + tz2 = (bx->max.z - ry->o.z) / ry->d.z; + if (tz1 > tz2) { a=tz1; tz1=tz2; tz2=a; } + if (tz1 > tnear) tnear=tz1; + if (tz2 < tfar) tfar=tz2; + } + if (tnear > tfar) return; + if (tfar < 0.0) return; + + add_intersection(tnear, (object *) bx, ry); + add_intersection(tfar, (object *) bx, ry); +} + +void box_normal(box * bx, vector * pnt, ray * incident, vector * N) { + vector a, b, c; + flt t; + + c.x=(bx->max.x + bx->min.x) / 2.0; + c.y=(bx->max.y + bx->min.y) / 2.0; + c.z=(bx->max.z + bx->min.z) / 2.0; + + VSub((vector *) pnt, &c, N); + b=(*N); + + a.x=fabs(N->x); + a.y=fabs(N->y); + a.z=fabs(N->z); + + N->x=0.0; N->y=0.0; N->z=0.0; + + t=MYMAX(a.x, MYMAX(a.y, a.z)); + + if (t==a.x) N->x=b.x; + + if (t==a.y) N->y=b.y; + + if (t==a.z) N->z=b.z; + + VNorm(N); +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.h new file mode 100644 index 0000000000..997afc6e80 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/box.h @@ -0,0 +1,77 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * box.h - This file contains the defines for boxes etc. + * + * $Id: box.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector min; + vector max; +} box; + + +box * newbox(void * tex, vector min, vector max); +void box_intersect(box *, ray *); +void box_normal(box *, vector *, ray * incident, vector *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.cpp new file mode 100644 index 0000000000..ca6bfb5d5f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.cpp @@ -0,0 +1,119 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * camera.c - This file contains all of the functions for doing camera work. + * + * $Id: camera.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "camera.h" +#include "util.h" + +ray camray(scenedef *scene, int x, int y) { + ray ray1, newray; + vector projcent; + vector projpixel; + flt px, py, sx, sy; + + sx = (flt) scene->hres; + sy = (flt) scene->vres; + + /* calculate the width and height of the image plane given the */ + /* aspect ratio, image resolution, and zoom factor */ + + px=((sx / sy) / scene->aspectratio) / scene->camzoom; + py=1.0 / scene->camzoom; + + /* assuming viewvec is a unit vector, then the center of the */ + /* image plane is the camera center + vievec */ + projcent.x = scene->camcent.x + scene->camviewvec.x; + projcent.y = scene->camcent.y + scene->camviewvec.y; + projcent.z = scene->camcent.z + scene->camviewvec.z; + + /* starting from the center of the image plane, we move the */ + /* center of the pel we're calculating, to */ + /* projcent + (rightvec * x distance) */ + ray1.o=projcent; + ray1.d=scene->camrightvec; + projpixel=Raypnt(&ray1, ((x*px/sx) - (px / 2.0))); + + /* starting from the horizontally translated pel, we move the */ + /* center of the pel we're calculating, to */ + /* projcent + (upvec * y distance) */ + ray1.o=projpixel; + ray1.d=scene->camupvec; + projpixel=Raypnt(&ray1, ((y*py/sy) - (py / 2.0))); + + /* now that we have the exact pel center in the image plane */ + /* we create the real primary ray that will be used by the */ + /* rest of the system. */ + /* The ray is expected to be re-normalized elsewhere, we're */ + /* only really concerned about getting its direction right. */ + newray.o=scene->camcent; + VSub(&projpixel, &scene->camcent, &newray.d); + newray.depth = scene->raydepth; + newray.flags = RT_RAY_REGULAR; /* camera only generates primary rays */ + + return newray; +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.h new file mode 100644 index 0000000000..c25cc547dd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/camera.h @@ -0,0 +1,64 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * camera.h - This file contains the defines for camera routines etc. + * + * $Id: camera.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +ray camray(scenedef *, int, int); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.cpp new file mode 100644 index 0000000000..ac10f003f3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.cpp @@ -0,0 +1,106 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * coordsys.c - Routines to translate from one coordinate system to another. + * + * $Id: coordsys.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "coordsys.h" + +void xytopolar(flt x, flt y, flt rad, flt * u, flt * v) { + flt r1; + r1=x*x + y*y; + *v=sqrt(r1 / (rad*rad)); + if (y<0.0) + *u=1.0 - acos(x/sqrt(r1))/TWOPI; + else + *u= acos(x/sqrt(r1))/TWOPI; +} + +void xyztocyl(vector pnt, flt height, flt * u, flt * v) { + flt r1; + + r1=pnt.x*pnt.x + pnt.y*pnt.y; + + *v=pnt.z / height; + if (pnt.y<0.0) + *u=1.0 - acos(pnt.x/sqrt(r1))/TWOPI; + else + *u=acos(pnt.x/sqrt(r1))/TWOPI; +} + +void xyztospr(vector pnt, flt * u, flt * v) { + flt r1, phi, theta; + + r1=sqrt(pnt.x*pnt.x + pnt.y*pnt.y + pnt.z*pnt.z); + + phi=acos(-pnt.y/r1); + *v=phi/3.1415926; + + theta=acos((pnt.x/r1)/sin(phi))/TWOPI; + + if (pnt.z > 0.0) + *u = theta; + else + *u = 1 - theta; +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.h new file mode 100644 index 0000000000..035d8a0531 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/coordsys.h @@ -0,0 +1,68 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * coordsys.h - defines for coordinate system routines. + * + * $Id: coordsys.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#define TWOPI 6.2831853 + +void xytopolar(flt, flt, flt, flt *, flt *); +void xyztocyl(vector, flt, flt *, flt *); +void xyztospr(vector, flt *, flt *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.cpp new file mode 100644 index 0000000000..1a3329e8c1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.cpp @@ -0,0 +1,281 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * cylinder.c - This file contains the functions for dealing with cylinders. + * + * $Id: cylinder.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +#define CYLINDER_PRIVATE +#include "cylinder.h" + +static object_methods cylinder_methods = { + (void (*)(void *, void *))(cylinder_intersect), + (void (*)(void *, void *, void *, void *))(cylinder_normal), + cylinder_bbox, + free +}; + +static object_methods fcylinder_methods = { + (void (*)(void *, void *))(fcylinder_intersect), + (void (*)(void *, void *, void *, void *))(cylinder_normal), + fcylinder_bbox, + free +}; + + +object * newcylinder(void * tex, vector ctr, vector axis, flt rad) { + cylinder * c; + + c=(cylinder *) rt_getmem(sizeof(cylinder)); + memset(c, 0, sizeof(cylinder)); + c->methods = &cylinder_methods; + + c->tex=(texture *) tex; + c->ctr=ctr; + c->axis=axis; + c->rad=rad; + return (object *) c; +} + +static int cylinder_bbox(void * obj, vector * min, vector * max) { + return 0; /* infinite / unbounded object */ +} + +static void cylinder_intersect(cylinder * cyl, ray * ry) { + vector rc, n, D, O; + flt t, s, tin, tout, ln, d; + + rc.x = ry->o.x - cyl->ctr.x; + rc.y = ry->o.y - cyl->ctr.y; + rc.z = ry->o.z - cyl->ctr.z; + + VCross(&ry->d, &cyl->axis, &n); + + VDOT(ln, n, n); + ln=sqrt(ln); /* finish length calculation */ + + if (ln == 0.0) { /* ray is parallel to the cylinder.. */ + VDOT(d, rc, cyl->axis); + D.x = rc.x - d * cyl->axis.x; + D.y = rc.y - d * cyl->axis.y; + D.z = rc.z - d * cyl->axis.z; + VDOT(d, D, D); + d = sqrt(d); + tin = -FHUGE; + tout = FHUGE; + /* if (d <= cyl->rad) then ray is inside cylinder.. else outside */ + } + + VNorm(&n); + VDOT(d, rc, n); + d = fabs(d); + + if (d <= cyl->rad) { /* ray intersects cylinder.. */ + VCross(&rc, &cyl->axis, &O); + VDOT(t, O, n); + t = - t / ln; + VCross(&n, &cyl->axis, &O); + VNorm(&O); + VDOT(s, ry->d, O); + s = fabs(sqrt(cyl->rad*cyl->rad - d*d) / s); + tin = t - s; + add_intersection(tin, (object *) cyl, ry); + tout = t + s; + add_intersection(tout, (object *) cyl, ry); + } +} + +static void cylinder_normal(cylinder * cyl, vector * pnt, ray * incident, vector * N) { + vector a,b,c; + flt t; + + VSub((vector *) pnt, &(cyl->ctr), &a); + + c=cyl->axis; + + VNorm(&c); + + VDOT(t, a, c); + + b.x = c.x * t + cyl->ctr.x; + b.y = c.y * t + cyl->ctr.y; + b.z = c.z * t + cyl->ctr.z; + + VSub(pnt, &b, N); + VNorm(N); + + if (VDot(N, &(incident->d)) > 0.0) { /* make cylinder double sided */ + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + +object * newfcylinder(void * tex, vector ctr, vector axis, flt rad) { + cylinder * c; + + c=(cylinder *) rt_getmem(sizeof(cylinder)); + memset(c, 0, sizeof(cylinder)); + c->methods = &fcylinder_methods; + + c->tex=(texture *) tex; + c->ctr=ctr; + c->axis=axis; + c->rad=rad; + + return (object *) c; +} + +static int fcylinder_bbox(void * obj, vector * min, vector * max) { + cylinder * c = (cylinder *) obj; + vector mintmp, maxtmp; + + mintmp.x = c->ctr.x; + mintmp.y = c->ctr.y; + mintmp.z = c->ctr.z; + maxtmp.x = c->ctr.x + c->axis.x; + maxtmp.y = c->ctr.y + c->axis.y; + maxtmp.z = c->ctr.z + c->axis.z; + + min->x = MYMIN(mintmp.x, maxtmp.x); + min->y = MYMIN(mintmp.y, maxtmp.y); + min->z = MYMIN(mintmp.z, maxtmp.z); + min->x -= c->rad; + min->y -= c->rad; + min->z -= c->rad; + + max->x = MYMAX(mintmp.x, maxtmp.x); + max->y = MYMAX(mintmp.y, maxtmp.y); + max->z = MYMAX(mintmp.z, maxtmp.z); + max->x += c->rad; + max->y += c->rad; + max->z += c->rad; + + return 1; +} + + +static void fcylinder_intersect(cylinder * cyl, ray * ry) { + vector rc, n, O, hit, tmp2, ctmp4; + flt t, s, tin, tout, ln, d, tmp, tmp3; + + rc.x = ry->o.x - cyl->ctr.x; + rc.y = ry->o.y - cyl->ctr.y; + rc.z = ry->o.z - cyl->ctr.z; + + VCross(&ry->d, &cyl->axis, &n); + + VDOT(ln, n, n); + ln=sqrt(ln); /* finish length calculation */ + + if (ln == 0.0) { /* ray is parallel to the cylinder.. */ + return; /* in this case, we want to miss or go through the "hole" */ + } + + VNorm(&n); + VDOT(d, rc, n); + d = fabs(d); + + if (d <= cyl->rad) { /* ray intersects cylinder.. */ + VCross(&rc, &cyl->axis, &O); + VDOT(t, O, n); + t = - t / ln; + VCross(&n, &cyl->axis, &O); + VNorm(&O); + VDOT(s, ry->d, O); + s = fabs(sqrt(cyl->rad*cyl->rad - d*d) / s); + tin = t - s; + + RAYPNT(hit, (*ry), tin); + + ctmp4=cyl->axis; + VNorm(&ctmp4); + + tmp2.x = hit.x - cyl->ctr.x; + tmp2.y = hit.y - cyl->ctr.y; + tmp2.z = hit.z - cyl->ctr.z; + + VDOT(tmp, tmp2, ctmp4); + VDOT(tmp3, cyl->axis, cyl->axis); + + if ((tmp > 0.0) && (tmp < sqrt(tmp3))) + add_intersection(tin, (object *) cyl, ry); + tout = t + s; + + RAYPNT(hit, (*ry), tout); + + tmp2.x = hit.x - cyl->ctr.x; + tmp2.y = hit.y - cyl->ctr.y; + tmp2.z = hit.z - cyl->ctr.z; + + VDOT(tmp, tmp2, ctmp4); + VDOT(tmp3, cyl->axis, cyl->axis); + + if ((tmp > 0.0) && (tmp < sqrt(tmp3))) + add_intersection(tout, (object *) cyl, ry); + } +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.h new file mode 100644 index 0000000000..96a1dc972b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/cylinder.h @@ -0,0 +1,86 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * cylinder.h - This file contains the defines for cylinders etc. + * + * $Id: cylinder.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +object * newcylinder(void *, vector, vector, flt); +object * newfcylinder(void *, vector, vector, flt); + +#ifdef CYLINDER_PRIVATE + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector ctr; + vector axis; + flt rad; +} cylinder; + +static void cylinder_intersect(cylinder *, ray *); +static void fcylinder_intersect(cylinder *, ray *); + +static int cylinder_bbox(void * obj, vector * min, vector * max); +static int fcylinder_bbox(void * obj, vector * min, vector * max); + +static void cylinder_normal(cylinder *, vector *, ray *, vector *); +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.cpp new file mode 100644 index 0000000000..61673ad363 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.cpp @@ -0,0 +1,321 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * extvol.c - Volume rendering helper routines etc. + * + * $Id: extvol.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "util.h" +#include "box.h" +#include "extvol.h" +#include "trace.h" +#include "sphere.h" +#include "light.h" +#include "shade.h" +#include "global.h" + + +int extvol_bbox(void * obj, vector * min, vector * max) { + box * b = (box *) obj; + + *min = b->min; + *max = b->max; + + return 1; +} + +static object_methods extvol_methods = { + (void (*)(void *, void *))(box_intersect), + (void (*)(void *, void *, void *, void *))(box_normal), + extvol_bbox, + free +}; + +extvol * newextvol(void * voidtex, vector min, vector max, + int samples, flt (* evaluator)(flt, flt, flt)) { + extvol * xvol; + texture * tex; + + tex = (texture *) voidtex; + + xvol = (extvol *) rt_getmem(sizeof(extvol)); + memset(xvol, 0, sizeof(extvol)); + + xvol->methods = &extvol_methods; + + xvol->min=min; + xvol->max=max; + xvol->evaluator = evaluator; + xvol->ambient = tex->ambient; + xvol->diffuse = tex->diffuse; + xvol->opacity = tex->opacity; + xvol->samples = samples; + + xvol->tex = (texture *)rt_getmem(sizeof(texture)); + memset(xvol->tex, 0, sizeof(texture)); + + xvol->tex->ctr.x = 0.0; + xvol->tex->ctr.y = 0.0; + xvol->tex->ctr.z = 0.0; + xvol->tex->rot = xvol->tex->ctr; + xvol->tex->scale = xvol->tex->ctr; + xvol->tex->uaxs = xvol->tex->ctr; + xvol->tex->vaxs = xvol->tex->ctr; + xvol->tex->islight = 0; + xvol->tex->shadowcast = 0; + + xvol->tex->col=tex->col; + xvol->tex->ambient=1.0; + xvol->tex->diffuse=0.0; + xvol->tex->specular=0.0; + xvol->tex->opacity=1.0; + xvol->tex->img=NULL; + xvol->tex->texfunc=(color(*)(void *, void *, void *))(ext_volume_texture); + xvol->tex->obj = (void *) xvol; /* XXX hack! */ + + return xvol; +} + +color ExtVoxelColor(flt scalar) { + color col; + + if (scalar > 1.0) + scalar = 1.0; + + if (scalar < 0.0) + scalar = 0.0; + + if (scalar < 0.5) { + col.g = 0.0; + } + else { + col.g = (scalar - 0.5) * 2.0; + } + + col.r = scalar; + col.b = 1.0 - (scalar / 2.0); + + return col; +} + +color ext_volume_texture(vector * hit, texture * tex, ray * ry) { + color col, col2; + box * bx; + extvol * xvol; + flt a, tx1, tx2, ty1, ty2, tz1, tz2; + flt tnear, tfar; + flt t, tdist, dt, ddt, sum, tt; + vector pnt, bln; + flt scalar, transval; + int i; + point_light * li; + color diffint; + vector N, L; + flt inten; + + col.r = 0.0; + col.g = 0.0; + col.b = 0.0; + + bx = (box *) tex->obj; + xvol = (extvol *) tex->obj; + + tnear= -FHUGE; + tfar= FHUGE; + + if (ry->d.x == 0.0) { + if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) return col; + } + else { + tx1 = (bx->min.x - ry->o.x) / ry->d.x; + tx2 = (bx->max.x - ry->o.x) / ry->d.x; + if (tx1 > tx2) { a=tx1; tx1=tx2; tx2=a; } + if (tx1 > tnear) tnear=tx1; + if (tx2 < tfar) tfar=tx2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (ry->d.y == 0.0) { + if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y)) return col; + } + else { + ty1 = (bx->min.y - ry->o.y) / ry->d.y; + ty2 = (bx->max.y - ry->o.y) / ry->d.y; + if (ty1 > ty2) { a=ty1; ty1=ty2; ty2=a; } + if (ty1 > tnear) tnear=ty1; + if (ty2 < tfar) tfar=ty2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (ry->d.z == 0.0) { + if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z)) return col; + } + else { + tz1 = (bx->min.z - ry->o.z) / ry->d.z; + tz2 = (bx->max.z - ry->o.z) / ry->d.z; + if (tz1 > tz2) { a=tz1; tz1=tz2; tz2=a; } + if (tz1 > tnear) tnear=tz1; + if (tz2 < tfar) tfar=tz2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (tnear < 0.0) tnear=0.0; + + tdist = xvol->samples; + + tt = (xvol->opacity / tdist); + + bln.x=fabs(bx->min.x - bx->max.x); + bln.y=fabs(bx->min.y - bx->max.y); + bln.z=fabs(bx->min.z - bx->max.z); + + dt = 1.0 / tdist; + sum = 0.0; + +/* Accumulate color as the ray passes through the voxels */ + for (t=tnear; t<=tfar; t+=dt) { + if (sum < 1.0) { + pnt.x=((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x; + pnt.y=((ry->o.y + (ry->d.y * t)) - bx->min.y) / bln.y; + pnt.z=((ry->o.z + (ry->d.z * t)) - bx->min.z) / bln.z; + + /* call external evaluator assume 0.0 -> 1.0 range.. */ + scalar = xvol->evaluator(pnt.x, pnt.y, pnt.z); + + transval = tt * scalar; + sum += transval; + + col2 = ExtVoxelColor(scalar); + + col.r += transval * col2.r * xvol->ambient; + col.g += transval * col2.g * xvol->ambient; + col.b += transval * col2.b * xvol->ambient; + + ddt = dt; + + /* Add in diffuse shaded light sources (no shadows) */ + if (xvol->diffuse > 0.0) { + + /* Calculate the Volume gradient at the voxel */ + N.x = (xvol->evaluator(pnt.x - ddt, pnt.y, pnt.z) - + xvol->evaluator(pnt.x + ddt, pnt.y, pnt.z)) * 8.0 * tt; + + N.y = (xvol->evaluator(pnt.x, pnt.y - ddt, pnt.z) - + xvol->evaluator(pnt.x, pnt.y + ddt, pnt.z)) * 8.0 * tt; + + N.z = (xvol->evaluator(pnt.x, pnt.y, pnt.z - ddt) - + xvol->evaluator(pnt.x, pnt.y, pnt.z + ddt)) * 8.0 * tt; + + /* only light surfaces with enough of a normal.. */ + if ((N.x*N.x + N.y*N.y + N.z*N.z) > 0.0) { + diffint.r = 0.0; + diffint.g = 0.0; + diffint.b = 0.0; + + /* add the contribution of each of the lights.. */ + for (i=0; ictr, (*hit), L) + VNorm(&L); + VDOT(inten, N, L) + + /* only add light if its from the front of the surface */ + /* could add back-lighting if we wanted to later.. */ + if (inten > 0.0) { + diffint.r += inten*li->tex->col.r; + diffint.g += inten*li->tex->col.g; + diffint.b += inten*li->tex->col.b; + } + } + col.r += col2.r * diffint.r * xvol->diffuse; + col.g += col2.g * diffint.g * xvol->diffuse; + col.b += col2.b * diffint.b * xvol->diffuse; + } + } + } + else { + sum=1.0; + } + } + + /* Add in transmitted ray from outside environment */ + if (sum < 1.0) { /* spawn transmission rays / refraction */ + color transcol; + + transcol = shade_transmission(ry, hit, 1.0 - sum); + + col.r += transcol.r; /* add the transmitted ray */ + col.g += transcol.g; /* to the diffuse and */ + col.b += transcol.b; /* transmission total.. */ + } + + return col; +} + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.h new file mode 100644 index 0000000000..fc2f0196fd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/extvol.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * vol.h - Volume rendering definitions etc. + * + * + * $Id: extvol.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector min; + vector max; + flt ambient; + flt diffuse; + flt opacity; + int samples; + flt (* evaluator)(flt, flt, flt); +} extvol; + +extvol * newextvol(void * voidtex, vector min, vector max, + int samples, flt (* evaluator)(flt, flt, flt)); +color ext_volume_texture(vector *, texture *, ray *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.cpp new file mode 100644 index 0000000000..9773a32435 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.cpp @@ -0,0 +1,85 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * global.c - any/all global data items etc should be in this file + * + * $Id: global.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + * + */ + +#include "types.h" +#include "machine.h" +#include "sphere.h" +#include "light.h" + +/* stuff moved from intersect.c */ +object * rootobj = NULL; /* starts out empty. */ + +point_light * lightlist[MAXLIGHTS]; +int numlights = 0; + +unsigned int numobjects = 0; /* used to assign unique object ID's */ + +/* used in util.c */ +unsigned int rt_mem_in_use = 0; + +/* used in api.c */ +int parinitted = 0; + +int graphicswindowopen = 0; + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.h new file mode 100644 index 0000000000..598658e620 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/global.h @@ -0,0 +1,76 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * global.h - any/all global data items etc should be in this file + * + * $Id: global.h,v 1.2 2007-02-22 17:54:15 Exp $ + * + */ + +/* stuff moved from intersect.c */ +extern object * rootobj; + +extern point_light * lightlist[MAXLIGHTS]; +extern int numlights; + +extern unsigned int numobjects; + +extern unsigned int rt_mem_in_use; +extern int parinitted; + +extern int graphicswindowopen; diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.cpp new file mode 100644 index 0000000000..893d33c78a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.cpp @@ -0,0 +1,690 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * grid.c - spatial subdivision efficiency structures + * + * $Id: grid.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + * + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +#define GRID_PRIVATE +#include "grid.h" + +#ifndef cbrt +#define cbrt(x) ((x) > 0.0 ? pow((double)(x), 1.0/3.0) : \ + ((x) < 0.0 ? -pow((double)-(x), 1.0/3.0) : 0.0)) + +#define qbrt(x) ((x) > 0.0 ? pow((double)(x), 1.0/4.0) : \ + ((x) < 0.0 ? -pow((double)-(x), 1.0/4.0) : 0.0)) + +#endif + +static object_methods grid_methods = { + (void (*)(void *, void *))(grid_intersect), + (void (*)(void *, void *, void *, void *))(NULL), + grid_bbox, + grid_free +}; + +extern bool silent_mode; + +object * newgrid(int xsize, int ysize, int zsize, vector min, vector max) { + grid * g; + + g = (grid *) rt_getmem(sizeof(grid)); + memset(g, 0, sizeof(grid)); + + g->methods = &grid_methods; + g->id = new_objectid(); + + g->xsize = xsize; + g->ysize = ysize; + g->zsize = zsize; + + g->min = min; + g->max = max; + + VSub(&g->max, &g->min, &g->voxsize); + g->voxsize.x /= (flt) g->xsize; + g->voxsize.y /= (flt) g->ysize; + g->voxsize.z /= (flt) g->zsize; + + g->cells = (objectlist **) rt_getmem(xsize*ysize*zsize*sizeof(objectlist *)); + memset(g->cells, 0, xsize*ysize*zsize * sizeof(objectlist *)); + +/* fprintf(stderr, "New grid, size: %8d %8d %8d\n", g->xsize, g->ysize, g->zsize); */ + + return (object *) g; +} + +static int grid_bbox(void * obj, vector * min, vector * max) { + grid * g = (grid *) obj; + + *min = g->min; + *max = g->max; + + return 1; +} + +static void grid_free(void * v) { + int i, numvoxels; + grid * g = (grid *) v; + + /* loop through all voxels and free the object lists */ + numvoxels = g->xsize * g->ysize * g->zsize; + for (i=0; icells[i]; + while (lcur != NULL) { + lnext = lcur->next; + free(lcur); + } + } + + /* free the grid cells */ + free(g->cells); + + /* free all objects on the grid object list */ + free_objects(g->objects); + + free(g); +} + +static void globalbound(object ** rootlist, vector * gmin, vector * gmax) { + vector min, max; + object * cur; + + if (*rootlist == NULL) /* don't bound non-existant objects */ + return; + + gmin->x = FHUGE; gmin->y = FHUGE; gmin->z = FHUGE; + gmax->x = -FHUGE; gmax->y = -FHUGE; gmax->z = -FHUGE; + + cur=*rootlist; + while (cur != NULL) { /* Go! */ + min.x = -FHUGE; min.y = -FHUGE; min.z = -FHUGE; + max.x = FHUGE; max.y = FHUGE; max.z = FHUGE; + + if (cur->methods->bbox((void *) cur, &min, &max)) { + gmin->x = MYMIN( gmin->x , min.x); + gmin->y = MYMIN( gmin->y , min.y); + gmin->z = MYMIN( gmin->z , min.z); + + gmax->x = MYMAX( gmax->x , max.x); + gmax->y = MYMAX( gmax->y , max.y); + gmax->z = MYMAX( gmax->z , max.z); + } + + cur=(object *)cur->nextobj; + } +} + + +static int cellbound(grid *g, gridindex *index, vector * cmin, vector * cmax) { + vector min, max, cellmin, cellmax; + objectlist * cur; + int numinbounds = 0; + + cur = g->cells[index->z*g->xsize*g->ysize + index->y*g->xsize + index->x]; + + if (cur == NULL) /* don't bound non-existant objects */ + return 0; + + cellmin.x = voxel2x(g, index->x); + cellmin.y = voxel2y(g, index->y); + cellmin.z = voxel2z(g, index->z); + + cellmax.x = cellmin.x + g->voxsize.x; + cellmax.y = cellmin.y + g->voxsize.y; + cellmax.z = cellmin.z + g->voxsize.z; + + cmin->x = FHUGE; cmin->y = FHUGE; cmin->z = FHUGE; + cmax->x = -FHUGE; cmax->y = -FHUGE; cmax->z = -FHUGE; + + while (cur != NULL) { /* Go! */ + min.x = -FHUGE; min.y = -FHUGE; min.z = -FHUGE; + max.x = FHUGE; max.y = FHUGE; max.z = FHUGE; + + if (cur->obj->methods->bbox((void *) cur->obj, &min, &max)) { + if ((min.x >= cellmin.x) && (max.x <= cellmax.x) && + (min.y >= cellmin.y) && (max.y <= cellmax.y) && + (min.z >= cellmin.z) && (max.z <= cellmax.z)) { + + cmin->x = MYMIN( cmin->x , min.x); + cmin->y = MYMIN( cmin->y , min.y); + cmin->z = MYMIN( cmin->z , min.z); + + cmax->x = MYMAX( cmax->x , max.x); + cmax->y = MYMAX( cmax->y , max.y); + cmax->z = MYMAX( cmax->z , max.z); + + numinbounds++; + } + } + + cur=cur->next; + } + + /* in case we get a 0.0 sized axis on the cell bounds, we'll */ + /* use the original cell bounds */ + if ((cmax->x - cmin->x) < EPSILON) { + cmax->x += EPSILON; + cmin->x -= EPSILON; + } + if ((cmax->y - cmin->y) < EPSILON) { + cmax->y += EPSILON; + cmin->y -= EPSILON; + } + if ((cmax->z - cmin->z) < EPSILON) { + cmax->z += EPSILON; + cmin->z -= EPSILON; + } + + return numinbounds; +} + +static int countobj(object * root) { + object * cur; /* counts the number of objects on a list */ + int numobj; + + numobj=0; + cur=root; + + while (cur != NULL) { + cur=(object *)cur->nextobj; + numobj++; + } + return numobj; +} + +static int countobjlist(objectlist * root) { + objectlist * cur; + int numobj; + + numobj=0; + cur = root; + + while (cur != NULL) { + cur = cur->next; + numobj++; + } + return numobj; +} + +int engrid_scene(object ** list) { + grid * g; + int numobj, numcbrt; + vector gmin, gmax; + gridindex index; + + if (*list == NULL) + return 0; + + numobj = countobj(*list); + + if ( !silent_mode ) + fprintf(stderr, "Scene contains %d bounded objects.\n", numobj); + + if (numobj > 16) { + numcbrt = (int) cbrt(4*numobj); + globalbound(list, &gmin, &gmax); + + g = (grid *) newgrid(numcbrt, numcbrt, numcbrt, gmin, gmax); + engrid_objlist(g, list); + + numobj = countobj(*list); + g->nextobj = *list; + *list = (object *) g; + + /* now create subgrids.. */ + for (index.z=0; index.zzsize; index.z++) { + for (index.y=0; index.yysize; index.y++) { + for (index.x=0; index.xxsize; index.x++) { + engrid_cell(g, &index); + } + } + } + } + + return 1; +} + + +void engrid_objlist(grid * g, object ** list) { + object * cur, * next, **prev; + + if (*list == NULL) + return; + + prev = list; + cur = *list; + + while (cur != NULL) { + next = (object *)cur->nextobj; + + if (engrid_object(g, cur)) + *prev = next; + else + prev = (object **) &cur->nextobj; + + cur = next; + } +} + +static int engrid_cell(grid * gold, gridindex *index) { + vector gmin, gmax, gsize; + flt len; + int numobj, numcbrt, xs, ys, zs; + grid * g; + objectlist **list; + objectlist * newobj; + + list = &gold->cells[index->z*gold->xsize*gold->ysize + + index->y*gold->xsize + index->x]; + + if (*list == NULL) + return 0; + + numobj = cellbound(gold, index, &gmin, &gmax); + + VSub(&gmax, &gmin, &gsize); + len = 1.0 / (MYMAX( MYMAX(gsize.x, gsize.y), gsize.z )); + gsize.x *= len; + gsize.y *= len; + gsize.z *= len; + + if (numobj > 16) { + numcbrt = (int) cbrt(2*numobj); + + xs = (int) ((flt) numcbrt * gsize.x); + if (xs < 1) xs = 1; + ys = (int) ((flt) numcbrt * gsize.y); + if (ys < 1) ys = 1; + zs = (int) ((flt) numcbrt * gsize.z); + if (zs < 1) zs = 1; + + g = (grid *) newgrid(xs, ys, zs, gmin, gmax); + engrid_objectlist(g, list); + + newobj = (objectlist *) rt_getmem(sizeof(objectlist)); + newobj->obj = (object *) g; + newobj->next = *list; + *list = newobj; + + g->nextobj = gold->objects; + gold->objects = (object *) g; + } + + return 1; +} + +static int engrid_objectlist(grid * g, objectlist ** list) { + objectlist * cur, * next, **prev; + int numsucceeded = 0; + + if (*list == NULL) + return 0; + + prev = list; + cur = *list; + + while (cur != NULL) { + next = cur->next; + + if (engrid_object(g, cur->obj)) { + *prev = next; + free(cur); + numsucceeded++; + } + else { + prev = &cur->next; + } + + cur = next; + } + + return numsucceeded; +} + + + +static int engrid_object(grid * g, object * obj) { + vector omin, omax; + gridindex low, high; + int x, y, z, zindex, yindex, voxindex; + objectlist * tmp; + + if (obj->methods->bbox(obj, &omin, &omax)) { + if (!pos2grid(g, &omin, &low) || !pos2grid(g, &omax, &high)) { + return 0; /* object is not wholly contained in the grid */ + } + } + else { + return 0; /* object is unbounded */ + } + + /* add the object to the complete list of objects in the grid */ + obj->nextobj = g->objects; + g->objects = obj; + + /* add this object to all voxels it inhabits */ + for (z=low.z; z<=high.z; z++) { + zindex = z * g->xsize * g->ysize; + for (y=low.y; y<=high.y; y++) { + yindex = y * g->xsize; + for (x=low.x; x<=high.x; x++) { + voxindex = x + yindex + zindex; + tmp = (objectlist *) rt_getmem(sizeof(objectlist)); + tmp->next = g->cells[voxindex]; + tmp->obj = obj; + g->cells[voxindex] = tmp; + } + } + } + + return 1; +} + +static int pos2grid(grid * g, vector * pos, gridindex * index) { + index->x = (int) ((pos->x - g->min.x) / g->voxsize.x); + index->y = (int) ((pos->y - g->min.y) / g->voxsize.y); + index->z = (int) ((pos->z - g->min.z) / g->voxsize.z); + + if (index->x == g->xsize) + index->x--; + if (index->y == g->ysize) + index->y--; + if (index->z == g->zsize) + index->z--; + + if (index->x < 0 || index->x > g->xsize || + index->y < 0 || index->y > g->ysize || + index->z < 0 || index->z > g->zsize) + return 0; + + if (pos->x < g->min.x || pos->x > g->max.x || + pos->y < g->min.y || pos->y > g->max.y || + pos->z < g->min.z || pos->z > g->max.z) + return 0; + + return 1; +} + + +/* the real thing */ +static void grid_intersect(grid * g, ray * ry) { + flt tnear, tfar, offset; + vector curpos, tmax, tdelta, pdeltaX, pdeltaY, pdeltaZ, nXp, nYp, nZp; + gridindex curvox, step, out; + int voxindex; + objectlist * cur; + + if (ry->flags & RT_RAY_FINISHED) + return; + + if (!grid_bounds_intersect(g, ry, &tnear, &tfar)) + return; + + if (ry->maxdist < tnear) + return; + + curpos = Raypnt(ry, tnear); + pos2grid(g, &curpos, &curvox); + offset = tnear; + + /* Setup X iterator stuff */ + if (fabs(ry->d.x) < EPSILON) { + tmax.x = FHUGE; + tdelta.x = 0.0; + step.x = 0; + out.x = 0; /* never goes out of bounds on this axis */ + } + else if (ry->d.x < 0.0) { + tmax.x = offset + ((voxel2x(g, curvox.x) - curpos.x) / ry->d.x); + tdelta.x = g->voxsize.x / - ry->d.x; + step.x = out.x = -1; + } + else { + tmax.x = offset + ((voxel2x(g, curvox.x + 1) - curpos.x) / ry->d.x); + tdelta.x = g->voxsize.x / ry->d.x; + step.x = 1; + out.x = g->xsize; + } + + /* Setup Y iterator stuff */ + if (fabs(ry->d.y) < EPSILON) { + tmax.y = FHUGE; + tdelta.y = 0.0; + step.y = 0; + out.y = 0; /* never goes out of bounds on this axis */ + } + else if (ry->d.y < 0.0) { + tmax.y = offset + ((voxel2y(g, curvox.y) - curpos.y) / ry->d.y); + tdelta.y = g->voxsize.y / - ry->d.y; + step.y = out.y = -1; + } + else { + tmax.y = offset + ((voxel2y(g, curvox.y + 1) - curpos.y) / ry->d.y); + tdelta.y = g->voxsize.y / ry->d.y; + step.y = 1; + out.y = g->ysize; + } + + /* Setup Z iterator stuff */ + if (fabs(ry->d.z) < EPSILON) { + tmax.z = FHUGE; + tdelta.z = 0.0; + step.z = 0; + out.z = 0; /* never goes out of bounds on this axis */ + } + else if (ry->d.z < 0.0) { + tmax.z = offset + ((voxel2z(g, curvox.z) - curpos.z) / ry->d.z); + tdelta.z = g->voxsize.z / - ry->d.z; + step.z = out.z = -1; + } + else { + tmax.z = offset + ((voxel2z(g, curvox.z + 1) - curpos.z) / ry->d.z); + tdelta.z = g->voxsize.z / ry->d.z; + step.z = 1; + out.z = g->zsize; + } + + pdeltaX = ry->d; + VScale(&pdeltaX, tdelta.x); + pdeltaY = ry->d; + VScale(&pdeltaY, tdelta.y); + pdeltaZ = ry->d; + VScale(&pdeltaZ, tdelta.z); + + nXp = Raypnt(ry, tmax.x); + nYp = Raypnt(ry, tmax.y); + nZp = Raypnt(ry, tmax.z); + + voxindex = curvox.z*g->xsize*g->ysize + curvox.y*g->xsize + curvox.x; + while (1) { + if (tmax.x < tmax.y && tmax.x < tmax.z) { + cur = g->cells[voxindex]; + while (cur != NULL) { + if (ry->mbox[cur->obj->id] != ry->serial) { + ry->mbox[cur->obj->id] = ry->serial; + cur->obj->methods->intersect(cur->obj, ry); + } + cur = cur->next; + } + curvox.x += step.x; + if (ry->maxdist < tmax.x || curvox.x == out.x) + break; + voxindex += step.x; + tmax.x += tdelta.x; + curpos = nXp; + nXp.x += pdeltaX.x; + nXp.y += pdeltaX.y; + nXp.z += pdeltaX.z; + } + else if (tmax.z < tmax.y) { + cur = g->cells[voxindex]; + while (cur != NULL) { + if (ry->mbox[cur->obj->id] != ry->serial) { + ry->mbox[cur->obj->id] = ry->serial; + cur->obj->methods->intersect(cur->obj, ry); + } + cur = cur->next; + } + curvox.z += step.z; + if (ry->maxdist < tmax.z || curvox.z == out.z) + break; + voxindex += step.z*g->xsize*g->ysize; + tmax.z += tdelta.z; + curpos = nZp; + nZp.x += pdeltaZ.x; + nZp.y += pdeltaZ.y; + nZp.z += pdeltaZ.z; + } + else { + cur = g->cells[voxindex]; + while (cur != NULL) { + if (ry->mbox[cur->obj->id] != ry->serial) { + ry->mbox[cur->obj->id] = ry->serial; + cur->obj->methods->intersect(cur->obj, ry); + } + cur = cur->next; + } + curvox.y += step.y; + if (ry->maxdist < tmax.y || curvox.y == out.y) + break; + voxindex += step.y*g->xsize; + tmax.y += tdelta.y; + curpos = nYp; + nYp.x += pdeltaY.x; + nYp.y += pdeltaY.y; + nYp.z += pdeltaY.z; + } + + if (ry->flags & RT_RAY_FINISHED) + break; + } +} + +static void voxel_intersect(grid * g, ray * ry, int voxindex) { + objectlist * cur; + + cur = g->cells[voxindex]; + while (cur != NULL) { + cur->obj->methods->intersect(cur->obj, ry); + cur = cur->next; + } +} + +static int grid_bounds_intersect(grid * g, ray * ry, flt *nr, flt *fr) { + flt a, tx1, tx2, ty1, ty2, tz1, tz2; + flt tnear, tfar; + + tnear= -FHUGE; + tfar= FHUGE; + + if (ry->d.x == 0.0) { + if ((ry->o.x < g->min.x) || (ry->o.x > g->max.x)) return 0; + } + else { + tx1 = (g->min.x - ry->o.x) / ry->d.x; + tx2 = (g->max.x - ry->o.x) / ry->d.x; + if (tx1 > tx2) { a=tx1; tx1=tx2; tx2=a; } + if (tx1 > tnear) tnear=tx1; + if (tx2 < tfar) tfar=tx2; + } + if (tnear > tfar) return 0; + if (tfar < 0.0) return 0; + + if (ry->d.y == 0.0) { + if ((ry->o.y < g->min.y) || (ry->o.y > g->max.y)) return 0; + } + else { + ty1 = (g->min.y - ry->o.y) / ry->d.y; + ty2 = (g->max.y - ry->o.y) / ry->d.y; + if (ty1 > ty2) { a=ty1; ty1=ty2; ty2=a; } + if (ty1 > tnear) tnear=ty1; + if (ty2 < tfar) tfar=ty2; + } + if (tnear > tfar) return 0; + if (tfar < 0.0) return 0; + + if (ry->d.z == 0.0) { + if ((ry->o.z < g->min.z) || (ry->o.z > g->max.z)) return 0; + } + else { + tz1 = (g->min.z - ry->o.z) / ry->d.z; + tz2 = (g->max.z - ry->o.z) / ry->d.z; + if (tz1 > tz2) { a=tz1; tz1=tz2; tz2=a; } + if (tz1 > tnear) tnear=tz1; + if (tz2 < tfar) tfar=tz2; + } + if (tnear > tfar) return 0; + if (tfar < 0.0) return 0; + + *nr = tnear; + *fr = tfar; + return 1; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.h new file mode 100644 index 0000000000..6b5579fdea --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/grid.h @@ -0,0 +1,128 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * grid.h - spatial subdivision efficiency structures + * + * $Id: grid.h,v 1.2 2007-02-22 17:54:15 Exp $ + * + */ + +int engrid_scene(object ** list); +object * newgrid(int xsize, int ysize, int zsize, vector min, vector max); + +#ifdef GRID_PRIVATE + +typedef struct objectlist { + struct objectlist * next; /* next link in the list */ + object * obj; /* the actual object */ +} objectlist; + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + int xsize; /* number of cells along the X direction */ + int ysize; /* number of cells along the Y direction */ + int zsize; /* number of cells along the Z direction */ + vector min; /* the minimum coords for the box containing the grid */ + vector max; /* the maximum coords for the box containing the grid */ + vector voxsize; /* the size of a grid cell/voxel */ + object * objects; /* all objects contained in the grid */ + objectlist ** cells; /* the grid cells themselves */ +} grid; + +typedef struct { + int x; /* Voxel X address */ + int y; /* Voxel Y address */ + int z; /* Voxel Z address */ +} gridindex; + +/* + * Convert from voxel number along X/Y/Z to corresponding coordinate. + */ +#define voxel2x(g,X) ((X) * (g->voxsize.x) + (g->min.x)) +#define voxel2y(g,Y) ((Y) * (g->voxsize.y) + (g->min.y)) +#define voxel2z(g,Z) ((Z) * (g->voxsize.z) + (g->min.z)) + +/* + * And vice-versa. + */ +#define x2voxel(g,x) (((x) - g->min.x) / g->voxsize.x) +#define y2voxel(g,y) (((y) - g->min.y) / g->voxsize.y) +#define z2voxel(g,z) (((z) - g->min.z) / g->voxsize.z) + + +static int grid_bbox(void * obj, vector * min, vector * max); +static void grid_free(void * v); + +static int cellbound(grid *g, gridindex *index, vector * cmin, vector * cmax); + +void engrid_objlist(grid * g, object ** list); +static int engrid_object(grid * g, object * obj); + +static int engrid_objectlist(grid * g, objectlist ** list); +static int engrid_cell(grid *, gridindex *); + +static int pos2grid(grid * g, vector * pos, gridindex * index); +static void grid_intersect(grid *, ray *); +static void voxel_intersect(grid * g, ray * ry, int voxaddr); +static int grid_bounds_intersect(grid * g, ray * ry, flt *near, flt *far); + + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.cpp new file mode 100644 index 0000000000..d2e119fefa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.cpp @@ -0,0 +1,157 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * imageio.c - This file deals with reading/writing image files + * + * $Id: imageio.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +/* For our puposes, we're interested only in the 3 byte per pixel 24 bit + * truecolor sort of file.. + */ + +#include +#include "machine.h" +#include "types.h" +#include "util.h" +#include "imageio.h" +#include "ppm.h" /* PPM files */ +#include "tgafile.h" /* Truevision Targa files */ +#include "jpeg.h" /* JPEG files */ + +static +int fakeimage(char * name, int * xres, int * yres, unsigned char ** imgdata) { + int i, imgsize; + + fprintf(stderr, "Error loading image %s. Faking it.\n", name); + + *xres = 2; + *yres = 2; + imgsize = 3 * (*xres) * (*yres); + *imgdata = (unsigned char *)rt_getmem(imgsize); + for (i=0; iname; + + if (strstr(name, ".ppm")) { + rc = readppm(name, &xres, &yres, &imgdata); + } + else if (strstr(name, ".tga")) { + rc = readtga(name, &xres, &yres, &imgdata); + } + else if (strstr(name, ".jpg")) { + rc = readjpeg(name, &xres, &yres, &imgdata); + } + else if (strstr(name, ".gif")) { + rc = IMAGEUNSUP; + } + else if (strstr(name, ".png")) { + rc = IMAGEUNSUP; + } + else if (strstr(name, ".tiff")) { + rc = IMAGEUNSUP; + } + else if (strstr(name, ".rgb")) { + rc = IMAGEUNSUP; + } + else if (strstr(name, ".xpm")) { + rc = IMAGEUNSUP; + } + else { + rc = readppm(name, &xres, &yres, &imgdata); + } + + switch (rc) { + case IMAGEREADERR: + fprintf(stderr, "Short read encountered while loading image %s\n", name); + rc = IMAGENOERR; /* remap to non-fatal error */ + break; + + case IMAGEUNSUP: + fprintf(stderr, "Cannot read unsupported image format for image %s\n", name); + break; + } + + /* If the image load failed, create a tiny white colored image to fake it */ + /* this allows a scene to render even when a file can't be loaded */ + if (rc != IMAGENOERR) { + rc = fakeimage(name, &xres, &yres, &imgdata); + } + + /* If we succeeded in loading the image, return it. */ + if (rc == IMAGENOERR) { + img->xres = xres; + img->yres = yres; + img->bpp = 3; + img->data = imgdata; + } + + return rc; +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.h new file mode 100644 index 0000000000..e7b6921e35 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imageio.h @@ -0,0 +1,73 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * imageio.h - This file deals with reading/writing image files + * + * $Id: imageio.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +/* For our puposes, we're interested only in the 3 byte per pixel 24 bit + truecolor sort of file.. */ + +#define IMAGENOERR 0 /* no error */ +#define IMAGEBADFILE 1 /* can't find or can't open the file */ +#define IMAGEUNSUP 2 /* the image file is an unsupported format */ +#define IMAGEALLOCERR 3 /* not enough remaining memory to load this image */ +#define IMAGEREADERR 4 /* failed read, short reads etc */ + +int readimage(rawimage *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.cpp new file mode 100644 index 0000000000..685e9d0b68 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.cpp @@ -0,0 +1,177 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * imap.c - This file contains code for doing image map type things. + * + * $Id: imap.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "imap.h" +#include "util.h" +#include "imageio.h" + +rawimage * imagelist[MAXIMGS]; +int numimages; + +void ResetImages(void) { + int i; + numimages=0; + for (i=0; iloaded) { + readimage(image); + image->loaded=1; + } +} + +color ImageMap(rawimage * image, flt u, flt v) { + color col, colx, colx2; + flt x,y, px, py; + int x1, x2, y1, y2; + unsigned char * ptr; + unsigned char * ptr2; + + if (!image->loaded) { + LoadImage(image); + image->loaded=1; + } + + if ((u <= 1.0) && (u >=0.0) && (v <= 1.0) && (v >= 0.0)) { + x=(image->xres - 1.0) * u; /* floating point X location */ + y=(image->yres - 1.0) * v; /* floating point Y location */ + + px = x - ((int) x); + py = y - ((int) y); + + x1 = (int) x; + x2 = x1 + 1; + + y1 = (int) y; + y2 = y1 + 1; + + ptr = image->data + ((image->xres * y1) + x1) * 3; + ptr2 = image->data + ((image->xres * y1) + x2) * 3; + + colx.r = (flt) ((flt)ptr[0] + px*((flt)ptr2[0] - (flt) ptr[0])) / 255.0; + colx.g = (flt) ((flt)ptr[1] + px*((flt)ptr2[1] - (flt) ptr[1])) / 255.0; + colx.b = (flt) ((flt)ptr[2] + px*((flt)ptr2[2] - (flt) ptr[2])) / 255.0; + + ptr = image->data + ((image->xres * y2) + x1) * 3; + ptr2 = image->data + ((image->xres * y2) + x2) * 3; + + colx2.r = ((flt)ptr[0] + px*((flt)ptr2[0] - (flt)ptr[0])) / 255.0; + colx2.g = ((flt)ptr[1] + px*((flt)ptr2[1] - (flt)ptr[1])) / 255.0; + colx2.b = ((flt)ptr[2] + px*((flt)ptr2[2] - (flt)ptr[2])) / 255.0; + + col.r = colx.r + py*(colx2.r - colx.r); + col.g = colx.g + py*(colx2.g - colx.g); + col.b = colx.b + py*(colx2.b - colx.b); + + } + else { + col.r=0.0; + col.g=0.0; + col.b=0.0; + } + return col; +} + +rawimage * AllocateImage(char * filename) { + rawimage * newimage = NULL; + int i, len, intable; + + intable=0; + if (numimages!=0) { + for (i=0; iname)) { + newimage=imagelist[i]; + intable=1; + } + } + } + + if (!intable) { + newimage=(rawimage *)rt_getmem(sizeof(rawimage)); + newimage->loaded=0; + newimage->xres=0; + newimage->yres=0; + newimage->bpp=0; + newimage->data=NULL; + len=strlen(filename); + if (len > 80) rtbomb("Filename too long in image map!!"); + strcpy(newimage->name, filename); + + imagelist[numimages]=newimage; /* add new one to the table */ + numimages++; /* increment the number of images */ + } + + return newimage; +} + +void DeallocateImage(rawimage * image) { + image->loaded=0; + rt_freemem(image->data); +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.h new file mode 100644 index 0000000000..4994a50982 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/imap.h @@ -0,0 +1,69 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * imap.h - This file contains defines etc for doing image map type things. + * + * $Id: imap.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +void ResetImage(void); +void LoadImage(rawimage *); +color ImageMap(rawimage *, flt, flt); +rawimage * AllocateImage(char *); +void DeallocateImage(rawimage *); +void ResetImages(void); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.cpp new file mode 100644 index 0000000000..11e8048582 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.cpp @@ -0,0 +1,187 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * intersect.c - This file contains code for CSG and intersection routines. + * + * $Id: intersect.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "intersect.h" +#include "light.h" +#include "util.h" +#include "global.h" + +unsigned int new_objectid(void) { + return numobjects++; /* global used to generate unique object ID's */ +} + +unsigned int max_objectid(void) { + return numobjects; +} + +void add_object(object * obj) { + object * objtemp; + + if (obj == NULL) + return; + + obj->id = new_objectid(); + + objtemp = rootobj; + rootobj = obj; + obj->nextobj = objtemp; +} + +void free_objects(object * start) { + object * cur; + object * cur2; + + cur=start; + while (cur->nextobj != NULL) { + cur2=(object *)cur->nextobj; + cur->methods->free(cur); + cur=cur2; + } + free(cur); + +} + +void reset_object(void) { + if (rootobj != NULL) + free_objects(rootobj); + + rootobj = NULL; + numobjects = 0; /* set number of objects back to 0 */ +} + +void intersect_objects(ray * intray) { + object * cur; + object temp; + + temp.nextobj = rootobj; /* setup the initial object pointers.. */ + cur = &temp; /* ready, set */ + + while ((cur=(object *)cur->nextobj) != NULL) + cur->methods->intersect(cur, intray); +} + +void reset_intersection(intersectstruct * intstruct) { + intstruct->num = 0; + intstruct->list[0].t = FHUGE; + intstruct->list[0].obj = NULL; + intstruct->list[1].t = FHUGE; + intstruct->list[1].obj = NULL; +} + +void add_intersection(flt t, object * obj, ray * ry) { + intersectstruct * intstruct = ry->intstruct; + + if (t > EPSILON) { + + /* if we hit something before maxdist update maxdist */ + if (t < ry->maxdist) { + ry->maxdist = t; + + /* if we hit *anything* before maxdist, and we're firing a */ + /* shadow ray, then we are finished ray tracing the shadow */ + if (ry->flags & RT_RAY_SHADOW) + ry->flags |= RT_RAY_FINISHED; + } + + intstruct->num++; + intstruct->list[intstruct->num].obj = obj; + intstruct->list[intstruct->num].t = t; + } +} + + +int closest_intersection(flt * t, object ** obj, intersectstruct * intstruct) { + int i; + *t=FHUGE; + + for (i=1; i<=intstruct->num; i++) { + if (intstruct->list[i].t < *t) { + *t=intstruct->list[i].t; + *obj=intstruct->list[i].obj; + } + } + + return intstruct->num; +} + +int shadow_intersection(intersectstruct * intstruct, flt maxdist) { + int i; + + if (intstruct->num > 0) { + for (i=1; i<=intstruct->num; i++) { + if ((intstruct->list[i].t < maxdist) && + (intstruct->list[i].obj->tex->shadowcast == 1)) { + return 1; + } + } + } + + return 0; +} + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.h new file mode 100644 index 0000000000..fc3ccfffe8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/intersect.h @@ -0,0 +1,75 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * intersect.h - This file contains the declarations and defines for the + * functions that manage intersection, bounding and CSG.. + * + * $Id: intersect.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +unsigned int new_objectid(void); +unsigned int max_objectid(void); +void add_object(object *); +void reset_object(void); +void free_objects(object *); +void intersect_objects(ray *); +void reset_intersection(intersectstruct *); +void add_intersection(flt, object *, ray *); +int closest_intersection(flt *, object **, intersectstruct *); +int next_intersection(object **, object *, intersectstruct *); +int shadow_intersection(intersectstruct * intstruct, flt maxdist); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.cpp new file mode 100644 index 0000000000..f9a8a09d66 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.cpp @@ -0,0 +1,139 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * jpeg.c - This file deals with JPEG format image files (reading/writing) + * + * $Id: jpeg.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +/* + * This code requires support from the Independent JPEG Group's libjpeg. + * For our puposes, we're interested only in the 3 byte per pixel 24 bit + * RGB output. Probably won't implement any decent checking at this point. + */ + +#include +#include "machine.h" +#include "types.h" +#include "util.h" +#include "imageio.h" /* error codes etc */ +#include "jpeg.h" /* the protos for this file */ + +#if !defined(USEJPEG) + +int readjpeg(char * name, int * xres, int * yres, unsigned char **imgdata) { + return IMAGEUNSUP; +} + +#else + +#include "jpeglib.h" /* the IJG jpeg library headers */ + +int readjpeg(char * name, int * xres, int * yres, unsigned char **imgdata) { + FILE * ifp; + struct jpeg_decompress_struct cinfo; /* JPEG decompression struct */ + struct jpeg_error_mgr jerr; /* JPEG Error handler */ + JSAMPROW row_pointer[1]; /* output row buffer */ + int row_stride; /* physical row width in output buf */ + + /* open input file before doing any JPEG decompression setup */ + if ((ifp = fopen(name, "rb")) == NULL) + return IMAGEBADFILE; /* Could not open image, return error */ + + /* + * Note: The Independent JPEG Group's library does not have a way + * of returning errors without the use of setjmp/longjmp. + * This is a problem in multi-threaded environment, since setjmp + * and longjmp are declared thread-unsafe by many vendors currently. + * For now, JPEG decompression errors will result in the "default" + * error handling provided by the JPEG library, which is an error + * message and a fatal call to exit(). I'll have to work around this + * or find a reasonably thread-safe way of doing setjmp/longjmp.. + */ + + cinfo.err = jpeg_std_error(&jerr); /* Set JPEG error handler to default */ + + jpeg_create_decompress(&cinfo); /* Create decompression context */ + jpeg_stdio_src(&cinfo, ifp); /* Set input mechanism to stdio type */ + jpeg_read_header(&cinfo, TRUE); /* Read the JPEG header for info */ + jpeg_start_decompress(&cinfo); /* Prepare for actual decompression */ + + *xres = cinfo.output_width; /* set returned image width */ + *yres = cinfo.output_height; /* set returned image height */ + + /* Calculate the size of a row in the image */ + row_stride = cinfo.output_width * cinfo.output_components; + + /* Allocate the image buffer which will be returned to the ray tracer */ + *imgdata = (unsigned char *) malloc(row_stride * cinfo.output_height); + + /* decompress the JPEG, one scanline at a time into the buffer */ + while (cinfo.output_scanline < cinfo.output_height) { + row_pointer[0] = &((*imgdata)[(cinfo.output_scanline)*row_stride]); + jpeg_read_scanlines(&cinfo, row_pointer, 1); + } + + jpeg_finish_decompress(&cinfo); /* Tell the JPEG library to cleanup */ + jpeg_destroy_decompress(&cinfo); /* Destroy JPEG decompression context */ + + fclose(ifp); /* Close the input file */ + + return IMAGENOERR; /* No fatal errors */ +} + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.h new file mode 100644 index 0000000000..6463340d9e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/jpeg.h @@ -0,0 +1,64 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * jpeg.h - This file deals with JPEG format image files (reading/writing) + * + * $Id: jpeg.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +int readjpeg(char * name, int * xres, int * yres, unsigned char **imgdata); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.cpp new file mode 100644 index 0000000000..70eed51ade --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.cpp @@ -0,0 +1,138 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * light.c - This file contains declarations and defines for light sources. + * + * $Id: light.cpp,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +#define LIGHT_PRIVATE +#include "light.h" + +static object_methods light_methods = { + (void (*)(void *, void *))(light_intersect), + (void (*)(void *, void *, void *, void *))(light_normal), + light_bbox, + free +}; + +point_light * newlight(void * tex, vector ctr, flt rad) { + point_light * l; + + l=(point_light *) rt_getmem(sizeof(point_light)); + memset(l, 0, sizeof(point_light)); + l->methods = &light_methods; + + l->tex=(texture *)tex; + l->ctr=ctr; + l->rad=rad; + + return l; +} + +static int light_bbox(void * obj, vector * min, vector * max) { + return 0; /* lights are unbounded currently */ +} + +static void light_intersect(point_light * l, ray * ry) { + flt b, disc, t1, t2, temp; + vector V; + + /* Lights do not cast shadows.. */ + if (ry->flags & RT_RAY_SHADOW) + return; + + VSUB(l->ctr, ry->o, V); + VDOT(b, V, ry->d); + VDOT(temp, V, V); + + disc=b*b + l->rad*l->rad - temp; + + if (disc<=0.0) return; + disc=sqrt(disc); + + t2=b+disc; + if (t2 <= SPEPSILON) + return; + add_intersection(t2, (object *) l, ry); + + t1=b-disc; + if (t1 > SPEPSILON) + add_intersection(t1, (object *) l, ry); +} + +static void light_normal(point_light * l, vector * pnt, ray * incident, vector * N) { + VSub((vector *) pnt, &(l->ctr), N); + + VNorm(N); + + if (VDot(N, &(incident->d)) > 0.0) { + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.h new file mode 100644 index 0000000000..9515ad9af6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/light.h @@ -0,0 +1,79 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * light.h - this file includes declarations and defines for light sources. + * + * $Id: light.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector ctr; + flt rad; +} point_light; + +point_light * newlight(void *, vector, flt); + +#ifdef LIGHT_PRIVATE +static int light_bbox(void * obj, vector * min, vector * max); +static void light_intersect(point_light *, ray *); +static void light_normal(point_light *, vector *, ray *, vector *); +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/machine.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/machine.h new file mode 100644 index 0000000000..764a7ce695 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/machine.h @@ -0,0 +1,74 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * machine.h - This is the machine specific include file + * + * $Id: machine.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +#define STDTIME diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/macros.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/macros.h new file mode 100644 index 0000000000..0d0e27e00e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/macros.h @@ -0,0 +1,87 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * macros.h - This file contains macro versions of functions that would be best + * used as inlined code rather than function calls. + * + * $Id: macros.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +#define MYMAX(a , b) ((a) > (b) ? (a) : (b)) +#define MYMIN(a , b) ((a) < (b) ? (a) : (b)) + +#define VDOT(return, a, b) \ + return=(a.x * b.x + a.y * b.y + a.z * b.z); \ + +#define RAYPNT(c, a, b) \ +c.x = a.o.x + ( a.d.x * b ); \ +c.y = a.o.y + ( a.d.y * b ); \ +c.z = a.o.z + ( a.d.z * b ); \ + + +#define VSUB(a, b, c) \ +c.x = (a.x - b.x); \ +c.y = (a.y - b.y); \ +c.z = (a.z - b.z); \ + + +#define VCROSS(a, b, c) \ + c->x = (a->y * b->z) - (a->z * b->y); \ + c->y = (a->z * b->x) - (a->x * b->z); \ + c->z = (a->x * b->y) - (a->y * b->x); \ + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/main.cpp new file mode 100644 index 0000000000..178cba05a5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/main.cpp @@ -0,0 +1,257 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#include +#include +#include + +#define VIDEO_WINMAIN_ARGS +#include "types.h" +#include "api.h" /* The ray tracing library API */ +#include "parse.h" /* Support for my own file format */ +#include "ui.h" +#include "util.h" +#include "tachyon_video.h" +#include "../../../common/utility/utility.h" + +SceneHandle global_scene; +int global_xsize; /* size of graphic image rendered in window (from hres, vres) */ +int global_ysize; +int global_xwinsize; /* size of window (may be larger than above) */ +int global_ywinsize; +char *global_window_title; +bool global_usegraphics; + +bool silent_mode = false; /* silent mode */ + +class tachyon_video *video = 0; + +typedef struct { + int foundfilename; /* was a model file name found in the args? */ + char filename[1024]; /* model file to render */ + int useoutfilename; /* command line override of output filename */ + char outfilename[1024]; /* name of output image file */ + int verbosemode; /* verbose flags */ + int antialiasing; /* antialiasing setting */ + int displaymode; /* display mode */ + int boundmode; /* bounding mode */ + int boundthresh; /* bounding threshold */ + int usecamfile; /* use camera file */ + char camfilename[1024]; /* camera filename */ +} argoptions; + +static char *window_title_string (int argc, const char **argv) +{ + int i; + char *name; + + name = (char *) malloc (8192); + char *title = getenv ("TITLE"); + if( title ) strcpy( name, title ); + else { + if(strrchr(argv[0], '\\')) strcpy (name, strrchr(argv[0], '\\')+1); + else if(strrchr(argv[0], '/')) strcpy (name, strrchr(argv[0], '/')+1); + else strcpy (name, *argv[0]?argv[0]:"Tachyon"); + } + for (i = 1; i < argc; i++) { + strcat (name, " "); + strcat (name, argv[i]); + } +#ifdef _DEBUG + strcat (name, " (DEBUG BUILD)"); +#endif + return name; +} + +void initoptions(argoptions * opt) { + memset(opt, 0, sizeof(argoptions)); + opt->foundfilename = -1; + opt->useoutfilename = -1; + opt->verbosemode = -1; + opt->antialiasing = -1; + opt->displaymode = -1; + opt->boundmode = -1; + opt->boundthresh = -1; + opt->usecamfile = -1; +} + +int useoptions(argoptions * opt, SceneHandle scene) { + if (opt->useoutfilename == 1) { + rt_outputfile(scene, opt->outfilename); + } + + if (opt->verbosemode == 1) { + rt_verbose(scene, 1); + } + + if (opt->antialiasing != -1) { + /* need new api code for this */ + } + + if (opt->displaymode != -1) { + rt_displaymode(scene, opt->displaymode); + } + + if (opt->boundmode != -1) { + rt_boundmode(scene, opt->boundmode); + } + + if (opt->boundthresh != -1) { + rt_boundthresh(scene, opt->boundthresh); + } + + return 0; +} + +argoptions ParseCommandLine(int argc, const char *argv[]) { + argoptions opt; + + initoptions(&opt); + + bool nobounding = false; + bool nodisp = false; + + string filename; + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + .positional_arg(filename,"dataset", "Model file") + .positional_arg(opt.boundthresh,"boundthresh","bounding threshold value") + .arg(nodisp,"no-display-updating","disable run-time display updating") + .arg(nobounding,"no-bounding","disable bounding technique") + .arg(silent_mode,"silent","no output except elapsed time") + ); + + strcpy(opt.filename, filename.c_str()); + + opt.displaymode = nodisp ? RT_DISPLAY_DISABLED : RT_DISPLAY_ENABLED; + opt.boundmode = nobounding ? RT_BOUNDING_DISABLED : RT_BOUNDING_ENABLED; + + return opt; +} + +int CreateScene(argoptions &opt) { + char *filename; + + global_scene = rt_newscene(); + rt_initialize(); + + /* process command line overrides */ + useoptions(&opt, global_scene); + +#ifdef DEFAULT_MODELFILE +#if _WIN32||_WIN64 +#define _GLUE_FILENAME(x) "..\\dat\\" #x +#else +#define _GLUE_FILENAME(x) #x +#endif +#define GLUE_FILENAME(x) _GLUE_FILENAME(x) + if(opt.foundfilename == -1) + filename = GLUE_FILENAME(DEFAULT_MODELFILE); + else +#endif//DEFAULT_MODELFILE + filename = opt.filename; + + if ( readmodel(filename, global_scene) != 0 ) { + fprintf(stderr, "Parser returned a non-zero error code reading %s\n", filename); + fprintf(stderr, "Aborting Render...\n"); + rt_finalize(); + return -1; + } + + // need these early for create_graphics_window() so grab these here... + scenedef *scene = (scenedef *) global_scene; + global_xsize = scene->hres; + global_ysize = scene->vres; + global_xwinsize = global_xsize; + global_ywinsize = global_ysize; // add some here to leave extra blank space on bottom for status etc. + + return 0; +} + +int main (int argc, char *argv[]) { + try { + timer mainStartTime = gettimer(); + + global_window_title = window_title_string (argc, (const char**)argv); + + argoptions opt = ParseCommandLine(argc, (const char**)argv); + + if ( CreateScene(opt) != 0 ) + return -1; + + tachyon_video tachyon; + tachyon.threaded = true; + tachyon.init_console(); + + tachyon.title = global_window_title; + // always using window even if(!global_usegraphics) + global_usegraphics = + tachyon.init_window(global_xwinsize, global_ywinsize); + if(!tachyon.running) + return -1; + + video = &tachyon; + tachyon.main_loop(); + + utility::report_elapsed_time(timertime(mainStartTime, gettimer())); + return 0; + } catch ( std::exception& e ) { + std::cerr<<"error occurred. error text is :\"" <x = FHUGE; gmin->y = FHUGE; gmin->z = FHUGE; + gmax->x = -FHUGE; gmax->y = -FHUGE; gmax->z = -FHUGE; + + cur=*rootlist; + while (cur != NULL) { /* Go! */ + min.x = -FHUGE; min.y = -FHUGE; min.z = -FHUGE; + max.x = FHUGE; max.y = FHUGE; max.z = FHUGE; + + cur->methods->bbox((void *) cur, &min, &max); + + gmin->x = MYMIN( gmin->x , min.x); + gmin->y = MYMIN( gmin->y , min.y); + gmin->z = MYMIN( gmin->z , min.z); + + gmax->x = MYMAX( gmax->x , max.x); + gmax->y = MYMAX( gmax->y , max.y); + gmax->z = MYMAX( gmax->z , max.z); + + cur=(object *)cur->nextobj; + } +} + +static int objinside(object * obj, vector * min, vector * max) { + vector omin, omax; + + if (obj == NULL) /* non-existant object, shouldn't get here */ + return 0; + + if (obj->methods->bbox((void *) obj, &omin, &omax)) { + if ((min->x <= omin.x) && (min->y <= omin.y) && (min->z <= omin.z) && + (max->x >= omax.x) && (max->y >= omax.y) && (max->z >= omax.z)) { + return 1; + } + } + return 0; +} + +static int countobj(object * root) { + object * cur; /* counts the number of objects on a list */ + int numobj; + + numobj=0; + cur=root; + + while (cur != NULL) { + cur=(object *)cur->nextobj; + numobj++; + } + return numobj; +} + +static void movenextobj(object * thisobj, object ** root) { + object * cur, * tmp; + + /* move the object after thisobj to the front of the object list */ + /* headed by root */ + if (thisobj != NULL) { + if (thisobj->nextobj != NULL) { + cur=(object *)thisobj->nextobj; /* the object to be moved */ + thisobj->nextobj = cur->nextobj; /* link around the moved obj */ + tmp=*root; /* store the root node */ + cur->nextobj=tmp; /* attach root to cur */ + *root=cur; /* make cur, the new root */ + } + } +} + +static void octreespace(object ** rootlist, int maxoctnodes) { + object * cur; + vector gmin, gmax, gctr; + vector cmin1, cmin2, cmin3, cmin4, cmin5, cmin6, cmin7, cmin8; + vector cmax1, cmax2, cmax3, cmax4, cmax5, cmax6, cmax7, cmax8; + bndbox * box1, * box2, * box3, * box4; + bndbox * box5, * box6, * box7, * box8; + int skipobj; + + if (*rootlist == NULL) /* don't subdivide non-existant data */ + return; + + skipobj=0; + globalbound(rootlist, &gmin, &gmax); /* find global min and max */ + + gctr.x = ((gmax.x - gmin.x) / 2.0) + gmin.x; + gctr.y = ((gmax.y - gmin.y) / 2.0) + gmin.y; + gctr.z = ((gmax.z - gmin.z) / 2.0) + gmin.z; + + cmin1=gmin; + cmax1=gctr; + box1 = newbndbox(cmin1, cmax1); + + cmin2=gmin; + cmin2.x=gctr.x; + cmax2=gmax; + cmax2.y=gctr.y; + cmax2.z=gctr.z; + box2 = newbndbox(cmin2, cmax2); + + cmin3=gmin; + cmin3.y=gctr.y; + cmax3=gmax; + cmax3.x=gctr.x; + cmax3.z=gctr.z; + box3 = newbndbox(cmin3, cmax3); + + cmin4=gmin; + cmin4.x=gctr.x; + cmin4.y=gctr.y; + cmax4=gmax; + cmax4.z=gctr.z; + box4 = newbndbox(cmin4, cmax4); + + cmin5=gmin; + cmin5.z=gctr.z; + cmax5=gctr; + cmax5.z=gmax.z; + box5 = newbndbox(cmin5, cmax5); + + cmin6=gctr; + cmin6.y=gmin.y; + cmax6=gmax; + cmax6.y=gctr.y; + box6 = newbndbox(cmin6, cmax6); + + cmin7=gctr; + cmin7.x=gmin.x; + cmax7=gctr; + cmax7.y=gmax.y; + cmax7.z=gmax.z; + box7 = newbndbox(cmin7, cmax7); + + cmin8=gctr; + cmax8=gmax; + box8 = newbndbox(cmin8, cmax8); + + cur = *rootlist; + while (cur != NULL) { + if (objinside((object *)cur->nextobj, &cmin1, &cmax1)) { + movenextobj(cur, &box1->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin2, &cmax2)) { + movenextobj(cur, &box2->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin3, &cmax3)) { + movenextobj(cur, &box3->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin4, &cmax4)) { + movenextobj(cur, &box4->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin5, &cmax5)) { + movenextobj(cur, &box5->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin6, &cmax6)) { + movenextobj(cur, &box6->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin7, &cmax7)) { + movenextobj(cur, &box7->objlist); + } + else if (objinside((object *)cur->nextobj, &cmin8, &cmax8)) { + movenextobj(cur, &box8->objlist); + } + else { + skipobj++; + cur=(object *)cur->nextobj; + } + } + +/* new scope, for redefinition of cur, and old */ + { bndbox * cur, * old; + old=box1; + cur=box2; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box3; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box4; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box5; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box6; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box7; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + cur=box8; + if (countobj(cur->objlist) > 0) { + old->nextobj=cur; + globalbound(&cur->objlist, &cur->min, &cur->max); + old=cur; + } + + old->nextobj=*rootlist; + + if (countobj(box1->objlist) > 0) { + globalbound(&box1->objlist, &box1->min, &box1->max); + *rootlist=(object *) box1; + } + else { + *rootlist=(object *) box1->nextobj; + } + + } /**** end of special cur and old scope */ + + if (countobj(box1->objlist) > maxoctnodes) { + octreespace(&box1->objlist, maxoctnodes); + } + if (countobj(box2->objlist) > maxoctnodes) { + octreespace(&box2->objlist, maxoctnodes); + } + if (countobj(box3->objlist) > maxoctnodes) { + octreespace(&box3->objlist, maxoctnodes); + } + if (countobj(box4->objlist) > maxoctnodes) { + octreespace(&box4->objlist, maxoctnodes); + } + if (countobj(box5->objlist) > maxoctnodes) { + octreespace(&box5->objlist, maxoctnodes); + } + if (countobj(box6->objlist) > maxoctnodes) { + octreespace(&box6->objlist, maxoctnodes); + } + if (countobj(box7->objlist) > maxoctnodes) { + octreespace(&box7->objlist, maxoctnodes); + } + if (countobj(box8->objlist) > maxoctnodes) { + octreespace(&box8->objlist, maxoctnodes); + } +} + +void dividespace(int maxoctnodes, object **toplist) { + bndbox * gbox; + vector gmin, gmax; + + if (countobj(*toplist) > maxoctnodes) { + globalbound(toplist, &gmin, &gmax); + + octreespace(toplist, maxoctnodes); + + gbox = newbndbox(gmin, gmax); + gbox->objlist = NULL; + gbox->tex = NULL; + gbox->nextobj=NULL; + gbox->objlist=*toplist; + *toplist=(object *) gbox; + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/objbound.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/objbound.h new file mode 100644 index 0000000000..fba07424ec --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/objbound.h @@ -0,0 +1,74 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * objbound.h - defines for object bounding code. + * + * $Id: objbound.h,v 1.2 2007-02-22 17:54:15 Exp $ + */ + +void dividespace(int, object **); + +#ifdef OBJBOUND_PRIVATE + +static void globalbound(object **, vector *, vector *); +static int objinside(object * obj, vector * min, vector * max); +static int countobj(object *); +static void movenextobj(object *, object **); +static void octreespace(object **, int); + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/parse.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/parse.cpp new file mode 100644 index 0000000000..fb90f04337 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/parse.cpp @@ -0,0 +1,871 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * parse.c - an UltraLame (tm) parser for simple data files... + * + * $Id: parse.cpp,v 1.3 2007-02-22 17:54:15 Exp $ + */ + +// Try preventing lots of GCC warnings about ignored results of fscanf etc. +#if !__INTEL_COMPILER + +#if __GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<5 +// For older versions of GCC, disable use of __wur in GLIBC +#undef _FORTIFY_SOURCE +#define _FORTIFY_SOURCE 0 +#else +// Starting from 4.5, GCC has a suppression option +#pragma GCC diagnostic ignored "-Wunused-result" +#endif + +#endif //__INTEL_COMPILER + +#include +#include +#include +#include +#include /* needed for toupper(), macro.. */ + +#include "types.h" +#include "api.h" /* rendering API */ + +#define PARSE_INTERNAL +#include "parse.h" /* self protos */ +#undef PARSE_INTERNAL + +static texentry textable[NUMTEXS]; /* texture lookup table */ +static texentry defaulttex; /* The default texture when a lookup fails */ +static int numtextures; /* number of TEXDEF textures */ +static int numobjectsparsed; /* total number of objects parsed so far */ +static color scenebackcol; /* scene background color */ + +static int stringcmp(const char * a, const char * b) { + int i, s, l; + + s=strlen(a); + l=strlen(b); + + if (s != l) + return 1; + + for (i=0; i NUMTEXS) { + fprintf(stderr, "Parse: %d textures allocated, texture slots full!\n", numtextures); + numtextures--; /* keep writing over last texture if we've run out.. */ + return PARSEALLOCERR; + } + + return PARSENOERR; +} + +static void * find_texture(char name[TEXNAMELEN]) { + int i; + + for (i=0; ix); + tmp.y=degtorad(degvec->y); + tmp.z=degtorad(degvec->z); + *degvec=tmp; +} + +static void InitRot3d(RotMat * rot, apiflt x, apiflt y, apiflt z) { + rot->rx1=cos(y)*cos(z); + rot->rx2=sin(x)*sin(y)*cos(z) - cos(x)*sin(z); + rot->rx3=sin(x)*sin(z) + cos(x)*cos(z)*sin(y); + + rot->ry1=cos(y)*sin(z); + rot->ry2=cos(x)*cos(z) + sin(x)*sin(y)*sin(z); + rot->ry3=cos(x)*sin(y)*sin(z) - sin(x)*cos(z); + + rot->rz1=sin(y); + rot->rz2=sin(x)*cos(y); + rot->rz3=cos(x)*cos(y); +} + +static void Rotate3d(RotMat * rot, vector * vec) { + vector tmp; + tmp.x=(vec->x*(rot->rx1) + vec->y*(rot->rx2) + vec->z*(rot->rx3)); + tmp.y=(vec->x*(rot->ry1) + vec->y*(rot->ry2) + vec->z*(rot->ry3)); + tmp.z=(vec->x*(rot->rz1) + vec->y*(rot->rz2) + vec->z*(rot->rz3)); + *vec=tmp; +} + +static void Scale3d(vector * scale, vector * vec) { + vec->x=vec->x * scale->x; + vec->y=vec->y * scale->y; + vec->z=vec->z * scale->z; +} + +static void Trans3d(vector * trans, vector * vec) { + vec->x+=trans->x; + vec->y+=trans->y; + vec->z+=trans->z; +} + +static errcode GetString(FILE * dfile, const char * string) { + char data[255]; + + fscanf(dfile,"%s",data); + if (stringcmp(data, string) != 0) { + fprintf(stderr, "parse: Expected %s, got %s \n",string, data); + fprintf(stderr, "parse: Error while parsing object: %d \n",numobjectsparsed); + return PARSEBADSYNTAX; + } + + return PARSENOERR; +} + +unsigned int readmodel(char * modelfile, SceneHandle scene) { + FILE * dfile; + errcode rc; + + reset_tex_table(); + dfile=NULL; + + dfile=fopen(modelfile,"r"); + if (dfile==NULL) { + return PARSEBADFILE; + } + + rc = GetScenedefs(dfile, scene); + if (rc != PARSENOERR) + return rc; + + scenebackcol.r = 0.0; /* default background is black */ + scenebackcol.g = 0.0; + scenebackcol.b = 0.0; + + numobjectsparsed=0; + while ((rc = GetObject(dfile, scene)) == PARSENOERR) { + numobjectsparsed++; + } + fclose(dfile); + + if (rc == PARSEEOF) + rc = PARSENOERR; + + rt_background(scene, scenebackcol); + + return rc; +} + + +static errcode GetScenedefs(FILE * dfile, SceneHandle scene) { + vector Ccenter, Cview, Cup; + apiflt zoom, aspectratio; + int raydepth, antialiasing; + char outfilename[200]; + int xres, yres, verbose; + float a,b,c; + errcode rc = PARSENOERR; + + rc |= GetString(dfile, "BEGIN_SCENE"); + + rc |= GetString(dfile, "OUTFILE"); + fscanf(dfile, "%s", outfilename); +#ifdef _WIN32 + if (strcmp (outfilename, "/dev/null") == 0) { + strcpy (outfilename, "NUL:"); + } +#endif + + rc |= GetString(dfile, "RESOLUTION"); + fscanf(dfile, "%d %d", &xres, &yres); + + rc |= GetString(dfile, "VERBOSE"); + fscanf(dfile, "%d", &verbose); + + rt_scenesetup(scene, outfilename, xres, yres, verbose); + + rc |= GetString(dfile, "CAMERA"); + + rc |= GetString(dfile, "ZOOM"); + fscanf(dfile, "%f", &a); + zoom=a; + + rc |= GetString(dfile, "ASPECTRATIO"); + fscanf(dfile, "%f", &b); + aspectratio=b; + + rc |= GetString(dfile, "ANTIALIASING"); + fscanf(dfile, "%d", &antialiasing); + + rc |= GetString(dfile, "RAYDEPTH"); + fscanf(dfile, "%d", &raydepth); + + rc |= GetString(dfile, "CENTER"); + fscanf(dfile,"%f %f %f", &a, &b, &c); + Ccenter.x = a; + Ccenter.y = b; + Ccenter.z = c; + + rc |= GetString(dfile, "VIEWDIR"); + fscanf(dfile,"%f %f %f", &a, &b, &c); + Cview.x = a; + Cview.y = b; + Cview.z = c; + + rc |= GetString(dfile, "UPDIR"); + fscanf(dfile,"%f %f %f", &a, &b, &c); + Cup.x = a; + Cup.y = b; + Cup.z = c; + + rc |= GetString(dfile, "END_CAMERA"); + + rt_camerasetup(scene, zoom, aspectratio, antialiasing, raydepth, + Ccenter, Cview, Cup); + + + return rc; +} + +static errcode GetObject(FILE * dfile, SceneHandle scene) { + char objtype[80]; + + fscanf(dfile, "%s", objtype); + if (!stringcmp(objtype, "END_SCENE")) { + return PARSEEOF; /* end parsing */ + } + if (!stringcmp(objtype, "TEXDEF")) { + return GetTexDef(dfile); + } + if (!stringcmp(objtype, "TEXALIAS")) { + return GetTexAlias(dfile); + } + if (!stringcmp(objtype, "BACKGROUND")) { + return GetBackGnd(dfile); + } + if (!stringcmp(objtype, "CYLINDER")) { + return GetCylinder(dfile); + } + if (!stringcmp(objtype, "FCYLINDER")) { + return GetFCylinder(dfile); + } + if (!stringcmp(objtype, "POLYCYLINDER")) { + return GetPolyCylinder(dfile); + } + if (!stringcmp(objtype, "SPHERE")) { + return GetSphere(dfile); + } + if (!stringcmp(objtype, "PLANE")) { + return GetPlane(dfile); + } + if (!stringcmp(objtype, "RING")) { + return GetRing(dfile); + } + if (!stringcmp(objtype, "BOX")) { + return GetBox(dfile); + } + if (!stringcmp(objtype, "SCALARVOL")) { + return GetVol(dfile); + } + if (!stringcmp(objtype, "TRI")) { + return GetTri(dfile); + } + if (!stringcmp(objtype, "STRI")) { + return GetSTri(dfile); + } + if (!stringcmp(objtype, "LIGHT")) { + return GetLight(dfile); + } + if (!stringcmp(objtype, "SCAPE")) { + return GetLandScape(dfile); + } + if (!stringcmp(objtype, "TPOLYFILE")) { + return GetTPolyFile(dfile); + } + + fprintf(stderr, "Found bad token: %s expected an object type\n", objtype); + return PARSEBADSYNTAX; +} + +static errcode GetVector(FILE * dfile, vector * v1) { + float a, b, c; + + fscanf(dfile, "%f %f %f", &a, &b, &c); + v1->x=a; + v1->y=b; + v1->z=c; + + return PARSENOERR; +} + +static errcode GetColor(FILE * dfile, color * c1) { + float r, g, b; + int rc; + + rc = GetString(dfile, "COLOR"); + fscanf(dfile, "%f %f %f", &r, &g, &b); + c1->r=r; + c1->g=g; + c1->b=b; + + return rc; +} + +static errcode GetTexDef(FILE * dfile) { + char texname[TEXNAMELEN]; + + fscanf(dfile, "%s", texname); + add_texture(GetTexBody(dfile), texname); + + return PARSENOERR; +} + +static errcode GetTexAlias(FILE * dfile) { + char texname[TEXNAMELEN]; + char aliasname[TEXNAMELEN]; + + fscanf(dfile, "%s", texname); + fscanf(dfile, "%s", aliasname); + add_texture(find_texture(aliasname), texname); + + return PARSENOERR; +} + + +static errcode GetTexture(FILE * dfile, void ** tex) { + char tmp[255]; + errcode rc = PARSENOERR; + + fscanf(dfile, "%s", tmp); + if (!stringcmp("TEXTURE", tmp)) { + *tex = GetTexBody(dfile); + } + else + *tex = find_texture(tmp); + + return rc; +} + +void * GetTexBody(FILE * dfile) { + char tmp[255]; + float a,b,c,d, phong, phongexp, phongtype; + apitexture tex; + void * voidtex; + errcode rc; + + rc = GetString(dfile, "AMBIENT"); + fscanf(dfile, "%f", &a); + tex.ambient=a; + + rc |= GetString(dfile, "DIFFUSE"); + fscanf(dfile, "%f", &b); + tex.diffuse=b; + + rc |= GetString(dfile, "SPECULAR"); + fscanf(dfile, "%f", &c); + tex.specular=c; + + rc |= GetString(dfile, "OPACITY"); + fscanf(dfile, "%f", &d); + tex.opacity=d; + + fscanf(dfile, "%s", tmp); + if (!stringcmp("PHONG", tmp)) { + fscanf(dfile, "%s", tmp); + if (!stringcmp("METAL", tmp)) { + phongtype = RT_PHONG_METAL; + } + else if (!stringcmp("PLASTIC", tmp)) { + phongtype = RT_PHONG_PLASTIC; + } + else { + phongtype = RT_PHONG_PLASTIC; + } + + fscanf(dfile, "%f", &phong); + GetString(dfile, "PHONG_SIZE"); + fscanf(dfile, "%f", &phongexp); + fscanf(dfile, "%s", tmp); + } + else { + phong = 0.0; + phongexp = 100.0; + phongtype = RT_PHONG_PLASTIC; + } + + fscanf(dfile, "%f %f %f", &a, &b, &c); + tex.col.r = a; + tex.col.g = b; + tex.col.b = c; + + rc |= GetString(dfile, "TEXFUNC"); + fscanf(dfile, "%d", &tex.texturefunc); + if (tex.texturefunc >= 7) { /* if its an image map, we need a filename */ + fscanf(dfile, "%s", tex.imap); + } + if (tex.texturefunc != 0) { + rc |= GetString(dfile, "CENTER"); + rc |= GetVector(dfile, &tex.ctr); + rc |= GetString(dfile, "ROTATE"); + rc |= GetVector(dfile, &tex.rot); + rc |= GetString(dfile, "SCALE"); + rc |= GetVector(dfile, &tex.scale); + } + if (tex.texturefunc == 9) { + rc |= GetString(dfile, "UAXIS"); + rc |= GetVector(dfile, &tex.uaxs); + rc |= GetString(dfile, "VAXIS"); + rc |= GetVector(dfile, &tex.vaxs); + } + + voidtex = rt_texture(&tex); + rt_tex_phong(voidtex, phong, phongexp, (int) phongtype); + + return voidtex; +} + +static errcode GetLight(FILE * dfile) { + apiflt rad; + vector ctr; + apitexture tex; + float a; + errcode rc; + + memset(&tex, 0, sizeof(apitexture)); + + rc = GetString(dfile,"CENTER"); + rc |= GetVector(dfile, &ctr); + rc |= GetString(dfile,"RAD"); + fscanf(dfile,"%f",&a); /* read in radius */ + rad=a; + + rc |= GetColor(dfile, &tex.col); + + rt_light(rt_texture(&tex), ctr, rad); + + return rc; +} + +static errcode GetBackGnd(FILE * dfile) { + float r,g,b; + + fscanf(dfile, "%f %f %f", &r, &g, &b); + + scenebackcol.r=r; + scenebackcol.g=g; + scenebackcol.b=b; + + return PARSENOERR; +} + +static errcode GetCylinder(FILE * dfile) { + apiflt rad; + vector ctr, axis; + void * tex; + float a; + errcode rc; + + rc = GetString(dfile, "CENTER"); + rc |= GetVector(dfile, &ctr); + rc |= GetString(dfile, "AXIS"); + rc |= GetVector(dfile, &axis); + rc |= GetString(dfile, "RAD"); + fscanf(dfile, "%f", &a); + rad=a; + + rc |= GetTexture(dfile, &tex); + rt_cylinder(tex, ctr, axis, rad); + + return rc; +} + +static errcode GetFCylinder(FILE * dfile) { + apiflt rad; + vector ctr, axis; + vector pnt1, pnt2; + void * tex; + float a; + errcode rc; + + rc = GetString(dfile, "BASE"); + rc |= GetVector(dfile, &pnt1); + rc |= GetString(dfile, "APEX"); + rc |= GetVector(dfile, &pnt2); + + ctr=pnt1; + axis.x=pnt2.x - pnt1.x; + axis.y=pnt2.y - pnt1.y; + axis.z=pnt2.z - pnt1.z; + + rc |= GetString(dfile, "RAD"); + fscanf(dfile, "%f", &a); + rad=a; + + rc |= GetTexture(dfile, &tex); + rt_fcylinder(tex, ctr, axis, rad); + + return rc; +} + +static errcode GetPolyCylinder(FILE * dfile) { + apiflt rad; + vector * temp; + void * tex; + float a; + int numpts, i; + errcode rc; + + rc = GetString(dfile, "POINTS"); + fscanf(dfile, "%d", &numpts); + + temp = (vector *) malloc(numpts * sizeof(vector)); + + for (i=0; imethods = &plane_methods; + + p->tex = (texture *)tex; + p->norm = norm; + VNorm(&p->norm); + p->d = -VDot(&ctr, &p->norm); + + return (object *) p; +} + +static int plane_bbox(void * obj, vector * min, vector * max) { + return 0; +} + +static void plane_intersect(plane * pln, ray * ry) { + flt t,td; + + t=-(pln->d + VDot(&pln->norm, &ry->o)); + td=VDot(&pln->norm, &ry->d); + if (td != 0.0) { + t /= td; + if (t > 0.0) + add_intersection(t,(object *) pln, ry); + } +} + +static void plane_normal(plane * pln, vector * pnt, ray * incident, vector * N) { + *N=pln->norm; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/plane.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/plane.h new file mode 100644 index 0000000000..e4f8ca90aa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/plane.h @@ -0,0 +1,80 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * plane.h - This file contains the defines for planes etc. + * + * $Id: plane.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + + +object * newplane(void * tex, vector ctr, vector norm); + +#ifdef PLANE_PRIVATE +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + flt d; + vector norm; +} plane; + +static void plane_intersect(plane *, ray *); +static int plane_bbox(void * obj, vector * min, vector * max); +static void plane_normal(plane *, vector *, ray * incident, vector *); +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.cpp new file mode 100644 index 0000000000..77f307baa7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.cpp @@ -0,0 +1,138 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ppm.c - This file deals with PPM format image files (reading/writing) + * + * $Id: ppm.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +/* For our puposes, we're interested only in the 3 byte per pixel 24 bit + truecolor sort of file.. Probably won't implement any decent checking + at this point, probably choke on things like the # comments.. */ + +// Try preventing lots of GCC warnings about ignored results of fscanf etc. +#if !__INTEL_COMPILER + +#if __GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<5 +// For older versions of GCC, disable use of __wur in GLIBC +#undef _FORTIFY_SOURCE +#define _FORTIFY_SOURCE 0 +#else +// Starting from 4.5, GCC has a suppression option +#pragma GCC diagnostic ignored "-Wunused-result" +#endif + +#endif //__INTEL_COMPILER + +#include +#include "machine.h" +#include "types.h" +#include "util.h" +#include "imageio.h" /* error codes etc */ +#include "ppm.h" + +static int getint(FILE * dfile) { + char ch[200]; + int i; + int num; + + num=0; + while (num==0) { + fscanf(dfile, "%s", ch); + while (ch[0]=='#') { + fgets(ch, 200, dfile); + } + num=sscanf(ch, "%d", &i); + } + return i; +} + +int readppm(char * name, int * xres, int * yres, unsigned char **imgdata) { + char data[200]; + FILE * ifp; + int i, bytesread; + int datasize; + + ifp=fopen(name, "r"); + if (ifp==NULL) { + return IMAGEBADFILE; /* couldn't open the file */ + } + fscanf(ifp, "%s", data); + + if (strcmp(data, "P6")) { + fclose(ifp); + return IMAGEUNSUP; /* not a format we support */ + } + + *xres=getint(ifp); + *yres=getint(ifp); + i=getint(ifp); /* eat the maxval number */ + fread(&i, 1, 1, ifp); /* eat the newline */ + datasize = 3 * (*xres) * (*yres); + + *imgdata=(unsigned char *)rt_getmem(datasize); + + bytesread=fread(*imgdata, 1, datasize, ifp); + + fclose(ifp); + + if (bytesread != datasize) + return IMAGEREADERR; + + return IMAGENOERR; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.h new file mode 100644 index 0000000000..8f2d8f9c28 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ppm.h @@ -0,0 +1,68 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ppm.h - This file deals with PPM format image files (reading/writing) + * + * $Id: ppm.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +/* For our puposes, we're interested only in the 3 byte per pixel 24 bit + truecolor sort of file.. Probably won't implement any decent checking + at this point, probably choke on things like the # comments.. */ + +int readppm(char * name, int * xres, int * yres, unsigned char **imgdata); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.cpp new file mode 100644 index 0000000000..93e7908865 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.cpp @@ -0,0 +1,164 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#ifdef EMULATE_PTHREADS + +#include +#include "pthread.h" + +/* + Basics +*/ + +int +pthread_create (pthread_t *thread, pthread_attr_t *attr, void *(*start_routine) (void *), void *arg) +{ + pthread_t th; + + if (thread == NULL) return EINVAL; + *thread = NULL; + + if (start_routine == NULL) return EINVAL; + + th = (pthread_t) malloc (sizeof (pthread_s)); + memset (th, 0, sizeof (pthread_s)); + + th->winthread_handle = CreateThread ( + NULL, + 0, + (LPTHREAD_START_ROUTINE) start_routine, + arg, + 0, + &th->winthread_id); + if (th->winthread_handle == NULL) return EAGAIN; /* GetLastError() */ + + *thread = th; + return 0; +} + +int +pthread_join (pthread_t th, void **thread_return) +{ + BOOL b_ret; + DWORD dw_ret; + + if (thread_return) *thread_return = NULL; + + if ((th == NULL) || (th->winthread_handle == NULL)) return EINVAL; + + dw_ret = WaitForSingleObject (th->winthread_handle, INFINITE); + if (dw_ret != WAIT_OBJECT_0) return ERROR_PTHREAD; /* dw_ret == WAIT_FAILED; GetLastError() */ + + if (thread_return) { + BOOL e_ret; + DWORD exit_val; + e_ret = GetExitCodeThread (th->winthread_handle, &exit_val); + if (!e_ret) return ERROR_PTHREAD; /* GetLastError() */ + *thread_return = (void *)(size_t) exit_val; + } + + b_ret = CloseHandle (th->winthread_handle); + if (!b_ret) return ERROR_PTHREAD; /* GetLastError() */ + memset (th, 0, sizeof (pthread_s)); + free (th); + th = NULL; + + return 0; +} + +void +pthread_exit (void *retval) +{ + /* specific to PTHREAD_TO_WINTHREAD */ + + ExitThread ((DWORD) ((size_t) retval)); /* thread becomes signalled so its death can be waited upon */ + /*NOTREACHED*/ + assert (0); return; /* void fnc; can't return an error code */ +} + +/* + Mutex +*/ + +int +pthread_mutex_init (pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr) +{ + InitializeCriticalSection (&mutex->critsec); + return 0; +} + +int +pthread_mutex_destroy (pthread_mutex_t *mutex) +{ + return 0; +} + +int +pthread_mutex_lock (pthread_mutex_t *mutex) +{ + EnterCriticalSection (&mutex->critsec); + return 0; +} + +int +pthread_mutex_unlock (pthread_mutex_t *mutex) +{ + LeaveCriticalSection (&mutex->critsec); + return 0; +} + +#endif /* EMULATE_PTHREADS */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.h new file mode 100644 index 0000000000..8a754a12d0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/pthread.h @@ -0,0 +1,117 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#ifdef EMULATE_PTHREADS + +#ifndef _PTHREAD_H_DEFINED +#define _PTHREAD_H_DEFINED + +#include +#include +#ifndef ENOTSUP +#define ENOTSUP EPERM +#endif + +/* just need on Windows to get size_t defined */ +#include + +#define ERROR_PTHREAD 1000 +#define ERROR_MODE 1001 +#define ERROR_UNIMPL 1002 + +/* + Basics +*/ + +struct pthread_s { + HANDLE winthread_handle; + DWORD winthread_id; +}; +typedef struct pthread_s *pthread_t; /* one of the few types that's pointer, not struct */ + +typedef struct { + int i; /* not yet defined... */ +} pthread_attr_t; + +/* + Mutex +*/ + +typedef struct { + int i; /* not yet defined... */ +} pthread_mutexattr_t; + +typedef struct { + CRITICAL_SECTION critsec; +} pthread_mutex_t; + +/* + Function prototypes +*/ + +extern int pthread_create (pthread_t *thread, pthread_attr_t *attr, void *(*start_routine) (void *), void *arg); +extern int pthread_join (pthread_t th, void **thread_return); +extern void pthread_exit (void *retval); + +extern int pthread_mutex_init (pthread_mutex_t *mutex, pthread_mutexattr_t *mutex_attr); +extern int pthread_mutex_destroy (pthread_mutex_t *mutex); +extern int pthread_mutex_lock (pthread_mutex_t *mutex); +extern int pthread_mutex_unlock (pthread_mutex_t *mutex); + +#endif /* _PTHREAD_H_DEFINED */ + +#endif /* EMULATE_PTHREADS */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.cpp new file mode 100644 index 0000000000..4c4bc3e768 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.cpp @@ -0,0 +1,180 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * quadric.c - This file contains the functions for dealing with quadrics. + * + * $Id: quadric.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "quadric.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +int quadric_bbox(void * obj, vector * min, vector * max) { + return 0; +} + +static object_methods quadric_methods = { + (void (*)(void *, void *))(quadric_intersect), + (void (*)(void *, void *, void *, void *))(quadric_normal), + quadric_bbox, + free +}; + +quadric * newquadric() { + quadric * q; + + q=(quadric *) rt_getmem(sizeof(quadric)); + memset(q, 0, sizeof(quadric)); + q->ctr.x=0.0; + q->ctr.y=0.0; + q->ctr.z=0.0; + q->methods = &quadric_methods; + + return q; +} + +void quadric_intersect(quadric * q, ray * ry) { + flt Aq, Bq, Cq; + flt t1, t2; + flt disc; + vector rd; + vector ro; + + rd=ry->d; + VNorm(&rd); + + ro.x = ry->o.x - q->ctr.x; + ro.y = ry->o.y - q->ctr.y; + ro.z = ry->o.z - q->ctr.z; + + + Aq = (q->mat.a*(rd.x * rd.x)) + + (2.0 * q->mat.b * rd.x * rd.y) + + (2.0 * q->mat.c * rd.x * rd.z) + + (q->mat.e * (rd.y * rd.y)) + + (2.0 * q->mat.f * rd.y * rd.z) + + (q->mat.h * (rd.z * rd.z)); + + Bq = 2.0 * ( + (q->mat.a * ro.x * rd.x) + + (q->mat.b * ((ro.x * rd.y) + (rd.x * ro.y))) + + (q->mat.c * ((ro.x * rd.z) + (rd.x * ro.z))) + + (q->mat.d * rd.x) + + (q->mat.e * ro.y * rd.y) + + (q->mat.f * ((ro.y * rd.z) + (rd.y * ro.z))) + + (q->mat.g * rd.y) + + (q->mat.h * ro.z * rd.z) + + (q->mat.i * rd.z) + ); + + Cq = (q->mat.a * (ro.x * ro.x)) + + (2.0 * q->mat.b * ro.x * ro.y) + + (2.0 * q->mat.c * ro.x * ro.z) + + (2.0 * q->mat.d * ro.x) + + (q->mat.e * (ro.y * ro.y)) + + (2.0 * q->mat.f * ro.y * ro.z) + + (2.0 * q->mat.g * ro.y) + + (q->mat.h * (ro.z * ro.z)) + + (2.0 * q->mat.i * ro.z) + + q->mat.j; + + if (Aq == 0.0) { + t1 = - Cq / Bq; + add_intersection(t1, (object *) q, ry); + } + else { + disc=(Bq*Bq - 4.0 * Aq * Cq); + if (disc > 0.0) { + disc=sqrt(disc); + t1 = (-Bq + disc) / (2.0 * Aq); + t2 = (-Bq - disc) / (2.0 * Aq); + add_intersection(t1, (object *) q, ry); + add_intersection(t2, (object *) q, ry); + } + } +} + +void quadric_normal(quadric * q, vector * pnt, ray * incident, vector * N) { + + N->x = (q->mat.a*(pnt->x - q->ctr.x) + + q->mat.b*(pnt->y - q->ctr.y) + + q->mat.c*(pnt->z - q->ctr.z) + q->mat.d); + + N->y = (q->mat.b*(pnt->x - q->ctr.x) + + q->mat.e*(pnt->y - q->ctr.y) + + q->mat.f*(pnt->z - q->ctr.z) + q->mat.g); + + N->z = (q->mat.c*(pnt->x - q->ctr.x) + + q->mat.f*(pnt->y - q->ctr.y) + + q->mat.h*(pnt->z - q->ctr.z) + q->mat.i); + + VNorm(N); + + if (VDot(N, &(incident->d)) > 0.0) { + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.h new file mode 100644 index 0000000000..adc808b547 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/quadric.h @@ -0,0 +1,83 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * quadric.h - This file contains the defines for quadrics. + * + * $Id: quadric.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +typedef struct { + flt a; flt b; flt c; + flt d; flt e; flt f; + flt g; flt h; flt i; flt j; +} quadmatrix; + + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector ctr; + quadmatrix mat; +} quadric; + + +quadric * newquadric(void); +void quadric_intersect(quadric *, ray *); +void quadric_normal(quadric *, vector *, ray *, vector *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.cpp new file mode 100644 index 0000000000..b1d46a5200 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.cpp @@ -0,0 +1,101 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * render.c - This file contains the main program and driver for the raytracer. + * + * $Id: render.cpp,v 1.5 2007-02-22 18:17:51 amalakho Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "tgafile.h" +#include "trace.h" +#include "render.h" +#include "util.h" +#include "light.h" +#include "global.h" +#include "ui.h" +#include "tachyon_video.h" +#include "objbound.h" +#include "grid.h" + +/* how many pieces to divide each scanline into */ +#define NUMHORZDIV 1 + +void renderscene(scenedef scene) { + //char msgtxt[2048]; + //void * outfile; + /* Grid based accerlation scheme */ + if (scene.boundmode == RT_BOUNDING_ENABLED) + engrid_scene(&rootobj); /* grid */ + /* Not used now + if (scene.verbosemode) { + sprintf(msgtxt, "Opening %s for output.", scene.outfilename); + rt_ui_message(MSG_0, msgtxt); + } + + createtgafile(scene.outfilename, + (unsigned short) scene.hres, + (unsigned short) scene.vres); + outfile = opentgafile(scene.outfilename); + */ + + trace_region (scene, 0/*outfile*/, 0, 0, scene.hres, scene.vres); + //fclose((FILE *)outfile); +} /* end of renderscene() */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.h new file mode 100644 index 0000000000..173de89e30 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/render.h @@ -0,0 +1,65 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * render.h - This file contains the defines for the top level functions + * + * $Id: render.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + + +void renderscene(scenedef); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.cpp new file mode 100644 index 0000000000..f420b0352f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.cpp @@ -0,0 +1,141 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ring.c - This file contains the functions for dealing with rings. + * + * $Id: ring.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +#define RING_PRIVATE +#include "ring.h" + +static object_methods ring_methods = { + (void (*)(void *, void *))(ring_intersect), + (void (*)(void *, void *, void *, void *))(ring_normal), + ring_bbox, + free +}; + +object * newring(void * tex, vector ctr, vector norm, flt inrad, flt outrad) { + ring * r; + + r=(ring *) rt_getmem(sizeof(ring)); + memset(r, 0, sizeof(ring)); + r->methods = &ring_methods; + + r->tex = (texture *)tex; + r->ctr = ctr; + r->norm = norm; + r->inrad = inrad; + r->outrad= outrad; + + return (object *) r; +} + +static int ring_bbox(void * obj, vector * min, vector * max) { + ring * r = (ring *) obj; + + min->x = r->ctr.x - r->outrad; + min->y = r->ctr.y - r->outrad; + min->z = r->ctr.z - r->outrad; + max->x = r->ctr.x + r->outrad; + max->y = r->ctr.y + r->outrad; + max->z = r->ctr.z + r->outrad; + + return 1; +} + +static void ring_intersect(ring * rng, ray * ry) { + flt d; + flt t,td; + vector hit, pnt; + + d = -VDot(&(rng->ctr), &(rng->norm)); + + t=-(d+VDot(&(rng->norm), &(ry->o))); + td=VDot(&(rng->norm),&(ry->d)); + if (td != 0.0) { + t= t / td; + if (t>=0.0) { + hit=Raypnt(ry, t); + VSUB(hit, rng->ctr, pnt); + VDOT(td, pnt, pnt); + td=sqrt(td); + if ((td > rng->inrad) && (td < rng->outrad)) + add_intersection(t,(object *) rng, ry); + } + } +} + +static void ring_normal(ring * rng, vector * pnt, ray * incident, vector * N) { + *N=rng->norm; + VNorm(N); + if (VDot(N, &(incident->d)) > 0.0) { + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.h new file mode 100644 index 0000000000..ab4d78d0ac --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ring.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ring.h - This file contains the defines for rings etc. + * + * $Id: ring.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +object * newring(void * tex, vector ctr, vector norm, flt in, flt out); + +#ifdef RING_PRIVATE +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector ctr; + vector norm; + flt inrad; + flt outrad; +} ring; + +static int ring_bbox(void * obj, vector * min, vector * max); +static void ring_intersect(ring *, ray *); +static void ring_normal(ring *, vector *, ray * incident, vector *); +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.cpp new file mode 100644 index 0000000000..e54cb83c24 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.cpp @@ -0,0 +1,268 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * shade.c - This file contains the functions that perform surface shading. + * + * $Id: shade.cpp,v 1.3 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "light.h" +#include "intersect.h" +#include "vector.h" +#include "trace.h" +#include "global.h" +#include "shade.h" + +void reset_lights(void) { + numlights=0; +} + +void add_light(point_light * li) { + lightlist[numlights]=li; + numlights++; +} + +color shader(ray * incident) { + color col, diffuse, phongcol; + vector N, L, hit; + ray shadowray; + flt inten, t, Llen; + object * obj; + int numints, i; + point_light * li; + + + numints=closest_intersection(&t, &obj, incident->intstruct); + /* find the number of intersections */ + /* and return the closest one. */ + + if (numints < 1) { + /* if there weren't any object intersections then return the */ + /* background color for the pixel color. */ + return incident->scene->background; + } + + if (obj->tex->islight) { /* if the current object is a light, then we */ + return obj->tex->col; /* will only use the objects ambient color */ + } + + RAYPNT(hit, (*incident), t) /* find the point of intersection from t */ + obj->methods->normal(obj, &hit, incident, &N); /* find the surface normal */ + + /* execute the object's texture function */ + col = obj->tex->texfunc(&hit, obj->tex, incident); + + diffuse.r = 0.0; + diffuse.g = 0.0; + diffuse.b = 0.0; + phongcol = diffuse; + + if ((obj->tex->diffuse > 0.0) || (obj->tex->phong > 0.0)) { + for (i=0; ictr, hit, L) /* find the light vector */ + + /* calculate the distance to the light from the hit point */ + Llen = sqrt(L.x*L.x + L.y*L.y + L.z*L.z) + EPSILON; + + L.x /= Llen; /* normalize the light direction vector */ + L.y /= Llen; + L.z /= Llen; + + VDOT(inten, N, L) /* light intensity */ + + /* add in diffuse lighting for this light if we're facing it */ + if (inten > 0.0) { + /* test for a shadow */ + shadowray.intstruct = incident->intstruct; + shadowray.flags = RT_RAY_SHADOW | RT_RAY_BOUNDED; + incident->serial++; + shadowray.serial = incident->serial; + shadowray.mbox = incident->mbox; + shadowray.o = hit; + shadowray.d = L; + shadowray.maxdist = Llen; + shadowray.s = hit; + shadowray.e = li->ctr; + shadowray.scene = incident->scene; + reset_intersection(incident->intstruct); + intersect_objects(&shadowray); + + if (!shadow_intersection(incident->intstruct, Llen)) { + /* XXX now that opacity is in the code, have to be more careful */ + ColorAddS(&diffuse, &li->tex->col, inten); + + /* phong type specular highlights */ + if (obj->tex->phong > 0.0) { + flt phongval; + phongval = shade_phong(incident, &hit, &N, &L, obj->tex->phongexp); + if (obj->tex->phongtype) + ColorAddS(&phongcol, &col, phongval); + else + ColorAddS(&phongcol, &(li->tex->col), phongval); + } + } + } + } + } + + ColorScale(&diffuse, obj->tex->diffuse); + + col.r *= (diffuse.r + obj->tex->ambient); /* do a product of the */ + col.g *= (diffuse.g + obj->tex->ambient); /* diffuse intensity with */ + col.b *= (diffuse.b + obj->tex->ambient); /* object color + ambient */ + + if (obj->tex->phong > 0.0) { + ColorAccum(&col, &phongcol); + } + + /* spawn reflection rays if necessary */ + /* note: this will overwrite the old intersection list */ + if (obj->tex->specular > 0.0) { + color specol; + specol = shade_reflection(incident, &hit, &N, obj->tex->specular); + ColorAccum(&col, &specol); + } + + /* spawn transmission rays / refraction */ + /* note: this will overwrite the old intersection list */ + if (obj->tex->opacity < 1.0) { + color transcol; + transcol = shade_transmission(incident, &hit, 1.0 - obj->tex->opacity); + ColorAccum(&col, &transcol); + } + + return col; /* return the color of the shaded pixel... */ +} + + +color shade_reflection(ray * incident, vector * hit, vector * N, flt specular) { + ray specray; + color col; + vector R; + + VAddS(-2.0 * (incident->d.x * N->x + + incident->d.y * N->y + + incident->d.z * N->z), N, &incident->d, &R); + + specray.intstruct=incident->intstruct; /* what thread are we */ + specray.depth=incident->depth - 1; /* go up a level in recursion depth */ + specray.flags = RT_RAY_REGULAR; /* infinite ray, to start with */ + specray.serial = incident->serial + 1; /* next serial number */ + specray.mbox = incident->mbox; + specray.o=*hit; + specray.d=R; /* reflect incident ray about normal */ + specray.o=Raypnt(&specray, EPSILON); /* avoid numerical precision bugs */ + specray.maxdist = FHUGE; /* take any intersection */ + specray.scene=incident->scene; /* global scenedef info */ + col=trace(&specray); /* trace specular reflection ray */ + + incident->serial = specray.serial; /* update the serial number */ + + ColorScale(&col, specular); + + return col; +} + + +color shade_transmission(ray * incident, vector * hit, flt trans) { + ray transray; + color col; + + transray.intstruct=incident->intstruct; /* what thread are we */ + transray.depth=incident->depth - 1; /* go up a level in recursion depth */ + transray.flags = RT_RAY_REGULAR; /* infinite ray, to start with */ + transray.serial = incident->serial + 1; /* update serial number */ + transray.mbox = incident->mbox; + transray.o=*hit; + transray.d=incident->d; /* ray continues along incident path */ + transray.o=Raypnt(&transray, EPSILON); /* avoid numerical precision bugs */ + transray.maxdist = FHUGE; /* take any intersection */ + transray.scene=incident->scene; /* global scenedef info */ + col=trace(&transray); /* trace transmission ray */ + + incident->serial = transray.serial; + + ColorScale(&col, trans); + + return col; +} + +flt shade_phong(ray * incident, vector * hit, + vector * N, vector * L, flt specpower){ + vector H, V; + flt inten; + + V = incident->d; + VScale(&V, -1.0); + VAdd(&V, L, &H); + VScale(&H, 0.5); + VNorm(&H); + inten = VDot(N, &H); + if (inten > 0.0) + inten = pow(inten, specpower); + else + inten = 0.0; + + return inten; +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.h new file mode 100644 index 0000000000..f892b95311 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/shade.h @@ -0,0 +1,70 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * shade.h - This file contains declarations and definitions for the shader. + * + * $Id: shade.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +void reset_lights(void); +void add_light(point_light *); + +color shader(ray *); +color shade_reflection(ray *, vector *, vector *, flt); +color shade_transmission(ray *, vector *, flt); +flt shade_phong(ray * incident, vector * hit, vector * N, vector * L, flt specpower); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.cpp new file mode 100644 index 0000000000..2b8b18a822 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.cpp @@ -0,0 +1,143 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * sphere.c - This file contains the functions for dealing with spheres. + * + * $Id: sphere.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "intersect.h" +#include "util.h" + +#define SPHERE_PRIVATE +#include "sphere.h" + +static object_methods sphere_methods = { + (void (*)(void *, void *))(sphere_intersect), + (void (*)(void *, void *, void *, void *))(sphere_normal), + sphere_bbox, + free +}; + +object * newsphere(void * tex, vector ctr, flt rad) { + sphere * s; + + s=(sphere *) rt_getmem(sizeof(sphere)); + memset(s, 0, sizeof(sphere)); + s->methods = &sphere_methods; + + s->tex=(texture *)tex; + s->ctr=ctr; + s->rad=rad; + + return (object *) s; +} + +static int sphere_bbox(void * obj, vector * min, vector * max) { + sphere * s = (sphere *) obj; + + min->x = s->ctr.x - s->rad; + min->y = s->ctr.y - s->rad; + min->z = s->ctr.z - s->rad; + max->x = s->ctr.x + s->rad; + max->y = s->ctr.y + s->rad; + max->z = s->ctr.z + s->rad; + + return 1; +} + +static void sphere_intersect(sphere * spr, ray * ry) { + flt b, disc, t1, t2, temp; + vector V; + + VSUB(spr->ctr, ry->o, V); + VDOT(b, V, ry->d); + VDOT(temp, V, V); + + disc=b*b + spr->rad*spr->rad - temp; + + if (disc<=0.0) return; + disc=sqrt(disc); + + t2=b+disc; + if (t2 <= SPEPSILON) + return; + add_intersection(t2, (object *) spr, ry); + + t1=b-disc; + if (t1 > SPEPSILON) + add_intersection(t1, (object *) spr, ry); +} + +static void sphere_normal(sphere * spr, vector * pnt, ray * incident, vector * N) { + VSub((vector *) pnt, &(spr->ctr), N); + + VNorm(N); + + if (VDot(N, &(incident->d)) > 0.0) { + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.h new file mode 100644 index 0000000000..e2d7fbfb1d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/sphere.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * sphere.h - This file contains the defines for spheres etc. + * + * $Id: sphere.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +object * newsphere(void *, vector, flt); + +#ifdef SPHERE_PRIVATE + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector ctr; + flt rad; +} sphere; + +static int sphere_bbox(void * obj, vector * min, vector * max); +static void sphere_intersect(sphere *, ray *); +static void sphere_normal(sphere *, vector *, ray *, vector *); + +#endif /* SPHERE_PRIVATE */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.cpp new file mode 100644 index 0000000000..641bc16c32 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.cpp @@ -0,0 +1,128 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#include +#include +#include + +#include "types.h" +#include "api.h" /* The ray tracing library API */ +#include "ui.h" +#include "util.h" +#include "tachyon_video.h" + +extern SceneHandle global_scene; +extern char *global_window_title; +extern bool global_usegraphics; + +void tachyon_video::on_process() { + char buf[8192]; + flt runtime; + scenedef *scene = (scenedef *) global_scene; + updating_mode = scene->displaymode == RT_DISPLAY_ENABLED; + recycling = false; + pausing = false; + do { + updating = updating_mode; + timer start_timer = gettimer(); + rt_renderscene(global_scene); + timer end_timer = gettimer(); + runtime = timertime(start_timer, end_timer); + sprintf(buf, "%s: %.3f seconds", global_window_title, runtime); + rt_ui_message(MSG_0, buf); + title = buf; show_title(); // show time spent for rendering + if(!updating) { + updating = true; + drawing_memory dm = get_drawing_memory(); + drawing_area drawing(0, 0, dm.sizex, dm.sizey);// invalidate whole screen + } + rt_finalize(); + title = global_window_title; show_title(); // reset title to default + } while(recycling && running); +} + +void tachyon_video::on_key(int key) { + key &= 0xff; + recycling = true; + if(key == esc_key) running = false; + else if(key == ' ') { + if(!updating) { + updating = true; + drawing_memory dm = get_drawing_memory(); + drawing_area drawing(0, 0, dm.sizex, dm.sizey);// invalidate whole screen + } + updating = updating_mode = !updating_mode; + } + else if(key == 'p') { + pausing = !pausing; + if(pausing) { + title = "Press ESC to exit or 'p' to continue after rendering completion"; + show_title(); + } + } +} + +void rt_finalize(void) { + timer t0, t1; + t0 = gettimer(); + if(global_usegraphics) + do { rt_sleep(1); t1 = gettimer(); } + while( (timertime(t0, t1) < 10 || video->pausing) && video->next_frame()); +#ifdef _WINDOWS + else rt_sleep(10000); +#endif +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.h new file mode 100644 index 0000000000..8b42375463 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tachyon_video.h @@ -0,0 +1,70 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#include "../../../common/gui/video.h" + +class tachyon_video : public video +{ +public: + bool updating_mode; + bool recycling; + bool pausing; + void on_process(); + void on_key(int key); +}; + +extern class tachyon_video *video; diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.cpp new file mode 100644 index 0000000000..9429df1b5c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.cpp @@ -0,0 +1,395 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * texture.c - This file contains functions for implementing textures. + * + * $Id: texture.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "texture.h" +#include "coordsys.h" +#include "imap.h" +#include "vector.h" +#include "box.h" + +/* plain vanilla texture solely based on object color */ +color standard_texture(vector * hit, texture * tex, ray * ry) { + return tex->col; +} + +/* cylindrical image map */ +color image_cyl_texture(vector * hit, texture * tex, ray * ry) { + vector rh; + flt u,v; + + rh.x=hit->x - tex->ctr.x; + rh.z=hit->y - tex->ctr.y; + rh.y=hit->z - tex->ctr.z; + + xyztocyl(rh, 1.0, &u, &v); + + u = u * tex->scale.x; + u = u + tex->rot.x; + u=fmod(u, 1.0); + if (u < 0.0) u+=1.0; + + v = v * tex->scale.y; + v = v + tex->rot.y; + v=fmod(v, 1.0); + if (v < 0.0) v+=1.0; + + return ImageMap((rawimage *)tex->img, u, v); +} + +/* spherical image map */ +color image_sphere_texture(vector * hit, texture * tex, ray * ry) { + vector rh; + flt u,v; + + rh.x=hit->x - tex->ctr.x; + rh.y=hit->y - tex->ctr.y; + rh.z=hit->z - tex->ctr.z; + + xyztospr(rh, &u, &v); + + u = u * tex->scale.x; + u = u + tex->rot.x; + u=fmod(u, 1.0); + if (u < 0.0) u+=1.0; + + v = v * tex->scale.y; + v = v + tex->rot.y; + v=fmod(v, 1.0); + if (v < 0.0) v+=1.0; + + return ImageMap((rawimage *)tex->img, u, v); +} + +/* planar image map */ +color image_plane_texture(vector * hit, texture * tex, ray * ry) { + vector pnt; + flt u,v; + + pnt.x=hit->x - tex->ctr.x; + pnt.y=hit->y - tex->ctr.y; + pnt.z=hit->z - tex->ctr.z; + + VDOT(u, tex->uaxs, pnt); +/* VDOT(len, tex->uaxs, tex->uaxs); + u = u / sqrt(len); */ + + VDOT(v, tex->vaxs, pnt); +/* VDOT(len, tex->vaxs, tex->vaxs); + v = v / sqrt(len); */ + + + u = u * tex->scale.x; + u = u + tex->rot.x; + u = fmod(u, 1.0); + if (u < 0.0) u += 1.0; + + v = v * tex->scale.y; + v = v + tex->rot.y; + v = fmod(v, 1.0); + if (v < 0.0) v += 1.0; + + return ImageMap((rawimage *)tex->img, u, v); +} + +color grit_texture(vector * hit, texture * tex, ray * ry) { + int rnum; + flt fnum; + color col; + + rnum=rand() % 4096; + fnum=(rnum / 4096.0 * 0.2) + 0.8; + + col.r=tex->col.r * fnum; + col.g=tex->col.g * fnum; + col.b=tex->col.b * fnum; + + return col; +} + +color checker_texture(vector * hit, texture * tex, ray * ry) { + long x,y,z; + flt xh,yh,zh; + color col; + + xh=hit->x - tex->ctr.x; + x=(long) ((fabs(xh) * 3) + 0.5); + x=x % 2; + yh=hit->y - tex->ctr.y; + y=(long) ((fabs(yh) * 3) + 0.5); + y=y % 2; + zh=hit->z - tex->ctr.z; + z=(long) ((fabs(zh) * 3) + 0.5); + z=z % 2; + + if (((x + y + z) % 2)==1) { + col.r=1.0; + col.g=0.2; + col.b=0.0; + } + else { + col.r=0.0; + col.g=0.2; + col.b=1.0; + } + + return col; +} + +color cyl_checker_texture(vector * hit, texture * tex, ray * ry) { + long x,y; + vector rh; + flt u,v; + color col; + + rh.x=hit->x - tex->ctr.x; + rh.y=hit->y - tex->ctr.y; + rh.z=hit->z - tex->ctr.z; + + xyztocyl(rh, 1.0, &u, &v); + + x=(long) (fabs(u) * 18.0); + x=x % 2; + y=(long) (fabs(v) * 10.0); + y=y % 2; + + if (((x + y) % 2)==1) { + col.r=1.0; + col.g=0.2; + col.b=0.0; + } + else { + col.r=0.0; + col.g=0.2; + col.b=1.0; + } + + return col; +} + + +color wood_texture(vector * hit, texture * tex, ray * ry) { + flt radius, angle; + int grain; + color col; + flt x,y,z; + + x=(hit->x - tex->ctr.x) * 1000; + y=(hit->y - tex->ctr.y) * 1000; + z=(hit->z - tex->ctr.z) * 1000; + + radius=sqrt(x*x + z*z); + if (z == 0.0) + angle=3.1415926/2.0; + else + angle=atan(x / z); + + radius=radius + 3.0 * sin(20 * angle + y / 150.0); + grain=((int) (radius + 0.5)) % 60; + if (grain < 40) { + col.r=0.8; + col.g=1.0; + col.b=0.2; + } + else { + col.r=0.0; + col.g=0.0; + col.b=0.0; + } + + return col; +} + + + +#define NMAX 28 +short int NoiseMatrix[NMAX][NMAX][NMAX]; + +void InitNoise(void) { + byte x,y,z,i,j,k; + + for (x=0; xx; + y=hit->y; + z=hit->z; + + x=x * 1.0; + + d=x + 0.0006 * Noise(x, (y * 1.0), (z * 1.0)); + d=d*(((int) d) % 25); + i=0.0 + 0.10 * fabs(d - 10.0 - 20.0 * ((int) d * 0.05)); + if (i > 1.0) i=1.0; + if (i < 0.0) i=0.0; + +/* + col.r=i * tex->col.r; + col.g=i * tex->col.g; + col.b=i * tex->col.b; +*/ + + col.r = (1.0 + sin(i * 6.28)) / 2.0; + col.g = (1.0 + sin(i * 16.28)) / 2.0; + col.b = (1.0 + cos(i * 30.28)) / 2.0; + + return col; +} + + +color gnoise_texture(vector * hit, texture * tex, ray * ry) { + color col; + flt f; + + f=Noise((hit->x - tex->ctr.x), + (hit->y - tex->ctr.y), + (hit->z - tex->ctr.z)); + + if (f < 0.01) f=0.01; + if (f > 1.0) f=1.0; + + col.r=tex->col.r * f; + col.g=tex->col.g * f; + col.b=tex->col.b * f; + + return col; +} + +void InitTextures(void) { + InitNoise(); + ResetImages(); +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.h new file mode 100644 index 0000000000..7b6f691405 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/texture.h @@ -0,0 +1,77 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * texture.h This file contains all of the includes and defines for the texture + * mapping part of the shader. + * + * $Id: texture.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +void InitTextures(void); +color standard_texture(vector *, texture *, ray *); +color image_cyl_texture(vector *, texture *, ray *); +color image_sphere_texture(vector *, texture *, ray *); +color image_plane_texture(vector *, texture *, ray *); +color checker_texture(vector *, texture *, ray *); +color cyl_checker_texture(vector *, texture *, ray *); +color grit_texture(vector *, texture *, ray *); +color wood_texture(vector *, texture *, ray *); +color marble_texture(vector *, texture *, ray *); +color gnoise_texture(vector *, texture *, ray *); +int Noise(flt, flt, flt); +void InitTextures(void); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tgafile.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tgafile.cpp new file mode 100644 index 0000000000..d32ba16cce --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/tgafile.cpp @@ -0,0 +1,245 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * tgafile.c - This file contains the code to write 24 bit targa files... + * + * $Id: tgafile.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "util.h" +#include "ui.h" +#include "imageio.h" +#include "tgafile.h" + +void createtgafile(char *name, unsigned short width, unsigned short height) { + int filesize; + FILE * ofp; + + filesize = 3*width*height + 18 - 10; + + if (name==NULL) + exit(1); + else { + ofp=fopen(name, "w+b"); + if (ofp == NULL) { + char msgtxt[2048]; + sprintf(msgtxt, "Cannot create %s for output!", name); + rt_ui_message(MSG_ERR, msgtxt); + rt_ui_message(MSG_ABORT, "Rendering Aborted."); + exit(1); + } + + fputc(0, ofp); /* IdLength */ + fputc(0, ofp); /* ColorMapType */ + fputc(2, ofp); /* ImageTypeCode */ + fputc(0, ofp); /* ColorMapOrigin, low byte */ + fputc(0, ofp); /* ColorMapOrigin, high byte */ + fputc(0, ofp); /* ColorMapLength, low byte */ + fputc(0, ofp); /* ColorMapLength, high byte */ + fputc(0, ofp); /* ColorMapEntrySize */ + fputc(0, ofp); /* XOrigin, low byte */ + fputc(0, ofp); /* XOrigin, high byte */ + fputc(0, ofp); /* YOrigin, low byte */ + fputc(0, ofp); /* YOrigin, high byte */ + fputc((width & 0xff), ofp); /* Width, low byte */ + fputc(((width >> 8) & 0xff), ofp); /* Width, high byte */ + fputc((height & 0xff), ofp); /* Height, low byte */ + fputc(((height >> 8) & 0xff), ofp); /* Height, high byte */ + fputc(24, ofp); /* ImagePixelSize */ + fputc(0x20, ofp); /* ImageDescriptorByte 0x20 == flip vertically */ + + fseek(ofp, filesize, 0); + fprintf(ofp, "9876543210"); + + fclose(ofp); + } +} + +void * opentgafile(char * filename) { + FILE * ofp; + + ofp=fopen(filename, "r+b"); + if (ofp == NULL) { + char msgtxt[2048]; + sprintf(msgtxt, "Cannot open %s for output!", filename); + rt_ui_message(MSG_ERR, msgtxt); + rt_ui_message(MSG_ABORT, "Rendering Aborted."); + exit(1); + } + + return ofp; +} + +void writetgaregion(void * voidofp, + int iwidth, int iheight, + int startx, int starty, + int stopx, int stopy, char * buffer) { + int y, totalx, totaly; + char * bufpos; + int filepos, numbytes; + FILE * ofp = (FILE *) voidofp; + + totalx = stopx - startx + 1; + totaly = stopy - starty + 1; + + for (y=0; y= 18) { + fseek(ofp, filepos, 0); + numbytes = fwrite(bufpos, 3, totalx, ofp); + + if (numbytes != totalx) { + char msgtxt[256]; + sprintf(msgtxt, "File write problem, %d bytes written.", numbytes); + rt_ui_message(MSG_ERR, msgtxt); + } + } + else { + rt_ui_message(MSG_ERR, "writetgaregion: file ptr out of range!!!\n"); + return; /* don't try to continue */ + } + } +} + + +int readtga(char * name, int * xres, int * yres, unsigned char **imgdata) { + int format, width, height, w1, w2, h1, h2, depth, flags; + int imgsize, bytesread, i, tmp; + FILE * ifp; + + ifp=fopen(name, "r"); + if (ifp==NULL) { + return IMAGEBADFILE; /* couldn't open the file */ + } + + /* read the targa header */ + getc(ifp); /* ID length */ + getc(ifp); /* colormap type */ + format = getc(ifp); /* image type */ + getc(ifp); /* color map origin */ + getc(ifp); /* color map origin */ + getc(ifp); /* color map length */ + getc(ifp); /* color map length */ + getc(ifp); /* color map entry size */ + getc(ifp); /* x origin */ + getc(ifp); /* x origin */ + getc(ifp); /* y origin */ + getc(ifp); /* y origin */ + w1 = getc(ifp); /* width (low) */ + w2 = getc(ifp); /* width (hi) */ + h1 = getc(ifp); /* height (low) */ + h2 = getc(ifp); /* height (hi) */ + depth = getc(ifp); /* image pixel size */ + flags = getc(ifp); /* image descriptor byte */ + + if ((format != 2) || (depth != 24)) { + fclose(ifp); + return IMAGEUNSUP; /* unsupported targa format */ + } + + + width = ((w2 << 8) | w1); + height = ((h2 << 8) | h1); + + imgsize = 3 * width * height; + *imgdata = (unsigned char *)rt_getmem(imgsize); + bytesread = fread(*imgdata, 1, imgsize, ifp); + fclose(ifp); + + /* flip image vertically */ + if (flags == 0x20) { + int rowsize = 3 * width; + unsigned char * copytmp; + + copytmp = (unsigned char *)malloc(rowsize); + + for (i=0; i 0) { + for (alias=0; alias < scene.antialiasing; alias++) { + + serial++; /* increment serial number */ + sample=primary; /* copy the regular primary ray to start with */ + sample.serial = serial; + + { + sample.d.x+=((std::rand() % 100) - 50) / jitterscale; + sample.d.y+=((std::rand() % 100) - 50) / jitterscale; + sample.d.z+=((std::rand() % 100) - 50) / jitterscale; + } + + avcol=trace(&sample); + + serial = sample.serial; /* update our overall serial # */ + + col.r += avcol.r; + col.g += avcol.g; + col.b += avcol.b; + } + + col.r /= (scene.antialiasing + 1.0); + col.g /= (scene.antialiasing + 1.0); + col.b /= (scene.antialiasing + 1.0); + } + + /* Handle overexposure and underexposure here... */ + R=(int) (col.r*255); + if (R > 255) R = 255; + else if (R < 0) R = 0; + + G=(int) (col.g*255); + if (G > 255) G = 255; + else if (G < 0) G = 0; + + B=(int) (col.b*255); + if (B > 255) B = 255; + else if (B < 0) B = 0; + + return video->get_color(R, G, B); + +} + +static void parallel_thread (void) +{ + // thread-local storage + unsigned int serial = 1; + unsigned int mboxsize = sizeof(unsigned int)*(max_objectid() + 20); + unsigned int * local_mbox = (unsigned int *) alloca(mboxsize); + memset(local_mbox,0,mboxsize); + + for (int y = starty; y < stopy; y++) { { + drawing_area drawing(startx, totaly-y, stopx-startx, 1); + for (int x = startx; x < stopx; x++) { + color_t c = render_one_pixel (x, y, local_mbox, serial, startx, stopx, starty, stopy); + drawing.put_pixel(c); + } } + if(!video->next_frame()) return; + } +} + +void * thread_trace(thr_parms * parms) +{ + // shared but read-only so could be private too + all_parms = parms; + scene = parms->scene; + startx = parms->startx; + stopx = parms->stopx; + starty = parms->starty; + stopy = parms->stopy; + jitterscale = 40.0*(scene.hres + scene.vres); + totaly = parms->scene.vres-1; + + parallel_thread (); + + return(NULL); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb.cpp new file mode 100644 index 0000000000..9c33b0d37d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb.cpp @@ -0,0 +1,271 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "tgafile.h" +#include "trace.h" +#include "light.h" +#include "shade.h" +#include "camera.h" +#include "util.h" +#include "intersect.h" +#include "global.h" +#include "ui.h" +#include "tachyon_video.h" + +// shared but read-only so could be private too +static thr_parms *all_parms; +static scenedef scene; +static int startx; +static int stopx; +static int starty; +static int stopy; +static flt jitterscale; +static int totaly; + +#ifdef MARK_RENDERING_AREA + +// rgb colors list for coloring image by each thread +static const float inner_alpha = 0.3; +static const float border_alpha = 0.5; +#define NUM_COLORS 24 +static int colors[NUM_COLORS][3] = { + {255,110,0}, {220,254,0}, {102,254,0}, {0,21,254}, {97,0,254}, {254,30,0}, + {20,41,8}, {144,238,38}, {184,214,139}, {28,95,20}, {139,173,148}, {188,228,183}, + {145,47,56}, {204,147,193}, {45,202,143}, {204,171,143}, {143,160,204}, {220,173,3}, + {1,152,231}, {79,235,237}, {52,193,72}, {67,136,151}, {78,87,179}, {143,255,9}, +}; + +#include "tbb/atomic.h" +#include "tbb/enumerable_thread_specific.h" +// storage and counter for thread numbers in order of first task run +typedef tbb::enumerable_thread_specific< int > thread_id_t; +thread_id_t thread_ids (-1); +tbb::atomic thread_number; + +#endif + +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/spin_mutex.h" +#include "tbb/blocked_range2d.h" + +static tbb::spin_mutex MyMutex, MyMutex2; + +static color_t render_one_pixel (int x, int y, unsigned int *local_mbox, unsigned int &serial, + int startx, int stopx, int starty, int stopy +#ifdef MARK_RENDERING_AREA + , int *blend, float alpha +#endif +) +{ + /* private vars moved inside loop */ + ray primary, sample; + color col, avcol; + int R,G,B; + intersectstruct local_intersections; + int alias; + /* end private */ + + primary=camray(&scene, x, y); + primary.intstruct = &local_intersections; + primary.flags = RT_RAY_REGULAR; + + serial++; + primary.serial = serial; + primary.mbox = local_mbox; + primary.maxdist = FHUGE; + primary.scene = &scene; + col=trace(&primary); + + serial = primary.serial; + + /* perform antialiasing if enabled.. */ + if (scene.antialiasing > 0) { + for (alias=0; alias < scene.antialiasing; alias++) { + + serial++; /* increment serial number */ + sample=primary; /* copy the regular primary ray to start with */ + sample.serial = serial; + + { + tbb::spin_mutex::scoped_lock lock (MyMutex); + sample.d.x+=((rand() % 100) - 50) / jitterscale; + sample.d.y+=((rand() % 100) - 50) / jitterscale; + sample.d.z+=((rand() % 100) - 50) / jitterscale; + } + + avcol=trace(&sample); + + serial = sample.serial; /* update our overall serial # */ + + col.r += avcol.r; + col.g += avcol.g; + col.b += avcol.b; + } + + col.r /= (scene.antialiasing + 1.0); + col.g /= (scene.antialiasing + 1.0); + col.b /= (scene.antialiasing + 1.0); + } + + /* Handle overexposure and underexposure here... */ + R=(int) (col.r*255); + if (R > 255) R = 255; + else if (R < 0) R = 0; + + G=(int) (col.g*255); + if (G > 255) G = 255; + else if (G < 0) G = 0; + + B=(int) (col.b*255); + if (B > 255) B = 255; + else if (B < 0) B = 0; + +#ifdef MARK_RENDERING_AREA + R = int((1.0 - alpha) * R + alpha * blend[0]); + G = int((1.0 - alpha) * G + alpha * blend[1]); + B = int((1.0 - alpha) * B + alpha * blend[2]); +#endif + + return video->get_color(R, G, B); +} + +class parallel_task { +public: + void operator() (const tbb::blocked_range2d &r) const + { + // task-local storage + unsigned int serial = 1; + unsigned int mboxsize = sizeof(unsigned int)*(max_objectid() + 20); + unsigned int * local_mbox = (unsigned int *) alloca(mboxsize); + memset(local_mbox,0,mboxsize); +#ifdef MARK_RENDERING_AREA + // compute thread number while first task run + thread_id_t::reference thread_id = thread_ids.local(); + if (thread_id == -1) thread_id = thread_number++; + // choose thread color + int pos = thread_id % NUM_COLORS; + if(video->running) { + drawing_area drawing(r.cols().begin(), totaly-r.rows().end(), r.cols().end() - r.cols().begin(), r.rows().end()-r.rows().begin()); + for (int i = 1, y = r.rows().begin(); y != r.rows().end(); ++y, i++) { + drawing.set_pos(0, drawing.size_y-i); + for (int x = r.cols().begin(); x != r.cols().end(); x++) { + int d = (y % 3 == 0) ? 2 : 1; + drawing.put_pixel(video->get_color(colors[pos][0]/d, colors[pos][1]/d, colors[pos][2]/d)); + } + } + } +#endif + if(video->next_frame()) { + drawing_area drawing(r.cols().begin(), totaly-r.rows().end(), r.cols().end() - r.cols().begin(), r.rows().end()-r.rows().begin()); + for (int i = 1, y = r.rows().begin(); y != r.rows().end(); ++y, i++) { + drawing.set_pos(0, drawing.size_y-i); + for (int x = r.cols().begin(); x != r.cols().end(); x++) { +#ifdef MARK_RENDERING_AREA + float alpha = y==r.rows().begin()||y==r.rows().end()-1||x==r.cols().begin()||x==r.cols().end()-1 + ? border_alpha : inner_alpha; + color_t c = render_one_pixel (x, y, local_mbox, serial, startx, stopx, starty, stopy, colors[pos], alpha); +#else + color_t c = render_one_pixel (x, y, local_mbox, serial, startx, stopx, starty, stopy); +#endif + drawing.put_pixel(c); + } + } + } + } + + parallel_task () {} +}; + +void * thread_trace(thr_parms * parms) +{ + int n, nthreads = tbb::task_scheduler_init::automatic; + char *nthreads_str = getenv ("TBB_NUM_THREADS"); + if (nthreads_str && (sscanf (nthreads_str, "%d", &n) > 0) && (n > 0)) nthreads = n; + tbb::task_scheduler_init init (nthreads); + + // shared but read-only so could be private too + all_parms = parms; + scene = parms->scene; + startx = parms->startx; + stopx = parms->stopx; + starty = parms->starty; + stopy = parms->stopy; + jitterscale = 40.0*(scene.hres + scene.vres); + totaly = parms->scene.vres; +#ifdef MARK_RENDERING_AREA + thread_ids.clear(); +#endif + + int g, grain_size = 8; + char *grain_str = getenv ("TBB_GRAINSIZE"); + if (grain_str && (sscanf (grain_str, "%d", &g) > 0) && (g > 0)) grain_size = g; + char *sched_str = getenv ("TBB_PARTITIONER"); + static tbb::affinity_partitioner g_ap; // reused across calls to thread_trace + if ( sched_str && !strncmp(sched_str, "aff", 3) ) + tbb::parallel_for (tbb::blocked_range2d (starty, stopy, grain_size, startx, stopx, grain_size), parallel_task (), g_ap); + else if ( sched_str && !strncmp(sched_str, "simp", 4) ) + tbb::parallel_for (tbb::blocked_range2d (starty, stopy, grain_size, startx, stopx, grain_size), parallel_task (), tbb::simple_partitioner()); + else + tbb::parallel_for (tbb::blocked_range2d (starty, stopy, grain_size, startx, stopx, grain_size), parallel_task (), tbb::auto_partitioner()); + + return(NULL); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb1d.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb1d.cpp new file mode 100644 index 0000000000..f644b72a3b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace.tbb1d.cpp @@ -0,0 +1,213 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "tgafile.h" +#include "trace.h" +#include "light.h" +#include "shade.h" +#include "camera.h" +#include "util.h" +#include "intersect.h" +#include "global.h" +#include "ui.h" +#include "tachyon_video.h" + +// shared but read-only so could be private too +static thr_parms *all_parms; +static scenedef scene; +static int startx; +static int stopx; +static int starty; +static int stopy; +static flt jitterscale; +static int totaly; + +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/spin_mutex.h" +#include "tbb/blocked_range.h" + +static tbb::spin_mutex MyMutex, MyMutex2; + +static color_t render_one_pixel (int x, int y, unsigned int *local_mbox, unsigned int &serial, + int startx, int stopx, int starty, int stopy) +{ + /* private vars moved inside loop */ + ray primary, sample; + color col, avcol; + int R,G,B; + intersectstruct local_intersections; + int alias; + /* end private */ + + primary=camray(&scene, x, y); + primary.intstruct = &local_intersections; + primary.flags = RT_RAY_REGULAR; + + serial++; + primary.serial = serial; + primary.mbox = local_mbox; + primary.maxdist = FHUGE; + primary.scene = &scene; + col=trace(&primary); + + serial = primary.serial; + + /* perform antialiasing if enabled.. */ + if (scene.antialiasing > 0) { + for (alias=0; alias < scene.antialiasing; alias++) { + + serial++; /* increment serial number */ + sample=primary; /* copy the regular primary ray to start with */ + sample.serial = serial; + + { + tbb::spin_mutex::scoped_lock lock (MyMutex); + sample.d.x+=((rand() % 100) - 50) / jitterscale; + sample.d.y+=((rand() % 100) - 50) / jitterscale; + sample.d.z+=((rand() % 100) - 50) / jitterscale; + } + + avcol=trace(&sample); + + serial = sample.serial; /* update our overall serial # */ + + col.r += avcol.r; + col.g += avcol.g; + col.b += avcol.b; + } + + col.r /= (scene.antialiasing + 1.0); + col.g /= (scene.antialiasing + 1.0); + col.b /= (scene.antialiasing + 1.0); + } + + /* Handle overexposure and underexposure here... */ + R=(int) (col.r*255); + if (R > 255) R = 255; + else if (R < 0) R = 0; + + G=(int) (col.g*255); + if (G > 255) G = 255; + else if (G < 0) G = 0; + + B=(int) (col.b*255); + if (B > 255) B = 255; + else if (B < 0) B = 0; + + return video->get_color(R, G, B); + +} + +class parallel_task { +public: + void operator() (const tbb::blocked_range &r) const + { + // task-local storage + unsigned int serial = 1; + unsigned int mboxsize = sizeof(unsigned int)*(max_objectid() + 20); + unsigned int * local_mbox = (unsigned int *) alloca(mboxsize); + memset(local_mbox,0,mboxsize); + + for (int y = r.begin(); y != r.end(); ++y) { { + drawing_area drawing(startx, totaly-y, stopx-startx, 1); + for (int x = startx; x < stopx; x++) { + color_t c = render_one_pixel (x, y, local_mbox, serial, startx, stopx, starty, stopy); + drawing.put_pixel(c); + } } + if(!video->next_frame()) return; + } + } + + parallel_task () {} +}; + +void * thread_trace(thr_parms * parms) +{ + int n, nthreads = tbb::task_scheduler_init::automatic; + char *nthreads_str = getenv ("TBB_NUM_THREADS"); + if (nthreads_str && (sscanf (nthreads_str, "%d", &n) > 0) && (n > 0)) nthreads = n; + tbb::task_scheduler_init init (nthreads); + + // shared but read-only so could be private too + all_parms = parms; + scene = parms->scene; + startx = parms->startx; + stopx = parms->stopx; + starty = parms->starty; + stopy = parms->stopy; + jitterscale = 40.0*(scene.hres + scene.vres); + totaly = parms->scene.vres-1; + + int g, grain_size = 1; + char *grain_str = getenv ("TBB_GRAINSIZE"); + if (grain_str && (sscanf (grain_str, "%d", &g) > 0) && (g > 0)) grain_size = g; + char *sched_str = getenv ("TBB_PARTITIONER"); + static tbb::affinity_partitioner g_ap; + if ( sched_str && !strncmp(sched_str, "aff", 3) ) + tbb::parallel_for (tbb::blocked_range (starty, stopy, grain_size), parallel_task (), g_ap ); + else if ( sched_str && !strncmp(sched_str, "simp", 4) ) + tbb::parallel_for (tbb::blocked_range (starty, stopy, grain_size), parallel_task (), tbb::simple_partitioner() ); + else + tbb::parallel_for (tbb::blocked_range (starty, stopy, grain_size), parallel_task (), tbb::auto_partitioner() ); + + return(NULL); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace_rest.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace_rest.cpp new file mode 100644 index 0000000000..94c18b036c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/trace_rest.cpp @@ -0,0 +1,148 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * trace.c - This file contains the functions for firing primary rays + * and handling subsequent calculations + * + * $Id: trace_rest.cpp,v 1.4 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "tgafile.h" +#include "trace.h" +#include "light.h" +#include "shade.h" +#include "camera.h" +#include "util.h" +#include "intersect.h" +#include "global.h" +#include "ui.h" +#include "tachyon_video.h" + +color trace(ray * primary) { + if (primary->depth > 0) { + VNorm(&primary->d); + reset_intersection(primary->intstruct); + intersect_objects(primary); + return shader(primary); + } + + /* if ray is truncated, return the background as its color */ + return primary->scene->background; +} + +void * thread_io(void * parms) { + thr_io_parms p; + + p= *((thr_io_parms *) parms); + writetgaregion(p.tga, p.iwidth, p.iheight, p.startx, p.starty, + p.stopx, p.stopy, p.buffer); + free(p.buffer); /* free the buffer once we are done with it.. */ + free(parms); + + return(NULL); +} + +void trace_shm(scenedef scene, /*char * buffer, */ int startx, int stopx, int starty, int stopy) { + + thr_parms * parms; + + parms = (thr_parms *) rt_getmem(sizeof(thr_parms)); + + parms->tid=0; + parms->nthr=1; + parms->scene=scene; + parms->startx=startx; + parms->stopx=stopx; + parms->starty=starty; + parms->stopy=stopy; + + thread_trace(parms); + + rt_freemem(parms); +} + +void trace_region(scenedef scene, void * tga, int startx, int starty, int stopx, int stopy) { + + if (scene.verbosemode) { + char msgtxt[2048]; + sprintf(msgtxt, "Node %3d tracing region %4d, %4d ---> %4d, %4d \n", 0, startx,starty,stopx,stopy); + rt_ui_message(MSG_0, msgtxt); + } + + trace_shm(scene, /*buffer,*/ startx, stopx, starty, stopy); +/* not used now + writetgaregion(tga, scene.hres, scene.vres, + startx, starty, stopx, stopy, global_buffer); + + if (scene.rawimage != NULL) { + int x, y; + int totalx = stopx - startx + 1; + for (y=starty; y<=stopy; y++) { + for (x=0; x= EPSILON) && + (VLength(&edge2) >= EPSILON) && + (VLength(&edge3) >= EPSILON)) { + + t=(tri *) rt_getmem(sizeof(tri)); + + t->nextobj = NULL; + t->methods = &tri_methods; + + t->tex = (texture *)tex; + t->v0 = v0; + t->edge1 = edge1; + t->edge2 = edge2; + + return (object *) t; + } + + return NULL; /* was a degenerate triangle */ +} + + +object * newstri(void * tex, vector v0, vector v1, vector v2, + vector n0, vector n1, vector n2) { + stri * t; + vector edge1, edge2, edge3; + + VSub(&v1, &v0, &edge1); + VSub(&v2, &v0, &edge2); + VSub(&v2, &v1, &edge3); + + /* check to see if this will be a degenerate triangle before creation */ + if ((VLength(&edge1) >= EPSILON) && + (VLength(&edge2) >= EPSILON) && + (VLength(&edge3) >= EPSILON)) { + + t=(stri *) rt_getmem(sizeof(stri)); + + t->nextobj = NULL; + t->methods = &stri_methods; + + t->tex = (texture *)tex; + t->v0 = v0; + t->edge1 = edge1; + t->edge2 = edge2; + t->n0 = n0; + t->n1 = n1; + t->n2 = n2; + + return (object *) t; + } + + return NULL; /* was a degenerate triangle */ +} + +#define CROSS(dest,v1,v2) \ + dest.x=v1.y*v2.z-v1.z*v2.y; \ + dest.y=v1.z*v2.x-v1.x*v2.z; \ + dest.z=v1.x*v2.y-v1.y*v2.x; + +#define DOT(v1,v2) (v1.x*v2.x+v1.y*v2.y+v1.z*v2.z) + +#define SUB(dest,v1,v2) \ + dest.x=v1.x-v2.x; \ + dest.y=v1.y-v2.y; \ + dest.z=v1.z-v2.z; + +static int tri_bbox(void * obj, vector * min, vector * max) { + tri * t = (tri *) obj; + vector v1, v2; + + VAdd(&t->v0, &t->edge1, &v1); + VAdd(&t->v0, &t->edge2, &v2); + + min->x = MYMIN( t->v0.x , MYMIN( v1.x , v2.x )); + min->y = MYMIN( t->v0.y , MYMIN( v1.y , v2.y )); + min->z = MYMIN( t->v0.z , MYMIN( v1.z , v2.z )); + + max->x = MYMAX( t->v0.x , MYMAX( v1.x , v2.x )); + max->y = MYMAX( t->v0.y , MYMAX( v1.y , v2.y )); + max->z = MYMAX( t->v0.z , MYMAX( v1.z , v2.z )); + + return 1; +} + +static void tri_intersect(tri * trn, ray * ry) { + vector tvec, pvec, qvec; + flt det, inv_det, t, u, v; + + /* begin calculating determinant - also used to calculate U parameter */ + CROSS(pvec, ry->d, trn->edge2); + + /* if determinant is near zero, ray lies in plane of triangle */ + det = DOT(trn->edge1, pvec); + + if (det > -EPSILON && det < EPSILON) + return; + + inv_det = 1.0 / det; + + /* calculate distance from vert0 to ray origin */ + SUB(tvec, ry->o, trn->v0); + + /* calculate U parameter and test bounds */ + u = DOT(tvec, pvec) * inv_det; + if (u < 0.0 || u > 1.0) + return; + + /* prepare to test V parameter */ + CROSS(qvec, tvec, trn->edge1); + + /* calculate V parameter and test bounds */ + v = DOT(ry->d, qvec) * inv_det; + if (v < 0.0 || u + v > 1.0) + return; + + /* calculate t, ray intersects triangle */ + t = DOT(trn->edge2, qvec) * inv_det; + + add_intersection(t,(object *) trn, ry); +} + + +static void tri_normal(tri * trn, vector * pnt, ray * incident, vector * N) { + + CROSS((*N), trn->edge1, trn->edge2); + + VNorm(N); + + if (VDot(N, &(incident->d)) > 0.0) { + N->x=-N->x; + N->y=-N->y; + N->z=-N->z; + } +} + +static void stri_normal(stri * trn, vector * pnt, ray * incident, vector * N) { + flt U, V, W, lensqr; + vector P, tmp, norm; + + CROSS(norm, trn->edge1, trn->edge2); + lensqr = DOT(norm, norm); + + VSUB((*pnt), trn->v0, P); + + CROSS(tmp, P, trn->edge2); + U = DOT(tmp, norm) / lensqr; + + CROSS(tmp, trn->edge1, P); + V = DOT(tmp, norm) / lensqr; + + W = 1.0 - (U + V); + + N->x = W*trn->n0.x + U*trn->n1.x + V*trn->n2.x; + N->y = W*trn->n0.y + U*trn->n1.y + V*trn->n2.y; + N->z = W*trn->n0.z + U*trn->n1.z + V*trn->n2.z; + + VNorm(N); +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/triangle.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/triangle.h new file mode 100644 index 0000000000..bbeb9a4182 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/triangle.h @@ -0,0 +1,102 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * triangle.h - This file contains the defines for triangles etc. + * + * $Id: triangle.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +object * newtri(void *, vector, vector, vector); +object * newstri(void *, vector, vector, vector, vector, vector, vector); + +#ifdef TRIANGLE_PRIVATE + +#define TRIXMAJOR 0 +#define TRIYMAJOR 1 +#define TRIZMAJOR 2 + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector edge2; + vector edge1; + vector v0; +} tri; + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ + vector edge2; + vector edge1; + vector v0; + vector n0; + vector n1; + vector n2; +} stri; + +static int tri_bbox(void * obj, vector * min, vector * max); + +static void tri_intersect(tri *, ray *); + +static void tri_normal(tri *, vector *, ray *, vector *); +static void stri_normal(stri *, vector *, ray *, vector *); +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/types.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/types.h new file mode 100644 index 0000000000..9f5ee9c661 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/types.h @@ -0,0 +1,234 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +#if __MINGW32__ +#include +#elif _WIN32 +#include +#define alloca _alloca +#elif __FreeBSD__||__NetBSD__ +#include +#else +#include +#endif + +/* + * types.h - This file contains all of the type definitions for the raytracer + * + * $Id: types.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#define MAXOCTNODES 25 /* subdivide octants /w > # of children */ +#define SPEPSILON 0.000001 /* amount to crawl down a ray */ +#define EPSILON 0.000001 /* amount to crawl down a ray */ +#define TWOPI 6.2831853 /* guess */ +#define FHUGE 1e18 /* biggest fp number we can represent */ + +/* Maximum internal table sizes */ +/* Use prime numbers for best memory system performance */ +#define INTTBSIZE 1024 /* maximum intersections we can hold */ +#define MAXLIGHTS 39 /* maximum number of lights in a scene */ +#define MAXIMGS 39 /* maxiumum number of distinct images */ +#define RPCQSIZE 113 /* number of RPC messages to queue */ + +/* Parameter values for rt_boundmode() */ +#define RT_BOUNDING_DISABLED 0 /* spatial subdivision/bounding disabled */ +#define RT_BOUNDING_ENABLED 1 /* spatial subdivision/bounding enabled */ + +/* Parameter values for rt_displaymode() */ +#define RT_DISPLAY_DISABLED 0 /* video output enabled */ +#define RT_DISPLAY_ENABLED 1 /* video output disabled */ + +/* Ray flags */ +#define RT_RAY_REGULAR 1 +#define RT_RAY_SHADOW 2 +#define RT_RAY_BOUNDED 4 +#define RT_RAY_FINISHED 8 + +#ifdef USESINGLEFLT +typedef float flt; /* generic floating point number, using float */ +#else +typedef double flt; /* generic floating point number, using double */ +#endif + +typedef unsigned char byte; /* 1 byte */ +typedef signed int word; /* 32 bit integer */ + +typedef struct { + flt x; /* X coordinate value */ + flt y; /* Y coordinate value */ + flt z; /* Z coordinate value */ +} vector; + +typedef struct { + flt r; /* Red component */ + flt g; /* Green component */ + flt b; /* Blue component */ +} color; + +typedef struct { + byte r; /* Red component */ + byte g; /* Green component */ + byte b; /* Blue component */ +} bytecolor; + +typedef struct { /* Raw 24 bit image structure, for tga, ppm etc */ + int loaded; /* image memory residence flag */ + int xres; /* image X axis size */ + int yres; /* image Y axis size */ + int bpp; /* image bits per pixel */ + char name[96]; /* image filename (with path) */ + unsigned char * data; /* pointer to raw byte image data */ +} rawimage; + +typedef struct { /* Scalar Volume Data */ + int loaded; /* Volume data memory residence flag */ + int xres; /* volume X axis size */ + int yres; /* volume Y axis size */ + int zres; /* volume Z axis size */ + flt opacity; /* opacity per unit length */ + char name[96]; /* Volume data filename */ + unsigned char * data; /* pointer to raw byte volume data */ +} scalarvol; + +typedef struct { + color (* texfunc)(void *, void *, void *); + int shadowcast; /* does the object cast a shadow */ + int islight; /* light flag... */ + color col; /* base object color */ + flt ambient; /* ambient lighting */ + flt diffuse; /* diffuse reflection */ + flt phong; /* phong specular highlights */ + flt phongexp; /* phong exponent/shininess factor */ + int phongtype; /* phong type: 0 == plastic, nonzero == metal */ + flt specular; /* specular reflection */ + flt opacity; /* how opaque the object is */ + vector ctr; /* origin of texture */ + vector rot; /* rotation of texture about origin */ + vector scale; /* scale of texture in x,y,z */ + vector uaxs; /* planar map U axis */ + vector vaxs; /* planar map V axis */ + void * img; /* pointer to image for image mapping */ + void * obj; /* object ptr, hack for volume shaders for now */ +} texture; + +typedef struct { + void (* intersect)(void *, void *); /* intersection func ptr */ + void (* normal)(void *, void *, void *, void *); /* normal function ptr */ + int (* bbox)(void *, vector *, vector *); /* return the object bbox */ + void (* free)(void *); /* free the object */ +} object_methods; + +typedef struct { + unsigned int id; /* Unique Object serial number */ + void * nextobj; /* pointer to next object in list */ + object_methods * methods; /* this object's methods */ + texture * tex; /* object texture */ +} object; + +typedef struct { + object * obj; /* to object we hit */ + flt t; /* distance along the ray to the hit point */ +} intersection; + +typedef struct { + int num; /* number of intersections */ + intersection closest; /* closest intersection > 0.0 */ + intersection list[INTTBSIZE]; /* list of all intersections */ +} intersectstruct; + +typedef struct { + char outfilename[200]; /* name of the output image */ + unsigned char * rawimage; /* pointer to a raw rgb image to be stored */ + int hres; /* horizontal output image resolution */ + int vres; /* vertical output image resolution */ + flt aspectratio; /* aspect ratio of output image */ + int raydepth; /* maximum recursion depth */ + int antialiasing; /* number of antialiasing rays to fire */ + int verbosemode; /* verbose reporting flag */ + int boundmode; /* automatic spatial subdivision flag */ + int boundthresh; /* threshold number of subobjects */ + int displaymode; /* run-time X11 display flag */ + vector camcent; /* center of the camera in world coords */ + vector camviewvec; /* view direction of the camera (Z axis) */ + vector camrightvec; /* right axis for the camera (X axis) */ + vector camupvec; /* up axis for the camera (Y axis) */ + flt camzoom; /* zoom factor for the camera */ + color background; /* scene background color */ +} scenedef; + +typedef struct { + intersectstruct * intstruct; /* ptr to thread's intersection data */ + unsigned int depth; /* levels left to recurse.. (maxdepth - curdepth) */ + unsigned int flags; /* ray flags, any special treatment needed etc */ + unsigned int serial; /* serial number of the ray */ + unsigned int * mbox; /* mailbox array for optimizing intersections */ + vector o; /* origin of the ray X,Y,Z */ + vector d; /* normalized direction of the ray */ + flt maxdist; /* maximum distance to search for intersections */ + vector s; /* startpoint of the ray (may differ from origin */ + vector e; /* endpoint of the ray if bounded */ + scenedef * scene; /* pointer to the scene, for global parms such as */ + /* background colors etc */ +} ray; + +typedef struct { + int type; /* RPC call type */ + int from; /* Sending processor */ + int len; /* length of parms in bytes */ + void * parms; /* Parameters to RPC */ +} rpcmsg; diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.cpp new file mode 100644 index 0000000000..bf54d6d25e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.cpp @@ -0,0 +1,125 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ui.c - Contains functions for dealing with user interfaces + * + * $Id: ui.cpp,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "util.h" +#include "ui.h" + +static void (* rt_static_ui_message) (int, const char *) = NULL; +static void (* rt_static_ui_progress) (int) = NULL; +static int (* rt_static_ui_checkaction) (void) = NULL; + +extern bool silent_mode; + +void set_rt_ui_message(void (* func) (int, const char *)) { + rt_static_ui_message = func; +} + +void set_rt_ui_progress(void (* func) (int)) { + rt_static_ui_progress = func; +} + +void rt_ui_message(int level, const char * msg) { + if (rt_static_ui_message == NULL) { + if ( !silent_mode ) { + fprintf(stderr, "%s\n", msg); + fflush (stderr); + } + } else { + rt_static_ui_message(level, msg); + } +} + +void rt_ui_progress(int percent) { + if (rt_static_ui_progress != NULL) + rt_static_ui_progress(percent); + else { + if ( !silent_mode ) { + fprintf(stderr, "\r %3d%% Complete \r", percent); + fflush(stderr); + } + } +} + +int rt_ui_checkaction(void) { + if (rt_static_ui_checkaction != NULL) + return rt_static_ui_checkaction(); + else + return 0; +} + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.h new file mode 100644 index 0000000000..1fa618d126 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/ui.h @@ -0,0 +1,76 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * ui.h - defines for user interface functions + * + * $Id: ui.h,v 1.2 2007-02-22 17:54:16 Exp $ + */ + +/* Different types of message, for levels of verbosity etc */ +#define MSG_0 100 +#define MSG_1 101 +#define MSG_2 102 +#define MSG_3 103 +#define MSG_4 104 +#define MSG_5 105 +#define MSG_ERR 200 +#define MSG_ABORT 300 + +void rt_ui_message(int, const char *); +void rt_ui_progress(int); +int rt_ui_checkaction(void); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.cpp new file mode 100644 index 0000000000..b40b3e791a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.cpp @@ -0,0 +1,182 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * util.c - Contains all of the timing functions for various platforms. + * + * $Id: util.cpp,v 1.6 2007-02-22 18:17:51 amalakho Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "util.h" +#include "light.h" +#include "global.h" +#include "ui.h" + +void rt_finalize(void); + +#if !defined( _WIN32 ) +#include +#include + +void rt_sleep(int msec) { + usleep(msec*1000); +} + +#else //_WIN32 + +#undef OLDUNIXTIME +#undef STDTIME + +#include + +void rt_sleep(int msec) { + Sleep(msec); +} + +timer gettimer(void) { + return GetTickCount (); +} + +flt timertime(timer st, timer fn) { + double ttime, start, end; + + start = ((double) st) / ((double) 1000.00); + end = ((double) fn) / ((double) 1000.00); + ttime = end - start; + + return ttime; +} +#endif /* _WIN32 */ + +/* if we're on a Unix with gettimeofday() we'll use newer timers */ +#if defined( STDTIME ) + struct timezone tz; + +timer gettimer(void) { + timer t; + gettimeofday(&t, &tz); + return t; +} + +flt timertime(timer st, timer fn) { + double ttime, start, end; + + start = (st.tv_sec+1.0*st.tv_usec / 1000000.0); + end = (fn.tv_sec+1.0*fn.tv_usec / 1000000.0); + ttime = end - start; + + return ttime; +} +#endif /* STDTIME */ + + + +/* use the old fashioned Unix time functions */ +#if defined( OLDUNIXTIME ) +timer gettimer(void) { + return time(NULL); +} + +flt timertime(timer st, timer fn) { + return difftime(fn, st);; +} +#endif /* OLDUNIXTIME */ + + + +/* random other helper utility functions */ +int rt_meminuse(void) { + return rt_mem_in_use; +} + +void * rt_getmem(unsigned int bytes) { + void * mem; + + mem=malloc( bytes ); + if (mem!=NULL) { + rt_mem_in_use += bytes; + } + else { + rtbomb("No more memory!!!!"); + } + return mem; +} + +unsigned int rt_freemem(void * addr) { + unsigned int bytes; + + free(addr); + + bytes=0; + rt_mem_in_use -= bytes; + return bytes; +} + +void rtbomb(const char * msg) { + rt_ui_message(MSG_ERR, msg); + rt_ui_message(MSG_ABORT, "Rendering Aborted."); + + rt_finalize(); + exit(1); +} + +void rtmesg(const char * msg) { + rt_ui_message(MSG_0, msg); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.h new file mode 100644 index 0000000000..de0333980e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/util.h @@ -0,0 +1,86 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * util.h - This file contains defines for the timer functions... + * + * $Id: util.h,v 1.3 2007-02-22 17:54:17 Exp $ + */ + +#include "machine.h" + +#if defined( _WIN32 ) + #include + typedef DWORD timer; +#else + #include + #include + #if defined( STDTIME ) + typedef timeval timer; + #elif defined ( OLDUNIXTIME ) + typedef time_t timer; + #endif /* OLDUNIXTIME */ /* STDTIME */ + #endif /* _WIN32 */ + +timer gettimer(void); +flt timertime(timer st, timer fn); +void rt_sleep(int); +int rt_meminuse(void); +void * rt_getmem(unsigned int); +unsigned int rt_freemem(void *); +void rtbomb(const char *); +void rtmesg(const char *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.cpp new file mode 100644 index 0000000000..acd357b168 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.cpp @@ -0,0 +1,144 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * vector.c - This file contains all of the vector arithmetic functions. + * + * $Id: vector.cpp,v 1.2 2007-02-22 17:54:17 Exp $ + */ + +#include "machine.h" +#include "types.h" +#include "macros.h" + +flt VDot(vector *a, vector *b) { + return (a->x*b->x + a->y*b->y + a->z*b->z); +} + +void VCross(vector * a, vector * b, vector * c) { + c->x = (a->y * b->z) - (a->z * b->y); + c->y = (a->z * b->x) - (a->x * b->z); + c->z = (a->x * b->y) - (a->y * b->x); +} + +flt VLength(vector * a) { + return (flt) sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); +} + +void VNorm(vector * a) { + flt len; + + len=sqrt((a->x * a->x) + (a->y * a->y) + (a->z * a->z)); + if (len != 0.0) { + a->x /= len; + a->y /= len; + a->z /= len; + } +} + +void VAdd(vector * a, vector * b, vector * c) { + c->x = (a->x + b->x); + c->y = (a->y + b->y); + c->z = (a->z + b->z); +} + +void VSub(vector * a, vector * b, vector * c) { + c->x = (a->x - b->x); + c->y = (a->y - b->y); + c->z = (a->z - b->z); +} + +void VAddS(flt a, vector * A, vector * B, vector * C) { + C->x = (a * A->x) + B->x; + C->y = (a * A->y) + B->y; + C->z = (a * A->z) + B->z; +} + +vector Raypnt(ray * a, flt t) { + vector temp; + + temp.x=a->o.x + (a->d.x * t); + temp.y=a->o.y + (a->d.y * t); + temp.z=a->o.z + (a->d.z * t); + + return temp; +} + +void VScale(vector * a, flt s) { + a->x *= s; + a->y *= s; + a->z *= s; +} + +void ColorAddS(color * a, color * b, flt s) { + a->r += b->r * s; + a->g += b->g * s; + a->b += b->b * s; +} + +void ColorAccum(color * a, color * b) { + a->r += b->r; + a->g += b->g; + a->b += b->b; +} + +void ColorScale(color * a, flt s) { + a->r *= s; + a->g *= s; + a->b *= s; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.h new file mode 100644 index 0000000000..d8a3aa9fba --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vector.h @@ -0,0 +1,76 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * vector.h - This file contains declarations of vector functions + * + * $Id: vector.h,v 1.2 2007-02-22 17:54:17 Exp $ + */ + +flt VDot(vector *, vector *); +void VCross(vector *, vector *, vector *); +flt VLength(vector *); +void VNorm(vector *); +void VAdd(vector *, vector *, vector *); +void VSub(vector *, vector *, vector *); +void VAddS(flt, vector *, vector *, vector *); +vector Raypnt(ray *, flt); +void VScale(vector * a, flt s); + +void ColorAddS(color * a, color * b, flt s); +void ColorAccum(color * a, color * b); +void ColorScale(color * a, flt s); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.cpp new file mode 100644 index 0000000000..3b8486094b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.cpp @@ -0,0 +1,312 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * vol.c - Volume rendering helper routines etc. + * + * + * $Id: vol.cpp,v 1.3 2007-02-22 18:17:51 amalakho Exp $ + */ + +#include +#include "machine.h" +#include "types.h" +#include "macros.h" +#include "vector.h" +#include "util.h" +#include "vol.h" +#include "box.h" +#include "trace.h" +#include "ui.h" +#include "light.h" +#include "shade.h" + +int scalarvol_bbox(void * obj, vector * min, vector * max) { + box * b = (box *) obj; + + *min = b->min; + *max = b->max; + + return 1; +} + +void * newscalarvol(void * intex, vector min, vector max, + int xs, int ys, int zs, char * fname, scalarvol * invol) { + box * bx; + texture * tx, * tex; + scalarvol * vol; + + tex=(texture *)intex; + tex->shadowcast = 0; /* doesn't cast a shadow */ + + tx=(texture *)rt_getmem(sizeof(texture)); + + /* is the volume data already loaded? */ + if (invol==NULL) { + vol=(scalarvol *)rt_getmem(sizeof(scalarvol)); + vol->loaded=0; + vol->data=NULL; + } + else + vol=invol; + + vol->opacity=tex->opacity; + vol->xres=xs; + vol->yres=ys; + vol->zres=zs; + strcpy(vol->name, fname); + + tx->ctr.x = 0.0; + tx->ctr.y = 0.0; + tx->ctr.z = 0.0; + tx->rot = tx->ctr; + tx->scale = tx->ctr; + tx->uaxs = tx->ctr; + tx->vaxs = tx->ctr; + + tx->islight = 0; + tx->shadowcast = 0; /* doesn't cast a shadow */ + + tx->col = tex->col; + tx->ambient = 1.0; + tx->diffuse = 0.0; + tx->specular = 0.0; + tx->opacity = 1.0; + tx->img = vol; + tx->texfunc = (color(*)(void *, void *, void *))(scalar_volume_texture); + + bx=newbox(tx, min, max); + tx->obj = (void *) bx; /* XXX hack! */ + + return (void *) bx; +} + + +color VoxelColor(flt scalar) { + color col; + + if (scalar > 1.0) + scalar = 1.0; + + if (scalar < 0.0) + scalar = 0.0; + + if (scalar < 0.25) { + col.r = scalar * 4.0; + col.g = 0.0; + col.b = 0.0; + } + else { + if (scalar < 0.75) { + col.r = 1.0; + col.g = (scalar - 0.25) * 2.0; + col.b = 0.0; + } + else { + col.r = 1.0; + col.g = 1.0; + col.b = (scalar - 0.75) * 4.0; + } + } + + return col; +} + +color scalar_volume_texture(vector * hit, texture * tex, ray * ry) { + color col, col2; + box * bx; + flt a, tx1, tx2, ty1, ty2, tz1, tz2; + flt tnear, tfar; + flt t, tdist, dt, sum, tt; + vector pnt, bln; + scalarvol * vol; + flt scalar, transval; + int x, y, z; + unsigned char * ptr; + + bx=(box *) tex->obj; + vol=(scalarvol *)bx->tex->img; + + col.r=0.0; + col.g=0.0; + col.b=0.0; + + tnear= -FHUGE; + tfar= FHUGE; + + if (ry->d.x == 0.0) { + if ((ry->o.x < bx->min.x) || (ry->o.x > bx->max.x)) return col; + } + else { + tx1 = (bx->min.x - ry->o.x) / ry->d.x; + tx2 = (bx->max.x - ry->o.x) / ry->d.x; + if (tx1 > tx2) { a=tx1; tx1=tx2; tx2=a; } + if (tx1 > tnear) tnear=tx1; + if (tx2 < tfar) tfar=tx2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (ry->d.y == 0.0) { + if ((ry->o.y < bx->min.y) || (ry->o.y > bx->max.y)) return col; + } + else { + ty1 = (bx->min.y - ry->o.y) / ry->d.y; + ty2 = (bx->max.y - ry->o.y) / ry->d.y; + if (ty1 > ty2) { a=ty1; ty1=ty2; ty2=a; } + if (ty1 > tnear) tnear=ty1; + if (ty2 < tfar) tfar=ty2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (ry->d.z == 0.0) { + if ((ry->o.z < bx->min.z) || (ry->o.z > bx->max.z)) return col; + } + else { + tz1 = (bx->min.z - ry->o.z) / ry->d.z; + tz2 = (bx->max.z - ry->o.z) / ry->d.z; + if (tz1 > tz2) { a=tz1; tz1=tz2; tz2=a; } + if (tz1 > tnear) tnear=tz1; + if (tz2 < tfar) tfar=tz2; + } + if (tnear > tfar) return col; + if (tfar < 0.0) return col; + + if (tnear < 0.0) tnear=0.0; + + tdist=sqrt((flt) (vol->xres*vol->xres + vol->yres*vol->yres + vol->zres*vol->zres)); + tt = (vol->opacity / tdist); + + bln.x=fabs(bx->min.x - bx->max.x); + bln.y=fabs(bx->min.y - bx->max.y); + bln.z=fabs(bx->min.z - bx->max.z); + + dt=sqrt(bln.x*bln.x + bln.y*bln.y + bln.z*bln.z) / tdist; + sum=0.0; + + /* move the volume residency check out of loop.. */ + if (!vol->loaded) { + LoadVol(vol); + vol->loaded=1; + } + + for (t=tnear; t<=tfar; t+=dt) { + pnt.x=((ry->o.x + (ry->d.x * t)) - bx->min.x) / bln.x; + pnt.y=((ry->o.y + (ry->d.y * t)) - bx->min.y) / bln.y; + pnt.z=((ry->o.z + (ry->d.z * t)) - bx->min.z) / bln.z; + + x=(int) ((vol->xres - 1.5) * pnt.x + 0.5); + y=(int) ((vol->yres - 1.5) * pnt.y + 0.5); + z=(int) ((vol->zres - 1.5) * pnt.z + 0.5); + + ptr = vol->data + ((vol->xres * vol->yres * z) + (vol->xres * y) + x); + + scalar = (flt) ((flt) 1.0 * ((int) ptr[0])) / 255.0; + + sum += tt * scalar; + + transval = tt * scalar; + + col2 = VoxelColor(scalar); + + if (sum < 1.0) { + col.r += transval * col2.r; + col.g += transval * col2.g; + col.b += transval * col2.b; + if (sum < 0.0) sum=0.0; + } + else { + sum=1.0; + } + } + + if (sum < 1.0) { /* spawn transmission rays / refraction */ + color transcol; + + transcol = shade_transmission(ry, hit, 1.0 - sum); + + col.r += transcol.r; /* add the transmitted ray */ + col.g += transcol.g; /* to the diffuse and */ + col.b += transcol.b; /* transmission total.. */ + } + + return col; +} + +void LoadVol(scalarvol * vol) { + FILE * dfile; + int status; + char msgtxt[2048]; + + dfile=fopen(vol->name, "r"); + if (dfile==NULL) { + char msgtxt[2048]; + sprintf(msgtxt, "Vol: can't open %s for input!!! Aborting\n",vol->name); + rt_ui_message(MSG_ERR, msgtxt); + rt_ui_message(MSG_ABORT, "Rendering Aborted."); + exit(1); + } + + sprintf(msgtxt, "loading %dx%dx%d volume set from %s", + vol->xres, vol->yres, vol->zres, vol->name); + rt_ui_message(MSG_0, msgtxt); + + vol->data = (unsigned char *)rt_getmem(vol->xres * vol->yres * vol->zres); + + status=fread(vol->data, 1, (vol->xres * vol->yres * vol->zres), dfile); +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.h new file mode 100644 index 0000000000..0529dc185e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/src/vol.h @@ -0,0 +1,71 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + The original source for this example is + Copyright (c) 1994-2008 John E. Stone + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. +*/ + +/* + * vol.h - Volume rendering definitions etc. + * + * + * $Id: vol.h,v 1.2 2007-02-22 17:54:17 Exp $ + */ + + +void * newscalarvol(void * intex, vector min, vector max, + int xs, int ys, int zs, + char * fname, scalarvol * invol); + +void LoadVol(scalarvol *); +color scalar_volume_texture(vector *, texture *, ray *); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..b4ee8cc8d6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/project.pbxproj @@ -0,0 +1,938 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 840116E1152CBBF600B07E4D /* api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B6152CBBF600B07E4D /* api.cpp */; }; + 840116E2152CBBF600B07E4D /* apigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B7152CBBF600B07E4D /* apigeom.cpp */; }; + 840116E3152CBBF600B07E4D /* apitrigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B8152CBBF600B07E4D /* apitrigeom.cpp */; }; + 840116E4152CBBF600B07E4D /* bndbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B9152CBBF600B07E4D /* bndbox.cpp */; }; + 840116E5152CBBF600B07E4D /* box.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BA152CBBF600B07E4D /* box.cpp */; }; + 840116E6152CBBF600B07E4D /* camera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BB152CBBF600B07E4D /* camera.cpp */; }; + 840116E7152CBBF600B07E4D /* coordsys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BC152CBBF600B07E4D /* coordsys.cpp */; }; + 840116E8152CBBF600B07E4D /* cylinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BD152CBBF600B07E4D /* cylinder.cpp */; }; + 840116E9152CBBF600B07E4D /* extvol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BE152CBBF600B07E4D /* extvol.cpp */; }; + 840116EA152CBBF600B07E4D /* global.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BF152CBBF600B07E4D /* global.cpp */; }; + 840116EB152CBBF600B07E4D /* grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C0152CBBF600B07E4D /* grid.cpp */; }; + 840116EC152CBBF600B07E4D /* imageio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C1152CBBF600B07E4D /* imageio.cpp */; }; + 840116ED152CBBF600B07E4D /* imap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C2152CBBF600B07E4D /* imap.cpp */; }; + 840116EE152CBBF600B07E4D /* intersect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C3152CBBF600B07E4D /* intersect.cpp */; }; + 840116EF152CBBF600B07E4D /* jpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C4152CBBF600B07E4D /* jpeg.cpp */; }; + 840116F0152CBBF600B07E4D /* light.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C5152CBBF600B07E4D /* light.cpp */; }; + 840116F1152CBBF600B07E4D /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C6152CBBF600B07E4D /* main.cpp */; }; + 840116F2152CBBF600B07E4D /* objbound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C7152CBBF600B07E4D /* objbound.cpp */; }; + 840116F3152CBBF600B07E4D /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C8152CBBF600B07E4D /* parse.cpp */; }; + 840116F4152CBBF600B07E4D /* plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C9152CBBF600B07E4D /* plane.cpp */; }; + 840116F5152CBBF600B07E4D /* ppm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CA152CBBF600B07E4D /* ppm.cpp */; }; + 840116F6152CBBF600B07E4D /* pthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CB152CBBF600B07E4D /* pthread.cpp */; }; + 840116F7152CBBF600B07E4D /* quadric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CC152CBBF600B07E4D /* quadric.cpp */; }; + 840116F8152CBBF600B07E4D /* render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CD152CBBF600B07E4D /* render.cpp */; }; + 840116F9152CBBF600B07E4D /* ring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CE152CBBF600B07E4D /* ring.cpp */; }; + 840116FA152CBBF600B07E4D /* shade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CF152CBBF600B07E4D /* shade.cpp */; }; + 840116FB152CBBF600B07E4D /* sphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D0152CBBF600B07E4D /* sphere.cpp */; }; + 840116FC152CBBF600B07E4D /* tachyon_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D1152CBBF600B07E4D /* tachyon_video.cpp */; }; + 840116FD152CBBF600B07E4D /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D2152CBBF600B07E4D /* texture.cpp */; }; + 840116FE152CBBF600B07E4D /* tgafile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D3152CBBF600B07E4D /* tgafile.cpp */; }; + 840116FF152CBBF600B07E4D /* trace_rest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D4152CBBF600B07E4D /* trace_rest.cpp */; }; + 84011707152CBBF600B07E4D /* triangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DC152CBBF600B07E4D /* triangle.cpp */; }; + 84011708152CBBF600B07E4D /* ui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DD152CBBF600B07E4D /* ui.cpp */; }; + 84011709152CBBF600B07E4D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DE152CBBF600B07E4D /* util.cpp */; }; + 8401170A152CBBF600B07E4D /* vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DF152CBBF600B07E4D /* vector.cpp */; }; + 8401170B152CBBF600B07E4D /* vol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116E0152CBBF600B07E4D /* vol.cpp */; }; + 8401172A152D6E3E00B07E4D /* trace.tbb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84011729152D6E3E00B07E4D /* trace.tbb.cpp */; }; + 8401172D152D6F6C00B07E4D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 8401172E152D6F6C00B07E4D /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 8401172F152D6F6C00B07E4D /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84011730152D6F6C00B07E4D /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 84011731152D6F6C00B07E4D /* api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B6152CBBF600B07E4D /* api.cpp */; }; + 84011732152D6F6C00B07E4D /* apigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B7152CBBF600B07E4D /* apigeom.cpp */; }; + 84011733152D6F6C00B07E4D /* apitrigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B8152CBBF600B07E4D /* apitrigeom.cpp */; }; + 84011734152D6F6C00B07E4D /* bndbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B9152CBBF600B07E4D /* bndbox.cpp */; }; + 84011735152D6F6C00B07E4D /* box.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BA152CBBF600B07E4D /* box.cpp */; }; + 84011736152D6F6C00B07E4D /* camera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BB152CBBF600B07E4D /* camera.cpp */; }; + 84011737152D6F6C00B07E4D /* coordsys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BC152CBBF600B07E4D /* coordsys.cpp */; }; + 84011738152D6F6C00B07E4D /* cylinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BD152CBBF600B07E4D /* cylinder.cpp */; }; + 84011739152D6F6C00B07E4D /* extvol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BE152CBBF600B07E4D /* extvol.cpp */; }; + 8401173A152D6F6C00B07E4D /* global.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BF152CBBF600B07E4D /* global.cpp */; }; + 8401173B152D6F6C00B07E4D /* grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C0152CBBF600B07E4D /* grid.cpp */; }; + 8401173C152D6F6C00B07E4D /* imageio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C1152CBBF600B07E4D /* imageio.cpp */; }; + 8401173D152D6F6C00B07E4D /* imap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C2152CBBF600B07E4D /* imap.cpp */; }; + 8401173E152D6F6C00B07E4D /* intersect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C3152CBBF600B07E4D /* intersect.cpp */; }; + 8401173F152D6F6C00B07E4D /* jpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C4152CBBF600B07E4D /* jpeg.cpp */; }; + 84011740152D6F6C00B07E4D /* light.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C5152CBBF600B07E4D /* light.cpp */; }; + 84011741152D6F6C00B07E4D /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C6152CBBF600B07E4D /* main.cpp */; }; + 84011742152D6F6C00B07E4D /* objbound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C7152CBBF600B07E4D /* objbound.cpp */; }; + 84011743152D6F6C00B07E4D /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C8152CBBF600B07E4D /* parse.cpp */; }; + 84011744152D6F6C00B07E4D /* plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C9152CBBF600B07E4D /* plane.cpp */; }; + 84011745152D6F6C00B07E4D /* ppm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CA152CBBF600B07E4D /* ppm.cpp */; }; + 84011746152D6F6C00B07E4D /* pthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CB152CBBF600B07E4D /* pthread.cpp */; }; + 84011747152D6F6C00B07E4D /* quadric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CC152CBBF600B07E4D /* quadric.cpp */; }; + 84011748152D6F6C00B07E4D /* render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CD152CBBF600B07E4D /* render.cpp */; }; + 84011749152D6F6C00B07E4D /* ring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CE152CBBF600B07E4D /* ring.cpp */; }; + 8401174A152D6F6C00B07E4D /* shade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CF152CBBF600B07E4D /* shade.cpp */; }; + 8401174B152D6F6C00B07E4D /* sphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D0152CBBF600B07E4D /* sphere.cpp */; }; + 8401174C152D6F6C00B07E4D /* tachyon_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D1152CBBF600B07E4D /* tachyon_video.cpp */; }; + 8401174D152D6F6C00B07E4D /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D2152CBBF600B07E4D /* texture.cpp */; }; + 8401174E152D6F6C00B07E4D /* tgafile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D3152CBBF600B07E4D /* tgafile.cpp */; }; + 8401174F152D6F6C00B07E4D /* trace_rest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D4152CBBF600B07E4D /* trace_rest.cpp */; }; + 84011750152D6F6C00B07E4D /* triangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DC152CBBF600B07E4D /* triangle.cpp */; }; + 84011751152D6F6C00B07E4D /* ui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DD152CBBF600B07E4D /* ui.cpp */; }; + 84011752152D6F6C00B07E4D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DE152CBBF600B07E4D /* util.cpp */; }; + 84011753152D6F6C00B07E4D /* vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DF152CBBF600B07E4D /* vector.cpp */; }; + 84011754152D6F6C00B07E4D /* vol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116E0152CBBF600B07E4D /* vol.cpp */; }; + 84011757152D6F6C00B07E4D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; + 84011758152D6F6C00B07E4D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84011759152D6F6C00B07E4D /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 8401175B152D6F6C00B07E4D /* (null) in Resources */ = {isa = PBXBuildFile; }; + 8401175C152D6F6C00B07E4D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 8401175D152D6F6C00B07E4D /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 84011766152D6F8400B07E4D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84011767152D6F8400B07E4D /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 84011768152D6F8400B07E4D /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84011769152D6F8400B07E4D /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 8401176A152D6F8400B07E4D /* api.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B6152CBBF600B07E4D /* api.cpp */; }; + 8401176B152D6F8400B07E4D /* apigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B7152CBBF600B07E4D /* apigeom.cpp */; }; + 8401176C152D6F8400B07E4D /* apitrigeom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B8152CBBF600B07E4D /* apitrigeom.cpp */; }; + 8401176D152D6F8400B07E4D /* bndbox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116B9152CBBF600B07E4D /* bndbox.cpp */; }; + 8401176E152D6F8400B07E4D /* box.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BA152CBBF600B07E4D /* box.cpp */; }; + 8401176F152D6F8400B07E4D /* camera.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BB152CBBF600B07E4D /* camera.cpp */; }; + 84011770152D6F8400B07E4D /* coordsys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BC152CBBF600B07E4D /* coordsys.cpp */; }; + 84011771152D6F8400B07E4D /* cylinder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BD152CBBF600B07E4D /* cylinder.cpp */; }; + 84011772152D6F8400B07E4D /* extvol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BE152CBBF600B07E4D /* extvol.cpp */; }; + 84011773152D6F8400B07E4D /* global.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116BF152CBBF600B07E4D /* global.cpp */; }; + 84011774152D6F8400B07E4D /* grid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C0152CBBF600B07E4D /* grid.cpp */; }; + 84011775152D6F8400B07E4D /* imageio.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C1152CBBF600B07E4D /* imageio.cpp */; }; + 84011776152D6F8400B07E4D /* imap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C2152CBBF600B07E4D /* imap.cpp */; }; + 84011777152D6F8400B07E4D /* intersect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C3152CBBF600B07E4D /* intersect.cpp */; }; + 84011778152D6F8400B07E4D /* jpeg.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C4152CBBF600B07E4D /* jpeg.cpp */; }; + 84011779152D6F8400B07E4D /* light.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C5152CBBF600B07E4D /* light.cpp */; }; + 8401177A152D6F8400B07E4D /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C6152CBBF600B07E4D /* main.cpp */; }; + 8401177B152D6F8400B07E4D /* objbound.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C7152CBBF600B07E4D /* objbound.cpp */; }; + 8401177C152D6F8400B07E4D /* parse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C8152CBBF600B07E4D /* parse.cpp */; }; + 8401177D152D6F8400B07E4D /* plane.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116C9152CBBF600B07E4D /* plane.cpp */; }; + 8401177E152D6F8400B07E4D /* ppm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CA152CBBF600B07E4D /* ppm.cpp */; }; + 8401177F152D6F8400B07E4D /* pthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CB152CBBF600B07E4D /* pthread.cpp */; }; + 84011780152D6F8400B07E4D /* quadric.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CC152CBBF600B07E4D /* quadric.cpp */; }; + 84011781152D6F8400B07E4D /* render.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CD152CBBF600B07E4D /* render.cpp */; }; + 84011782152D6F8400B07E4D /* ring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CE152CBBF600B07E4D /* ring.cpp */; }; + 84011783152D6F8400B07E4D /* shade.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116CF152CBBF600B07E4D /* shade.cpp */; }; + 84011784152D6F8400B07E4D /* sphere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D0152CBBF600B07E4D /* sphere.cpp */; }; + 84011785152D6F8400B07E4D /* tachyon_video.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D1152CBBF600B07E4D /* tachyon_video.cpp */; }; + 84011786152D6F8400B07E4D /* texture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D2152CBBF600B07E4D /* texture.cpp */; }; + 84011787152D6F8400B07E4D /* tgafile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D3152CBBF600B07E4D /* tgafile.cpp */; }; + 84011788152D6F8400B07E4D /* trace_rest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116D4152CBBF600B07E4D /* trace_rest.cpp */; }; + 84011789152D6F8400B07E4D /* triangle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DC152CBBF600B07E4D /* triangle.cpp */; }; + 8401178A152D6F8400B07E4D /* ui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DD152CBBF600B07E4D /* ui.cpp */; }; + 8401178B152D6F8400B07E4D /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DE152CBBF600B07E4D /* util.cpp */; }; + 8401178C152D6F8400B07E4D /* vector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116DF152CBBF600B07E4D /* vector.cpp */; }; + 8401178D152D6F8400B07E4D /* vol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 840116E0152CBBF600B07E4D /* vol.cpp */; }; + 84011790152D6F8400B07E4D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; + 84011791152D6F8400B07E4D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84011792152D6F8400B07E4D /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 84011794152D6F8400B07E4D /* (null) in Resources */ = {isa = PBXBuildFile; }; + 84011795152D6F8400B07E4D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 84011796152D6F8400B07E4D /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 840117A1152D6FF900B07E4D /* trace.serial.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8401179F152D6FD100B07E4D /* trace.serial.cpp */; }; + 840117A2152D701A00B07E4D /* trace.tbb1d.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8401179D152D6FC600B07E4D /* trace.tbb1d.cpp */; }; + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84B8DA7A152CA90100D59B95 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 84011691152CBBC900B07E4D /* api.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = api.h; path = ../src/api.h; sourceTree = ""; }; + 84011692152CBBC900B07E4D /* apitrigeom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = apitrigeom.h; path = ../src/apitrigeom.h; sourceTree = ""; }; + 84011693152CBBC900B07E4D /* bndbox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bndbox.h; path = ../src/bndbox.h; sourceTree = ""; }; + 84011694152CBBC900B07E4D /* box.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = box.h; path = ../src/box.h; sourceTree = ""; }; + 84011695152CBBC900B07E4D /* camera.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = camera.h; path = ../src/camera.h; sourceTree = ""; }; + 84011696152CBBC900B07E4D /* coordsys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = coordsys.h; path = ../src/coordsys.h; sourceTree = ""; }; + 84011697152CBBC900B07E4D /* cylinder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = cylinder.h; path = ../src/cylinder.h; sourceTree = ""; }; + 84011698152CBBC900B07E4D /* extvol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = extvol.h; path = ../src/extvol.h; sourceTree = ""; }; + 84011699152CBBC900B07E4D /* global.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = global.h; path = ../src/global.h; sourceTree = ""; }; + 8401169A152CBBC900B07E4D /* grid.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = grid.h; path = ../src/grid.h; sourceTree = ""; }; + 8401169B152CBBC900B07E4D /* imageio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imageio.h; path = ../src/imageio.h; sourceTree = ""; }; + 8401169C152CBBC900B07E4D /* imap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imap.h; path = ../src/imap.h; sourceTree = ""; }; + 8401169D152CBBC900B07E4D /* intersect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = intersect.h; path = ../src/intersect.h; sourceTree = ""; }; + 8401169E152CBBC900B07E4D /* jpeg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jpeg.h; path = ../src/jpeg.h; sourceTree = ""; }; + 8401169F152CBBC900B07E4D /* light.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = light.h; path = ../src/light.h; sourceTree = ""; }; + 840116A0152CBBC900B07E4D /* machine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = machine.h; path = ../src/machine.h; sourceTree = ""; }; + 840116A1152CBBC900B07E4D /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macros.h; path = ../src/macros.h; sourceTree = ""; }; + 840116A2152CBBC900B07E4D /* objbound.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = objbound.h; path = ../src/objbound.h; sourceTree = ""; }; + 840116A3152CBBC900B07E4D /* parse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = parse.h; path = ../src/parse.h; sourceTree = ""; }; + 840116A4152CBBC900B07E4D /* plane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = plane.h; path = ../src/plane.h; sourceTree = ""; }; + 840116A5152CBBC900B07E4D /* ppm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ppm.h; path = ../src/ppm.h; sourceTree = ""; }; + 840116A7152CBBC900B07E4D /* quadric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = quadric.h; path = ../src/quadric.h; sourceTree = ""; }; + 840116A8152CBBC900B07E4D /* render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = render.h; path = ../src/render.h; sourceTree = ""; }; + 840116A9152CBBC900B07E4D /* ring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ring.h; path = ../src/ring.h; sourceTree = ""; }; + 840116AA152CBBC900B07E4D /* shade.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shade.h; path = ../src/shade.h; sourceTree = ""; }; + 840116AB152CBBC900B07E4D /* sphere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = sphere.h; path = ../src/sphere.h; sourceTree = ""; }; + 840116AC152CBBC900B07E4D /* tachyon_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tachyon_video.h; path = ../src/tachyon_video.h; sourceTree = ""; }; + 840116AD152CBBC900B07E4D /* texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = texture.h; path = ../src/texture.h; sourceTree = ""; }; + 840116AE152CBBC900B07E4D /* tgafile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tgafile.h; path = ../src/tgafile.h; sourceTree = ""; }; + 840116AF152CBBC900B07E4D /* trace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = trace.h; path = ../src/trace.h; sourceTree = ""; }; + 840116B0152CBBC900B07E4D /* triangle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = triangle.h; path = ../src/triangle.h; sourceTree = ""; }; + 840116B1152CBBC900B07E4D /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = types.h; path = ../src/types.h; sourceTree = ""; }; + 840116B2152CBBC900B07E4D /* ui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ui.h; path = ../src/ui.h; sourceTree = ""; }; + 840116B3152CBBC900B07E4D /* util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = util.h; path = ../src/util.h; sourceTree = ""; }; + 840116B4152CBBC900B07E4D /* vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vector.h; path = ../src/vector.h; sourceTree = ""; }; + 840116B5152CBBC900B07E4D /* vol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = vol.h; path = ../src/vol.h; sourceTree = ""; }; + 840116B6152CBBF600B07E4D /* api.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = api.cpp; sourceTree = ""; }; + 840116B7152CBBF600B07E4D /* apigeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = apigeom.cpp; sourceTree = ""; }; + 840116B8152CBBF600B07E4D /* apitrigeom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = apitrigeom.cpp; sourceTree = ""; }; + 840116B9152CBBF600B07E4D /* bndbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bndbox.cpp; sourceTree = ""; }; + 840116BA152CBBF600B07E4D /* box.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = box.cpp; sourceTree = ""; }; + 840116BB152CBBF600B07E4D /* camera.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = camera.cpp; sourceTree = ""; }; + 840116BC152CBBF600B07E4D /* coordsys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coordsys.cpp; sourceTree = ""; }; + 840116BD152CBBF600B07E4D /* cylinder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cylinder.cpp; sourceTree = ""; }; + 840116BE152CBBF600B07E4D /* extvol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = extvol.cpp; sourceTree = ""; }; + 840116BF152CBBF600B07E4D /* global.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = global.cpp; sourceTree = ""; }; + 840116C0152CBBF600B07E4D /* grid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = grid.cpp; sourceTree = ""; }; + 840116C1152CBBF600B07E4D /* imageio.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imageio.cpp; sourceTree = ""; }; + 840116C2152CBBF600B07E4D /* imap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = imap.cpp; sourceTree = ""; }; + 840116C3152CBBF600B07E4D /* intersect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = intersect.cpp; sourceTree = ""; }; + 840116C4152CBBF600B07E4D /* jpeg.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = jpeg.cpp; sourceTree = ""; }; + 840116C5152CBBF600B07E4D /* light.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = light.cpp; sourceTree = ""; }; + 840116C6152CBBF600B07E4D /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; + 840116C7152CBBF600B07E4D /* objbound.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = objbound.cpp; sourceTree = ""; }; + 840116C8152CBBF600B07E4D /* parse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse.cpp; sourceTree = ""; }; + 840116C9152CBBF600B07E4D /* plane.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = plane.cpp; sourceTree = ""; }; + 840116CA152CBBF600B07E4D /* ppm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ppm.cpp; sourceTree = ""; }; + 840116CB152CBBF600B07E4D /* pthread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pthread.cpp; sourceTree = ""; }; + 840116CC152CBBF600B07E4D /* quadric.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = quadric.cpp; sourceTree = ""; }; + 840116CD152CBBF600B07E4D /* render.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = render.cpp; sourceTree = ""; }; + 840116CE152CBBF600B07E4D /* ring.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ring.cpp; sourceTree = ""; }; + 840116CF152CBBF600B07E4D /* shade.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = shade.cpp; sourceTree = ""; }; + 840116D0152CBBF600B07E4D /* sphere.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sphere.cpp; sourceTree = ""; }; + 840116D1152CBBF600B07E4D /* tachyon_video.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tachyon_video.cpp; sourceTree = ""; }; + 840116D2152CBBF600B07E4D /* texture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = texture.cpp; sourceTree = ""; }; + 840116D3152CBBF600B07E4D /* tgafile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tgafile.cpp; sourceTree = ""; }; + 840116D4152CBBF600B07E4D /* trace_rest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trace_rest.cpp; sourceTree = ""; }; + 840116DC152CBBF600B07E4D /* triangle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = triangle.cpp; sourceTree = ""; }; + 840116DD152CBBF600B07E4D /* ui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ui.cpp; sourceTree = ""; }; + 840116DE152CBBF600B07E4D /* util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = util.cpp; sourceTree = ""; }; + 840116DF152CBBF600B07E4D /* vector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vector.cpp; sourceTree = ""; }; + 840116E0152CBBF600B07E4D /* vol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vol.cpp; sourceTree = ""; }; + 84011729152D6E3E00B07E4D /* trace.tbb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trace.tbb.cpp; sourceTree = ""; }; + 84011761152D6F6C00B07E4D /* tachyon.serial.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tachyon.serial.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8401179A152D6F8400B07E4D /* tachyon.tbb1d.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tachyon.tbb1d.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 8401179D152D6FC600B07E4D /* trace.tbb1d.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trace.tbb1d.cpp; sourceTree = ""; }; + 8401179F152D6FD100B07E4D /* trace.serial.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = trace.serial.cpp; sourceTree = ""; }; + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; + 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; + 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbbAppDelegate.h; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.h; sourceTree = ""; }; + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tbbAppDelegate.m; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.m; sourceTree = ""; }; + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tbbExample-Prefix.pch"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; sourceTree = ""; }; + 84B8DA7D152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; + 84B8DA7F152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = MainMenu.xib; sourceTree = ""; }; + 84B8DA99152CADF400D59B95 /* macvideo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macvideo.cpp; path = ../../../common/gui/macvideo.cpp; sourceTree = ""; }; + 84D017511527431F0008A4E0 /* tbbExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84D017551527431F0008A4E0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 84D017581527431F0008A4E0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84011756152D6F6C00B07E4D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84011757152D6F6C00B07E4D /* OpenGL.framework in Frameworks */, + 84011758152D6F6C00B07E4D /* Cocoa.framework in Frameworks */, + 84011759152D6F6C00B07E4D /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8401178F152D6F8400B07E4D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84011790152D6F8400B07E4D /* OpenGL.framework in Frameworks */, + 84011791152D6F8400B07E4D /* Cocoa.framework in Frameworks */, + 84011792152D6F8400B07E4D /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84D0174E1527431F0008A4E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 8401160E152CB8A600B07E4D /* Sources */ = { + isa = PBXGroup; + children = ( + 8401179F152D6FD100B07E4D /* trace.serial.cpp */, + 8401179D152D6FC600B07E4D /* trace.tbb1d.cpp */, + 84011729152D6E3E00B07E4D /* trace.tbb.cpp */, + 840116B6152CBBF600B07E4D /* api.cpp */, + 840116B7152CBBF600B07E4D /* apigeom.cpp */, + 840116B8152CBBF600B07E4D /* apitrigeom.cpp */, + 840116B9152CBBF600B07E4D /* bndbox.cpp */, + 840116BA152CBBF600B07E4D /* box.cpp */, + 840116BB152CBBF600B07E4D /* camera.cpp */, + 840116BC152CBBF600B07E4D /* coordsys.cpp */, + 840116BD152CBBF600B07E4D /* cylinder.cpp */, + 840116BE152CBBF600B07E4D /* extvol.cpp */, + 840116BF152CBBF600B07E4D /* global.cpp */, + 840116C0152CBBF600B07E4D /* grid.cpp */, + 840116C1152CBBF600B07E4D /* imageio.cpp */, + 840116C2152CBBF600B07E4D /* imap.cpp */, + 840116C3152CBBF600B07E4D /* intersect.cpp */, + 840116C4152CBBF600B07E4D /* jpeg.cpp */, + 840116C5152CBBF600B07E4D /* light.cpp */, + 840116C6152CBBF600B07E4D /* main.cpp */, + 840116C7152CBBF600B07E4D /* objbound.cpp */, + 840116C8152CBBF600B07E4D /* parse.cpp */, + 840116C9152CBBF600B07E4D /* plane.cpp */, + 840116CA152CBBF600B07E4D /* ppm.cpp */, + 840116CB152CBBF600B07E4D /* pthread.cpp */, + 840116CC152CBBF600B07E4D /* quadric.cpp */, + 840116CD152CBBF600B07E4D /* render.cpp */, + 840116CE152CBBF600B07E4D /* ring.cpp */, + 840116CF152CBBF600B07E4D /* shade.cpp */, + 840116D0152CBBF600B07E4D /* sphere.cpp */, + 840116D1152CBBF600B07E4D /* tachyon_video.cpp */, + 840116D2152CBBF600B07E4D /* texture.cpp */, + 840116D3152CBBF600B07E4D /* tgafile.cpp */, + 840116D4152CBBF600B07E4D /* trace_rest.cpp */, + 840116DC152CBBF600B07E4D /* triangle.cpp */, + 840116DD152CBBF600B07E4D /* ui.cpp */, + 840116DE152CBBF600B07E4D /* util.cpp */, + 840116DF152CBBF600B07E4D /* vector.cpp */, + 840116E0152CBBF600B07E4D /* vol.cpp */, + ); + name = Sources; + path = ../src; + sourceTree = ""; + }; + 84011690152CBB3C00B07E4D /* Headers */ = { + isa = PBXGroup; + children = ( + 84011691152CBBC900B07E4D /* api.h */, + 84011692152CBBC900B07E4D /* apitrigeom.h */, + 84011693152CBBC900B07E4D /* bndbox.h */, + 84011694152CBBC900B07E4D /* box.h */, + 84011695152CBBC900B07E4D /* camera.h */, + 84011696152CBBC900B07E4D /* coordsys.h */, + 84011697152CBBC900B07E4D /* cylinder.h */, + 84011698152CBBC900B07E4D /* extvol.h */, + 84011699152CBBC900B07E4D /* global.h */, + 8401169A152CBBC900B07E4D /* grid.h */, + 8401169B152CBBC900B07E4D /* imageio.h */, + 8401169C152CBBC900B07E4D /* imap.h */, + 8401169D152CBBC900B07E4D /* intersect.h */, + 8401169E152CBBC900B07E4D /* jpeg.h */, + 8401169F152CBBC900B07E4D /* light.h */, + 840116A0152CBBC900B07E4D /* machine.h */, + 840116A1152CBBC900B07E4D /* macros.h */, + 840116A2152CBBC900B07E4D /* objbound.h */, + 840116A3152CBBC900B07E4D /* parse.h */, + 840116A4152CBBC900B07E4D /* plane.h */, + 840116A5152CBBC900B07E4D /* ppm.h */, + 840116A7152CBBC900B07E4D /* quadric.h */, + 840116A8152CBBC900B07E4D /* render.h */, + 840116A9152CBBC900B07E4D /* ring.h */, + 840116AA152CBBC900B07E4D /* shade.h */, + 840116AB152CBBC900B07E4D /* sphere.h */, + 840116AC152CBBC900B07E4D /* tachyon_video.h */, + 840116AD152CBBC900B07E4D /* texture.h */, + 840116AE152CBBC900B07E4D /* tgafile.h */, + 840116AF152CBBC900B07E4D /* trace.h */, + 840116B0152CBBC900B07E4D /* triangle.h */, + 840116B1152CBBC900B07E4D /* types.h */, + 840116B2152CBBC900B07E4D /* ui.h */, + 840116B3152CBBC900B07E4D /* util.h */, + 840116B4152CBBC900B07E4D /* vector.h */, + 840116B5152CBBC900B07E4D /* vol.h */, + ); + name = Headers; + sourceTree = ""; + }; + 84B8DA6C152CA8D900D59B95 /* tbbExample */ = { + isa = PBXGroup; + children = ( + 84011690152CBB3C00B07E4D /* Headers */, + 8401160E152CB8A600B07E4D /* Sources */, + 84B8DA98152CAD8600D59B95 /* Gui layer */, + 84B8DA7B152CA97B00D59B95 /* Resources */, + ); + name = tbbExample; + sourceTree = ""; + }; + 84B8DA7B152CA97B00D59B95 /* Resources */ = { + isa = PBXGroup; + children = ( + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, + ); + name = Resources; + path = ../../../common/gui/xcode/tbbExample/en.lproj; + sourceTree = ""; + }; + 84B8DA98152CAD8600D59B95 /* Gui layer */ = { + isa = PBXGroup; + children = ( + 84B8DA99152CADF400D59B95 /* macvideo.cpp */, + 84B8DA6F152CA90100D59B95 /* main.m */, + 84B8DA70152CA90100D59B95 /* OpenGLView.h */, + 84B8DA71152CA90100D59B95 /* OpenGLView.m */, + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */, + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */, + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */, + ); + name = "Gui layer"; + sourceTree = ""; + }; + 84D017461527431F0008A4E0 = { + isa = PBXGroup; + children = ( + 84B8DA6C152CA8D900D59B95 /* tbbExample */, + 84D017541527431F0008A4E0 /* Frameworks */, + 84D017521527431F0008A4E0 /* Products */, + 84011763152D6F6D00B07E4D /* tbbExample copy-Info.plist */, + 8401179C152D6F8500B07E4D /* tbbExample copy copy-Info.plist */, + ); + sourceTree = ""; + }; + 84D017521527431F0008A4E0 /* Products */ = { + isa = PBXGroup; + children = ( + 84D017511527431F0008A4E0 /* tbbExample.app */, + 84011761152D6F6C00B07E4D /* tachyon.serial.app */, + 8401179A152D6F8400B07E4D /* tachyon.tbb1d.app */, + ); + name = Products; + sourceTree = ""; + }; + 84D017541527431F0008A4E0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84D01775152744BD0008A4E0 /* OpenGL.framework */, + 84D017551527431F0008A4E0 /* Cocoa.framework */, + 84D017571527431F0008A4E0 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84D017571527431F0008A4E0 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, + 84D017581527431F0008A4E0 /* AppKit.framework */, + 84D017591527431F0008A4E0 /* CoreData.framework */, + 84D0175A1527431F0008A4E0 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8401172B152D6F6C00B07E4D /* tachyon.serial */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8401175E152D6F6C00B07E4D /* Build configuration list for PBXNativeTarget "tachyon.serial" */; + buildPhases = ( + 8401172C152D6F6C00B07E4D /* Sources */, + 84011756152D6F6C00B07E4D /* Frameworks */, + 8401175A152D6F6C00B07E4D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tachyon.serial; + productName = tbbExample; + productReference = 84011761152D6F6C00B07E4D /* tachyon.serial.app */; + productType = "com.apple.product-type.application"; + }; + 84011764152D6F8400B07E4D /* tachyon.tbb1d */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84011797152D6F8400B07E4D /* Build configuration list for PBXNativeTarget "tachyon.tbb1d" */; + buildPhases = ( + 84011765152D6F8400B07E4D /* Sources */, + 8401178F152D6F8400B07E4D /* Frameworks */, + 84011793152D6F8400B07E4D /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tachyon.tbb1d; + productName = tbbExample; + productReference = 8401179A152D6F8400B07E4D /* tachyon.tbb1d.app */; + productType = "com.apple.product-type.application"; + }; + 84D017501527431F0008A4E0 /* tachyon.tbb */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tachyon.tbb" */; + buildPhases = ( + 84D0174D1527431F0008A4E0 /* Sources */, + 84D0174E1527431F0008A4E0 /* Frameworks */, + 84D0174F1527431F0008A4E0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tachyon.tbb; + productName = tbbExample; + productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84D017481527431F0008A4E0 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = tbb; + LastUpgradeCheck = 0430; + }; + buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tachyon" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 84D017461527431F0008A4E0; + productRefGroup = 84D017521527431F0008A4E0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84D017501527431F0008A4E0 /* tachyon.tbb */, + 8401172B152D6F6C00B07E4D /* tachyon.serial */, + 84011764152D6F8400B07E4D /* tachyon.tbb1d */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8401175A152D6F6C00B07E4D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8401175B152D6F6C00B07E4D /* (null) in Resources */, + 8401175C152D6F6C00B07E4D /* InfoPlist.strings in Resources */, + 8401175D152D6F6C00B07E4D /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84011793152D6F8400B07E4D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84011794152D6F8400B07E4D /* (null) in Resources */, + 84011795152D6F8400B07E4D /* InfoPlist.strings in Resources */, + 84011796152D6F8400B07E4D /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84D0174F1527431F0008A4E0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA7A152CA90100D59B95 /* (null) in Resources */, + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */, + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8401172C152D6F6C00B07E4D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 840117A1152D6FF900B07E4D /* trace.serial.cpp in Sources */, + 8401172D152D6F6C00B07E4D /* main.m in Sources */, + 8401172E152D6F6C00B07E4D /* OpenGLView.m in Sources */, + 8401172F152D6F6C00B07E4D /* tbbAppDelegate.m in Sources */, + 84011730152D6F6C00B07E4D /* macvideo.cpp in Sources */, + 84011731152D6F6C00B07E4D /* api.cpp in Sources */, + 84011732152D6F6C00B07E4D /* apigeom.cpp in Sources */, + 84011733152D6F6C00B07E4D /* apitrigeom.cpp in Sources */, + 84011734152D6F6C00B07E4D /* bndbox.cpp in Sources */, + 84011735152D6F6C00B07E4D /* box.cpp in Sources */, + 84011736152D6F6C00B07E4D /* camera.cpp in Sources */, + 84011737152D6F6C00B07E4D /* coordsys.cpp in Sources */, + 84011738152D6F6C00B07E4D /* cylinder.cpp in Sources */, + 84011739152D6F6C00B07E4D /* extvol.cpp in Sources */, + 8401173A152D6F6C00B07E4D /* global.cpp in Sources */, + 8401173B152D6F6C00B07E4D /* grid.cpp in Sources */, + 8401173C152D6F6C00B07E4D /* imageio.cpp in Sources */, + 8401173D152D6F6C00B07E4D /* imap.cpp in Sources */, + 8401173E152D6F6C00B07E4D /* intersect.cpp in Sources */, + 8401173F152D6F6C00B07E4D /* jpeg.cpp in Sources */, + 84011740152D6F6C00B07E4D /* light.cpp in Sources */, + 84011741152D6F6C00B07E4D /* main.cpp in Sources */, + 84011742152D6F6C00B07E4D /* objbound.cpp in Sources */, + 84011743152D6F6C00B07E4D /* parse.cpp in Sources */, + 84011744152D6F6C00B07E4D /* plane.cpp in Sources */, + 84011745152D6F6C00B07E4D /* ppm.cpp in Sources */, + 84011746152D6F6C00B07E4D /* pthread.cpp in Sources */, + 84011747152D6F6C00B07E4D /* quadric.cpp in Sources */, + 84011748152D6F6C00B07E4D /* render.cpp in Sources */, + 84011749152D6F6C00B07E4D /* ring.cpp in Sources */, + 8401174A152D6F6C00B07E4D /* shade.cpp in Sources */, + 8401174B152D6F6C00B07E4D /* sphere.cpp in Sources */, + 8401174C152D6F6C00B07E4D /* tachyon_video.cpp in Sources */, + 8401174D152D6F6C00B07E4D /* texture.cpp in Sources */, + 8401174E152D6F6C00B07E4D /* tgafile.cpp in Sources */, + 8401174F152D6F6C00B07E4D /* trace_rest.cpp in Sources */, + 84011750152D6F6C00B07E4D /* triangle.cpp in Sources */, + 84011751152D6F6C00B07E4D /* ui.cpp in Sources */, + 84011752152D6F6C00B07E4D /* util.cpp in Sources */, + 84011753152D6F6C00B07E4D /* vector.cpp in Sources */, + 84011754152D6F6C00B07E4D /* vol.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84011765152D6F8400B07E4D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 840117A2152D701A00B07E4D /* trace.tbb1d.cpp in Sources */, + 84011766152D6F8400B07E4D /* main.m in Sources */, + 84011767152D6F8400B07E4D /* OpenGLView.m in Sources */, + 84011768152D6F8400B07E4D /* tbbAppDelegate.m in Sources */, + 84011769152D6F8400B07E4D /* macvideo.cpp in Sources */, + 8401176A152D6F8400B07E4D /* api.cpp in Sources */, + 8401176B152D6F8400B07E4D /* apigeom.cpp in Sources */, + 8401176C152D6F8400B07E4D /* apitrigeom.cpp in Sources */, + 8401176D152D6F8400B07E4D /* bndbox.cpp in Sources */, + 8401176E152D6F8400B07E4D /* box.cpp in Sources */, + 8401176F152D6F8400B07E4D /* camera.cpp in Sources */, + 84011770152D6F8400B07E4D /* coordsys.cpp in Sources */, + 84011771152D6F8400B07E4D /* cylinder.cpp in Sources */, + 84011772152D6F8400B07E4D /* extvol.cpp in Sources */, + 84011773152D6F8400B07E4D /* global.cpp in Sources */, + 84011774152D6F8400B07E4D /* grid.cpp in Sources */, + 84011775152D6F8400B07E4D /* imageio.cpp in Sources */, + 84011776152D6F8400B07E4D /* imap.cpp in Sources */, + 84011777152D6F8400B07E4D /* intersect.cpp in Sources */, + 84011778152D6F8400B07E4D /* jpeg.cpp in Sources */, + 84011779152D6F8400B07E4D /* light.cpp in Sources */, + 8401177A152D6F8400B07E4D /* main.cpp in Sources */, + 8401177B152D6F8400B07E4D /* objbound.cpp in Sources */, + 8401177C152D6F8400B07E4D /* parse.cpp in Sources */, + 8401177D152D6F8400B07E4D /* plane.cpp in Sources */, + 8401177E152D6F8400B07E4D /* ppm.cpp in Sources */, + 8401177F152D6F8400B07E4D /* pthread.cpp in Sources */, + 84011780152D6F8400B07E4D /* quadric.cpp in Sources */, + 84011781152D6F8400B07E4D /* render.cpp in Sources */, + 84011782152D6F8400B07E4D /* ring.cpp in Sources */, + 84011783152D6F8400B07E4D /* shade.cpp in Sources */, + 84011784152D6F8400B07E4D /* sphere.cpp in Sources */, + 84011785152D6F8400B07E4D /* tachyon_video.cpp in Sources */, + 84011786152D6F8400B07E4D /* texture.cpp in Sources */, + 84011787152D6F8400B07E4D /* tgafile.cpp in Sources */, + 84011788152D6F8400B07E4D /* trace_rest.cpp in Sources */, + 84011789152D6F8400B07E4D /* triangle.cpp in Sources */, + 8401178A152D6F8400B07E4D /* ui.cpp in Sources */, + 8401178B152D6F8400B07E4D /* util.cpp in Sources */, + 8401178C152D6F8400B07E4D /* vector.cpp in Sources */, + 8401178D152D6F8400B07E4D /* vol.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 84D0174D1527431F0008A4E0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA77152CA90100D59B95 /* main.m in Sources */, + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */, + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */, + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */, + 840116E1152CBBF600B07E4D /* api.cpp in Sources */, + 840116E2152CBBF600B07E4D /* apigeom.cpp in Sources */, + 840116E3152CBBF600B07E4D /* apitrigeom.cpp in Sources */, + 840116E4152CBBF600B07E4D /* bndbox.cpp in Sources */, + 840116E5152CBBF600B07E4D /* box.cpp in Sources */, + 840116E6152CBBF600B07E4D /* camera.cpp in Sources */, + 840116E7152CBBF600B07E4D /* coordsys.cpp in Sources */, + 840116E8152CBBF600B07E4D /* cylinder.cpp in Sources */, + 840116E9152CBBF600B07E4D /* extvol.cpp in Sources */, + 840116EA152CBBF600B07E4D /* global.cpp in Sources */, + 840116EB152CBBF600B07E4D /* grid.cpp in Sources */, + 840116EC152CBBF600B07E4D /* imageio.cpp in Sources */, + 840116ED152CBBF600B07E4D /* imap.cpp in Sources */, + 840116EE152CBBF600B07E4D /* intersect.cpp in Sources */, + 840116EF152CBBF600B07E4D /* jpeg.cpp in Sources */, + 840116F0152CBBF600B07E4D /* light.cpp in Sources */, + 840116F1152CBBF600B07E4D /* main.cpp in Sources */, + 840116F2152CBBF600B07E4D /* objbound.cpp in Sources */, + 840116F3152CBBF600B07E4D /* parse.cpp in Sources */, + 840116F4152CBBF600B07E4D /* plane.cpp in Sources */, + 840116F5152CBBF600B07E4D /* ppm.cpp in Sources */, + 840116F6152CBBF600B07E4D /* pthread.cpp in Sources */, + 840116F7152CBBF600B07E4D /* quadric.cpp in Sources */, + 840116F8152CBBF600B07E4D /* render.cpp in Sources */, + 840116F9152CBBF600B07E4D /* ring.cpp in Sources */, + 840116FA152CBBF600B07E4D /* shade.cpp in Sources */, + 840116FB152CBBF600B07E4D /* sphere.cpp in Sources */, + 840116FC152CBBF600B07E4D /* tachyon_video.cpp in Sources */, + 840116FD152CBBF600B07E4D /* texture.cpp in Sources */, + 840116FE152CBBF600B07E4D /* tgafile.cpp in Sources */, + 840116FF152CBBF600B07E4D /* trace_rest.cpp in Sources */, + 84011707152CBBF600B07E4D /* triangle.cpp in Sources */, + 84011708152CBBF600B07E4D /* ui.cpp in Sources */, + 84011709152CBBF600B07E4D /* util.cpp in Sources */, + 8401170A152CBBF600B07E4D /* vector.cpp in Sources */, + 8401170B152CBBF600B07E4D /* vol.cpp in Sources */, + 8401172A152D6E3E00B07E4D /* trace.tbb.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7D152CA97B00D59B95 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7F152CA97B00D59B95 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 8401175F152D6F6C00B07E4D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = tachyon.serial; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84011760152D6F6C00B07E4D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = tachyon.serial; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 84011798152D6F8400B07E4D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = tachyon.tbb1d; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84011799152D6F8400B07E4D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = tachyon.tbb1d; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + 84D01770152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 84D01771152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + 84D01773152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84D01774152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 8401175E152D6F6C00B07E4D /* Build configuration list for PBXNativeTarget "tachyon.serial" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8401175F152D6F6C00B07E4D /* Debug */, + 84011760152D6F6C00B07E4D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84011797152D6F8400B07E4D /* Build configuration list for PBXNativeTarget "tachyon.tbb1d" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84011798152D6F8400B07E4D /* Debug */, + 84011799152D6F8400B07E4D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "tachyon" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01770152743200008A4E0 /* Debug */, + 84D01771152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tachyon.tbb" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01773152743200008A4E0 /* Debug */, + 84D01774152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84D017481527431F0008A4E0 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.serial.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.serial.xcscheme new file mode 100644 index 0000000000..b1c85348fa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.serial.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme new file mode 100644 index 0000000000..ccd129c996 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb1d.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb1d.xcscheme new file mode 100644 index 0000000000..4cb4aadcb7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_for/tachyon/xcode/tachyon.xcodeproj/xcshareddata/xcschemes/tachyon.tbb1d.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile new file mode 100644 index 0000000000..9860bdcf79 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile @@ -0,0 +1,70 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=convex_hull_bench +ARGS= +PERF_RUN_ARGS = silent auto 40000000 +LIGHT_ARGS = 4 400 + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb $(LIBS) + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb $(LIBS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o convex_hull_sample convex_hull_sample.cpp -ltbb_debug $(LIBS) + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o convex_hull_bench convex_hull_bench.cpp -ltbb_debug $(LIBS) + +clean: + $(RM) convex_hull_bench convex_hull_sample *.o *.d + +perf_build: release + +perf_run: + ./convex_hull_sample $(PERF_RUN_ARGS) + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +light_test: + ./$(PROG) $(LIGHT_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile.windows new file mode 100644 index 0000000000..57f2272699 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/Makefile.windows @@ -0,0 +1,63 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. +PROG=convex_hull_bench +ARGS= +PERF_RUN_ARGS = silent auto 40000000 +LIGHT_ARGS = 4 400 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo $(TBB_SECURITY_SWITCH) /D _CONSOLE /D _MBCS /D WIN32 /D _SCL_SECURE_NO_DEPRECATE /D _SECURE_SCL=0 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) convex_hull_sample.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_sample.exe + $(CXX) convex_hull_bench.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_bench.exe +debug: compiler_check + $(CXX) convex_hull_sample.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_sample.exe + $(CXX) convex_hull_bench.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:convex_hull_bench.exe +clean: + @cmd.exe /C del convex_hull*.exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +perf_build: release + +perf_run: + ./convex_hull_sample $(PERF_RUN_ARGS) + +light_test: + ./$(PROG) $(LIGHT_ARGS) + +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull.h new file mode 100644 index 0000000000..cbc65585f9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull.h @@ -0,0 +1,197 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __CONVEX_HULL_H__ +#define __CONVEX_HULL_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "../../common/utility/utility.h" +#include "../../common/utility/fast_random.h" +#include "tbb/blocked_range.h" + +using namespace std; + +namespace cfg { + // convex hull problem user set parameters + long numberOfPoints = 5000000; // problem size + utility::thread_number_range threads(tbb::task_scheduler_init::default_num_threads); + + // convex hull grain sizes for 3 subproblems. Be sure 16*GS < 512Kb + const size_t generateGrainSize = 25000; + const size_t findExtremumGrainSize = 25000; + const size_t divideGrainSize = 25000; +}; + +namespace util { + bool silent = false; + bool verbose = false; + vector OUTPUT; + + // utility functionality + void ParseInputArgs(int argc, char* argv[]) { + utility::parse_cli_arguments( + argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(cfg::threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(cfg::numberOfPoints,"n-of-points","number of points") + .arg(silent,"silent","no output except elapsed time") + .arg(verbose,"verbose","turns verbose ON") + ); + //disabling verbose if silent is specified + if (silent) verbose = false;; + } + + template + struct point { + T x; + T y; + //According to subparagraph 4 of paragraph 12.6.2 "Initializing bases and members" [class.base.init] + //of ANSI-ISO-IEC C++ 2003 standard, POD members will _not_ be initialized if they are not mentioned + //in the base-member initializer list. + + //For more details why this needed please see comment in FillRNDPointsVector_buf + point() {} + point(T _x, T _y) : x(_x), y(_y) {} + }; + + std::ostream& operator<< (std::ostream& o, point const& p) { + return o << "(" << p.x << "," << p.y << ")"; + } + + struct rng { + static const size_t max_rand = USHRT_MAX; + utility::FastRandom my_fast_random; + rng (size_t seed):my_fast_random(seed) {} + unsigned short operator()(){return my_fast_random.get();} + unsigned short operator()(size_t& seed){return my_fast_random.get(seed);} + }; + + + template < typename T ,typename rng_functor_type> + point GenerateRNDPoint(size_t& count, rng_functor_type random, size_t rand_max) { + /* generates random points on 2D plane so that the cluster + is somewhat circle shaped */ + const size_t maxsize=500; + T x = random()*2.0/(double)rand_max - 1; + T y = random()*2.0/(double)rand_max - 1; + T r = (x*x + y*y); + if(r>1) { + count++; + if(count>10) { + if (random()/(double)rand_max > 0.5) + x /= r; + if (random()/(double)rand_max > 0.5) + y /= r; + count = 0; + } + else { + x /= r; + y /= r; + } + } + + x = (x+1)*0.5*maxsize; + y = (y+1)*0.5*maxsize; + + return point(x,y); + } + + template + struct edge { + Index start; + Index end; + edge(Index _p1, Index _p2) : start(_p1), end(_p2) {}; + }; + + template + ostream& operator <<(ostream& _ostr, point _p) { + return _ostr << '(' << _p.x << ',' << _p.y << ')'; + } + + template + istream& operator >>(istream& _istr, point _p) { + return _istr >> _p.x >> _p.y; + } + + template + bool operator ==(point p1, point p2) { + return (p1.x == p2.x && p1.y == p2.y); + } + + template + bool operator !=(point p1, point p2) { + return !(p1 == p2); + } + + template + double cross_product(const point& start, const point& end1, const point& end2) { + return ((end1.x-start.x)*(end2.y-start.y)-(end2.x-start.x)*(end1.y-start.y)); + } + + // Timing functions are based on TBB to always obtain wall-clock time + typedef tbb::tick_count my_time_t; + + my_time_t gettime() { + return tbb::tick_count::now(); + } + + double time_diff(my_time_t start, my_time_t end) { + return (end-start).seconds(); + } + + void WriteResults(int nthreads, double initTime, double calcTime) { + if(verbose) { + cout << " Step by step hull construction:" << endl; + for(size_t i = 0; i < OUTPUT.size(); ++i) + cout << OUTPUT[i] << endl; + } + if (!silent){ + cout + << " Number of nodes:" << cfg::numberOfPoints + << " Number of threads:" << nthreads + << " Initialization time:" << setw(10) << setprecision(3) << initTime + << " Calculation time:" << setw(10) << setprecision(3) << calcTime + << endl; + } + } +}; + +#endif // __CONVEX_HULL_H__ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp new file mode 100644 index 0000000000..fc92aced2c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_bench.cpp @@ -0,0 +1,644 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + This file contains a few implementations, so it may look overly complicated. + The most efficient implementation is also separated into convex_hull_sample.cpp +*/ +#include +#include "convex_hull.h" + +typedef util::point point_t; + +#ifndef USETBB + #define USETBB 1 +#endif +#ifndef USECONCVEC + #define USECONCVEC 1 +#endif + +#if !USETBB // Serial implementation of Quick Hull algorithm + +typedef std::vector< point_t > pointVec_t; + +void serial_initialize(pointVec_t &points); + +// C++ style serial code + +class FindXExtremum : public std::unary_function { +public: + typedef enum { + minX, maxX + } extremumType; + + FindXExtremum(const point_t& frstPoint, extremumType exType_) + : extrXPoint(frstPoint), exType(exType_) {} + + void operator()(const point_t& p) { + if(closerToExtremum(p)) + extrXPoint = p; + } + + operator point_t () { + return extrXPoint; + } + +private: + const extremumType exType; + point_t extrXPoint; + + bool closerToExtremum(const point_t &p) const { + switch(exType) { + case minX: + return p.xextrXPoint.x; break; + } + return false; // avoid warning + } +}; + +template +point_t extremum(const pointVec_t &points) { + assert(!points.empty()); + return std::for_each(points.begin(), points.end(), FindXExtremum(points[0], type)); +} + +class SplitByCP : public std::unary_function { + pointVec_t &reducedSet; + point_t p1, p2; + point_t farPoint; + double howFar; +public: + + SplitByCP( point_t _p1, point_t _p2, pointVec_t &_reducedSet) + : p1(_p1), p2(_p2), reducedSet(_reducedSet), howFar(0), farPoint(p1) {} + + void operator()(const point_t& p) { + double cp; + if( (p != p1) && (p != p2) ) { + cp = util::cross_product(p1, p2, p); + if(cp>0) { + reducedSet.push_back(p); + if(cp>howFar) { + farPoint = p; + howFar = cp; + } + } + } + } + + operator point_t (){ + return farPoint; + } +}; + +point_t divide(const pointVec_t &P, pointVec_t &P_reduced, const point_t &p1, const point_t &p2) { + SplitByCP splitByCP(p1, p2, P_reduced); + point_t farPoint = std::for_each(P.begin(), P.end(), splitByCP); + + if(util::verbose) { + std::stringstream ss; + ss << P.size() << " nodes in bucket"<< ", " + << "dividing by: [ " << p1 << ", " << p2 << " ], " + << "farthest node: " << farPoint; + util::OUTPUT.push_back(ss.str()); + } + + return farPoint; +} + +void divide_and_conquer(const pointVec_t &P, pointVec_t &H, point_t p1, point_t p2) { + assert(P.size() >= 2); + pointVec_t P_reduced; + pointVec_t H1, H2; + point_t p_far = divide(P, P_reduced, p1, p2); + if (P_reduced.size()<2) { + H.push_back(p1); + H.insert(H.end(), P_reduced.begin(), P_reduced.end()); + } + else { + divide_and_conquer(P_reduced, H1, p1, p_far); + divide_and_conquer(P_reduced, H2, p_far, p2); + + H.insert(H.end(), H1.begin(), H1.end()); + H.insert(H.end(), H2.begin(), H2.end()); + } +} + +void quickhull(const pointVec_t &points, pointVec_t &hull) { + if (points.size() < 2) { + hull.insert(hull.end(), points.begin(), points.end()); + return; + } + point_t p_maxx = extremum(points); + point_t p_minx = extremum(points); + + pointVec_t H; + + divide_and_conquer(points, hull, p_maxx, p_minx); + divide_and_conquer(points, H, p_minx, p_maxx); + hull.insert(hull.end(), H.begin(), H.end()); +} + + +int main(int argc, char* argv[]) { + util::ParseInputArgs(argc, argv); + + pointVec_t points; + pointVec_t hull; + util::my_time_t tm_init, tm_start, tm_end; + + std::cout << "Starting serial version of QUICK HULL algorithm" << std::endl; + + tm_init = util::gettime(); + serial_initialize(points); + tm_start = util::gettime(); + std::cout << "Init time: " << util::time_diff(tm_init, tm_start) << " Points in input: " << points.size() << "\n"; + tm_start = util::gettime(); + quickhull(points, hull); + tm_end = util::gettime(); + std::cout << "Serial time: " << util::time_diff(tm_start, tm_end) << " Points in hull: " << hull.size() << "\n"; +} + +#else // USETBB - parallel version of Quick Hull algorithm + +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/parallel_reduce.h" +#include "tbb/blocked_range.h" + +typedef tbb::blocked_range range_t; + +#if USECONCVEC +#include "tbb/concurrent_vector.h" + +typedef tbb::concurrent_vector pointVec_t; + +void appendVector(const point_t* src, size_t srcSize, pointVec_t& dest) { + std::copy(src, src + srcSize, dest.grow_by(srcSize)); +} + +void appendVector(const pointVec_t& src, pointVec_t& dest) { + std::copy(src.begin(), src.end(), dest.grow_by(src.size())); +} + +void grow_vector_to_at_least(pointVec_t& vect, size_t size) { + vect.grow_to_at_least(size); +} +#else // USE STD::VECTOR - include spin_mutex.h and lock vector operations +#include "tbb/spin_mutex.h" + +typedef tbb::spin_mutex mutex_t; +typedef std::vector pointVec_t; + +void appendVector(mutex_t& insertMutex, const pointVec_t& src, pointVec_t& dest) { + mutex_t::scoped_lock lock(insertMutex); + dest.insert(dest.end(), src.begin(), src.end()); +} + +void appendVector(mutex_t& insertMutex, const point_t* src, size_t srcSize, + pointVec_t& dest) { + mutex_t::scoped_lock lock(insertMutex); + dest.insert(dest.end(), src, src + srcSize); +} + +void grow_vector_to_at_least(mutex_t& mutex, pointVec_t& vect, size_t size) { + mutex_t::scoped_lock lock(mutex); + if (vect.size()< size){ + vect.resize(size); + } +} +#endif // USECONCVEC + +class FillRNDPointsVector { + pointVec_t &points; +public: + static const size_t grainSize = cfg::generateGrainSize; +#if !USECONCVEC + static mutex_t pushBackMutex; +#endif // USECONCVEC + + explicit FillRNDPointsVector(pointVec_t& _points) + : points(_points){} + + void operator()(const range_t& range) const { + util::rng the_rng(range.begin()); + const size_t i_end = range.end(); + size_t count = 0; +#if USECONCVEC + points.grow_to_at_least(i_end); +#else // Locked enlarge to a not thread-safe STD::VECTOR + grow_vector_to_at_least(pushBackMutex,points,i_end); +#endif // USECONCVEC + + for(size_t i = range.begin(); i != i_end; ++i) { + points[i]=util::GenerateRNDPoint(count,the_rng,util::rng::max_rand); + } + } +}; + +class FillRNDPointsVector_buf { + pointVec_t &points; +public: + static const size_t grainSize = cfg::generateGrainSize; +#if !USECONCVEC + static mutex_t insertMutex; +#endif // USECONCVEC + + explicit FillRNDPointsVector_buf(pointVec_t& _points) + : points(_points){} + + void operator()(const range_t& range) const { + util::rng the_rng(range.begin()); + const size_t i_end = range.end(); + size_t count = 0, j = 0; + point_t tmp_vec[grainSize]; + + for(size_t i=range.begin(); i!=i_end; ++i) { + tmp_vec[j++] = util::GenerateRNDPoint(count,the_rng,util::rng::max_rand); + } +#if USECONCVEC + grow_vector_to_at_least(points,range.end()); +#else // USE STD::VECTOR + grow_vector_to_at_least(insertMutex,points,range.end()); +#endif // USECONCVEC + std::copy(tmp_vec, tmp_vec+j,points.begin()+range.begin()); + } +}; + +#if !USECONCVEC +mutex_t FillRNDPointsVector::pushBackMutex = mutex_t(); +mutex_t FillRNDPointsVector_buf::insertMutex = mutex_t(); +#endif + +template +void initialize(pointVec_t &points) { + //This function generate the same series of point on every call. + //Reproducibility is needed for benchmarking to produce reliable results. + //It is achieved through the following points: + // - FillRNDPointsVector_buf instance has its own local instance + // of random number generator, which in turn does not use any global data + // - tbb::simple_partitioner produce the same set of ranges on every call to + // tbb::parallel_for + // - local RNG instances are seeded by the starting indexes of corresponding ranges + // - grow_to_at_least() enables putting points into the resulting vector in deterministic order + // (unlike concurrent push_back or grow_by). + + // In the buffered version, a temporary storage for as much as grainSize elements + // is allocated inside the body. Since auto_partitioner may increase effective + // range size which would cause a crash, simple partitioner has to be used. + + tbb::parallel_for(range_t(0, cfg::numberOfPoints, BodyType::grainSize), + BodyType(points), tbb::simple_partitioner()); +} + +class FindXExtremum { +public: + typedef enum { + minX, maxX + } extremumType; + + static const size_t grainSize = cfg::findExtremumGrainSize; + + FindXExtremum(const pointVec_t& points_, extremumType exType_) + : points(points_), exType(exType_), extrXPoint(points[0]) {} + + FindXExtremum(const FindXExtremum& fxex, tbb::split) + : points(fxex.points), exType(fxex.exType), extrXPoint(fxex.extrXPoint) {} + + void operator()(const range_t& range) { + const size_t i_end = range.end(); + if(!range.empty()) { + for(size_t i = range.begin(); i != i_end; ++i) { + if(closerToExtremum(points[i])) { + extrXPoint = points[i]; + } + } + } + } + + void join(const FindXExtremum &rhs) { + if(closerToExtremum(rhs.extrXPoint)) { + extrXPoint = rhs.extrXPoint; + } + } + + point_t extremeXPoint() { + return extrXPoint; + } + +private: + const pointVec_t &points; + const extremumType exType; + point_t extrXPoint; + bool closerToExtremum(const point_t &p) const { + switch(exType) { + case minX: + return p.xextrXPoint.x; break; + } + return false; // avoid warning + } +}; + +template +point_t extremum(const pointVec_t &P) { + FindXExtremum fxBody(P, type); + tbb::parallel_reduce(range_t(0, P.size(), FindXExtremum::grainSize), fxBody); + return fxBody.extremeXPoint(); +} + +class SplitByCP { + const pointVec_t &initialSet; + pointVec_t &reducedSet; + point_t p1, p2; + point_t farPoint; + double howFar; +public: + static const size_t grainSize = cfg::divideGrainSize; +#if !USECONCVEC + static mutex_t pushBackMutex; +#endif // USECONCVEC + + SplitByCP( point_t _p1, point_t _p2, + const pointVec_t &_initialSet, pointVec_t &_reducedSet) + : p1(_p1), p2(_p2), + initialSet(_initialSet), reducedSet(_reducedSet), + howFar(0), farPoint(p1) { + } + + SplitByCP( SplitByCP& sbcp, tbb::split ) + : p1(sbcp.p1), p2(sbcp.p2), + initialSet(sbcp.initialSet), reducedSet(sbcp.reducedSet), + howFar(0), farPoint(p1) {} + + void operator()( const range_t& range ) { + const size_t i_end = range.end(); + double cp; + for(size_t i=range.begin(); i!=i_end; ++i) { + if( (initialSet[i] != p1) && (initialSet[i] != p2) ) { + cp = util::cross_product(p1, p2, initialSet[i]); + if(cp>0) { +#if USECONCVEC + reducedSet.push_back(initialSet[i]); +#else // Locked push_back to a not thread-safe STD::VECTOR + { + mutex_t::scoped_lock lock(pushBackMutex); + reducedSet.push_back(initialSet[i]); + } +#endif // USECONCVEC + if(cp>howFar) { + farPoint = initialSet[i]; + howFar = cp; + } + } + } + } + } + + void join(const SplitByCP& rhs) { + if(rhs.howFar>howFar) { + howFar = rhs.howFar; + farPoint = rhs.farPoint; + } + } + + point_t farthestPoint() const { + return farPoint; + } +}; + +class SplitByCP_buf { + const pointVec_t &initialSet; + pointVec_t &reducedSet; + point_t p1, p2; + point_t farPoint; + double howFar; +public: + static const size_t grainSize = cfg::divideGrainSize; +#if !USECONCVEC + static mutex_t insertMutex; +#endif // USECONCVEC + + SplitByCP_buf( point_t _p1, point_t _p2, + const pointVec_t &_initialSet, pointVec_t &_reducedSet) + : p1(_p1), p2(_p2), + initialSet(_initialSet), reducedSet(_reducedSet), + howFar(0), farPoint(p1) {} + + SplitByCP_buf(SplitByCP_buf& sbcp, tbb::split) + : p1(sbcp.p1), p2(sbcp.p2), + initialSet(sbcp.initialSet), reducedSet(sbcp.reducedSet), + howFar(0), farPoint(p1) {} + + void operator()(const range_t& range) { + const size_t i_end = range.end(); + size_t j = 0; + double cp; + point_t tmp_vec[grainSize]; + for(size_t i = range.begin(); i != i_end; ++i) { + if( (initialSet[i] != p1) && (initialSet[i] != p2) ) { + cp = util::cross_product(p1, p2, initialSet[i]); + if(cp>0) { + tmp_vec[j++] = initialSet[i]; + if(cp>howFar) { + farPoint = initialSet[i]; + howFar = cp; + } + } + } + } + +#if USECONCVEC + appendVector(tmp_vec, j, reducedSet); +#else // USE STD::VECTOR + appendVector(insertMutex, tmp_vec, j, reducedSet); +#endif // USECONCVEC + } + + void join(const SplitByCP_buf& rhs) { + if(rhs.howFar>howFar) { + howFar = rhs.howFar; + farPoint = rhs.farPoint; + } + } + + point_t farthestPoint() const { + return farPoint; + } +}; + +#if !USECONCVEC +mutex_t SplitByCP::pushBackMutex = mutex_t(); +mutex_t SplitByCP_buf::insertMutex = mutex_t(); +#endif + +template +point_t divide(const pointVec_t &P, pointVec_t &P_reduced, + const point_t &p1, const point_t &p2) { + BodyType body(p1, p2, P, P_reduced); + // Must use simple_partitioner (see the comment in initialize() above) + tbb::parallel_reduce(range_t(0, P.size(), BodyType::grainSize), + body, tbb::simple_partitioner() ); + + if(util::verbose) { + std::stringstream ss; + ss << P.size() << " nodes in bucket"<< ", " + << "dividing by: [ " << p1 << ", " << p2 << " ], " + << "farthest node: " << body.farthestPoint(); + util::OUTPUT.push_back(ss.str()); + } + + return body.farthestPoint(); +} + +void divide_and_conquer(const pointVec_t &P, pointVec_t &H, + point_t p1, point_t p2, bool buffered) { + assert(P.size() >= 2); + pointVec_t P_reduced; + pointVec_t H1, H2; + point_t p_far; + + if(buffered) { + p_far = divide(P, P_reduced, p1, p2); + } else { + p_far = divide(P, P_reduced, p1, p2); + } + + if (P_reduced.size()<2) { + H.push_back(p1); +#if USECONCVEC + appendVector(P_reduced, H); +#else // insert into STD::VECTOR + H.insert(H.end(), P_reduced.begin(), P_reduced.end()); +#endif + } + else { + divide_and_conquer(P_reduced, H1, p1, p_far, buffered); + divide_and_conquer(P_reduced, H2, p_far, p2, buffered); + +#if USECONCVEC + appendVector(H1, H); + appendVector(H2, H); +#else // insert into STD::VECTOR + H.insert(H.end(), H1.begin(), H1.end()); + H.insert(H.end(), H2.begin(), H2.end()); +#endif + } +} + +void quickhull(const pointVec_t &points, pointVec_t &hull, bool buffered) { + if (points.size() < 2) { +#if USECONCVEC + appendVector(points, hull); +#else // STD::VECTOR + hull.insert(hull.end(), points.begin(), points.end()); +#endif // USECONCVEC + return; + } + + point_t p_maxx = extremum(points); + point_t p_minx = extremum(points); + + pointVec_t H; + + divide_and_conquer(points, hull, p_maxx, p_minx, buffered); + divide_and_conquer(points, H, p_minx, p_maxx, buffered); +#if USECONCVEC + appendVector(H, hull); +#else // STD::VECTOR + hull.insert(hull.end(), H.begin(), H.end()); +#endif // USECONCVEC +} + +int main(int argc, char* argv[]) { + util::ParseInputArgs(argc, argv); + + int nthreads; + util::my_time_t tm_init, tm_start, tm_end; + +#if USECONCVEC + std::cout << "Starting TBB unbuffered push_back version of QUICK HULL algorithm" << std::endl; +#else + std::cout << "Starting STL locked unbuffered push_back version of QUICK HULL algorithm" << std::endl; +#endif // USECONCVEC + + for(nthreads=cfg::threads.first; nthreads<=cfg::threads.last; nthreads=cfg::threads.step(nthreads)) { + pointVec_t points; + pointVec_t hull; + + tbb::task_scheduler_init init(nthreads); + tm_init = util::gettime(); + initialize(points); + tm_start = util::gettime(); + std::cout << "Parallel init time on " << nthreads << " threads: " << util::time_diff(tm_init, tm_start) << " Points in input: " << points.size() << "\n"; + + tm_start = util::gettime(); + quickhull(points, hull, false); + tm_end = util::gettime(); + std::cout << "Time on " << nthreads << " threads: " << util::time_diff(tm_start, tm_end) << " Points in hull: " << hull.size() << "\n"; + } + +#if USECONCVEC + std::cout << "Starting TBB buffered version of QUICK HULL algorithm" << std::endl; +#else + std::cout << "Starting STL locked buffered version of QUICK HULL algorithm" << std::endl; +#endif + + for(nthreads=cfg::threads.first; nthreads<=cfg::threads.last; nthreads=cfg::threads.step(nthreads)) { + pointVec_t points; + pointVec_t hull; + + tbb::task_scheduler_init init(nthreads); + + tm_init = util::gettime(); + initialize(points); + tm_start = util::gettime(); + std::cout << "Init time on " << nthreads << " threads: " << util::time_diff(tm_init, tm_start) << " Points in input: " << points.size() << "\n"; + + tm_start = util::gettime(); + quickhull(points, hull, true); + tm_end = util::gettime(); + std::cout << "Time on " << nthreads << " threads: " << util::time_diff(tm_start, tm_end) << " Points in hull: " << hull.size() << "\n"; + } + + return 0; +} + +#endif // USETBB + +void serial_initialize(pointVec_t &points) { + points.reserve(cfg::numberOfPoints); + + unsigned int rseed=1; + for(size_t i=0, count=0; long(i)(count,&std::rand,RAND_MAX )); + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp new file mode 100644 index 0000000000..41ecb6e10f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/convex_hull_sample.cpp @@ -0,0 +1,307 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + This file contains the TBB-based implementation of convex hull algortihm. + It corresponds to the following settings in convex_hull_bench.cpp: + - USETBB defined to 1 + - USECONCVEC defined to 1 + - INIT_ONCE defined to 0 + - only buffered version is used +*/ +#include +#include +#include "convex_hull.h" + +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/parallel_reduce.h" +#include "tbb/blocked_range.h" +#include "tbb/tick_count.h" +#include "tbb/concurrent_vector.h" + +typedef util::point point_t; +typedef tbb::concurrent_vector< point_t > pointVec_t; +typedef tbb::blocked_range range_t; + +void appendVector(const point_t* src, size_t srcSize, pointVec_t& dest) { + std::copy(src, src + srcSize, dest.grow_by(srcSize)); +} + +void appendVector(const pointVec_t& src, pointVec_t& dest) { + std::copy(src.begin(), src.end(), dest.grow_by(src.size())); +} +class FillRNDPointsVector_buf { + pointVec_t &points; +public: + static const size_t grainSize = cfg::generateGrainSize; + + explicit FillRNDPointsVector_buf(pointVec_t& _points) + : points(_points) {} + + void operator()(const range_t& range) const { + util::rng the_rng(range.begin()); + const size_t i_end = range.end(); + size_t count = 0, j = 0; + point_t tmp_vec[grainSize]; + + for(size_t i=range.begin(); i!=i_end; ++i) { + tmp_vec[j++] = util::GenerateRNDPoint(count, the_rng, util::rng::max_rand); + } + //Here we have race condition. Elements being written to may be still under construction. + //For C++ 2003 it is workarounded by vector element type which default constructor does not touch memory, + //it being constructed on. See comments near default ctor of point class for more details. + //Strictly speaking it is UB. + //TODO: need to find more reliable/correct way + points.grow_to_at_least(range.end()); + std::copy(tmp_vec, tmp_vec+j,points.begin()+range.begin()); + } +}; + +void initialize(pointVec_t &points) { + //This function generate the same series of point on every call. + //Reproducibility is needed for benchmarking to produce reliable results. + //It is achieved through the following points: + // - FillRNDPointsVector_buf instance has its own local instance + // of random number generator, which in turn does not use any global data + // - tbb::simple_partitioner produce the same set of ranges on every call to + // tbb::parallel_for + // - local RNG instances are seeded by the starting indexes of corresponding ranges + // - grow_to_at_least() enables putting points into the resulting vector in deterministic order + // (unlike concurrent push_back or grow_by). + + // In the buffered version, a temporary storage for as much as grainSize elements + // is allocated inside the body. Since auto_partitioner may increase effective + // range size which would cause a crash, simple partitioner has to be used. + tbb::parallel_for(range_t(0, cfg::numberOfPoints, FillRNDPointsVector_buf::grainSize), + FillRNDPointsVector_buf(points), tbb::simple_partitioner()); +} + +class FindXExtremum { +public: + typedef enum { + minX, maxX + } extremumType; + + static const size_t grainSize = cfg::findExtremumGrainSize; + + FindXExtremum(const pointVec_t& points_, extremumType exType_) + : points(points_), exType(exType_), extrXPoint(points[0]) {} + + FindXExtremum(const FindXExtremum& fxex, tbb::split) + // Can run in parallel with fxex.operator()() or fxex.join(). + // The data race reported by tools is harmless. + : points(fxex.points), exType(fxex.exType), extrXPoint(fxex.extrXPoint) {} + + void operator()(const range_t& range) { + const size_t i_end = range.end(); + if(!range.empty()) { + for(size_t i = range.begin(); i != i_end; ++i) { + if(closerToExtremum(points[i])) { + extrXPoint = points[i]; + } + } + } + } + + void join(const FindXExtremum &rhs) { + if(closerToExtremum(rhs.extrXPoint)) { + extrXPoint = rhs.extrXPoint; + } + } + + point_t extremeXPoint() { + return extrXPoint; + } + +private: + const pointVec_t &points; + const extremumType exType; + point_t extrXPoint; + bool closerToExtremum(const point_t &p) const { + switch(exType) { + case minX: + return p.xextrXPoint.x; break; + } + return false; // avoid warning + } +}; + +template +point_t extremum(const pointVec_t &P) { + FindXExtremum fxBody(P, type); + tbb::parallel_reduce(range_t(0, P.size(), FindXExtremum::grainSize), fxBody); + return fxBody.extremeXPoint(); +} + +class SplitByCP_buf { + const pointVec_t &initialSet; + pointVec_t &reducedSet; + point_t p1, p2; + point_t farPoint; + double howFar; +public: + static const size_t grainSize = cfg::divideGrainSize; + + SplitByCP_buf( point_t _p1, point_t _p2, + const pointVec_t &_initialSet, pointVec_t &_reducedSet) + : p1(_p1), p2(_p2), + initialSet(_initialSet), reducedSet(_reducedSet), + howFar(0), farPoint(p1) {} + + SplitByCP_buf(SplitByCP_buf& sbcp, tbb::split) + : p1(sbcp.p1), p2(sbcp.p2), + initialSet(sbcp.initialSet), reducedSet(sbcp.reducedSet), + howFar(0), farPoint(p1) {} + + void operator()(const range_t& range) { + const size_t i_end = range.end(); + size_t j = 0; + double cp; + point_t tmp_vec[grainSize]; + for(size_t i = range.begin(); i != i_end; ++i) { + if( (initialSet[i] != p1) && (initialSet[i] != p2) ) { + cp = util::cross_product(p1, p2, initialSet[i]); + if(cp>0) { + tmp_vec[j++] = initialSet[i]; + if(cp>howFar) { + farPoint = initialSet[i]; + howFar = cp; + } + } + } + } + + appendVector(tmp_vec, j, reducedSet); + } + + void join(const SplitByCP_buf& rhs) { + if(rhs.howFar>howFar) { + howFar = rhs.howFar; + farPoint = rhs.farPoint; + } + } + + point_t farthestPoint() const { + return farPoint; + } +}; + +point_t divide(const pointVec_t &P, pointVec_t &P_reduced, + const point_t &p1, const point_t &p2) { + SplitByCP_buf sbcpb(p1, p2, P, P_reduced); + // Must use simple_partitioner (see the comment in initialize() above) + tbb::parallel_reduce(range_t(0, P.size(), SplitByCP_buf::grainSize), + sbcpb, tbb::simple_partitioner()); + + if(util::verbose) { + std::stringstream ss; + ss << P.size() << " nodes in bucket"<< ", " + << "dividing by: [ " << p1 << ", " << p2 << " ], " + << "farthest node: " << sbcpb.farthestPoint(); + util::OUTPUT.push_back(ss.str()); + } + + return sbcpb.farthestPoint(); +} + +void divide_and_conquer(const pointVec_t &P, pointVec_t &H, + point_t p1, point_t p2) { + assert(P.size() >= 2); + pointVec_t P_reduced; + pointVec_t H1, H2; + point_t p_far = divide(P, P_reduced, p1, p2); + if (P_reduced.size()<2) { + H.push_back(p1); + appendVector(P_reduced, H); + } + else { + divide_and_conquer(P_reduced, H1, p1, p_far); + divide_and_conquer(P_reduced, H2, p_far, p2); + + appendVector(H1, H); + appendVector(H2, H); + } +} + +void quickhull(const pointVec_t &points, pointVec_t &hull) { + if (points.size() < 2) { + appendVector(points, hull); + return; + } + + point_t p_maxx = extremum(points); + point_t p_minx = extremum(points); + + pointVec_t H; + + divide_and_conquer(points, hull, p_maxx, p_minx); + divide_and_conquer(points, H, p_minx, p_maxx); + + appendVector(H, hull); +} + +int main(int argc, char* argv[]) { + util::my_time_t tm_main_begin = util::gettime(); + + util::ParseInputArgs(argc, argv); + + pointVec_t points; + pointVec_t hull; + int nthreads; + + points.reserve(cfg::numberOfPoints); + + if(!util::silent) { + std::cout << "Starting TBB-buffered version of QUICK HULL algorithm" << std::endl; + } + + for(nthreads=cfg::threads.first; nthreads<=cfg::threads.last; nthreads=cfg::threads.step(nthreads)) { + tbb::task_scheduler_init init(nthreads); + + points.clear(); + util::my_time_t tm_init = util::gettime(); + initialize(points); + util::my_time_t tm_start = util::gettime(); + if(!util::silent) { + std::cout <<"Init time on "< + + +

    Overview

    +Parallel version of convex hull algorithm (quick hull). + +

    Files

    +
    +
    convex_hull_sample.cpp +
    Source code for TBB version of example. +
    convex_hull_bench.cpp +
    Source code for version of example that compares serial and TBB buffered and unbuffered implementations. +
    convex_hull.h +
    Include file for example. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. + +

    Usage

    +
    +
    convex_hull_sample [S] [M[:N]] [-v] +
    S is the number of points (problem size). + M:N are a range of numbers of threads to be used. + Use the -v option to turn on verbose output. +
    To run a short version of this example, e.g., for use with Intel® Threading Tools: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small problem size and the desired number of threads, e.g., convex_hull_sample 500000 4. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.icproj new file mode 100644 index 0000000000..6667cee583 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.vcproj new file mode 100644 index 0000000000..f6b9c06a8b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_benchmark.vcproj @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_cl.sln new file mode 100644 index 0000000000..8dbd65124c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_cl.sln @@ -0,0 +1,35 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convex_hull_benchmark", "convex_hull_benchmark.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252A}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convex_hull_sample", "convex_hull_sample.vcproj", "{5F897A77-EBD9-4462-94D4-06E2ADE47F3B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|Win32.Build.0 = Debug|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|x64.ActiveCfg = Debug|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|x64.Build.0 = Debug|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|Win32.ActiveCfg = Release|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|Win32.Build.0 = Release|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|x64.ActiveCfg = Release|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_icl.sln new file mode 100644 index 0000000000..7d1545f782 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_icl.sln @@ -0,0 +1,51 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "convex_hull_benchmark", "convex_hull_benchmark.icproj", "{347CD752-84DD-4E7C-9DB3-90B740C03E8E}" +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "convex_hull_sample", "convex_hull_sample.icproj", "{B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Debug|Win32.ActiveCfg = Debug|Win32 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Debug|Win32.Build.0 = Debug|Win32 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Debug|x64.ActiveCfg = Debug|x64 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Debug|x64.Build.0 = Debug|x64 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Release|Win32.ActiveCfg = Release|Win32 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Release|Win32.Build.0 = Release|Win32 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Release|x64.ActiveCfg = Release|x64 + {347CD752-84DD-4E7C-9DB3-90B740C03E8E}.Release|x64.Build.0 = Release|x64 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Debug|Win32.ActiveCfg = Debug|Win32 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Debug|Win32.Build.0 = Debug|Win32 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Debug|x64.ActiveCfg = Debug|x64 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Debug|x64.Build.0 = Debug|x64 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Release|Win32.ActiveCfg = Release|Win32 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Release|Win32.Build.0 = Release|Win32 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Release|x64.ActiveCfg = Release|x64 + {B83E81E3-9EB0-4C22-B6CF-F2329A496EDA}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|x64.Build.0 = Release|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|x64.ActiveCfg = Release|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|Win32.Build.0 = Release|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Release|Win32.ActiveCfg = Release|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|x64.Build.0 = Debug|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|x64.ActiveCfg = Debug|x64 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|Win32.Build.0 = Debug|Win32 + {5F897A77-EBD9-4462-94D4-06E2ADE47F3B}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.icproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.icproj new file mode 100644 index 0000000000..b6926c0add --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.vcproj new file mode 100644 index 0000000000..10f0eae860 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/msvs/convex_hull_sample.vcproj @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6b35ba1362 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/convex_hull/xcode/convex_hull.xcodeproj/project.pbxproj @@ -0,0 +1,441 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A146114A0B94631F000C6B18 /* convex_hull_bench.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A14611490B94631F000C6B18 /* convex_hull_bench.cpp */; }; + A1F593A60B8F042A00073279 /* convex_hull_sample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* convex_hull_sample.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594FC0B8F4F1000073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F594FD0B8F4F1800073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594F40B8F4E7700073279 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F594FD0B8F4F1800073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + A14611490B94631F000C6B18 /* convex_hull_bench.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = convex_hull_bench.cpp; path = ../convex_hull_bench.cpp; sourceTree = SOURCE_ROOT; }; + A146114C0B9463CB000C6B18 /* convex_hull.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = convex_hull.h; path = ../convex_hull.h; sourceTree = SOURCE_ROOT; }; + A1F593A50B8F042A00073279 /* convex_hull_sample.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = convex_hull_sample.cpp; path = ../convex_hull_sample.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; + A1F594EB0B8F4B5600073279 /* convex_hull_bench */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = convex_hull_bench; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F594FA0B8F4EE000073279 /* convex_hull_sample */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = convex_hull_sample; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594E90B8F4B5600073279 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F594FC0B8F4F1000073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* convex_hull */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = convex_hull; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A146114C0B9463CB000C6B18 /* convex_hull.h */, + A14611490B94631F000C6B18 /* convex_hull_bench.cpp */, + A1F593A50B8F042A00073279 /* convex_hull_sample.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + A1F594EB0B8F4B5600073279 /* convex_hull_bench */, + A1F594FA0B8F4EE000073279 /* convex_hull_sample */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* convex_hull_sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "convex_hull_sample" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = convex_hull_sample; + productInstallPath = "$(HOME)/bin"; + productName = convex_hull; + productReference = A1F594FA0B8F4EE000073279 /* convex_hull_sample */; + productType = "com.apple.product-type.tool"; + }; + A1F594EA0B8F4B5600073279 /* convex_hull_bench */ = { + isa = PBXNativeTarget; + buildConfigurationList = A1F594EE0B8F4B8200073279 /* Build configuration list for PBXNativeTarget "convex_hull_bench" */; + buildPhases = ( + A1F594E80B8F4B5600073279 /* Sources */, + A1F594E90B8F4B5600073279 /* Frameworks */, + A1F594F40B8F4E7700073279 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = convex_hull_bench; + productName = convex_hull_bench; + productReference = A1F594EB0B8F4B5600073279 /* convex_hull_bench */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "convex_hull" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* convex_hull */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* convex_hull_sample */, + A1F594EA0B8F4B5600073279 /* convex_hull_bench */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* convex_hull_sample.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + A1F594E80B8F4B5600073279 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A146114A0B94631F000C6B18 /* convex_hull_bench.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_sample; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_sample; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_sample; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_sample; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; + A1F594EF0B8F4B8200073279 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_GENERATE_DEBUGGING_SYMBOLS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_bench; + ZERO_LINK = NO; + }; + name = Debug; + }; + A1F594F00B8F4B8200073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_bench; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F594F10B8F4B8200073279 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_bench; + ZERO_LINK = NO; + }; + name = Release; + }; + A1F594F20B8F4B8200073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = convex_hull_bench; + ZERO_LINK = NO; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "convex_hull_sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "convex_hull" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + A1F594EE0B8F4B8200073279 /* Build configuration list for PBXNativeTarget "convex_hull_bench" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A1F594EF0B8F4B8200073279 /* Debug */, + A1F594F00B8F4B8200073279 /* Debug64 */, + A1F594F10B8F4B8200073279 /* Release */, + A1F594F20B8F4B8200073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/index.html new file mode 100644 index 0000000000..970b242524 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/index.html @@ -0,0 +1,26 @@ + + + +

    Overview

    +This directory has examples of the template parallel_reduce. + +

    Directories

    +
    +
    convex_hull +
    Parallel version of convex hull algorithm (quick hull). +
    primes +
    Parallel version of the Sieve of Eratosthenes. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile new file mode 100644 index 0000000000..dee9641210 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile @@ -0,0 +1,78 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=primes +ARGS= +PERF_RUN_ARGS=silent auto 1000000000 1000 20 + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(offload), mic) +override CXXFLAGS += -D__TBB_MIC_OFFLOAD=1 +endif + +ifeq (,$(filter icc icpc,$(CXX))) +TBBLIB = -ltbb +TBBLIB_DEBUG = -ltbb_debug +else +TBBLIB = -tbb +TBBLIB_DEBUG = -ltbb_debug +ifeq ($(offload), mic) +TBBLIB_DEBUG += -offload-option,mic,ld,"-ltbb_debug -L${TBBROOT}/lib/mic/" +endif +endif + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: main.cpp primes.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB) $(LIBS) + +debug: main.cpp primes.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB_DEBUG) $(LIBS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile.windows new file mode 100644 index 0000000000..ce91ee18a2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/Makefile.windows @@ -0,0 +1,60 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Primes +ARGS=0:auto +PERF_RUN_ARGS=silent auto 1000000000 1000 20 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) main.cpp primes.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) main.cpp primes.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) + +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/index.html b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/index.html new file mode 100644 index 0000000000..6fb61470f4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/index.html @@ -0,0 +1,63 @@ + + + +

    Overview

    +
    +
    Parallel version of the Sieve of Eratosthenes. +
    The example can be built in the offload version to run on Intel® Many Integrated Core (Intel® MIC) Architecture based coprocessor (see build instructions). +
    + +

    Files

    +
    +
    main.cpp +
    Main program which parses command line options and runs the algorithm with different numbers of threads. +
    primes.h +
    The Sieve of Eratosthenes interface. +
    primes.cpp +
    The Sieve of Eratosthenes implementation. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. +here + +

    Usage

    +
    +
    primes -h +
    Prints the help for command line options +
    primes [n-of-threads=value] [number=value] [grain-size=value] [n-of-repeats=value] [silent] +
    primes [n-of-threads [number [grain-size [n-of-repeats]]]][silent] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + number is an upper bound of range to search primes in, must be a positive integer.
    + grain-size is an optional grain size, must be a positive integer.
    + n-of-repeats is a number of the calculation repeats, must be a positive integer.
    + silent - no output except elapsed time.
    + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small problem size and the desired number of threads, e.g., primes 4 100000. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/main.cpp new file mode 100644 index 0000000000..4f4674df9e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/main.cpp @@ -0,0 +1,132 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "primes.h" +#include +#include +#include +#include +#include +#include +#include +#include "tbb/tick_count.h" + +#include "../../common/utility/utility.h" + +struct RunOptions{ + //! NumberType of threads to use. + utility::thread_number_range threads; + //whether to suppress additional output + bool silentFlag; + // + NumberType n; + //! Grain size parameter + NumberType grainSize; + // number of time to repeat calculation + NumberType repeatNumber; + + RunOptions(utility::thread_number_range threads, NumberType grainSize, NumberType n, bool silentFlag, NumberType repeatNumber) + : threads(threads), grainSize(grainSize), n(n), silentFlag(silentFlag), repeatNumber(repeatNumber) + {} +}; + +int do_get_default_num_threads() { + int threads; + #if __TBB_MIC_OFFLOAD + #pragma offload target(mic) out(threads) + #endif // __TBB_MIC_OFFLOAD + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +int get_default_num_threads() { + static int threads = do_get_default_num_threads(); + return threads; +} + +//! Parse the command line. +static RunOptions ParseCommandLine( int argc, const char* argv[] ) { + utility::thread_number_range threads( get_default_num_threads, 0, get_default_num_threads() ); + NumberType grainSize = 1000; + bool silent = false; + NumberType number = 100000000; + NumberType repeatNumber = 1; + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(number,"number","upper bound of range to search primes in, must be a positive integer") + .positional_arg(grainSize,"grain-size","must be a positive integer") + .positional_arg(repeatNumber,"n-of-repeats","repeat the calculation this number of times, must be a positive integer") + .arg(silent,"silent","no output except elapsed time") + ); + + RunOptions options(threads,grainSize, number, silent, repeatNumber); + return options; +} + +int main( int argc, const char* argv[] ) { + tbb::tick_count mainBeginMark = tbb::tick_count::now(); + RunOptions options =ParseCommandLine(argc,argv); + + // Try different numbers of threads + for( int p=options.threads.first; p<=options.threads.last; p=options.threads.step(p) ) { + for (NumberType i=0; i + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes.vcproj new file mode 100644 index 0000000000..74d2ef29e2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes.vcproj @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_cl.sln new file mode 100644 index 0000000000..9e30985f9d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "primes", "primes.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_icl.sln new file mode 100644 index 0000000000..cde13dca1d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/msvs/primes_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "primes", "primes.icproj", "{D731702C-B704-468D-9497-A75EE0521C89}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|Win32.ActiveCfg = Debug|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|Win32.Build.0 = Debug|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|x64.ActiveCfg = Debug|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Debug|x64.Build.0 = Debug|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|Win32.ActiveCfg = Release|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|Win32.Build.0 = Release|Win32 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|x64.ActiveCfg = Release|x64 + {D731702C-B704-468D-9497-A75EE0521C89}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252A}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.cpp b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.cpp new file mode 100644 index 0000000000..ee4dded807 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.cpp @@ -0,0 +1,317 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Example program that computes number of prime numbers up to n, +// where n is a command line argument. The algorithm here is a +// fairly efficient version of the sieve of Eratosthenes. +// The parallel version demonstrates how to use parallel_reduce, +// and in particular how to exploit lazy splitting. + +#include "primes.h" + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (target(mic)) +#endif // __TBB_MIC_OFFLOAD +#include +#include +#include +#include +#include +#include +#include +#include "tbb/parallel_reduce.h" +#include "tbb/task_scheduler_init.h" + +using namespace std; + +//! If true, then print primes on stdout. +static bool printPrimes = false; + + +class Multiples { + inline NumberType strike( NumberType start, NumberType limit, NumberType stride ) { + // Hoist "my_is_composite" into register for sake of speed. + bool* is_composite = my_is_composite; + assert( stride>=2 ); + for( ;start=1 ); + my_is_composite = new bool[m/2]; + my_striker = new NumberType[m/2]; + for( size_t k=0; k=2; + if( n>=3 ) { + Multiples multiples(n); + count += multiples.n_factor; + if( printPrimes ) + printf("---\n"); + NumberType window_size = multiples.m; + for( NumberType j=multiples.m; j<=n; j+=window_size ) { + if( j+window_size>n+1 ) + window_size = n+1-j; + count += multiples.find_primes_in_window( j, window_size ); + } + } + return count; +} + +//! Range of a sieve window. +class SieveRange { + //! Width of full-size window into sieve. + const NumberType my_stride; + + //! Always multiple of my_stride + NumberType my_begin; + + //! One past last number in window. + NumberType my_end; + + //! Width above which it is worth forking. + const NumberType my_grainsize; + + bool assert_okay() const { + assert( my_begin%my_stride==0 ); + assert( my_begin<=my_end ); + assert( my_stride<=my_grainsize ); + return true; + } +public: + //------------------------------------------------------------------------ + // Begin signatures required by parallel_reduce + //------------------------------------------------------------------------ + bool is_divisible() const {return my_end-my_begin>my_grainsize;} + bool empty() const {return my_end<=my_begin;} + SieveRange( SieveRange& r, tbb::split ) : + my_stride(r.my_stride), + my_grainsize(r.my_grainsize), + my_end(r.my_end) + { + assert( r.is_divisible() ); + assert( r.assert_okay() ); + NumberType middle = r.my_begin + (r.my_end-r.my_begin+r.my_stride-1)/2; + middle = middle/my_stride*my_stride; + my_begin = middle; + r.my_end = middle; + assert( assert_okay() ); + assert( r.assert_okay() ); + } + //------------------------------------------------------------------------ + // End of signatures required by parallel_reduce + //------------------------------------------------------------------------ + NumberType begin() const {return my_begin;} + NumberType end() const {return my_end;} + SieveRange( NumberType begin, NumberType end, NumberType stride, NumberType grainsize ) : + my_begin(begin), + my_end(end), + my_stride(stride), + my_grainsize(grainsizer.end() ) + window_size = r.end()-j; + count += multiples.find_primes_in_window( j, window_size ); + } + } + void join( Sieve& other ) { + count += other.count; + // Final value of multiples needs to final value of other.mulitiples, + // so that *this can correcty process next window to right. + multiples.move( other.multiples ); + } + Sieve( Sieve& other, tbb::split ) : + multiples(other.multiples,tbb::split()), + count(0) + {} + //------------------------------------------------------------------------ + // End of signatures required by parallel_reduce + //------------------------------------------------------------------------ +}; + +//! Count number of primes between 0 and n +/** This is the parallel version. */ +NumberType ParallelCountPrimes( NumberType n , int number_of_threads, NumberType grain_size ) { + tbb::task_scheduler_init init(number_of_threads); + + // Two is special case + NumberType count = n>=2; + if( n>=3 ) { + Sieve s(n); + count += s.multiples.n_factor; + if( printPrimes ) + printf("---\n"); + using namespace tbb; + // Explicit grain size and simple_partitioner() used here instead of automatic grainsize + // determination becase we want SieveRange to be decomposed down to grainSize or smaller. + // Doing so improves odds that the working set fits in cache when evaluating Sieve::operator(). + parallel_reduce( SieveRange( s.multiples.m, n, s.multiples.m, grain_size ), s, simple_partitioner() ); + count += s.count; + } + return count; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.h b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.h new file mode 100644 index 0000000000..2d740b10dd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/primes.h @@ -0,0 +1,52 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef PRIMES_H_ +#define PRIMES_H_ + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (push,target(mic)) +#endif // __TBB_MIC_OFFLOAD + +#include "tbb/task_scheduler_init.h" +#include +typedef std::size_t NumberType; + +//! Count number of primes between 0 and n +/** This is the serial version. */ +NumberType SerialCountPrimes( NumberType n); + +//! Count number of primes between 0 and n +/** This is the parallel version. */ +NumberType ParallelCountPrimes( NumberType n, int numberOfThreads= tbb::task_scheduler_init::automatic, NumberType grainSize = 1000); + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (pop) +#endif // __TBB_MIC_OFFLOAD + +#endif /* PRIMES_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..2202d3115e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/parallel_reduce/primes/xcode/primes.xcodeproj/project.pbxproj @@ -0,0 +1,311 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A1F593A60B8F042A00073279 /* primes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* primes.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + EA8D882D1301731B00385DE1 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EA8D882C1301731B00385DE1 /* main.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8DD76F6C0486A84900D96B5E /* primes */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = primes; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* primes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = primes.cpp; path = ../primes.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; + EA8D882B130172E400385DE1 /* primes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = primes.h; path = ../primes.h; sourceTree = SOURCE_ROOT; }; + EA8D882C1301731B00385DE1 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* primes */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = primes; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + EA8D882C1301731B00385DE1 /* main.cpp */, + EA8D882B130172E400385DE1 /* primes.h */, + A1F593A50B8F042A00073279 /* primes.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* primes */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* primes */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "primes" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = primes; + productInstallPath = "$(HOME)/bin"; + productName = primes; + productReference = 8DD76F6C0486A84900D96B5E /* primes */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "primes" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* primes */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* primes */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* primes.cpp in Sources */, + EA8D882D1301731B00385DE1 /* main.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = primes; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = primes; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = primes; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = primes; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "primes" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "primes" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/index.html b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/index.html new file mode 100644 index 0000000000..e100c5959d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/index.html @@ -0,0 +1,24 @@ + + + +

    Overview

    +This directory has examples of the template pipeline. + +

    Directories

    +
    +
    square +
    Another simple string transformation example that squares numbers read from a file. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile new file mode 100644 index 0000000000..ed94e74b23 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile @@ -0,0 +1,74 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=square +ARGS=0 input.txt output.txt +PERF_RUN_ARGS=auto input.txt output.txt silent +GEN=gen_input + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +SQUARE = square.cpp + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: $(SQUARE) input.txt + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $(SQUARE) -ltbb $(LIBS) + +debug: $(SQUARE) input.txt + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $(SQUARE) -ltbb_debug $(LIBS) + +clean: + $(RM) $(PROG) $(GEN) *.o *.d input.txt output.txt + +$(GEN): gen_input.cpp + $(CXX) -O2 $(CXXFLAGS) -o $(GEN) $^ $(LIBS) + +input.txt: $(GEN) + ./$(GEN) >input.txt + +test: input.txt + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: $(SQUARE) input.txt + $(CXX) -O2 -msse2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $(SQUARE) -ltbb $(LIBS) + +perf_run: input.txt + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile.windows new file mode 100644 index 0000000000..016fb45d4b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/Makefile.windows @@ -0,0 +1,62 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=square +ARGS=0 input.txt output.txt +PERF_RUN_ARGS=auto input.txt output.txt silent + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS) /D _CRT_SECURE_NO_DEPRECATE /D _SECURE_SCL=0 /arch:sse2 +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) +SQUARE = square.cpp + +all: release test +release: compiler_check + $(CXX) $(SQUARE) /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) $(SQUARE) /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe input.txt output.txt *.obj *.?db *.manifest gen_input.exe +gen_input.exe: gen_input.cpp + $(CXX) gen_input.cpp +input.txt: gen_input.exe + gen_input.exe > input.txt +test: input.txt + $(PROG) $(ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test +perf_build: release +perf_run: input.txt + $(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/gen_input.cpp b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/gen_input.cpp new file mode 100644 index 0000000000..c4d327cf37 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/gen_input.cpp @@ -0,0 +1,44 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include + +//! Generates sample input for square.cpp +int main( int argc, char* argv[] ) { + long num = argc>1 ? atol(argv[1]) : 1000000; + int a=0; + int b=1; + for( long j=0; j + + +

    Overview

    +Text filter that demonstrates class pipeline. Example program reads a file +containing decimal integers in text format, and changes each to its square. + +

    Files

    +
    +
    square.cpp +
    Source code for example. +
    gen_input.cpp +
    Source code for sample input generation. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. +

    +Two additional targets for this example: +
    +
    make gen_input +
    Create an input generator program that prints out a sequence of integers. +
    make input.txt +
    Create an input file for the example (with help of gen_input). +
    +

    + +

    Usage

    +
    +
    square -h +
    Prints the help for command line options +
    square [n-of-threads=value] [input-file=value] [output-file=value] [max-slice-size=value] [silent] +
    square [n-of-threads [input-file [output-file [max-slice-size]]]] [silent] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + input-file is an input file name.
    + output-file is an output file name.
    + max-slice-size is the maximum number of characters in one slice.
    + silent - no output except elapsed time.
    +
    gen_input [LN] > inputfile +
    Generate a file named inputfile consisting of LN lines each containing one integer. + If not specified, LN is assumed to be 1000000. + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Prepare an inputfile with about 5,000 lines of text (see the instruction above). +
    Run it with this inputfile and the desired number of threads, + e.g., square 4 inputfile outputfile. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.icproj b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.icproj new file mode 100644 index 0000000000..50048b7396 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.vcproj new file mode 100644 index 0000000000..9a0af57a44 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/gen_input.vcproj @@ -0,0 +1,354 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.icproj b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.icproj new file mode 100644 index 0000000000..a957bf566f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj new file mode 100644 index 0000000000..3632731662 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj @@ -0,0 +1,384 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj.user b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj.user new file mode 100644 index 0000000000..22c54af9cc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square.vcproj.user @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_cl.sln new file mode 100644 index 0000000000..056f4f246b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_cl.sln @@ -0,0 +1,38 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "square", "square.vcproj", "{A21C0AEE-ADDC-45F0-A668-58FF10351D23}" + ProjectSection(ProjectDependencies) = postProject + {25A46A49-406F-4681-8AC9-5FE46F38E5A7} = {25A46A49-406F-4681-8AC9-5FE46F38E5A7} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen_input", "gen_input.vcproj", "{25A46A49-406F-4681-8AC9-5FE46F38E5A7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.ActiveCfg = Debug|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.Build.0 = Debug|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.ActiveCfg = Debug|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.Build.0 = Debug|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.ActiveCfg = Release|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.Build.0 = Release|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.ActiveCfg = Release|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.Build.0 = Release|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|Win32.ActiveCfg = Debug|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|Win32.Build.0 = Debug|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|x64.ActiveCfg = Debug|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|x64.Build.0 = Debug|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|Win32.ActiveCfg = Release|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|Win32.Build.0 = Release|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|x64.ActiveCfg = Release|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_icl.sln new file mode 100644 index 0000000000..f1223570b7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/msvs/square_icl.sln @@ -0,0 +1,54 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "square", "square.icproj", "{7462FB4A-C9BE-40D4-A568-5D08F507EEB1}" + ProjectSection(ProjectDependencies) = postProject + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA} = {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA} + EndProjectSection +EndProject +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "gen_input", "gen_input.icproj", "{18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Debug|Win32.ActiveCfg = Debug|Win32 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Debug|Win32.Build.0 = Debug|Win32 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Debug|x64.ActiveCfg = Debug|x64 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Debug|x64.Build.0 = Debug|x64 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Release|Win32.ActiveCfg = Release|Win32 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Release|Win32.Build.0 = Release|Win32 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Release|x64.ActiveCfg = Release|x64 + {7462FB4A-C9BE-40D4-A568-5D08F507EEB1}.Release|x64.Build.0 = Release|x64 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Debug|Win32.Build.0 = Debug|Win32 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Debug|x64.ActiveCfg = Debug|x64 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Debug|x64.Build.0 = Debug|x64 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Release|Win32.ActiveCfg = Release|Win32 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Release|Win32.Build.0 = Release|Win32 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Release|x64.ActiveCfg = Release|x64 + {18ECAB6C-2630-4F8F-BEF2-3DBDEF7355AA}.Release|x64.Build.0 = Release|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.Build.0 = Release|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|x64.ActiveCfg = Release|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.Build.0 = Release|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Release|Win32.ActiveCfg = Release|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.Build.0 = Debug|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|x64.ActiveCfg = Debug|x64 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.Build.0 = Debug|Win32 + {A21C0AEE-ADDC-45F0-A668-58FF10351D23}.Debug|Win32.ActiveCfg = Debug|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|x64.Build.0 = Release|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|x64.ActiveCfg = Release|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|Win32.Build.0 = Release|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Release|Win32.ActiveCfg = Release|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|x64.Build.0 = Debug|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|x64.ActiveCfg = Debug|x64 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|Win32.Build.0 = Debug|Win32 + {25A46A49-406F-4681-8AC9-5FE46F38E5A7}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/square.cpp b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/square.cpp new file mode 100644 index 0000000000..ac44dd1f85 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/pipeline/square/square.cpp @@ -0,0 +1,284 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// +// Example program that reads a file of decimal integers in text format +// and changes each to its square. +// +#include "tbb/pipeline.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tbb_allocator.h" +#include +#include +#include +#include +#include "../../common/utility/utility.h" + +using namespace std; + +//! Holds a slice of text. +/** Instances *must* be allocated/freed using methods herein, because the C++ declaration + represents only the header of a much larger object in memory. */ +class TextSlice { + //! Pointer to one past last character in sequence + char* logical_end; + //! Pointer to one past last available byte in sequence. + char* physical_end; +public: + //! Allocate a TextSlice object that can hold up to max_size characters. + static TextSlice* allocate( size_t max_size ) { + // +1 leaves room for a terminating null character. + TextSlice* t = (TextSlice*)tbb::tbb_allocator().allocate( sizeof(TextSlice)+max_size+1 ); + t->logical_end = t->begin(); + t->physical_end = t->begin()+max_size; + return t; + } + //! Free a TextSlice object + void free() { + tbb::tbb_allocator().deallocate((char*)this,sizeof(TextSlice)+(physical_end-begin())+1); + } + //! Pointer to beginning of sequence + char* begin() {return (char*)(this+1);} + //! Pointer to one past last character in sequence + char* end() {return logical_end;} + //! Length of sequence + size_t size() const {return logical_end-(char*)(this+1);} + //! Maximum number of characters that can be appended to sequence + size_t avail() const {return physical_end-logical_end;} + //! Append sequence [first,last) to this sequence. + void append( char* first, char* last ) { + memcpy( logical_end, first, last-first ); + logical_end += last-first; + } + //! Set end() to given value. + void set_end( char* p ) {logical_end=p;} +}; + +size_t MAX_CHAR_PER_INPUT_SLICE = 4000; +string InputFileName = "input.txt"; +string OutputFileName = "output.txt"; + +class MyInputFilter: public tbb::filter { +public: + MyInputFilter( FILE* input_file_ ); + ~MyInputFilter(); +private: + FILE* input_file; + TextSlice* next_slice; + /*override*/ void* operator()(void*); +}; + +MyInputFilter::MyInputFilter( FILE* input_file_ ) : + filter(serial_in_order), + input_file(input_file_), + next_slice( TextSlice::allocate( MAX_CHAR_PER_INPUT_SLICE ) ) +{ +} + +MyInputFilter::~MyInputFilter() { + next_slice->free(); +} + +void* MyInputFilter::operator()(void*) { + // Read characters into space that is available in the next slice. + size_t m = next_slice->avail(); + size_t n = fread( next_slice->end(), 1, m, input_file ); + if( !n && next_slice->size()==0 ) { + // No more characters to process + return NULL; + } else { + // Have more characters to process. + TextSlice& t = *next_slice; + next_slice = TextSlice::allocate( MAX_CHAR_PER_INPUT_SLICE ); + char* p = t.end()+n; + if( n==m ) { + // Might have read partial number. If so, transfer characters of partial number to next slice. + while( p>t.begin() && isdigit(p[-1]) ) + --p; + next_slice->append( p, t.end()+n ); + } + t.set_end(p); + return &t; + } +} + +//! Filter that changes each decimal number to its square. +class MyTransformFilter: public tbb::filter { +public: + MyTransformFilter(); + /*override*/void* operator()( void* item ); +}; + +MyTransformFilter::MyTransformFilter() : + tbb::filter(parallel) +{} + +/*override*/void* MyTransformFilter::operator()( void* item ) { + TextSlice& input = *static_cast(item); + // Add terminating null so that strtol works right even if number is at end of the input. + *input.end() = '\0'; + char* p = input.begin(); + TextSlice& out = *TextSlice::allocate( 2*MAX_CHAR_PER_INPUT_SLICE ); + char* q = out.begin(); + for(;;) { + while( p(item); + size_t n = fwrite( out.begin(), 1, out.size(), my_output_file ); + if( n!=out.size() ) { + fprintf(stderr,"Can't write into file '%s'\n", OutputFileName.c_str()); + exit(1); + } + out.free(); + return NULL; +} + +bool silent = false; + +int run_pipeline( int nthreads ) +{ + FILE* input_file = fopen( InputFileName.c_str(), "r" ); + if( !input_file ) { + throw std::invalid_argument( ("Invalid input file name: "+InputFileName).c_str() ); + return 0; + } + FILE* output_file = fopen( OutputFileName.c_str(), "w" ); + if( !output_file ) { + throw std::invalid_argument( ("Invalid output file name: "+OutputFileName).c_str() ); + return 0; + } + + // Create the pipeline + tbb::pipeline pipeline; + + // Create file-reading writing stage and add it to the pipeline + MyInputFilter input_filter( input_file ); + pipeline.add_filter( input_filter ); + + // Create squaring stage and add it to the pipeline + MyTransformFilter transform_filter; + pipeline.add_filter( transform_filter ); + + // Create file-writing stage and add it to the pipeline + MyOutputFilter output_filter( output_file ); + pipeline.add_filter( output_filter ); + + // Run the pipeline + tbb::tick_count t0 = tbb::tick_count::now(); + // Need more than one token in flight per thread to keep all threads + // busy; 2-4 works + pipeline.run( nthreads*4 ); + tbb::tick_count t1 = tbb::tick_count::now(); + + fclose( output_file ); + fclose( input_file ); + + if ( !silent ) printf("time = %g\n", (t1-t0).seconds()); + + return 1; +} + +int main( int argc, char* argv[] ) { + try { + tbb::tick_count mainStartTime = tbb::tick_count::now(); + + // The 1st argument is the function to obtain 'auto' value; the 2nd is the default value + // The example interprets 0 threads as "run serially, then fully subscribed" + utility::thread_number_range threads( tbb::task_scheduler_init::default_num_threads, 0 ); + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(InputFileName,"input-file","input file name") + .positional_arg(OutputFileName,"output-file","output file name") + .positional_arg(MAX_CHAR_PER_INPUT_SLICE, "max-slice-size","the maximum number of characters in one slice") + .arg(silent,"silent","no output except elapsed time") + ); + + if ( threads.first ) { + for(int p = threads.first; p <= threads.last; p=threads.step(p) ) { + if ( !silent ) printf("threads = %d ", p); + tbb::task_scheduler_init init(p); + if(!run_pipeline (p)) + return 1; + } + } else { // Number of threads wasn't set explicitly. Run serial and parallel version + { // serial run + if ( !silent ) printf("serial run "); + tbb::task_scheduler_init init_serial(1); + if(!run_pipeline (1)) + return 1; + } + { // parallel run (number of threads is selected automatically) + if ( !silent ) printf("parallel run "); + tbb::task_scheduler_init init_parallel; + if(!run_pipeline (init_parallel.default_num_threads())) + return 1; + } + } + + utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds()); + + return 0; + } catch(std::exception& e) { + std::cerr<<"error occurred. error text is :\"" < + + +

    Overview

    +This directory has examples of how to use the raw task scheduler. + +

    Directories

    +
    +
    tree_sum +
    Sum values in a tree. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile new file mode 100644 index 0000000000..8bbd31c195 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile @@ -0,0 +1,65 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=tree_sum +ARGS= +PERF_RUN_ARGS=auto 100000000 silent + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc -ltbb $(LIBS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbbmalloc_debug -ltbb_debug $(LIBS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + $(run_cmd) ./$(PROG) stdmalloc $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile.windows new file mode 100644 index 0000000000..0dda1f598e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/Makefile.windows @@ -0,0 +1,60 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Tree_sum +ARGS= +PERF_RUN_ARGS=auto 100000000 silent + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbbmalloc.lib tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbbmalloc_debug.lib tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) + $(PROG) stdmalloc $(ARGS) +perf_build: release + +perf_run: + $(PROG) $(PERF_RUN_ARGS) + +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/OptimizedParallelSumTree.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/OptimizedParallelSumTree.cpp new file mode 100644 index 0000000000..b3a454abe7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/OptimizedParallelSumTree.cpp @@ -0,0 +1,77 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "common.h" +#include "tbb/task.h" + +class OptimizedSumTask: public tbb::task { + Value* const sum; + TreeNode* root; + bool is_continuation; + Value x, y; +public: + OptimizedSumTask( TreeNode* root_, Value* sum_ ) : root(root_), sum(sum_), is_continuation(false) { + } + tbb::task* execute() { + tbb::task* next = NULL; + if( !is_continuation ) { + if( root->node_count<1000 ) { + *sum = SerialSumTree(root); + } else { + // Create tasks before spawning any of them. + tbb::task* a = NULL; + tbb::task* b = NULL; + if( root->left ) + a = new( allocate_child() ) OptimizedSumTask(root->left,&x); + if( root->right ) + b = new( allocate_child() ) OptimizedSumTask(root->right,&y); + recycle_as_continuation(); + is_continuation = true; + set_ref_count( (a!=NULL)+(b!=NULL) ); + if( a ) { + if( b ) spawn(*b); + } else + a = b; + next = a; + } + } else { + *sum = root->value; + if( root->left ) *sum += x; + if( root->right ) *sum += y; + } + return next; + } +}; + +Value OptimizedParallelSumTree( TreeNode* root ) { + Value sum; + OptimizedSumTask& a = *new(tbb::task::allocate_root()) OptimizedSumTask(root,&sum); + tbb::task::spawn_root_and_wait(a); + return sum; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SerialSumTree.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SerialSumTree.cpp new file mode 100644 index 0000000000..03acf778ba --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SerialSumTree.cpp @@ -0,0 +1,38 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "common.h" + +Value SerialSumTree( TreeNode* root ) { + Value result = root->value; + if( root->left ) + result += SerialSumTree(root->left); + if( root->right ) + result += SerialSumTree(root->right); + return result; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SimpleParallelSumTree.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SimpleParallelSumTree.cpp new file mode 100644 index 0000000000..2e9cf9385e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/SimpleParallelSumTree.cpp @@ -0,0 +1,70 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "common.h" +#include "tbb/task.h" + +class SimpleSumTask: public tbb::task { + Value* const sum; + TreeNode* root; +public: + SimpleSumTask( TreeNode* root_, Value* sum_ ) : root(root_), sum(sum_) {} + task* execute() { + if( root->node_count<1000 ) { + *sum = SerialSumTree(root); + } else { + Value x, y; + int count = 1; + tbb::task_list list; + if( root->left ) { + ++count; + list.push_back( *new( allocate_child() ) SimpleSumTask(root->left,&x) ); + } + if( root->right ) { + ++count; + list.push_back( *new( allocate_child() ) SimpleSumTask(root->right,&y) ); + } + // Argument to set_ref_count is one more than size of the list, + // because spawn_and_wait_for_all expects an augmented ref_count. + set_ref_count(count); + spawn_and_wait_for_all(list); + *sum = root->value; + if( root->left ) *sum += x; + if( root->right ) *sum += y; + } + return NULL; + } +}; + +Value SimpleParallelSumTree( TreeNode* root ) { + Value sum; + SimpleSumTask& a = *new(tbb::task::allocate_root()) SimpleSumTask(root,&sum); + tbb::task::spawn_root_and_wait(a); + return sum; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/TreeMaker.h b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/TreeMaker.h new file mode 100644 index 0000000000..db8c42009a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/TreeMaker.h @@ -0,0 +1,124 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef TREE_MAKER_H_ +#define TREE_MAKER_H_ + +#include "tbb/tick_count.h" +#include "tbb/task.h" + +static double Pi = 3.14159265358979; + +const bool tbbmalloc = true; +const bool stdmalloc = false; + +template +class TreeMaker { + + class SubTreeCreationTask: public tbb::task { + TreeNode*& my_root; + bool is_continuation; + typedef TreeMaker MyTreeMaker; + + public: + SubTreeCreationTask( TreeNode*& root, long number_of_nodes ) : my_root(root), is_continuation(false) { + my_root = MyTreeMaker::allocate_node(); + my_root->node_count = number_of_nodes; + my_root->value = Value(Pi*number_of_nodes); + } + + tbb::task* execute() { + tbb::task* next = NULL; + if( !is_continuation ) { + long subtree_size = my_root->node_count - 1; + if( subtree_size<1000 ) { /* grainsize */ + my_root->left = MyTreeMaker::do_in_one_thread(subtree_size/2); + my_root->right = MyTreeMaker::do_in_one_thread(subtree_size - subtree_size/2); + } else { + // Create tasks before spawning any of them. + tbb::task* a = new( allocate_child() ) SubTreeCreationTask(my_root->left,subtree_size/2); + tbb::task* b = new( allocate_child() ) SubTreeCreationTask(my_root->right,subtree_size - subtree_size/2); + recycle_as_continuation(); + is_continuation = true; + set_ref_count(2); + spawn(*b); + next = a; + } + } + return next; + } + }; + +public: + static TreeNode* allocate_node() { + return use_tbbmalloc? tbb::scalable_allocator().allocate(1) : new TreeNode; + } + + static TreeNode* do_in_one_thread( long number_of_nodes ) { + if( number_of_nodes==0 ) { + return NULL; + } else { + TreeNode* n = allocate_node(); + n->node_count = number_of_nodes; + n->value = Value(Pi*number_of_nodes); + --number_of_nodes; + n->left = do_in_one_thread( number_of_nodes/2 ); + n->right = do_in_one_thread( number_of_nodes - number_of_nodes/2 ); + return n; + } + } + + static TreeNode* do_in_parallel( long number_of_nodes ) { + TreeNode* root_node; + SubTreeCreationTask& a = *new(tbb::task::allocate_root()) SubTreeCreationTask(root_node, number_of_nodes); + tbb::task::spawn_root_and_wait(a); + return root_node; + } + + static TreeNode* create_and_time( long number_of_nodes, bool silent=false ) { + tbb::tick_count t0, t1; + TreeNode* root = allocate_node(); + root->node_count = number_of_nodes; + root->value = Value(Pi*number_of_nodes); + --number_of_nodes; + + t0 = tbb::tick_count::now(); + root->left = do_in_one_thread( number_of_nodes/2 ); + t1 = tbb::tick_count::now(); + if ( !silent ) printf ("%24s: time = %.1f msec\n", "half created serially", (t1-t0).seconds()*1000); + + t0 = tbb::tick_count::now(); + root->right = do_in_parallel( number_of_nodes - number_of_nodes/2 ); + t1 = tbb::tick_count::now(); + if ( !silent ) printf ("%24s: time = %.1f msec\n", "half done in parallel", (t1-t0).seconds()*1000); + + return root; + } +}; + +#endif // TREE_MAKER_H_ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/common.h b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/common.h new file mode 100644 index 0000000000..afa63de241 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/common.h @@ -0,0 +1,44 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +typedef float Value; + +struct TreeNode { + //! Pointer to left subtree + TreeNode* left; + //! Pointer to right subtree + TreeNode* right; + //! Number of nodes in this subtree, including this node. + long node_count; + //! Value associated with the node. + Value value; +}; + +Value SerialSumTree( TreeNode* root ); +Value SimpleParallelSumTree( TreeNode* root ); +Value OptimizedParallelSumTree( TreeNode* root ); diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/index.html b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/index.html new file mode 100644 index 0000000000..7c868b5bb9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/index.html @@ -0,0 +1,76 @@ + + + +

    Overview

    +This directory contains a simple example that sums values in a tree. +The example exhibits some speedup, but not a lot, because it quickly saturates +the system bus on a multiprocessor. For good speedup, there needs to be +more computation cycles per memory reference. The point of the example +is to teach how to use the raw task interface, so the computation is +deliberately trivial. +

    +The performance of this example is better when objects are allocated +by the scalable_allocator instead of +the default "operator new". The reason is that the scalable_allocator typically +packs small objects more tightly than the default "operator new", resulting in +a smaller memory footprint, and thus more efficient use of cache and virtual memory. +In addition, the scalable_allocator performs better for multi-threaded allocations. +

    +

    Files

    +
    +
    SerialSumTree.cpp +
    Sums sequentially. +
    SimpleParallelSumTree.cpp
    +
    Sums in parallel without any fancy tricks. +
    OptimizedParallelSumTree.cpp
    +
    Sums in parallel, using "recycling" and "continuation-passing" tricks. + In this case, it is only slightly faster than the simple version. +
    common.h +
    Shared declarations. +
    main.cpp +
    Main program which parses command line options and runs the algorithm. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. +

    + +

    Usage

    +
    +
    tree_sum -h +
    Prints the help for command line options +
    tree_sum [n-of-threads=value] [number-of-nodes=value] [silent] [stdmalloc] +
    tree_sum [n-of-threads [number-of-nodes]] [silent] [stdmalloc] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the default.
    + number-of-nodes is the number of nodes in the tree.
    + silent - no output except elapsed time.
    + stdmalloc - causes the default "operator new" to be used for memory allocations instead of the scalable_allocator.
    + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small problem size and the desired number of threads, e.g., tree_sum 4 100000. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/main.cpp new file mode 100644 index 0000000000..defd19ff93 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/main.cpp @@ -0,0 +1,116 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "common.h" + +#include +#include +#include + +// The performance of this example can be significantly better when +// the objects are allocated by the scalable_allocator instead of the +// default "operator new". The reason is that the scalable_allocator +// typically packs small objects more tightly than the default "operator new", +// resulting in a smaller memory footprint, and thus more efficient use of +// cache and virtual memory. Also the scalable_allocator works faster for +// multi-threaded allocations. +// +// Pass stdmalloc as the 1st command line parameter to use the default "operator new" +// and see the performance difference. +#include "tbb/scalable_allocator.h" +#include "TreeMaker.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" + +#include "../../common/utility/utility.h" + +using namespace std; + +void Run( const char* which, Value(*SumTree)(TreeNode*), TreeNode* root, bool silent) { + tbb::tick_count t0; + if ( !silent ) t0 = tbb::tick_count::now(); + Value result = SumTree(root); + if ( !silent ) printf ("%24s: time = %.1f msec, sum=%g\n", which, (tbb::tick_count::now()-t0).seconds()*1000, result); +} + +int main( int argc, const char *argv[] ) { + try{ + tbb::tick_count mainStartTime = tbb::tick_count::now(); + + // The 1st argument is the function to obtain 'auto' value; the 2nd is the default value + // The example interprets 0 threads as "run serially, then fully subscribed" + utility::thread_number_range threads( tbb::task_scheduler_init::default_num_threads, 0 ); + long number_of_nodes = 10000000; + bool silent = false; + bool use_stdmalloc = false; + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(number_of_nodes,"number-of-nodes","the number of nodes") + .arg(silent,"silent","no output except elapsed time") + .arg(use_stdmalloc,"stdmalloc","use standard allocator") + ); + + TreeNode* root; + { // In this scope, TBB will use default number of threads for tree creation + tbb::task_scheduler_init init; + + if( use_stdmalloc ) { + if ( !silent ) printf("Tree creation using standard operator new\n"); + root = TreeMaker::create_and_time( number_of_nodes, silent ); + } else { + if ( !silent ) printf("Tree creation using TBB scalable allocator\n"); + root = TreeMaker::create_and_time( number_of_nodes, silent ); + } + } + + // Warm up caches + SerialSumTree(root); + if ( !silent ) printf("Calculations:\n"); + if ( threads.first ) { + for(int p = threads.first; p <= threads.last; p = threads.step(p) ) { + if ( !silent ) printf("threads = %d\n", p ); + tbb::task_scheduler_init init( p ); + Run ( "SimpleParallelSumTree", SimpleParallelSumTree, root, silent ); + Run ( "OptimizedParallelSumTree", OptimizedParallelSumTree, root, silent ); + } + } else { // Number of threads wasn't set explicitly. Run serial and two parallel versions + Run ( "SerialSumTree", SerialSumTree, root, silent ); + tbb::task_scheduler_init init; + Run ( "SimpleParallelSumTree", SimpleParallelSumTree, root, silent ); + Run ( "OptimizedParallelSumTree", OptimizedParallelSumTree, root, silent ); + } + utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds()); + return 0; + }catch(std::exception& e){ + std::cerr<<"error occurred. error text is :\"" < + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum.vcproj new file mode 100644 index 0000000000..ffe61c6014 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum.vcproj @@ -0,0 +1,376 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_cl.sln new file mode 100644 index 0000000000..66c92d90b7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tree_sum", "tree_sum.vcproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_icl.sln new file mode 100644 index 0000000000..7d25cdce82 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/msvs/tree_sum_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "tree_sum", "tree_sum.icproj", "{CB292CD9-903E-464C-AAFE-E7A49003565C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.Build.0 = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.ActiveCfg = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.Build.0 = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.ActiveCfg = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.Build.0 = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.ActiveCfg = Release|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..02843a4c0a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task/tree_sum/xcode/tree_sum.xcodeproj/project.pbxproj @@ -0,0 +1,325 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 05593A110B8F4F4500DE73AB /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593A0C0B8F4F4500DE73AB /* main.cpp */; }; + 05593A120B8F4F4500DE73AB /* OptimizedParallelSumTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593A0D0B8F4F4500DE73AB /* OptimizedParallelSumTree.cpp */; }; + 05593A130B8F4F4500DE73AB /* SerialSumTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593A0E0B8F4F4500DE73AB /* SerialSumTree.cpp */; }; + 05593A140B8F4F4500DE73AB /* SimpleParallelSumTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 05593A0F0B8F4F4500DE73AB /* SimpleParallelSumTree.cpp */; }; + 05593A160B8F4F5D00DE73AB /* libtbbmalloc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 05593A150B8F4F5D00DE73AB /* libtbbmalloc.dylib */; }; + 05593A170B8F4F6E00DE73AB /* libtbbmalloc.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 05593A150B8F4F5D00DE73AB /* libtbbmalloc.dylib */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + 05593A170B8F4F6E00DE73AB /* libtbbmalloc.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 05593A0B0B8F4F4500DE73AB /* common.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = common.h; path = ../common.h; sourceTree = SOURCE_ROOT; }; + 05593A0C0B8F4F4500DE73AB /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = SOURCE_ROOT; }; + 05593A0D0B8F4F4500DE73AB /* OptimizedParallelSumTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = OptimizedParallelSumTree.cpp; path = ../OptimizedParallelSumTree.cpp; sourceTree = SOURCE_ROOT; }; + 05593A0E0B8F4F4500DE73AB /* SerialSumTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SerialSumTree.cpp; path = ../SerialSumTree.cpp; sourceTree = SOURCE_ROOT; }; + 05593A0F0B8F4F4500DE73AB /* SimpleParallelSumTree.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = SimpleParallelSumTree.cpp; path = ../SimpleParallelSumTree.cpp; sourceTree = SOURCE_ROOT; }; + 05593A150B8F4F5D00DE73AB /* libtbbmalloc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbbmalloc.dylib; path = ../../../../lib/libtbbmalloc.dylib; sourceTree = SOURCE_ROOT; }; + 05593A4A0B8F51E000DE73AB /* tree_sum */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tree_sum; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + 05593A160B8F4F5D00DE73AB /* libtbbmalloc.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* tree_sum */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = tree_sum; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + 05593A0B0B8F4F4500DE73AB /* common.h */, + 05593A0C0B8F4F4500DE73AB /* main.cpp */, + 05593A0D0B8F4F4500DE73AB /* OptimizedParallelSumTree.cpp */, + 05593A0E0B8F4F4500DE73AB /* SerialSumTree.cpp */, + 05593A0F0B8F4F4500DE73AB /* SimpleParallelSumTree.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 05593A4A0B8F51E000DE73AB /* tree_sum */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 05593A150B8F4F5D00DE73AB /* libtbbmalloc.dylib */, + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* tree_sum */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "tree_sum" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tree_sum; + productInstallPath = "$(HOME)/bin"; + productName = tree_sum; + productReference = 05593A4A0B8F51E000DE73AB /* tree_sum */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "tree_sum" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* tree_sum */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* tree_sum */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05593A110B8F4F4500DE73AB /* main.cpp in Sources */, + 05593A120B8F4F4500DE73AB /* OptimizedParallelSumTree.cpp in Sources */, + 05593A130B8F4F4500DE73AB /* SerialSumTree.cpp in Sources */, + 05593A140B8F4F4500DE73AB /* SimpleParallelSumTree.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = tree_sum; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = tree_sum; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = tree_sum; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = tree_sum; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "tree_sum" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "tree_sum" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/index.html b/deal.II/bundled/tbb41_20130401oss/examples/task_group/index.html new file mode 100644 index 0000000000..6b36cb626b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/index.html @@ -0,0 +1,23 @@ + + + +

    Overview

    +This directory has examples of how to use task_groups. + +

    Directories

    +
    +
    Sudoku +
    Compute all solutions for a Sudoku board. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile new file mode 100644 index 0000000000..eb4a1553d4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile @@ -0,0 +1,81 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=sudoku +ARGS=4 input1 verbose +PERF_RUN_ARGS=auto input1 silent + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # which icc + +ifeq ($(offload), mic) +override CXXFLAGS += -D__TBB_MIC_OFFLOAD=1 +endif + +ifeq (,$(filter icc icpc,$(CXX))) +TBBLIB = -ltbb +TBBLIB_DEBUG = -ltbb_debug +else +TBBLIB = -tbb +CXX0XFLAGS?=-std=c++0x -D_TBB_CPP0X +TBBLIB_DEBUG = -ltbb_debug +ifeq ($(offload), mic) +TBBLIB_DEBUG += -offload-option,mic,ld,"-ltbb_debug -L${TBBROOT}/lib/mic/" +endif +endif + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB) $(LIBS) $(CXX0XFLAGS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ $(TBBLIB_DEBUG) $(LIBS) $(CXX0XFLAGS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) + +perf_build: release + +perf_run: + ./$(PROG) $(PERF_RUN_ARGS) + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile.windows new file mode 100644 index 0000000000..79210c39b2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/Makefile.windows @@ -0,0 +1,58 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=sudoku +ARGS= 4 input1 verbose +PERF_RUN_ARGS=auto input1 silent + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _CRT_SECURE_NO_DEPRECATE $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @$(CXX) >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + +perf_build: release + +perf_run: + $(PROG) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/index.html b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/index.html new file mode 100644 index 0000000000..e1aefe7155 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/index.html @@ -0,0 +1,76 @@ + + + +

    Overview

    +
    +
    This directory contains a simple example that finds all solutions to a +Sudoku board. It uses a straightforward state-space search algorithm +that exhibits OR-parallelism. It can be optionally run until it +obtains just the first solution. The point of the example is to teach +how to use the task_group interface. +
    The example can be built in the offload version to run on Intel® Many Integrated Core (Intel® MIC) Architecture based coprocessor (see build instructions). +
    + +

    Files

    +
    +
    sudoku.cpp +
    Driver. +
    input1 +
    Sample input file with modest number of solutions. + +
    input2 +
    Sample input file with small number of solutions. + +
    input3 +
    Sample input file with larger number of solutions. + +
    input4 +
    Sample input file with very large number of solutions. + +
    Makefile +
    Makefile for building example. + +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2008 workspace for building and running the example with the Intel® C++ compiler (Windows* systems only). +
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
    + +

    To Build

    +General build directions can be found here. +

    + +

    Usage

    +
    + +
    sudoku -h +
    Prints the help for command line options +
    sudoku [n-of-threads=value] [filename=value] [verbose] [silent] [find-one] +
    sudoku [n-of-threads [filename]] [verbose] [silent] [find-one] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + filename is an input filename.
    + verbose - prints the first solution.
    + silent - no output except elapsed time.
    + find-one - stops after finding first solution.
    + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small problem size and the desired number of threads, e.g., sudoku 4 input2. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input1 b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input1 new file mode 100644 index 0000000000..6591752051 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input1 @@ -0,0 +1,19 @@ +1 0 0 9 0 0 0 8 0 0 8 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0 + + + + + + + +1 0 0 9 0 0 0 8 0 +0 8 0 2 0 0 0 0 0 +0 0 5 0 0 0 7 0 0 + +0 5 2 1 0 0 4 0 0 +0 0 0 0 0 5 0 0 7 +4 0 0 7 0 0 0 3 0 + +0 3 0 0 0 2 0 0 5 +0 0 0 0 0 0 1 0 0 +5 0 0 0 1 0 0 0 0 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input2 b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input2 new file mode 100644 index 0000000000..49514254ea --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input2 @@ -0,0 +1,18 @@ +2 0 1 0 0 0 0 8 0 0 8 0 2 1 9 6 0 0 0 0 5 0 0 0 7 0 0 0 5 2 1 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 3 0 1 0 0 5 0 0 0 8 0 0 0 6 + + + + + + +2 0 1 0 0 0 0 8 0 +0 8 0 2 1 9 6 0 0 +0 0 5 0 0 0 7 0 0 + +0 5 2 1 0 0 4 0 0 +0 0 0 0 0 5 0 0 7 +4 0 0 7 0 0 0 3 0 + +0 3 0 0 0 2 0 0 5 +0 0 0 0 3 0 1 0 0 +5 0 0 0 8 0 0 0 6 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input3 b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input3 new file mode 100644 index 0000000000..e6cbb094a3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input3 @@ -0,0 +1,19 @@ +1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 5 2 6 0 0 4 0 0 0 0 0 0 0 5 0 0 7 4 0 0 7 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0 + + + + + + + +1 0 0 9 0 0 0 8 0 +0 0 0 2 0 0 0 0 0 +0 0 5 0 0 0 7 0 0 + +0 5 2 6 0 0 4 0 0 +0 0 0 0 0 5 0 0 7 +4 0 0 7 0 0 0 3 0 + +0 3 0 0 0 2 0 0 5 +0 0 0 0 0 0 1 0 0 +5 0 0 0 1 0 0 0 0 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input4 b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input4 new file mode 100644 index 0000000000..9436cd77a7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/input4 @@ -0,0 +1,19 @@ +1 0 0 9 0 0 0 8 0 0 0 0 2 0 0 0 0 0 0 0 5 0 0 0 7 0 0 0 0 2 6 0 0 0 0 0 0 0 0 0 0 5 0 0 7 4 0 0 0 0 0 0 3 0 0 3 0 0 0 2 0 0 5 0 0 0 0 0 0 1 0 0 5 0 0 0 1 0 0 0 0 + + + + + + + +1 0 0 9 0 0 0 8 0 +0 0 0 2 0 0 0 0 0 +0 0 5 0 0 0 7 0 0 + +0 0 2 6 0 0 0 0 0 +0 0 0 0 0 5 0 0 7 +4 0 0 0 0 0 0 3 0 + +0 3 0 0 0 2 0 0 5 +0 0 0 0 0 0 1 0 0 +5 0 0 0 1 0 0 0 0 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.icproj b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.icproj new file mode 100644 index 0000000000..d95f8b264c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.vcproj new file mode 100644 index 0000000000..a84ca15a42 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_cl.sln new file mode 100644 index 0000000000..176854b255 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sudoku", "sudoku.vcproj", "{C931C7A2-074E-4150-9E7A-39A03250411E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_icl.sln new file mode 100644 index 0000000000..70d124d0fd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/msvs/sudoku_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "sudoku", "sudoku.icproj", "{CB292CD9-903E-464C-AAFE-E7A49003565C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.ActiveCfg = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|Win32.Build.0 = Debug|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.ActiveCfg = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Debug|x64.Build.0 = Debug|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.ActiveCfg = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|Win32.Build.0 = Release|Win32 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.ActiveCfg = Release|x64 + {CB292CD9-903E-464C-AAFE-E7A49003565C}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.Build.0 = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|x64.ActiveCfg = Release|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.Build.0 = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Release|Win32.ActiveCfg = Release|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.Build.0 = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|x64.ActiveCfg = Debug|x64 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.Build.0 = Debug|Win32 + {C931C7A2-074E-4150-9E7A-39A03250411E}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/sudoku.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/sudoku.cpp new file mode 100644 index 0000000000..acbf111e87 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_group/sudoku/sudoku.cpp @@ -0,0 +1,353 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (push,target(mic)) +#endif // __TBB_MIC_OFFLOAD + +#include +#include +#include +#include "tbb/atomic.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/task_group.h" + +#if __INTEL_COMPILER +// Suppress "std::auto_prt<> is deprecated" warning +// TODO: replace auto_ptr with unique_ptr for compilers supporting C++11 +#pragma warning(disable: 1478) +#endif +#include "../../common/utility/utility.h" + +#pragma warning(disable: 4996) + +#if __INTEL_COMPILER +#define __TBB_LAMBDAS_PRESENT ( _TBB_CPP0X && __INTEL_COMPILER > 1100 ) +#elif __GNUC__ +#define __TBB_LAMBDAS_PRESENT ( _TBB_CPP0X && __TBB_GCC_VERSION >= 40500 ) +#elif _MSC_VER +#define __TBB_LAMBDAS_PRESENT ( _MSC_VER>=1600 ) +#endif + +const unsigned BOARD_SIZE=81; +const unsigned BOARD_DIM=9; + +using namespace tbb; +using namespace std; + +atomic nSols; +bool find_one = false; +bool verbose = false; +unsigned short init_values[BOARD_SIZE] = {1,0,0,9,0,0,0,8,0,0,8,0,2,0,0,0,0,0,0,0,5,0,0,0,7,0,0,0,5,2,1,0,0,4,0,0,0,0,0,0,0,5,0,0,7,4,0,0,7,0,0,0,3,0,0,3,0,0,0,2,0,0,5,0,0,0,0,0,0,1,0,0,5,0,0,0,1,0,0,0,0}; +task_group *g; +double solve_time; + +typedef struct { + unsigned short solved_element; + unsigned potential_set; +} board_element; + +void read_board(const char *filename) { + FILE *fp; + int input; + fp = fopen(filename, "r"); + if (!fp) { + fprintf(stderr, "sudoku: Could not open input file '%s'.\n", filename); + exit(1); + } + for (unsigned i=0; i=0; --i) + if (b[i].solved_element==0) return false; + return true; +} + +bool in_row(board_element *b, unsigned row, unsigned col, unsigned short p) { + for (unsigned c=0; ccancel(); + if (++nSols==1 && verbose) { + print_board(b); + } + free(b); + return; + } + calculate_potentials(b); + bool progress=true; + bool success = examine_potentials(b, &progress); + if (success && progress) { + partial_solve(b, first_potential_set); + } else if (success && !progress) { + board_element *new_board; + while (b[first_potential_set].solved_element!=0) ++first_potential_set; + for (unsigned short potential=1; potential<=BOARD_DIM; ++potential) { + if (1<<(potential-1) & b[first_potential_set].potential_set) { + new_board = (board_element *)malloc(BOARD_SIZE*sizeof(board_element)); + copy_board(b, new_board); + new_board[first_potential_set].solved_element = potential; +#if __TBB_LAMBDAS_PRESENT + g->run( [=]{ partial_solve(new_board, first_potential_set); } ); +#else + g->run(PartialSolveBoard(new_board, first_potential_set)); +#endif + } + } + free(b); + } + else { + free(b); + } +} + +unsigned solve(int p) { + task_scheduler_init init(p); + nSols = 0; + board_element *start_board = (board_element *)malloc(BOARD_SIZE*sizeof(board_element)); + init_board(start_board, init_values); + g = new task_group; + tick_count t0 = tick_count::now(); + partial_solve(start_board, 0); + g->wait(); + solve_time = (tick_count::now() - t0).seconds(); + delete g; + return nSols; +} + +#if __TBB_MIC_OFFLOAD +#pragma offload_attribute (pop) +#endif // __TBB_MIC_OFFLOAD + +int do_get_default_num_threads() { + int threads; + #if __TBB_MIC_OFFLOAD + #pragma offload target(mic) out(threads) + #endif // __TBB_MIC_OFFLOAD + threads = tbb::task_scheduler_init::default_num_threads(); + return threads; +} + +int get_default_num_threads() { + static int threads = do_get_default_num_threads(); + return threads; +} + +int main(int argc, char *argv[]) { + try { + tbb::tick_count mainStartTime = tbb::tick_count::now(); + + utility::thread_number_range threads(get_default_num_threads); + string filename = ""; + bool silent = false; + + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(filename,"filename","input filename") + + .arg(verbose,"verbose","prints the first solution") + .arg(silent,"silent","no output except elapsed time") + .arg(find_one,"find-one","stops after finding first solution\n") + ); + + if ( silent ) verbose = false; + + if ( !filename.empty() ) + read_board( filename.c_str() ); + // otherwise (if file name not specified), the default statically initialized board will be used. + for(int p = threads.first; p <= threads.last; p = threads.step(p) ) { + unsigned number; + #if __TBB_MIC_OFFLOAD + #pragma offload target(mic) in(init_values, p, verbose, find_one) out(number, solve_time) + { + #endif // __TBB_MIC_OFFLOAD + number = solve(p); + #if __TBB_MIC_OFFLOAD + } + #endif // __TBB_MIC_OFFLOAD + + if ( !silent ) { + if ( find_one ) { + printf("Sudoku: Time to find first solution on %d threads: %6.6f seconds.\n", p, solve_time); + } + else { + printf("Sudoku: Time to find all %u solutions on %d threads: %6.6f seconds.\n", number, p, solve_time); + } + } + } + + utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds()); + + return 0; + } catch(std::exception& e) { + std::cerr<<"error occurred. error text is :\"" </dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +LIBS+= -lrt +endif + +include ../../common/gui/Makefile.gmake + +SOURCES= ../../common/gui/$(UI)video.cpp fractal.cpp main.cpp + +override CXXFLAGS += $(UI_CXXFLAGS) + +all: release test + +resources: +ifeq ($(UI),mac) + mkdir -p $(APPRES)/en.lproj $(NAME).app/Contents/MacOS + cp ../../common/gui/xcode/tbbExample/Info.plist $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/PkgInfo $(NAME).app/Contents + cp ../../common/gui/xcode/tbbExample/en.lproj/* $(APPRES)/en.lproj +endif # Mac + +release: $(SOURCES) resources +ifeq ($(UI),mac) + $(CXX_UI) -O2 -DNDEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) -ltbb $(LIBS) + +debug: resources +ifeq ($(UI),mac) + $(CXX_UI) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -c $(MACUISOURCES) +endif # Mac + $(CXX) -g -O0 -DTBB_USE_DEBUG $(CXXFLAGS) -o $(EXE) $(SOURCES) $(MACUIOBJS) -ltbb_debug $(LIBS) + +clean: + $(RM) $(EXE) *.o *.d +ifeq ($(UI),mac) + rm -rf $(NAME).app +endif + +test: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(ARGS) +else + ./$(EXE) $(ARGS) +endif + +light_test: +ifeq ($(UI),mac) + export DYLD_LIBRARY_PATH="$(DYLD_LIBRARY_PATH):$(TBBLIBSPATH)"; ./$(EXE) $(LIGHT_ARGS) +else + ./$(EXE) $(LIGHT_ARGS) +endif + +perf_build: release + +perf_run: + ./$(EXE) $(PERF_RUN_ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/Makefile.windows new file mode 100644 index 0000000000..a3d7c85beb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/Makefile.windows @@ -0,0 +1,74 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Fractal +ARGS=auto +PERF_RUN_ARGS=auto 1 1000000 silent +LIGHT_ARGS=auto 1 1000 + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) +# Uncomment one of next lines to choose user interface type (console, gdiplus, direct draw) +#UI = con +UI = gdi +#UI = dd + +# Machine architecture, auto-detected from TBB_TARGET_ARCH by default +# Use XARCH variable to change it. See index.html for more information +ARCH0 = $(TBB_TARGET_ARCH)- +ARCH1 = $(ARCH0:ia32-=x86) +ARCH2 = $(ARCH1:intel64-=AMD64) +XARCH = $(ARCH2:-=x86) + +MAKEINC = ../../common/gui/Makefile.win +SOURCES = fractal.cpp main.cpp + +all: release test +release: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib $(LIBS)" XARCH=$(XARCH) RCNAME=gui SOURCE="$(SOURCES)" EXE=$(PROG).exe build_one +debug: compiler_check + @$(MAKE) -f $(MAKEINC) UI=$(UI) DEBUG=_debug CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS) /D TBB_USE_DEBUG" LFLAGS="$(LDFLAGS) tbb_debug.lib $(LIBS)" XARCH=$(XARCH) RCNAME=gui SOURCE="$(SOURCES)" EXE=$(PROG).exe build_one +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest msvs\gui.res +test: + $(PROG) $(ARGS) +light_test: + $(PROG) $(LIGHT_ARGS) + +perf_build: compiler_check + @$(MAKE) -f $(MAKEINC) UI=con CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" LFLAGS="$(LDFLAGS) tbb.lib $(LIBS)" XARCH=$(XARCH) RCNAME=gui SOURCE="$(SOURCES) " EXE=$(PROG).exe build_one +perf_run: + $(PROG) $(PERF_RUN_ARGS) + +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.cpp new file mode 100644 index 0000000000..edfc8035b0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.cpp @@ -0,0 +1,277 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "fractal.h" + +#include "tbb/compat/thread" +#include "tbb/parallel_for.h" +#include "tbb/blocked_range2d.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" + +#include +#include + +video *v; +extern bool silent; +extern bool schedule_auto; +extern int grain_size; + +color_t fractal::calc_one_pixel(int x0, int y0) { + int iter; + double fx0, fy0, xtemp, x, y, mu; + + color_t color; + + fx0 = (double)x0 - (double) size_x / 2.0; + fy0 = (double)y0 - (double) size_y / 2.0; + fx0 = fx0 / magn + cx; + fy0 = fy0 / magn + cy; + + iter = 0; x = 0; y = 0; + + while (((x*x + y*y) <= 4) && (iter < max_iterations)) { + xtemp = x*x - y*y + fx0; + y = 2*x*y + fy0; + x = xtemp; + iter++; + } + + if (iter == max_iterations) { + // point corresponds to the mandelbrot set + color = v->get_color(255, 255, 255); + return color; + } + + // compute again but with exponent calculation at each iteration + // it's all for coloring point outside the mandelbrot set + iter = 0; x = 0; y = 0; + mu = 0; + while (((x*x + y*y) <= 4) && (iter < max_iterations)) { + xtemp = x*x - y*y + fx0; + y = 2*x*y + fy0; + x = xtemp; + mu += exp(-sqrt(x*x+y*y)); + iter++; + } + + int b = (int)(256*mu); + int g = (b/8); + int r = (g/16); + + b = b>255 ? 255 : b; + g = g>255 ? 255 : g; + r = r>255 ? 255 : r; + + color = v->get_color(r, g, b); + return color; +} + +void fractal::clear() { + drawing_area area( off_x, off_y, size_x, size_y, dm) ; + + // fill the rendering area with black color + for (int y=0; yget_color(0, 0, 0) ); + } + } +} + +void fractal::draw_border( bool is_active ) { + color_t color = is_active ? v->get_color(0, 255, 0) // green color + : v->get_color(96, 128, 96); // green-gray color + + // top border + drawing_area area0( off_x-1, off_y-1, size_x+2, 1, dm ); + for (int i=-1; i &r ) const { + if ( v->next_frame() ) + f.render_rect( r.cols().begin(), r.rows().begin(), r.cols().end(), r.rows().end() ); + } + + fractal_body( fractal &f ) : f(f) { + } +}; + +void fractal::render( tbb::task_group_context &context ) { + // run parallel_for that process the fractal area + if( schedule_auto ) + tbb::parallel_for( tbb::blocked_range2d(0, size_y, grain_size, 0, size_x, grain_size ), + fractal_body(*this), tbb::auto_partitioner(), context); + else + tbb::parallel_for( tbb::blocked_range2d(0, size_y, grain_size, 0, size_x, grain_size ), + fractal_body(*this), tbb::simple_partitioner(), context); +} + +void fractal::run( tbb::task_group_context &context ) { + clear(); + render( context ); +} + +bool fractal::check_point( int x, int y ) { + return x >= off_x && x <= off_x+size_x && + y >= off_y && y <= off_y+size_y; +} + +void fractal_group::calc_fractal( int num ) { + // calculate the fractal + fractal &f = num ? f1 : f0; + + tbb::tick_count t0 = tbb::tick_count::now(); + while ( v->next_frame() && num_frames[num] != 0 ) { + f.run( context[num] ); + if ( num_frames[num]>0 ) num_frames[num] -= 1; + } + tbb::tick_count t1 = tbb::tick_count::now(); + + if ( !silent ) { + printf(" %s fractal finished. Time: %g\n", num ? "Second" : "First", (t1-t0).seconds()); + } +} + +void fg_thread_func(fractal_group *fg) { + // initialize the task scheduler for the second thread + tbb::task_scheduler_init init( fg->get_num_threads() ); + // calculate the second fractal + fg->calc_fractal( 1 ); +} + +void fractal_group::set_priorities() { + // set the high priority for the active area and the normal priority for another area + context[active].set_priority( tbb::priority_high ); + context[active^1].set_priority( tbb::priority_normal ); +} + +void fractal_group::switch_priorities( int new_active ) { + if( new_active!=-1 ) active = new_active; + else active = 1-active; // assumes 'active' is only 0 or 1 + set_priorities(); + draw_borders(); +} + +void fractal_group::set_num_frames_at_least(int n) { + if ( num_frames[0]join(); + delete fg_thread; + } + + delete[] context; +} + +void fractal_group::draw_borders() { + f0.draw_border( active==0 ); + f1.draw_border( active==1 ); +} + +fractal_group::fractal_group( const drawing_memory &_dm, int _num_threads, int _max_iterations, int _num_frames ) : f0(_dm), f1(_dm), num_threads(_num_threads) { + // set rendering areas + f0.size_x = f1.size_x = _dm.sizex/2-4; + f0.size_y = f1.size_y = _dm.sizey-4; + f0.off_x = f0.off_y = f1.off_y = 2; + f1.off_x = f0.size_x+4+2; + + // set fractals parameters + f0.cx = -0.6f; f0.cy = 0.0f; f0.magn = 200.0f; + f1.cx = -0.6f; f1.cy = 0.0f; f1.magn = 200.0f; + f0.max_iterations = f1.max_iterations = _max_iterations; + + // initially the first fractal is active + active = 0; + + num_frames[0] = num_frames[1] = _num_frames; +} + +void fractal_group::mouse_click(int x, int y) { + // assumption that the point is not inside any fractal area + int new_active = -1; + + if ( f0.check_point( x, y ) ) { + // the point is inside the first fractal area + new_active = 0; + } else if ( f1.check_point( x, y ) ) { + // the point is inside the second fractal area + new_active = 1; + } + + if ( new_active != -1 && new_active != active ) { + switch_priorities( new_active ); + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.h b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.h new file mode 100644 index 0000000000..bbee4e936d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal.h @@ -0,0 +1,122 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef FRACTAL_H_ +#define FRACTAL_H_ + +#include "../../common/gui/video.h" + +#include "tbb/task.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/atomic.h" + +//! Fractal class +class fractal { + //! Left corner of the fractal area + int off_x, off_y; + //! Size of the fractal area + int size_x, size_y; + + //! Fractal properties + float cx, cy; + float magn; + int max_iterations; + + //! Drawing memory object for rendering + const drawing_memory &dm; + + //! One pixel calculation routine + color_t calc_one_pixel(int x, int y); + //! Clears the fractal area + void clear(); + //! Draws the border around the fractal area + void draw_border( bool is_active ); + //! Renders the fractal + void render( tbb::task_group_context &context ); + //! Check if the point is inside the fractal area + bool check_point( int x, int y); + +public: + //! Constructor + fractal( const drawing_memory &dm ) : dm(dm) { +#if _MSC_VER && _WIN64 && !__INTEL_COMPILER + // Workaround for MSVC x64 compiler issue + volatile int i=0; +#endif + } + //! Runs the fractal calculation + void run( tbb::task_group_context &context ); + //! Renders the fractal rectangular area + void render_rect(int x0, int y0, int x1, int y1); + + friend class fractal_group; +}; + +//! The group of fractals +class fractal_group { + //! Fractals defenition + fractal f0, f1; + //! Number of frames to calculate + tbb::atomic num_frames[2]; + //! Task group contexts to manage prioroties + tbb::task_group_context *context; + + //! Border type enumeration + enum BORDER_TYPE { + BORDER_INACTIVE = 0, + BORDER_ACTIVE + }; + + //! The number of the threads + int num_threads; + //! The active (high priority) fractal number + int active; + + //! Draws the borders around the fractals + void draw_borders(); + //! Sets priorities for fractals calculations + void set_priorities(); + +public: + //! Constructor + fractal_group( const drawing_memory &_dm, int num_threads = tbb::task_scheduler_init::automatic, int max_iterations = 100000, int num_frames = 1); + //! Run calculation + void run( bool create_second_fractal=true ); + //! Mouse event handler + void mouse_click(int x, int y); + //! Fractal calculation routine + void calc_fractal( int num ); + //! Get number of threads + int get_num_threads() const { return num_threads; } + //! Reset the number of frames to be not less than the given value + void set_num_frames_at_least(int n); + //! Switches the priorities of two fractals + void switch_priorities( int new_active=-1 ); +}; + +#endif /* FRACTAL_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal_video.h b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal_video.h new file mode 100644 index 0000000000..0df73d282c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/fractal_video.h @@ -0,0 +1,80 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef FRACTAL_VIDEO_H_ +#define FRACTAL_VIDEO_H_ + +#include "../../common/gui/video.h" +#include "fractal.h" + +extern video *v; +extern bool single; + +class fractal_video : public video +{ + fractal_group *fg; + +private: + void on_mouse( int x, int y, int key ) { + if( key == 1 ) { + if ( fg ) { + fg->set_num_frames_at_least(20); + fg->mouse_click( x, y ); + } + } + } + + void on_key( int key ) { + switch ( key&0xff ) { + case 27: + running = false; break; + case ' ': // space + if( fg ) fg->switch_priorities(); + default: + if( fg ) fg->set_num_frames_at_least(20); + } + } + + void on_process() { + if ( fg ) { + fg->run( !single ); + } + } + +public: + fractal_video() :fg(0) { + title = "Dynamic Priorities in TBB: Fractal Example"; + v = this; + } + + void set_fractal_group( fractal_group &_fg ) { + fg = &_fg; + } +}; + +#endif /* FRACTAL_VIDEO_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/index.html b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/index.html new file mode 100644 index 0000000000..5357f3c409 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/index.html @@ -0,0 +1,66 @@ + + + +

    Overview

    +The example calculates two classical Mandelbrot fractals with different priorities. +The application window is divided into two areas where fractals are rendered. With mouse click on an area the user can change the priority of the calculating fractal. In the clicked area the fractal priority is changed to be "high" and the priority of the other fractal is changed to "normal". +The example also has the console mode but in this mode the priorities could not be changed during execution. + + +

    Files

    +
    +
    main.cpp +
    Main program which parses command line options and runs the fractals calculation in GUI or Console mode. +
    fractal.h +
    Interfaces of fractal and fractal_group classes. +
    fractal.cpp +
    Implementations of fractal and fractal_group classes. +
    fractal_video.h +
    GUI mode support interface. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the example (Windows* systems only). +
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X systems only). +
    + +

    To Build

    +General build directions can be found here. + +

    Usage

    +
    +
    fractal -h +
    Prints the help for command line options +
    fractal [n-of-threads=value] [n-of-frames=value] [max-of-iterations=value] [grain-size=value] [silent] [single] +
    fractal [n-of-threads [n-of-frames [max-of-iterations [grain-size]]]] [silent] [single] +
    n-of-threads is the number of threads to use; a range of the form low[:high], where low and optional high are non-negative integers or 'auto' for the TBB default.
    + n-of-frames is a number of frames the example processes internally.
    + max-of-iterations is a maximum number of the fractal iterations.
    + grain-size is an optional grain size, must be a positive integer.
    + use-auto-partitioner - use tbb::auto_partitioner.
    + silent - no output except elapsed time.
    + single - process only one fractal.
    + +
    To run a short version of this example, e.g., for use with Intel® Parallel Inspector: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small fractal iterations number and the desired number of threads, e.g., fractal 4 1 10000. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/main.cpp b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/main.cpp new file mode 100644 index 0000000000..d0cb3702ba --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/main.cpp @@ -0,0 +1,100 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define VIDEO_WINMAIN_ARGS + +#include +#include + +#include "fractal.h" +#include "fractal_video.h" + +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" + +#include "../../common/utility/utility.h" + +bool silent = false; +bool single = false; +bool schedule_auto = false; +int grain_size = 8; + +int main(int argc, char *argv[]) +{ + try{ + tbb::tick_count mainStartTime = tbb::tick_count::now(); + + // It is used for console mode for test with different number of threads and also has + // meaning for GUI: threads.first - use separate event/updating loop thread (>0) or not (0). + // threads.second - initialization value for scheduler + utility::thread_number_range threads( tbb::task_scheduler_init::default_num_threads ); + int num_frames = -1; + int max_iterations = 1000000; + + // command line parsing + utility::parse_cli_arguments(argc,argv, + utility::cli_argument_pack() + //"-h" option for displaying help is present implicitly + .positional_arg(threads,"n-of-threads",utility::thread_number_range_desc) + .positional_arg(num_frames,"n-of-frames","number of frames the example processes internally") + .positional_arg(max_iterations,"max-of-iterations","maximum number of the fractal iterations") + .positional_arg(grain_size,"grain-size","the grain size value") + .arg(schedule_auto, "use-auto-partitioner", "use tbb::auto_partitioner") + .arg(silent, "silent", "no output except elapsed time") + .arg(single, "single", "process only one fractal") + ); + + fractal_video video; + + // video layer init + if ( video.init_window(1024, 512) ) { + video.calc_fps = false; + video.threaded = threads.first > 0; + // initialize fractal group + fractal_group fg( video.get_drawing_memory(), threads.last, max_iterations, num_frames ); + video.set_fractal_group( fg ); + // main loop + video.main_loop(); + } + else if ( video.init_console() ) { + // in console mode we always have limited number of frames + num_frames = num_frames<0 ? 1 : num_frames; + for(int p = threads.first; p <= threads.last; p = threads.step(p) ) { + if ( !silent ) printf("Threads = %d\n", p); + fractal_group fg( video.get_drawing_memory(), p, max_iterations, num_frames ); + fg.run( !single ); + } + } + video.terminate(); + utility::report_elapsed_time((tbb::tick_count::now() - mainStartTime).seconds()); + return 0; + } catch ( std::exception& e ) { + std::cerr<<"error occurred. error text is :\"" < + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal.vcproj new file mode 100644 index 0000000000..2c10b701dc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal.vcproj @@ -0,0 +1,853 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_cl.sln new file mode 100644 index 0000000000..7ded9c9221 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_cl.sln @@ -0,0 +1,35 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fractal", "fractal.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A2527}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.Build.0 = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.Build.0 = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.ActiveCfg = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.Build.0 = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.ActiveCfg = GDIDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.Build.0 = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.Build.0 = GDIRelease|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_icl.sln new file mode 100644 index 0000000000..600a1da178 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/fractal_icl.sln @@ -0,0 +1,49 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "fractal", "fractal.icproj", "{BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + DD Debug|Win32 = DD Debug|Win32 + DD Debug|x64 = DD Debug|x64 + DD Release|Win32 = DD Release|Win32 + DD Release|x64 = DD Release|x64 + GDI Debug|Win32 = GDI Debug|Win32 + GDI Debug|x64 = GDI Debug|x64 + _GDI Release|Win32 = _GDI Release|Win32 + _GDI Release|x64 = _GDI Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Debug|x64.Build.0 = DDDebug|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Release|Win32.Build.0 = DDRelease|Win32 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Release|x64.ActiveCfg = DDRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.DD Release|x64.Build.0 = DDRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.GDI Debug|Win32.ActiveCfg = GDIDebug|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.GDI Debug|x64.ActiveCfg = GDIRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}.GDI Debug|x64.Build.0 = GDIRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}._GDI Release|Win32.ActiveCfg = GDIRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}._GDI Release|x64.ActiveCfg = GDIRelease|x64 + {BF088DF5-BAEA-4EB2-8EA5-1E8DFBC75E5C}._GDI Release|x64.Build.0 = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.Build.0 = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|x64.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}._GDI Release|Win32.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.Build.0 = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|x64.ActiveCfg = GDIRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.GDI Debug|Win32.ActiveCfg = GDIDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.Build.0 = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|x64.ActiveCfg = DDRelease|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.Build.0 = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Release|Win32.ActiveCfg = DDRelease|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.Build.0 = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|x64.ActiveCfg = DDDebug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.Build.0 = DDDebug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A2527}.DD Debug|Win32.ActiveCfg = DDDebug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.ico b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.ico new file mode 100644 index 0000000000..d551aa3aaf Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.rc b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.rc new file mode 100644 index 0000000000..5a13d046b9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/gui.rc @@ -0,0 +1,90 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_GUI ICON "gui.ico" +IDI_SMALL ICON "small.ico" + + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" + "#include ""windows.h""\r\n" + "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// String Table +// + +STRINGTABLE +BEGIN + IDS_APP_TITLE "gui" + IDC_GUI "GUI" +END + +#endif // English (U.S.) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/resource.h b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/resource.h new file mode 100644 index 0000000000..ef7ac10254 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/resource.h @@ -0,0 +1,8 @@ +#define IDC_MYICON 2 +#define IDD_GUI 102 +#define IDS_APP_TITLE 103 +#define IDI_GUI 107 +#define IDI_SMALL 108 +#define IDC_GUI 109 +#define IDR_MAINFRAME 128 +#define IDC_STATIC -1 diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/small.ico b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/small.ico new file mode 100644 index 0000000000..d551aa3aaf Binary files /dev/null and b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/msvs/small.ico differ diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..df9408d120 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/project.pbxproj @@ -0,0 +1,349 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 84011722152D687A00B07E4D /* fractal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84011720152D687A00B07E4D /* fractal.cpp */; }; + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B8DA13152C9AC600D59B95 /* libtbb.dylib */; }; + 84B8DA77152CA90100D59B95 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA6F152CA90100D59B95 /* main.m */; }; + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA71152CA90100D59B95 /* OpenGLView.m */; }; + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */; }; + 84B8DA7A152CA90100D59B95 /* (null) in Resources */ = {isa = PBXBuildFile; }; + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */; }; + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */; }; + 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA82152CA99C00D59B95 /* main.cpp */; }; + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84B8DA99152CADF400D59B95 /* macvideo.cpp */; }; + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D017551527431F0008A4E0 /* Cocoa.framework */; }; + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84D01775152744BD0008A4E0 /* OpenGL.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 8401171F152D687A00B07E4D /* fractal_video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fractal_video.h; path = ../fractal_video.h; sourceTree = ""; }; + 84011720152D687A00B07E4D /* fractal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fractal.cpp; path = ../fractal.cpp; sourceTree = ""; }; + 84011721152D687A00B07E4D /* fractal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fractal.h; path = ../fractal.h; sourceTree = ""; }; + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = ""; }; + 84B8DA6F152CA90100D59B95 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ../../../common/gui/xcode/tbbExample/main.m; sourceTree = ""; }; + 84B8DA70152CA90100D59B95 /* OpenGLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OpenGLView.h; path = ../../../common/gui/xcode/tbbExample/OpenGLView.h; sourceTree = ""; }; + 84B8DA71152CA90100D59B95 /* OpenGLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OpenGLView.m; path = ../../../common/gui/xcode/tbbExample/OpenGLView.m; sourceTree = ""; }; + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbbAppDelegate.h; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.h; sourceTree = ""; }; + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = tbbAppDelegate.m; path = ../../../common/gui/xcode/tbbExample/tbbAppDelegate.m; sourceTree = ""; }; + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "tbbExample-Prefix.pch"; path = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; sourceTree = ""; }; + 84B8DA7D152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; + 84B8DA7F152CA97B00D59B95 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = MainMenu.xib; sourceTree = ""; }; + 84B8DA82152CA99C00D59B95 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = main.cpp; path = ../main.cpp; sourceTree = ""; }; + 84B8DA99152CADF400D59B95 /* macvideo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macvideo.cpp; path = ../../../common/gui/macvideo.cpp; sourceTree = ""; }; + 84D017511527431F0008A4E0 /* tbbExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = tbbExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 84D017551527431F0008A4E0 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 84D017581527431F0008A4E0 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 84D017591527431F0008A4E0 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 84D0175A1527431F0008A4E0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 84D01775152744BD0008A4E0 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 84D0174E1527431F0008A4E0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 84D01776152744BD0008A4E0 /* OpenGL.framework in Frameworks */, + 84D017561527431F0008A4E0 /* Cocoa.framework in Frameworks */, + 84B8DA19152C9AC600D59B95 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 84011727152D68D200B07E4D /* Sources */ = { + isa = PBXGroup; + children = ( + 8401171F152D687A00B07E4D /* fractal_video.h */, + 84B8DA82152CA99C00D59B95 /* main.cpp */, + 84011720152D687A00B07E4D /* fractal.cpp */, + 84011721152D687A00B07E4D /* fractal.h */, + ); + name = Sources; + sourceTree = ""; + }; + 84B8DA6C152CA8D900D59B95 /* tbbExample */ = { + isa = PBXGroup; + children = ( + 84011727152D68D200B07E4D /* Sources */, + 84B8DA98152CAD8600D59B95 /* Gui layer */, + 84B8DA7B152CA97B00D59B95 /* Resources */, + ); + name = tbbExample; + sourceTree = ""; + }; + 84B8DA7B152CA97B00D59B95 /* Resources */ = { + isa = PBXGroup; + children = ( + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */, + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */, + ); + name = Resources; + path = ../../../common/gui/xcode/tbbExample/en.lproj; + sourceTree = ""; + }; + 84B8DA98152CAD8600D59B95 /* Gui layer */ = { + isa = PBXGroup; + children = ( + 84B8DA99152CADF400D59B95 /* macvideo.cpp */, + 84B8DA6F152CA90100D59B95 /* main.m */, + 84B8DA70152CA90100D59B95 /* OpenGLView.h */, + 84B8DA71152CA90100D59B95 /* OpenGLView.m */, + 84B8DA72152CA90100D59B95 /* tbbAppDelegate.h */, + 84B8DA73152CA90100D59B95 /* tbbAppDelegate.m */, + 84B8DA75152CA90100D59B95 /* tbbExample-Prefix.pch */, + ); + name = "Gui layer"; + sourceTree = ""; + }; + 84D017461527431F0008A4E0 = { + isa = PBXGroup; + children = ( + 84B8DA6C152CA8D900D59B95 /* tbbExample */, + 84D017541527431F0008A4E0 /* Frameworks */, + 84D017521527431F0008A4E0 /* Products */, + ); + sourceTree = ""; + }; + 84D017521527431F0008A4E0 /* Products */ = { + isa = PBXGroup; + children = ( + 84D017511527431F0008A4E0 /* tbbExample.app */, + ); + name = Products; + sourceTree = ""; + }; + 84D017541527431F0008A4E0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 84D01775152744BD0008A4E0 /* OpenGL.framework */, + 84D017551527431F0008A4E0 /* Cocoa.framework */, + 84D017571527431F0008A4E0 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 84D017571527431F0008A4E0 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 84B8DA13152C9AC600D59B95 /* libtbb.dylib */, + 84D017581527431F0008A4E0 /* AppKit.framework */, + 84D017591527431F0008A4E0 /* CoreData.framework */, + 84D0175A1527431F0008A4E0 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 84D017501527431F0008A4E0 /* tbbExample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */; + buildPhases = ( + 84D0174D1527431F0008A4E0 /* Sources */, + 84D0174E1527431F0008A4E0 /* Frameworks */, + 84D0174F1527431F0008A4E0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = tbbExample; + productName = tbbExample; + productReference = 84D017511527431F0008A4E0 /* tbbExample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 84D017481527431F0008A4E0 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = tbb; + LastUpgradeCheck = 0430; + }; + buildConfigurationList = 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "fractal" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 84D017461527431F0008A4E0; + productRefGroup = 84D017521527431F0008A4E0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 84D017501527431F0008A4E0 /* tbbExample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 84D0174F1527431F0008A4E0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA7A152CA90100D59B95 /* (null) in Resources */, + 84B8DA80152CA97B00D59B95 /* InfoPlist.strings in Resources */, + 84B8DA81152CA97B00D59B95 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 84D0174D1527431F0008A4E0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 84B8DA77152CA90100D59B95 /* main.m in Sources */, + 84B8DA78152CA90100D59B95 /* OpenGLView.m in Sources */, + 84B8DA79152CA90100D59B95 /* tbbAppDelegate.m in Sources */, + 84B8DA87152CA99C00D59B95 /* main.cpp in Sources */, + 84B8DA9A152CADF400D59B95 /* macvideo.cpp in Sources */, + 84011722152D687A00B07E4D /* fractal.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 84B8DA7C152CA97B00D59B95 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7D152CA97B00D59B95 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 84B8DA7E152CA97B00D59B95 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 84B8DA7F152CA97B00D59B95 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 84D01770152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 84D01771152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_ARC = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.7; + SDKROOT = macosx; + }; + name = Release; + }; + 84D01773152743200008A4E0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = "\"$(SRCROOT)/../../../../lib\""; + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 84D01774152743200008A4E0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "../../../common/gui/xcode/tbbExample/tbbExample-Prefix.pch"; + HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + INFOPLIST_FILE = "../../../common/gui/xcode/tbbExample/tbbExample-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "\"$(SRCROOT)/../../../../lib\"", + "\"$(SRCROOT)\"", + ); + MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_NAME = "$(TARGET_NAME)"; + RUN_CLANG_STATIC_ANALYZER = YES; + USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/../../../../include\""; + VERSION_INFO_BUILDER = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 84D0174B1527431F0008A4E0 /* Build configuration list for PBXProject "fractal" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01770152743200008A4E0 /* Debug */, + 84D01771152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 84D01772152743200008A4E0 /* Build configuration list for PBXNativeTarget "tbbExample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 84D01773152743200008A4E0 /* Debug */, + 84D01774152743200008A4E0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 84D017481527431F0008A4E0 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme new file mode 100644 index 0000000000..5939fe1d17 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/fractal/xcode/fractal.xcodeproj/xcshareddata/xcschemes/tbbExample.xcscheme @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/task_priority/index.html b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/index.html new file mode 100644 index 0000000000..1612e68404 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/task_priority/index.html @@ -0,0 +1,23 @@ + + + +

    Overview

    +This directory has examples of how to use the task priority feature. + +

    Directories

    +
    +
    fractal +
    The example calculates two classical Mandelbrot fractals with different priorities. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Fibonacci.cpp b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Fibonacci.cpp new file mode 100644 index 0000000000..14bf5ba673 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Fibonacci.cpp @@ -0,0 +1,601 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* Example program that computes Fibonacci numbers in different ways. + Arguments are: [ Number [Threads [Repeats]]] + The defaults are Number=500 Threads=1:4 Repeats=1. + + The point of this program is to check that the library is working properly. + Most of the computations are deliberately silly and not expected to + show any speedup on multiprocessors. +*/ + +// enable assertions +#ifdef NDEBUG +#undef NDEBUG +#endif + +#include +#include +#include +#include +#include "tbb/task.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "tbb/blocked_range.h" +#include "tbb/concurrent_vector.h" +#include "tbb/concurrent_queue.h" +#include "tbb/concurrent_hash_map.h" +#include "tbb/parallel_while.h" +#include "tbb/parallel_for.h" +#include "tbb/parallel_reduce.h" +#include "tbb/parallel_scan.h" +#include "tbb/pipeline.h" +#include "tbb/atomic.h" +#include "tbb/mutex.h" +#include "tbb/spin_mutex.h" +#include "tbb/queuing_mutex.h" +#include "tbb/tbb_thread.h" + +using namespace std; +using namespace tbb; + +//! type used for Fibonacci number computations +typedef long long value; + +//! Matrix 2x2 class +struct Matrix2x2 +{ + //! Array of values + value v[2][2]; + Matrix2x2() {} + Matrix2x2(value v00, value v01, value v10, value v11) { + v[0][0] = v00; v[0][1] = v01; v[1][0] = v10; v[1][1] = v11; + } + Matrix2x2 operator * (const Matrix2x2 &to) const; //< Multiply two Matrices +}; +//! Default matrix to multiply +static const Matrix2x2 Matrix1110(1, 1, 1, 0); +//! Raw arrays matrices multiply +void Matrix2x2Multiply(const value a[2][2], const value b[2][2], value c[2][2]); + +/////////////////////// Serial methods //////////////////////// + +//! Plain serial sum +value SerialFib(int n) +{ + if(n < 2) + return n; + value a = 0, b = 1, sum; int i; + for( i = 2; i <= n; i++ ) + { // n is really index of Fibonacci number + sum = a + b; a = b; b = sum; + } + return sum; +} +//! Serial n-1 matrices multiplication +value SerialMatrixFib(int n) +{ + value c[2][2], a[2][2] = {{1, 1}, {1, 0}}, b[2][2] = {{1, 1}, {1, 0}}; int i; + for(i = 2; i < n; i++) + { // Using condition to prevent copying of values + if(i & 1) Matrix2x2Multiply(a, c, b); + else Matrix2x2Multiply(a, b, c); + } + return (i & 1) ? c[0][0] : b[0][0]; // get result from upper left cell +} +//! Recursive summing. Just for complete list of serial algorithms, not used +value SerialRecursiveFib(int n) +{ + value result; + if(n < 2) + result = n; + else + result = SerialRecursiveFib(n - 1) + SerialRecursiveFib(n - 2); + return result; +} +//! Introducing of queue method in serial +value SerialQueueFib(int n) +{ + concurrent_queue Q; + for(int i = 1; i < n; i++) + Q.push(Matrix1110); + Matrix2x2 A, B; + while(true) { + while( !Q.try_pop(A) ) this_tbb_thread::yield(); + if(Q.empty()) break; + while( !Q.try_pop(B) ) this_tbb_thread::yield(); + Q.push(A * B); + } + return A.v[0][0]; +} +//! Trying to use concurrent_vector +value SerialVectorFib(int n) +{ + concurrent_vector A; + A.grow_by(2); + A[0] = 0; A[1] = 1; + for( int i = 2; i <= n; i++) + { + A.grow_to_at_least(i+1); + A[i] = A[i-1] + A[i-2]; + } + return A[n]; +} + +///////////////////// Parallel methods //////////////////////// + +// *** Serial shared by mutexes *** // + +//! Shared glabals +value SharedA = 0, SharedB = 1; int SharedI = 1, SharedN; + +//! Template task class which computes Fibonacci numbers with shared globals +template +class SharedSerialFibBody { + M &mutex; +public: + SharedSerialFibBody( M &m ) : mutex( m ) {} + //! main loop + void operator()( const blocked_range& range ) const { + for(;;) { + typename M::scoped_lock lock( mutex ); + if(SharedI >= SharedN) break; + value sum = SharedA + SharedB; + SharedA = SharedB; SharedB = sum; + ++SharedI; + } + } +}; + +//! Root function +template +value SharedSerialFib(int n) +{ + SharedA = 0; SharedB = 1; SharedI = 1; SharedN = n; M mutex; + parallel_for( blocked_range(0,4,1), SharedSerialFibBody( mutex ) ); + return SharedB; +} + +// *** Serial shared by concurrent hash map *** // + +//! Hash comparer +struct IntHashCompare { + bool equal( const int j, const int k ) const { return j == k; } + unsigned long hash( const int k ) const { return (unsigned long)k; } +}; +//! NumbersTable type based on concurrent_hash_map +typedef concurrent_hash_map NumbersTable; +//! task for serial method using shared concurrent_hash_map +class ConcurrentHashSerialFibTask: public task { + NumbersTable &Fib; + int my_n; +public: + //! constructor + ConcurrentHashSerialFibTask( NumbersTable &cht, int n ) : Fib(cht), my_n(n) { } + //! executing task + /*override*/ task* execute() + { + for( int i = 2; i <= my_n; ++i ) { // there is no difference in to recycle or to make loop + NumbersTable::const_accessor f1, f2; // same as iterators + if( !Fib.find(f1, i-1) || !Fib.find(f2, i-2) ) { + // Something is seriously wrong, because i-1 and i-2 must have been inserted + // earlier by this thread or another thread. + assert(0); + } + value sum = f1->second + f2->second; + NumbersTable::const_accessor fsum; + Fib.insert(fsum, make_pair(i, sum)); // inserting + assert( fsum->second == sum ); // check value + } + return 0; + } +}; + +//! Root function +value ConcurrentHashSerialFib(int n) +{ + NumbersTable Fib; + bool okay; + okay = Fib.insert( make_pair(0, 0) ); assert(okay); // assign initial values + okay = Fib.insert( make_pair(1, 1) ); assert(okay); + + task_list list; + // allocate tasks + list.push_back(*new(task::allocate_root()) ConcurrentHashSerialFibTask(Fib, n)); + list.push_back(*new(task::allocate_root()) ConcurrentHashSerialFibTask(Fib, n)); + task::spawn_root_and_wait(list); + NumbersTable::const_accessor fresult; + okay = Fib.find( fresult, n ); + assert(okay); + return fresult->second; +} + +// *** Queue with parallel_for and parallel_while *** // + +//! Stream of matrices +struct QueueStream { + volatile bool producer_is_done; + concurrent_queue Queue; + //! Get pair of matricies if present + bool pop_if_present( pair &mm ) { + // get first matrix if present + if(!Queue.try_pop(mm.first)) return false; + // get second matrix if present + if(!Queue.try_pop(mm.second)) { + // if not, then push back first matrix + Queue.push(mm.first); return false; + } + return true; + } +}; + +//! Functor for parallel_for which fills the queue +struct parallel_forFibBody { + QueueStream &my_stream; + //! fill functor arguments + parallel_forFibBody(QueueStream &s) : my_stream(s) { } + //! iterate thorough range + void operator()( const blocked_range &range ) const { + int i_end = range.end(); + for( int i = range.begin(); i != i_end; ++i ) { + my_stream.Queue.push( Matrix1110 ); // push initial matrix + } + } +}; +//! Functor for parallel_while which process the queue +class parallel_whileFibBody +{ + QueueStream &my_stream; + parallel_while &my_while; +public: + typedef pair argument_type; + //! fill functor arguments + parallel_whileFibBody(parallel_while &w, QueueStream &s) + : my_while(w), my_stream(s) { } + //! process pair of matrices + void operator() (argument_type mm) const { + mm.first = mm.first * mm.second; + // note: it can run concurrently with QueueStream::pop_if_present() + if(my_stream.Queue.try_pop(mm.second)) + my_while.add( mm ); // now, two matrices available. Add next iteration. + else my_stream.Queue.push( mm.first ); // or push back calculated value if queue is empty + } +}; + +//! Parallel queue's filling task +struct QueueInsertTask: public task { + QueueStream &my_stream; + int my_n; + //! fill task arguments + QueueInsertTask( int n, QueueStream &s ) : my_n(n), my_stream(s) { } + //! executing task + /*override*/ task* execute() { + // Execute of parallel pushing of n-1 initial matrices + parallel_for( blocked_range( 1, my_n, 10 ), parallel_forFibBody(my_stream) ); + my_stream.producer_is_done = true; + return 0; + } +}; +//! Parallel queue's processing task +struct QueueProcessTask: public task { + QueueStream &my_stream; + //! fill task argument + QueueProcessTask( QueueStream &s ) : my_stream(s) { } + //! executing task + /*override*/ task* execute() { + while( !my_stream.producer_is_done || my_stream.Queue.unsafe_size()>1 ) { + parallel_while w; // run while loop in parallel + w.run( my_stream, parallel_whileFibBody( w, my_stream ) ); + } + return 0; + } +}; +//! Root function +value ParallelQueueFib(int n) +{ + QueueStream stream; + stream.producer_is_done = false; + task_list list; + list.push_back(*new(task::allocate_root()) QueueInsertTask( n, stream )); + list.push_back(*new(task::allocate_root()) QueueProcessTask( stream )); + // If there is only a single thread, the first task in the list runs to completion + // before the second task in the list starts. + task::spawn_root_and_wait(list); + assert(stream.Queue.unsafe_size() == 1); // it is easy to lose some work + Matrix2x2 M; + bool result = stream.Queue.try_pop( M ); // get last matrix + assert( result ); + return M.v[0][0]; // and result number +} + +// *** Queue with pipeline *** // + +//! filter to fills queue +class InputFilter: public filter { + atomic N; //< index of Fibonacci number minus 1 +public: + concurrent_queue Queue; + //! fill filter arguments + InputFilter( int n ) : filter(false /*is not serial*/) { N = n; } + //! executing filter + /*override*/ void* operator()(void*) + { + int n = --N; + if(n <= 0) return 0; + Queue.push( Matrix1110 ); + return &Queue; + } +}; +//! filter to process queue +class MultiplyFilter: public filter { +public: + MultiplyFilter( ) : filter(false /*is not serial*/) { } + //! executing filter + /*override*/ void* operator()(void*p) + { + concurrent_queue &Queue = *static_cast *>(p); + Matrix2x2 m1, m2; + // get two elements + while( !Queue.try_pop( m1 ) ) this_tbb_thread::yield(); + while( !Queue.try_pop( m2 ) ) this_tbb_thread::yield(); + m1 = m1 * m2; // process them + Queue.push( m1 ); // and push back + return this; // just nothing + } +}; +//! Root function +value ParallelPipeFib(int n) +{ + InputFilter input( n-1 ); + MultiplyFilter process; + // Create the pipeline + pipeline pipeline; + // add filters + pipeline.add_filter( input ); // first + pipeline.add_filter( process ); // second + + input.Queue.push( Matrix1110 ); + // Run the pipeline + pipeline.run( n ); // must be larger then max threads number + pipeline.clear(); // do not forget clear the pipeline + + assert( input.Queue.unsafe_size()==1 ); + Matrix2x2 M; + bool result = input.Queue.try_pop( M ); // get last element + assert( result ); + return M.v[0][0]; // get value +} + +// *** parallel_reduce *** // + +//! Functor for parallel_reduce +struct parallel_reduceFibBody { + Matrix2x2 sum; + int splitted; //< flag to make one less operation for splitted bodies + //! Constructor fills sum with initial matrix + parallel_reduceFibBody() : sum( Matrix1110 ), splitted(0) { } + //! Splitting constructor + parallel_reduceFibBody( parallel_reduceFibBody& other, split ) : sum( Matrix1110 ), splitted(1/*note that it is splitted*/) {} + //! Join point + void join( parallel_reduceFibBody &s ) { + sum = sum * s.sum; + } + //! Process multiplications + void operator()( const blocked_range &r ) { + for( int k = r.begin() + splitted; k < r.end(); ++k ) + sum = sum * Matrix1110; + splitted = 0; // reset flag, because this method can be reused for next range + } +}; +//! Root function +value parallel_reduceFib(int n) +{ + parallel_reduceFibBody b; + parallel_reduce(blocked_range(2, n, 3), b); // do parallel reduce on range [2, n) for b + return b.sum.v[0][0]; +} + +// *** parallel_scan *** // + +//! Functor for parallel_scan +struct parallel_scanFibBody { + Matrix2x2 sum; + int first; // flag to make one less operation for first range + //! Constructor fills sum with initial matrix + parallel_scanFibBody() : sum( Matrix1110 ), first(1) {} + //! Splitting constructor + parallel_scanFibBody( parallel_scanFibBody &b, split) : sum( Matrix1110 ), first(1) {} + //! Join point + void reverse_join( parallel_scanFibBody &a ) { + sum = sum * a.sum; + } + //! Assign point + void assign( parallel_scanFibBody &b ) { + sum = b.sum; + } + //! Process multiplications. For two tags + template + void operator()( const blocked_range &r, T) { + // see tag.is_final_scan() for what tag is used + for( int k = r.begin() + first; k < r.end(); ++k ) + sum = sum * Matrix1110; + first = 0; // reset flag, because this method can be reused for next range + } +}; +//! Root function +value parallel_scanFib(int n) +{ + parallel_scanFibBody b; + parallel_scan(blocked_range(1/*one less, because body skip first*/, n, 3), b); + return b.sum.v[0][0]; +} + +// *** Raw tasks *** // + +//! task class which computes Fibonacci numbers by Lucas formula +struct FibTask: public task { + const int n; + value& sum; + value x, y; + bool second_phase; //< flag of continuation + // task arguments + FibTask( int n_, value& sum_ ) : + n(n_), sum(sum_), second_phase(false) + {} + //! Execute task + /*override*/ task* execute() { + // Using Lucas' formula here + if( second_phase ) { // children finished + sum = n&1 ? x*x + y*y : x*x - y*y; + return NULL; + } + if( n <= 2 ) { + sum = n!=0; + return NULL; + } else { + recycle_as_continuation(); // repeat this task when children finish + second_phase = true; // mark second phase + FibTask& a = *new( allocate_child() ) FibTask( n/2 + 1, x ); + FibTask& b = *new( allocate_child() ) FibTask( n/2 - 1 + (n&1), y ); + set_ref_count(2); + spawn( a ); + return &b; + } + } +}; +//! Root function +value ParallelTaskFib(int n) { + value sum; + FibTask& a = *new(task::allocate_root()) FibTask(n, sum); + task::spawn_root_and_wait(a); + return sum; +} + +/////////////////////////// Main //////////////////////////////////////////////////// + +//! A closed range of int. +struct IntRange { + int low; + int high; + void set_from_string( const char* s ); + IntRange( int low_, int high_ ) : low(low_), high(high_) {} +}; + +void IntRange::set_from_string( const char* s ) { + char* end; + high = low = strtol(s,&end,0); + switch( *end ) { + case ':': + high = strtol(end+1,0,0); + break; + case '\0': + break; + default: + printf("unexpected character = %c\n",*end); + } +} + +//! Tick count for start +static tick_count t0; + +//! Verbose output flag +static bool Verbose = false; + +typedef value (*MeasureFunc)(int); +//! Measure ticks count in loop [2..n] +value Measure(const char *name, MeasureFunc func, int n) +{ + value result; + if(Verbose) printf("%s",name); + t0 = tick_count::now(); + for(int number = 2; number <= n; number++) + result = func(number); + if(Verbose) printf("\t- in %f msec\n", (tick_count::now() - t0).seconds()*1000); + return result; +} + +//! program entry +int main(int argc, char* argv[]) +{ + if(argc>1) Verbose = true; + int NumbersCount = argc>1 ? strtol(argv[1],0,0) : 500; + IntRange NThread(1,4);// Number of threads to use. + if(argc>2) NThread.set_from_string(argv[2]); + unsigned long ntrial = argc>3? (unsigned long)strtoul(argv[3],0,0) : 1; + value result, sum; + + if(Verbose) printf("Fibonacci numbers example. Generating %d numbers..\n", NumbersCount); + + result = Measure("Serial loop", SerialFib, NumbersCount); + sum = Measure("Serial matrix", SerialMatrixFib, NumbersCount); assert(result == sum); + sum = Measure("Serial vector", SerialVectorFib, NumbersCount); assert(result == sum); + sum = Measure("Serial queue", SerialQueueFib, NumbersCount); assert(result == sum); + // now in parallel + for( unsigned long i=0; i, NumbersCount); assert(result == sum); + sum = Measure("Shared serial (spin_mutex)", SharedSerialFib, NumbersCount); assert(result == sum); + sum = Measure("Shared serial (queuing_mutex)", SharedSerialFib, NumbersCount); assert(result == sum); + sum = Measure("Shared serial (Conc.HashTable)", ConcurrentHashSerialFib, NumbersCount); assert(result == sum); + sum = Measure("Parallel while+for/queue", ParallelQueueFib, NumbersCount); assert(result == sum); + sum = Measure("Parallel pipe/queue\t", ParallelPipeFib, NumbersCount); assert(result == sum); + sum = Measure("Parallel reduce\t\t", parallel_reduceFib, NumbersCount); assert(result == sum); + sum = Measure("Parallel scan\t\t", parallel_scanFib, NumbersCount); assert(result == sum); + sum = Measure("Parallel tasks\t\t", ParallelTaskFib, NumbersCount); assert(result == sum); + } + + #ifdef __GNUC__ + if(Verbose) printf("Fibonacci number #%d modulo 2^64 is %lld\n\n", NumbersCount, result); + #else + if(Verbose) printf("Fibonacci number #%d modulo 2^64 is %I64d\n\n", NumbersCount, result); + #endif + } + if(!Verbose) printf("TEST PASSED\n"); + return 0; +} + +// Utils + +void Matrix2x2Multiply(const value a[2][2], const value b[2][2], value c[2][2]) +{ + for( int i = 0; i <= 1; i++) + for( int j = 0; j <= 1; j++) + c[i][j] = a[i][0]*b[0][j] + a[i][1]*b[1][j]; +} + +Matrix2x2 Matrix2x2::operator *(const Matrix2x2 &to) const +{ + Matrix2x2 result; + Matrix2x2Multiply(v, to.v, result.v); + return result; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile new file mode 100644 index 0000000000..6e9966af34 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile @@ -0,0 +1,58 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# GNU Makefile that builds and runs example. +run_cmd= +PROG=fibonacci +ARGS= + +# The C++ compiler +ifneq (,$(shell which icc 2>/dev/null)) +CXX=icc +endif # icc + +ifeq ($(shell uname), Linux) +ifeq ($(target), android) +LIBS+= --sysroot=$(SYSROOT) +run_cmd=../../common/android.linux.launcher.sh +else +LIBS+= -lrt +endif +endif + +all: release test + +release: *.cpp + $(CXX) -O2 -DNDEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb $(LIBS) + +debug: *.cpp + $(CXX) -O0 -g -DTBB_USE_DEBUG $(CXXFLAGS) -o $(PROG) $^ -ltbb_debug $(LIBS) + +clean: + $(RM) $(PROG) *.o *.d + +test: + $(run_cmd) ./$(PROG) $(ARGS) diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile.windows b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile.windows new file mode 100644 index 0000000000..756d7b4b3a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/Makefile.windows @@ -0,0 +1,53 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +# Common Makefile that builds and runs example. + +# Just specify your program basename +PROG=Fibonacci +ARGS= + +# Trying to find if icl.exe is set +CXX1 = $(TBB_CXX)- +CXX2 = $(CXX1:icl.exe-=icl.exe) +CXX = $(CXX2:-=cl.exe) + +# The C++ compiler options +MYCXXFLAGS = /TP /EHsc /W3 /nologo /D _CONSOLE /D _MBCS /D WIN32 /D _WIN32_WINNT=0x0501 $(CXXFLAGS) +MYLDFLAGS =/INCREMENTAL:NO /NOLOGO /DEBUG /FIXED:NO $(LDFLAGS) + +all: release test +release: compiler_check + $(CXX) *.cpp /MD /O2 /D NDEBUG $(MYCXXFLAGS) /link tbb.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +debug: compiler_check + $(CXX) *.cpp /MDd /Od /Zi /D TBB_USE_DEBUG /D _DEBUG $(MYCXXFLAGS) /link tbb_debug.lib $(LIBS) $(MYLDFLAGS) /OUT:$(PROG).exe +clean: + @cmd.exe /C del $(PROG).exe *.obj *.?db *.manifest +test: + $(PROG) $(ARGS) +compiler_check: + @echo compiler_test>compiler_test && @$(CXX) /E compiler_test >nul 2>&1 || echo "$(CXX) command not found. Check if CXX=$(CXX) is set properly" + @cmd.exe /C del compiler_test diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/index.html b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/index.html new file mode 100644 index 0000000000..5d43170f80 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/index.html @@ -0,0 +1,51 @@ + + + +

    Overview

    +This directory contains an example that computes Fibonacci numbers in several +different ways. The purpose of the example is to exercise every include file +and class in Intel® Threading Building Blocks. +Most of the computations are deliberately silly and not expected to +show any speedup on multiprocessors. +

    Files

    +
    +
    Fibonacci.cpp +
    Source code for example. +
    Makefile +
    Makefile for building example. +
    + +

    Directories

    +
    +
    msvs +
    Contains Microsoft* Visual Studio* 2005 workspace for building and running the + example (Windows* systems only).
    xcode +
    Contains Xcode* IDE workspace for building and running the example (Mac OS* X + systems only).
    + +

    To Build

    +General build directions can be found here. + +

    Usage

    +
    +
    fibonacci K [M[:N]] [R] +
    Calculates the K-th fibonacci number. + M and N are a range of numbers of threads to be used. + R is the number of times to repeat the calculation. +
    To run a short version of this example, e.g., for use with Intel® Threading Tools: +
    Build a debug version of the example + (see the build directions). +
    Run it with a small fibonacci number and the desired number of threads, e.g., fibonacci 100 4. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.icproj b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.icproj new file mode 100644 index 0000000000..1f5e5b4586 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.icproj @@ -0,0 +1,11 @@ + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.vcproj b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.vcproj new file mode 100644 index 0000000000..7d38fd0554 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci.vcproj @@ -0,0 +1,356 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_cl.sln b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_cl.sln new file mode 100644 index 0000000000..60dafeaf25 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_cl.sln @@ -0,0 +1,25 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fibonacci", "fibonacci.vcproj", "{3AA40693-F93D-4D4B-B32E-068F511A252E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.ActiveCfg = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_icl.sln b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_icl.sln new file mode 100644 index 0000000000..70c5369d49 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/msvs/fibonacci_icl.sln @@ -0,0 +1,33 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{EAF909A5-FA59-4C3D-9431-0FCC20D5BCF9}") = "fibonacci", "fibonacci.icproj", "{123FDABA-4A55-4E79-AE28-58E90AA8256E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Debug|Win32.ActiveCfg = Debug|Win32 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Debug|Win32.Build.0 = Debug|Win32 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Debug|x64.ActiveCfg = Debug|x64 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Debug|x64.Build.0 = Debug|x64 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Release|Win32.ActiveCfg = Release|Win32 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Release|Win32.Build.0 = Release|Win32 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Release|x64.ActiveCfg = Release|x64 + {123FDABA-4A55-4E79-AE28-58E90AA8256E}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.Build.0 = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|x64.ActiveCfg = Release|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.Build.0 = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Release|Win32.ActiveCfg = Release|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.Build.0 = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|x64.ActiveCfg = Debug|x64 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.Build.0 = Debug|Win32 + {3AA40693-F93D-4D4B-B32E-068F511A252E}.Debug|Win32.ActiveCfg = Debug|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..0a08617257 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/fibonacci/xcode/fibonacci.xcodeproj/project.pbxproj @@ -0,0 +1,305 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + A1F593A60B8F042A00073279 /* Fibonacci.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A1F593A50B8F042A00073279 /* Fibonacci.cpp */; }; + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = A1F593B30B8F06F900073279 /* libtbb.dylib */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8DD76F690486A84900D96B5E /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 12; + dstPath = ""; + dstSubfolderSpec = 16; + files = ( + A1F593BB0B8F072500073279 /* libtbb.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 8DD76F6C0486A84900D96B5E /* Fibonacci */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Fibonacci; sourceTree = BUILT_PRODUCTS_DIR; }; + A1F593A50B8F042A00073279 /* Fibonacci.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Fibonacci.cpp; path = ../Fibonacci.cpp; sourceTree = SOURCE_ROOT; }; + A1F593B30B8F06F900073279 /* libtbb.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtbb.dylib; path = ../../../../lib/libtbb.dylib; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8DD76F660486A84900D96B5E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593B70B8F06F900073279 /* libtbb.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 08FB7794FE84155DC02AAC07 /* Fibonacci */ = { + isa = PBXGroup; + children = ( + 08FB7795FE84155DC02AAC07 /* Source */, + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */, + 1AB674ADFE9D54B511CA2CBB /* Products */, + ); + name = Fibonacci; + sourceTree = ""; + }; + 08FB7795FE84155DC02AAC07 /* Source */ = { + isa = PBXGroup; + children = ( + A1F593A50B8F042A00073279 /* Fibonacci.cpp */, + ); + name = Source; + sourceTree = ""; + }; + 1AB674ADFE9D54B511CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8DD76F6C0486A84900D96B5E /* Fibonacci */, + ); + name = Products; + sourceTree = ""; + }; + A1F593B20B8F06F900073279 /* External Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + A1F593B30B8F06F900073279 /* libtbb.dylib */, + ); + name = "External Frameworks and Libraries"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8DD76F620486A84900D96B5E /* Fibonacci */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Fibonacci" */; + buildPhases = ( + 8DD76F640486A84900D96B5E /* Sources */, + 8DD76F660486A84900D96B5E /* Frameworks */, + 8DD76F690486A84900D96B5E /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Fibonacci; + productInstallPath = "$(HOME)/bin"; + productName = Fibonacci; + productReference = 8DD76F6C0486A84900D96B5E /* Fibonacci */; + productType = "com.apple.product-type.tool"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 08FB7793FE84155DC02AAC07 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0410; + }; + buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "fibonacci" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + en, + ); + mainGroup = 08FB7794FE84155DC02AAC07 /* Fibonacci */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8DD76F620486A84900D96B5E /* Fibonacci */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 8DD76F640486A84900D96B5E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A1F593A60B8F042A00073279 /* Fibonacci.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 1DEB923208733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Fibonacci; + ZERO_LINK = NO; + }; + name = Debug; + }; + 1DEB923308733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Fibonacci; + ZERO_LINK = NO; + }; + name = Release; + }; + 1DEB923608733DC60010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug; + }; + 1DEB923708733DC60010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release; + }; + A1F593C60B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Fibonacci; + ZERO_LINK = NO; + }; + name = Debug64; + }; + A1F593C70B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_VERSION = ""; + HEADER_SEARCH_PATHS = ../../../../include; + INSTALL_PATH = "$(HOME)/bin"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + ../../../../lib, + ); + PRODUCT_NAME = Fibonacci; + ZERO_LINK = NO; + }; + name = Release64; + }; + A1F593C80B8F0E6E00073279 /* Debug64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Debug64; + }; + A1F593C90B8F0E6E00073279 /* Release64 */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = i386; + GCC_ENABLE_CPP_RTTI = YES; + GCC_MODEL_TUNING = ""; + GCC_VERSION = 4.0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-m64", + ); + OTHER_LDFLAGS = "-m64"; + PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + SYMROOT = "/tmp/tbb-$(USER)"; + }; + name = Release64; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "Fibonacci" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923208733DC60010E9CD /* Debug */, + A1F593C60B8F0E6E00073279 /* Debug64 */, + 1DEB923308733DC60010E9CD /* Release */, + A1F593C70B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "fibonacci" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB923608733DC60010E9CD /* Debug */, + A1F593C80B8F0E6E00073279 /* Debug64 */, + 1DEB923708733DC60010E9CD /* Release */, + A1F593C90B8F0E6E00073279 /* Release64 */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; +} diff --git a/deal.II/bundled/tbb41_20130401oss/examples/test_all/index.html b/deal.II/bundled/tbb41_20130401oss/examples/test_all/index.html new file mode 100644 index 0000000000..2ae10f8c38 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/examples/test_all/index.html @@ -0,0 +1,24 @@ + + + +

    Overview

    +This directory contains programs that exercise all the components of Intel® Threading Building Blocks. + +

    Directories

    +
    +
    fibonacci +
    Compute Fibonacci numbers in different ways. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/include/index.html b/deal.II/bundled/tbb41_20130401oss/include/index.html new file mode 100644 index 0000000000..64c59c303a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/index.html @@ -0,0 +1,23 @@ + + + +

    Overview

    +Include files for Intel® Threading Building Blocks (Intel® TBB). + +

    Directories

    +
    +
    tbb +
    Include files for Intel TBB classes and functions. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/parallel_for.h b/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/parallel_for.h new file mode 100644 index 0000000000..6c689fccf0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/parallel_for.h @@ -0,0 +1,209 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_SERIAL_parallel_for_H +#define __TBB_SERIAL_parallel_for_H + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include +#include // required to construct std exception classes + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#include "tbb_annotate.h" + +#ifndef __TBB_NORMAL_EXECUTION +#include "tbb/blocked_range.h" +#include "tbb/partitioner.h" +#endif + +namespace tbb { +namespace serial { +namespace interface6 { + +// parallel_for serial annotated implementation + +template< typename Range, typename Body, typename Partitioner > +class start_for : tbb::internal::no_copy { + Range my_range; + const Body my_body; + typename Partitioner::task_partition_type my_partition; + void execute(); + + //! Constructor for root task. + start_for( const Range& range, const Body& body, Partitioner& partitioner ) : + my_range( range ), + my_body( body ), + my_partition( partitioner ) + { + } + + //! Splitting constructor used to generate children. + /** this becomes left child. Newly constructed object is right child. */ + start_for( start_for& parent_, split ) : + my_range( parent_.my_range, split() ), + my_body( parent_.my_body ), + my_partition( parent_.my_partition, split() ) + { + } + +public: + static void run( const Range& range, const Body& body, Partitioner& partitioner ) { + if( !range.empty() ) { + ANNOTATE_SITE_BEGIN( tbb_parallel_for ); + { + start_for a( range, body, partitioner ); + a.execute(); + } + ANNOTATE_SITE_END( tbb_parallel_for ); + } + } +}; + +template< typename Range, typename Body, typename Partitioner > +void start_for< Range, Body, Partitioner >::execute() { + if( !my_range.is_divisible() || !my_partition.divisions_left() ) { + ANNOTATE_TASK_BEGIN( tbb_parallel_for_range ); + { + my_body( my_range ); + } + ANNOTATE_TASK_END( tbb_parallel_for_range ); + } else { + start_for b( *this, split() ); + this->execute(); // Execute the left interval first to keep the serial order. + b.execute(); // Execute the right interval then. + } +} + +//! Parallel iteration over range with default partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body ) { + serial::interface6::start_for::run(range,body,__TBB_DEFAULT_PARTITIONER()); +} + +//! Parallel iteration over range with simple partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) { + serial::interface6::start_for::run(range,body,partitioner); +} + +//! Parallel iteration over range with auto_partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) { + serial::interface6::start_for::run(range,body,partitioner); +} + +//! Parallel iteration over range with affinity_partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) { + serial::interface6::start_for::run(range,body,partitioner); +} + +//! Implementation of parallel iteration over stepped range of integers with explicit step and partitioner (ignored) +template +void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& ) { + if (step <= 0 ) + throw std::invalid_argument( "nonpositive_step" ); + else if (last > first) { + // Above "else" avoids "potential divide by zero" warning on some platforms + ANNOTATE_SITE_BEGIN( tbb_parallel_for ); + for( Index i = first; i < last; i = i + step ) { + ANNOTATE_TASK_BEGIN( tbb_parallel_for_iteration ); + { f( i ); } + ANNOTATE_TASK_END( tbb_parallel_for_iteration ); + } + ANNOTATE_SITE_END( tbb_parallel_for ); + } +} + +//! Parallel iteration over a range of integers with explicit step and default partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f) { + parallel_for_impl(first, last, step, f, auto_partitioner()); +} +//! Parallel iteration over a range of integers with explicit step and simple partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& p) { + parallel_for_impl(first, last, step, f, p); +} +//! Parallel iteration over a range of integers with explicit step and auto partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& p) { + parallel_for_impl(first, last, step, f, p); +} +//! Parallel iteration over a range of integers with explicit step and affinity partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& p) { + parallel_for_impl(first, last, step, f, p); +} + +//! Parallel iteration over a range of integers with default step and default partitioner +template +void parallel_for(Index first, Index last, const Function& f) { + parallel_for_impl(first, last, static_cast(1), f, auto_partitioner()); +} +//! Parallel iteration over a range of integers with default step and simple partitioner +template +void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& p) { + parallel_for_impl(first, last, static_cast(1), f, p); +} +//! Parallel iteration over a range of integers with default step and auto partitioner +template + void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& p) { + parallel_for_impl(first, last, static_cast(1), f, p); +} +//! Parallel iteration over a range of integers with default step and affinity_partitioner +template +void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& p) { + parallel_for_impl(first, last, static_cast(1), f, p); +} + +} // namespace interface6 + +using interface6::parallel_for; + +} // namespace serial + +#ifndef __TBB_NORMAL_EXECUTION +using serial::interface6::parallel_for; +#endif + +} // namespace tbb + +#endif /* __TBB_SERIAL_parallel_for_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/tbb_annotate.h b/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/tbb_annotate.h new file mode 100644 index 0000000000..a144e27574 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/serial/tbb/tbb_annotate.h @@ -0,0 +1,44 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_annotate_H +#define __TBB_annotate_H + +// Macros used by the Intel(R) Parallel Advisor. +#ifdef __TBB_NORMAL_EXECUTION + #define ANNOTATE_SITE_BEGIN( site ) + #define ANNOTATE_SITE_END( site ) + #define ANNOTATE_TASK_BEGIN( task ) + #define ANNOTATE_TASK_END( task ) + #define ANNOTATE_LOCK_ACQUIRE( lock ) + #define ANNOTATE_LOCK_RELEASE( lock ) +#else + #include +#endif + +#endif /* __TBB_annotate_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/aggregator.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/aggregator.h new file mode 100644 index 0000000000..1095af917d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/aggregator.h @@ -0,0 +1,210 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__aggregator_H +#define __TBB__aggregator_H + +#if !TBB_PREVIEW_AGGREGATOR +#error Set TBB_PREVIEW_AGGREGATOR before including aggregator.h +#endif + +#include "atomic.h" +#include "tbb_profiling.h" + +namespace tbb { +namespace interface6 { + +using namespace tbb::internal; + +class aggregator_operation { + template friend class aggregator_ext; + uintptr_t status; + aggregator_operation* my_next; +public: + enum aggregator_operation_status { agg_waiting=0, agg_finished }; + aggregator_operation() : status(agg_waiting), my_next(NULL) {} + /// Call start before handling this operation + void start() { call_itt_notify(acquired, &status); } + /// Call finish when done handling this operation + /** The operation will be released to its originating thread, and possibly deleted. */ + void finish() { itt_store_word_with_release(status, uintptr_t(agg_finished)); } + aggregator_operation* next() { return itt_hide_load_word(my_next);} + void set_next(aggregator_operation* n) { itt_hide_store_word(my_next, n); } +}; + +namespace internal { + +class basic_operation_base : public aggregator_operation { + friend class basic_handler; + virtual void apply_body() = 0; +public: + basic_operation_base() : aggregator_operation() {} + virtual ~basic_operation_base() {} +}; + +template +class basic_operation : public basic_operation_base, no_assign { + const Body& my_body; + /*override*/ void apply_body() { my_body(); } +public: + basic_operation(const Body& b) : basic_operation_base(), my_body(b) {} +}; + +class basic_handler { +public: + basic_handler() {} + void operator()(aggregator_operation* op_list) const { + while (op_list) { + // ITT note: &(op_list->status) tag is used to cover accesses to the operation data. + // The executing thread "acquires" the tag (see start()) and then performs + // the associated operation w/o triggering a race condition diagnostics. + // A thread that created the operation is waiting for its status (see execute_impl()), + // so when this thread is done with the operation, it will "release" the tag + // and update the status (see finish()) to give control back to the waiting thread. + basic_operation_base& request = static_cast(*op_list); + // IMPORTANT: need to advance op_list to op_list->next() before calling request.finish() + op_list = op_list->next(); + request.start(); + request.apply_body(); + request.finish(); + } + } +}; + +} // namespace internal + +//! Aggregator base class and expert interface +/** An aggregator for collecting operations coming from multiple sources and executing + them serially on a single thread. */ +template +class aggregator_ext : tbb::internal::no_copy { +public: + aggregator_ext(const handler_type& h) : handler_busy(0), handle_operations(h) { mailbox = NULL; } + + //! EXPERT INTERFACE: Enter a user-made operation into the aggregator's mailbox. + /** Details of user-made operations must be handled by user-provided handler */ + void process(aggregator_operation *op) { execute_impl(*op); } + + protected: + /** Place operation in mailbox, then either handle mailbox or wait for the operation + to be completed by a different thread. */ + void execute_impl(aggregator_operation& op) { + aggregator_operation* res; + + // ITT note: &(op.status) tag is used to cover accesses to this operation. This + // thread has created the operation, and now releases it so that the handler + // thread may handle the associated operation w/o triggering a race condition; + // thus this tag will be acquired just before the operation is handled in the + // handle_operations functor. + call_itt_notify(releasing, &(op.status)); + // insert the operation in the queue + do { + // ITT may flag the following line as a race; it is a false positive: + // This is an atomic read; we don't provide itt_hide_load_word for atomics + op.my_next = res = mailbox; // NOT A RACE + } while (mailbox.compare_and_swap(&op, res) != res); + if (!res) { // first in the list; handle the operations + // ITT note: &mailbox tag covers access to the handler_busy flag, which this + // waiting handler thread will try to set before entering handle_operations. + call_itt_notify(acquired, &mailbox); + start_handle_operations(); + __TBB_ASSERT(op.status, NULL); + } + else { // not first; wait for op to be ready + call_itt_notify(prepare, &(op.status)); + spin_wait_while_eq(op.status, uintptr_t(aggregator_operation::agg_waiting)); + itt_load_word_with_acquire(op.status); + } + } + + + private: + //! An atomically updated list (aka mailbox) of aggregator_operations + atomic mailbox; + + //! Controls thread access to handle_operations + /** Behaves as boolean flag where 0=false, 1=true */ + uintptr_t handler_busy; + + handler_type handle_operations; + + //! Trigger the handling of operations when the handler is free + void start_handle_operations() { + aggregator_operation *pending_operations; + + // ITT note: &handler_busy tag covers access to mailbox as it is passed + // between active and waiting handlers. Below, the waiting handler waits until + // the active handler releases, and the waiting handler acquires &handler_busy as + // it becomes the active_handler. The release point is at the end of this + // function, when all operations in mailbox have been handled by the + // owner of this aggregator. + call_itt_notify(prepare, &handler_busy); + // get handler_busy: only one thread can possibly spin here at a time + spin_wait_until_eq(handler_busy, uintptr_t(0)); + call_itt_notify(acquired, &handler_busy); + // acquire fence not necessary here due to causality rule and surrounding atomics + __TBB_store_with_release(handler_busy, uintptr_t(1)); + + // ITT note: &mailbox tag covers access to the handler_busy flag itself. + // Capturing the state of the mailbox signifies that handler_busy has been + // set and a new active handler will now process that list's operations. + call_itt_notify(releasing, &mailbox); + // grab pending_operations + pending_operations = mailbox.fetch_and_store(NULL); + + // handle all the operations + handle_operations(pending_operations); + + // release the handler + itt_store_word_with_release(handler_busy, uintptr_t(0)); + } +}; + +//! Basic aggregator interface +class aggregator : private aggregator_ext { +public: + aggregator() : aggregator_ext(internal::basic_handler()) {} + //! BASIC INTERFACE: Enter a function for exclusvie execution by the aggregator. + /** The calling thread stores the function object in a basic_operation and + places the operation in the aggregator's mailbox */ + template + void execute(const Body& b) { + internal::basic_operation op(b); + this->execute_impl(op); + } +}; + +} // namespace interface6 + +using interface6::aggregator; +using interface6::aggregator_ext; +using interface6::aggregator_operation; + +} // namespace tbb + +#endif // __TBB__aggregator_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/aligned_space.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/aligned_space.h new file mode 100644 index 0000000000..d7397d44db --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/aligned_space.h @@ -0,0 +1,55 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_aligned_space_H +#define __TBB_aligned_space_H + +#include "tbb_stddef.h" +#include "tbb_machine.h" + +namespace tbb { + +//! Block of space aligned sufficiently to construct an array T with N elements. +/** The elements are not constructed or destroyed by this class. + @ingroup memory_allocation */ +template +class aligned_space { +private: + typedef __TBB_TypeWithAlignmentAtLeastAsStrict(T) element_type; + element_type array[(sizeof(T)*N+sizeof(element_type)-1)/sizeof(element_type)]; +public: + //! Pointer to beginning of array + T* begin() {return internal::punned_cast(this);} + + //! Pointer to one past last element in array. + T* end() {return begin()+N;} +}; + +} // namespace tbb + +#endif /* __TBB_aligned_space_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/atomic.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/atomic.h new file mode 100644 index 0000000000..7d44af3420 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/atomic.h @@ -0,0 +1,554 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_atomic_H +#define __TBB_atomic_H + +#include "tbb_stddef.h" +#include + +#if _MSC_VER +#define __TBB_LONG_LONG __int64 +#else +#define __TBB_LONG_LONG long long +#endif /* _MSC_VER */ + +#include "tbb_machine.h" + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (push) + #pragma warning (disable: 4244 4267) +#endif + +namespace tbb { + +//! Specifies memory semantics. +enum memory_semantics { + //! Sequential consistency + full_fence, + //! Acquire + acquire, + //! Release + release, + //! No ordering + relaxed +}; + +//! @cond INTERNAL +namespace internal { + +#if __TBB_ATTRIBUTE_ALIGNED_PRESENT + #define __TBB_DECL_ATOMIC_FIELD(t,f,a) t f __attribute__ ((aligned(a))); +#elif __TBB_DECLSPEC_ALIGN_PRESENT + #define __TBB_DECL_ATOMIC_FIELD(t,f,a) __declspec(align(a)) t f; +#else + #error Do not know syntax for forcing alignment. +#endif + +template +struct atomic_rep; // Primary template declared, but never defined. + +template<> +struct atomic_rep<1> { // Specialization + typedef int8_t word; +}; +template<> +struct atomic_rep<2> { // Specialization + typedef int16_t word; +}; +template<> +struct atomic_rep<4> { // Specialization +#if _MSC_VER && !_WIN64 + // Work-around that avoids spurious /Wp64 warnings + typedef intptr_t word; +#else + typedef int32_t word; +#endif +}; +#if __TBB_64BIT_ATOMICS +template<> +struct atomic_rep<8> { // Specialization + typedef int64_t word; +}; +#endif + +template +struct aligned_storage; + +//the specializations are needed to please MSVC syntax of __declspec(align()) which accept _literal_ constants only +#if __TBB_ATOMIC_CTORS + #define ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(S) \ + template \ + struct aligned_storage { \ + __TBB_DECL_ATOMIC_FIELD(value_type,my_value,S) \ + aligned_storage() = default ; \ + constexpr aligned_storage(value_type value):my_value(value){} \ + }; \ + +#else + #define ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(S) \ + template \ + struct aligned_storage { \ + __TBB_DECL_ATOMIC_FIELD(value_type,my_value,S) \ + }; \ + +#endif + +template +struct aligned_storage { + value_type my_value; +#if __TBB_ATOMIC_CTORS + aligned_storage() = default ; + constexpr aligned_storage(value_type value):my_value(value){} +#endif +}; + +ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(2) +ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(4) +#if __TBB_64BIT_ATOMICS +ATOMIC_STORAGE_PARTIAL_SPECIALIZATION(8) +#endif + +template +struct atomic_traits; // Primary template declared, but not defined. + +#define __TBB_DECL_FENCED_ATOMIC_PRIMITIVES(S,M) \ + template<> struct atomic_traits { \ + typedef atomic_rep::word word; \ + inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) { \ + return __TBB_machine_cmpswp##S##M(location,new_value,comparand); \ + } \ + inline static word fetch_and_add( volatile void* location, word addend ) { \ + return __TBB_machine_fetchadd##S##M(location,addend); \ + } \ + inline static word fetch_and_store( volatile void* location, word value ) { \ + return __TBB_machine_fetchstore##S##M(location,value); \ + } \ + }; + +#define __TBB_DECL_ATOMIC_PRIMITIVES(S) \ + template \ + struct atomic_traits { \ + typedef atomic_rep::word word; \ + inline static word compare_and_swap( volatile void* location, word new_value, word comparand ) { \ + return __TBB_machine_cmpswp##S(location,new_value,comparand); \ + } \ + inline static word fetch_and_add( volatile void* location, word addend ) { \ + return __TBB_machine_fetchadd##S(location,addend); \ + } \ + inline static word fetch_and_store( volatile void* location, word value ) { \ + return __TBB_machine_fetchstore##S(location,value); \ + } \ + }; + +template +struct atomic_load_store_traits; // Primary template declaration + +#define __TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(M) \ + template<> struct atomic_load_store_traits { \ + template \ + inline static T load( const volatile T& location ) { \ + return __TBB_load_##M( location ); \ + } \ + template \ + inline static void store( volatile T& location, T value ) { \ + __TBB_store_##M( location, value ); \ + } \ + } + +#if __TBB_USE_FENCED_ATOMICS +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,full_fence) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,full_fence) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,full_fence) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,acquire) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,acquire) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,acquire) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,release) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,release) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,release) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(1,relaxed) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(2,relaxed) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(4,relaxed) +#if __TBB_64BIT_ATOMICS +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,full_fence) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,acquire) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,release) +__TBB_DECL_FENCED_ATOMIC_PRIMITIVES(8,relaxed) +#endif +#else /* !__TBB_USE_FENCED_ATOMICS */ +__TBB_DECL_ATOMIC_PRIMITIVES(1) +__TBB_DECL_ATOMIC_PRIMITIVES(2) +__TBB_DECL_ATOMIC_PRIMITIVES(4) +#if __TBB_64BIT_ATOMICS +__TBB_DECL_ATOMIC_PRIMITIVES(8) +#endif +#endif /* !__TBB_USE_FENCED_ATOMICS */ + +__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(full_fence); +__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(acquire); +__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(release); +__TBB_DECL_ATOMIC_LOAD_STORE_PRIMITIVES(relaxed); + +//! Additive inverse of 1 for type T. +/** Various compilers issue various warnings if -1 is used with various integer types. + The baroque expression below avoids all the warnings (we hope). */ +#define __TBB_MINUS_ONE(T) (T(T(0)-T(1))) + +//! Base class that provides basic functionality for atomic without fetch_and_add. +/** Works for any type T that has the same size as an integral type, has a trivial constructor/destructor, + and can be copied/compared by memcpy/memcmp. */ +template +struct atomic_impl { +protected: + aligned_storage my_storage; +private: + //TODO: rechecks on recent versions of gcc if union is still the _only_ way to do a conversion without warnings + //! Union type used to convert type T to underlying integral type. + template + union converter { + typedef typename atomic_rep::word bits_type; + converter(){} + converter(value_type a_value) : value(a_value) {} + value_type value; + bits_type bits; + }; + + template + union ptr_converter; //Primary template declared, but never defined. + + template + union ptr_converter { + typedef typename atomic_rep::word * bits_ptr_type; + ptr_converter(){} + ptr_converter(value_t* a_value) : value(a_value) {} + value_t* value; + bits_ptr_type bits; + }; + + template + static typename converter::bits_type to_bits(value_t value){ + return converter(value).bits; + } + template + static value_t to_value(typename converter::bits_type bits){ + converter u; + u.bits = bits; + return u.value; + } + + //separate function is needed as it is impossible to distinguish (and thus overload to_bits) + //whether the pointer passed in is a pointer to atomic location or a value of that location + template + static typename ptr_converter::bits_ptr_type to_bits_ptr(value_t* value){ + //TODO: try to use cast to void* and second cast to required pointer type; + //Once (and if) union converter goes away - check if strict aliasing warning + //suppression is still needed once. + //TODO: this #ifdef is temporary workaround, as union conversion seems to fail + //on suncc for 64 bit types for 32 bit target + #if !__SUNPRO_CC + return ptr_converter(value).bits; + #else + return typename ptr_converter::bits_ptr_type (value); + #endif + } + +public: + typedef T value_type; + +#if __TBB_ATOMIC_CTORS + atomic_impl() = default ; + constexpr atomic_impl(value_type value):my_storage(value){} +#endif + template + value_type fetch_and_store( value_type value ) { + return to_value(internal::atomic_traits::fetch_and_store(&my_storage.my_value,to_bits(value))); + } + + value_type fetch_and_store( value_type value ) { + return fetch_and_store(value); + } + + template + value_type compare_and_swap( value_type value, value_type comparand ) { + return to_value(internal::atomic_traits::compare_and_swap(&my_storage.my_value,to_bits(value),to_bits(comparand))); + } + + value_type compare_and_swap( value_type value, value_type comparand ) { + return compare_and_swap(value,comparand); + } + + operator value_type() const volatile { // volatile qualifier here for backwards compatibility + return to_value(__TBB_load_with_acquire(*to_bits_ptr(&my_storage.my_value))); + } + + template + value_type load () const { + return to_value(internal::atomic_load_store_traits::load(*to_bits_ptr(&my_storage.my_value))); + } + + value_type load () const { + return load(); + } + + template + void store ( value_type value ) { + internal::atomic_load_store_traits::store( *to_bits_ptr(&my_storage.my_value), to_bits(value)); + } + + void store ( value_type value ) { + store( value ); + } + +protected: + value_type store_with_release( value_type rhs ) { + __TBB_store_with_release(*to_bits_ptr(&my_storage.my_value),to_bits(rhs)); + return rhs; + } +}; + +//! Base class that provides basic functionality for atomic with fetch_and_add. +/** I is the underlying type. + D is the difference type. + StepType should be char if I is an integral type, and T if I is a T*. */ +template +struct atomic_impl_with_arithmetic: atomic_impl { +public: + typedef I value_type; +#if __TBB_ATOMIC_CTORS + atomic_impl_with_arithmetic() = default ; + constexpr atomic_impl_with_arithmetic(value_type value): atomic_impl(value){} +#endif + template + value_type fetch_and_add( D addend ) { + return value_type(internal::atomic_traits::fetch_and_add( &this->my_storage.my_value, addend*sizeof(StepType) )); + } + + value_type fetch_and_add( D addend ) { + return fetch_and_add(addend); + } + + template + value_type fetch_and_increment() { + return fetch_and_add(1); + } + + value_type fetch_and_increment() { + return fetch_and_add(1); + } + + template + value_type fetch_and_decrement() { + return fetch_and_add(__TBB_MINUS_ONE(D)); + } + + value_type fetch_and_decrement() { + return fetch_and_add(__TBB_MINUS_ONE(D)); + } + +public: + value_type operator+=( D value ) { + return fetch_and_add(value)+value; + } + + value_type operator-=( D value ) { + // Additive inverse of value computed using binary minus, + // instead of unary minus, for sake of avoiding compiler warnings. + return operator+=(D(0)-value); + } + + value_type operator++() { + return fetch_and_add(1)+1; + } + + value_type operator--() { + return fetch_and_add(__TBB_MINUS_ONE(D))-1; + } + + value_type operator++(int) { + return fetch_and_add(1); + } + + value_type operator--(int) { + return fetch_and_add(__TBB_MINUS_ONE(D)); + } +}; + +} /* Internal */ +//! @endcond + +//! Primary template for atomic. +/** See the Reference for details. + @ingroup synchronization */ +template +struct atomic: internal::atomic_impl { +#if __TBB_ATOMIC_CTORS + atomic() = default; + constexpr atomic(T arg): internal::atomic_impl(arg) {} +#endif + T operator=( T rhs ) { + // "this" required here in strict ISO C++ because store_with_release is a dependent name + return this->store_with_release(rhs); + } + atomic& operator=( const atomic& rhs ) {this->store_with_release(rhs); return *this;} +}; + +#if __TBB_ATOMIC_CTORS + #define __TBB_DECL_ATOMIC(T) \ + template<> struct atomic: internal::atomic_impl_with_arithmetic { \ + atomic() = default; \ + constexpr atomic(T arg): internal::atomic_impl_with_arithmetic(arg) {} \ + \ + T operator=( T rhs ) {return store_with_release(rhs);} \ + atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ + }; +#else + #define __TBB_DECL_ATOMIC(T) \ + template<> struct atomic: internal::atomic_impl_with_arithmetic { \ + T operator=( T rhs ) {return store_with_release(rhs);} \ + atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ + }; +#endif + +#if __TBB_64BIT_ATOMICS +//TODO: consider adding non-default (and atomic) copy constructor for 32bit platform +__TBB_DECL_ATOMIC(__TBB_LONG_LONG) +__TBB_DECL_ATOMIC(unsigned __TBB_LONG_LONG) +#else +// test_atomic will verify that sizeof(long long)==8 +#endif +__TBB_DECL_ATOMIC(long) +__TBB_DECL_ATOMIC(unsigned long) + +#if _MSC_VER && !_WIN64 +#if __TBB_ATOMIC_CTORS +/* Special version of __TBB_DECL_ATOMIC that avoids gratuitous warnings from cl /Wp64 option. + It is identical to __TBB_DECL_ATOMIC(unsigned) except that it replaces operator=(T) + with an operator=(U) that explicitly converts the U to a T. Types T and U should be + type synonyms on the platform. Type U should be the wider variant of T from the + perspective of /Wp64. */ +#define __TBB_DECL_ATOMIC_ALT(T,U) \ + template<> struct atomic: internal::atomic_impl_with_arithmetic { \ + atomic() = default ; \ + constexpr atomic(T arg): internal::atomic_impl_with_arithmetic(arg) {} \ + T operator=( U rhs ) {return store_with_release(T(rhs));} \ + atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ + }; +#else +#define __TBB_DECL_ATOMIC_ALT(T,U) \ + template<> struct atomic: internal::atomic_impl_with_arithmetic { \ + T operator=( U rhs ) {return store_with_release(T(rhs));} \ + atomic& operator=( const atomic& rhs ) {store_with_release(rhs); return *this;} \ + }; +#endif +__TBB_DECL_ATOMIC_ALT(unsigned,size_t) +__TBB_DECL_ATOMIC_ALT(int,ptrdiff_t) +#else +__TBB_DECL_ATOMIC(unsigned) +__TBB_DECL_ATOMIC(int) +#endif /* _MSC_VER && !_WIN64 */ + +__TBB_DECL_ATOMIC(unsigned short) +__TBB_DECL_ATOMIC(short) +__TBB_DECL_ATOMIC(char) +__TBB_DECL_ATOMIC(signed char) +__TBB_DECL_ATOMIC(unsigned char) + +#if !_MSC_VER || defined(_NATIVE_WCHAR_T_DEFINED) +__TBB_DECL_ATOMIC(wchar_t) +#endif /* _MSC_VER||!defined(_NATIVE_WCHAR_T_DEFINED) */ + +//! Specialization for atomic with arithmetic and operator->. +template struct atomic: internal::atomic_impl_with_arithmetic { +#if __TBB_ATOMIC_CTORS + atomic() = default ; + constexpr atomic(T* arg): internal::atomic_impl_with_arithmetic(arg) {} +#endif + T* operator=( T* rhs ) { + // "this" required here in strict ISO C++ because store_with_release is a dependent name + return this->store_with_release(rhs); + } + atomic& operator=( const atomic& rhs ) { + this->store_with_release(rhs); return *this; + } + T* operator->() const { + return (*this); + } +}; + +//! Specialization for atomic, for sake of not allowing arithmetic or operator->. +template<> struct atomic: internal::atomic_impl { +#if __TBB_ATOMIC_CTORS + atomic() = default ; + constexpr atomic(void* arg): internal::atomic_impl(arg) {} +#endif + void* operator=( void* rhs ) { + // "this" required here in strict ISO C++ because store_with_release is a dependent name + return this->store_with_release(rhs); + } + atomic& operator=( const atomic& rhs ) { + this->store_with_release(rhs); return *this; + } +}; + +// Helpers to workaround ugly syntax of calling template member function of a +// template class with template argument dependent on template parameters. + +template +T load ( const atomic& a ) { return a.template load(); } + +template +void store ( atomic& a, T value ) { return a.template store(value); } + +namespace interface6{ +//! Make an atomic for use in an initialization (list), as an alternative to zero-initializaton or normal assignment. +template +atomic make_atomic(T t) { + atomic a; + store(a,t); + return a; +} +} +using interface6::make_atomic; + +namespace internal { + +// only to aid in the gradual conversion of ordinary variables to proper atomics +template +inline atomic& as_atomic( T& t ) { + return (atomic&)t; +} +} // namespace tbb::internal + +} // namespace tbb + +#if _MSC_VER && !__INTEL_COMPILER + #pragma warning (pop) +#endif // warnings 4244, 4267 are back + +#endif /* __TBB_atomic_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range.h new file mode 100644 index 0000000000..43474d272d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range.h @@ -0,0 +1,129 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_blocked_range_H +#define __TBB_blocked_range_H + +#include "tbb_stddef.h" + +namespace tbb { + +/** \page range_req Requirements on range concept + Class \c R implementing the concept of range must define: + - \code R::R( const R& ); \endcode Copy constructor + - \code R::~R(); \endcode Destructor + - \code bool R::is_divisible() const; \endcode True if range can be partitioned into two subranges + - \code bool R::empty() const; \endcode True if range is empty + - \code R::R( R& r, split ); \endcode Split range \c r into two subranges. +**/ + +//! A range over which to iterate. +/** @ingroup algorithms */ +template +class blocked_range { +public: + //! Type of a value + /** Called a const_iterator for sake of algorithms that need to treat a blocked_range + as an STL container. */ + typedef Value const_iterator; + + //! Type for size of a range + typedef std::size_t size_type; + + //! Construct range with default-constructed values for begin and end. + /** Requires that Value have a default constructor. */ + blocked_range() : my_end(), my_begin() {} + + //! Construct range over half-open interval [begin,end), with the given grainsize. + blocked_range( Value begin_, Value end_, size_type grainsize_=1 ) : + my_end(end_), my_begin(begin_), my_grainsize(grainsize_) + { + __TBB_ASSERT( my_grainsize>0, "grainsize must be positive" ); + } + + //! Beginning of range. + const_iterator begin() const {return my_begin;} + + //! One past last value in range. + const_iterator end() const {return my_end;} + + //! Size of the range + /** Unspecified if end() + friend class blocked_range2d; + + template + friend class blocked_range3d; +}; + +} // namespace tbb + +#endif /* __TBB_blocked_range_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range2d.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range2d.h new file mode 100644 index 0000000000..191922333e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range2d.h @@ -0,0 +1,97 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_blocked_range2d_H +#define __TBB_blocked_range2d_H + +#include "tbb_stddef.h" +#include "blocked_range.h" + +namespace tbb { + +//! A 2-dimensional range that models the Range concept. +/** @ingroup algorithms */ +template +class blocked_range2d { +public: + //! Type for size of an iteration range + typedef blocked_range row_range_type; + typedef blocked_range col_range_type; + +private: + row_range_type my_rows; + col_range_type my_cols; + +public: + + blocked_range2d( RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, + ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) : + my_rows(row_begin,row_end,row_grainsize), + my_cols(col_begin,col_end,col_grainsize) + { + } + + blocked_range2d( RowValue row_begin, RowValue row_end, + ColValue col_begin, ColValue col_end ) : + my_rows(row_begin,row_end), + my_cols(col_begin,col_end) + { + } + + //! True if range is empty + bool empty() const { + // Yes, it is a logical OR here, not AND. + return my_rows.empty() || my_cols.empty(); + } + + //! True if range is divisible into two pieces. + bool is_divisible() const { + return my_rows.is_divisible() || my_cols.is_divisible(); + } + + blocked_range2d( blocked_range2d& r, split ) : + my_rows(r.my_rows), + my_cols(r.my_cols) + { + if( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) { + my_cols.my_begin = col_range_type::do_split(r.my_cols); + } else { + my_rows.my_begin = row_range_type::do_split(r.my_rows); + } + } + + //! The rows of the iteration space + const row_range_type& rows() const {return my_rows;} + + //! The columns of the iteration space + const col_range_type& cols() const {return my_cols;} +}; + +} // namespace tbb + +#endif /* __TBB_blocked_range2d_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range3d.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range3d.h new file mode 100644 index 0000000000..534fc90781 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/blocked_range3d.h @@ -0,0 +1,116 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_blocked_range3d_H +#define __TBB_blocked_range3d_H + +#include "tbb_stddef.h" +#include "blocked_range.h" + +namespace tbb { + +//! A 3-dimensional range that models the Range concept. +/** @ingroup algorithms */ +template +class blocked_range3d { +public: + //! Type for size of an iteration range + typedef blocked_range page_range_type; + typedef blocked_range row_range_type; + typedef blocked_range col_range_type; + +private: + page_range_type my_pages; + row_range_type my_rows; + col_range_type my_cols; + +public: + + blocked_range3d( PageValue page_begin, PageValue page_end, + RowValue row_begin, RowValue row_end, + ColValue col_begin, ColValue col_end ) : + my_pages(page_begin,page_end), + my_rows(row_begin,row_end), + my_cols(col_begin,col_end) + { + } + + blocked_range3d( PageValue page_begin, PageValue page_end, typename page_range_type::size_type page_grainsize, + RowValue row_begin, RowValue row_end, typename row_range_type::size_type row_grainsize, + ColValue col_begin, ColValue col_end, typename col_range_type::size_type col_grainsize ) : + my_pages(page_begin,page_end,page_grainsize), + my_rows(row_begin,row_end,row_grainsize), + my_cols(col_begin,col_end,col_grainsize) + { + } + + //! True if range is empty + bool empty() const { + // Yes, it is a logical OR here, not AND. + return my_pages.empty() || my_rows.empty() || my_cols.empty(); + } + + //! True if range is divisible into two pieces. + bool is_divisible() const { + return my_pages.is_divisible() || my_rows.is_divisible() || my_cols.is_divisible(); + } + + blocked_range3d( blocked_range3d& r, split ) : + my_pages(r.my_pages), + my_rows(r.my_rows), + my_cols(r.my_cols) + { + if( my_pages.size()*double(my_rows.grainsize()) < my_rows.size()*double(my_pages.grainsize()) ) { + if ( my_rows.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_rows.grainsize()) ) { + my_cols.my_begin = col_range_type::do_split(r.my_cols); + } else { + my_rows.my_begin = row_range_type::do_split(r.my_rows); + } + } else { + if ( my_pages.size()*double(my_cols.grainsize()) < my_cols.size()*double(my_pages.grainsize()) ) { + my_cols.my_begin = col_range_type::do_split(r.my_cols); + } else { + my_pages.my_begin = page_range_type::do_split(r.my_pages); + } + } + } + + //! The pages of the iteration space + const page_range_type& pages() const {return my_pages;} + + //! The rows of the iteration space + const row_range_type& rows() const {return my_rows;} + + //! The columns of the iteration space + const col_range_type& cols() const {return my_cols;} + +}; + +} // namespace tbb + +#endif /* __TBB_blocked_range3d_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/cache_aligned_allocator.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/cache_aligned_allocator.h new file mode 100644 index 0000000000..34da462b20 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/cache_aligned_allocator.h @@ -0,0 +1,146 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_cache_aligned_allocator_H +#define __TBB_cache_aligned_allocator_H + +#include +#include "tbb_stddef.h" +#if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_CPP11_STD_FORWARD_BROKEN + #include // std::forward +#endif + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + //! Cache/sector line size. + /** @ingroup memory_allocation */ + size_t __TBB_EXPORTED_FUNC NFS_GetLineSize(); + + //! Allocate memory on cache/sector line boundary. + /** @ingroup memory_allocation */ + void* __TBB_EXPORTED_FUNC NFS_Allocate( size_t n_element, size_t element_size, void* hint ); + + //! Free memory allocated by NFS_Allocate. + /** Freeing a NULL pointer is allowed, but has no effect. + @ingroup memory_allocation */ + void __TBB_EXPORTED_FUNC NFS_Free( void* ); +} +//! @endcond + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for erroneous "unreferenced parameter" warning in method destroy. + #pragma warning (push) + #pragma warning (disable: 4100) +#endif + +//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 +/** The members are ordered the same way they are in section 20.4.1 + of the ISO C++ standard. + @ingroup memory_allocation */ +template +class cache_aligned_allocator { +public: + typedef typename internal::allocator_type::value_type value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + template struct rebind { + typedef cache_aligned_allocator other; + }; + + cache_aligned_allocator() throw() {} + cache_aligned_allocator( const cache_aligned_allocator& ) throw() {} + template cache_aligned_allocator(const cache_aligned_allocator&) throw() {} + + pointer address(reference x) const {return &x;} + const_pointer address(const_reference x) const {return &x;} + + //! Allocate space for n objects, starting on a cache/sector line. + pointer allocate( size_type n, const void* hint=0 ) { + // The "hint" argument is always ignored in NFS_Allocate thus const_cast shouldn't hurt + return pointer(internal::NFS_Allocate( n, sizeof(value_type), const_cast(hint) )); + } + + //! Free block of memory that starts on a cache line + void deallocate( pointer p, size_type ) { + internal::NFS_Free(p); + } + + //! Largest value for which method allocate might succeed. + size_type max_size() const throw() { + return (~size_t(0)-internal::NFS_MaxLineSize)/sizeof(value_type); + } + + //! Copy-construct value at location pointed to by p. +#if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + template + void construct(U *p, Args&&... args) + #if __TBB_CPP11_STD_FORWARD_BROKEN + { ::new((void *)p) U((args)...); } + #else + { ::new((void *)p) U(std::forward(args)...); } + #endif +#else // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} +#endif // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + + //! Destroy value at location pointed to by p. + void destroy( pointer p ) {p->~value_type();} +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4100 is back + +//! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 +/** @ingroup memory_allocation */ +template<> +class cache_aligned_allocator { +public: + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template struct rebind { + typedef cache_aligned_allocator other; + }; +}; + +template +inline bool operator==( const cache_aligned_allocator&, const cache_aligned_allocator& ) {return true;} + +template +inline bool operator!=( const cache_aligned_allocator&, const cache_aligned_allocator& ) {return false;} + +} // namespace tbb + +#endif /* __TBB_cache_aligned_allocator_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/combinable.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/combinable.h new file mode 100644 index 0000000000..a530995dbb --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/combinable.h @@ -0,0 +1,80 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_combinable_H +#define __TBB_combinable_H + +#include "enumerable_thread_specific.h" +#include "cache_aligned_allocator.h" + +namespace tbb { +/** \name combinable + **/ +//@{ +//! Thread-local storage with optional reduction +/** @ingroup containers */ + template + class combinable { + private: + typedef typename tbb::cache_aligned_allocator my_alloc; + + typedef typename tbb::enumerable_thread_specific my_ets_type; + my_ets_type my_ets; + + public: + + combinable() { } + + template + combinable( finit _finit) : my_ets(_finit) { } + + //! destructor + ~combinable() { + } + + combinable(const combinable& other) : my_ets(other.my_ets) { } + + combinable & operator=( const combinable & other) { my_ets = other.my_ets; return *this; } + + void clear() { my_ets.clear(); } + + T& local() { return my_ets.local(); } + + T& local(bool & exists) { return my_ets.local(exists); } + + // combine_func_t has signature T(T,T) or T(const T&, const T&) + template + T combine(combine_func_t f_combine) { return my_ets.combine(f_combine); } + + // combine_func_t has signature void(T) or void(const T&) + template + void combine_each(combine_func_t f_combine) { my_ets.combine_each(f_combine); } + + }; +} // namespace tbb +#endif /* __TBB_combinable_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/condition_variable b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/condition_variable new file mode 100644 index 0000000000..9829cd0991 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/condition_variable @@ -0,0 +1,465 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_condition_variable_H +#define __TBB_condition_variable_H + +#if _WIN32||_WIN64 +#include "../machine/windows_api.h" + +namespace tbb { +namespace interface5 { +namespace internal { +struct condition_variable_using_event +{ + //! Event for blocking waiting threads. + HANDLE event; + //! Protects invariants involving n_waiters, release_count, and epoch. + CRITICAL_SECTION mutex; + //! Number of threads waiting on this condition variable + int n_waiters; + //! Number of threads remaining that should no longer wait on this condition variable. + int release_count; + //! To keep threads from waking up prematurely with earlier signals. + unsigned epoch; +}; +}}} // namespace tbb::interface5::internal + +#ifndef CONDITION_VARIABLE_INIT +typedef void* CONDITION_VARIABLE; +typedef CONDITION_VARIABLE* PCONDITION_VARIABLE; +#endif + +#else /* if not _WIN32||_WIN64 */ +#include // some systems need it for ETIMEDOUT +#include +#if __linux__ +#include +#else /* generic Unix */ +#include +#endif +#endif /* _WIN32||_WIN64 */ + +#include "../tbb_stddef.h" +#include "../mutex.h" +#include "../tbb_thread.h" +#include "../tbb_exception.h" +#include "../tbb_profiling.h" + +namespace tbb { + +namespace interface5 { + +// C++0x standard working draft 30.4.3 +// Lock tag types +struct defer_lock_t { }; //! do not acquire ownership of the mutex +struct try_to_lock_t { }; //! try to acquire ownership of the mutex without blocking +struct adopt_lock_t { }; //! assume the calling thread has already +const defer_lock_t defer_lock = {}; +const try_to_lock_t try_to_lock = {}; +const adopt_lock_t adopt_lock = {}; + +// C++0x standard working draft 30.4.3.1 +//! lock_guard +template +class lock_guard : tbb::internal::no_copy { +public: + //! mutex type + typedef M mutex_type; + + //! Constructor + /** precondition: If mutex_type is not a recursive mutex, the calling thread + does not own the mutex m. */ + explicit lock_guard(mutex_type& m) : pm(m) {m.lock();} + + //! Adopt_lock constructor + /** precondition: the calling thread owns the mutex m. */ + lock_guard(mutex_type& m, adopt_lock_t) : pm(m) {} + + //! Destructor + ~lock_guard() { pm.unlock(); } +private: + mutex_type& pm; +}; + +// C++0x standard working draft 30.4.3.2 +//! unique_lock +template +class unique_lock : tbb::internal::no_copy { + friend class condition_variable; +public: + typedef M mutex_type; + + // 30.4.3.2.1 construct/copy/destroy + // NB: Without constructors that take an r-value reference to a unique_lock, the following constructor is of little use. + //! Constructor + /** postcondition: pm==0 && owns==false */ + unique_lock() : pm(NULL), owns(false) {} + + //! Constructor + /** precondition: if mutex_type is not a recursive mutex, the calling thread + does not own the mutex m. If the precondition is not met, a deadlock occurs. + postcondition: pm==&m and owns==true */ + explicit unique_lock(mutex_type& m) : pm(&m) {m.lock(); owns=true;} + + //! Defer_lock constructor + /** postcondition: pm==&m and owns==false */ + unique_lock(mutex_type& m, defer_lock_t) : pm(&m), owns(false) {} + + //! Try_to_lock constructor + /** precondition: if mutex_type is not a recursive mutex, the calling thread + does not own the mutex m. If the precondition is not met, a deadlock occurs. + postcondition: pm==&m and owns==res where res is the value returned by + the call to m.try_lock(). */ + unique_lock(mutex_type& m, try_to_lock_t) : pm(&m) {owns = m.try_lock();} + + //! Adopt_lock constructor + /** precondition: the calling thread owns the mutex. If it does not, mutex->unlock() would fail. + postcondition: pm==&m and owns==true */ + unique_lock(mutex_type& m, adopt_lock_t) : pm(&m), owns(true) {} + + //! Timed unique_lock acquisition. + /** To avoid requiring support for namespace chrono, this method deviates from the working draft in that + it uses tbb::tick_count::interval_t to specify the time duration. */ + unique_lock(mutex_type& m, const tick_count::interval_t &i) : pm(&m) {owns = try_lock_for( i );} + + //! Destructor + ~unique_lock() { if( owns ) pm->unlock(); } + + // 30.4.3.2.2 locking + //! Lock the mutex and own it. + void lock() { + if( pm ) { + if( !owns ) { + pm->lock(); + owns = true; + } else + throw_exception_v4( tbb::internal::eid_possible_deadlock ); + } else + throw_exception_v4( tbb::internal::eid_operation_not_permitted ); + __TBB_ASSERT( owns, NULL ); + } + + //! Try to lock the mutex. + /** If successful, note that this lock owns it. Otherwise, set it false. */ + bool try_lock() { + if( pm ) { + if( !owns ) + owns = pm->try_lock(); + else + throw_exception_v4( tbb::internal::eid_possible_deadlock ); + } else + throw_exception_v4( tbb::internal::eid_operation_not_permitted ); + return owns; + } + + //! Try to lock the mutex. + bool try_lock_for( const tick_count::interval_t &i ); + + //! Unlock the mutex + /** And note that this lock no longer owns it. */ + void unlock() { + if( owns ) { + pm->unlock(); + owns = false; + } else + throw_exception_v4( tbb::internal::eid_operation_not_permitted ); + __TBB_ASSERT( !owns, NULL ); + } + + // 30.4.3.2.3 modifiers + //! Swap the two unique locks + void swap(unique_lock& u) { + mutex_type* t_pm = u.pm; u.pm = pm; pm = t_pm; + bool t_owns = u.owns; u.owns = owns; owns = t_owns; + } + + //! Release control over the mutex. + mutex_type* release() { + mutex_type* o_pm = pm; + pm = NULL; + owns = false; + return o_pm; + } + + // 30.4.3.2.4 observers + //! Does this lock own the mutex? + bool owns_lock() const { return owns; } + + // TODO: Un-comment 'explicit' when the last non-C++0x compiler support is dropped + //! Does this lock own the mutex? + /*explicit*/ operator bool() const { return owns; } + + //! Return the mutex that this lock currently has. + mutex_type* mutex() const { return pm; } + +private: + mutex_type* pm; + bool owns; +}; + +template +bool unique_lock::try_lock_for( const tick_count::interval_t &i) +{ + const int unique_lock_tick = 100; /* microseconds; 0.1 milliseconds */ + // the smallest wait-time is 0.1 milliseconds. + bool res = pm->try_lock(); + int duration_in_micro; + if( !res && (duration_in_micro=int(i.seconds()*1e6))>unique_lock_tick ) { + tick_count::interval_t i_100( double(unique_lock_tick)/1e6 /* seconds */); // 100 microseconds = 0.1*10E-3 + do { + this_tbb_thread::sleep(i_100); // sleep for 100 micro seconds + duration_in_micro -= unique_lock_tick; + res = pm->try_lock(); + } while( !res && duration_in_micro>unique_lock_tick ); + } + return (owns=res); +} + +//! Swap the two unique locks that have the mutexes of same type +template +void swap(unique_lock& x, unique_lock& y) { x.swap( y ); } + +namespace internal { + +#if _WIN32||_WIN64 +union condvar_impl_t { + condition_variable_using_event cv_event; + CONDITION_VARIABLE cv_native; +}; +void __TBB_EXPORTED_FUNC internal_initialize_condition_variable( condvar_impl_t& cv ); +void __TBB_EXPORTED_FUNC internal_destroy_condition_variable( condvar_impl_t& cv ); +void __TBB_EXPORTED_FUNC internal_condition_variable_notify_one( condvar_impl_t& cv ); +void __TBB_EXPORTED_FUNC internal_condition_variable_notify_all( condvar_impl_t& cv ); +bool __TBB_EXPORTED_FUNC internal_condition_variable_wait( condvar_impl_t& cv, mutex* mtx, const tick_count::interval_t* i = NULL ); + +#else /* if !(_WIN32||_WIN64), i.e., POSIX threads */ +typedef pthread_cond_t condvar_impl_t; +#endif + +} // namespace internal + +//! cv_status +/** C++0x standard working draft 30.5 */ +enum cv_status { no_timeout, timeout }; + +//! condition variable +/** C++0x standard working draft 30.5.1 + @ingroup synchronization */ +class condition_variable : tbb::internal::no_copy { +public: + //! Constructor + condition_variable() { +#if _WIN32||_WIN64 + internal_initialize_condition_variable( my_cv ); +#else + pthread_cond_init( &my_cv, NULL ); +#endif + } + + //! Destructor + ~condition_variable() { + //precondition: There shall be no thread blocked on *this. +#if _WIN32||_WIN64 + internal_destroy_condition_variable( my_cv ); +#else + pthread_cond_destroy( &my_cv ); +#endif + } + + //! Notify one thread and wake it up + void notify_one() { +#if _WIN32||_WIN64 + internal_condition_variable_notify_one( my_cv ); +#else + pthread_cond_signal( &my_cv ); +#endif + } + + //! Notify all threads + void notify_all() { +#if _WIN32||_WIN64 + internal_condition_variable_notify_all( my_cv ); +#else + pthread_cond_broadcast( &my_cv ); +#endif + } + + //! Release the mutex associated with the lock and wait on this condition variable + void wait(unique_lock& lock); + + //! Wait on this condition variable while pred is false + template + void wait(unique_lock& lock, Predicate pred) { + while( !pred() ) + wait( lock ); + } + + //! Timed version of wait() + cv_status wait_for(unique_lock& lock, const tick_count::interval_t &i ); + + //! Timed version of the predicated wait + /** The loop terminates when pred() returns true or when the time duration specified by rel_time (i) has elapsed. */ + template + bool wait_for(unique_lock& lock, const tick_count::interval_t &i, Predicate pred) + { + while( !pred() ) { + cv_status st = wait_for( lock, i ); + if( st==timeout ) + return pred(); + } + return true; + } + + // C++0x standard working draft. 30.2.3 + typedef internal::condvar_impl_t* native_handle_type; + + native_handle_type native_handle() { return (native_handle_type) &my_cv; } + +private: + internal::condvar_impl_t my_cv; +}; + + +#if _WIN32||_WIN64 +inline void condition_variable::wait( unique_lock& lock ) +{ + __TBB_ASSERT( lock.owns, NULL ); + lock.owns = false; + if( !internal_condition_variable_wait( my_cv, lock.mutex() ) ) { + int ec = GetLastError(); + // on Windows 7, SleepConditionVariableCS() may return ERROR_TIMEOUT while the doc says it returns WAIT_TIMEOUT + __TBB_ASSERT_EX( ec!=WAIT_TIMEOUT&&ec!=ERROR_TIMEOUT, NULL ); + lock.owns = true; + throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); + } + lock.owns = true; +} + +inline cv_status condition_variable::wait_for( unique_lock& lock, const tick_count::interval_t& i ) +{ + cv_status rc = no_timeout; + __TBB_ASSERT( lock.owns, NULL ); + lock.owns = false; + // condvar_wait could be SleepConditionVariableCS (or SleepConditionVariableSRW) or our own pre-vista cond_var_wait() + if( !internal_condition_variable_wait( my_cv, lock.mutex(), &i ) ) { + int ec = GetLastError(); + if( ec==WAIT_TIMEOUT || ec==ERROR_TIMEOUT ) + rc = timeout; + else { + lock.owns = true; + throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); + } + } + lock.owns = true; + return rc; +} + +#else /* !(_WIN32||_WIN64) */ +inline void condition_variable::wait( unique_lock& lock ) +{ + __TBB_ASSERT( lock.owns, NULL ); + lock.owns = false; + if( pthread_cond_wait( &my_cv, lock.mutex()->native_handle() ) ) { + lock.owns = true; + throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); + } + // upon successful return, the mutex has been locked and is owned by the calling thread. + lock.owns = true; +} + +inline cv_status condition_variable::wait_for( unique_lock& lock, const tick_count::interval_t& i ) +{ +#if __linux__ + struct timespec req; + double sec = i.seconds(); + clock_gettime( CLOCK_REALTIME, &req ); + req.tv_sec += static_cast(sec); + req.tv_nsec += static_cast( (sec - static_cast(sec))*1e9 ); +#else /* generic Unix */ + struct timeval tv; + struct timespec req; + double sec = i.seconds(); + int status = gettimeofday(&tv, NULL); + __TBB_ASSERT_EX( status==0, "gettimeofday failed" ); + req.tv_sec = tv.tv_sec + static_cast(sec); + req.tv_nsec = tv.tv_usec*1000 + static_cast( (sec - static_cast(sec))*1e9 ); +#endif /*(choice of OS) */ + if( req.tv_nsec>=1e9 ) { + req.tv_sec += 1; + req.tv_nsec -= static_cast(1e9); + } + __TBB_ASSERT( 0<=req.tv_nsec && req.tv_nsec<1e9, NULL ); + + int ec; + cv_status rc = no_timeout; + __TBB_ASSERT( lock.owns, NULL ); + lock.owns = false; + if( ( ec=pthread_cond_timedwait( &my_cv, lock.mutex()->native_handle(), &req ) ) ) { + if( ec==ETIMEDOUT ) + rc = timeout; + else { + __TBB_ASSERT( lock.try_lock()==false, NULL ); + lock.owns = true; + throw_exception_v4( tbb::internal::eid_condvar_wait_failed ); + } + } + lock.owns = true; + return rc; +} +#endif /* !(_WIN32||_WIN64) */ + +} // namespace interface5 + +__TBB_DEFINE_PROFILING_SET_NAME(interface5::condition_variable) + +} // namespace tbb + +#if TBB_IMPLEMENT_CPP0X + +namespace std { + +using tbb::interface5::defer_lock_t; +using tbb::interface5::try_to_lock_t; +using tbb::interface5::adopt_lock_t; +using tbb::interface5::defer_lock; +using tbb::interface5::try_to_lock; +using tbb::interface5::adopt_lock; +using tbb::interface5::lock_guard; +using tbb::interface5::unique_lock; +using tbb::interface5::swap; /* this is for void std::swap(unique_lock&,unique_lock&) */ +using tbb::interface5::condition_variable; +using tbb::interface5::cv_status; +using tbb::interface5::timeout; +using tbb::interface5::no_timeout; + +} // namespace std + +#endif /* TBB_IMPLEMENT_CPP0X */ + +#endif /* __TBB_condition_variable_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/ppl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/ppl.h new file mode 100644 index 0000000000..4d2fc285ce --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/ppl.h @@ -0,0 +1,70 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_compat_ppl_H +#define __TBB_compat_ppl_H + +#include "../task_group.h" +#include "../parallel_invoke.h" +#include "../parallel_for_each.h" +#include "../parallel_for.h" +#include "../tbb_exception.h" +#include "../critical_section.h" +#include "../reader_writer_lock.h" +#include "../combinable.h" + +namespace Concurrency { + +#if __TBB_TASK_GROUP_CONTEXT + using tbb::task_handle; + using tbb::task_group_status; + using tbb::task_group; + using tbb::structured_task_group; + using tbb::invalid_multiple_scheduling; + using tbb::missing_wait; + using tbb::make_task; + + using tbb::not_complete; + using tbb::complete; + using tbb::canceled; + + using tbb::is_current_task_group_canceling; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + using tbb::parallel_invoke; + using tbb::strict_ppl::parallel_for; + using tbb::parallel_for_each; + using tbb::critical_section; + using tbb::reader_writer_lock; + using tbb::combinable; + + using tbb::improper_lock; + +} // namespace Concurrency + +#endif /* __TBB_compat_ppl_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/thread b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/thread new file mode 100644 index 0000000000..80e2619249 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/thread @@ -0,0 +1,54 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_thread_H +#define __TBB_thread_H + +#include "../tbb_thread.h" + +#if TBB_IMPLEMENT_CPP0X + +namespace std { + +typedef tbb::tbb_thread thread; + +namespace this_thread { + using tbb::this_tbb_thread::get_id; + using tbb::this_tbb_thread::yield; + + inline void sleep_for(const tbb::tick_count::interval_t& rel_time) { + tbb::internal::thread_sleep_v3( rel_time ); + } + +} + +} + +#endif /* TBB_IMPLEMENT_CPP0X */ + +#endif /* __TBB_thread_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/tuple b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/tuple new file mode 100644 index 0000000000..5e79b3fe39 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/compat/tuple @@ -0,0 +1,496 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tuple_H +#define __TBB_tuple_H + +#include +#include "../tbb_stddef.h" + +// build preprocessor variables for varying number of arguments +// Need the leading comma so the empty __TBB_T_PACK will not cause a syntax error. +#if __TBB_VARIADIC_MAX <= 5 +#define __TBB_T_PACK +#define __TBB_U_PACK +#define __TBB_TYPENAME_T_PACK +#define __TBB_TYPENAME_U_PACK +#define __TBB_NULL_TYPE_PACK +#define __TBB_REF_T_PARAM_PACK +#define __TBB_CONST_REF_T_PARAM_PACK +#define __TBB_T_PARAM_LIST_PACK +#define __TBB_CONST_NULL_REF_PACK +// +#elif __TBB_VARIADIC_MAX == 6 +#define __TBB_T_PACK ,T5 +#define __TBB_U_PACK ,U5 +#define __TBB_TYPENAME_T_PACK , typename T5 +#define __TBB_TYPENAME_U_PACK , typename U5 +#define __TBB_NULL_TYPE_PACK , null_type +#define __TBB_REF_T_PARAM_PACK ,T5& t5 +#define __TBB_CONST_REF_T_PARAM_PACK ,const T5& t5 +#define __TBB_T_PARAM_LIST_PACK ,t5 +#define __TBB_CONST_NULL_REF_PACK , const null_type& +// +#elif __TBB_VARIADIC_MAX == 7 +#define __TBB_T_PACK ,T5, T6 +#define __TBB_U_PACK ,U5, U6 +#define __TBB_TYPENAME_T_PACK , typename T5 , typename T6 +#define __TBB_TYPENAME_U_PACK , typename U5 , typename U6 +#define __TBB_NULL_TYPE_PACK , null_type, null_type +#define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6 +#define __TBB_CONST_REF_T_PARAM_PACK ,const T5& t5, const T6& t6 +#define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 +#define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type& +// +#elif __TBB_VARIADIC_MAX == 8 +#define __TBB_T_PACK ,T5, T6, T7 +#define __TBB_U_PACK ,U5, U6, U7 +#define __TBB_TYPENAME_T_PACK , typename T5 , typename T6, typename T7 +#define __TBB_TYPENAME_U_PACK , typename U5 , typename U6, typename U7 +#define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type +#define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7 +#define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7& t7 +#define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 +#define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type& +// +#elif __TBB_VARIADIC_MAX == 9 +#define __TBB_T_PACK ,T5, T6, T7, T8 +#define __TBB_U_PACK ,U5, U6, U7, U8 +#define __TBB_TYPENAME_T_PACK , typename T5, typename T6, typename T7, typename T8 +#define __TBB_TYPENAME_U_PACK , typename U5, typename U6, typename U7, typename U8 +#define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type +#define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7, T8& t8 +#define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7& t7, const T8& t8 +#define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 +#define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type&, const null_type& +// +#elif __TBB_VARIADIC_MAX >= 10 +#define __TBB_T_PACK ,T5, T6, T7, T8, T9 +#define __TBB_U_PACK ,U5, U6, U7, U8, U9 +#define __TBB_TYPENAME_T_PACK , typename T5, typename T6, typename T7, typename T8, typename T9 +#define __TBB_TYPENAME_U_PACK , typename U5, typename U6, typename U7, typename U8, typename U9 +#define __TBB_NULL_TYPE_PACK , null_type, null_type, null_type, null_type, null_type +#define __TBB_REF_T_PARAM_PACK ,T5& t5, T6& t6, T7& t7, T8& t8, T9& t9 +#define __TBB_CONST_REF_T_PARAM_PACK , const T5& t5, const T6& t6, const T7& t7, const T8& t8, const T9& t9 +#define __TBB_T_PARAM_LIST_PACK ,t5 ,t6 ,t7 ,t8 ,t9 +#define __TBB_CONST_NULL_REF_PACK , const null_type&, const null_type&, const null_type&, const null_type&, const null_type& +#endif + + + +namespace tbb { +namespace interface5 { + +namespace internal { +struct null_type { }; +} +using internal::null_type; + +// tuple forward declaration +template = 6 +, typename T5=null_type +#if __TBB_VARIADIC_MAX >= 7 +, typename T6=null_type +#if __TBB_VARIADIC_MAX >= 8 +, typename T7=null_type +#if __TBB_VARIADIC_MAX >= 9 +, typename T8=null_type +#if __TBB_VARIADIC_MAX >= 10 +, typename T9=null_type +#endif +#endif +#endif +#endif +#endif +> +class tuple; + +namespace internal { + +// const null_type temp +inline const null_type cnull() { return null_type(); } + +// cons forward declaration +template struct cons; + +// type of a component of the cons +template +struct component { + typedef typename T::tail_type next; + typedef typename component::type type; +}; + +template +struct component<0,T> { + typedef typename T::head_type type; +}; + +template<> +struct component<0,null_type> { + typedef null_type type; +}; + +// const version of component + +template +struct component +{ + typedef typename T::tail_type next; + typedef const typename component::type type; +}; + +template +struct component<0, const T> +{ + typedef const typename T::head_type type; +}; + + +// helper class for getting components of cons +template< int N> +struct get_helper { +template +inline static typename component >::type& get(cons& ti) { + return get_helper::get(ti.tail); +} +template +inline static typename component >::type const& get(const cons& ti) { + return get_helper::get(ti.tail); +} +}; + +template<> +struct get_helper<0> { +template +inline static typename component<0, cons >::type& get(cons& ti) { + return ti.head; +} +template +inline static typename component<0, cons >::type const& get(const cons& ti) { + return ti.head; +} +}; + +// traits adaptor +template +struct tuple_traits { + typedef cons ::U > U; +}; + +template +struct tuple_traits { + typedef cons U; +}; + +template<> +struct tuple_traits { + typedef null_type U; +}; + + +// core cons defs +template +struct cons{ + + typedef HT head_type; + typedef TT tail_type; + + head_type head; + tail_type tail; + + static const int length = 1 + tail_type::length; + + // default constructors + explicit cons() : head(), tail() { } + + // non-default constructors + cons(head_type& h, const tail_type& t) : head(h), tail(t) { } + + template + cons(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4 __TBB_CONST_REF_T_PARAM_PACK) : + head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK, cnull()) { } + + template + cons(T0& t0, T1& t1, T2& t2, T3& t3, T4& t4 __TBB_REF_T_PARAM_PACK) : + head(t0), tail(t1, t2, t3, t4 __TBB_T_PARAM_LIST_PACK , cnull()) { } + + template + cons(const cons& other) : head(other.head), tail(other.tail) { } + + cons& operator=(const cons& other) { head = other.head; tail = other.tail; return *this; } + + friend bool operator==(const cons& me, const cons& other) { + return me.head == other.head && me.tail == other.tail; + } + friend bool operator<(const cons& me, const cons& other) { + return me.head < other.head || (!(other.head < me.head) && me.tail < other.tail); + } + friend bool operator>(const cons& me, const cons& other) { return other=(const cons& me, const cons& other) { return !(meother); } + + template + friend bool operator==(const cons& me, const cons& other) { + return me.head == other.head && me.tail == other.tail; + } + + template + friend bool operator<(const cons& me, const cons& other) { + return me.head < other.head || (!(other.head < me.head) && me.tail < other.tail); + } + + template + friend bool operator>(const cons& me, const cons& other) { return other + friend bool operator!=(const cons& me, const cons& other) { return !(me==other); } + + template + friend bool operator>=(const cons& me, const cons& other) { return !(me + friend bool operator<=(const cons& me, const cons& other) { return !(me>other); } + + +}; // cons + + +template +struct cons { + + typedef HT head_type; + typedef null_type tail_type; + + head_type head; + + static const int length = 1; + + // default constructor + cons() : head() { /*std::cout << "default constructor 1\n";*/ } + + cons(const null_type&, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head() { /*std::cout << "default constructor 2\n";*/ } + + // non-default constructor + template + cons(T1& t1, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(t1) { /*std::cout << "non-default a1, t1== " << t1 << "\n";*/} + + cons(head_type& h, const null_type& = null_type() ) : head(h) { } + cons(const head_type& t0, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(t0) { } + + // converting constructor + template + cons(HT1 h1, const null_type&, const null_type&, const null_type&, const null_type& __TBB_CONST_NULL_REF_PACK) : head(h1) { } + + // copy constructor + template + cons( const cons& other) : head(other.head) { } + + // assignment operator + cons& operator=(const cons& other) { head = other.head; return *this; } + + friend bool operator==(const cons& me, const cons& other) { return me.head == other.head; } + friend bool operator<(const cons& me, const cons& other) { return me.head < other.head; } + friend bool operator>(const cons& me, const cons& other) { return otherother); } + friend bool operator>=(const cons& me, const cons& other) {return !(me + friend bool operator==(const cons& me, const cons& other) { + return me.head == other.head; + } + + template + friend bool operator<(const cons& me, const cons& other) { + return me.head < other.head; + } + + template + friend bool operator>(const cons& me, const cons& other) { return other + friend bool operator!=(const cons& me, const cons& other) { return !(me==other); } + + template + friend bool operator<=(const cons& me, const cons& other) { return !(me>other); } + + template + friend bool operator>=(const cons& me, const cons& other) { return !(me +struct cons { typedef null_type tail_type; static const int length = 0; }; + +// wrapper for default constructor +template +inline const T wrap_dcons(T*) { return T(); } + +} // namespace internal + +// tuple definition +template +class tuple : public internal::tuple_traits::U { + // friends + template friend class tuple_size; + template friend struct tuple_element; + + // stl components + typedef tuple value_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef size_t size_type; + + typedef typename internal::tuple_traits::U my_cons; + +public: + tuple(const T0& t0=internal::wrap_dcons((T0*)NULL) + ,const T1& t1=internal::wrap_dcons((T1*)NULL) + ,const T2& t2=internal::wrap_dcons((T2*)NULL) + ,const T3& t3=internal::wrap_dcons((T3*)NULL) + ,const T4& t4=internal::wrap_dcons((T4*)NULL) +#if __TBB_VARIADIC_MAX >= 6 + ,const T5& t5=internal::wrap_dcons((T5*)NULL) +#if __TBB_VARIADIC_MAX >= 7 + ,const T6& t6=internal::wrap_dcons((T6*)NULL) +#if __TBB_VARIADIC_MAX >= 8 + ,const T7& t7=internal::wrap_dcons((T7*)NULL) +#if __TBB_VARIADIC_MAX >= 9 + ,const T8& t8=internal::wrap_dcons((T8*)NULL) +#if __TBB_VARIADIC_MAX >= 10 + ,const T9& t9=internal::wrap_dcons((T9*)NULL) +#endif +#endif +#endif +#endif +#endif + ) : + my_cons(t0,t1,t2,t3,t4 __TBB_T_PARAM_LIST_PACK) { } + + template + struct internal_tuple_element { + typedef typename internal::component::type type; + }; + + template + typename internal_tuple_element::type& get() { return internal::get_helper::get(*this); } + + template + typename internal_tuple_element::type const& get() const { return internal::get_helper::get(*this); } + + template + tuple& operator=(const internal::cons& other) { + my_cons::operator=(other); + return *this; + } + + template + tuple& operator=(const std::pair& other) { + // __TBB_ASSERT(tuple_size::value == 2, "Invalid size for pair to tuple assignment"); + this->head = other.first; + this->tail.head = other.second; + return *this; + } + + friend bool operator==(const tuple& me, const tuple& other) {return static_cast(me)==(other);} + friend bool operator<(const tuple& me, const tuple& other) {return static_cast(me)<(other);} + friend bool operator>(const tuple& me, const tuple& other) {return static_cast(me)>(other);} + friend bool operator!=(const tuple& me, const tuple& other) {return static_cast(me)!=(other);} + friend bool operator>=(const tuple& me, const tuple& other) {return static_cast(me)>=(other);} + friend bool operator<=(const tuple& me, const tuple& other) {return static_cast(me)<=(other);} + +}; // tuple + +// empty tuple +template<> +class tuple : public null_type { +}; + +// helper classes + +template < typename T> +class tuple_size { +public: + static const size_t value = 1 + tuple_size::value; +}; + +template <> +class tuple_size > { +public: + static const size_t value = 0; +}; + +template <> +class tuple_size { +public: + static const size_t value = 0; +}; + +template +struct tuple_element { + typedef typename internal::component::type type; +}; + +template +inline static typename tuple_element >::type& + get(tuple& t) { return internal::get_helper::get(t); } + +template +inline static typename tuple_element >::type const& + get(const tuple& t) { return internal::get_helper::get(t); } + +} // interface5 +} // tbb + +#if !__TBB_CPP11_TUPLE_PRESENT +namespace tbb { + namespace flow { + using tbb::interface5::tuple; + using tbb::interface5::tuple_size; + using tbb::interface5::tuple_element; + using tbb::interface5::get; + } +} +#endif + +#undef __TBB_T_PACK +#undef __TBB_U_PACK +#undef __TBB_TYPENAME_T_PACK +#undef __TBB_TYPENAME_U_PACK +#undef __TBB_NULL_TYPE_PACK +#undef __TBB_REF_T_PARAM_PACK +#undef __TBB_CONST_REF_T_PARAM_PACK +#undef __TBB_T_PARAM_LIST_PACK +#undef __TBB_CONST_NULL_REF_PACK + +#endif /* __TBB_tuple_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_hash_map.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_hash_map.h new file mode 100644 index 0000000000..5681b3cf5d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_hash_map.h @@ -0,0 +1,1336 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_hash_map_H +#define __TBB_concurrent_hash_map_H + +#include "tbb_stddef.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include +#include // Need std::pair +#include // Need std::memset + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#include "cache_aligned_allocator.h" +#include "tbb_allocator.h" +#include "spin_rw_mutex.h" +#include "atomic.h" +#include "aligned_space.h" +#include "tbb_exception.h" +#include "tbb_profiling.h" +#include "internal/_concurrent_unordered_impl.h" // Need tbb_hasher +#if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS +#include +#endif +#if __TBB_STATISTICS +#include +#endif + +namespace tbb { + +//! hash_compare that is default argument for concurrent_hash_map +template +struct tbb_hash_compare { + static size_t hash( const Key& a ) { return tbb_hasher(a); } + static bool equal( const Key& a, const Key& b ) { return a == b; } +}; + +namespace interface5 { + + template, typename A = tbb_allocator > > + class concurrent_hash_map; + + //! @cond INTERNAL + namespace internal { + + + //! Type of a hash code. + typedef size_t hashcode_t; + //! Node base type + struct hash_map_node_base : tbb::internal::no_copy { + //! Mutex type + typedef spin_rw_mutex mutex_t; + //! Scoped lock type for mutex + typedef mutex_t::scoped_lock scoped_t; + //! Next node in chain + hash_map_node_base *next; + mutex_t mutex; + }; + //! Incompleteness flag value + static hash_map_node_base *const rehash_req = reinterpret_cast(size_t(3)); + //! Rehashed empty bucket flag + static hash_map_node_base *const empty_rehashed = reinterpret_cast(size_t(0)); + //! base class of concurrent_hash_map + class hash_map_base { + public: + //! Size type + typedef size_t size_type; + //! Type of a hash code. + typedef size_t hashcode_t; + //! Segment index type + typedef size_t segment_index_t; + //! Node base type + typedef hash_map_node_base node_base; + //! Bucket type + struct bucket : tbb::internal::no_copy { + //! Mutex type for buckets + typedef spin_rw_mutex mutex_t; + //! Scoped lock type for mutex + typedef mutex_t::scoped_lock scoped_t; + mutex_t mutex; + node_base *node_list; + }; + //! Count of segments in the first block + static size_type const embedded_block = 1; + //! Count of segments in the first block + static size_type const embedded_buckets = 1< my_mask; + //! Segment pointers table. Also prevents false sharing between my_mask and my_size + segments_table_t my_table; + //! Size of container in stored items + atomic my_size; // It must be in separate cache line from my_mask due to performance effects + //! Zero segment + bucket my_embedded_segment[embedded_buckets]; +#if __TBB_STATISTICS + atomic my_info_resizes; // concurrent ones + mutable atomic my_info_restarts; // race collisions + atomic my_info_rehashes; // invocations of rehash_bucket +#endif + //! Constructor + hash_map_base() { + std::memset( this, 0, pointers_per_table*sizeof(segment_ptr_t) // 32*4=128 or 64*8=512 + + sizeof(my_size) + sizeof(my_mask) // 4+4 or 8+8 + + embedded_buckets*sizeof(bucket) ); // n*8 or n*16 + for( size_type i = 0; i < embedded_block; i++ ) // fill the table + my_table[i] = my_embedded_segment + segment_base(i); + my_mask = embedded_buckets - 1; + __TBB_ASSERT( embedded_block <= first_block, "The first block number must include embedded blocks"); +#if __TBB_STATISTICS + my_info_resizes = 0; // concurrent ones + my_info_restarts = 0; // race collisions + my_info_rehashes = 0; // invocations of rehash_bucket +#endif + } + + //! @return segment index of given index in the array + static segment_index_t segment_index_of( size_type index ) { + return segment_index_t( __TBB_Log2( index|1 ) ); + } + + //! @return the first array index of given segment + static segment_index_t segment_base( segment_index_t k ) { + return (segment_index_t(1)<(ptr) > uintptr_t(63); + } + + //! Initialize buckets + static void init_buckets( segment_ptr_t ptr, size_type sz, bool is_initial ) { + if( is_initial ) std::memset(ptr, 0, sz*sizeof(bucket) ); + else for(size_type i = 0; i < sz; i++, ptr++) { + *reinterpret_cast(&ptr->mutex) = 0; + ptr->node_list = rehash_req; + } + } + + //! Add node @arg n to bucket @arg b + static void add_to_bucket( bucket *b, node_base *n ) { + __TBB_ASSERT(b->node_list != rehash_req, NULL); + n->next = b->node_list; + b->node_list = n; // its under lock and flag is set + } + + //! Exception safety helper + struct enable_segment_failsafe : tbb::internal::no_copy { + segment_ptr_t *my_segment_ptr; + enable_segment_failsafe(segments_table_t &table, segment_index_t k) : my_segment_ptr(&table[k]) {} + ~enable_segment_failsafe() { + if( my_segment_ptr ) *my_segment_ptr = 0; // indicate no allocation in progress + } + }; + + //! Enable segment + void enable_segment( segment_index_t k, bool is_initial = false ) { + __TBB_ASSERT( k, "Zero segment must be embedded" ); + enable_segment_failsafe watchdog( my_table, k ); + cache_aligned_allocator alloc; + size_type sz; + __TBB_ASSERT( !is_valid(my_table[k]), "Wrong concurrent assignment"); + if( k >= first_block ) { + sz = segment_size( k ); + segment_ptr_t ptr = alloc.allocate( sz ); + init_buckets( ptr, sz, is_initial ); + itt_hide_store_word( my_table[k], ptr ); + sz <<= 1;// double it to get entire capacity of the container + } else { // the first block + __TBB_ASSERT( k == embedded_block, "Wrong segment index" ); + sz = segment_size( first_block ); + segment_ptr_t ptr = alloc.allocate( sz - embedded_buckets ); + init_buckets( ptr, sz - embedded_buckets, is_initial ); + ptr -= segment_base(embedded_block); + for(segment_index_t i = embedded_block; i < first_block; i++) // calc the offsets + itt_hide_store_word( my_table[i], ptr + segment_base(i) ); + } + itt_store_word_with_release( my_mask, sz-1 ); + watchdog.my_segment_ptr = 0; + } + + //! Get bucket by (masked) hashcode + bucket *get_bucket( hashcode_t h ) const throw() { // TODO: add throw() everywhere? + segment_index_t s = segment_index_of( h ); + h -= segment_base(s); + segment_ptr_t seg = my_table[s]; + __TBB_ASSERT( is_valid(seg), "hashcode must be cut by valid mask for allocated segments" ); + return &seg[h]; + } + + // internal serial rehashing helper + void mark_rehashed_levels( hashcode_t h ) throw () { + segment_index_t s = segment_index_of( h ); + while( segment_ptr_t seg = my_table[++s] ) + if( seg[h].node_list == rehash_req ) { + seg[h].node_list = empty_rehashed; + mark_rehashed_levels( h + ((hashcode_t)1<node_list) != rehash_req ) + { +#if __TBB_STATISTICS + my_info_restarts++; // race collisions +#endif + return true; + } + } + return false; + } + + //! Insert a node and check for load factor. @return segment index to enable. + segment_index_t insert_new_node( bucket *b, node_base *n, hashcode_t mask ) { + size_type sz = ++my_size; // prefix form is to enforce allocation after the first item inserted + add_to_bucket( b, n ); + // check load factor + if( sz >= mask ) { // TODO: add custom load_factor + segment_index_t new_seg = __TBB_Log2( mask+1 ); //optimized segment_index_of + __TBB_ASSERT( is_valid(my_table[new_seg-1]), "new allocations must not publish new mask until segment has allocated"); + if( !itt_hide_load_word(my_table[new_seg]) + && __TBB_CompareAndSwapW(&my_table[new_seg], 2, 0) == 0 ) + return new_seg; // The value must be processed + } + return 0; + } + + //! Prepare enough segments for number of buckets + void reserve(size_type buckets) { + if( !buckets-- ) return; + bool is_initial = !my_size; + for( size_type m = my_mask; buckets > m; m = my_mask ) + enable_segment( segment_index_of( m+1 ), is_initial ); + } + //! Swap hash_map_bases + void internal_swap(hash_map_base &table) { + std::swap(this->my_mask, table.my_mask); + std::swap(this->my_size, table.my_size); + for(size_type i = 0; i < embedded_buckets; i++) + std::swap(this->my_embedded_segment[i].node_list, table.my_embedded_segment[i].node_list); + for(size_type i = embedded_block; i < pointers_per_table; i++) + std::swap(this->my_table[i], table.my_table[i]); + } + }; + + template + class hash_map_range; + + //! Meets requirements of a forward iterator for STL */ + /** Value is either the T or const T type of the container. + @ingroup containers */ + template + class hash_map_iterator + : public std::iterator + { + typedef Container map_type; + typedef typename Container::node node; + typedef hash_map_base::node_base node_base; + typedef hash_map_base::bucket bucket; + + template + friend bool operator==( const hash_map_iterator& i, const hash_map_iterator& j ); + + template + friend bool operator!=( const hash_map_iterator& i, const hash_map_iterator& j ); + + template + friend ptrdiff_t operator-( const hash_map_iterator& i, const hash_map_iterator& j ); + + template + friend class hash_map_iterator; + + template + friend class hash_map_range; + + void advance_to_next_bucket() { // TODO?: refactor to iterator_base class + size_t k = my_index+1; + while( my_bucket && k <= my_map->my_mask ) { + // Following test uses 2's-complement wizardry + if( k& (k-2) ) // not the beginning of a segment + ++my_bucket; + else my_bucket = my_map->get_bucket( k ); + my_node = static_cast( my_bucket->node_list ); + if( hash_map_base::is_valid(my_node) ) { + my_index = k; return; + } + ++k; + } + my_bucket = 0; my_node = 0; my_index = k; // the end + } +#if !defined(_MSC_VER) || defined(__INTEL_COMPILER) + template + friend class interface5::concurrent_hash_map; +#else + public: // workaround +#endif + //! concurrent_hash_map over which we are iterating. + const Container *my_map; + + //! Index in hash table for current item + size_t my_index; + + //! Pointer to bucket + const bucket *my_bucket; + + //! Pointer to node that has current item + node *my_node; + + hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n ); + + public: + //! Construct undefined iterator + hash_map_iterator() {} + hash_map_iterator( const hash_map_iterator &other ) : + my_map(other.my_map), + my_index(other.my_index), + my_bucket(other.my_bucket), + my_node(other.my_node) + {} + Value& operator*() const { + __TBB_ASSERT( hash_map_base::is_valid(my_node), "iterator uninitialized or at end of container?" ); + return my_node->item; + } + Value* operator->() const {return &operator*();} + hash_map_iterator& operator++(); + + //! Post increment + hash_map_iterator operator++(int) { + hash_map_iterator old(*this); + operator++(); + return old; + } + }; + + template + hash_map_iterator::hash_map_iterator( const Container &map, size_t index, const bucket *b, node_base *n ) : + my_map(&map), + my_index(index), + my_bucket(b), + my_node( static_cast(n) ) + { + if( b && !hash_map_base::is_valid(n) ) + advance_to_next_bucket(); + } + + template + hash_map_iterator& hash_map_iterator::operator++() { + my_node = static_cast( my_node->next ); + if( !my_node ) advance_to_next_bucket(); + return *this; + } + + template + bool operator==( const hash_map_iterator& i, const hash_map_iterator& j ) { + return i.my_node == j.my_node && i.my_map == j.my_map; + } + + template + bool operator!=( const hash_map_iterator& i, const hash_map_iterator& j ) { + return i.my_node != j.my_node || i.my_map != j.my_map; + } + + //! Range class used with concurrent_hash_map + /** @ingroup containers */ + template + class hash_map_range { + typedef typename Iterator::map_type map_type; + Iterator my_begin; + Iterator my_end; + mutable Iterator my_midpoint; + size_t my_grainsize; + //! Set my_midpoint to point approximately half way between my_begin and my_end. + void set_midpoint() const; + template friend class hash_map_range; + public: + //! Type for size of a range + typedef std::size_t size_type; + typedef typename Iterator::value_type value_type; + typedef typename Iterator::reference reference; + typedef typename Iterator::difference_type difference_type; + typedef Iterator iterator; + + //! True if range is empty. + bool empty() const {return my_begin==my_end;} + + //! True if range can be partitioned into two subranges. + bool is_divisible() const { + return my_midpoint!=my_end; + } + //! Split range. + hash_map_range( hash_map_range& r, split ) : + my_end(r.my_end), + my_grainsize(r.my_grainsize) + { + r.my_end = my_begin = r.my_midpoint; + __TBB_ASSERT( !empty(), "Splitting despite the range is not divisible" ); + __TBB_ASSERT( !r.empty(), "Splitting despite the range is not divisible" ); + set_midpoint(); + r.set_midpoint(); + } + //! type conversion + template + hash_map_range( hash_map_range& r) : + my_begin(r.my_begin), + my_end(r.my_end), + my_midpoint(r.my_midpoint), + my_grainsize(r.my_grainsize) + {} +#if TBB_DEPRECATED + //! Init range with iterators and grainsize specified + hash_map_range( const Iterator& begin_, const Iterator& end_, size_type grainsize_ = 1 ) : + my_begin(begin_), + my_end(end_), + my_grainsize(grainsize_) + { + if(!my_end.my_index && !my_end.my_bucket) // end + my_end.my_index = my_end.my_map->my_mask + 1; + set_midpoint(); + __TBB_ASSERT( grainsize_>0, "grainsize must be positive" ); + } +#endif + //! Init range with container and grainsize specified + hash_map_range( const map_type &map, size_type grainsize_ = 1 ) : + my_begin( Iterator( map, 0, map.my_embedded_segment, map.my_embedded_segment->node_list ) ), + my_end( Iterator( map, map.my_mask + 1, 0, 0 ) ), + my_grainsize( grainsize_ ) + { + __TBB_ASSERT( grainsize_>0, "grainsize must be positive" ); + set_midpoint(); + } + const Iterator& begin() const {return my_begin;} + const Iterator& end() const {return my_end;} + //! The grain size for this range. + size_type grainsize() const {return my_grainsize;} + }; + + template + void hash_map_range::set_midpoint() const { + // Split by groups of nodes + size_t m = my_end.my_index-my_begin.my_index; + if( m > my_grainsize ) { + m = my_begin.my_index + m/2u; + hash_map_base::bucket *b = my_begin.my_map->get_bucket(m); + my_midpoint = Iterator(*my_begin.my_map,m,b,b->node_list); + } else { + my_midpoint = my_end; + } + __TBB_ASSERT( my_begin.my_index <= my_midpoint.my_index, + "my_begin is after my_midpoint" ); + __TBB_ASSERT( my_midpoint.my_index <= my_end.my_index, + "my_midpoint is after my_end" ); + __TBB_ASSERT( my_begin != my_midpoint || my_begin == my_end, + "[my_begin, my_midpoint) range should not be empty" ); + } + + } // internal +//! @endcond + +//! Unordered map from Key to T. +/** concurrent_hash_map is associative container with concurrent access. + +@par Compatibility + The class meets all Container Requirements from C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). + +@par Exception Safety + - Hash function is not permitted to throw an exception. User-defined types Key and T are forbidden from throwing an exception in destructors. + - If exception happens during insert() operations, it has no effect (unless exception raised by HashCompare::hash() function during grow_segment). + - If exception happens during operator=() operation, the container can have a part of source items, and methods size() and empty() can return wrong results. + +@par Changes since TBB 2.1 + - Replaced internal algorithm and data structure. Patent is pending. + - Added buckets number argument for constructor + +@par Changes since TBB 2.0 + - Fixed exception-safety + - Added template argument for allocator + - Added allocator argument in constructors + - Added constructor from a range of iterators + - Added several new overloaded insert() methods + - Added get_allocator() + - Added swap() + - Added count() + - Added overloaded erase(accessor &) and erase(const_accessor&) + - Added equal_range() [const] + - Added [const_]pointer, [const_]reference, and allocator_type types + - Added global functions: operator==(), operator!=(), and swap() + + @ingroup containers */ +template +class concurrent_hash_map : protected internal::hash_map_base { + template + friend class internal::hash_map_iterator; + + template + friend class internal::hash_map_range; + +public: + typedef Key key_type; + typedef T mapped_type; + typedef std::pair value_type; + typedef hash_map_base::size_type size_type; + typedef ptrdiff_t difference_type; + typedef value_type *pointer; + typedef const value_type *const_pointer; + typedef value_type &reference; + typedef const value_type &const_reference; + typedef internal::hash_map_iterator iterator; + typedef internal::hash_map_iterator const_iterator; + typedef internal::hash_map_range range_type; + typedef internal::hash_map_range const_range_type; + typedef Allocator allocator_type; + +protected: + friend class const_accessor; + struct node; + typedef typename Allocator::template rebind::other node_allocator_type; + node_allocator_type my_allocator; + HashCompare my_hash_compare; + + struct node : public node_base { + value_type item; + node( const Key &key ) : item(key, T()) {} + node( const Key &key, const T &t ) : item(key, t) {} + // exception-safe allocation, see C++ Standard 2003, clause 5.3.4p17 + void *operator new( size_t /*size*/, node_allocator_type &a ) { + void *ptr = a.allocate(1); + if(!ptr) + tbb::internal::throw_exception(tbb::internal::eid_bad_alloc); + return ptr; + } + // match placement-new form above to be called if exception thrown in constructor + void operator delete( void *ptr, node_allocator_type &a ) { a.deallocate(static_cast(ptr),1); } + }; + + void delete_node( node_base *n ) { + my_allocator.destroy( static_cast(n) ); + my_allocator.deallocate( static_cast(n), 1); + } + + node *search_bucket( const key_type &key, bucket *b ) const { + node *n = static_cast( b->node_list ); + while( is_valid(n) && !my_hash_compare.equal(key, n->item.first) ) + n = static_cast( n->next ); + __TBB_ASSERT(n != internal::rehash_req, "Search can be executed only for rehashed bucket"); + return n; + } + + //! bucket accessor is to find, rehash, acquire a lock, and access a bucket + class bucket_accessor : public bucket::scoped_t { + bucket *my_b; + public: + bucket_accessor( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) { acquire( base, h, writer ); } + //! find a bucket by masked hashcode, optionally rehash, and acquire the lock + inline void acquire( concurrent_hash_map *base, const hashcode_t h, bool writer = false ) { + my_b = base->get_bucket( h ); + // TODO: actually, notification is unnecessary here, just hiding double-check + if( itt_load_word_with_acquire(my_b->node_list) == internal::rehash_req + && try_acquire( my_b->mutex, /*write=*/true ) ) + { + if( my_b->node_list == internal::rehash_req ) base->rehash_bucket( my_b, h ); //recursive rehashing + } + else bucket::scoped_t::acquire( my_b->mutex, writer ); + __TBB_ASSERT( my_b->node_list != internal::rehash_req, NULL); + } + //! check whether bucket is locked for write + bool is_writer() { return bucket::scoped_t::is_writer; } + //! get bucket pointer + bucket *operator() () { return my_b; } + }; + + // TODO refactor to hash_base + void rehash_bucket( bucket *b_new, const hashcode_t h ) { + __TBB_ASSERT( *(intptr_t*)(&b_new->mutex), "b_new must be locked (for write)"); + __TBB_ASSERT( h > 1, "The lowermost buckets can't be rehashed" ); + __TBB_store_with_release(b_new->node_list, internal::empty_rehashed); // mark rehashed + hashcode_t mask = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit +#if __TBB_STATISTICS + my_info_rehashes++; // invocations of rehash_bucket +#endif + + bucket_accessor b_old( this, h & mask ); + + mask = (mask<<1) | 1; // get full mask for new bucket + __TBB_ASSERT( (mask&(mask+1))==0 && (h & mask) == h, NULL ); + restart: + for( node_base **p = &b_old()->node_list, *n = __TBB_load_with_acquire(*p); is_valid(n); n = *p ) { + hashcode_t c = my_hash_compare.hash( static_cast(n)->item.first ); +#if TBB_USE_ASSERT + hashcode_t bmask = h & (mask>>1); + bmask = bmask==0? 1 : ( 1u<<(__TBB_Log2( bmask )+1 ) ) - 1; // minimal mask of parent bucket + __TBB_ASSERT( (c & bmask) == (h & bmask), "hash() function changed for key in table" ); +#endif + if( (c & mask) == h ) { + if( !b_old.is_writer() ) + if( !b_old.upgrade_to_writer() ) { + goto restart; // node ptr can be invalid due to concurrent erase + } + *p = n->next; // exclude from b_old + add_to_bucket( b_new, n ); + } else p = &n->next; // iterate to next item + } + } + +public: + + class accessor; + //! Combines data access, locking, and garbage collection. + class const_accessor : private node::scoped_t /*which derived from no_copy*/ { + friend class concurrent_hash_map; + friend class accessor; + public: + //! Type of value + typedef const typename concurrent_hash_map::value_type value_type; + + //! True if result is empty. + bool empty() const {return !my_node;} + + //! Set to null + void release() { + if( my_node ) { + node::scoped_t::release(); + my_node = 0; + } + } + + //! Return reference to associated value in hash table. + const_reference operator*() const { + __TBB_ASSERT( my_node, "attempt to dereference empty accessor" ); + return my_node->item; + } + + //! Return pointer to associated value in hash table. + const_pointer operator->() const { + return &operator*(); + } + + //! Create empty result + const_accessor() : my_node(NULL) {} + + //! Destroy result after releasing the underlying reference. + ~const_accessor() { + my_node = NULL; // scoped lock's release() is called in its destructor + } + protected: + bool is_writer() { return node::scoped_t::is_writer; } + node *my_node; + hashcode_t my_hash; + }; + + //! Allows write access to elements and combines data access, locking, and garbage collection. + class accessor: public const_accessor { + public: + //! Type of value + typedef typename concurrent_hash_map::value_type value_type; + + //! Return reference to associated value in hash table. + reference operator*() const { + __TBB_ASSERT( this->my_node, "attempt to dereference empty accessor" ); + return this->my_node->item; + } + + //! Return pointer to associated value in hash table. + pointer operator->() const { + return &operator*(); + } + }; + + //! Construct empty table. + concurrent_hash_map(const allocator_type &a = allocator_type()) + : internal::hash_map_base(), my_allocator(a) + {} + + //! Construct empty table with n preallocated buckets. This number serves also as initial concurrency level. + concurrent_hash_map(size_type n, const allocator_type &a = allocator_type()) + : my_allocator(a) + { + reserve( n ); + } + + //! Copy constructor + concurrent_hash_map( const concurrent_hash_map& table, const allocator_type &a = allocator_type()) + : internal::hash_map_base(), my_allocator(a) + { + internal_copy(table); + } + + //! Construction with copying iteration range and given allocator instance + template + concurrent_hash_map(I first, I last, const allocator_type &a = allocator_type()) + : my_allocator(a) + { + reserve( std::distance(first, last) ); // TODO: load_factor? + internal_copy(first, last); + } + + //! Assignment + concurrent_hash_map& operator=( const concurrent_hash_map& table ) { + if( this!=&table ) { + clear(); + internal_copy(table); + } + return *this; + } + + + //! Rehashes and optionally resizes the whole table. + /** Useful to optimize performance before or after concurrent operations. + Also enables using of find() and count() concurrent methods in serial context. */ + void rehash(size_type n = 0); + + //! Clear table + void clear(); + + //! Clear table and destroy it. + ~concurrent_hash_map() { clear(); } + + //------------------------------------------------------------------------ + // Parallel algorithm support + //------------------------------------------------------------------------ + range_type range( size_type grainsize=1 ) { + return range_type( *this, grainsize ); + } + const_range_type range( size_type grainsize=1 ) const { + return const_range_type( *this, grainsize ); + } + + //------------------------------------------------------------------------ + // STL support - not thread-safe methods + //------------------------------------------------------------------------ + iterator begin() {return iterator(*this,0,my_embedded_segment,my_embedded_segment->node_list);} + iterator end() {return iterator(*this,0,0,0);} + const_iterator begin() const {return const_iterator(*this,0,my_embedded_segment,my_embedded_segment->node_list);} + const_iterator end() const {return const_iterator(*this,0,0,0);} + std::pair equal_range( const Key& key ) { return internal_equal_range(key, end()); } + std::pair equal_range( const Key& key ) const { return internal_equal_range(key, end()); } + + //! Number of items in table. + size_type size() const { return my_size; } + + //! True if size()==0. + bool empty() const { return my_size == 0; } + + //! Upper bound on size. + size_type max_size() const {return (~size_type(0))/sizeof(node);} + + //! Returns the current number of buckets + size_type bucket_count() const { return my_mask+1; } + + //! return allocator object + allocator_type get_allocator() const { return this->my_allocator; } + + //! swap two instances. Iterators are invalidated + void swap(concurrent_hash_map &table); + + //------------------------------------------------------------------------ + // concurrent map operations + //------------------------------------------------------------------------ + + //! Return count of items (0 or 1) + size_type count( const Key &key ) const { + return const_cast(this)->lookup(/*insert*/false, key, NULL, NULL, /*write=*/false ); + } + + //! Find item and acquire a read lock on the item. + /** Return true if item is found, false otherwise. */ + bool find( const_accessor &result, const Key &key ) const { + result.release(); + return const_cast(this)->lookup(/*insert*/false, key, NULL, &result, /*write=*/false ); + } + + //! Find item and acquire a write lock on the item. + /** Return true if item is found, false otherwise. */ + bool find( accessor &result, const Key &key ) { + result.release(); + return lookup(/*insert*/false, key, NULL, &result, /*write=*/true ); + } + + //! Insert item (if not already present) and acquire a read lock on the item. + /** Returns true if item is new. */ + bool insert( const_accessor &result, const Key &key ) { + result.release(); + return lookup(/*insert*/true, key, NULL, &result, /*write=*/false ); + } + + //! Insert item (if not already present) and acquire a write lock on the item. + /** Returns true if item is new. */ + bool insert( accessor &result, const Key &key ) { + result.release(); + return lookup(/*insert*/true, key, NULL, &result, /*write=*/true ); + } + + //! Insert item by copying if there is no such key present already and acquire a read lock on the item. + /** Returns true if item is new. */ + bool insert( const_accessor &result, const value_type &value ) { + result.release(); + return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/false ); + } + + //! Insert item by copying if there is no such key present already and acquire a write lock on the item. + /** Returns true if item is new. */ + bool insert( accessor &result, const value_type &value ) { + result.release(); + return lookup(/*insert*/true, value.first, &value.second, &result, /*write=*/true ); + } + + //! Insert item by copying if there is no such key present already + /** Returns true if item is inserted. */ + bool insert( const value_type &value ) { + return lookup(/*insert*/true, value.first, &value.second, NULL, /*write=*/false ); + } + + //! Insert range [first, last) + template + void insert(I first, I last) { + for(; first != last; ++first) + insert( *first ); + } + + //! Erase item. + /** Return true if item was erased by particularly this call. */ + bool erase( const Key& key ); + + //! Erase item by const_accessor. + /** Return true if item was erased by particularly this call. */ + bool erase( const_accessor& item_accessor ) { + return exclude( item_accessor ); + } + + //! Erase item by accessor. + /** Return true if item was erased by particularly this call. */ + bool erase( accessor& item_accessor ) { + return exclude( item_accessor ); + } + +protected: + //! Insert or find item and optionally acquire a lock on the item. + bool lookup( bool op_insert, const Key &key, const T *t, const_accessor *result, bool write ); + + //! delete item by accessor + bool exclude( const_accessor &item_accessor ); + + //! Returns an iterator for an item defined by the key, or for the next item after it (if upper==true) + template + std::pair internal_equal_range( const Key& key, I end ) const; + + //! Copy "source" to *this, where *this must start out empty. + void internal_copy( const concurrent_hash_map& source ); + + template + void internal_copy(I first, I last); + + //! Fast find when no concurrent erasure is used. For internal use inside TBB only! + /** Return pointer to item with given key, or NULL if no such item exists. + Must not be called concurrently with erasure operations. */ + const_pointer internal_fast_find( const Key& key ) const { + hashcode_t h = my_hash_compare.hash( key ); + hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); + node *n; + restart: + __TBB_ASSERT((m&(m+1))==0, NULL); + bucket *b = get_bucket( h & m ); + // TODO: actually, notification is unnecessary here, just hiding double-check + if( itt_load_word_with_acquire(b->node_list) == internal::rehash_req ) + { + bucket::scoped_t lock; + if( lock.try_acquire( b->mutex, /*write=*/true ) ) { + if( b->node_list == internal::rehash_req) + const_cast(this)->rehash_bucket( b, h & m ); //recursive rehashing + } + else lock.acquire( b->mutex, /*write=*/false ); + __TBB_ASSERT(b->node_list!=internal::rehash_req,NULL); + } + n = search_bucket( key, b ); + if( n ) + return &n->item; + else if( check_mask_race( h, m ) ) + goto restart; + return 0; + } +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress "conditional expression is constant" warning. + #pragma warning( push ) + #pragma warning( disable: 4127 ) +#endif + +template +bool concurrent_hash_map::lookup( bool op_insert, const Key &key, const T *t, const_accessor *result, bool write ) { + __TBB_ASSERT( !result || !result->my_node, NULL ); + bool return_value; + hashcode_t const h = my_hash_compare.hash( key ); + hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); + segment_index_t grow_segment = 0; + node *n, *tmp_n = 0; + restart: + {//lock scope + __TBB_ASSERT((m&(m+1))==0, NULL); + return_value = false; + // get bucket + bucket_accessor b( this, h & m ); + + // find a node + n = search_bucket( key, b() ); + if( op_insert ) { + // [opt] insert a key + if( !n ) { + if( !tmp_n ) { + if(t) tmp_n = new( my_allocator ) node(key, *t); + else tmp_n = new( my_allocator ) node(key); + } + if( !b.is_writer() && !b.upgrade_to_writer() ) { // TODO: improved insertion + // Rerun search_list, in case another thread inserted the item during the upgrade. + n = search_bucket( key, b() ); + if( is_valid(n) ) { // unfortunately, it did + b.downgrade_to_reader(); + goto exists; + } + } + if( check_mask_race(h, m) ) + goto restart; // b.release() is done in ~b(). + // insert and set flag to grow the container + grow_segment = insert_new_node( b(), n = tmp_n, m ); + tmp_n = 0; + return_value = true; + } + } else { // find or count + if( !n ) { + if( check_mask_race( h, m ) ) + goto restart; // b.release() is done in ~b(). TODO: replace by continue + return false; + } + return_value = true; + } + exists: + if( !result ) goto check_growth; + // TODO: the following seems as generic/regular operation + // acquire the item + if( !result->try_acquire( n->mutex, write ) ) { + // we are unlucky, prepare for longer wait + tbb::internal::atomic_backoff trials; + do { + if( !trials.bounded_pause() ) { + // the wait takes really long, restart the operation + b.release(); + __TBB_ASSERT( !op_insert || !return_value, "Can't acquire new item in locked bucket?" ); + __TBB_Yield(); + m = (hashcode_t) itt_load_word_with_acquire( my_mask ); + goto restart; + } + } while( !result->try_acquire( n->mutex, write ) ); + } + }//lock scope + result->my_node = n; + result->my_hash = h; +check_growth: + // [opt] grow the container + if( grow_segment ) { +#if __TBB_STATISTICS + my_info_resizes++; // concurrent ones +#endif + enable_segment( grow_segment ); + } + if( tmp_n ) // if op_insert only + delete_node( tmp_n ); + return return_value; +} + +template +template +std::pair concurrent_hash_map::internal_equal_range( const Key& key, I end_ ) const { + hashcode_t h = my_hash_compare.hash( key ); + hashcode_t m = my_mask; + __TBB_ASSERT((m&(m+1))==0, NULL); + h &= m; + bucket *b = get_bucket( h ); + while( b->node_list == internal::rehash_req ) { + m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit + b = get_bucket( h &= m ); + } + node *n = search_bucket( key, b ); + if( !n ) + return std::make_pair(end_, end_); + iterator lower(*this, h, b, n), upper(lower); + return std::make_pair(lower, ++upper); +} + +template +bool concurrent_hash_map::exclude( const_accessor &item_accessor ) { + __TBB_ASSERT( item_accessor.my_node, NULL ); + node_base *const n = item_accessor.my_node; + hashcode_t const h = item_accessor.my_hash; + hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); + do { + // get bucket + bucket_accessor b( this, h & m, /*writer=*/true ); + node_base **p = &b()->node_list; + while( *p && *p != n ) + p = &(*p)->next; + if( !*p ) { // someone else was first + if( check_mask_race( h, m ) ) + continue; + item_accessor.release(); + return false; + } + __TBB_ASSERT( *p == n, NULL ); + *p = n->next; // remove from container + my_size--; + break; + } while(true); + if( !item_accessor.is_writer() ) // need to get exclusive lock + item_accessor.upgrade_to_writer(); // return value means nothing here + item_accessor.release(); + delete_node( n ); // Only one thread can delete it + return true; +} + +template +bool concurrent_hash_map::erase( const Key &key ) { + node_base *n; + hashcode_t const h = my_hash_compare.hash( key ); + hashcode_t m = (hashcode_t) itt_load_word_with_acquire( my_mask ); +restart: + {//lock scope + // get bucket + bucket_accessor b( this, h & m ); + search: + node_base **p = &b()->node_list; + n = *p; + while( is_valid(n) && !my_hash_compare.equal(key, static_cast(n)->item.first ) ) { + p = &n->next; + n = *p; + } + if( !n ) { // not found, but mask could be changed + if( check_mask_race( h, m ) ) + goto restart; + return false; + } + else if( !b.is_writer() && !b.upgrade_to_writer() ) { + if( check_mask_race( h, m ) ) // contended upgrade, check mask + goto restart; + goto search; + } + *p = n->next; + my_size--; + } + { + typename node::scoped_t item_locker( n->mutex, /*write=*/true ); + } + // note: there should be no threads pretending to acquire this mutex again, do not try to upgrade const_accessor! + delete_node( n ); // Only one thread can delete it due to write lock on the bucket + return true; +} + +template +void concurrent_hash_map::swap(concurrent_hash_map &table) { + std::swap(this->my_allocator, table.my_allocator); + std::swap(this->my_hash_compare, table.my_hash_compare); + internal_swap(table); +} + +template +void concurrent_hash_map::rehash(size_type sz) { + reserve( sz ); // TODO: add reduction of number of buckets as well + hashcode_t mask = my_mask; + hashcode_t b = (mask+1)>>1; // size or first index of the last segment + __TBB_ASSERT((b&(b-1))==0, NULL); // zero or power of 2 + bucket *bp = get_bucket( b ); // only the last segment should be scanned for rehashing + for(; b <= mask; b++, bp++ ) { + node_base *n = bp->node_list; + __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed || n == internal::rehash_req, "Broken internal structure" ); + __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during rehash() execution" ); + if( n == internal::rehash_req ) { // rehash bucket, conditional because rehashing of a previous bucket may affect this one + hashcode_t h = b; bucket *b_old = bp; + do { + __TBB_ASSERT( h > 1, "The lowermost buckets can't be rehashed" ); + hashcode_t m = ( 1u<<__TBB_Log2( h ) ) - 1; // get parent mask from the topmost bit + b_old = get_bucket( h &= m ); + } while( b_old->node_list == internal::rehash_req ); + // now h - is index of the root rehashed bucket b_old + mark_rehashed_levels( h ); // mark all non-rehashed children recursively across all segments + for( node_base **p = &b_old->node_list, *q = *p; is_valid(q); q = *p ) { + hashcode_t c = my_hash_compare.hash( static_cast(q)->item.first ); + if( (c & mask) != h ) { // should be rehashed + *p = q->next; // exclude from b_old + bucket *b_new = get_bucket( c & mask ); + __TBB_ASSERT( b_new->node_list != internal::rehash_req, "hash() function changed for key in table or internal error" ); + add_to_bucket( b_new, q ); + } else p = &q->next; // iterate to next item + } + } + } +#if TBB_USE_PERFORMANCE_WARNINGS + int current_size = int(my_size), buckets = int(mask)+1, empty_buckets = 0, overpopulated_buckets = 0; // usage statistics + static bool reported = false; +#endif +#if TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS + for( b = 0; b <= mask; b++ ) {// only last segment should be scanned for rehashing + if( b & (b-2) ) ++bp; // not the beginning of a segment + else bp = get_bucket( b ); + node_base *n = bp->node_list; + __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during rehash() execution" ); + __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed, "Broken internal structure" ); +#if TBB_USE_PERFORMANCE_WARNINGS + if( n == internal::empty_rehashed ) empty_buckets++; + else if( n->next ) overpopulated_buckets++; +#endif +#if TBB_USE_ASSERT + for( ; is_valid(n); n = n->next ) { + hashcode_t h = my_hash_compare.hash( static_cast(n)->item.first ) & mask; + __TBB_ASSERT( h == b, "hash() function changed for key in table or internal error" ); + } +#endif + } +#endif // TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS +#if TBB_USE_PERFORMANCE_WARNINGS + if( buckets > current_size) empty_buckets -= buckets - current_size; + else overpopulated_buckets -= current_size - buckets; // TODO: load_factor? + if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { + tbb::internal::runtime_warning( + "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", + typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); + reported = true; + } +#endif +} + +template +void concurrent_hash_map::clear() { + hashcode_t m = my_mask; + __TBB_ASSERT((m&(m+1))==0, NULL); +#if TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS +#if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS + int current_size = int(my_size), buckets = int(m)+1, empty_buckets = 0, overpopulated_buckets = 0; // usage statistics + static bool reported = false; +#endif + bucket *bp = 0; + // check consistency + for( segment_index_t b = 0; b <= m; b++ ) { + if( b & (b-2) ) ++bp; // not the beginning of a segment + else bp = get_bucket( b ); + node_base *n = bp->node_list; + __TBB_ASSERT( is_valid(n) || n == internal::empty_rehashed || n == internal::rehash_req, "Broken internal structure" ); + __TBB_ASSERT( *reinterpret_cast(&bp->mutex) == 0, "concurrent or unexpectedly terminated operation during clear() execution" ); +#if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS + if( n == internal::empty_rehashed ) empty_buckets++; + else if( n == internal::rehash_req ) buckets--; + else if( n->next ) overpopulated_buckets++; +#endif +#if __TBB_EXTRA_DEBUG + for(; is_valid(n); n = n->next ) { + hashcode_t h = my_hash_compare.hash( static_cast(n)->item.first ); + h &= m; + __TBB_ASSERT( h == b || get_bucket(h)->node_list == internal::rehash_req, "hash() function changed for key in table or internal error" ); + } +#endif + } +#if TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS +#if __TBB_STATISTICS + printf( "items=%d buckets: capacity=%d rehashed=%d empty=%d overpopulated=%d" + " concurrent: resizes=%u rehashes=%u restarts=%u\n", + current_size, int(m+1), buckets, empty_buckets, overpopulated_buckets, + unsigned(my_info_resizes), unsigned(my_info_rehashes), unsigned(my_info_restarts) ); + my_info_resizes = 0; // concurrent ones + my_info_restarts = 0; // race collisions + my_info_rehashes = 0; // invocations of rehash_bucket +#endif + if( buckets > current_size) empty_buckets -= buckets - current_size; + else overpopulated_buckets -= current_size - buckets; // TODO: load_factor? + if( !reported && buckets >= 512 && ( 2*empty_buckets > current_size || 2*overpopulated_buckets > current_size ) ) { + tbb::internal::runtime_warning( + "Performance is not optimal because the hash function produces bad randomness in lower bits in %s.\nSize: %d Empties: %d Overlaps: %d", + typeid(*this).name(), current_size, empty_buckets, overpopulated_buckets ); + reported = true; + } +#endif +#endif//TBB_USE_ASSERT || TBB_USE_PERFORMANCE_WARNINGS || __TBB_STATISTICS + my_size = 0; + segment_index_t s = segment_index_of( m ); + __TBB_ASSERT( s+1 == pointers_per_table || !my_table[s+1], "wrong mask or concurrent grow" ); + cache_aligned_allocator alloc; + do { + __TBB_ASSERT( is_valid( my_table[s] ), "wrong mask or concurrent grow" ); + segment_ptr_t buckets_ptr = my_table[s]; + size_type sz = segment_size( s ? s : 1 ); + for( segment_index_t i = 0; i < sz; i++ ) + for( node_base *n = buckets_ptr[i].node_list; is_valid(n); n = buckets_ptr[i].node_list ) { + buckets_ptr[i].node_list = n->next; + delete_node( n ); + } + if( s >= first_block) // the first segment or the next + alloc.deallocate( buckets_ptr, sz ); + else if( s == embedded_block && embedded_block != first_block ) + alloc.deallocate( buckets_ptr, segment_size(first_block)-embedded_buckets ); + if( s >= embedded_block ) my_table[s] = 0; + } while(s-- > 0); + my_mask = embedded_buckets - 1; +} + +template +void concurrent_hash_map::internal_copy( const concurrent_hash_map& source ) { + reserve( source.my_size ); // TODO: load_factor? + hashcode_t mask = source.my_mask; + if( my_mask == mask ) { // optimized version + bucket *dst = 0, *src = 0; + bool rehash_required = false; + for( hashcode_t k = 0; k <= mask; k++ ) { + if( k & (k-2) ) ++dst,src++; // not the beginning of a segment + else { dst = get_bucket( k ); src = source.get_bucket( k ); } + __TBB_ASSERT( dst->node_list != internal::rehash_req, "Invalid bucket in destination table"); + node *n = static_cast( src->node_list ); + if( n == internal::rehash_req ) { // source is not rehashed, items are in previous buckets + rehash_required = true; + dst->node_list = internal::rehash_req; + } else for(; n; n = static_cast( n->next ) ) { + add_to_bucket( dst, new( my_allocator ) node(n->item.first, n->item.second) ); + ++my_size; // TODO: replace by non-atomic op + } + } + if( rehash_required ) rehash(); + } else internal_copy( source.begin(), source.end() ); +} + +template +template +void concurrent_hash_map::internal_copy(I first, I last) { + hashcode_t m = my_mask; + for(; first != last; ++first) { + hashcode_t h = my_hash_compare.hash( first->first ); + bucket *b = get_bucket( h & m ); + __TBB_ASSERT( b->node_list != internal::rehash_req, "Invalid bucket in destination table"); + node *n = new( my_allocator ) node(first->first, first->second); + add_to_bucket( b, n ); + ++my_size; // TODO: replace by non-atomic op + } +} + +} // namespace interface5 + +using interface5::concurrent_hash_map; + + +template +inline bool operator==(const concurrent_hash_map &a, const concurrent_hash_map &b) { + if(a.size() != b.size()) return false; + typename concurrent_hash_map::const_iterator i(a.begin()), i_end(a.end()); + typename concurrent_hash_map::const_iterator j, j_end(b.end()); + for(; i != i_end; ++i) { + j = b.equal_range(i->first).first; + if( j == j_end || !(i->second == j->second) ) return false; + } + return true; +} + +template +inline bool operator!=(const concurrent_hash_map &a, const concurrent_hash_map &b) +{ return !(a == b); } + +template +inline void swap(concurrent_hash_map &a, concurrent_hash_map &b) +{ a.swap( b ); } + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning( pop ) +#endif // warning 4127 is back + +} // namespace tbb + +#endif /* __TBB_concurrent_hash_map_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_lru_cache.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_lru_cache.h new file mode 100644 index 0000000000..f6258d1bc9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_lru_cache.h @@ -0,0 +1,243 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_lru_cache_H +#define __TBB_concurrent_lru_cache_H + +#if ! TBB_PREVIEW_CONCURRENT_LRU_CACHE + #error Set TBB_PREVIEW_CONCURRENT_LRU_CACHE to include concurrent_lru_cache.h +#endif + +#include +#include + +#include "tbb_stddef.h" +#include "atomic.h" +#include "internal/_aggregator_impl.h" + +namespace tbb{ +namespace interface6 { + + +template +class concurrent_lru_cache : internal::no_assign{ +private: + typedef concurrent_lru_cache self_type; + typedef value_functor_type value_function_type; + typedef std::size_t ref_counter_type; + struct map_value_type; + typedef std::map map_storage_type; + typedef std::list lru_list_type; + struct map_value_type { + value_type my_value; + ref_counter_type my_ref_counter; + typename lru_list_type::iterator my_lru_list_iterator; + bool my_is_ready; + + map_value_type (value_type const& a_value, ref_counter_type a_ref_counter, typename lru_list_type::iterator a_lru_list_iterator, bool a_is_ready) + : my_value(a_value), my_ref_counter(a_ref_counter), my_lru_list_iterator (a_lru_list_iterator), my_is_ready(a_is_ready) + {} + }; + + class handle_object; + + struct aggregator_operation; + typedef aggregator_operation aggregated_operation_type; + typedef tbb::internal::aggregating_functor aggregator_function_type; + friend class tbb::internal::aggregating_functor; + typedef tbb::internal::aggregator aggregator_type; + +private: + value_function_type my_value_function; + std::size_t const my_number_of_lru_history_items; + map_storage_type my_map_storage; + lru_list_type my_lru_list; + aggregator_type my_aggregator; + +public: + typedef handle_object handle; + +public: + concurrent_lru_cache(value_function_type f, std::size_t number_of_lru_history_items) + : my_value_function(f),my_number_of_lru_history_items(number_of_lru_history_items) + { + my_aggregator.initialize_handler(aggregator_function_type(this)); + } + + handle_object operator[](key_type k){ + retrieve_aggregator_operation op(k); + my_aggregator.execute(&op); + if (op.is_new_value_needed()){ + op.result().second.my_value = my_value_function(k); + __TBB_store_with_release(op.result().second.my_is_ready, true); + }else{ + tbb::internal::spin_wait_while_eq(op.result().second.my_is_ready,false); + } + return handle_object(*this,op.result()); + } +private: + void signal_end_of_usage(typename map_storage_type::reference value_ref){ + signal_end_of_usage_aggregator_operation op(value_ref); + my_aggregator.execute(&op); + } + +private: + struct handle_move_t:no_assign{ + concurrent_lru_cache & my_cache_ref; + typename map_storage_type::reference my_map_record_ref; + handle_move_t(concurrent_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_ref(cache_ref),my_map_record_ref(value_ref) {}; + }; + class handle_object { + concurrent_lru_cache * my_cache_pointer; + typename map_storage_type::reference my_map_record_ref; + public: + handle_object(concurrent_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_pointer(&cache_ref), my_map_record_ref(value_ref) {} + handle_object(handle_move_t m):my_cache_pointer(&m.my_cache_ref), my_map_record_ref(m.my_map_record_ref){} + operator handle_move_t(){ return move(*this);} + value_type& value(){ + __TBB_ASSERT(my_cache_pointer,"get value from moved from object?"); + return my_map_record_ref.second.my_value; + } + ~handle_object(){ + if (my_cache_pointer){ + my_cache_pointer->signal_end_of_usage(my_map_record_ref); + } + } + private: + friend handle_move_t move(handle_object& h){ + return handle_object::move(h); + } + static handle_move_t move(handle_object& h){ + __TBB_ASSERT(h.my_cache_pointer,"move from the same object twice ?"); + concurrent_lru_cache * cache_pointer = NULL; + std::swap(cache_pointer,h.my_cache_pointer); + return handle_move_t(*cache_pointer,h.my_map_record_ref); + } + private: + void operator=(handle_object&); +#if __SUNPRO_CC + // Presumably due to a compiler error, private copy constructor + // breaks expressions like handle h = cache[key]; + public: +#endif + handle_object(handle_object &); + }; +private: + //TODO: looks like aggregator_operation is a perfect match for statically typed variant type + struct aggregator_operation : tbb::internal::aggregated_operation{ + enum e_op_type {op_retive, op_signal_end_of_usage}; + //TODO: try to use pointer to function apply_visitor here + //TODO: try virtual functions and measure the difference + e_op_type my_operation_type; + aggregator_operation(e_op_type operation_type): my_operation_type(operation_type) {} + void cast_and_handle(self_type& container ){ + if (my_operation_type==op_retive){ + static_cast(this)->handle(container); + }else{ + static_cast(this)->handle(container); + } + } + }; + struct retrieve_aggregator_operation : aggregator_operation, private internal::no_assign { + key_type my_key; + typename map_storage_type::pointer my_result_map_record_pointer; + bool my_is_new_value_needed; + retrieve_aggregator_operation(key_type key):aggregator_operation(aggregator_operation::op_retive),my_key(key),my_is_new_value_needed(false){} + void handle(self_type& container ){ + my_result_map_record_pointer = & container.retrieve_serial(my_key,my_is_new_value_needed); + } + typename map_storage_type::reference result(){ return * my_result_map_record_pointer; } + bool is_new_value_needed(){return my_is_new_value_needed;} + }; + struct signal_end_of_usage_aggregator_operation : aggregator_operation, private internal::no_assign { + typename map_storage_type::reference my_map_record_ref; + signal_end_of_usage_aggregator_operation(typename map_storage_type::reference map_record_ref):aggregator_operation(aggregator_operation::op_signal_end_of_usage),my_map_record_ref(map_record_ref){} + void handle(self_type& container ){ + container.signal_end_of_usage_serial(my_map_record_ref); + } + }; + +private: + void handle_operations(aggregator_operation* op_list){ + while(op_list){ + op_list->cast_and_handle(*this); + aggregator_operation* tmp = op_list; + op_list=op_list->next; + tbb::internal::itt_store_word_with_release(tmp->status, uintptr_t(1)); + } + } + +private: + typename map_storage_type::reference retrieve_serial(key_type k, bool& is_new_value_needed){ + typename map_storage_type::iterator it = my_map_storage.find(k); + if (it == my_map_storage.end()){ + it = my_map_storage.insert(it,std::make_pair(k,map_value_type(value_type(),0,my_lru_list.end(),false))); + is_new_value_needed = true; + }else { + typename lru_list_type::iterator list_it = it->second.my_lru_list_iterator; + if (list_it!=my_lru_list.end()) { + __TBB_ASSERT(!it->second.my_ref_counter,"item to be evicted should not have a live references"); + //item is going to be used. Therefore it is not a subject for eviction + //so - remove it from LRU history. + my_lru_list.erase(list_it); + it->second.my_lru_list_iterator= my_lru_list.end(); + } + } + ++(it->second.my_ref_counter); + return *it; + } + + void signal_end_of_usage_serial(typename map_storage_type::reference map_record_ref){ + typename map_storage_type::iterator it = my_map_storage.find(map_record_ref.first); + __TBB_ASSERT(it!=my_map_storage.end(),"cache should not return past-end iterators to outer world"); + __TBB_ASSERT(&(*it) == &map_record_ref,"dangling reference has been returned to outside world? data race ?"); + __TBB_ASSERT( my_lru_list.end()== std::find(my_lru_list.begin(),my_lru_list.end(),it), + "object in use should not be in list of unused objects "); + if (! --(it->second.my_ref_counter)){ + //it was the last reference so put it to the LRU history + if (my_lru_list.size()>=my_number_of_lru_history_items){ + //evict items in order to get a space + size_t number_of_elements_to_evict = 1 + my_lru_list.size() - my_number_of_lru_history_items; + for (size_t i=0; isecond.my_ref_counter,"item to be evicted should not have a live references"); + my_lru_list.pop_back(); + my_map_storage.erase(it_to_evict); + } + } + my_lru_list.push_front(it); + it->second.my_lru_list_iterator = my_lru_list.begin(); + } + } +}; +} // namespace interface6 + +using interface6::concurrent_lru_cache; + +} // namespace tbb +#endif //__TBB_concurrent_lru_cache_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_priority_queue.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_priority_queue.h new file mode 100644 index 0000000000..cc7668dcde --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_priority_queue.h @@ -0,0 +1,353 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_priority_queue_H +#define __TBB_concurrent_priority_queue_H + +#include "atomic.h" +#include "cache_aligned_allocator.h" +#include "tbb_exception.h" +#include "tbb_stddef.h" +#include "tbb_profiling.h" +#include "internal/_aggregator_impl.h" +#include +#include +#include + +namespace tbb { +namespace interface5 { + +using namespace tbb::internal; + +//! Concurrent priority queue +template , typename A=cache_aligned_allocator > +class concurrent_priority_queue { + public: + //! Element type in the queue. + typedef T value_type; + + //! Reference type + typedef T& reference; + + //! Const reference type + typedef const T& const_reference; + + //! Integral type for representing size of the queue. + typedef size_t size_type; + + //! Difference type for iterator + typedef ptrdiff_t difference_type; + + //! Allocator type + typedef A allocator_type; + + //! Constructs a new concurrent_priority_queue with default capacity + explicit concurrent_priority_queue(const allocator_type& a = allocator_type()) : mark(0), my_size(0), data(a) + { + my_aggregator.initialize_handler(my_functor_t(this)); + } + + //! Constructs a new concurrent_priority_queue with init_sz capacity + explicit concurrent_priority_queue(size_type init_capacity, const allocator_type& a = allocator_type()) : + mark(0), my_size(0), data(a) + { + data.reserve(init_capacity); + my_aggregator.initialize_handler(my_functor_t(this)); + } + + //! [begin,end) constructor + template + concurrent_priority_queue(InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : + data(begin, end, a) + { + mark = 0; + my_aggregator.initialize_handler(my_functor_t(this)); + heapify(); + my_size = data.size(); + } + + //! Copy constructor + /** This operation is unsafe if there are pending concurrent operations on the src queue. */ + explicit concurrent_priority_queue(const concurrent_priority_queue& src) : mark(src.mark), + my_size(src.my_size), data(src.data.begin(), src.data.end(), src.data.get_allocator()) + { + my_aggregator.initialize_handler(my_functor_t(this)); + heapify(); + } + + //! Copy constructor with specific allocator + /** This operation is unsafe if there are pending concurrent operations on the src queue. */ + concurrent_priority_queue(const concurrent_priority_queue& src, const allocator_type& a) : mark(src.mark), + my_size(src.my_size), data(src.data.begin(), src.data.end(), a) + { + my_aggregator.initialize_handler(my_functor_t(this)); + heapify(); + } + + //! Assignment operator + /** This operation is unsafe if there are pending concurrent operations on the src queue. */ + concurrent_priority_queue& operator=(const concurrent_priority_queue& src) { + if (this != &src) { + std::vector(src.data.begin(), src.data.end(), src.data.get_allocator()).swap(data); + mark = src.mark; + my_size = src.my_size; + } + return *this; + } + + //! Returns true if empty, false otherwise + /** Returned value may not reflect results of pending operations. + This operation reads shared data and will trigger a race condition. */ + bool empty() const { return size()==0; } + + //! Returns the current number of elements contained in the queue + /** Returned value may not reflect results of pending operations. + This operation reads shared data and will trigger a race condition. */ + size_type size() const { return __TBB_load_with_acquire(my_size); } + + //! Pushes elem onto the queue, increasing capacity of queue if necessary + /** This operation can be safely used concurrently with other push, try_pop or reserve operations. */ + void push(const_reference elem) { + cpq_operation op_data(elem, PUSH_OP); + my_aggregator.execute(&op_data); + if (op_data.status == FAILED) // exception thrown + throw_exception(eid_bad_alloc); + } + + //! Gets a reference to and removes highest priority element + /** If a highest priority element was found, sets elem and returns true, + otherwise returns false. + This operation can be safely used concurrently with other push, try_pop or reserve operations. */ + bool try_pop(reference elem) { + cpq_operation op_data(POP_OP); + op_data.elem = &elem; + my_aggregator.execute(&op_data); + return op_data.status==SUCCEEDED; + } + + //! Clear the queue; not thread-safe + /** This operation is unsafe if there are pending concurrent operations on the queue. + Resets size, effectively emptying queue; does not free space. + May not clear elements added in pending operations. */ + void clear() { + data.clear(); + mark = 0; + my_size = 0; + } + + //! Swap this queue with another; not thread-safe + /** This operation is unsafe if there are pending concurrent operations on the queue. */ + void swap(concurrent_priority_queue& q) { + data.swap(q.data); + std::swap(mark, q.mark); + std::swap(my_size, q.my_size); + } + + //! Return allocator object + allocator_type get_allocator() const { return data.get_allocator(); } + + private: + enum operation_type {INVALID_OP, PUSH_OP, POP_OP}; + enum operation_status { WAIT=0, SUCCEEDED, FAILED }; + + class cpq_operation : public aggregated_operation { + public: + operation_type type; + union { + value_type *elem; + size_type sz; + }; + cpq_operation(const_reference e, operation_type t) : + type(t), elem(const_cast(&e)) {} + cpq_operation(operation_type t) : type(t) {} + }; + + class my_functor_t { + concurrent_priority_queue *cpq; + public: + my_functor_t() {} + my_functor_t(concurrent_priority_queue *cpq_) : cpq(cpq_) {} + void operator()(cpq_operation* op_list) { + cpq->handle_operations(op_list); + } + }; + + aggregator< my_functor_t, cpq_operation> my_aggregator; + //! Padding added to avoid false sharing + char padding1[NFS_MaxLineSize - sizeof(aggregator< my_functor_t, cpq_operation >)]; + //! The point at which unsorted elements begin + size_type mark; + __TBB_atomic size_type my_size; + Compare compare; + //! Padding added to avoid false sharing + char padding2[NFS_MaxLineSize - (2*sizeof(size_type)) - sizeof(Compare)]; + //! Storage for the heap of elements in queue, plus unheapified elements + /** data has the following structure: + + binary unheapified + heap elements + ____|_______|____ + | | | + v v v + [_|...|_|_|...|_| |...| ] + 0 ^ ^ ^ + | | |__capacity + | |__my_size + |__mark + + Thus, data stores the binary heap starting at position 0 through + mark-1 (it may be empty). Then there are 0 or more elements + that have not yet been inserted into the heap, in positions + mark through my_size-1. */ + std::vector data; + + void handle_operations(cpq_operation *op_list) { + cpq_operation *tmp, *pop_list=NULL; + + __TBB_ASSERT(mark == data.size(), NULL); + + // First pass processes all constant (amortized; reallocation may happen) time pushes and pops. + while (op_list) { + // ITT note: &(op_list->status) tag is used to cover accesses to op_list + // node. This thread is going to handle the operation, and so will acquire it + // and perform the associated operation w/o triggering a race condition; the + // thread that created the operation is waiting on the status field, so when + // this thread is done with the operation, it will perform a + // store_with_release to give control back to the waiting thread in + // aggregator::insert_operation. + call_itt_notify(acquired, &(op_list->status)); + __TBB_ASSERT(op_list->type != INVALID_OP, NULL); + tmp = op_list; + op_list = itt_hide_load_word(op_list->next); + if (tmp->type == PUSH_OP) { + __TBB_TRY { + data.push_back(*(tmp->elem)); + __TBB_store_with_release(my_size, my_size+1); + itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); + } __TBB_CATCH(...) { + itt_store_word_with_release(tmp->status, uintptr_t(FAILED)); + } + } + else { // tmp->type == POP_OP + __TBB_ASSERT(tmp->type == POP_OP, NULL); + if (mark < data.size() && + compare(data[0], data[data.size()-1])) { + // there are newly pushed elems and the last one + // is higher than top + *(tmp->elem) = data[data.size()-1]; // copy the data + __TBB_store_with_release(my_size, my_size-1); + itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); + data.pop_back(); + __TBB_ASSERT(mark<=data.size(), NULL); + } + else { // no convenient item to pop; postpone + itt_hide_store_word(tmp->next, pop_list); + pop_list = tmp; + } + } + } + + // second pass processes pop operations + while (pop_list) { + tmp = pop_list; + pop_list = itt_hide_load_word(pop_list->next); + __TBB_ASSERT(tmp->type == POP_OP, NULL); + if (data.empty()) { + itt_store_word_with_release(tmp->status, uintptr_t(FAILED)); + } + else { + __TBB_ASSERT(mark<=data.size(), NULL); + if (mark < data.size() && + compare(data[0], data[data.size()-1])) { + // there are newly pushed elems and the last one is + // higher than top + *(tmp->elem) = data[data.size()-1]; // copy the data + __TBB_store_with_release(my_size, my_size-1); + itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); + data.pop_back(); + } + else { // extract top and push last element down heap + *(tmp->elem) = data[0]; // copy the data + __TBB_store_with_release(my_size, my_size-1); + itt_store_word_with_release(tmp->status, uintptr_t(SUCCEEDED)); + reheap(); + } + } + } + + // heapify any leftover pushed elements before doing the next + // batch of operations + if (mark0) mark = 1; + for (; mark>1; + if (!compare(data[parent], to_place)) break; + data[cur_pos] = data[parent]; + cur_pos = parent; + } while( cur_pos ); + data[cur_pos] = to_place; + } + } + + //! Re-heapify after an extraction + /** Re-heapify by pushing last element down the heap from the root. */ + void reheap() { + size_type cur_pos=0, child=1; + + while (child < mark) { + size_type target = child; + if (child+1 < mark && compare(data[child], data[child+1])) + ++target; + // target now has the higher priority child + if (compare(data[target], data[data.size()-1])) break; + data[cur_pos] = data[target]; + cur_pos = target; + child = (cur_pos<<1)+1; + } + data[cur_pos] = data[data.size()-1]; + data.pop_back(); + if (mark > data.size()) mark = data.size(); + } +}; + +} // namespace interface5 + +using interface5::concurrent_priority_queue; + +} // namespace tbb + +#endif /* __TBB_concurrent_priority_queue_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_queue.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_queue.h new file mode 100644 index 0000000000..f8dbb809a6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_queue.h @@ -0,0 +1,420 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_queue_H +#define __TBB_concurrent_queue_H + +#include "internal/_concurrent_queue_impl.h" + +namespace tbb { + +namespace strict_ppl { + +//! A high-performance thread-safe non-blocking concurrent queue. +/** Multiple threads may each push and pop concurrently. + Assignment construction is not allowed. + @ingroup containers */ +template > +class concurrent_queue: public internal::concurrent_queue_base_v3 { + template friend class internal::concurrent_queue_iterator; + + //! Allocator type + typedef typename A::template rebind::other page_allocator_type; + page_allocator_type my_allocator; + + //! Allocates a block of size n (bytes) + /*override*/ virtual void *allocate_block( size_t n ) { + void *b = reinterpret_cast(my_allocator.allocate( n )); + if( !b ) + internal::throw_exception(internal::eid_bad_alloc); + return b; + } + + //! Deallocates block created by allocate_block. + /*override*/ virtual void deallocate_block( void *b, size_t n ) { + my_allocator.deallocate( reinterpret_cast(b), n ); + } + +public: + //! Element type in the queue. + typedef T value_type; + + //! Reference type + typedef T& reference; + + //! Const reference type + typedef const T& const_reference; + + //! Integral type for representing size of the queue. + typedef size_t size_type; + + //! Difference type for iterator + typedef ptrdiff_t difference_type; + + //! Allocator type + typedef A allocator_type; + + //! Construct empty queue + explicit concurrent_queue(const allocator_type& a = allocator_type()) : + my_allocator( a ) + { + } + + //! [begin,end) constructor + template + concurrent_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : + my_allocator( a ) + { + for( ; begin != end; ++begin ) + this->internal_push(&*begin); + } + + //! Copy constructor + concurrent_queue( const concurrent_queue& src, const allocator_type& a = allocator_type()) : + internal::concurrent_queue_base_v3(), my_allocator( a ) + { + this->assign( src ); + } + + //! Destroy queue + ~concurrent_queue(); + + //! Enqueue an item at tail of queue. + void push( const T& source ) { + this->internal_push( &source ); + } + + //! Attempt to dequeue an item from head of queue. + /** Does not wait for item to become available. + Returns true if successful; false otherwise. */ + bool try_pop( T& result ) { + return this->internal_try_pop( &result ); + } + + //! Return the number of items in the queue; thread unsafe + size_type unsafe_size() const {return this->internal_size();} + + //! Equivalent to size()==0. + bool empty() const {return this->internal_empty();} + + //! Clear the queue. not thread-safe. + void clear() ; + + //! Return allocator object + allocator_type get_allocator() const { return this->my_allocator; } + + typedef internal::concurrent_queue_iterator iterator; + typedef internal::concurrent_queue_iterator const_iterator; + + //------------------------------------------------------------------------ + // The iterators are intended only for debugging. They are slow and not thread safe. + //------------------------------------------------------------------------ + iterator unsafe_begin() {return iterator(*this);} + iterator unsafe_end() {return iterator();} + const_iterator unsafe_begin() const {return const_iterator(*this);} + const_iterator unsafe_end() const {return const_iterator();} +} ; + +template +concurrent_queue::~concurrent_queue() { + clear(); + this->internal_finish_clear(); +} + +template +void concurrent_queue::clear() { + while( !empty() ) { + T value; + this->internal_try_pop(&value); + } +} + +} // namespace strict_ppl + +//! A high-performance thread-safe blocking concurrent bounded queue. +/** This is the pre-PPL TBB concurrent queue which supports boundedness and blocking semantics. + Note that method names agree with the PPL-style concurrent queue. + Multiple threads may each push and pop concurrently. + Assignment construction is not allowed. + @ingroup containers */ +template > +class concurrent_bounded_queue: public internal::concurrent_queue_base_v3 { + template friend class internal::concurrent_queue_iterator; + + //! Allocator type + typedef typename A::template rebind::other page_allocator_type; + page_allocator_type my_allocator; + + typedef typename concurrent_queue_base_v3::padded_page padded_page; + + //! Class used to ensure exception-safety of method "pop" + class destroyer: internal::no_copy { + T& my_value; + public: + destroyer( T& value ) : my_value(value) {} + ~destroyer() {my_value.~T();} + }; + + T& get_ref( page& p, size_t index ) { + __TBB_ASSERT( index(static_cast(&p))->last)[index]; + } + + /*override*/ virtual void copy_item( page& dst, size_t index, const void* src ) { + new( &get_ref(dst,index) ) T(*static_cast(src)); + } + + /*override*/ virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) { + new( &get_ref(dst,dindex) ) T( get_ref( const_cast(src), sindex ) ); + } + + /*override*/ virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) { + T& from = get_ref(src,index); + destroyer d(from); + *static_cast(dst) = from; + } + + /*override*/ virtual page *allocate_page() { + size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); + page *p = reinterpret_cast(my_allocator.allocate( n )); + if( !p ) + internal::throw_exception(internal::eid_bad_alloc); + return p; + } + + /*override*/ virtual void deallocate_page( page *p ) { + size_t n = sizeof(padded_page) + (items_per_page-1)*sizeof(T); + my_allocator.deallocate( reinterpret_cast(p), n ); + } + +public: + //! Element type in the queue. + typedef T value_type; + + //! Allocator type + typedef A allocator_type; + + //! Reference type + typedef T& reference; + + //! Const reference type + typedef const T& const_reference; + + //! Integral type for representing size of the queue. + /** Note that the size_type is a signed integral type. + This is because the size can be negative if there are pending pops without corresponding pushes. */ + typedef std::ptrdiff_t size_type; + + //! Difference type for iterator + typedef std::ptrdiff_t difference_type; + + //! Construct empty queue + explicit concurrent_bounded_queue(const allocator_type& a = allocator_type()) : + concurrent_queue_base_v3( sizeof(T) ), my_allocator( a ) + { + } + + //! Copy constructor + concurrent_bounded_queue( const concurrent_bounded_queue& src, const allocator_type& a = allocator_type()) : + concurrent_queue_base_v3( sizeof(T) ), my_allocator( a ) + { + assign( src ); + } + + //! [begin,end) constructor + template + concurrent_bounded_queue( InputIterator begin, InputIterator end, const allocator_type& a = allocator_type()) : + concurrent_queue_base_v3( sizeof(T) ), my_allocator( a ) + { + for( ; begin != end; ++begin ) + internal_push_if_not_full(&*begin); + } + + //! Destroy queue + ~concurrent_bounded_queue(); + + //! Enqueue an item at tail of queue. + void push( const T& source ) { + internal_push( &source ); + } + + //! Dequeue item from head of queue. + /** Block until an item becomes available, and then dequeue it. */ + void pop( T& destination ) { + internal_pop( &destination ); + } + +#if TBB_USE_EXCEPTIONS + //! Abort all pending queue operations + void abort() { + internal_abort(); + } +#endif + + //! Enqueue an item at tail of queue if queue is not already full. + /** Does not wait for queue to become not full. + Returns true if item is pushed; false if queue was already full. */ + bool try_push( const T& source ) { + return internal_push_if_not_full( &source ); + } + + //! Attempt to dequeue an item from head of queue. + /** Does not wait for item to become available. + Returns true if successful; false otherwise. */ + bool try_pop( T& destination ) { + return internal_pop_if_present( &destination ); + } + + //! Return number of pushes minus number of pops. + /** Note that the result can be negative if there are pops waiting for the + corresponding pushes. The result can also exceed capacity() if there + are push operations in flight. */ + size_type size() const {return internal_size();} + + //! Equivalent to size()<=0. + bool empty() const {return internal_empty();} + + //! Maximum number of allowed elements + size_type capacity() const { + return my_capacity; + } + + //! Set the capacity + /** Setting the capacity to 0 causes subsequent try_push operations to always fail, + and subsequent push operations to block forever. */ + void set_capacity( size_type new_capacity ) { + internal_set_capacity( new_capacity, sizeof(T) ); + } + + //! return allocator object + allocator_type get_allocator() const { return this->my_allocator; } + + //! clear the queue. not thread-safe. + void clear() ; + + typedef internal::concurrent_queue_iterator iterator; + typedef internal::concurrent_queue_iterator const_iterator; + + //------------------------------------------------------------------------ + // The iterators are intended only for debugging. They are slow and not thread safe. + //------------------------------------------------------------------------ + iterator unsafe_begin() {return iterator(*this);} + iterator unsafe_end() {return iterator();} + const_iterator unsafe_begin() const {return const_iterator(*this);} + const_iterator unsafe_end() const {return const_iterator();} + +}; + +template +concurrent_bounded_queue::~concurrent_bounded_queue() { + clear(); + internal_finish_clear(); +} + +template +void concurrent_bounded_queue::clear() { + while( !empty() ) { + T value; + internal_pop_if_present(&value); + } +} + +namespace deprecated { + +//! A high-performance thread-safe blocking concurrent bounded queue. +/** This is the pre-PPL TBB concurrent queue which support boundedness and blocking semantics. + Note that method names agree with the PPL-style concurrent queue. + Multiple threads may each push and pop concurrently. + Assignment construction is not allowed. + @ingroup containers */ +template > +class concurrent_queue: public concurrent_bounded_queue { +#if !__TBB_TEMPLATE_FRIENDS_BROKEN + template friend class internal::concurrent_queue_iterator; +#endif + +public: + //! Construct empty queue + explicit concurrent_queue(const A& a = A()) : + concurrent_bounded_queue( a ) + { + } + + //! Copy constructor + concurrent_queue( const concurrent_queue& src, const A& a = A()) : + concurrent_bounded_queue( src, a ) + { + } + + //! [begin,end) constructor + template + concurrent_queue( InputIterator b /*begin*/, InputIterator e /*end*/, const A& a = A()) : + concurrent_bounded_queue( b, e, a ) + { + } + + //! Enqueue an item at tail of queue if queue is not already full. + /** Does not wait for queue to become not full. + Returns true if item is pushed; false if queue was already full. */ + bool push_if_not_full( const T& source ) { + return this->try_push( source ); + } + + //! Attempt to dequeue an item from head of queue. + /** Does not wait for item to become available. + Returns true if successful; false otherwise. + @deprecated Use try_pop() + */ + bool pop_if_present( T& destination ) { + return this->try_pop( destination ); + } + + typedef typename concurrent_bounded_queue::iterator iterator; + typedef typename concurrent_bounded_queue::const_iterator const_iterator; + // + //------------------------------------------------------------------------ + // The iterators are intended only for debugging. They are slow and not thread safe. + //------------------------------------------------------------------------ + iterator begin() {return this->unsafe_begin();} + iterator end() {return this->unsafe_end();} + const_iterator begin() const {return this->unsafe_begin();} + const_iterator end() const {return this->unsafe_end();} +}; + +} + + +#if TBB_DEPRECATED +using deprecated::concurrent_queue; +#else +using strict_ppl::concurrent_queue; +#endif + +} // namespace tbb + +#endif /* __TBB_concurrent_queue_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_map.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_map.h new file mode 100644 index 0000000000..a226ac3fd4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_map.h @@ -0,0 +1,344 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* Container implementations in this header are based on PPL implementations + provided by Microsoft. */ + +#ifndef __TBB_concurrent_unordered_map_H +#define __TBB_concurrent_unordered_map_H + +#include "internal/_concurrent_unordered_impl.h" + +namespace tbb +{ + +namespace interface5 { + +// Template class for hash map traits +template +class concurrent_unordered_map_traits +{ +protected: + typedef std::pair value_type; + typedef Key key_type; + typedef Hash_compare hash_compare; + typedef typename Allocator::template rebind::other allocator_type; + enum { allow_multimapping = Allow_multimapping }; + + concurrent_unordered_map_traits() : my_hash_compare() {} + concurrent_unordered_map_traits(const hash_compare& hc) : my_hash_compare(hc) {} + + class value_compare : public std::binary_function + { + friend class concurrent_unordered_map_traits; + + public: + bool operator()(const value_type& left, const value_type& right) const + { + return (my_hash_compare(left.first, right.first)); + } + + value_compare(const hash_compare& comparator) : my_hash_compare(comparator) {} + + protected: + hash_compare my_hash_compare; // the comparator predicate for keys + }; + + template + static const Key& get_key(const std::pair& value) { + return (value.first); + } + + hash_compare my_hash_compare; // the comparator predicate for keys +}; + +template , typename Key_equality = std::equal_to, + typename Allocator = tbb::tbb_allocator > > +class concurrent_unordered_map : + public internal::concurrent_unordered_base< concurrent_unordered_map_traits, Allocator, false> > +{ + // Base type definitions + typedef internal::hash_compare hash_compare; + typedef concurrent_unordered_map_traits traits_type; + typedef internal::concurrent_unordered_base< traits_type > base_type; + using traits_type::my_hash_compare; +#if __TBB_EXTRA_DEBUG +public: +#endif + using traits_type::allow_multimapping; +public: + using base_type::end; + using base_type::find; + using base_type::insert; + + // Type definitions + typedef Key key_type; + typedef typename base_type::value_type value_type; + typedef T mapped_type; + typedef Hasher hasher; + typedef Key_equality key_equal; + typedef hash_compare key_compare; + + typedef typename base_type::allocator_type allocator_type; + typedef typename base_type::pointer pointer; + typedef typename base_type::const_pointer const_pointer; + typedef typename base_type::reference reference; + typedef typename base_type::const_reference const_reference; + + typedef typename base_type::size_type size_type; + typedef typename base_type::difference_type difference_type; + + typedef typename base_type::iterator iterator; + typedef typename base_type::const_iterator const_iterator; + typedef typename base_type::iterator local_iterator; + typedef typename base_type::const_iterator const_local_iterator; + + // Construction/destruction/copying + explicit concurrent_unordered_map(size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) + { + } + + concurrent_unordered_map(const Allocator& a) : base_type(8, key_compare(), a) + { + } + + template + concurrent_unordered_map(Iterator first, Iterator last, size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) + { + for (; first != last; ++first) + base_type::insert(*first); + } + + concurrent_unordered_map(const concurrent_unordered_map& table) : base_type(table) + { + } + + concurrent_unordered_map(const concurrent_unordered_map& table, const Allocator& a) + : base_type(table, a) + { + } + + concurrent_unordered_map& operator=(const concurrent_unordered_map& table) + { + base_type::operator=(table); + return (*this); + } + + iterator unsafe_erase(const_iterator where) + { + return base_type::unsafe_erase(where); + } + + size_type unsafe_erase(const key_type& key) + { + return base_type::unsafe_erase(key); + } + + iterator unsafe_erase(const_iterator first, const_iterator last) + { + return base_type::unsafe_erase(first, last); + } + + void swap(concurrent_unordered_map& table) + { + base_type::swap(table); + } + + // Observers + hasher hash_function() const + { + return my_hash_compare.my_hash_object; + } + + key_equal key_eq() const + { + return my_hash_compare.my_key_compare_object; + } + + mapped_type& operator[](const key_type& key) + { + iterator where = find(key); + + if (where == end()) + { + where = insert(std::pair(key, mapped_type())).first; + } + + return ((*where).second); + } + + mapped_type& at(const key_type& key) + { + iterator where = find(key); + + if (where == end()) + { + tbb::internal::throw_exception(tbb::internal::eid_invalid_key); + } + + return ((*where).second); + } + + const mapped_type& at(const key_type& key) const + { + const_iterator where = find(key); + + if (where == end()) + { + tbb::internal::throw_exception(tbb::internal::eid_invalid_key); + } + + return ((*where).second); + } +}; + +template < typename Key, typename T, typename Hasher = tbb::tbb_hash, typename Key_equality = std::equal_to, + typename Allocator = tbb::tbb_allocator > > +class concurrent_unordered_multimap : + public internal::concurrent_unordered_base< concurrent_unordered_map_traits< Key, T, + internal::hash_compare, Allocator, true> > +{ + // Base type definitions + typedef internal::hash_compare hash_compare; + typedef concurrent_unordered_map_traits traits_type; + typedef internal::concurrent_unordered_base< traits_type > base_type; + using traits_type::my_hash_compare; +#if __TBB_EXTRA_DEBUG +public: +#endif + using traits_type::allow_multimapping; +public: + using base_type::end; + using base_type::find; + using base_type::insert; + + // Type definitions + typedef Key key_type; + typedef typename base_type::value_type value_type; + typedef T mapped_type; + typedef Hasher hasher; + typedef Key_equality key_equal; + typedef hash_compare key_compare; + + typedef typename base_type::allocator_type allocator_type; + typedef typename base_type::pointer pointer; + typedef typename base_type::const_pointer const_pointer; + typedef typename base_type::reference reference; + typedef typename base_type::const_reference const_reference; + + typedef typename base_type::size_type size_type; + typedef typename base_type::difference_type difference_type; + + typedef typename base_type::iterator iterator; + typedef typename base_type::const_iterator const_iterator; + typedef typename base_type::iterator local_iterator; + typedef typename base_type::const_iterator const_local_iterator; + + // Construction/destruction/copying + explicit concurrent_unordered_multimap(size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) + { + } + + concurrent_unordered_multimap(const Allocator& a) : base_type(8, key_compare(), a) + { + } + + template + concurrent_unordered_multimap(Iterator first, Iterator last, size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets,key_compare(_Hasher,_Key_equality), a) + { + for (; first != last; ++first) + base_type::insert(*first); + } + + concurrent_unordered_multimap(const concurrent_unordered_multimap& table) : base_type(table) + { + } + + concurrent_unordered_multimap(const concurrent_unordered_multimap& table, const Allocator& a) + : base_type(table, a) + { + } + + concurrent_unordered_multimap& operator=(const concurrent_unordered_multimap& table) + { + base_type::operator=(table); + return (*this); + } + + iterator unsafe_erase(const_iterator where) + { + return base_type::unsafe_erase(where); + } + + size_type unsafe_erase(const key_type& key) + { + return base_type::unsafe_erase(key); + } + + iterator unsafe_erase(const_iterator first, const_iterator last) + { + return base_type::unsafe_erase(first, last); + } + + void swap(concurrent_unordered_multimap& table) + { + base_type::swap(table); + } + + // Observers + hasher hash_function() const + { + return my_hash_compare.my_hash_object; + } + + key_equal key_eq() const + { + return my_hash_compare.my_key_compare_object; + } +}; +} // namespace interface5 + +using interface5::concurrent_unordered_map; +using interface5::concurrent_unordered_multimap; + +} // namespace tbb + +#endif// __TBB_concurrent_unordered_map_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_set.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_set.h new file mode 100644 index 0000000000..21494e092e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_unordered_set.h @@ -0,0 +1,300 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* Container implementations in this header are based on PPL implementations + provided by Microsoft. */ + +#ifndef __TBB_concurrent_unordered_set_H +#define __TBB_concurrent_unordered_set_H + +#include "internal/_concurrent_unordered_impl.h" + +namespace tbb +{ + +namespace interface5 { + +// Template class for hash set traits +template +class concurrent_unordered_set_traits +{ +protected: + typedef Key value_type; + typedef Key key_type; + typedef Hash_compare hash_compare; + typedef typename Allocator::template rebind::other allocator_type; + enum { allow_multimapping = Allow_multimapping }; + + concurrent_unordered_set_traits() : my_hash_compare() {} + concurrent_unordered_set_traits(const hash_compare& hc) : my_hash_compare(hc) {} + + typedef hash_compare value_compare; + + static const Key& get_key(const value_type& value) { + return value; + } + + hash_compare my_hash_compare; // the comparator predicate for keys +}; + +template , typename Key_equality = std::equal_to, typename Allocator = tbb::tbb_allocator > +class concurrent_unordered_set : public internal::concurrent_unordered_base< concurrent_unordered_set_traits, Allocator, false> > +{ + // Base type definitions + typedef internal::hash_compare hash_compare; + typedef internal::concurrent_unordered_base< concurrent_unordered_set_traits > base_type; + typedef concurrent_unordered_set_traits, Allocator, false> traits_type; + using traits_type::my_hash_compare; +#if __TBB_EXTRA_DEBUG +public: +#endif + using traits_type::allow_multimapping; +public: + using base_type::end; + using base_type::find; + using base_type::insert; + + // Type definitions + typedef Key key_type; + typedef typename base_type::value_type value_type; + typedef Key mapped_type; + typedef Hasher hasher; + typedef Key_equality key_equal; + typedef hash_compare key_compare; + + typedef typename base_type::allocator_type allocator_type; + typedef typename base_type::pointer pointer; + typedef typename base_type::const_pointer const_pointer; + typedef typename base_type::reference reference; + typedef typename base_type::const_reference const_reference; + + typedef typename base_type::size_type size_type; + typedef typename base_type::difference_type difference_type; + + typedef typename base_type::iterator iterator; + typedef typename base_type::const_iterator const_iterator; + typedef typename base_type::iterator local_iterator; + typedef typename base_type::const_iterator const_local_iterator; + + // Construction/destruction/copying + explicit concurrent_unordered_set(size_type n_of_buckets = 8, const hasher& a_hasher = hasher(), + const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) + { + } + + concurrent_unordered_set(const Allocator& a) : base_type(8, key_compare(), a) + { + } + + template + concurrent_unordered_set(Iterator first, Iterator last, size_type n_of_buckets = 8, const hasher& a_hasher = hasher(), + const key_equal& a_keyeq = key_equal(), const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(a_hasher, a_keyeq), a) + { + for (; first != last; ++first) + base_type::insert(*first); + } + + concurrent_unordered_set(const concurrent_unordered_set& table) : base_type(table) + { + } + + concurrent_unordered_set(const concurrent_unordered_set& table, const Allocator& a) + : base_type(table, a) + { + } + + concurrent_unordered_set& operator=(const concurrent_unordered_set& table) + { + base_type::operator=(table); + return (*this); + } + + iterator unsafe_erase(const_iterator where) + { + return base_type::unsafe_erase(where); + } + + size_type unsafe_erase(const key_type& key) + { + return base_type::unsafe_erase(key); + } + + iterator unsafe_erase(const_iterator first, const_iterator last) + { + return base_type::unsafe_erase(first, last); + } + + void swap(concurrent_unordered_set& table) + { + base_type::swap(table); + } + + // Observers + hasher hash_function() const + { + return my_hash_compare.my_hash_object; + } + + key_equal key_eq() const + { + return my_hash_compare.my_key_compare_object; + } +}; + +template , typename Key_equality = std::equal_to, + typename Allocator = tbb::tbb_allocator > +class concurrent_unordered_multiset : + public internal::concurrent_unordered_base< concurrent_unordered_set_traits, Allocator, true> > +{ +public: + // Base type definitions + typedef internal::hash_compare hash_compare; + typedef concurrent_unordered_set_traits traits_type; + typedef internal::concurrent_unordered_base< traits_type > base_type; + using traits_type::allow_multimapping; + using traits_type::my_hash_compare; + + // Type definitions + typedef Key key_type; + typedef typename base_type::value_type value_type; + typedef Key mapped_type; + typedef Hasher hasher; + typedef Key_equality key_equal; + typedef hash_compare key_compare; + + typedef typename base_type::allocator_type allocator_type; + typedef typename base_type::pointer pointer; + typedef typename base_type::const_pointer const_pointer; + typedef typename base_type::reference reference; + typedef typename base_type::const_reference const_reference; + + typedef typename base_type::size_type size_type; + typedef typename base_type::difference_type difference_type; + + typedef typename base_type::iterator iterator; + typedef typename base_type::const_iterator const_iterator; + typedef typename base_type::iterator local_iterator; + typedef typename base_type::const_iterator const_local_iterator; + + // Construction/destruction/copying + explicit concurrent_unordered_multiset(size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) + { + } + + concurrent_unordered_multiset(const Allocator& a) : base_type(8, key_compare(), a) + { + } + + template + concurrent_unordered_multiset(Iterator first, Iterator last, size_type n_of_buckets = 8, + const hasher& _Hasher = hasher(), const key_equal& _Key_equality = key_equal(), + const allocator_type& a = allocator_type()) + : base_type(n_of_buckets, key_compare(_Hasher, _Key_equality), a) + { + for (; first != last; ++first) + { + base_type::insert(*first); + } + } + + concurrent_unordered_multiset(const concurrent_unordered_multiset& table) : base_type(table) + { + } + + concurrent_unordered_multiset(const concurrent_unordered_multiset& table, const Allocator& a) : base_type(table, a) + { + } + + concurrent_unordered_multiset& operator=(const concurrent_unordered_multiset& table) + { + base_type::operator=(table); + return (*this); + } + + // Modifiers + std::pair insert(const value_type& value) + { + return base_type::insert(value); + } + + iterator insert(const_iterator where, const value_type& value) + { + return base_type::insert(where, value); + } + + template + void insert(Iterator first, Iterator last) + { + base_type::insert(first, last); + } + + iterator unsafe_erase(const_iterator where) + { + return base_type::unsafe_erase(where); + } + + size_type unsafe_erase(const key_type& key) + { + return base_type::unsafe_erase(key); + } + + iterator unsafe_erase(const_iterator first, const_iterator last) + { + return base_type::unsafe_erase(first, last); + } + + void swap(concurrent_unordered_multiset& table) + { + base_type::swap(table); + } + + // Observers + hasher hash_function() const + { + return my_hash_compare.my_hash_object; + } + + key_equal key_eq() const + { + return my_hash_compare.my_key_compare_object; + } +}; +} // namespace interface5 + +using interface5::concurrent_unordered_set; +using interface5::concurrent_unordered_multiset; + +} // namespace tbb + +#endif// __TBB_concurrent_unordered_set_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_vector.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_vector.h new file mode 100644 index 0000000000..41cfbc78a9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/concurrent_vector.h @@ -0,0 +1,1127 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_vector_H +#define __TBB_concurrent_vector_H + +#include "tbb_stddef.h" +#include "tbb_exception.h" +#include "atomic.h" +#include "cache_aligned_allocator.h" +#include "blocked_range.h" +#include "tbb_machine.h" +#include "tbb_profiling.h" +#include +#include // for memset() + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#if _MSC_VER==1500 && !__INTEL_COMPILER + // VS2008/VC9 seems to have an issue; limits pull in math.h + #pragma warning( push ) + #pragma warning( disable: 4985 ) +#endif +#include /* std::numeric_limits */ +#if _MSC_VER==1500 && !__INTEL_COMPILER + #pragma warning( pop ) +#endif + +#if __TBB_INITIALIZER_LISTS_PRESENT + #include +#endif + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (push) + #pragma warning (disable: 4267) +#endif + +namespace tbb { + +template > +class concurrent_vector; + +template +class vector_iterator; + +//! @cond INTERNAL +namespace internal { + + //! Bad allocation marker + static void *const vector_allocation_error_flag = reinterpret_cast(size_t(63)); + + //! Base class of concurrent vector implementation. + /** @ingroup containers */ + class concurrent_vector_base_v3 { + protected: + + // Basic types declarations + typedef size_t segment_index_t; + typedef size_t size_type; + + // Using enumerations due to Mac linking problems of static const variables + enum { + // Size constants + default_initial_segments = 1, // 2 initial items + //! Number of slots for segment's pointers inside the class + pointers_per_short_table = 3, // to fit into 8 words of entire structure + pointers_per_long_table = sizeof(segment_index_t) * 8 // one segment per bit + }; + + // Segment pointer. Can be zero-initialized + struct segment_t { + void* array; +#if TBB_USE_ASSERT + ~segment_t() { + __TBB_ASSERT( array <= internal::vector_allocation_error_flag, "should have been freed by clear" ); + } +#endif /* TBB_USE_ASSERT */ + }; + + // Data fields + + //! allocator function pointer + void* (*vector_allocator_ptr)(concurrent_vector_base_v3 &, size_t); + + //! count of segments in the first block + atomic my_first_block; + + //! Requested size of vector + atomic my_early_size; + + //! Pointer to the segments table + atomic my_segment; + + //! embedded storage of segment pointers + segment_t my_storage[pointers_per_short_table]; + + // Methods + + concurrent_vector_base_v3() { + my_early_size = 0; + my_first_block = 0; // here is not default_initial_segments + for( segment_index_t i = 0; i < pointers_per_short_table; i++) + my_storage[i].array = NULL; + my_segment = my_storage; + } + __TBB_EXPORTED_METHOD ~concurrent_vector_base_v3(); + + //these helpers methods use the fact that segments are allocated so + //that every segment size is a (increasing) power of 2. + //with one exception 0 segment has size of 2 as well segment 1; + //e.g. size of segment with index of 3 is 2^3=8; + static segment_index_t segment_index_of( size_type index ) { + return segment_index_t( __TBB_Log2( index|1 ) ); + } + + static segment_index_t segment_base( segment_index_t k ) { + return (segment_index_t(1)< + friend class vector_iterator; + + }; + + typedef concurrent_vector_base_v3 concurrent_vector_base; + + //! Meets requirements of a forward iterator for STL and a Value for a blocked_range.*/ + /** Value is either the T or const T type of the container. + @ingroup containers */ + template + class vector_iterator + { + //! concurrent_vector over which we are iterating. + Container* my_vector; + + //! Index into the vector + size_t my_index; + + //! Caches my_vector->internal_subscript(my_index) + /** NULL if cached value is not available */ + mutable Value* my_item; + + template + friend vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ); + + template + friend bool operator==( const vector_iterator& i, const vector_iterator& j ); + + template + friend bool operator<( const vector_iterator& i, const vector_iterator& j ); + + template + friend ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ); + + template + friend class internal::vector_iterator; + +#if !defined(_MSC_VER) || defined(__INTEL_COMPILER) + template + friend class tbb::concurrent_vector; +#else +public: // workaround for MSVC +#endif + + vector_iterator( const Container& vector, size_t index, void *ptr = 0 ) : + my_vector(const_cast(&vector)), + my_index(index), + my_item(static_cast(ptr)) + {} + + public: + //! Default constructor + vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {} + + vector_iterator( const vector_iterator& other ) : + my_vector(other.my_vector), + my_index(other.my_index), + my_item(other.my_item) + {} + + vector_iterator operator+( ptrdiff_t offset ) const { + return vector_iterator( *my_vector, my_index+offset ); + } + vector_iterator &operator+=( ptrdiff_t offset ) { + my_index+=offset; + my_item = NULL; + return *this; + } + vector_iterator operator-( ptrdiff_t offset ) const { + return vector_iterator( *my_vector, my_index-offset ); + } + vector_iterator &operator-=( ptrdiff_t offset ) { + my_index-=offset; + my_item = NULL; + return *this; + } + Value& operator*() const { + Value* item = my_item; + if( !item ) { + item = my_item = &my_vector->internal_subscript(my_index); + } + __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), "corrupt cache" ); + return *item; + } + Value& operator[]( ptrdiff_t k ) const { + return my_vector->internal_subscript(my_index+k); + } + Value* operator->() const {return &operator*();} + + //! Pre increment + vector_iterator& operator++() { + size_t element_index = ++my_index; + if( my_item ) { + //TODO: consider using of knowledge about "first_block optimization" here as well? + if( concurrent_vector_base::is_first_element_in_segment(element_index)) { + //if the iterator crosses a segment boundary, the pointer become invalid + //as possibly next segment is in another memory location + my_item= NULL; + } else { + ++my_item; + } + } + return *this; + } + + //! Pre decrement + vector_iterator& operator--() { + __TBB_ASSERT( my_index>0, "operator--() applied to iterator already at beginning of concurrent_vector" ); + size_t element_index = my_index--; + if( my_item ) { + if(concurrent_vector_base::is_first_element_in_segment(element_index)) { + //if the iterator crosses a segment boundary, the pointer become invalid + //as possibly next segment is in another memory location + my_item= NULL; + } else { + --my_item; + } + } + return *this; + } + + //! Post increment + vector_iterator operator++(int) { + vector_iterator result = *this; + operator++(); + return result; + } + + //! Post decrement + vector_iterator operator--(int) { + vector_iterator result = *this; + operator--(); + return result; + } + + // STL support + + typedef ptrdiff_t difference_type; + typedef Value value_type; + typedef Value* pointer; + typedef Value& reference; + typedef std::random_access_iterator_tag iterator_category; + }; + + template + vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ) { + return vector_iterator( *v.my_vector, v.my_index+offset ); + } + + template + bool operator==( const vector_iterator& i, const vector_iterator& j ) { + return i.my_index==j.my_index && i.my_vector == j.my_vector; + } + + template + bool operator!=( const vector_iterator& i, const vector_iterator& j ) { + return !(i==j); + } + + template + bool operator<( const vector_iterator& i, const vector_iterator& j ) { + return i.my_index + bool operator>( const vector_iterator& i, const vector_iterator& j ) { + return j + bool operator>=( const vector_iterator& i, const vector_iterator& j ) { + return !(i + bool operator<=( const vector_iterator& i, const vector_iterator& j ) { + return !(j + ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ) { + return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index); + } + + template + class allocator_base { + public: + typedef typename A::template + rebind::other allocator_type; + allocator_type my_allocator; + + allocator_base(const allocator_type &a = allocator_type() ) : my_allocator(a) {} + }; + +} // namespace internal +//! @endcond + +//! Concurrent vector container +/** concurrent_vector is a container having the following main properties: + - It provides random indexed access to its elements. The index of the first element is 0. + - It ensures safe concurrent growing its size (different threads can safely append new elements). + - Adding new elements does not invalidate existing iterators and does not change indices of existing items. + +@par Compatibility + The class meets all Container Requirements and Reversible Container Requirements from + C++ Standard (See ISO/IEC 14882:2003(E), clause 23.1). But it doesn't meet + Sequence Requirements due to absence of insert() and erase() methods. + +@par Exception Safety + Methods working with memory allocation and/or new elements construction can throw an + exception if allocator fails to allocate memory or element's default constructor throws one. + Concurrent vector's element of type T must conform to the following requirements: + - Throwing an exception is forbidden for destructor of T. + - Default constructor of T must not throw an exception OR its non-virtual destructor must safely work when its object memory is zero-initialized. + . + Otherwise, the program's behavior is undefined. +@par + If an exception happens inside growth or assignment operation, an instance of the vector becomes invalid unless it is stated otherwise in the method documentation. + Invalid state means: + - There are no guarantees that all items were initialized by a constructor. The rest of items is zero-filled, including item where exception happens. + - An invalid vector instance cannot be repaired; it is unable to grow anymore. + - Size and capacity reported by the vector are incorrect, and calculated as if the failed operation were successful. + - Attempt to access not allocated elements using operator[] or iterators results in access violation or segmentation fault exception, and in case of using at() method a C++ exception is thrown. + . + If a concurrent grow operation successfully completes, all the elements it has added to the vector will remain valid and accessible even if one of subsequent grow operations fails. + +@par Fragmentation + Unlike an STL vector, a concurrent_vector does not move existing elements if it needs + to allocate more memory. The container is divided into a series of contiguous arrays of + elements. The first reservation, growth, or assignment operation determines the size of + the first array. Using small number of elements as initial size incurs fragmentation that + may increase element access time. Internal layout can be optimized by method compact() that + merges several smaller arrays into one solid. + +@par Changes since TBB 2.1 + - Fixed guarantees of concurrent_vector::size() and grow_to_at_least() methods to assure elements are allocated. + - Methods end()/rbegin()/back() are partly thread-safe since they use size() to get the end of vector + - Added resize() methods (not thread-safe) + - Added cbegin/cend/crbegin/crend methods + - Changed return type of methods grow* and push_back to iterator + +@par Changes since TBB 2.0 + - Implemented exception-safety guarantees + - Added template argument for allocator + - Added allocator argument in constructors + - Faster index calculation + - First growth call specifies a number of segments to be merged in the first allocation. + - Fixed memory blow up for swarm of vector's instances of small size + - Added grow_by(size_type n, const_reference t) growth using copying constructor to init new items. + - Added STL-like constructors. + - Added operators ==, < and derivatives + - Added at() method, approved for using after an exception was thrown inside the vector + - Added get_allocator() method. + - Added assign() methods + - Added compact() method to defragment first segments + - Added swap() method + - range() defaults on grainsize = 1 supporting auto grainsize algorithms. + + @ingroup containers */ +template +class concurrent_vector: protected internal::allocator_base, + private internal::concurrent_vector_base { +private: + template + class generic_range_type: public blocked_range { + public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef I iterator; + typedef ptrdiff_t difference_type; + generic_range_type( I begin_, I end_, size_t grainsize_ = 1) : blocked_range(begin_,end_,grainsize_) {} + template + generic_range_type( const generic_range_type& r) : blocked_range(r.begin(),r.end(),r.grainsize()) {} + generic_range_type( generic_range_type& r, split ) : blocked_range(r,split()) {} + }; + + template + friend class internal::vector_iterator; +public: + //------------------------------------------------------------------------ + // STL compatible types + //------------------------------------------------------------------------ + typedef internal::concurrent_vector_base_v3::size_type size_type; + typedef typename internal::allocator_base::allocator_type allocator_type; + + typedef T value_type; + typedef ptrdiff_t difference_type; + typedef T& reference; + typedef const T& const_reference; + typedef T *pointer; + typedef const T *const_pointer; + + typedef internal::vector_iterator iterator; + typedef internal::vector_iterator const_iterator; + +#if !defined(_MSC_VER) || _CPPLIB_VER>=300 + // Assume ISO standard definition of std::reverse_iterator + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // Use non-standard std::reverse_iterator + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif /* defined(_MSC_VER) && (_MSC_VER<1300) */ + + //------------------------------------------------------------------------ + // Parallel algorithm support + //------------------------------------------------------------------------ + typedef generic_range_type range_type; + typedef generic_range_type const_range_type; + + //------------------------------------------------------------------------ + // STL compatible constructors & destructors + //------------------------------------------------------------------------ + + //! Construct empty vector. + explicit concurrent_vector(const allocator_type &a = allocator_type()) + : internal::allocator_base(a), internal::concurrent_vector_base() + { + vector_allocator_ptr = &internal_allocator; + } + +#if __TBB_INITIALIZER_LISTS_PRESENT + //! Constructor from initializer_list + concurrent_vector(std::initializer_list init_list, const allocator_type &a = allocator_type()) + : internal::allocator_base(a), internal::concurrent_vector_base() + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_assign_iterators(init_list.begin(), init_list.end()); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + + } +#endif //# __TBB_INITIALIZER_LISTS_PRESENT + + //! Copying constructor + concurrent_vector( const concurrent_vector& vector, const allocator_type& a = allocator_type() ) + : internal::allocator_base(a), internal::concurrent_vector_base() + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_copy(vector, sizeof(T), ©_array); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + } + + //! Copying constructor for vector with different allocator type + template + concurrent_vector( const concurrent_vector& vector, const allocator_type& a = allocator_type() ) + : internal::allocator_base(a), internal::concurrent_vector_base() + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_copy(vector.internal_vector_base(), sizeof(T), ©_array); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + } + + //! Construction with initial size specified by argument n + explicit concurrent_vector(size_type n) + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array ); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + } + + //! Construction with initial size specified by argument n, initialization by copying of t, and given allocator instance + concurrent_vector(size_type n, const_reference t, const allocator_type& a = allocator_type()) + : internal::allocator_base(a) + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + } + + //! Construction with copying iteration range and given allocator instance + template + concurrent_vector(I first, I last, const allocator_type &a = allocator_type()) + : internal::allocator_base(a) + { + vector_allocator_ptr = &internal_allocator; + __TBB_TRY { + internal_assign_range(first, last, static_cast::is_integer> *>(0) ); + } __TBB_CATCH(...) { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + __TBB_RETHROW(); + } + } + + //! Assignment + concurrent_vector& operator=( const concurrent_vector& vector ) { + if( this != &vector ) + internal_assign(vector, sizeof(T), &destroy_array, &assign_array, ©_array); + return *this; + } + + //TODO: add an template assignment operator? (i.e. with different element type) + + //! Assignment for vector with different allocator type + template + concurrent_vector& operator=( const concurrent_vector& vector ) { + if( static_cast( this ) != static_cast( &vector ) ) + internal_assign(vector.internal_vector_base(), + sizeof(T), &destroy_array, &assign_array, ©_array); + return *this; + } + +#if __TBB_INITIALIZER_LISTS_PRESENT + //! Assignment for initializer_list + concurrent_vector& operator=( const std::initializer_list & init_list) { + internal_clear(&destroy_array); + internal_assign_iterators(init_list.begin(), init_list.end()); + return *this; + } +#endif //#if __TBB_INITIALIZER_LISTS_PRESENT + + //------------------------------------------------------------------------ + // Concurrent operations + //------------------------------------------------------------------------ + //TODO: consider adding overload of grow_by accepting range of iterators: grow_by(iterator,iterator) + //TODO: consider adding overload of grow_by accepting initializer_list: grow_by(std::initializer_list), as a analogy to std::vector::insert(initializer_list) + //! Grow by "delta" elements. +#if TBB_DEPRECATED + /** Returns old size. */ + size_type grow_by( size_type delta ) { + return delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size; + } +#else + /** Returns iterator pointing to the first new element. */ + iterator grow_by( size_type delta ) { + return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array, NULL ) : my_early_size); + } +#endif + + //! Grow by "delta" elements using copying constructor. +#if TBB_DEPRECATED + /** Returns old size. */ + size_type grow_by( size_type delta, const_reference t ) { + return delta ? internal_grow_by( delta, sizeof(T), &initialize_array_by, static_cast(&t) ) : my_early_size; + } +#else + /** Returns iterator pointing to the first new element. */ + iterator grow_by( size_type delta, const_reference t ) { + return iterator(*this, delta ? internal_grow_by( delta, sizeof(T), &initialize_array_by, static_cast(&t) ) : my_early_size); + } +#endif + + //! Append minimal sequence of elements such that size()>=n. +#if TBB_DEPRECATED + /** The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. + May return while other elements are being constructed by other threads. */ + void grow_to_at_least( size_type n ) { + if( n ) internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array, NULL ); + }; +#else + /** The new elements are default constructed. Blocks until all elements in range [0..n) are allocated. + May return while other elements are being constructed by other threads. + Returns iterator that points to beginning of appended sequence. + If no elements were appended, returns iterator pointing to nth element. */ + iterator grow_to_at_least( size_type n ) { + size_type m=0; + if( n ) { + m = internal_grow_to_at_least_with_result( n, sizeof(T), &initialize_array, NULL ); + if( m>n ) m=n; + } + return iterator(*this, m); + }; +#endif + + //! Push item +#if TBB_DEPRECATED + size_type push_back( const_reference item ) +#else + /** Returns iterator pointing to the new element. */ + iterator push_back( const_reference item ) +#endif + { + size_type k; + void *ptr = internal_push_back(sizeof(T),k); + internal_loop_guide loop(1, ptr); + loop.init(&item); +#if TBB_DEPRECATED + return k; +#else + return iterator(*this, k, ptr); +#endif + } + + //! Get reference to element at given index. + /** This method is thread-safe for concurrent reads, and also while growing the vector, + as long as the calling thread has checked that index<size(). */ + reference operator[]( size_type index ) { + return internal_subscript(index); + } + + //! Get const reference to element at given index. + const_reference operator[]( size_type index ) const { + return internal_subscript(index); + } + + //! Get reference to element at given index. Throws exceptions on errors. + reference at( size_type index ) { + return internal_subscript_with_exceptions(index); + } + + //! Get const reference to element at given index. Throws exceptions on errors. + const_reference at( size_type index ) const { + return internal_subscript_with_exceptions(index); + } + + //! Get range for iterating with parallel algorithms + range_type range( size_t grainsize = 1 ) { + return range_type( begin(), end(), grainsize ); + } + + //! Get const range for iterating with parallel algorithms + const_range_type range( size_t grainsize = 1 ) const { + return const_range_type( begin(), end(), grainsize ); + } + + //------------------------------------------------------------------------ + // Capacity + //------------------------------------------------------------------------ + //! Return size of vector. It may include elements under construction + size_type size() const { + size_type sz = my_early_size, cp = internal_capacity(); + return cp < sz ? cp : sz; + } + + //! Return false if vector is not empty or has elements under construction at least. + bool empty() const {return !my_early_size;} + + //! Maximum size to which array can grow without allocating more memory. Concurrent allocations are not included in the value. + size_type capacity() const {return internal_capacity();} + + //! Allocate enough space to grow to size n without having to allocate more memory later. + /** Like most of the methods provided for STL compatibility, this method is *not* thread safe. + The capacity afterwards may be bigger than the requested reservation. */ + void reserve( size_type n ) { + if( n ) + internal_reserve(n, sizeof(T), max_size()); + } + + //! Resize the vector. Not thread-safe. + void resize( size_type n ) { + internal_resize( n, sizeof(T), max_size(), NULL, &destroy_array, &initialize_array ); + } + + //! Resize the vector, copy t for new elements. Not thread-safe. + void resize( size_type n, const_reference t ) { + internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); + } + +#if TBB_DEPRECATED + //! An alias for shrink_to_fit() + void compact() {shrink_to_fit();} +#endif /* TBB_DEPRECATED */ + + //! Optimize memory usage and fragmentation. + void shrink_to_fit(); + + //! Upper bound on argument to reserve. + size_type max_size() const {return (~size_type(0))/sizeof(T);} + + //------------------------------------------------------------------------ + // STL support + //------------------------------------------------------------------------ + + //! start iterator + iterator begin() {return iterator(*this,0);} + //! end iterator + iterator end() {return iterator(*this,size());} + //! start const iterator + const_iterator begin() const {return const_iterator(*this,0);} + //! end const iterator + const_iterator end() const {return const_iterator(*this,size());} + //! start const iterator + const_iterator cbegin() const {return const_iterator(*this,0);} + //! end const iterator + const_iterator cend() const {return const_iterator(*this,size());} + //! reverse start iterator + reverse_iterator rbegin() {return reverse_iterator(end());} + //! reverse end iterator + reverse_iterator rend() {return reverse_iterator(begin());} + //! reverse start const iterator + const_reverse_iterator rbegin() const {return const_reverse_iterator(end());} + //! reverse end const iterator + const_reverse_iterator rend() const {return const_reverse_iterator(begin());} + //! reverse start const iterator + const_reverse_iterator crbegin() const {return const_reverse_iterator(end());} + //! reverse end const iterator + const_reverse_iterator crend() const {return const_reverse_iterator(begin());} + //! the first item + reference front() { + __TBB_ASSERT( size()>0, NULL); + return static_cast(my_segment[0].array)[0]; + } + //! the first item const + const_reference front() const { + __TBB_ASSERT( size()>0, NULL); + return static_cast(my_segment[0].array)[0]; + } + //! the last item + reference back() { + __TBB_ASSERT( size()>0, NULL); + return internal_subscript( size()-1 ); + } + //! the last item const + const_reference back() const { + __TBB_ASSERT( size()>0, NULL); + return internal_subscript( size()-1 ); + } + //! return allocator object + allocator_type get_allocator() const { return this->my_allocator; } + + //! assign n items by copying t item + void assign(size_type n, const_reference t) { + clear(); + internal_resize( n, sizeof(T), max_size(), static_cast(&t), &destroy_array, &initialize_array_by ); + } + + //! assign range [first, last) + template + void assign(I first, I last) { + clear(); internal_assign_range( first, last, static_cast::is_integer> *>(0) ); + } + +#if __TBB_INITIALIZER_LISTS_PRESENT + //! assigns an initializer list + void assign(std::initializer_list init_list) { + clear(); internal_assign_iterators( init_list.begin(), init_list.end()); + } +#endif //# __TBB_INITIALIZER_LISTS_PRESENT + + //! swap two instances + void swap(concurrent_vector &vector) { + if( this != &vector ) { + concurrent_vector_base_v3::internal_swap(static_cast(vector)); + std::swap(this->my_allocator, vector.my_allocator); + } + } + + //! Clear container while keeping memory allocated. + /** To free up the memory, use in conjunction with method compact(). Not thread safe **/ + void clear() { + internal_clear(&destroy_array); + } + + //! Clear and destroy vector. + ~concurrent_vector() { + segment_t *table = my_segment; + internal_free_segments( reinterpret_cast(table), internal_clear(&destroy_array), my_first_block ); + // base class destructor call should be then + } + + const internal::concurrent_vector_base_v3 &internal_vector_base() const { return *this; } +private: + //! Allocate k items + static void *internal_allocator(internal::concurrent_vector_base_v3 &vb, size_t k) { + return static_cast&>(vb).my_allocator.allocate(k); + } + //! Free k segments from table + void internal_free_segments(void *table[], segment_index_t k, segment_index_t first_block); + + //! Get reference to element at given index. + T& internal_subscript( size_type index ) const; + + //! Get reference to element at given index with errors checks + T& internal_subscript_with_exceptions( size_type index ) const; + + //! assign n items by copying t + void internal_assign_n(size_type n, const_pointer p) { + internal_resize( n, sizeof(T), max_size(), static_cast(p), &destroy_array, p? &initialize_array_by : &initialize_array ); + } + + //! helper class + template class is_integer_tag; + + //! assign integer items by copying when arguments are treated as iterators. See C++ Standard 2003 23.1.1p9 + template + void internal_assign_range(I first, I last, is_integer_tag *) { + internal_assign_n(static_cast(first), &static_cast(last)); + } + //! inline proxy assign by iterators + template + void internal_assign_range(I first, I last, is_integer_tag *) { + internal_assign_iterators(first, last); + } + //! assign by iterators + template + void internal_assign_iterators(I first, I last); + + //! Construct n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC initialize_array( void* begin, const void*, size_type n ); + + //! Construct n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC initialize_array_by( void* begin, const void* src, size_type n ); + + //! Construct n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC copy_array( void* dst, const void* src, size_type n ); + + //! Assign n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC assign_array( void* dst, const void* src, size_type n ); + + //! Destroy n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC destroy_array( void* begin, size_type n ); + + //! Exception-aware helper class for filling a segment by exception-danger operators of user class + class internal_loop_guide : internal::no_copy { + public: + const pointer array; + const size_type n; + size_type i; + internal_loop_guide(size_type ntrials, void *ptr) + : array(static_cast(ptr)), n(ntrials), i(0) {} + void init() { for(; i < n; ++i) new( &array[i] ) T(); } + void init(const void *src) { for(; i < n; ++i) new( &array[i] ) T(*static_cast(src)); } + void copy(const void *src) { for(; i < n; ++i) new( &array[i] ) T(static_cast(src)[i]); } + void assign(const void *src) { for(; i < n; ++i) array[i] = static_cast(src)[i]; } + //TODO: rename to construct_range + template void iterate(I &src) { for(; i < n; ++i, ++src) new( &array[i] ) T( *src ); } + ~internal_loop_guide() { + if(i < n) // if exception raised, do zeroing on the rest of items + std::memset(array+i, 0, (n-i)*sizeof(value_type)); + } + }; +}; + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#pragma warning (push) +#pragma warning (disable: 4701) // potentially uninitialized local variable "old" +#endif +template +void concurrent_vector::shrink_to_fit() { + internal_segments_table old; + __TBB_TRY { + if( internal_compact( sizeof(T), &old, &destroy_array, ©_array ) ) + internal_free_segments( old.table, pointers_per_long_table, old.first_block ); // free joined and unnecessary segments + } __TBB_CATCH(...) { + if( old.first_block ) // free segment allocated for compacting. Only for support of exceptions in ctor of user T[ype] + internal_free_segments( old.table, 1, old.first_block ); + __TBB_RETHROW(); + } +} +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) +#pragma warning (pop) +#endif // warning 4701 is back + +template +void concurrent_vector::internal_free_segments(void *table[], segment_index_t k, segment_index_t first_block) { + // Free the arrays + while( k > first_block ) { + --k; + T* array = static_cast(table[k]); + table[k] = NULL; + if( array > internal::vector_allocation_error_flag ) // check for correct segment pointer + this->my_allocator.deallocate( array, segment_size(k) ); + } + T* array = static_cast(table[0]); + if( array > internal::vector_allocation_error_flag ) { + __TBB_ASSERT( first_block > 0, NULL ); + while(k > 0) table[--k] = NULL; + this->my_allocator.deallocate( array, segment_size(first_block) ); + } +} + +template +T& concurrent_vector::internal_subscript( size_type index ) const { + __TBB_ASSERT( index < my_early_size, "index out of bounds" ); + size_type j = index; + segment_index_t k = segment_base_index_of( j ); + __TBB_ASSERT( (segment_t*)my_segment != my_storage || k < pointers_per_short_table, "index is being allocated" ); + // no need in __TBB_load_with_acquire since thread works in own space or gets + T* array = static_cast( tbb::internal::itt_hide_load_word(my_segment[k].array)); + __TBB_ASSERT( array != internal::vector_allocation_error_flag, "the instance is broken by bad allocation. Use at() instead" ); + __TBB_ASSERT( array, "index is being allocated" ); + return array[j]; +} + +template +T& concurrent_vector::internal_subscript_with_exceptions( size_type index ) const { + if( index >= my_early_size ) + internal::throw_exception(internal::eid_out_of_range); // throw std::out_of_range + size_type j = index; + segment_index_t k = segment_base_index_of( j ); + if( (segment_t*)my_segment == my_storage && k >= pointers_per_short_table ) + internal::throw_exception(internal::eid_segment_range_error); // throw std::range_error + void *array = my_segment[k].array; // no need in __TBB_load_with_acquire + if( array <= internal::vector_allocation_error_flag ) // check for correct segment pointer + internal::throw_exception(internal::eid_index_range_error); // throw std::range_error + return static_cast(array)[j]; +} + +template template +void concurrent_vector::internal_assign_iterators(I first, I last) { + __TBB_ASSERT(my_early_size == 0, NULL); + size_type n = std::distance(first, last); + if( !n ) return; + internal_reserve(n, sizeof(T), max_size()); + my_early_size = n; + segment_index_t k = 0; + size_type sz = segment_size( my_first_block ); + while( sz < n ) { + internal_loop_guide loop(sz, my_segment[k].array); + loop.iterate(first); + n -= sz; + if( !k ) k = my_first_block; + else { ++k; sz <<= 1; } + } + internal_loop_guide loop(n, my_segment[k].array); + loop.iterate(first); +} + +template +void concurrent_vector::initialize_array( void* begin, const void *, size_type n ) { + internal_loop_guide loop(n, begin); loop.init(); +} + +template +void concurrent_vector::initialize_array_by( void* begin, const void *src, size_type n ) { + internal_loop_guide loop(n, begin); loop.init(src); +} + +template +void concurrent_vector::copy_array( void* dst, const void* src, size_type n ) { + internal_loop_guide loop(n, dst); loop.copy(src); +} + +template +void concurrent_vector::assign_array( void* dst, const void* src, size_type n ) { + internal_loop_guide loop(n, dst); loop.assign(src); +} + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warning + #pragma warning (push) + #pragma warning (disable: 4189) +#endif +template +void concurrent_vector::destroy_array( void* begin, size_type n ) { + T* array = static_cast(begin); + for( size_type j=n; j>0; --j ) + array[j-1].~T(); // destructors are supposed to not throw any exceptions +} +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4189 is back + +// concurrent_vector's template functions +template +inline bool operator==(const concurrent_vector &a, const concurrent_vector &b) { + // Simply: return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin()); + if(a.size() != b.size()) return false; + typename concurrent_vector::const_iterator i(a.begin()); + typename concurrent_vector::const_iterator j(b.begin()); + for(; i != a.end(); ++i, ++j) + if( !(*i == *j) ) return false; + return true; +} + +template +inline bool operator!=(const concurrent_vector &a, const concurrent_vector &b) +{ return !(a == b); } + +template +inline bool operator<(const concurrent_vector &a, const concurrent_vector &b) +{ return (std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end())); } + +template +inline bool operator>(const concurrent_vector &a, const concurrent_vector &b) +{ return b < a; } + +template +inline bool operator<=(const concurrent_vector &a, const concurrent_vector &b) +{ return !(b < a); } + +template +inline bool operator>=(const concurrent_vector &a, const concurrent_vector &b) +{ return !(a < b); } + +template +inline void swap(concurrent_vector &a, concurrent_vector &b) +{ a.swap( b ); } + +} // namespace tbb + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && defined(_Wp64) + #pragma warning (pop) +#endif // warning 4267 is back + +#endif /* __TBB_concurrent_vector_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/critical_section.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/critical_section.h new file mode 100644 index 0000000000..0522c4c0c0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/critical_section.h @@ -0,0 +1,141 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_CRITICAL_SECTION_H_ +#define _TBB_CRITICAL_SECTION_H_ + +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#else +#include +#include +#endif // _WIN32||WIN64 + +#include "tbb_stddef.h" +#include "tbb_thread.h" +#include "tbb_exception.h" + +#include "tbb_profiling.h" + +namespace tbb { + + namespace internal { +class critical_section_v4 : internal::no_copy { +#if _WIN32||_WIN64 + CRITICAL_SECTION my_impl; +#else + pthread_mutex_t my_impl; +#endif + tbb_thread::id my_tid; +public: + + void __TBB_EXPORTED_METHOD internal_construct(); + + critical_section_v4() { +#if _WIN32||_WIN64 + InitializeCriticalSectionEx( &my_impl, 4000, 0 ); +#else + pthread_mutex_init(&my_impl, NULL); +#endif + internal_construct(); + } + + ~critical_section_v4() { + __TBB_ASSERT(my_tid == tbb_thread::id(), "Destroying a still-held critical section"); +#if _WIN32||_WIN64 + DeleteCriticalSection(&my_impl); +#else + pthread_mutex_destroy(&my_impl); +#endif + } + + class scoped_lock : internal::no_copy { + private: + critical_section_v4 &my_crit; + public: + scoped_lock( critical_section_v4& lock_me) :my_crit(lock_me) { + my_crit.lock(); + } + + ~scoped_lock() { + my_crit.unlock(); + } + }; + + void lock() { + tbb_thread::id local_tid = this_tbb_thread::get_id(); + if(local_tid == my_tid) throw_exception( eid_improper_lock ); +#if _WIN32||_WIN64 + EnterCriticalSection( &my_impl ); +#else + int rval = pthread_mutex_lock(&my_impl); + __TBB_ASSERT_EX(!rval, "critical_section::lock: pthread_mutex_lock failed"); +#endif + __TBB_ASSERT(my_tid == tbb_thread::id(), NULL); + my_tid = local_tid; + } + + bool try_lock() { + bool gotlock; + tbb_thread::id local_tid = this_tbb_thread::get_id(); + if(local_tid == my_tid) return false; +#if _WIN32||_WIN64 + gotlock = TryEnterCriticalSection( &my_impl ) != 0; +#else + int rval = pthread_mutex_trylock(&my_impl); + // valid returns are 0 (locked) and [EBUSY] + __TBB_ASSERT(rval == 0 || rval == EBUSY, "critical_section::trylock: pthread_mutex_trylock failed"); + gotlock = rval == 0; +#endif + if(gotlock) { + my_tid = local_tid; + } + return gotlock; + } + + void unlock() { + __TBB_ASSERT(this_tbb_thread::get_id() == my_tid, "thread unlocking critical_section is not thread that locked it"); + my_tid = tbb_thread::id(); +#if _WIN32||_WIN64 + LeaveCriticalSection( &my_impl ); +#else + int rval = pthread_mutex_unlock(&my_impl); + __TBB_ASSERT_EX(!rval, "critical_section::unlock: pthread_mutex_unlock failed"); +#endif + } + + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = true; +}; // critical_section_v4 +} // namespace internal +typedef internal::critical_section_v4 critical_section; + +__TBB_DEFINE_PROFILING_SET_NAME(critical_section) +} // namespace tbb +#endif // _TBB_CRITICAL_SECTION_H_ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/enumerable_thread_specific.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/enumerable_thread_specific.h new file mode 100644 index 0000000000..3ad043854d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/enumerable_thread_specific.h @@ -0,0 +1,1003 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_enumerable_thread_specific_H +#define __TBB_enumerable_thread_specific_H + +#include "concurrent_vector.h" +#include "tbb_thread.h" +#include "tbb_allocator.h" +#include "cache_aligned_allocator.h" +#include "aligned_space.h" +#include // for memcpy + +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#else +#include +#endif + +namespace tbb { + +//! enum for selecting between single key and key-per-instance versions +enum ets_key_usage_type { ets_key_per_instance, ets_no_key }; + +namespace interface6 { + + //! @cond + namespace internal { + + template + class ets_base: tbb::internal::no_copy { + protected: +#if _WIN32||_WIN64 + typedef DWORD key_type; +#else + typedef pthread_t key_type; +#endif +#if __TBB_PROTECTED_NESTED_CLASS_BROKEN + public: +#endif + struct slot; + + struct array { + array* next; + size_t lg_size; + slot& at( size_t k ) { + return ((slot*)(void*)(this+1))[k]; + } + size_t size() const {return (size_t)1<>(8*sizeof(size_t)-lg_size); + } + }; + struct slot { + key_type key; + void* ptr; + bool empty() const {return !key;} + bool match( key_type k ) const {return key==k;} + bool claim( key_type k ) { + __TBB_ASSERT(sizeof(tbb::atomic)==sizeof(key_type), NULL); + return tbb::internal::punned_cast*>(&key)->compare_and_swap(k,0)==0; + } + }; +#if __TBB_PROTECTED_NESTED_CLASS_BROKEN + protected: +#endif + + static key_type key_of_current_thread() { + tbb::tbb_thread::id id = tbb::this_tbb_thread::get_id(); + key_type k; + memcpy( &k, &id, sizeof(k) ); + return k; + } + + //! Root of linked list of arrays of decreasing size. + /** NULL if and only if my_count==0. + Each array in the list is half the size of its predecessor. */ + atomic my_root; + atomic my_count; + virtual void* create_local() = 0; + virtual void* create_array(size_t _size) = 0; // _size in bytes + virtual void free_array(void* ptr, size_t _size) = 0; // _size in bytes + array* allocate( size_t lg_size ) { + size_t n = 1<(create_array( sizeof(array)+n*sizeof(slot) )); + a->lg_size = lg_size; + std::memset( a+1, 0, n*sizeof(slot) ); + return a; + } + void free(array* a) { + size_t n = 1<<(a->lg_size); + free_array( (void *)a, size_t(sizeof(array)+n*sizeof(slot)) ); + } + static size_t hash( key_type k ) { + // Multiplicative hashing. Client should use *upper* bits. + // casts required for Mac gcc4.* compiler + return uintptr_t(k)*tbb::internal::select_size_t_constant<0x9E3779B9,0x9E3779B97F4A7C15ULL>::value; + } + + ets_base() {my_root=NULL; my_count=0;} + virtual ~ets_base(); // g++ complains if this is not virtual... + void* table_lookup( bool& exists ); + void table_clear(); + slot& table_find( key_type k ) { + size_t h = hash(k); + array* r = my_root; + size_t mask = r->mask(); + for(size_t i = r->start(h);;i=(i+1)&mask) { + slot& s = r->at(i); + if( s.empty() || s.match(k) ) + return s; + } + } + void table_reserve_for_copy( const ets_base& other ) { + __TBB_ASSERT(!my_root,NULL); + __TBB_ASSERT(!my_count,NULL); + if( other.my_root ) { + array* a = allocate(other.my_root->lg_size); + a->next = NULL; + my_root = a; + my_count = other.my_count; + } + } + }; + + template + ets_base::~ets_base() { + __TBB_ASSERT(!my_root, NULL); + } + + template + void ets_base::table_clear() { + while( array* r = my_root ) { + my_root = r->next; + free(r); + } + my_count = 0; + } + + template + void* ets_base::table_lookup( bool& exists ) { + const key_type k = key_of_current_thread(); + + __TBB_ASSERT(k!=0,NULL); + void* found; + size_t h = hash(k); + for( array* r=my_root; r; r=r->next ) { + size_t mask=r->mask(); + for(size_t i = r->start(h); ;i=(i+1)&mask) { + slot& s = r->at(i); + if( s.empty() ) break; + if( s.match(k) ) { + if( r==my_root ) { + // Success at top level + exists = true; + return s.ptr; + } else { + // Success at some other level. Need to insert at top level. + exists = true; + found = s.ptr; + goto insert; + } + } + } + } + // Key does not yet exist + exists = false; + found = create_local(); + { + size_t c = ++my_count; + array* r = my_root; + if( !r || c>r->size()/2 ) { + size_t s = r ? r->lg_size : 2; + while( c>size_t(1)<<(s-1) ) ++s; + array* a = allocate(s); + for(;;) { + a->next = my_root; + array* new_r = my_root.compare_and_swap(a,r); + if( new_r==r ) break; + if( new_r->lg_size>=s ) { + // Another thread inserted an equal or bigger array, so our array is superfluous. + free(a); + break; + } + r = new_r; + } + } + } + insert: + // Guaranteed to be room for it, and it is not present, so search for empty slot and grab it. + array* ir = my_root; + size_t mask = ir->mask(); + for(size_t i = ir->start(h);;i=(i+1)&mask) { + slot& s = ir->at(i); + if( s.empty() ) { + if( s.claim(k) ) { + s.ptr = found; + return found; + } + } + } + } + + //! Specialization that exploits native TLS + template <> + class ets_base: protected ets_base { + typedef ets_base super; +#if _WIN32||_WIN64 +#if __TBB_WIN8UI_SUPPORT + typedef DWORD tls_key_t; + void create_key() { my_key = FlsAlloc(NULL); } + void destroy_key() { FlsFree(my_key); } + void set_tls(void * value) { FlsSetValue(my_key, (LPVOID)value); } + void* get_tls() { return (void *)FlsGetValue(my_key); } +#else + typedef DWORD tls_key_t; + void create_key() { my_key = TlsAlloc(); } + void destroy_key() { TlsFree(my_key); } + void set_tls(void * value) { TlsSetValue(my_key, (LPVOID)value); } + void* get_tls() { return (void *)TlsGetValue(my_key); } +#endif +#else + typedef pthread_key_t tls_key_t; + void create_key() { pthread_key_create(&my_key, NULL); } + void destroy_key() { pthread_key_delete(my_key); } + void set_tls( void * value ) const { pthread_setspecific(my_key, value); } + void* get_tls() const { return pthread_getspecific(my_key); } +#endif + tls_key_t my_key; + virtual void* create_local() = 0; + virtual void* create_array(size_t _size) = 0; // _size in bytes + virtual void free_array(void* ptr, size_t _size) = 0; // size in bytes + public: + ets_base() {create_key();} + ~ets_base() {destroy_key();} + void* table_lookup( bool& exists ) { + void* found = get_tls(); + if( found ) { + exists=true; + } else { + found = super::table_lookup(exists); + set_tls(found); + } + return found; + } + void table_clear() { + destroy_key(); + create_key(); + super::table_clear(); + } + }; + + //! Random access iterator for traversing the thread local copies. + template< typename Container, typename Value > + class enumerable_thread_specific_iterator +#if defined(_WIN64) && defined(_MSC_VER) + // Ensure that Microsoft's internal template function _Val_type works correctly. + : public std::iterator +#endif /* defined(_WIN64) && defined(_MSC_VER) */ + { + //! current position in the concurrent_vector + + Container *my_container; + typename Container::size_type my_index; + mutable Value *my_value; + + template + friend enumerable_thread_specific_iterator operator+( ptrdiff_t offset, + const enumerable_thread_specific_iterator& v ); + + template + friend bool operator==( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ); + + template + friend bool operator<( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ); + + template + friend ptrdiff_t operator-( const enumerable_thread_specific_iterator& i, const enumerable_thread_specific_iterator& j ); + + template + friend class enumerable_thread_specific_iterator; + + public: + + enumerable_thread_specific_iterator( const Container &container, typename Container::size_type index ) : + my_container(&const_cast(container)), my_index(index), my_value(NULL) {} + + //! Default constructor + enumerable_thread_specific_iterator() : my_container(NULL), my_index(0), my_value(NULL) {} + + template + enumerable_thread_specific_iterator( const enumerable_thread_specific_iterator& other ) : + my_container( other.my_container ), my_index( other.my_index), my_value( const_cast(other.my_value) ) {} + + enumerable_thread_specific_iterator operator+( ptrdiff_t offset ) const { + return enumerable_thread_specific_iterator(*my_container, my_index + offset); + } + + enumerable_thread_specific_iterator &operator+=( ptrdiff_t offset ) { + my_index += offset; + my_value = NULL; + return *this; + } + + enumerable_thread_specific_iterator operator-( ptrdiff_t offset ) const { + return enumerable_thread_specific_iterator( *my_container, my_index-offset ); + } + + enumerable_thread_specific_iterator &operator-=( ptrdiff_t offset ) { + my_index -= offset; + my_value = NULL; + return *this; + } + + Value& operator*() const { + Value* value = my_value; + if( !value ) { + value = my_value = reinterpret_cast(&(*my_container)[my_index].value); + } + __TBB_ASSERT( value==reinterpret_cast(&(*my_container)[my_index].value), "corrupt cache" ); + return *value; + } + + Value& operator[]( ptrdiff_t k ) const { + return (*my_container)[my_index + k].value; + } + + Value* operator->() const {return &operator*();} + + enumerable_thread_specific_iterator& operator++() { + ++my_index; + my_value = NULL; + return *this; + } + + enumerable_thread_specific_iterator& operator--() { + --my_index; + my_value = NULL; + return *this; + } + + //! Post increment + enumerable_thread_specific_iterator operator++(int) { + enumerable_thread_specific_iterator result = *this; + ++my_index; + my_value = NULL; + return result; + } + + //! Post decrement + enumerable_thread_specific_iterator operator--(int) { + enumerable_thread_specific_iterator result = *this; + --my_index; + my_value = NULL; + return result; + } + + // STL support + typedef ptrdiff_t difference_type; + typedef Value value_type; + typedef Value* pointer; + typedef Value& reference; + typedef std::random_access_iterator_tag iterator_category; + }; + + template + enumerable_thread_specific_iterator operator+( ptrdiff_t offset, + const enumerable_thread_specific_iterator& v ) { + return enumerable_thread_specific_iterator( v.my_container, v.my_index + offset ); + } + + template + bool operator==( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return i.my_index==j.my_index && i.my_container == j.my_container; + } + + template + bool operator!=( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return !(i==j); + } + + template + bool operator<( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return i.my_index + bool operator>( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return j + bool operator>=( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return !(i + bool operator<=( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return !(j + ptrdiff_t operator-( const enumerable_thread_specific_iterator& i, + const enumerable_thread_specific_iterator& j ) { + return i.my_index-j.my_index; + } + + template + class segmented_iterator +#if defined(_WIN64) && defined(_MSC_VER) + : public std::iterator +#endif + { + template + friend bool operator==(const segmented_iterator& i, const segmented_iterator& j); + + template + friend bool operator!=(const segmented_iterator& i, const segmented_iterator& j); + + template + friend class segmented_iterator; + + public: + + segmented_iterator() {my_segcont = NULL;} + + segmented_iterator( const SegmentedContainer& _segmented_container ) : + my_segcont(const_cast(&_segmented_container)), + outer_iter(my_segcont->end()) { } + + ~segmented_iterator() {} + + typedef typename SegmentedContainer::iterator outer_iterator; + typedef typename SegmentedContainer::value_type InnerContainer; + typedef typename InnerContainer::iterator inner_iterator; + + // STL support + typedef ptrdiff_t difference_type; + typedef Value value_type; + typedef typename SegmentedContainer::size_type size_type; + typedef Value* pointer; + typedef Value& reference; + typedef std::input_iterator_tag iterator_category; + + // Copy Constructor + template + segmented_iterator(const segmented_iterator& other) : + my_segcont(other.my_segcont), + outer_iter(other.outer_iter), + // can we assign a default-constructed iterator to inner if we're at the end? + inner_iter(other.inner_iter) + {} + + // assignment + template + segmented_iterator& operator=( const segmented_iterator& other) { + if(this != &other) { + my_segcont = other.my_segcont; + outer_iter = other.outer_iter; + if(outer_iter != my_segcont->end()) inner_iter = other.inner_iter; + } + return *this; + } + + // allow assignment of outer iterator to segmented iterator. Once it is + // assigned, move forward until a non-empty inner container is found or + // the end of the outer container is reached. + segmented_iterator& operator=(const outer_iterator& new_outer_iter) { + __TBB_ASSERT(my_segcont != NULL, NULL); + // check that this iterator points to something inside the segmented container + for(outer_iter = new_outer_iter ;outer_iter!=my_segcont->end(); ++outer_iter) { + if( !outer_iter->empty() ) { + inner_iter = outer_iter->begin(); + break; + } + } + return *this; + } + + // pre-increment + segmented_iterator& operator++() { + advance_me(); + return *this; + } + + // post-increment + segmented_iterator operator++(int) { + segmented_iterator tmp = *this; + operator++(); + return tmp; + } + + bool operator==(const outer_iterator& other_outer) const { + __TBB_ASSERT(my_segcont != NULL, NULL); + return (outer_iter == other_outer && + (outer_iter == my_segcont->end() || inner_iter == outer_iter->begin())); + } + + bool operator!=(const outer_iterator& other_outer) const { + return !operator==(other_outer); + + } + + // (i)* RHS + reference operator*() const { + __TBB_ASSERT(my_segcont != NULL, NULL); + __TBB_ASSERT(outer_iter != my_segcont->end(), "Dereferencing a pointer at end of container"); + __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // should never happen + return *inner_iter; + } + + // i-> + pointer operator->() const { return &operator*();} + + private: + SegmentedContainer* my_segcont; + outer_iterator outer_iter; + inner_iterator inner_iter; + + void advance_me() { + __TBB_ASSERT(my_segcont != NULL, NULL); + __TBB_ASSERT(outer_iter != my_segcont->end(), NULL); // not true if there are no inner containers + __TBB_ASSERT(inner_iter != outer_iter->end(), NULL); // not true if the inner containers are all empty. + ++inner_iter; + while(inner_iter == outer_iter->end() && ++outer_iter != my_segcont->end()) { + inner_iter = outer_iter->begin(); + } + } + }; // segmented_iterator + + template + bool operator==( const segmented_iterator& i, + const segmented_iterator& j ) { + if(i.my_segcont != j.my_segcont) return false; + if(i.my_segcont == NULL) return true; + if(i.outer_iter != j.outer_iter) return false; + if(i.outer_iter == i.my_segcont->end()) return true; + return i.inner_iter == j.inner_iter; + } + + // != + template + bool operator!=( const segmented_iterator& i, + const segmented_iterator& j ) { + return !(i==j); + } + + template + struct destruct_only: tbb::internal::no_copy { + tbb::aligned_space value; + ~destruct_only() {value.begin()[0].~T();} + }; + + template + struct construct_by_default: tbb::internal::no_assign { + void construct(void*where) {new(where) T();} // C++ note: the () in T() ensure zero initialization. + construct_by_default( int ) {} + }; + + template + struct construct_by_exemplar: tbb::internal::no_assign { + const T exemplar; + void construct(void*where) {new(where) T(exemplar);} + construct_by_exemplar( const T& t ) : exemplar(t) {} + }; + + template + struct construct_by_finit: tbb::internal::no_assign { + Finit f; + void construct(void* where) {new(where) T(f());} + construct_by_finit( const Finit& f_ ) : f(f_) {} + }; + + // storage for initialization function pointer + template + class callback_base { + public: + // Clone *this + virtual callback_base* clone() = 0; + // Destruct and free *this + virtual void destroy() = 0; + // Need virtual destructor to satisfy GCC compiler warning + virtual ~callback_base() { } + // Construct T at where + virtual void construct(void* where) = 0; + }; + + template + class callback_leaf: public callback_base, Constructor { + template callback_leaf( const X& x ) : Constructor(x) {} + + typedef typename tbb::tbb_allocator my_allocator_type; + + /*override*/ callback_base* clone() { + void* where = my_allocator_type().allocate(1); + return new(where) callback_leaf(*this); + } + + /*override*/ void destroy() { + my_allocator_type().destroy(this); + my_allocator_type().deallocate(this,1); + } + + /*override*/ void construct(void* where) { + Constructor::construct(where); + } + public: + template + static callback_base* make( const X& x ) { + void* where = my_allocator_type().allocate(1); + return new(where) callback_leaf(x); + } + }; + + //! Template for adding padding in order to avoid false sharing + /** ModularSize should be sizeof(U) modulo the cache line size. + All maintenance of the space will be done explicitly on push_back, + and all thread local copies must be destroyed before the concurrent + vector is deleted. + */ + template + struct ets_element { + char value[ModularSize==0 ? sizeof(U) : sizeof(U)+(tbb::internal::NFS_MaxLineSize-ModularSize)]; + void unconstruct() { + tbb::internal::punned_cast(&value)->~U(); + } + }; + + } // namespace internal + //! @endcond + + //! The enumerable_thread_specific container + /** enumerable_thread_specific has the following properties: + - thread-local copies are lazily created, with default, exemplar or function initialization. + - thread-local copies do not move (during lifetime, and excepting clear()) so the address of a copy is invariant. + - the contained objects need not have operator=() defined if combine is not used. + - enumerable_thread_specific containers may be copy-constructed or assigned. + - thread-local copies can be managed by hash-table, or can be accessed via TLS storage for speed. + - outside of parallel contexts, the contents of all thread-local copies are accessible by iterator or using combine or combine_each methods + + @par Segmented iterator + When the thread-local objects are containers with input_iterators defined, a segmented iterator may + be used to iterate over all the elements of all thread-local copies. + + @par combine and combine_each + - Both methods are defined for enumerable_thread_specific. + - combine() requires the the type T have operator=() defined. + - neither method modifies the contents of the object (though there is no guarantee that the applied methods do not modify the object.) + - Both are evaluated in serial context (the methods are assumed to be non-benign.) + + @ingroup containers */ + template , + ets_key_usage_type ETS_key_type=ets_no_key > + class enumerable_thread_specific: internal::ets_base { + + template friend class enumerable_thread_specific; + + typedef internal::ets_element padded_element; + + //! A generic range, used to create range objects from the iterators + template + class generic_range_type: public blocked_range { + public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef I iterator; + typedef ptrdiff_t difference_type; + generic_range_type( I begin_, I end_, size_t grainsize_ = 1) : blocked_range(begin_,end_,grainsize_) {} + template + generic_range_type( const generic_range_type& r) : blocked_range(r.begin(),r.end(),r.grainsize()) {} + generic_range_type( generic_range_type& r, split ) : blocked_range(r,split()) {} + }; + + typedef typename Allocator::template rebind< padded_element >::other padded_allocator_type; + typedef tbb::concurrent_vector< padded_element, padded_allocator_type > internal_collection_type; + + internal::callback_base *my_construct_callback; + + internal_collection_type my_locals; + + /*override*/ void* create_local() { +#if TBB_DEPRECATED + void* lref = &my_locals[my_locals.push_back(padded_element())]; +#else + void* lref = &*my_locals.push_back(padded_element()); +#endif + my_construct_callback->construct(lref); + return lref; + } + + void unconstruct_locals() { + for(typename internal_collection_type::iterator cvi = my_locals.begin(); cvi != my_locals.end(); ++cvi) { + cvi->unconstruct(); + } + } + + typedef typename Allocator::template rebind< uintptr_t >::other array_allocator_type; + + // _size is in bytes + /*override*/ void* create_array(size_t _size) { + size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t); + return array_allocator_type().allocate(nelements); + } + + /*override*/ void free_array( void* _ptr, size_t _size) { + size_t nelements = (_size + sizeof(uintptr_t) -1) / sizeof(uintptr_t); + array_allocator_type().deallocate( reinterpret_cast(_ptr),nelements); + } + + public: + + //! Basic types + typedef Allocator allocator_type; + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T* pointer; + typedef const T* const_pointer; + typedef typename internal_collection_type::size_type size_type; + typedef typename internal_collection_type::difference_type difference_type; + + // Iterator types + typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, value_type > iterator; + typedef typename internal::enumerable_thread_specific_iterator< internal_collection_type, const value_type > const_iterator; + + // Parallel range types + typedef generic_range_type< iterator > range_type; + typedef generic_range_type< const_iterator > const_range_type; + + //! Default constructor. Each local instance of T is default constructed. + enumerable_thread_specific() : + my_construct_callback( internal::callback_leaf >::make(/*dummy argument*/0) ) + {} + + //! Constructor with initializer functor. Each local instance of T is constructed by T(finit()). + template + enumerable_thread_specific( Finit finit ) : + my_construct_callback( internal::callback_leaf >::make( finit ) ) + {} + + //! Constructor with exemplar. Each local instance of T is copied-constructed from the exemplar. + enumerable_thread_specific(const T& exemplar) : + my_construct_callback( internal::callback_leaf >::make( exemplar ) ) + {} + + //! Destructor + ~enumerable_thread_specific() { + my_construct_callback->destroy(); + this->clear(); // deallocation before the derived class is finished destructing + // So free(array *) is still accessible + } + + //! returns reference to local, discarding exists + reference local() { + bool exists; + return local(exists); + } + + //! Returns reference to calling thread's local copy, creating one if necessary + reference local(bool& exists) { + void* ptr = this->table_lookup(exists); + return *(T*)ptr; + } + + //! Get the number of local copies + size_type size() const { return my_locals.size(); } + + //! true if there have been no local copies created + bool empty() const { return my_locals.empty(); } + + //! begin iterator + iterator begin() { return iterator( my_locals, 0 ); } + //! end iterator + iterator end() { return iterator(my_locals, my_locals.size() ); } + + //! begin const iterator + const_iterator begin() const { return const_iterator(my_locals, 0); } + + //! end const iterator + const_iterator end() const { return const_iterator(my_locals, my_locals.size()); } + + //! Get range for parallel algorithms + range_type range( size_t grainsize=1 ) { return range_type( begin(), end(), grainsize ); } + + //! Get const range for parallel algorithms + const_range_type range( size_t grainsize=1 ) const { return const_range_type( begin(), end(), grainsize ); } + + //! Destroys local copies + void clear() { + unconstruct_locals(); + my_locals.clear(); + this->table_clear(); + // callback is not destroyed + // exemplar is not destroyed + } + + private: + + template + void internal_copy( const enumerable_thread_specific& other); + + public: + + template + enumerable_thread_specific( const enumerable_thread_specific& other ) : internal::ets_base () + { + internal_copy(other); + } + + enumerable_thread_specific( const enumerable_thread_specific& other ) : internal::ets_base () + { + internal_copy(other); + } + + private: + + template + enumerable_thread_specific & + internal_assign(const enumerable_thread_specific& other) { + if(static_cast( this ) != static_cast( &other )) { + this->clear(); + my_construct_callback->destroy(); + my_construct_callback = 0; + internal_copy( other ); + } + return *this; + } + + public: + + // assignment + enumerable_thread_specific& operator=(const enumerable_thread_specific& other) { + return internal_assign(other); + } + + template + enumerable_thread_specific& operator=(const enumerable_thread_specific& other) + { + return internal_assign(other); + } + + // combine_func_t has signature T(T,T) or T(const T&, const T&) + template + T combine(combine_func_t f_combine) { + if(begin() == end()) { + internal::destruct_only location; + my_construct_callback->construct(location.value.begin()); + return *location.value.begin(); + } + const_iterator ci = begin(); + T my_result = *ci; + while(++ci != end()) + my_result = f_combine( my_result, *ci ); + return my_result; + } + + // combine_func_t has signature void(T) or void(const T&) + template + void combine_each(combine_func_t f_combine) { + for(const_iterator ci = begin(); ci != end(); ++ci) { + f_combine( *ci ); + } + } + + }; // enumerable_thread_specific + + template + template + void enumerable_thread_specific::internal_copy( const enumerable_thread_specific& other) { + // Initialize my_construct_callback first, so that it is valid even if rest of this routine throws an exception. + my_construct_callback = other.my_construct_callback->clone(); + + typedef internal::ets_base base; + __TBB_ASSERT(my_locals.size()==0,NULL); + this->table_reserve_for_copy( other ); + for( base::array* r=other.my_root; r; r=r->next ) { + for( size_t i=0; isize(); ++i ) { + base::slot& s1 = r->at(i); + if( !s1.empty() ) { + base::slot& s2 = this->table_find(s1.key); + if( s2.empty() ) { +#if TBB_DEPRECATED + void* lref = &my_locals[my_locals.push_back(padded_element())]; +#else + void* lref = &*my_locals.push_back(padded_element()); +#endif + s2.ptr = new(lref) T(*(U*)s1.ptr); + s2.key = s1.key; + } else { + // Skip the duplicate + } + } + } + } + } + + template< typename Container > + class flattened2d { + + // This intermediate typedef is to address issues with VC7.1 compilers + typedef typename Container::value_type conval_type; + + public: + + //! Basic types + typedef typename conval_type::size_type size_type; + typedef typename conval_type::difference_type difference_type; + typedef typename conval_type::allocator_type allocator_type; + typedef typename conval_type::value_type value_type; + typedef typename conval_type::reference reference; + typedef typename conval_type::const_reference const_reference; + typedef typename conval_type::pointer pointer; + typedef typename conval_type::const_pointer const_pointer; + + typedef typename internal::segmented_iterator iterator; + typedef typename internal::segmented_iterator const_iterator; + + flattened2d( const Container &c, typename Container::const_iterator b, typename Container::const_iterator e ) : + my_container(const_cast(&c)), my_begin(b), my_end(e) { } + + flattened2d( const Container &c ) : + my_container(const_cast(&c)), my_begin(c.begin()), my_end(c.end()) { } + + iterator begin() { return iterator(*my_container) = my_begin; } + iterator end() { return iterator(*my_container) = my_end; } + const_iterator begin() const { return const_iterator(*my_container) = my_begin; } + const_iterator end() const { return const_iterator(*my_container) = my_end; } + + size_type size() const { + size_type tot_size = 0; + for(typename Container::const_iterator i = my_begin; i != my_end; ++i) { + tot_size += i->size(); + } + return tot_size; + } + + private: + + Container *my_container; + typename Container::const_iterator my_begin; + typename Container::const_iterator my_end; + + }; + + template + flattened2d flatten2d(const Container &c, const typename Container::const_iterator b, const typename Container::const_iterator e) { + return flattened2d(c, b, e); + } + + template + flattened2d flatten2d(const Container &c) { + return flattened2d(c); + } + +} // interface6 + +namespace internal { +using interface6::internal::segmented_iterator; +} + +using interface6::enumerable_thread_specific; +using interface6::flattened2d; +using interface6::flatten2d; + +} // namespace tbb + +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/flow_graph.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/flow_graph.h new file mode 100644 index 0000000000..4a68e24531 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/flow_graph.h @@ -0,0 +1,2065 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_flow_graph_H +#define __TBB_flow_graph_H + +#include "tbb_stddef.h" +#include "atomic.h" +#include "spin_mutex.h" +#include "null_mutex.h" +#include "spin_rw_mutex.h" +#include "null_rw_mutex.h" +#include "task.h" +#include "concurrent_vector.h" +#include "internal/_aggregator_impl.h" + +// use the VC10 or gcc version of tuple if it is available. +#if __TBB_CPP11_TUPLE_PRESENT + #include +namespace tbb { + namespace flow { + using std::tuple; + using std::tuple_size; + using std::tuple_element; + using std::get; + } +} +#else + #include "compat/tuple" +#endif + +#include +#include + +/** @file + \brief The graph related classes and functions + + There are some applications that best express dependencies as messages + passed between nodes in a graph. These messages may contain data or + simply act as signals that a predecessors has completed. The graph + class and its associated node classes can be used to express such + applcations. +*/ + +namespace tbb { +namespace flow { + +//! An enumeration the provides the two most common concurrency levels: unlimited and serial +enum concurrency { unlimited = 0, serial = 1 }; + +namespace interface6 { + +namespace internal { + template class successor_cache; + template class broadcast_cache; + template class round_robin_cache; +} + +//! An empty class used for messages that mean "I'm done" +class continue_msg {}; + +template< typename T > class sender; +template< typename T > class receiver; +class continue_receiver; + +//! Pure virtual template class that defines a sender of messages of type T +template< typename T > +class sender { +public: + //! The output type of this sender + typedef T output_type; + + //! The successor type for this node + typedef receiver successor_type; + + virtual ~sender() {} + + //! Add a new successor to this node + virtual bool register_successor( successor_type &r ) = 0; + + //! Removes a successor from this node + virtual bool remove_successor( successor_type &r ) = 0; + + //! Request an item from the sender + virtual bool try_get( T & ) { return false; } + + //! Reserves an item in the sender + virtual bool try_reserve( T & ) { return false; } + + //! Releases the reserved item + virtual bool try_release( ) { return false; } + + //! Consumes the reserved item + virtual bool try_consume( ) { return false; } +}; + +template< typename T > class limiter_node; // needed for resetting decrementer +template< typename R, typename B > class run_and_put_task; + +static tbb::task * const SUCCESSFULLY_ENQUEUED = (task *)-1; + +// enqueue left task if necessary. Returns the non-enqueued task if there is one. +static inline tbb::task *combine_tasks( tbb::task * left, tbb::task * right) { + // if no RHS task, don't change left. + if(right == NULL) return left; + // right != NULL + if(left == NULL) return right; + if(left == SUCCESSFULLY_ENQUEUED) return right; + // left contains a task + if(right != SUCCESSFULLY_ENQUEUED) { + // both are valid tasks + tbb::task::enqueue(*left); + return right; + } + return left; +} + +//! Pure virtual template class that defines a receiver of messages of type T +template< typename T > +class receiver { +public: + //! The input type of this receiver + typedef T input_type; + + //! The predecessor type for this node + typedef sender predecessor_type; + + //! Destructor + virtual ~receiver() {} + + //! Put an item to the receiver + bool try_put( const T& t ) { + task *res = try_put_task(t); + if(!res) return false; + if (res != SUCCESSFULLY_ENQUEUED) task::enqueue(*res); + return true; + } + + //! put item to successor; return task to run the successor if possible. +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + virtual task *try_put_task(const T& t) = 0; +public: + + //! Add a predecessor to the node + virtual bool register_predecessor( predecessor_type & ) { return false; } + + //! Remove a predecessor from the node + virtual bool remove_predecessor( predecessor_type & ) { return false; } + +protected: + //! put receiver back in initial state + template friend class limiter_node; + virtual void reset_receiver() = 0; + + template + friend class internal::successor_cache; + virtual bool is_continue_receiver() { return false; } +}; + +//! Base class for receivers of completion messages +/** These receivers automatically reset, but cannot be explicitly waited on */ +class continue_receiver : public receiver< continue_msg > { +public: + + //! The input type + typedef continue_msg input_type; + + //! The predecessor type for this node + typedef sender< continue_msg > predecessor_type; + + //! Constructor + continue_receiver( int number_of_predecessors = 0 ) { + my_predecessor_count = my_initial_predecessor_count = number_of_predecessors; + my_current_count = 0; + } + + //! Copy constructor + continue_receiver( const continue_receiver& src ) : receiver() { + my_predecessor_count = my_initial_predecessor_count = src.my_initial_predecessor_count; + my_current_count = 0; + } + + //! Destructor + virtual ~continue_receiver() { } + + //! Increments the trigger threshold + /* override */ bool register_predecessor( predecessor_type & ) { + spin_mutex::scoped_lock l(my_mutex); + ++my_predecessor_count; + return true; + } + + //! Decrements the trigger threshold + /** Does not check to see if the removal of the predecessor now makes the current count + exceed the new threshold. So removing a predecessor while the graph is active can cause + unexpected results. */ + /* override */ bool remove_predecessor( predecessor_type & ) { + spin_mutex::scoped_lock l(my_mutex); + --my_predecessor_count; + return true; + } + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + // execute body is supposed to be too small to create a task for. + /* override */ task *try_put_task( const input_type & ) { + { + spin_mutex::scoped_lock l(my_mutex); + if ( ++my_current_count < my_predecessor_count ) + return SUCCESSFULLY_ENQUEUED; + else + my_current_count = 0; + } + task * res = execute(); + if(!res) return SUCCESSFULLY_ENQUEUED; + return res; + } + + spin_mutex my_mutex; + int my_predecessor_count; + int my_current_count; + int my_initial_predecessor_count; + // the friend declaration in the base class did not eliminate the "protected class" + // error in gcc 4.1.2 + template friend class limiter_node; + /*override*/void reset_receiver() { + my_current_count = 0; + } + + //! Does whatever should happen when the threshold is reached + /** This should be very fast or else spawn a task. This is + called while the sender is blocked in the try_put(). */ + virtual task * execute() = 0; + template + friend class internal::successor_cache; + /*override*/ bool is_continue_receiver() { return true; } +}; + +#include "internal/_flow_graph_impl.h" +using namespace internal::graph_policy_namespace; + +class graph; +class graph_node; + +template +class graph_iterator { + friend class graph; + friend class graph_node; +public: + typedef size_t size_type; + typedef GraphNodeType value_type; + typedef GraphNodeType* pointer; + typedef GraphNodeType& reference; + typedef const GraphNodeType& const_reference; + typedef std::forward_iterator_tag iterator_category; + + //! Default constructor + graph_iterator() : my_graph(NULL), current_node(NULL) {} + + //! Copy constructor + graph_iterator(const graph_iterator& other) : + my_graph(other.my_graph), current_node(other.current_node) + {} + + //! Assignment + graph_iterator& operator=(const graph_iterator& other) { + if (this != &other) { + my_graph = other.my_graph; + current_node = other.current_node; + } + return *this; + } + + //! Dereference + reference operator*() const; + + //! Dereference + pointer operator->() const; + + //! Equality + bool operator==(const graph_iterator& other) const { + return ((my_graph == other.my_graph) && (current_node == other.current_node)); + } + + //! Inequality + bool operator!=(const graph_iterator& other) const { return !(operator==(other)); } + + //! Pre-increment + graph_iterator& operator++() { + internal_forward(); + return *this; + } + + //! Post-increment + graph_iterator operator++(int) { + graph_iterator result = *this; + operator++(); + return result; + } + +private: + // the graph over which we are iterating + GraphContainerType *my_graph; + // pointer into my_graph's my_nodes list + pointer current_node; + + //! Private initializing constructor for begin() and end() iterators + graph_iterator(GraphContainerType *g, bool begin); + void internal_forward(); +}; + +//! The graph class +/** This class serves as a handle to the graph */ +class graph : tbb::internal::no_copy { + friend class graph_node; + + template< typename Body > + class run_task : public task { + public: + run_task( Body& body ) : my_body(body) {} + task *execute() { + my_body(); + return NULL; + } + private: + Body my_body; + }; + + template< typename Receiver, typename Body > + class run_and_put_task : public task { + public: + run_and_put_task( Receiver &r, Body& body ) : my_receiver(r), my_body(body) {} + task *execute() { + task *res = my_receiver.try_put_task( my_body() ); + if(res == SUCCESSFULLY_ENQUEUED) res = NULL; + return res; + } + private: + Receiver &my_receiver; + Body my_body; + }; + +public: + //! Constructs a graph with isolated task_group_context + explicit graph() : my_nodes(NULL), my_nodes_last(NULL) + { + own_context = true; + cancelled = false; + caught_exception = false; + my_context = new task_group_context(); + my_root_task = ( new ( task::allocate_root(*my_context) ) empty_task ); + my_root_task->set_ref_count(1); + } + + //! Constructs a graph with use_this_context as context + explicit graph(task_group_context& use_this_context) : + my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL) + { + own_context = false; + my_root_task = ( new ( task::allocate_root(*my_context) ) empty_task ); + my_root_task->set_ref_count(1); + } + + //! Destroys the graph. + /** Calls wait_for_all, then destroys the root task and context. */ + ~graph() { + wait_for_all(); + my_root_task->set_ref_count(0); + task::destroy( *my_root_task ); + if (own_context) delete my_context; + } + + //! Used to register that an external entity may still interact with the graph. + /** The graph will not return from wait_for_all until a matching number of decrement_wait_count calls + is made. */ + void increment_wait_count() { + if (my_root_task) + my_root_task->increment_ref_count(); + } + + //! Deregisters an external entity that may have interacted with the graph. + /** The graph will not return from wait_for_all until all the number of decrement_wait_count calls + matches the number of increment_wait_count calls. */ + void decrement_wait_count() { + if (my_root_task) + my_root_task->decrement_ref_count(); + } + + //! Spawns a task that runs a body and puts its output to a specific receiver + /** The task is spawned as a child of the graph. This is useful for running tasks + that need to block a wait_for_all() on the graph. For example a one-off source. */ + template< typename Receiver, typename Body > + void run( Receiver &r, Body body ) { + task::enqueue( * new ( task::allocate_additional_child_of( *my_root_task ) ) + run_and_put_task< Receiver, Body >( r, body ) ); + } + + //! Spawns a task that runs a function object + /** The task is spawned as a child of the graph. This is useful for running tasks + that need to block a wait_for_all() on the graph. For example a one-off source. */ + template< typename Body > + void run( Body body ) { + task::enqueue( * new ( task::allocate_additional_child_of( *my_root_task ) ) + run_task< Body >( body ) ); + } + + //! Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. + /** The waiting thread will go off and steal work while it is block in the wait_for_all. */ + void wait_for_all() { + cancelled = false; + caught_exception = false; + if (my_root_task) { +#if TBB_USE_EXCEPTIONS + try { +#endif + my_root_task->wait_for_all(); + cancelled = my_context->is_group_execution_cancelled(); +#if TBB_USE_EXCEPTIONS + } + catch(...) { + my_root_task->set_ref_count(1); + my_context->reset(); + caught_exception = true; + cancelled = true; + throw; + } +#endif + my_context->reset(); // consistent with behavior in catch() + my_root_task->set_ref_count(1); + } + } + + //! Returns the root task of the graph + task * root_task() { + return my_root_task; + } + + // ITERATORS + template + friend class graph_iterator; + + // Graph iterator typedefs + typedef graph_iterator iterator; + typedef graph_iterator const_iterator; + + // Graph iterator constructors + //! start iterator + iterator begin() { return iterator(this, true); } + //! end iterator + iterator end() { return iterator(this, false); } + //! start const iterator + const_iterator begin() const { return const_iterator(this, true); } + //! end const iterator + const_iterator end() const { return const_iterator(this, false); } + //! start const iterator + const_iterator cbegin() const { return const_iterator(this, true); } + //! end const iterator + const_iterator cend() const { return const_iterator(this, false); } + + //! return status of graph execution + bool is_cancelled() { return cancelled; } + bool exception_thrown() { return caught_exception; } + + // un-thread-safe state reset. + void reset(); + +private: + task *my_root_task; + task_group_context *my_context; + bool own_context; + bool cancelled; + bool caught_exception; + + graph_node *my_nodes, *my_nodes_last; + + spin_mutex nodelist_mutex; + void register_node(graph_node *n); + void remove_node(graph_node *n); + +}; + +template +graph_iterator::graph_iterator(C *g, bool begin) : my_graph(g), current_node(NULL) +{ + if (begin) current_node = my_graph->my_nodes; + //else it is an end iterator by default +} + +template +typename graph_iterator::reference graph_iterator::operator*() const { + __TBB_ASSERT(current_node, "graph_iterator at end"); + return *operator->(); +} + +template +typename graph_iterator::pointer graph_iterator::operator->() const { + return current_node; +} + + +template +void graph_iterator::internal_forward() { + if (current_node) current_node = current_node->next; +} + +//! The base of all graph nodes. +class graph_node : tbb::internal::no_assign { + friend class graph; + template + friend class graph_iterator; +protected: + graph& my_graph; + graph_node *next, *prev; +public: + graph_node(graph& g) : my_graph(g) { + my_graph.register_node(this); + } + virtual ~graph_node() { + my_graph.remove_node(this); + } + +protected: + virtual void reset() = 0; +}; + +inline void graph::register_node(graph_node *n) { + n->next = NULL; + { + spin_mutex::scoped_lock lock(nodelist_mutex); + n->prev = my_nodes_last; + if (my_nodes_last) my_nodes_last->next = n; + my_nodes_last = n; + if (!my_nodes) my_nodes = n; + } +} + +inline void graph::remove_node(graph_node *n) { + { + spin_mutex::scoped_lock lock(nodelist_mutex); + __TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes"); + if (n->prev) n->prev->next = n->next; + if (n->next) n->next->prev = n->prev; + if (my_nodes_last == n) my_nodes_last = n->prev; + if (my_nodes == n) my_nodes = n->next; + } + n->prev = n->next = NULL; +} + +inline void graph::reset() { + // reset context + if(my_context) my_context->reset(); + cancelled = false; + caught_exception = false; + // reset all the nodes comprising the graph + for(iterator ii = begin(); ii != end(); ++ii) { + graph_node *my_p = &(*ii); + my_p->reset(); + } +} + + +#include "internal/_flow_graph_node_impl.h" + +//! An executable node that acts as a source, i.e. it has no predecessors +template < typename Output > +class source_node : public graph_node, public sender< Output > { +protected: + using graph_node::my_graph; +public: + //! The type of the output message, which is complete + typedef Output output_type; + + //! The type of successors of this node + typedef receiver< Output > successor_type; + + //! Constructor for a node with a successor + template< typename Body > + source_node( graph &g, Body body, bool is_active = true ) + : graph_node(g), my_root_task(g.root_task()), my_active(is_active), init_my_active(is_active), + my_body( new internal::source_body_leaf< output_type, Body>(body) ), + my_reserved(false), my_has_cached_item(false) + { + my_successors.set_owner(this); + } + + //! Copy constructor + source_node( const source_node& src ) : + graph_node(src.my_graph), sender(), + my_root_task( src.my_root_task), my_active(src.init_my_active), + init_my_active(src.init_my_active), my_body( src.my_body->clone() ), + my_reserved(false), my_has_cached_item(false) + { + my_successors.set_owner(this); + } + + //! The destructor + ~source_node() { delete my_body; } + + //! Add a new successor to this node + /* override */ bool register_successor( receiver &r ) { + spin_mutex::scoped_lock lock(my_mutex); + my_successors.register_successor(r); + if ( my_active ) + spawn_put(); + return true; + } + + //! Removes a successor from this node + /* override */ bool remove_successor( receiver &r ) { + spin_mutex::scoped_lock lock(my_mutex); + my_successors.remove_successor(r); + return true; + } + + //! Request an item from the node + /*override */ bool try_get( output_type &v ) { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_reserved ) + return false; + + if ( my_has_cached_item ) { + v = my_cached_item; + my_has_cached_item = false; + return true; + } + // we've been asked to provide an item, but we have none. enqueue a task to + // provide one. + spawn_put(); + return false; + } + + //! Reserves an item. + /* override */ bool try_reserve( output_type &v ) { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_reserved ) { + return false; + } + + if ( my_has_cached_item ) { + v = my_cached_item; + my_reserved = true; + return true; + } else { + return false; + } + } + + //! Release a reserved item. + /** true = item has been released and so remains in sender, dest must request or reserve future items */ + /* override */ bool try_release( ) { + spin_mutex::scoped_lock lock(my_mutex); + __TBB_ASSERT( my_reserved && my_has_cached_item, "releasing non-existent reservation" ); + my_reserved = false; + if(!my_successors.empty()) + spawn_put(); + return true; + } + + //! Consumes a reserved item + /* override */ bool try_consume( ) { + spin_mutex::scoped_lock lock(my_mutex); + __TBB_ASSERT( my_reserved && my_has_cached_item, "consuming non-existent reservation" ); + my_reserved = false; + my_has_cached_item = false; + if ( !my_successors.empty() ) { + spawn_put(); + } + return true; + } + + //! Activates a node that was created in the inactive state + void activate() { + spin_mutex::scoped_lock lock(my_mutex); + my_active = true; + if ( !my_successors.empty() ) + spawn_put(); + } + + template + Body copy_function_object() { + internal::source_body &body_ref = *this->my_body; + return dynamic_cast< internal::source_body_leaf & >(body_ref).get_body(); + } + +protected: + + //! resets the node to its initial state + void reset() { + my_active = init_my_active; + my_reserved =false; + if(my_has_cached_item) { + my_has_cached_item = false; + } + } + +private: + task *my_root_task; + spin_mutex my_mutex; + bool my_active; + bool init_my_active; + internal::source_body *my_body; + internal::broadcast_cache< output_type > my_successors; + bool my_reserved; + bool my_has_cached_item; + output_type my_cached_item; + + // used by apply_body, can invoke body of node. + bool try_reserve_apply_body(output_type &v) { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_reserved ) { + return false; + } + if ( !my_has_cached_item && (*my_body)(my_cached_item) ) + my_has_cached_item = true; + if ( my_has_cached_item ) { + v = my_cached_item; + my_reserved = true; + return true; + } else { + return false; + } + } + + //! Spawns a task that applies the body + /* override */ void spawn_put( ) { + task::enqueue( * new ( task::allocate_additional_child_of( *my_root_task ) ) + internal:: source_task_bypass < source_node< output_type > >( *this ) ); + } + + friend class internal::source_task_bypass< source_node< output_type > >; + //! Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it. + /* override */ task * apply_body_bypass( ) { + output_type v; + if ( !try_reserve_apply_body(v) ) + return NULL; + + task *last_task = my_successors.try_put_task(v); + if ( last_task ) + try_consume(); + else + try_release(); + return last_task; + } +}; // source_node + +//! Implements a function node that supports Input -> Output +template < typename Input, typename Output = continue_msg, graph_buffer_policy = queueing, typename Allocator=cache_aligned_allocator > +class function_node : public graph_node, public internal::function_input, public internal::function_output { +protected: + using graph_node::my_graph; +public: + typedef Input input_type; + typedef Output output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + typedef internal::function_input fInput_type; + typedef internal::function_output fOutput_type; + + //! Constructor + template< typename Body > + function_node( graph &g, size_t concurrency, Body body ) : + graph_node(g), internal::function_input(g, concurrency, body) + {} + + //! Copy constructor + function_node( const function_node& src ) : + graph_node(src.my_graph), internal::function_input( src ), + fOutput_type() + {} + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + using fInput_type::try_put_task; + + // override of graph_node's reset. + /*override*/void reset() {fInput_type::reset_function_input(); } + + /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } +}; + +//! Implements a function node that supports Input -> Output +template < typename Input, typename Output, typename Allocator > +class function_node : public graph_node, public internal::function_input, public internal::function_output { +protected: + using graph_node::my_graph; +public: + typedef Input input_type; + typedef Output output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + typedef internal::function_input fInput_type; + typedef internal::function_input_queue queue_type; + typedef internal::function_output fOutput_type; + + //! Constructor + template< typename Body > + function_node( graph &g, size_t concurrency, Body body ) : + graph_node(g), fInput_type( g, concurrency, body, new queue_type() ) + {} + + //! Copy constructor + function_node( const function_node& src ) : + graph_node(src.my_graph), fInput_type( src, new queue_type() ), fOutput_type() + {} + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + using fInput_type::try_put_task; + + /*override*/void reset() { fInput_type::reset_function_input(); } + + /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } +}; + +#include "tbb/internal/_flow_graph_types_impl.h" + +//! implements a function node that supports Input -> (set of outputs) +// Output is a tuple of output types. +template < typename Input, typename Output, graph_buffer_policy = queueing, typename Allocator=cache_aligned_allocator > +class multifunction_node : + public graph_node, + public internal::multifunction_input + < + Input, + typename internal::wrap_tuple_elements< + tbb::flow::tuple_size::value, // #elements in tuple + internal::multifunction_output, // wrap this around each element + Output // the tuple providing the types + >::type, + Allocator + > { +protected: + using graph_node::my_graph; +private: + static const int N = tbb::flow::tuple_size::value; +public: + typedef Input input_type; + typedef typename internal::wrap_tuple_elements::type output_ports_type; +private: + typedef typename internal::multifunction_input base_type; + typedef typename internal::function_input_queue queue_type; +public: + template + multifunction_node( graph &g, size_t concurrency, Body body ) : + graph_node(g), base_type(g,concurrency, body) + {} + multifunction_node( const multifunction_node &other) : + graph_node(other.my_graph), base_type(other) + {} + // all the guts are in multifunction_input... +protected: + /*override*/void reset() { base_type::reset(); } +}; // multifunction_node + +template < typename Input, typename Output, typename Allocator > +class multifunction_node : public graph_node, public internal::multifunction_input::value, internal::multifunction_output, Output>::type, Allocator> { +protected: + using graph_node::my_graph; + static const int N = tbb::flow::tuple_size::value; +public: + typedef Input input_type; + typedef typename internal::wrap_tuple_elements::type output_ports_type; +private: + typedef typename internal::multifunction_input base_type; + typedef typename internal::function_input_queue queue_type; +public: + template + multifunction_node( graph &g, size_t concurrency, Body body) : + graph_node(g), base_type(g,concurrency, body, new queue_type()) + {} + multifunction_node( const multifunction_node &other) : + graph_node(other.my_graph), base_type(other, new queue_type()) + {} + // all the guts are in multifunction_input... +protected: + /*override*/void reset() { base_type::reset(); } +}; // multifunction_node + +//! split_node: accepts a tuple as input, forwards each element of the tuple to its +// successors. The node has unlimited concurrency, so though it is marked as +// "rejecting" it does not reject inputs. +template > +class split_node : public multifunction_node { + static const int N = tbb::flow::tuple_size::value; + typedef multifunction_node base_type; +public: + typedef typename base_type::output_ports_type output_ports_type; +private: + struct splitting_body { + void operator()(const TupleType& t, output_ports_type &p) { + internal::emit_element::emit_this(t, p); + } + }; +public: + typedef TupleType input_type; + typedef Allocator allocator_type; + split_node(graph &g) : base_type(g, unlimited, splitting_body()) {} + split_node( const split_node & other) : base_type(other) {} +}; + +//! Implements an executable node that supports continue_msg -> Output +template +class continue_node : public graph_node, public internal::continue_input, public internal::function_output { +protected: + using graph_node::my_graph; +public: + typedef continue_msg input_type; + typedef Output output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + typedef internal::continue_input fInput_type; + typedef internal::function_output fOutput_type; + + //! Constructor for executable node with continue_msg -> Output + template + continue_node( graph &g, Body body ) : + graph_node(g), internal::continue_input( g, body ) + {} + + //! Constructor for executable node with continue_msg -> Output + template + continue_node( graph &g, int number_of_predecessors, Body body ) : + graph_node(g), internal::continue_input( g, number_of_predecessors, body ) + {} + + //! Copy constructor + continue_node( const continue_node& src ) : + graph_node(src.my_graph), internal::continue_input(src), + internal::function_output() + {} + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + using fInput_type::try_put_task; + + /*override*/void reset() { internal::continue_input::reset_receiver(); } + + /* override */ internal::broadcast_cache &successors () { return fOutput_type::my_successors; } +}; + +template< typename T > +class overwrite_node : public graph_node, public receiver, public sender { +protected: + using graph_node::my_graph; +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + overwrite_node(graph &g) : graph_node(g), my_buffer_is_valid(false) { + my_successors.set_owner( this ); + } + + // Copy constructor; doesn't take anything from src; default won't work + overwrite_node( const overwrite_node& src ) : + graph_node(src.my_graph), receiver(), sender(), my_buffer_is_valid(false) + { + my_successors.set_owner( this ); + } + + ~overwrite_node() {} + + /* override */ bool register_successor( successor_type &s ) { + spin_mutex::scoped_lock l( my_mutex ); + if ( my_buffer_is_valid ) { + // We have a valid value that must be forwarded immediately. + if ( s.try_put( my_buffer ) || !s.register_predecessor( *this ) ) { + // We add the successor: it accepted our put or it rejected it but won't let us become a predecessor + my_successors.register_successor( s ); + return true; + } else { + // We don't add the successor: it rejected our put and we became its predecessor instead + return false; + } + } else { + // No valid value yet, just add as successor + my_successors.register_successor( s ); + return true; + } + } + + /* override */ bool remove_successor( successor_type &s ) { + spin_mutex::scoped_lock l( my_mutex ); + my_successors.remove_successor(s); + return true; + } + + /* override */ bool try_get( T &v ) { + spin_mutex::scoped_lock l( my_mutex ); + if ( my_buffer_is_valid ) { + v = my_buffer; + return true; + } else { + return false; + } + } + + bool is_valid() { + spin_mutex::scoped_lock l( my_mutex ); + return my_buffer_is_valid; + } + + void clear() { + spin_mutex::scoped_lock l( my_mutex ); + my_buffer_is_valid = false; + } + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + /* override */ task * try_put_task( const T &v ) { + spin_mutex::scoped_lock l( my_mutex ); + my_buffer = v; + my_buffer_is_valid = true; + task * rtask = my_successors.try_put_task(v); + if(!rtask) rtask = SUCCESSFULLY_ENQUEUED; + return rtask; + } + + /*override*/void reset() { my_buffer_is_valid = false; } + + spin_mutex my_mutex; + internal::broadcast_cache< T, null_rw_mutex > my_successors; + T my_buffer; + bool my_buffer_is_valid; + /*override*/void reset_receiver() {} +}; + +template< typename T > +class write_once_node : public overwrite_node { +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + //! Constructor + write_once_node(graph& g) : overwrite_node(g) {} + + //! Copy constructor: call base class copy constructor + write_once_node( const write_once_node& src ) : overwrite_node(src) {} + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + /* override */ task *try_put_task( const T &v ) { + spin_mutex::scoped_lock l( this->my_mutex ); + if ( this->my_buffer_is_valid ) { + return NULL; + } else { + this->my_buffer = v; + this->my_buffer_is_valid = true; + task *res = this->my_successors.try_put_task(v); + if(!res) res = SUCCESSFULLY_ENQUEUED; + return res; + } + } +}; + +//! Forwards messages of type T to all successors +template +class broadcast_node : public graph_node, public receiver, public sender { +protected: + using graph_node::my_graph; +private: + internal::broadcast_cache my_successors; +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + broadcast_node(graph& g) : graph_node(g) { + my_successors.set_owner( this ); + } + + // Copy constructor + broadcast_node( const broadcast_node& src ) : + graph_node(src.my_graph), receiver(), sender() + { + my_successors.set_owner( this ); + } + + //! Adds a successor + virtual bool register_successor( receiver &r ) { + my_successors.register_successor( r ); + return true; + } + + //! Removes s as a successor + virtual bool remove_successor( receiver &r ) { + my_successors.remove_successor( r ); + return true; + } + +protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + //! build a task to run the successor if possible. Default is old behavior. + /*override*/ task *try_put_task(const T& t) { + task *new_task = my_successors.try_put_task(t); + if(!new_task) new_task = SUCCESSFULLY_ENQUEUED; + return new_task; + } + + /*override*/void reset() {} + /*override*/void reset_receiver() {} +}; // broadcast_node + +#include "internal/_flow_graph_item_buffer_impl.h" + +//! Forwards messages in arbitrary order +template > +class buffer_node : public graph_node, public reservable_item_buffer, public receiver, public sender { +protected: + using graph_node::my_graph; +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + typedef buffer_node my_class; +protected: + typedef size_t size_type; + internal::round_robin_cache< T, null_rw_mutex > my_successors; + + task *my_parent; + + friend class internal::forward_task_bypass< buffer_node< T, A > >; + + enum op_type {reg_succ, rem_succ, req_item, res_item, rel_res, con_res, put_item, try_fwd_task }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + + // implements the aggregator_operation concept + class buffer_operation : public internal::aggregated_operation< buffer_operation > { + public: + char type; + T *elem; + task * ltask; + successor_type *r; + buffer_operation(const T& e, op_type t) : type(char(t)), elem(const_cast(&e)) , ltask(NULL) , r(NULL) {} + buffer_operation(op_type t) : type(char(t)) , ltask(NULL) , r(NULL) {} + }; + + bool forwarder_busy; + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + internal::aggregator< my_handler, buffer_operation> my_aggregator; + + virtual void handle_operations(buffer_operation *op_list) { + buffer_operation *tmp = NULL; + bool try_forwarding=false; + while (op_list) { + tmp = op_list; + op_list = op_list->next; + switch (tmp->type) { + case reg_succ: internal_reg_succ(tmp); try_forwarding = true; break; + case rem_succ: internal_rem_succ(tmp); break; + case req_item: internal_pop(tmp); break; + case res_item: internal_reserve(tmp); break; + case rel_res: internal_release(tmp); try_forwarding = true; break; + case con_res: internal_consume(tmp); try_forwarding = true; break; + case put_item: internal_push(tmp); try_forwarding = true; break; + case try_fwd_task: internal_forward_task(tmp); break; + } + } + if (try_forwarding && !forwarder_busy) { + forwarder_busy = true; + task *new_task = new(task::allocate_additional_child_of(*my_parent)) internal:: + forward_task_bypass + < buffer_node >(*this); + // tmp should point to the last item handled by the aggregator. This is the operation + // the handling thread enqueued. So modifying that record will be okay. + tbb::task *z = tmp->ltask; + tmp->ltask = combine_tasks(z, new_task); // in case the op generated a task + } + } + + inline task *grab_forwarding_task( buffer_operation &op_data) { + return op_data.ltask; + } + + inline bool enqueue_forwarding_task(buffer_operation &op_data) { + task *ft = grab_forwarding_task(op_data); + if(ft) { + task::enqueue(*ft); + return true; + } + return false; + } + + //! This is executed by an enqueued task, the "forwarder" + virtual task *forward_task() { + buffer_operation op_data(try_fwd_task); + task *last_task = NULL; + do { + op_data.status = WAIT; + op_data.ltask = NULL; + my_aggregator.execute(&op_data); + tbb::task *xtask = op_data.ltask; + last_task = combine_tasks(last_task, xtask); + } while (op_data.status == SUCCEEDED); + return last_task; + } + + //! Register successor + virtual void internal_reg_succ(buffer_operation *op) { + my_successors.register_successor(*(op->r)); + __TBB_store_with_release(op->status, SUCCEEDED); + } + + //! Remove successor + virtual void internal_rem_succ(buffer_operation *op) { + my_successors.remove_successor(*(op->r)); + __TBB_store_with_release(op->status, SUCCEEDED); + } + + //! Tries to forward valid items to successors + virtual void internal_forward_task(buffer_operation *op) { + if (this->my_reserved || !this->item_valid(this->my_tail-1)) { + __TBB_store_with_release(op->status, FAILED); + this->forwarder_busy = false; + return; + } + T i_copy; + task * last_task = NULL; + size_type counter = my_successors.size(); + // Try forwarding, giving each successor a chance + while (counter>0 && !this->buffer_empty() && this->item_valid(this->my_tail-1)) { + this->fetch_back(i_copy); + task *new_task = my_successors.try_put_task(i_copy); + last_task = combine_tasks(last_task, new_task); + if(new_task) { + this->invalidate_back(); + --(this->my_tail); + } + --counter; + } + op->ltask = last_task; // return task + if (last_task && !counter) { + __TBB_store_with_release(op->status, SUCCEEDED); + } + else { + __TBB_store_with_release(op->status, FAILED); + forwarder_busy = false; + } + } + + virtual void internal_push(buffer_operation *op) { + this->push_back(*(op->elem)); + __TBB_store_with_release(op->status, SUCCEEDED); + } + + virtual void internal_pop(buffer_operation *op) { + if(this->pop_back(*(op->elem))) { + __TBB_store_with_release(op->status, SUCCEEDED); + } + else { + __TBB_store_with_release(op->status, FAILED); + } + } + + virtual void internal_reserve(buffer_operation *op) { + if(this->reserve_front(*(op->elem))) { + __TBB_store_with_release(op->status, SUCCEEDED); + } + else { + __TBB_store_with_release(op->status, FAILED); + } + } + + virtual void internal_consume(buffer_operation *op) { + this->consume_front(); + __TBB_store_with_release(op->status, SUCCEEDED); + } + + virtual void internal_release(buffer_operation *op) { + this->release_front(); + __TBB_store_with_release(op->status, SUCCEEDED); + } + +public: + //! Constructor + buffer_node( graph &g ) : graph_node(g), reservable_item_buffer(), + my_parent( g.root_task() ), forwarder_busy(false) { + my_successors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + //! Copy constructor + buffer_node( const buffer_node& src ) : graph_node(src.my_graph), + reservable_item_buffer(), receiver(), sender(), + my_parent( src.my_parent ) { + forwarder_busy = false; + my_successors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + virtual ~buffer_node() {} + + // + // message sender implementation + // + + //! Adds a new successor. + /** Adds successor r to the list of successors; may forward tasks. */ + /* override */ bool register_successor( receiver &r ) { + buffer_operation op_data(reg_succ); + op_data.r = &r; + my_aggregator.execute(&op_data); + (void)enqueue_forwarding_task(op_data); + return true; + } + + //! Removes a successor. + /** Removes successor r from the list of successors. + It also calls r.remove_predecessor(*this) to remove this node as a predecessor. */ + /* override */ bool remove_successor( receiver &r ) { + r.remove_predecessor(*this); + buffer_operation op_data(rem_succ); + op_data.r = &r; + my_aggregator.execute(&op_data); + // even though this operation does not cause a forward, if we are the handler, and + // a forward is scheduled, we may be the first to reach this point after the aggregator, + // and so should check for the task. + (void)enqueue_forwarding_task(op_data); + return true; + } + + //! Request an item from the buffer_node + /** true = v contains the returned item
    + false = no item has been returned */ + /* override */ bool try_get( T &v ) { + buffer_operation op_data(req_item); + op_data.elem = &v; + my_aggregator.execute(&op_data); + (void)enqueue_forwarding_task(op_data); + return (op_data.status==SUCCEEDED); + } + + //! Reserves an item. + /** false = no item can be reserved
    + true = an item is reserved */ + /* override */ bool try_reserve( T &v ) { + buffer_operation op_data(res_item); + op_data.elem = &v; + my_aggregator.execute(&op_data); + (void)enqueue_forwarding_task(op_data); + return (op_data.status==SUCCEEDED); + } + + //! Release a reserved item. + /** true = item has been released and so remains in sender */ + /* override */ bool try_release() { + buffer_operation op_data(rel_res); + my_aggregator.execute(&op_data); + (void)enqueue_forwarding_task(op_data); + return true; + } + + //! Consumes a reserved item. + /** true = item is removed from sender and reservation removed */ + /* override */ bool try_consume() { + buffer_operation op_data(con_res); + my_aggregator.execute(&op_data); + (void)enqueue_forwarding_task(op_data); + return true; + } + +protected: + + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + //! receive an item, return a task *if possible + /* override */ task *try_put_task(const T &t) { + buffer_operation op_data(t, put_item); + my_aggregator.execute(&op_data); + task *ft = grab_forwarding_task(op_data); + if(!ft) { + ft = SUCCESSFULLY_ENQUEUED; + } + return ft; + } + + /*override*/void reset() { + reservable_item_buffer::reset(); + forwarder_busy = false; + } + + /*override*/void reset_receiver() { + // nothing to do; no predecesor_cache + } + +}; // buffer_node + +//! Forwards messages in FIFO order +template > +class queue_node : public buffer_node { +protected: + typedef typename buffer_node::size_type size_type; + typedef typename buffer_node::buffer_operation queue_operation; + + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + + /* override */ void internal_forward_task(queue_operation *op) { + if (this->my_reserved || !this->item_valid(this->my_head)) { + __TBB_store_with_release(op->status, FAILED); + this->forwarder_busy = false; + return; + } + T i_copy; + task *last_task = NULL; + size_type counter = this->my_successors.size(); + // Keep trying to send items while there is at least one accepting successor + while (counter>0 && this->item_valid(this->my_head)) { + this->fetch_front(i_copy); + task *new_task = this->my_successors.try_put_task(i_copy); + if(new_task) { + this->invalidate_front(); + ++(this->my_head); + last_task = combine_tasks(last_task, new_task); + } + --counter; + } + op->ltask = last_task; + if (last_task && !counter) + __TBB_store_with_release(op->status, SUCCEEDED); + else { + __TBB_store_with_release(op->status, FAILED); + this->forwarder_busy = false; + } + } + + /* override */ void internal_pop(queue_operation *op) { + if ( this->my_reserved || !this->item_valid(this->my_head)){ + __TBB_store_with_release(op->status, FAILED); + } + else { + this->pop_front(*(op->elem)); + __TBB_store_with_release(op->status, SUCCEEDED); + } + } + /* override */ void internal_reserve(queue_operation *op) { + if (this->my_reserved || !this->item_valid(this->my_head)) { + __TBB_store_with_release(op->status, FAILED); + } + else { + this->my_reserved = true; + this->fetch_front(*(op->elem)); + this->invalidate_front(); + __TBB_store_with_release(op->status, SUCCEEDED); + } + } + /* override */ void internal_consume(queue_operation *op) { + this->consume_front(); + __TBB_store_with_release(op->status, SUCCEEDED); + } + +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + //! Constructor + queue_node( graph &g ) : buffer_node(g) {} + + //! Copy constructor + queue_node( const queue_node& src) : buffer_node(src) {} +}; + +//! Forwards messages in sequence order +template< typename T, typename A=cache_aligned_allocator > +class sequencer_node : public queue_node { + internal::function_body< T, size_t > *my_sequencer; +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + //! Constructor + template< typename Sequencer > + sequencer_node( graph &g, const Sequencer& s ) : queue_node(g), + my_sequencer(new internal::function_body_leaf< T, size_t, Sequencer>(s) ) {} + + //! Copy constructor + sequencer_node( const sequencer_node& src ) : queue_node(src), + my_sequencer( src.my_sequencer->clone() ) {} + + //! Destructor + ~sequencer_node() { delete my_sequencer; } +protected: + typedef typename buffer_node::size_type size_type; + typedef typename buffer_node::buffer_operation sequencer_operation; + + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + +private: + /* override */ void internal_push(sequencer_operation *op) { + size_type tag = (*my_sequencer)(*(op->elem)); + + this->my_tail = (tag+1 > this->my_tail) ? tag+1 : this->my_tail; + + if(this->size() > this->capacity()) + this->grow_my_array(this->size()); // tail already has 1 added to it + this->item(tag) = std::make_pair( *(op->elem), true ); + __TBB_store_with_release(op->status, SUCCEEDED); + } +}; + +//! Forwards messages in priority order +template< typename T, typename Compare = std::less, typename A=cache_aligned_allocator > +class priority_queue_node : public buffer_node { +public: + typedef T input_type; + typedef T output_type; + typedef buffer_node base_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + + //! Constructor + priority_queue_node( graph &g ) : buffer_node(g), mark(0) {} + + //! Copy constructor + priority_queue_node( const priority_queue_node &src ) : buffer_node(src), mark(0) {} + +protected: + + /*override*/void reset() { + mark = 0; + base_type::reset(); + } + + typedef typename buffer_node::size_type size_type; + typedef typename buffer_node::item_type item_type; + typedef typename buffer_node::buffer_operation prio_operation; + + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + + /* override */ void handle_operations(prio_operation *op_list) { + prio_operation *tmp = op_list /*, *pop_list*/ ; + bool try_forwarding=false; + while (op_list) { + tmp = op_list; + op_list = op_list->next; + switch (tmp->type) { + case buffer_node::reg_succ: this->internal_reg_succ(tmp); try_forwarding = true; break; + case buffer_node::rem_succ: this->internal_rem_succ(tmp); break; + case buffer_node::put_item: internal_push(tmp); try_forwarding = true; break; + case buffer_node::try_fwd_task: internal_forward_task(tmp); break; + case buffer_node::rel_res: internal_release(tmp); try_forwarding = true; break; + case buffer_node::con_res: internal_consume(tmp); try_forwarding = true; break; + case buffer_node::req_item: internal_pop(tmp); break; + case buffer_node::res_item: internal_reserve(tmp); break; + } + } + // process pops! for now, no special pop processing + if (markmy_tail) heapify(); + if (try_forwarding && !this->forwarder_busy) { + this->forwarder_busy = true; + task *new_task = new(task::allocate_additional_child_of(*(this->my_parent))) internal:: + forward_task_bypass + < buffer_node >(*this); + // tmp should point to the last item handled by the aggregator. This is the operation + // the handling thread enqueued. So modifying that record will be okay. + tbb::task *tmp1 = tmp->ltask; + tmp->ltask = combine_tasks(tmp1, new_task); + } + } + + //! Tries to forward valid items to successors + /* override */ void internal_forward_task(prio_operation *op) { + T i_copy; + task * last_task = NULL; // flagged when a successor accepts + size_type counter = this->my_successors.size(); + + if (this->my_reserved || this->my_tail == 0) { + __TBB_store_with_release(op->status, FAILED); + this->forwarder_busy = false; + return; + } + // Keep trying to send while there exists an accepting successor + while (counter>0 && this->my_tail > 0) { + i_copy = this->my_array[0].first; + task * new_task = this->my_successors.try_put_task(i_copy); + last_task = combine_tasks(last_task, new_task); + if ( new_task ) { + if (mark == this->my_tail) --mark; + --(this->my_tail); + this->my_array[0].first=this->my_array[this->my_tail].first; + if (this->my_tail > 1) // don't reheap for heap of size 1 + reheap(); + } + --counter; + } + op->ltask = last_task; + if (last_task && !counter) + __TBB_store_with_release(op->status, SUCCEEDED); + else { + __TBB_store_with_release(op->status, FAILED); + this->forwarder_busy = false; + } + } + + /* override */ void internal_push(prio_operation *op) { + if ( this->my_tail >= this->my_array_size ) + this->grow_my_array( this->my_tail + 1 ); + this->my_array[this->my_tail] = std::make_pair( *(op->elem), true ); + ++(this->my_tail); + __TBB_store_with_release(op->status, SUCCEEDED); + } + + /* override */ void internal_pop(prio_operation *op) { + if ( this->my_reserved == true || this->my_tail == 0 ) { + __TBB_store_with_release(op->status, FAILED); + } + else { + if (markmy_tail && + compare(this->my_array[0].first, + this->my_array[this->my_tail-1].first)) { + // there are newly pushed elems; last one higher than top + // copy the data + *(op->elem) = this->my_array[this->my_tail-1].first; + --(this->my_tail); + __TBB_store_with_release(op->status, SUCCEEDED); + } + else { // extract and push the last element down heap + *(op->elem) = this->my_array[0].first; // copy the data + if (mark == this->my_tail) --mark; + --(this->my_tail); + __TBB_store_with_release(op->status, SUCCEEDED); + this->my_array[0].first=this->my_array[this->my_tail].first; + if (this->my_tail > 1) // don't reheap for heap of size 1 + reheap(); + } + } + } + /* override */ void internal_reserve(prio_operation *op) { + if (this->my_reserved == true || this->my_tail == 0) { + __TBB_store_with_release(op->status, FAILED); + } + else { + this->my_reserved = true; + *(op->elem) = reserved_item = this->my_array[0].first; + if (mark == this->my_tail) --mark; + --(this->my_tail); + __TBB_store_with_release(op->status, SUCCEEDED); + this->my_array[0].first = this->my_array[this->my_tail].first; + if (this->my_tail > 1) // don't reheap for heap of size 1 + reheap(); + } + } + /* override */ void internal_consume(prio_operation *op) { + this->my_reserved = false; + __TBB_store_with_release(op->status, SUCCEEDED); + } + /* override */ void internal_release(prio_operation *op) { + if (this->my_tail >= this->my_array_size) + this->grow_my_array( this->my_tail + 1 ); + this->my_array[this->my_tail] = std::make_pair(reserved_item, true); + ++(this->my_tail); + this->my_reserved = false; + __TBB_store_with_release(op->status, SUCCEEDED); + heapify(); + } +private: + Compare compare; + size_type mark; + input_type reserved_item; + + void heapify() { + if (!mark) mark = 1; + for (; markmy_tail; ++mark) { // for each unheaped element + size_type cur_pos = mark; + input_type to_place = this->my_array[mark].first; + do { // push to_place up the heap + size_type parent = (cur_pos-1)>>1; + if (!compare(this->my_array[parent].first, to_place)) + break; + this->my_array[cur_pos].first = this->my_array[parent].first; + cur_pos = parent; + } while( cur_pos ); + this->my_array[cur_pos].first = to_place; + } + } + + void reheap() { + size_type cur_pos=0, child=1; + while (child < mark) { + size_type target = child; + if (child+1my_array[child].first, + this->my_array[child+1].first)) + ++target; + // target now has the higher priority child + if (compare(this->my_array[target].first, + this->my_array[this->my_tail].first)) + break; + this->my_array[cur_pos].first = this->my_array[target].first; + cur_pos = target; + child = (cur_pos<<1)+1; + } + this->my_array[cur_pos].first = this->my_array[this->my_tail].first; + } +}; + +//! Forwards messages only if the threshold has not been reached +/** This node forwards items until its threshold is reached. + It contains no buffering. If the downstream node rejects, the + message is dropped. */ +template< typename T > +class limiter_node : public graph_node, public receiver< T >, public sender< T > { +protected: + using graph_node::my_graph; +public: + typedef T input_type; + typedef T output_type; + typedef sender< input_type > predecessor_type; + typedef receiver< output_type > successor_type; + +private: + task *my_root_task; + size_t my_threshold; + size_t my_count; + internal::predecessor_cache< T > my_predecessors; + spin_mutex my_mutex; + internal::broadcast_cache< T > my_successors; + int init_decrement_predecessors; + + friend class internal::forward_task_bypass< limiter_node >; + + // Let decrementer call decrement_counter() + friend class internal::decrementer< limiter_node >; + + // only returns a valid task pointer or NULL, never SUCCESSFULLY_ENQUEUED + task * decrement_counter() { + input_type v; + task *rval = NULL; + + // If we can't get / put an item immediately then drop the count + if ( my_predecessors.get_item( v ) == false + || (rval = my_successors.try_put_task(v)) == NULL ) { + spin_mutex::scoped_lock lock(my_mutex); + --my_count; + if ( !my_predecessors.empty() ) { + task *rtask = new ( task::allocate_additional_child_of( *my_root_task ) ) + internal::forward_task_bypass< limiter_node >( *this ); + __TBB_ASSERT(!rval, "Have two tasks to handle"); + return rtask; + } + } + return rval; + } + + void forward() { + { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_count < my_threshold ) + ++my_count; + else + return; + } + task * rtask = decrement_counter(); + if(rtask) task::enqueue(*rtask); + } + + task *forward_task() { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_count >= my_threshold ) + return NULL; + ++my_count; + task * rtask = decrement_counter(); + return rtask; + } + +public: + //! The internal receiver< continue_msg > that decrements the count + internal::decrementer< limiter_node > decrement; + + //! Constructor + limiter_node(graph &g, size_t threshold, int num_decrement_predecessors=0) : + graph_node(g), my_root_task(g.root_task()), my_threshold(threshold), my_count(0), + init_decrement_predecessors(num_decrement_predecessors), + decrement(num_decrement_predecessors) + { + my_predecessors.set_owner(this); + my_successors.set_owner(this); + decrement.set_owner(this); + } + + //! Copy constructor + limiter_node( const limiter_node& src ) : + graph_node(src.my_graph), receiver(), sender(), + my_root_task(src.my_root_task), my_threshold(src.my_threshold), my_count(0), + init_decrement_predecessors(src.init_decrement_predecessors), + decrement(src.init_decrement_predecessors) + { + my_predecessors.set_owner(this); + my_successors.set_owner(this); + decrement.set_owner(this); + } + + //! Replace the current successor with this new successor + /* override */ bool register_successor( receiver &r ) { + my_successors.register_successor(r); + return true; + } + + //! Removes a successor from this node + /** r.remove_predecessor(*this) is also called. */ + /* override */ bool remove_successor( receiver &r ) { + r.remove_predecessor(*this); + my_successors.remove_successor(r); + return true; + } + + //! Removes src from the list of cached predecessors. + /* override */ bool register_predecessor( predecessor_type &src ) { + spin_mutex::scoped_lock lock(my_mutex); + my_predecessors.add( src ); + if ( my_count < my_threshold && !my_successors.empty() ) { + task::enqueue( * new ( task::allocate_additional_child_of( *my_root_task ) ) + internal:: + forward_task_bypass + < limiter_node >( *this ) ); + } + return true; + } + + //! Removes src from the list of cached predecessors. + /* override */ bool remove_predecessor( predecessor_type &src ) { + my_predecessors.remove( src ); + return true; + } + +protected: + + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + //! Puts an item to this receiver + /* override */ task *try_put_task( const T &t ) { + { + spin_mutex::scoped_lock lock(my_mutex); + if ( my_count >= my_threshold ) + return NULL; + else + ++my_count; + } + + task * rtask = my_successors.try_put_task(t); + + if ( !rtask ) { // try_put_task failed. + spin_mutex::scoped_lock lock(my_mutex); + --my_count; + if ( !my_predecessors.empty() ) { + rtask = new ( task::allocate_additional_child_of( *my_root_task ) ) + internal::forward_task_bypass< limiter_node >( *this ); + } + } + return rtask; + } + + /*override*/void reset() { + my_count = 0; + my_predecessors.reset(); + decrement.reset_receiver(); + } + + /*override*/void reset_receiver() { my_predecessors.reset(); } +}; // limiter_node + +#include "internal/_flow_graph_join_impl.h" + +using internal::reserving_port; +using internal::queueing_port; +using internal::tag_matching_port; +using internal::input_port; +using internal::tag_value; +using internal::NO_TAG; + +template class join_node; + +template +class join_node: public internal::unfolded_join_node::value, reserving_port, OutputTuple, reserving> { +private: + static const int N = tbb::flow::tuple_size::value; + typedef typename internal::unfolded_join_node unfolded_type; +public: + typedef OutputTuple output_type; + typedef typename unfolded_type::input_ports_type input_ports_type; + join_node(graph &g) : unfolded_type(g) { } + join_node(const join_node &other) : unfolded_type(other) {} +}; + +template +class join_node: public internal::unfolded_join_node::value, queueing_port, OutputTuple, queueing> { +private: + static const int N = tbb::flow::tuple_size::value; + typedef typename internal::unfolded_join_node unfolded_type; +public: + typedef OutputTuple output_type; + typedef typename unfolded_type::input_ports_type input_ports_type; + join_node(graph &g) : unfolded_type(g) { } + join_node(const join_node &other) : unfolded_type(other) {} +}; + +// template for tag_matching join_node +template +class join_node : public internal::unfolded_join_node::value, + tag_matching_port, OutputTuple, tag_matching> { +private: + static const int N = tbb::flow::tuple_size::value; + typedef typename internal::unfolded_join_node unfolded_type; +public: + typedef OutputTuple output_type; + typedef typename unfolded_type::input_ports_type input_ports_type; + template + join_node(graph &g, B0 b0, B1 b1) : unfolded_type(g, b0, b1) { } + template + join_node(graph &g, B0 b0, B1 b1, B2 b2) : unfolded_type(g, b0, b1, b2) { } + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3) : unfolded_type(g, b0, b1, b2, b3) { } + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : unfolded_type(g, b0, b1, b2, b3, b4) { } +#if __TBB_VARIADIC_MAX >= 6 + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) : unfolded_type(g, b0, b1, b2, b3, b4, b5) { } +#endif +#if __TBB_VARIADIC_MAX >= 7 + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6) { } +#endif +#if __TBB_VARIADIC_MAX >= 8 + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) { } +#endif +#if __TBB_VARIADIC_MAX >= 9 + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) { } +#endif +#if __TBB_VARIADIC_MAX >= 10 + template + join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9) : unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9) { } +#endif + join_node(const join_node &other) : unfolded_type(other) {} +}; + +#if TBB_PREVIEW_GRAPH_NODES +// or node +#include "internal/_flow_graph_or_impl.h" + +template +class or_node : public internal::unfolded_or_node { +private: + static const int N = tbb::flow::tuple_size::value; +public: + typedef typename internal::or_output_type::type output_type; + typedef typename internal::unfolded_or_node unfolded_type; + or_node(graph& g) : unfolded_type(g) { } + // Copy constructor + or_node( const or_node& other ) : unfolded_type(other) { } +}; +#endif // TBB_PREVIEW_GRAPH_NODES + +//! Makes an edge between a single predecessor and a single successor +template< typename T > +inline void make_edge( sender &p, receiver &s ) { + p.register_successor( s ); +} + +//! Makes an edge between a single predecessor and a single successor +template< typename T > +inline void remove_edge( sender &p, receiver &s ) { + p.remove_successor( s ); +} + +//! Returns a copy of the body from a function or continue node +template< typename Body, typename Node > +Body copy_body( Node &n ) { + return n.template copy_function_object(); +} + +} // interface6 + + using interface6::graph; + using interface6::graph_node; + using interface6::continue_msg; + using interface6::sender; + using interface6::receiver; + using interface6::continue_receiver; + + using interface6::source_node; + using interface6::function_node; + using interface6::multifunction_node; + using interface6::split_node; + using interface6::internal::output_port; +#if TBB_PREVIEW_GRAPH_NODES + using interface6::or_node; +#endif + using interface6::continue_node; + using interface6::overwrite_node; + using interface6::write_once_node; + using interface6::broadcast_node; + using interface6::buffer_node; + using interface6::queue_node; + using interface6::sequencer_node; + using interface6::priority_queue_node; + using interface6::limiter_node; + using namespace interface6::internal::graph_policy_namespace; + using interface6::join_node; + using interface6::input_port; + using interface6::copy_body; + using interface6::make_edge; + using interface6::remove_edge; + using interface6::internal::NO_TAG; + using interface6::internal::tag_value; + +} // flow +} // tbb + +#endif // __TBB_flow_graph_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/index.html b/deal.II/bundled/tbb41_20130401oss/include/tbb/index.html new file mode 100644 index 0000000000..cc52c04c32 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/index.html @@ -0,0 +1,29 @@ + + + +

    Overview

    +Include files for Intel® Threading Building Blocks classes and functions. + +
    Click here to see all files in the directory. + +

    Directories

    +
    +
    compat +
    Include files for source level compatibility with other frameworks. +
    internal +
    Include files with implementation details; not for direct use. +
    machine +
    Include files for low-level architecture specific functionality; not for direct use. +
    + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_aggregator_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_aggregator_impl.h new file mode 100644 index 0000000000..a0dcbad1f9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_aggregator_impl.h @@ -0,0 +1,162 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__aggregator_impl_H +#define __TBB__aggregator_impl_H + +#include "../atomic.h" +#include "../tbb_profiling.h" + +namespace tbb { +namespace interface6 { +namespace internal { + +using namespace tbb::internal; + +//! aggregated_operation base class +template +class aggregated_operation { + public: + uintptr_t status; + Derived *next; + aggregated_operation() : status(0), next(NULL) {} +}; + +//! Aggregator base class +/** An aggregator for collecting operations coming from multiple sources and executing + them serially on a single thread. operation_type must be derived from + aggregated_operation. The parameter handler_type is a functor that will be passed the + list of operations and is expected to handle each operation appropriately, setting the + status of each operation to non-zero.*/ +template < typename handler_type, typename operation_type > +class aggregator { + public: + aggregator() : handler_busy(false) { pending_operations = NULL; } + explicit aggregator(handler_type h) : handler_busy(false), handle_operations(h) { + pending_operations = NULL; + } + + void initialize_handler(handler_type h) { handle_operations = h; } + + //! Place operation in list + /** Place operation in list and either handle list or wait for operation to + complete. */ + void execute(operation_type *op) { + operation_type *res; + + // ITT note: &(op->status) tag is used to cover accesses to this op node. This + // thread has created the operation, and now releases it so that the handler + // thread may handle the associated operation w/o triggering a race condition; + // thus this tag will be acquired just before the operation is handled in the + // handle_operations functor. + call_itt_notify(releasing, &(op->status)); + // insert the operation in the queue + do { + // ITT may flag the following line as a race; it is a false positive: + // This is an atomic read; we don't provide itt_hide_load_word for atomics + op->next = res = pending_operations; // NOT A RACE + } while (pending_operations.compare_and_swap(op, res) != res); + if (!res) { // first in the list; handle the operations + // ITT note: &pending_operations tag covers access to the handler_busy flag, + // which this waiting handler thread will try to set before entering + // handle_operations. + call_itt_notify(acquired, &pending_operations); + start_handle_operations(); + __TBB_ASSERT(op->status, NULL); + } + else { // not first; wait for op to be ready + call_itt_notify(prepare, &(op->status)); + spin_wait_while_eq(op->status, uintptr_t(0)); + itt_load_word_with_acquire(op->status); + } + } + + private: + //! An atomically updated list (aka mailbox) of pending operations + atomic pending_operations; + //! Controls thread access to handle_operations + uintptr_t handler_busy; + handler_type handle_operations; + + //! Trigger the handling of operations when the handler is free + void start_handle_operations() { + operation_type *op_list; + + // ITT note: &handler_busy tag covers access to pending_operations as it is passed + // between active and waiting handlers. Below, the waiting handler waits until + // the active handler releases, and the waiting handler acquires &handler_busy as + // it becomes the active_handler. The release point is at the end of this + // function, when all operations in pending_operations have been handled by the + // owner of this aggregator. + call_itt_notify(prepare, &handler_busy); + // get the handler_busy: + // only one thread can possibly spin here at a time + spin_wait_until_eq(handler_busy, uintptr_t(0)); + call_itt_notify(acquired, &handler_busy); + // acquire fence not necessary here due to causality rule and surrounding atomics + __TBB_store_with_release(handler_busy, uintptr_t(1)); + + // ITT note: &pending_operations tag covers access to the handler_busy flag + // itself. Capturing the state of the pending_operations signifies that + // handler_busy has been set and a new active handler will now process that list's + // operations. + call_itt_notify(releasing, &pending_operations); + // grab pending_operations + op_list = pending_operations.fetch_and_store(NULL); + + // handle all the operations + handle_operations(op_list); + + // release the handler + itt_store_word_with_release(handler_busy, uintptr_t(0)); + } +}; + +// the most-compatible friend declaration (vs, gcc, icc) is +// template friend class aggregating_functor; +template +class aggregating_functor { + aggregating_class *fi; +public: + aggregating_functor() {} + aggregating_functor(aggregating_class *fi_) : fi(fi_) {} + void operator()(operation_list* op_list) { fi->handle_operations(op_list); } +}; + +} // namespace internal +} // namespace interface6 + +namespace internal { + using interface6::internal::aggregated_operation; + using interface6::internal::aggregator; + using interface6::internal::aggregating_functor; +} // namespace internal + +} // namespace tbb + +#endif // __TBB__aggregator_impl_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_queue_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_queue_impl.h new file mode 100644 index 0000000000..8058102c12 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_queue_impl.h @@ -0,0 +1,1026 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__concurrent_queue_impl_H +#define __TBB__concurrent_queue_impl_H + +#ifndef __TBB_concurrent_queue_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#include "../tbb_stddef.h" +#include "../tbb_machine.h" +#include "../atomic.h" +#include "../spin_mutex.h" +#include "../cache_aligned_allocator.h" +#include "../tbb_exception.h" +#include "../tbb_profiling.h" +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +namespace tbb { + +#if !__TBB_TEMPLATE_FRIENDS_BROKEN + +// forward declaration +namespace strict_ppl { +template class concurrent_queue; +} + +template class concurrent_bounded_queue; + +namespace deprecated { +template class concurrent_queue; +} +#endif + +//! For internal use only. +namespace strict_ppl { + +//! @cond INTERNAL +namespace internal { + +using namespace tbb::internal; + +typedef size_t ticket; + +template class micro_queue ; +template class micro_queue_pop_finalizer ; +template class concurrent_queue_base_v3; + +//! parts of concurrent_queue_rep that do not have references to micro_queue +/** + * For internal use only. + */ +struct concurrent_queue_rep_base : no_copy { + template friend class micro_queue; + template friend class concurrent_queue_base_v3; + +protected: + //! Approximately n_queue/golden ratio + static const size_t phi = 3; + +public: + // must be power of 2 + static const size_t n_queue = 8; + + //! Prefix on a page + struct page { + page* next; + uintptr_t mask; + }; + + atomic head_counter; + char pad1[NFS_MaxLineSize-sizeof(atomic)]; + atomic tail_counter; + char pad2[NFS_MaxLineSize-sizeof(atomic)]; + + //! Always a power of 2 + size_t items_per_page; + + //! Size of an item + size_t item_size; + + //! number of invalid entries in the queue + atomic n_invalid_entries; + + char pad3[NFS_MaxLineSize-sizeof(size_t)-sizeof(size_t)-sizeof(atomic)]; +} ; + +inline bool is_valid_page(const concurrent_queue_rep_base::page* p) { + return uintptr_t(p)>1; +} + +//! Abstract class to define interface for page allocation/deallocation +/** + * For internal use only. + */ +class concurrent_queue_page_allocator +{ + template friend class micro_queue ; + template friend class micro_queue_pop_finalizer ; +protected: + virtual ~concurrent_queue_page_allocator() {} +private: + virtual concurrent_queue_rep_base::page* allocate_page() = 0; + virtual void deallocate_page( concurrent_queue_rep_base::page* p ) = 0; +} ; + +#if _MSC_VER && !defined(__INTEL_COMPILER) +// unary minus operator applied to unsigned type, result still unsigned +#pragma warning( push ) +#pragma warning( disable: 4146 ) +#endif + +//! A queue using simple locking. +/** For efficiency, this class has no constructor. + The caller is expected to zero-initialize it. */ +template +class micro_queue : no_copy { + typedef concurrent_queue_rep_base::page page; + + //! Class used to ensure exception-safety of method "pop" + class destroyer: no_copy { + T& my_value; + public: + destroyer( T& value ) : my_value(value) {} + ~destroyer() {my_value.~T();} + }; + + void copy_item( page& dst, size_t index, const void* src ) { + new( &get_ref(dst,index) ) T(*static_cast(src)); + } + + void copy_item( page& dst, size_t dindex, const page& src, size_t sindex ) { + new( &get_ref(dst,dindex) ) T( get_ref(const_cast(src),sindex) ); + } + + void assign_and_destroy_item( void* dst, page& src, size_t index ) { + T& from = get_ref(src,index); + destroyer d(from); + *static_cast(dst) = from; + } + + void spin_wait_until_my_turn( atomic& counter, ticket k, concurrent_queue_rep_base& rb ) const ; + +public: + friend class micro_queue_pop_finalizer; + + struct padded_page: page { + //! Not defined anywhere - exists to quiet warnings. + padded_page(); + //! Not defined anywhere - exists to quiet warnings. + void operator=( const padded_page& ); + //! Must be last field. + T last; + }; + + static T& get_ref( page& p, size_t index ) { + return (&static_cast(static_cast(&p))->last)[index]; + } + + atomic head_page; + atomic head_counter; + + atomic tail_page; + atomic tail_counter; + + spin_mutex page_mutex; + + void push( const void* item, ticket k, concurrent_queue_base_v3& base ) ; + + bool pop( void* dst, ticket k, concurrent_queue_base_v3& base ) ; + + micro_queue& assign( const micro_queue& src, concurrent_queue_base_v3& base ) ; + + page* make_copy( concurrent_queue_base_v3& base, const page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) ; + + void invalidate_page_and_rethrow( ticket k ) ; +}; + +template +void micro_queue::spin_wait_until_my_turn( atomic& counter, ticket k, concurrent_queue_rep_base& rb ) const { + atomic_backoff backoff; + do { + backoff.pause(); + if( counter&1 ) { + ++rb.n_invalid_entries; + throw_exception( eid_bad_last_alloc ); + } + } while( counter!=k ) ; +} + +template +void micro_queue::push( const void* item, ticket k, concurrent_queue_base_v3& base ) { + k &= -concurrent_queue_rep_base::n_queue; + page* p = NULL; + size_t index = modulo_power_of_two( k/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page); + if( !index ) { + __TBB_TRY { + concurrent_queue_page_allocator& pa = base; + p = pa.allocate_page(); + } __TBB_CATCH (...) { + ++base.my_rep->n_invalid_entries; + invalidate_page_and_rethrow( k ); + } + p->mask = 0; + p->next = NULL; + } + + if( tail_counter!=k ) spin_wait_until_my_turn( tail_counter, k, *base.my_rep ); + call_itt_notify(acquired, &tail_counter); + + if( p ) { + spin_mutex::scoped_lock lock( page_mutex ); + page* q = tail_page; + if( is_valid_page(q) ) + q->next = p; + else + head_page = p; + tail_page = p; + } else { + p = tail_page; + } + __TBB_TRY { + copy_item( *p, index, item ); + // If no exception was thrown, mark item as present. + itt_hide_store_word(p->mask, p->mask | uintptr_t(1)<n_invalid_entries; + call_itt_notify(releasing, &tail_counter); + tail_counter += concurrent_queue_rep_base::n_queue; + __TBB_RETHROW(); + } +} + +template +bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base_v3& base ) { + k &= -concurrent_queue_rep_base::n_queue; + if( head_counter!=k ) spin_wait_until_eq( head_counter, k ); + call_itt_notify(acquired, &head_counter); + if( tail_counter==k ) spin_wait_while_eq( tail_counter, k ); + call_itt_notify(acquired, &tail_counter); + page& p = *head_page; + __TBB_ASSERT( &p, NULL ); + size_t index = modulo_power_of_two( k/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); + bool success = false; + { + micro_queue_pop_finalizer finalizer( *this, base, k+concurrent_queue_rep_base::n_queue, index==base.my_rep->items_per_page-1 ? &p : NULL ); + if( p.mask & uintptr_t(1)<n_invalid_entries; + } + } + return success; +} + +template +micro_queue& micro_queue::assign( const micro_queue& src, concurrent_queue_base_v3& base ) { + head_counter = src.head_counter; + tail_counter = src.tail_counter; + page_mutex = src.page_mutex; + + const page* srcp = src.head_page; + if( is_valid_page(srcp) ) { + ticket g_index = head_counter; + __TBB_TRY { + size_t n_items = (tail_counter-head_counter)/concurrent_queue_rep_base::n_queue; + size_t index = modulo_power_of_two( head_counter/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); + size_t end_in_first_page = (index+n_itemsitems_per_page)?(index+n_items):base.my_rep->items_per_page; + + head_page = make_copy( base, srcp, index, end_in_first_page, g_index ); + page* cur_page = head_page; + + if( srcp != src.tail_page ) { + for( srcp = srcp->next; srcp!=src.tail_page; srcp=srcp->next ) { + cur_page->next = make_copy( base, srcp, 0, base.my_rep->items_per_page, g_index ); + cur_page = cur_page->next; + } + + __TBB_ASSERT( srcp==src.tail_page, NULL ); + size_t last_index = modulo_power_of_two( tail_counter/concurrent_queue_rep_base::n_queue, base.my_rep->items_per_page ); + if( last_index==0 ) last_index = base.my_rep->items_per_page; + + cur_page->next = make_copy( base, srcp, 0, last_index, g_index ); + cur_page = cur_page->next; + } + tail_page = cur_page; + } __TBB_CATCH (...) { + invalidate_page_and_rethrow( g_index ); + } + } else { + head_page = tail_page = NULL; + } + return *this; +} + +template +void micro_queue::invalidate_page_and_rethrow( ticket k ) { + // Append an invalid page at address 1 so that no more pushes are allowed. + page* invalid_page = (page*)uintptr_t(1); + { + spin_mutex::scoped_lock lock( page_mutex ); + itt_store_word_with_release(tail_counter, k+concurrent_queue_rep_base::n_queue+1); + page* q = tail_page; + if( is_valid_page(q) ) + q->next = invalid_page; + else + head_page = invalid_page; + tail_page = invalid_page; + } + __TBB_RETHROW(); +} + +template +concurrent_queue_rep_base::page* micro_queue::make_copy( concurrent_queue_base_v3& base, const concurrent_queue_rep_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) { + concurrent_queue_page_allocator& pa = base; + page* new_page = pa.allocate_page(); + new_page->next = NULL; + new_page->mask = src_page->mask; + for( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index ) + if( new_page->mask & uintptr_t(1)< +class micro_queue_pop_finalizer: no_copy { + typedef concurrent_queue_rep_base::page page; + ticket my_ticket; + micro_queue& my_queue; + page* my_page; + concurrent_queue_page_allocator& allocator; +public: + micro_queue_pop_finalizer( micro_queue& queue, concurrent_queue_base_v3& b, ticket k, page* p ) : + my_ticket(k), my_queue(queue), my_page(p), allocator(b) + {} + ~micro_queue_pop_finalizer() ; +}; + +template +micro_queue_pop_finalizer::~micro_queue_pop_finalizer() { + page* p = my_page; + if( is_valid_page(p) ) { + spin_mutex::scoped_lock lock( my_queue.page_mutex ); + page* q = p->next; + my_queue.head_page = q; + if( !is_valid_page(q) ) { + my_queue.tail_page = NULL; + } + } + itt_store_word_with_release(my_queue.head_counter, my_ticket); + if( is_valid_page(p) ) { + allocator.deallocate_page( p ); + } +} + +#if _MSC_VER && !defined(__INTEL_COMPILER) +#pragma warning( pop ) +#endif // warning 4146 is back + +template class concurrent_queue_iterator_rep ; +template class concurrent_queue_iterator_base_v3; + +//! representation of concurrent_queue_base +/** + * the class inherits from concurrent_queue_rep_base and defines an array of micro_queue's + */ +template +struct concurrent_queue_rep : public concurrent_queue_rep_base { + micro_queue array[n_queue]; + + //! Map ticket to an array index + static size_t index( ticket k ) { + return k*phi%n_queue; + } + + micro_queue& choose( ticket k ) { + // The formula here approximates LRU in a cache-oblivious way. + return array[index(k)]; + } +}; + +//! base class of concurrent_queue +/** + * The class implements the interface defined by concurrent_queue_page_allocator + * and has a pointer to an instance of concurrent_queue_rep. + */ +template +class concurrent_queue_base_v3: public concurrent_queue_page_allocator { + //! Internal representation + concurrent_queue_rep* my_rep; + + friend struct concurrent_queue_rep; + friend class micro_queue; + friend class concurrent_queue_iterator_rep; + friend class concurrent_queue_iterator_base_v3; + +protected: + typedef typename concurrent_queue_rep::page page; + +private: + typedef typename micro_queue::padded_page padded_page; + + /* override */ virtual page *allocate_page() { + concurrent_queue_rep& r = *my_rep; + size_t n = sizeof(padded_page) + (r.items_per_page-1)*sizeof(T); + return reinterpret_cast(allocate_block ( n )); + } + + /* override */ virtual void deallocate_page( concurrent_queue_rep_base::page *p ) { + concurrent_queue_rep& r = *my_rep; + size_t n = sizeof(padded_page) + (r.items_per_page-1)*sizeof(T); + deallocate_block( reinterpret_cast(p), n ); + } + + //! custom allocator + virtual void *allocate_block( size_t n ) = 0; + + //! custom de-allocator + virtual void deallocate_block( void *p, size_t n ) = 0; + +protected: + concurrent_queue_base_v3(); + + /* override */ virtual ~concurrent_queue_base_v3() { +#if TBB_USE_ASSERT + size_t nq = my_rep->n_queue; + for( size_t i=0; iarray[i].tail_page==NULL, "pages were not freed properly" ); +#endif /* TBB_USE_ASSERT */ + cache_aligned_allocator >().deallocate(my_rep,1); + } + + //! Enqueue item at tail of queue + void internal_push( const void* src ) { + concurrent_queue_rep& r = *my_rep; + ticket k = r.tail_counter++; + r.choose(k).push( src, k, *this ); + } + + //! Attempt to dequeue item from queue. + /** NULL if there was no item to dequeue. */ + bool internal_try_pop( void* dst ) ; + + //! Get size of queue; result may be invalid if queue is modified concurrently + size_t internal_size() const ; + + //! check if the queue is empty; thread safe + bool internal_empty() const ; + + //! free any remaining pages + /* note that the name may be misleading, but it remains so due to a historical accident. */ + void internal_finish_clear() ; + + //! Obsolete + void internal_throw_exception() const { + throw_exception( eid_bad_alloc ); + } + + //! copy internal representation + void assign( const concurrent_queue_base_v3& src ) ; +}; + +template +concurrent_queue_base_v3::concurrent_queue_base_v3() { + const size_t item_size = sizeof(T); + my_rep = cache_aligned_allocator >().allocate(1); + __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" ); + memset(my_rep,0,sizeof(concurrent_queue_rep)); + my_rep->item_size = item_size; + my_rep->items_per_page = item_size<= 8 ? 32 : + item_size<= 16 ? 16 : + item_size<= 32 ? 8 : + item_size<= 64 ? 4 : + item_size<=128 ? 2 : + 1; +} + +template +bool concurrent_queue_base_v3::internal_try_pop( void* dst ) { + concurrent_queue_rep& r = *my_rep; + ticket k; + do { + k = r.head_counter; + for(;;) { + if( (ptrdiff_t)(r.tail_counter-k)<=0 ) { + // Queue is empty + return false; + } + // Queue had item with ticket k when we looked. Attempt to get that item. + ticket tk=k; +#if defined(_MSC_VER) && defined(_Wp64) + #pragma warning (push) + #pragma warning (disable: 4267) +#endif + k = r.head_counter.compare_and_swap( tk+1, tk ); +#if defined(_MSC_VER) && defined(_Wp64) + #pragma warning (pop) +#endif + if( k==tk ) + break; + // Another thread snatched the item, retry. + } + } while( !r.choose( k ).pop( dst, k, *this ) ); + return true; +} + +template +size_t concurrent_queue_base_v3::internal_size() const { + concurrent_queue_rep& r = *my_rep; + __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL ); + ticket hc = r.head_counter; + size_t nie = r.n_invalid_entries; + ticket tc = r.tail_counter; + __TBB_ASSERT( hc!=tc || !nie, NULL ); + ptrdiff_t sz = tc-hc-nie; + return sz<0 ? 0 : size_t(sz); +} + +template +bool concurrent_queue_base_v3::internal_empty() const { + concurrent_queue_rep& r = *my_rep; + ticket tc = r.tail_counter; + ticket hc = r.head_counter; + // if tc!=r.tail_counter, the queue was not empty at some point between the two reads. + return tc==r.tail_counter && tc==hc+r.n_invalid_entries ; +} + +template +void concurrent_queue_base_v3::internal_finish_clear() { + concurrent_queue_rep& r = *my_rep; + size_t nq = r.n_queue; + for( size_t i=0; i +void concurrent_queue_base_v3::assign( const concurrent_queue_base_v3& src ) { + concurrent_queue_rep& r = *my_rep; + r.items_per_page = src.my_rep->items_per_page; + + // copy concurrent_queue_rep. + r.head_counter = src.my_rep->head_counter; + r.tail_counter = src.my_rep->tail_counter; + r.n_invalid_entries = src.my_rep->n_invalid_entries; + + // copy micro_queues + for( size_t i = 0; iarray[i], *this); + + __TBB_ASSERT( r.head_counter==src.my_rep->head_counter && r.tail_counter==src.my_rep->tail_counter, + "the source concurrent queue should not be concurrently modified." ); +} + +template class concurrent_queue_iterator; + +template +class concurrent_queue_iterator_rep: no_assign { + typedef typename micro_queue::padded_page padded_page; +public: + ticket head_counter; + const concurrent_queue_base_v3& my_queue; + typename concurrent_queue_base_v3::page* array[concurrent_queue_rep::n_queue]; + concurrent_queue_iterator_rep( const concurrent_queue_base_v3& queue ) : + head_counter(queue.my_rep->head_counter), + my_queue(queue) + { + for( size_t k=0; k::n_queue; ++k ) + array[k] = queue.my_rep->array[k].head_page; + } + + //! Set item to point to kth element. Return true if at end of queue or item is marked valid; false otherwise. + bool get_item( T*& item, size_t k ) ; +}; + +template +bool concurrent_queue_iterator_rep::get_item( T*& item, size_t k ) { + if( k==my_queue.my_rep->tail_counter ) { + item = NULL; + return true; + } else { + typename concurrent_queue_base_v3::page* p = array[concurrent_queue_rep::index(k)]; + __TBB_ASSERT(p,NULL); + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, my_queue.my_rep->items_per_page ); + item = µ_queue::get_ref(*p,i); + return (p->mask & uintptr_t(1)< +class concurrent_queue_iterator_base_v3 : no_assign { + //! Represents concurrent_queue over which we are iterating. + /** NULL if one past last element in queue. */ + concurrent_queue_iterator_rep* my_rep; + + template + friend bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); + + template + friend bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); +protected: + //! Pointer to current item + Value* my_item; + + //! Default constructor + concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) { +#if __TBB_GCC_OPTIMIZER_ORDERING_BROKEN + __TBB_compiler_fence(); +#endif + } + + //! Copy constructor + concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) + : no_assign(), my_rep(NULL), my_item(NULL) { + assign(i); + } + + //! Construct iterator pointing to head of queue. + concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ) ; + + //! Assignment + void assign( const concurrent_queue_iterator_base_v3& other ) ; + + //! Advance iterator one step towards tail of queue. + void advance() ; + + //! Destructor + ~concurrent_queue_iterator_base_v3() { + cache_aligned_allocator >().deallocate(my_rep, 1); + my_rep = NULL; + } +}; + +template +concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ) { + my_rep = cache_aligned_allocator >().allocate(1); + new( my_rep ) concurrent_queue_iterator_rep(queue); + size_t k = my_rep->head_counter; + if( !my_rep->get_item(my_item, k) ) advance(); +} + +template +void concurrent_queue_iterator_base_v3::assign( const concurrent_queue_iterator_base_v3& other ) { + if( my_rep!=other.my_rep ) { + if( my_rep ) { + cache_aligned_allocator >().deallocate(my_rep, 1); + my_rep = NULL; + } + if( other.my_rep ) { + my_rep = cache_aligned_allocator >().allocate(1); + new( my_rep ) concurrent_queue_iterator_rep( *other.my_rep ); + } + } + my_item = other.my_item; +} + +template +void concurrent_queue_iterator_base_v3::advance() { + __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" ); + size_t k = my_rep->head_counter; + const concurrent_queue_base_v3& queue = my_rep->my_queue; +#if TBB_USE_ASSERT + Value* tmp; + my_rep->get_item(tmp,k); + __TBB_ASSERT( my_item==tmp, NULL ); +#endif /* TBB_USE_ASSERT */ + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, queue.my_rep->items_per_page ); + if( i==queue.my_rep->items_per_page-1 ) { + typename concurrent_queue_base_v3::page*& root = my_rep->array[concurrent_queue_rep::index(k)]; + root = root->next; + } + // advance k + my_rep->head_counter = ++k; + if( !my_rep->get_item(my_item, k) ) advance(); +} + +//! Similar to C++0x std::remove_cv +/** "tbb_" prefix added to avoid overload confusion with C++0x implementations. */ +template struct tbb_remove_cv {typedef T type;}; +template struct tbb_remove_cv {typedef T type;}; +template struct tbb_remove_cv {typedef T type;}; +template struct tbb_remove_cv {typedef T type;}; + +//! Meets requirements of a forward iterator for STL. +/** Value is either the T or const T type of the container. + @ingroup containers */ +template +class concurrent_queue_iterator: public concurrent_queue_iterator_base_v3::type>, + public std::iterator { +#if !__TBB_TEMPLATE_FRIENDS_BROKEN + template + friend class ::tbb::strict_ppl::concurrent_queue; +#else +public: // workaround for MSVC +#endif + //! Construct iterator pointing to head of queue. + concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) : + concurrent_queue_iterator_base_v3::type>(queue) + { + } + +public: + concurrent_queue_iterator() {} + + concurrent_queue_iterator( const concurrent_queue_iterator& other ) : + concurrent_queue_iterator_base_v3::type>(other) + {} + + //! Iterator assignment + concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) { + this->assign(other); + return *this; + } + + //! Reference to current item + Value& operator*() const { + return *static_cast(this->my_item); + } + + Value* operator->() const {return &operator*();} + + //! Advance to next item in queue + concurrent_queue_iterator& operator++() { + this->advance(); + return *this; + } + + //! Post increment + Value* operator++(int) { + Value* result = &operator*(); + operator++(); + return result; + } +}; // concurrent_queue_iterator + + +template +bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item==j.my_item; +} + +template +bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item!=j.my_item; +} + +} // namespace internal + +//! @endcond + +} // namespace strict_ppl + +//! @cond INTERNAL +namespace internal { + +class concurrent_queue_rep; +class concurrent_queue_iterator_rep; +class concurrent_queue_iterator_base_v3; +template class concurrent_queue_iterator; + +//! For internal use only. +/** Type-independent portion of concurrent_queue. + @ingroup containers */ +class concurrent_queue_base_v3: no_copy { + //! Internal representation + concurrent_queue_rep* my_rep; + + friend class concurrent_queue_rep; + friend struct micro_queue; + friend class micro_queue_pop_finalizer; + friend class concurrent_queue_iterator_rep; + friend class concurrent_queue_iterator_base_v3; +protected: + //! Prefix on a page + struct page { + page* next; + uintptr_t mask; + }; + + //! Capacity of the queue + ptrdiff_t my_capacity; + + //! Always a power of 2 + size_t items_per_page; + + //! Size of an item + size_t item_size; + +#if __TBB_PROTECTED_NESTED_CLASS_BROKEN +public: +#endif + template + struct padded_page: page { + //! Not defined anywhere - exists to quiet warnings. + padded_page(); + //! Not defined anywhere - exists to quiet warnings. + void operator=( const padded_page& ); + //! Must be last field. + T last; + }; + +private: + virtual void copy_item( page& dst, size_t index, const void* src ) = 0; + virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) = 0; +protected: + __TBB_EXPORTED_METHOD concurrent_queue_base_v3( size_t item_size ); + virtual __TBB_EXPORTED_METHOD ~concurrent_queue_base_v3(); + + //! Enqueue item at tail of queue + void __TBB_EXPORTED_METHOD internal_push( const void* src ); + + //! Dequeue item from head of queue + void __TBB_EXPORTED_METHOD internal_pop( void* dst ); + + //! Abort all pending queue operations + void __TBB_EXPORTED_METHOD internal_abort(); + + //! Attempt to enqueue item onto queue. + bool __TBB_EXPORTED_METHOD internal_push_if_not_full( const void* src ); + + //! Attempt to dequeue item from queue. + /** NULL if there was no item to dequeue. */ + bool __TBB_EXPORTED_METHOD internal_pop_if_present( void* dst ); + + //! Get size of queue + ptrdiff_t __TBB_EXPORTED_METHOD internal_size() const; + + //! Check if the queue is emtpy + bool __TBB_EXPORTED_METHOD internal_empty() const; + + //! Set the queue capacity + void __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size ); + + //! custom allocator + virtual page *allocate_page() = 0; + + //! custom de-allocator + virtual void deallocate_page( page *p ) = 0; + + //! free any remaining pages + /* note that the name may be misleading, but it remains so due to a historical accident. */ + void __TBB_EXPORTED_METHOD internal_finish_clear() ; + + //! throw an exception + void __TBB_EXPORTED_METHOD internal_throw_exception() const; + + //! copy internal representation + void __TBB_EXPORTED_METHOD assign( const concurrent_queue_base_v3& src ) ; + +private: + virtual void copy_page_item( page& dst, size_t dindex, const page& src, size_t sindex ) = 0; +}; + +//! Type-independent portion of concurrent_queue_iterator. +/** @ingroup containers */ +class concurrent_queue_iterator_base_v3 { + //! concurrent_queue over which we are iterating. + /** NULL if one past last element in queue. */ + concurrent_queue_iterator_rep* my_rep; + + template + friend bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); + + template + friend bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); + + void initialize( const concurrent_queue_base_v3& queue, size_t offset_of_data ); +protected: + //! Pointer to current item + void* my_item; + + //! Default constructor + concurrent_queue_iterator_base_v3() : my_rep(NULL), my_item(NULL) {} + + //! Copy constructor + concurrent_queue_iterator_base_v3( const concurrent_queue_iterator_base_v3& i ) : my_rep(NULL), my_item(NULL) { + assign(i); + } + + //! Obsolete entry point for constructing iterator pointing to head of queue. + /** Does not work correctly for SSE types. */ + __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue ); + + //! Construct iterator pointing to head of queue. + __TBB_EXPORTED_METHOD concurrent_queue_iterator_base_v3( const concurrent_queue_base_v3& queue, size_t offset_of_data ); + + //! Assignment + void __TBB_EXPORTED_METHOD assign( const concurrent_queue_iterator_base_v3& i ); + + //! Advance iterator one step towards tail of queue. + void __TBB_EXPORTED_METHOD advance(); + + //! Destructor + __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base_v3(); +}; + +typedef concurrent_queue_iterator_base_v3 concurrent_queue_iterator_base; + +//! Meets requirements of a forward iterator for STL. +/** Value is either the T or const T type of the container. + @ingroup containers */ +template +class concurrent_queue_iterator: public concurrent_queue_iterator_base, + public std::iterator { + +#if !defined(_MSC_VER) || defined(__INTEL_COMPILER) + template + friend class ::tbb::concurrent_bounded_queue; + + template + friend class ::tbb::deprecated::concurrent_queue; +#else +public: // workaround for MSVC +#endif + //! Construct iterator pointing to head of queue. + concurrent_queue_iterator( const concurrent_queue_base_v3& queue ) : + concurrent_queue_iterator_base_v3(queue,__TBB_offsetof(concurrent_queue_base_v3::padded_page,last)) + { + } + +public: + concurrent_queue_iterator() {} + + /** If Value==Container::value_type, then this routine is the copy constructor. + If Value==const Container::value_type, then this routine is a conversion constructor. */ + concurrent_queue_iterator( const concurrent_queue_iterator& other ) : + concurrent_queue_iterator_base_v3(other) + {} + + //! Iterator assignment + concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) { + assign(other); + return *this; + } + + //! Reference to current item + Value& operator*() const { + return *static_cast(my_item); + } + + Value* operator->() const {return &operator*();} + + //! Advance to next item in queue + concurrent_queue_iterator& operator++() { + advance(); + return *this; + } + + //! Post increment + Value* operator++(int) { + Value* result = &operator*(); + operator++(); + return result; + } +}; // concurrent_queue_iterator + + +template +bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item==j.my_item; +} + +template +bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item!=j.my_item; +} + +} // namespace internal; + +//! @endcond + +} // namespace tbb + +#endif /* __TBB__concurrent_queue_impl_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_unordered_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_unordered_impl.h new file mode 100644 index 0000000000..2cb1bb6456 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_concurrent_unordered_impl.h @@ -0,0 +1,1427 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* Container implementations in this header are based on PPL implementations + provided by Microsoft. */ + +#ifndef __TBB__concurrent_unordered_impl_H +#define __TBB__concurrent_unordered_impl_H +#if !defined(__TBB_concurrent_unordered_map_H) && !defined(__TBB_concurrent_unordered_set_H) && !defined(__TBB_concurrent_hash_map_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#include "../tbb_stddef.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include +#include // Need std::pair +#include +#include // For tbb_hasher +#include // Need std::memset + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#include "../atomic.h" +#include "../tbb_exception.h" +#include "../tbb_allocator.h" + +namespace tbb { +namespace interface5 { +//! @cond INTERNAL +namespace internal { + +template +class split_ordered_list; +template +class concurrent_unordered_base; + +// Forward list iterators (without skipping dummy elements) +template +class flist_iterator : public std::iterator +{ + template + friend class split_ordered_list; + template + friend class concurrent_unordered_base; + template + friend class flist_iterator; + + typedef typename Solist::nodeptr_t nodeptr_t; +public: + typedef typename Solist::value_type value_type; + typedef typename Solist::difference_type difference_type; + typedef typename Solist::pointer pointer; + typedef typename Solist::reference reference; + + flist_iterator() : my_node_ptr(0) {} + flist_iterator( const flist_iterator &other ) + : my_node_ptr(other.my_node_ptr) {} + + reference operator*() const { return my_node_ptr->my_element; } + pointer operator->() const { return &**this; } + + flist_iterator& operator++() { + my_node_ptr = my_node_ptr->my_next; + return *this; + } + + flist_iterator operator++(int) { + flist_iterator tmp = *this; + ++*this; + return tmp; + } + +protected: + flist_iterator(nodeptr_t pnode) : my_node_ptr(pnode) {} + nodeptr_t get_node_ptr() const { return my_node_ptr; } + + nodeptr_t my_node_ptr; + + template + friend bool operator==( const flist_iterator &i, const flist_iterator &j ); + template + friend bool operator!=( const flist_iterator& i, const flist_iterator& j ); +}; + +template +bool operator==( const flist_iterator &i, const flist_iterator &j ) { + return i.my_node_ptr == j.my_node_ptr; +} +template +bool operator!=( const flist_iterator& i, const flist_iterator& j ) { + return i.my_node_ptr != j.my_node_ptr; +} + +// Split-order list iterators, needed to skip dummy elements +template +class solist_iterator : public flist_iterator +{ + typedef flist_iterator base_type; + typedef typename Solist::nodeptr_t nodeptr_t; + using base_type::get_node_ptr; + template + friend class split_ordered_list; + template + friend class solist_iterator; + template + friend bool operator==( const solist_iterator &i, const solist_iterator &j ); + template + friend bool operator!=( const solist_iterator& i, const solist_iterator& j ); + + const Solist *my_list_ptr; + solist_iterator(nodeptr_t pnode, const Solist *plist) : base_type(pnode), my_list_ptr(plist) {} + +public: + typedef typename Solist::value_type value_type; + typedef typename Solist::difference_type difference_type; + typedef typename Solist::pointer pointer; + typedef typename Solist::reference reference; + + solist_iterator() {} + solist_iterator(const solist_iterator &other ) + : base_type(other), my_list_ptr(other.my_list_ptr) {} + + reference operator*() const { + return this->base_type::operator*(); + } + + pointer operator->() const { + return (&**this); + } + + solist_iterator& operator++() { + do ++(*(base_type *)this); + while (get_node_ptr() != NULL && get_node_ptr()->is_dummy()); + + return (*this); + } + + solist_iterator operator++(int) { + solist_iterator tmp = *this; + do ++*this; + while (get_node_ptr() != NULL && get_node_ptr()->is_dummy()); + + return (tmp); + } +}; + +template +bool operator==( const solist_iterator &i, const solist_iterator &j ) { + return i.my_node_ptr == j.my_node_ptr && i.my_list_ptr == j.my_list_ptr; +} +template +bool operator!=( const solist_iterator& i, const solist_iterator& j ) { + return i.my_node_ptr != j.my_node_ptr || i.my_list_ptr != j.my_list_ptr; +} + +// Forward type and class definitions +typedef size_t sokey_t; + + +// Forward list in which elements are sorted in a split-order +template +class split_ordered_list +{ +public: + typedef split_ordered_list self_type; + typedef typename Allocator::template rebind::other allocator_type; + struct node; + typedef node *nodeptr_t; + + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef typename allocator_type::value_type value_type; + + typedef solist_iterator const_iterator; + typedef solist_iterator iterator; + typedef flist_iterator raw_const_iterator; + typedef flist_iterator raw_iterator; + + // Node that holds the element in a split-ordered list + struct node : tbb::internal::no_assign + { + // Initialize the node with the given order key + void init(sokey_t order_key) { + my_order_key = order_key; + my_next = NULL; + } + + // Return the order key (needed for hashing) + sokey_t get_order_key() const { // TODO: remove + return my_order_key; + } + + // Inserts the new element in the list in an atomic fashion + nodeptr_t atomic_set_next(nodeptr_t new_node, nodeptr_t current_node) + { + // Try to change the next pointer on the current element to a new element, only if it still points to the cached next + nodeptr_t exchange_node = (nodeptr_t) __TBB_CompareAndSwapW((void *) &my_next, (uintptr_t)new_node, (uintptr_t)current_node); + + if (exchange_node == current_node) // TODO: why this branch? + { + // Operation succeeded, return the new node + return new_node; + } + else + { + // Operation failed, return the "interfering" node + return exchange_node; + } + } + + // Checks if this element in the list is a dummy, order enforcing node. Dummy nodes are used by buckets + // in the hash table to quickly index into the right subsection of the split-ordered list. + bool is_dummy() const { + return (my_order_key & 0x1) == 0; + } + + + nodeptr_t my_next; // Next element in the list + value_type my_element; // Element storage + sokey_t my_order_key; // Order key for this element + }; + + // Allocate a new node with the given order key and value + nodeptr_t create_node(sokey_t order_key, const T &value) { + nodeptr_t pnode = my_node_allocator.allocate(1); + + __TBB_TRY { + new(static_cast(&pnode->my_element)) T(value); + pnode->init(order_key); + } __TBB_CATCH(...) { + my_node_allocator.deallocate(pnode, 1); + __TBB_RETHROW(); + } + + return (pnode); + } + + // Allocate a new node with the given order key; used to allocate dummy nodes + nodeptr_t create_node(sokey_t order_key) { + nodeptr_t pnode = my_node_allocator.allocate(1); + pnode->init(order_key); + return (pnode); + } + + split_ordered_list(allocator_type a = allocator_type()) + : my_node_allocator(a), my_element_count(0) + { + // Immediately allocate a dummy node with order key of 0. This node + // will always be the head of the list. + my_head = create_node(0); + } + + ~split_ordered_list() + { + // Clear the list + clear(); + + // Remove the head element which is not cleared by clear() + nodeptr_t pnode = my_head; + my_head = NULL; + + __TBB_ASSERT(pnode != NULL && pnode->my_next == NULL, "Invalid head list node"); + + destroy_node(pnode); + } + + // Common forward list functions + + allocator_type get_allocator() const { + return (my_node_allocator); + } + + void clear() { + nodeptr_t pnext; + nodeptr_t pnode = my_head; + + __TBB_ASSERT(my_head != NULL, "Invalid head list node"); + pnext = pnode->my_next; + pnode->my_next = NULL; + pnode = pnext; + + while (pnode != NULL) + { + pnext = pnode->my_next; + destroy_node(pnode); + pnode = pnext; + } + + my_element_count = 0; + } + + // Returns a first non-dummy element in the SOL + iterator begin() { + return first_real_iterator(raw_begin()); + } + + // Returns a first non-dummy element in the SOL + const_iterator begin() const { + return first_real_iterator(raw_begin()); + } + + iterator end() { + return (iterator(0, this)); + } + + const_iterator end() const { + return (const_iterator(0, this)); + } + + const_iterator cbegin() const { + return (((const self_type *)this)->begin()); + } + + const_iterator cend() const { + return (((const self_type *)this)->end()); + } + + // Checks if the number of elements (non-dummy) is 0 + bool empty() const { + return (my_element_count == 0); + } + + // Returns the number of non-dummy elements in the list + size_type size() const { + return my_element_count; + } + + // Returns the maximum size of the list, determined by the allocator + size_type max_size() const { + return my_node_allocator.max_size(); + } + + // Swaps 'this' list with the passed in one + void swap(self_type& other) + { + if (this == &other) + { + // Nothing to do + return; + } + + std::swap(my_element_count, other.my_element_count); + std::swap(my_head, other.my_head); + } + + // Split-order list functions + + // Returns a first element in the SOL, which is always a dummy + raw_iterator raw_begin() { + return raw_iterator(my_head); + } + + // Returns a first element in the SOL, which is always a dummy + raw_const_iterator raw_begin() const { + return raw_const_iterator(my_head); + } + + raw_iterator raw_end() { + return raw_iterator(0); + } + + raw_const_iterator raw_end() const { + return raw_const_iterator(0); + } + + static sokey_t get_order_key(const raw_const_iterator& it) { + return it.get_node_ptr()->get_order_key(); + } + + static sokey_t get_safe_order_key(const raw_const_iterator& it) { + if( !it.get_node_ptr() ) return ~sokey_t(0); + return it.get_node_ptr()->get_order_key(); + } + + // Returns a public iterator version of the internal iterator. Public iterator must not + // be a dummy private iterator. + iterator get_iterator(raw_iterator it) { + __TBB_ASSERT(it.get_node_ptr() == NULL || !it.get_node_ptr()->is_dummy(), "Invalid user node (dummy)"); + return iterator(it.get_node_ptr(), this); + } + + // Returns a public iterator version of the internal iterator. Public iterator must not + // be a dummy private iterator. + const_iterator get_iterator(raw_const_iterator it) const { + __TBB_ASSERT(it.get_node_ptr() == NULL || !it.get_node_ptr()->is_dummy(), "Invalid user node (dummy)"); + return const_iterator(it.get_node_ptr(), this); + } + + // Returns a non-const version of the raw_iterator + raw_iterator get_iterator(raw_const_iterator it) { + return raw_iterator(it.get_node_ptr()); + } + + // Returns a non-const version of the iterator + static iterator get_iterator(const_iterator it) { + return iterator(it.my_node_ptr, it.my_list_ptr); + } + + // Returns a public iterator version of a first non-dummy internal iterator at or after + // the passed in internal iterator. + iterator first_real_iterator(raw_iterator it) + { + // Skip all dummy, internal only iterators + while (it != raw_end() && it.get_node_ptr()->is_dummy()) + ++it; + + return iterator(it.get_node_ptr(), this); + } + + // Returns a public iterator version of a first non-dummy internal iterator at or after + // the passed in internal iterator. + const_iterator first_real_iterator(raw_const_iterator it) const + { + // Skip all dummy, internal only iterators + while (it != raw_end() && it.get_node_ptr()->is_dummy()) + ++it; + + return const_iterator(it.get_node_ptr(), this); + } + + // Erase an element using the allocator + void destroy_node(nodeptr_t pnode) { + if (!pnode->is_dummy()) my_node_allocator.destroy(pnode); + my_node_allocator.deallocate(pnode, 1); + } + + // Try to insert a new element in the list. If insert fails, return the node that + // was inserted instead. + nodeptr_t try_insert(nodeptr_t previous, nodeptr_t new_node, nodeptr_t current_node) { + new_node->my_next = current_node; + return previous->atomic_set_next(new_node, current_node); + } + + // Insert a new element between passed in iterators + std::pair try_insert(raw_iterator it, raw_iterator next, const value_type &value, sokey_t order_key, size_type *new_count) + { + nodeptr_t pnode = create_node(order_key, value); + nodeptr_t inserted_node = try_insert(it.get_node_ptr(), pnode, next.get_node_ptr()); + + if (inserted_node == pnode) + { + // If the insert succeeded, check that the order is correct and increment the element count + check_range(); + *new_count = __TBB_FetchAndAddW((uintptr_t*)&my_element_count, uintptr_t(1)); + return std::pair(iterator(pnode, this), true); + } + else + { + // If the insert failed (element already there), then delete the new one + destroy_node(pnode); + return std::pair(end(), false); + } + } + + // Insert a new dummy element, starting search at a parent dummy element + raw_iterator insert_dummy(raw_iterator it, sokey_t order_key) + { + raw_iterator last = raw_end(); + raw_iterator where = it; + + __TBB_ASSERT(where != last, "Invalid head node"); + + ++where; + + // Create a dummy element up front, even though it may be discarded (due to concurrent insertion) + nodeptr_t dummy_node = create_node(order_key); + + for (;;) + { + __TBB_ASSERT(it != last, "Invalid head list node"); + + // If the head iterator is at the end of the list, or past the point where this dummy + // node needs to be inserted, then try to insert it. + if (where == last || get_order_key(where) > order_key) + { + __TBB_ASSERT(get_order_key(it) < order_key, "Invalid node order in the list"); + + // Try to insert it in the right place + nodeptr_t inserted_node = try_insert(it.get_node_ptr(), dummy_node, where.get_node_ptr()); + + if (inserted_node == dummy_node) + { + // Insertion succeeded, check the list for order violations + check_range(); + return raw_iterator(dummy_node); + } + else + { + // Insertion failed: either dummy node was inserted by another thread, or + // a real element was inserted at exactly the same place as dummy node. + // Proceed with the search from the previous location where order key was + // known to be larger (note: this is legal only because there is no safe + // concurrent erase operation supported). + where = it; + ++where; + continue; + } + } + else if (get_order_key(where) == order_key) + { + // Another dummy node with the same value found, discard the new one. + destroy_node(dummy_node); + return where; + } + + // Move the iterator forward + it = where; + ++where; + } + + } + + // This erase function can handle both real and dummy nodes + void erase_node(raw_iterator previous, raw_const_iterator& where) + { + nodeptr_t pnode = (where++).get_node_ptr(); + nodeptr_t prevnode = previous.get_node_ptr(); + __TBB_ASSERT(prevnode->my_next == pnode, "Erase must take consecutive iterators"); + prevnode->my_next = pnode->my_next; + + destroy_node(pnode); + } + + // Erase the element (previous node needs to be passed because this is a forward only list) + iterator erase_node(raw_iterator previous, const_iterator where) + { + raw_const_iterator it = where; + erase_node(previous, it); + my_element_count--; + + return get_iterator(first_real_iterator(it)); + } + + // Move all elements from the passed in split-ordered list to this one + void move_all(self_type& source) + { + raw_const_iterator first = source.raw_begin(); + raw_const_iterator last = source.raw_end(); + + if (first == last) + return; + + nodeptr_t previous_node = my_head; + raw_const_iterator begin_iterator = first++; + + // Move all elements one by one, including dummy ones + for (raw_const_iterator it = first; it != last;) + { + nodeptr_t pnode = it.get_node_ptr(); + + nodeptr_t dummy_node = pnode->is_dummy() ? create_node(pnode->get_order_key()) : create_node(pnode->get_order_key(), pnode->my_element); + previous_node = try_insert(previous_node, dummy_node, NULL); + __TBB_ASSERT(previous_node != NULL, "Insertion must succeed"); + raw_const_iterator where = it++; + source.erase_node(get_iterator(begin_iterator), where); + } + check_range(); + } + + +private: + + // Check the list for order violations + void check_range() + { +#if TBB_USE_ASSERT + for (raw_iterator it = raw_begin(); it != raw_end(); ++it) + { + raw_iterator next_iterator = it; + ++next_iterator; + + __TBB_ASSERT(next_iterator == end() || next_iterator.get_node_ptr()->get_order_key() >= it.get_node_ptr()->get_order_key(), "!!! List order inconsistency !!!"); + } +#endif + } + + typename allocator_type::template rebind::other my_node_allocator; // allocator object for nodes + size_type my_element_count; // Total item count, not counting dummy nodes + nodeptr_t my_head; // pointer to head node +}; + +// Template class for hash compare +template +class hash_compare +{ +public: + hash_compare() {} + + hash_compare(Hasher a_hasher) : my_hash_object(a_hasher) {} + + hash_compare(Hasher a_hasher, Key_equality a_keyeq) : my_hash_object(a_hasher), my_key_compare_object(a_keyeq) {} + + size_t operator()(const Key& key) const { + return ((size_t)my_hash_object(key)); + } + + bool operator()(const Key& key1, const Key& key2) const { + return (!my_key_compare_object(key1, key2)); + } + + Hasher my_hash_object; // The hash object + Key_equality my_key_compare_object; // The equality comparator object +}; + +#if _MSC_VER +#pragma warning(push) +#pragma warning(disable: 4127) // warning 4127 -- while (true) has a constant expression in it (for allow_multimapping) +#endif + +template +class concurrent_unordered_base : public Traits +{ +protected: + // Type definitions + typedef concurrent_unordered_base self_type; + typedef typename Traits::value_type value_type; + typedef typename Traits::key_type key_type; + typedef typename Traits::hash_compare hash_compare; + typedef typename Traits::value_compare value_compare; + typedef typename Traits::allocator_type allocator_type; + typedef typename allocator_type::pointer pointer; + typedef typename allocator_type::const_pointer const_pointer; + typedef typename allocator_type::reference reference; + typedef typename allocator_type::const_reference const_reference; + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type difference_type; + typedef split_ordered_list solist_t; + typedef typename solist_t::nodeptr_t nodeptr_t; + // Iterators that walk the entire split-order list, including dummy nodes + typedef typename solist_t::raw_iterator raw_iterator; + typedef typename solist_t::raw_const_iterator raw_const_iterator; + typedef typename solist_t::iterator iterator; // TODO: restore const iterator for unordered_sets + typedef typename solist_t::const_iterator const_iterator; + typedef iterator local_iterator; + typedef const_iterator const_local_iterator; + using Traits::my_hash_compare; + using Traits::get_key; + using Traits::allow_multimapping; + +private: + typedef std::pair pairii_t; + typedef std::pair paircc_t; + + static size_type const pointers_per_table = sizeof(size_type) * 8; // One bucket segment per bit + static const size_type initial_bucket_number = 8; // Initial number of buckets + static const size_type initial_bucket_load = 4; // Initial maximum number of elements per bucket + +protected: + // Constructors/Destructors + concurrent_unordered_base(size_type n_of_buckets = initial_bucket_number, + const hash_compare& hc = hash_compare(), const allocator_type& a = allocator_type()) + : Traits(hc), my_solist(a), + my_allocator(a), my_maximum_bucket_size((float) initial_bucket_load) + { + if( n_of_buckets == 0) ++n_of_buckets; + my_number_of_buckets = 1<<__TBB_Log2((uintptr_t)n_of_buckets*2-1); // round up to power of 2 + internal_init(); + } + + concurrent_unordered_base(const concurrent_unordered_base& right, const allocator_type& a) + : Traits(right.my_hash_compare), my_solist(a), my_allocator(a) + { + internal_init(); + internal_copy(right); + } + + concurrent_unordered_base(const concurrent_unordered_base& right) + : Traits(right.my_hash_compare), my_solist(right.get_allocator()), my_allocator(right.get_allocator()) + { + internal_init(); + internal_copy(right); + } + + concurrent_unordered_base& operator=(const concurrent_unordered_base& right) { + if (this != &right) + internal_copy(right); + return (*this); + } + + ~concurrent_unordered_base() { + // Delete all node segments + internal_clear(); + } + +public: + allocator_type get_allocator() const { + return my_solist.get_allocator(); + } + + // Size and capacity function + bool empty() const { + return my_solist.empty(); + } + + size_type size() const { + return my_solist.size(); + } + + size_type max_size() const { + return my_solist.max_size(); + } + + // Iterators + iterator begin() { + return my_solist.begin(); + } + + const_iterator begin() const { + return my_solist.begin(); + } + + iterator end() { + return my_solist.end(); + } + + const_iterator end() const { + return my_solist.end(); + } + + const_iterator cbegin() const { + return my_solist.cbegin(); + } + + const_iterator cend() const { + return my_solist.cend(); + } + + // Parallel traversal support + class const_range_type : tbb::internal::no_assign { + const concurrent_unordered_base &my_table; + raw_const_iterator my_begin_node; + raw_const_iterator my_end_node; + mutable raw_const_iterator my_midpoint_node; + public: + //! Type for size of a range + typedef typename concurrent_unordered_base::size_type size_type; + typedef typename concurrent_unordered_base::value_type value_type; + typedef typename concurrent_unordered_base::reference reference; + typedef typename concurrent_unordered_base::difference_type difference_type; + typedef typename concurrent_unordered_base::const_iterator iterator; + + //! True if range is empty. + bool empty() const {return my_begin_node == my_end_node;} + + //! True if range can be partitioned into two subranges. + bool is_divisible() const { + return my_midpoint_node != my_end_node; + } + //! Split range. + const_range_type( const_range_type &r, split ) : + my_table(r.my_table), my_end_node(r.my_end_node) + { + r.my_end_node = my_begin_node = r.my_midpoint_node; + __TBB_ASSERT( !empty(), "Splitting despite the range is not divisible" ); + __TBB_ASSERT( !r.empty(), "Splitting despite the range is not divisible" ); + set_midpoint(); + r.set_midpoint(); + } + //! Init range with container and grainsize specified + const_range_type( const concurrent_unordered_base &a_table ) : + my_table(a_table), my_begin_node(a_table.my_solist.begin()), + my_end_node(a_table.my_solist.end()) + { + set_midpoint(); + } + iterator begin() const { return my_table.my_solist.get_iterator(my_begin_node); } + iterator end() const { return my_table.my_solist.get_iterator(my_end_node); } + //! The grain size for this range. + size_type grainsize() const { return 1; } + + //! Set my_midpoint_node to point approximately half way between my_begin_node and my_end_node. + void set_midpoint() const { + if( my_begin_node == my_end_node ) // not divisible + my_midpoint_node = my_end_node; + else { + sokey_t begin_key = solist_t::get_safe_order_key(my_begin_node); + sokey_t end_key = solist_t::get_safe_order_key(my_end_node); + size_t mid_bucket = __TBB_ReverseBits( begin_key + (end_key-begin_key)/2 ) % my_table.my_number_of_buckets; + while ( !my_table.is_initialized(mid_bucket) ) mid_bucket = my_table.get_parent(mid_bucket); + if(__TBB_ReverseBits(mid_bucket) > begin_key) { + // found a dummy_node between begin and end + my_midpoint_node = my_table.my_solist.first_real_iterator(my_table.get_bucket( mid_bucket )); + } + else { + // didn't find a dummy node between begin and end. + my_midpoint_node = my_end_node; + } +#if TBB_USE_ASSERT + { + sokey_t mid_key = solist_t::get_safe_order_key(my_midpoint_node); + __TBB_ASSERT( begin_key < mid_key, "my_begin_node is after my_midpoint_node" ); + __TBB_ASSERT( mid_key <= end_key, "my_midpoint_node is after my_end_node" ); + } +#endif // TBB_USE_ASSERT + } + } + }; + + class range_type : public const_range_type { + public: + typedef typename concurrent_unordered_base::iterator iterator; + //! Split range. + range_type( range_type &r, split ) : const_range_type( r, split() ) {} + //! Init range with container and grainsize specified + range_type( const concurrent_unordered_base &a_table ) : const_range_type(a_table) {} + + iterator begin() const { return solist_t::get_iterator( const_range_type::begin() ); } + iterator end() const { return solist_t::get_iterator( const_range_type::end() ); } + }; + + range_type range() { + return range_type( *this ); + } + + const_range_type range() const { + return const_range_type( *this ); + } + + // Modifiers + std::pair insert(const value_type& value) { + return internal_insert(value); + } + + iterator insert(const_iterator, const value_type& value) { + // Ignore hint + return insert(value).first; + } + + template + void insert(Iterator first, Iterator last) { + for (Iterator it = first; it != last; ++it) + insert(*it); + } + + iterator unsafe_erase(const_iterator where) { + return internal_erase(where); + } + + iterator unsafe_erase(const_iterator first, const_iterator last) { + while (first != last) + unsafe_erase(first++); + return my_solist.get_iterator(first); + } + + size_type unsafe_erase(const key_type& key) { + pairii_t where = equal_range(key); + size_type item_count = internal_distance(where.first, where.second); + unsafe_erase(where.first, where.second); + return item_count; + } + + void swap(concurrent_unordered_base& right) { + if (this != &right) { + std::swap(my_hash_compare, right.my_hash_compare); // TODO: check what ADL meant here + my_solist.swap(right.my_solist); + internal_swap_buckets(right); + std::swap(my_number_of_buckets, right.my_number_of_buckets); + std::swap(my_maximum_bucket_size, right.my_maximum_bucket_size); + } + } + + // Observers + void clear() { + // Clear list + my_solist.clear(); + + // Clear buckets + internal_clear(); + + // Initialize bucket 0 + __TBB_ASSERT(my_buckets[0] == NULL, NULL); + raw_iterator dummy_node = my_solist.raw_begin(); + set_bucket(0, dummy_node); + } + + // Lookup + iterator find(const key_type& key) { + return internal_find(key); + } + + const_iterator find(const key_type& key) const { + return const_cast(this)->internal_find(key); + } + + size_type count(const key_type& key) const { + if(allow_multimapping) { + paircc_t answer = equal_range(key); + size_type item_count = internal_distance(answer.first, answer.second); + return item_count; + } else { + return const_cast(this)->internal_find(key) == end()?0:1; + } + } + + std::pair equal_range(const key_type& key) { + return internal_equal_range(key); + } + + std::pair equal_range(const key_type& key) const { + return const_cast(this)->internal_equal_range(key); + } + + // Bucket interface - for debugging + size_type unsafe_bucket_count() const { + return my_number_of_buckets; + } + + size_type unsafe_max_bucket_count() const { + return segment_size(pointers_per_table-1); + } + + size_type unsafe_bucket_size(size_type bucket) { + size_type item_count = 0; + if (is_initialized(bucket)) { + raw_iterator it = get_bucket(bucket); + ++it; + for (; it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy(); ++it) + ++item_count; + } + return item_count; + } + + size_type unsafe_bucket(const key_type& key) const { + sokey_t order_key = (sokey_t) my_hash_compare(key); + size_type bucket = order_key % my_number_of_buckets; + return bucket; + } + + // If the bucket is initialized, return a first non-dummy element in it + local_iterator unsafe_begin(size_type bucket) { + if (!is_initialized(bucket)) + return end(); + + raw_iterator it = get_bucket(bucket); + return my_solist.first_real_iterator(it); + } + + // If the bucket is initialized, return a first non-dummy element in it + const_local_iterator unsafe_begin(size_type bucket) const + { + if (!is_initialized(bucket)) + return end(); + + raw_const_iterator it = get_bucket(bucket); + return my_solist.first_real_iterator(it); + } + + // @REVIEW: Takes O(n) + // Returns the iterator after the last non-dummy element in the bucket + local_iterator unsafe_end(size_type bucket) + { + if (!is_initialized(bucket)) + return end(); + + raw_iterator it = get_bucket(bucket); + + // Find the end of the bucket, denoted by the dummy element + do ++it; + while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); + + // Return the first real element past the end of the bucket + return my_solist.first_real_iterator(it); + } + + // @REVIEW: Takes O(n) + // Returns the iterator after the last non-dummy element in the bucket + const_local_iterator unsafe_end(size_type bucket) const + { + if (!is_initialized(bucket)) + return end(); + + raw_const_iterator it = get_bucket(bucket); + + // Find the end of the bucket, denoted by the dummy element + do ++it; + while(it != my_solist.raw_end() && !it.get_node_ptr()->is_dummy()); + + // Return the first real element past the end of the bucket + return my_solist.first_real_iterator(it); + } + + const_local_iterator unsafe_cbegin(size_type /*bucket*/) const { + return ((const self_type *) this)->begin(); + } + + const_local_iterator unsafe_cend(size_type /*bucket*/) const { + return ((const self_type *) this)->end(); + } + + // Hash policy + float load_factor() const { + return (float) size() / (float) unsafe_bucket_count(); + } + + float max_load_factor() const { + return my_maximum_bucket_size; + } + + void max_load_factor(float newmax) { + if (newmax != newmax || newmax < 0) + tbb::internal::throw_exception(tbb::internal::eid_invalid_load_factor); + my_maximum_bucket_size = newmax; + } + + // This function is a noop, because the underlying split-ordered list + // is already sorted, so an increase in the bucket number will be + // reflected next time this bucket is touched. + void rehash(size_type buckets) { + size_type current_buckets = my_number_of_buckets; + if (current_buckets >= buckets) + return; + my_number_of_buckets = 1<<__TBB_Log2((uintptr_t)buckets*2-1); // round up to power of 2 + } + +private: + + // Initialize the hash and keep the first bucket open + void internal_init() { + // Allocate an array of segment pointers + memset(my_buckets, 0, pointers_per_table * sizeof(void *)); + + // Initialize bucket 0 + raw_iterator dummy_node = my_solist.raw_begin(); + set_bucket(0, dummy_node); + } + + void internal_clear() { + for (size_type index = 0; index < pointers_per_table; ++index) { + if (my_buckets[index] != NULL) { + size_type sz = segment_size(index); + for (size_type index2 = 0; index2 < sz; ++index2) + my_allocator.destroy(&my_buckets[index][index2]); + my_allocator.deallocate(my_buckets[index], sz); + my_buckets[index] = 0; + } + } + } + + void internal_copy(const self_type& right) { + clear(); + + my_maximum_bucket_size = right.my_maximum_bucket_size; + my_number_of_buckets = right.my_number_of_buckets; + + __TBB_TRY { + insert(right.begin(), right.end()); + my_hash_compare = right.my_hash_compare; + } __TBB_CATCH(...) { + my_solist.clear(); + __TBB_RETHROW(); + } + } + + void internal_swap_buckets(concurrent_unordered_base& right) + { + // Swap all node segments + for (size_type index = 0; index < pointers_per_table; ++index) + { + raw_iterator * iterator_pointer = my_buckets[index]; + my_buckets[index] = right.my_buckets[index]; + right.my_buckets[index] = iterator_pointer; + } + } + + // Hash APIs + size_type internal_distance(const_iterator first, const_iterator last) const + { + size_type num = 0; + + for (const_iterator it = first; it != last; ++it) + ++num; + + return num; + } + + // Insert an element in the hash given its value + std::pair internal_insert(const value_type& value) + { + sokey_t order_key = (sokey_t) my_hash_compare(get_key(value)); + size_type bucket = order_key % my_number_of_buckets; + + // If bucket is empty, initialize it first + if (!is_initialized(bucket)) + init_bucket(bucket); + + size_type new_count = 0; + order_key = split_order_key_regular(order_key); + raw_iterator it = get_bucket(bucket); + raw_iterator last = my_solist.raw_end(); + raw_iterator where = it; + + __TBB_ASSERT(where != last, "Invalid head node"); + + // First node is a dummy node + ++where; + + for (;;) + { + if (where == last || solist_t::get_order_key(where) > order_key) + { + // Try to insert it in the right place + std::pair result = my_solist.try_insert(it, where, value, order_key, &new_count); + + if (result.second) + { + // Insertion succeeded, adjust the table size, if needed + adjust_table_size(new_count, my_number_of_buckets); + return result; + } + else + { + // Insertion failed: either the same node was inserted by another thread, or + // another element was inserted at exactly the same place as this node. + // Proceed with the search from the previous location where order key was + // known to be larger (note: this is legal only because there is no safe + // concurrent erase operation supported). + where = it; + ++where; + continue; + } + } + else if (!allow_multimapping && solist_t::get_order_key(where) == order_key && my_hash_compare(get_key(*where), get_key(value)) == 0) + { + // Element already in the list, return it + return std::pair(my_solist.get_iterator(where), false); + } + + // Move the iterator forward + it = where; + ++where; + } + } + + // Find the element in the split-ordered list + iterator internal_find(const key_type& key) + { + sokey_t order_key = (sokey_t) my_hash_compare(key); + size_type bucket = order_key % my_number_of_buckets; + + // If bucket is empty, initialize it first + if (!is_initialized(bucket)) + init_bucket(bucket); + + order_key = split_order_key_regular(order_key); + raw_iterator last = my_solist.raw_end(); + + for (raw_iterator it = get_bucket(bucket); it != last; ++it) + { + if (solist_t::get_order_key(it) > order_key) + { + // If the order key is smaller than the current order key, the element + // is not in the hash. + return end(); + } + else if (solist_t::get_order_key(it) == order_key) + { + // The fact that order keys match does not mean that the element is found. + // Key function comparison has to be performed to check whether this is the + // right element. If not, keep searching while order key is the same. + if (!my_hash_compare(get_key(*it), key)) + return my_solist.get_iterator(it); + } + } + + return end(); + } + + // Erase an element from the list. This is not a concurrency safe function. + iterator internal_erase(const_iterator it) + { + key_type key = get_key(*it); + sokey_t order_key = (sokey_t) my_hash_compare(key); + size_type bucket = order_key % my_number_of_buckets; + + // If bucket is empty, initialize it first + if (!is_initialized(bucket)) + init_bucket(bucket); + + order_key = split_order_key_regular(order_key); + + raw_iterator previous = get_bucket(bucket); + raw_iterator last = my_solist.raw_end(); + raw_iterator where = previous; + + __TBB_ASSERT(where != last, "Invalid head node"); + + // First node is a dummy node + ++where; + + for (;;) { + if (where == last) + return end(); + else if (my_solist.get_iterator(where) == it) + return my_solist.erase_node(previous, it); + + // Move the iterator forward + previous = where; + ++where; + } + } + + // Return the [begin, end) pair of iterators with the same key values. + // This operation makes sense only if mapping is many-to-one. + pairii_t internal_equal_range(const key_type& key) + { + sokey_t order_key = (sokey_t) my_hash_compare(key); + size_type bucket = order_key % my_number_of_buckets; + + // If bucket is empty, initialize it first + if (!is_initialized(bucket)) + init_bucket(bucket); + + order_key = split_order_key_regular(order_key); + raw_iterator end_it = my_solist.raw_end(); + + for (raw_iterator it = get_bucket(bucket); it != end_it; ++it) + { + if (solist_t::get_order_key(it) > order_key) + { + // There is no element with the given key + return pairii_t(end(), end()); + } + else if (solist_t::get_order_key(it) == order_key && !my_hash_compare(get_key(*it), key)) + { + iterator first = my_solist.get_iterator(it); + iterator last = first; + do ++last; while( allow_multimapping && last != end() && !my_hash_compare(get_key(*last), key) ); + return pairii_t(first, last); + } + } + + return pairii_t(end(), end()); + } + + // Bucket APIs + void init_bucket(size_type bucket) + { + // Bucket 0 has no parent. + __TBB_ASSERT( bucket != 0, "The first bucket must always be initialized"); + + size_type parent_bucket = get_parent(bucket); + + // All parent_bucket buckets have to be initialized before this bucket is + if (!is_initialized(parent_bucket)) + init_bucket(parent_bucket); + + raw_iterator parent = get_bucket(parent_bucket); + + // Create a dummy first node in this bucket + raw_iterator dummy_node = my_solist.insert_dummy(parent, split_order_key_dummy(bucket)); + set_bucket(bucket, dummy_node); + } + + void adjust_table_size(size_type total_elements, size_type current_size) + { + // Grow the table by a factor of 2 if possible and needed + if ( ((float) total_elements / (float) current_size) > my_maximum_bucket_size ) + { + // Double the size of the hash only if size has not changed inbetween loads + __TBB_CompareAndSwapW((uintptr_t*)&my_number_of_buckets, uintptr_t(2u*current_size), uintptr_t(current_size) ); + //Simple "my_number_of_buckets.compare_and_swap( current_size<<1, current_size );" does not work for VC8 + //due to overzealous compiler warnings in /Wp64 mode + } + } + + size_type get_parent(size_type bucket) const + { + // Unsets bucket's most significant turned-on bit + size_type msb = __TBB_Log2((uintptr_t)bucket); + return bucket & ~(size_type(1) << msb); + } + + + // Dynamic sized array (segments) + //! @return segment index of given index in the array + static size_type segment_index_of( size_type index ) { + return size_type( __TBB_Log2( uintptr_t(index|1) ) ); + } + + //! @return the first array index of given segment + static size_type segment_base( size_type k ) { + return (size_type(1)< my_number_of_buckets; // Current table size + solist_t my_solist; // List where all the elements are kept + typename allocator_type::template rebind::other my_allocator; // Allocator object for segments + float my_maximum_bucket_size; // Maximum size of the bucket + atomic my_buckets[pointers_per_table]; // The segment table +}; +#if _MSC_VER +#pragma warning(pop) // warning 4127 -- while (true) has a constant expression in it +#endif + +//! Hash multiplier +static const size_t hash_multiplier = tbb::internal::select_size_t_constant<2654435769U, 11400714819323198485ULL>::value; +} // namespace internal +//! @endcond +//! Hasher functions +template +inline size_t tbb_hasher( const T& t ) { + return static_cast( t ) * internal::hash_multiplier; +} +template +inline size_t tbb_hasher( P* ptr ) { + size_t const h = reinterpret_cast( ptr ); + return (h >> 3) ^ h; +} +template +inline size_t tbb_hasher( const std::basic_string& s ) { + size_t h = 0; + for( const E* c = s.c_str(); *c; ++c ) + h = static_cast(*c) ^ (h * internal::hash_multiplier); + return h; +} +template +inline size_t tbb_hasher( const std::pair& p ) { + return tbb_hasher(p.first) ^ tbb_hasher(p.second); +} +} // namespace interface5 +using interface5::tbb_hasher; + + +// Template class for hash compare +template +class tbb_hash +{ +public: + tbb_hash() {} + + size_t operator()(const Key& key) const + { + return tbb_hasher(key); + } +}; + +} // namespace tbb +#endif// __TBB__concurrent_unordered_impl_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_impl.h new file mode 100644 index 0000000000..c57ad0d704 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_impl.h @@ -0,0 +1,615 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_impl_H +#define __TBB__flow_graph_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +namespace internal { + + namespace graph_policy_namespace { + enum graph_buffer_policy { rejecting, reserving, queueing, tag_matching }; + } + +// -------------- function_body containers ---------------------- + + //! A functor that takes no input and generates a value of type Output + template< typename Output > + class source_body : tbb::internal::no_assign { + public: + virtual ~source_body() {} + virtual bool operator()(Output &output) = 0; + virtual source_body* clone() = 0; + }; + + //! The leaf for source_body + template< typename Output, typename Body> + class source_body_leaf : public source_body { + public: + source_body_leaf( const Body &_body ) : body(_body), init_body(_body) { } + /*override*/ bool operator()(Output &output) { return body( output ); } + /*override*/ source_body_leaf* clone() { + return new source_body_leaf< Output, Body >(init_body); + } + Body get_body() { return body; } + private: + Body body; + Body init_body; + }; + + //! A functor that takes an Input and generates an Output + template< typename Input, typename Output > + class function_body : tbb::internal::no_assign { + public: + virtual ~function_body() {} + virtual Output operator()(const Input &input) = 0; + virtual function_body* clone() = 0; + }; + + //! the leaf for function_body + template + class function_body_leaf : public function_body< Input, Output > { + public: + function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } + Output operator()(const Input &i) { return body(i); } + B get_body() { return body; } + /*override*/ function_body_leaf* clone() { + return new function_body_leaf< Input, Output, B >(init_body); + } + private: + B body; + B init_body; + }; + + //! the leaf for function_body specialized for Input and output of continue_msg + template + class function_body_leaf< continue_msg, continue_msg, B> : public function_body< continue_msg, continue_msg > { + public: + function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } + continue_msg operator()( const continue_msg &i ) { + body(i); + return i; + } + B get_body() { return body; } + /*override*/ function_body_leaf* clone() { + return new function_body_leaf< continue_msg, continue_msg, B >(init_body); + } + private: + B body; + B init_body; + }; + + //! the leaf for function_body specialized for Output of continue_msg + template + class function_body_leaf< Input, continue_msg, B> : public function_body< Input, continue_msg > { + public: + function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } + continue_msg operator()(const Input &i) { + body(i); + return continue_msg(); + } + B get_body() { return body; } + /*override*/ function_body_leaf* clone() { + return new function_body_leaf< Input, continue_msg, B >(init_body); + } + private: + B body; + B init_body; + }; + + //! the leaf for function_body specialized for Input of continue_msg + template + class function_body_leaf< continue_msg, Output, B > : public function_body< continue_msg, Output > { + public: + function_body_leaf( const B &_body ) : body(_body), init_body(_body) { } + Output operator()(const continue_msg &i) { + return body(i); + } + B get_body() { return body; } + /*override*/ function_body_leaf* clone() { + return new function_body_leaf< continue_msg, Output, B >(init_body); + } + private: + B body; + B init_body; + }; + + //! function_body that takes an Input and a set of output ports + template + class multifunction_body { + public: + virtual ~multifunction_body () {} + virtual void operator()(const Input &/* input*/, OutputSet &/*oset*/) = 0; + virtual multifunction_body* clone() = 0; + }; + + //! leaf for multifunction. OutputSet can be a std::tuple or a vector. + template + class multifunction_body_leaf : public multifunction_body { + public: + multifunction_body_leaf(const B &_body) : body(_body), init_body(_body) { } + void operator()(const Input &input, OutputSet &oset) { + body(input, oset); // body may explicitly put() to one or more of oset. + } + B get_body() { return body; } + /*override*/ multifunction_body_leaf* clone() { + return new multifunction_body_leaf(init_body); + } + private: + B body; + B init_body; + }; + +// --------------------------- end of function_body containers ------------------------ + +// --------------------------- node task bodies --------------------------------------- + + //! A task that calls a node's forward_task function + template< typename NodeType > + class forward_task_bypass : public task { + + NodeType &my_node; + + public: + + forward_task_bypass( NodeType &n ) : my_node(n) {} + + task *execute() { + task * new_task = my_node.forward_task(); + if (new_task == SUCCESSFULLY_ENQUEUED) new_task = NULL; + return new_task; + } + }; + + //! A task that calls a node's apply_body_bypass function, passing in an input of type Input + // return the task* unless it is SUCCESSFULLY_ENQUEUED, in which case return NULL + template< typename NodeType, typename Input > + class apply_body_task_bypass : public task { + + NodeType &my_node; + Input my_input; + + public: + + apply_body_task_bypass( NodeType &n, const Input &i ) : my_node(n), my_input(i) {} + + task *execute() { + task * next_task = my_node.apply_body_bypass( my_input ); + if(next_task == SUCCESSFULLY_ENQUEUED) next_task = NULL; + return next_task; + } + }; + + //! A task that calls a node's apply_body function with no input + template< typename NodeType > + class source_task_bypass : public task { + + NodeType &my_node; + + public: + + source_task_bypass( NodeType &n ) : my_node(n) {} + + task *execute() { + task *new_task = my_node.apply_body_bypass( ); + if(new_task == SUCCESSFULLY_ENQUEUED) return NULL; + return new_task; + } + }; + +// ------------------------ end of node task bodies ----------------------------------- + + //! An empty functor that takes an Input and returns a default constructed Output + template< typename Input, typename Output > + struct empty_body { + Output operator()( const Input & ) const { return Output(); } + }; + + //! A node_cache maintains a std::queue of elements of type T. Each operation is protected by a lock. + template< typename T, typename M=spin_mutex > + class node_cache { + public: + + typedef size_t size_type; + + bool empty() { + typename my_mutex_type::scoped_lock lock( my_mutex ); + return internal_empty(); + } + + void add( T &n ) { + typename my_mutex_type::scoped_lock lock( my_mutex ); + internal_push(n); + } + + void remove( T &n ) { + typename my_mutex_type::scoped_lock lock( my_mutex ); + for ( size_t i = internal_size(); i != 0; --i ) { + T &s = internal_pop(); + if ( &s != &n ) { + internal_push(s); + } + } + } + + protected: + + typedef M my_mutex_type; + my_mutex_type my_mutex; + std::queue< T * > my_q; + + // Assumes lock is held + inline bool internal_empty( ) { + return my_q.empty(); + } + + // Assumes lock is held + inline size_type internal_size( ) { + return my_q.size(); + } + + // Assumes lock is held + inline void internal_push( T &n ) { + my_q.push(&n); + } + + // Assumes lock is held + inline T &internal_pop() { + T *v = my_q.front(); + my_q.pop(); + return *v; + } + + }; + + //! A cache of predecessors that only supports try_get + template< typename T, typename M=spin_mutex > + class predecessor_cache : public node_cache< sender, M > { + public: + typedef M my_mutex_type; + typedef T output_type; + typedef sender predecessor_type; + typedef receiver successor_type; + + predecessor_cache( ) : my_owner( NULL ) { } + + void set_owner( successor_type *owner ) { my_owner = owner; } + + bool get_item( output_type &v ) { + + bool msg = false; + + do { + predecessor_type *src; + { + typename my_mutex_type::scoped_lock lock(this->my_mutex); + if ( this->internal_empty() ) { + break; + } + src = &this->internal_pop(); + } + + // Try to get from this sender + msg = src->try_get( v ); + + if (msg == false) { + // Relinquish ownership of the edge + if ( my_owner) + src->register_successor( *my_owner ); + } else { + // Retain ownership of the edge + this->add(*src); + } + } while ( msg == false ); + return msg; + } + + void reset() { + if(!my_owner) { + return; // retain ownership of edges + } + for(;;) { + predecessor_type *src; + { + typename my_mutex_type::scoped_lock lock(this->my_mutex); + if(this->internal_empty()) break; + src = &this->internal_pop(); + } + src->register_successor( *my_owner); + } + } + + protected: + + successor_type *my_owner; + }; + + //! An cache of predecessors that supports requests and reservations + template< typename T, typename M=spin_mutex > + class reservable_predecessor_cache : public predecessor_cache< T, M > { + public: + typedef M my_mutex_type; + typedef T output_type; + typedef sender predecessor_type; + typedef receiver successor_type; + + reservable_predecessor_cache( ) : reserved_src(NULL) { } + + bool + try_reserve( output_type &v ) { + bool msg = false; + + do { + { + typename my_mutex_type::scoped_lock lock(this->my_mutex); + if ( reserved_src || this->internal_empty() ) + return false; + + reserved_src = &this->internal_pop(); + } + + // Try to get from this sender + msg = reserved_src->try_reserve( v ); + + if (msg == false) { + typename my_mutex_type::scoped_lock lock(this->my_mutex); + // Relinquish ownership of the edge + reserved_src->register_successor( *this->my_owner ); + reserved_src = NULL; + } else { + // Retain ownership of the edge + this->add( *reserved_src ); + } + } while ( msg == false ); + + return msg; + } + + bool + try_release( ) { + reserved_src->try_release( ); + reserved_src = NULL; + return true; + } + + bool + try_consume( ) { + reserved_src->try_consume( ); + reserved_src = NULL; + return true; + } + + void reset() { + reserved_src = NULL; + predecessor_cache::reset(); + } + + private: + predecessor_type *reserved_src; + }; + + + //! An abstract cache of successors + template + class successor_cache : tbb::internal::no_copy { + protected: + + typedef M my_mutex_type; + my_mutex_type my_mutex; + + typedef std::list< receiver * > my_successors_type; + my_successors_type my_successors; + + sender *my_owner; + + public: + + successor_cache( ) : my_owner(NULL) {} + + void set_owner( sender *owner ) { my_owner = owner; } + + virtual ~successor_cache() {} + + void register_successor( receiver &r ) { + typename my_mutex_type::scoped_lock l(my_mutex, true); + my_successors.push_back( &r ); + } + + void remove_successor( receiver &r ) { + typename my_mutex_type::scoped_lock l(my_mutex, true); + for ( typename my_successors_type::iterator i = my_successors.begin(); + i != my_successors.end(); ++i ) { + if ( *i == & r ) { + my_successors.erase(i); + break; + } + } + } + + bool empty() { + typename my_mutex_type::scoped_lock l(my_mutex, false); + return my_successors.empty(); + } + + virtual task * try_put_task( const T &t ) = 0; + }; + + //! An abstract cache of succesors, specialized to continue_msg + template<> + class successor_cache< continue_msg > : tbb::internal::no_copy { + protected: + + typedef spin_rw_mutex my_mutex_type; + my_mutex_type my_mutex; + + typedef std::list< receiver * > my_successors_type; + my_successors_type my_successors; + + sender *my_owner; + + public: + + successor_cache( ) : my_owner(NULL) {} + + void set_owner( sender *owner ) { my_owner = owner; } + + virtual ~successor_cache() {} + + void register_successor( receiver &r ) { + my_mutex_type::scoped_lock l(my_mutex, true); + my_successors.push_back( &r ); + if ( my_owner && r.is_continue_receiver() ) { + r.register_predecessor( *my_owner ); + } + } + + void remove_successor( receiver &r ) { + my_mutex_type::scoped_lock l(my_mutex, true); + for ( my_successors_type::iterator i = my_successors.begin(); + i != my_successors.end(); ++i ) { + if ( *i == & r ) { + if ( my_owner ) + r.remove_predecessor( *my_owner ); + my_successors.erase(i); + break; + } + } + } + + bool empty() { + my_mutex_type::scoped_lock l(my_mutex, false); + return my_successors.empty(); + } + + virtual task * try_put_task( const continue_msg &t ) = 0; + + }; + + //! A cache of successors that are broadcast to + template + class broadcast_cache : public successor_cache { + typedef M my_mutex_type; + typedef std::list< receiver * > my_successors_type; + + public: + + broadcast_cache( ) {} + + // as above, but call try_put_task instead, and return the last task we received (if any) + /*override*/ task * try_put_task( const T &t ) { + task * last_task = NULL; + bool upgraded = false; + typename my_mutex_type::scoped_lock l(this->my_mutex, false); + typename my_successors_type::iterator i = this->my_successors.begin(); + while ( i != this->my_successors.end() ) { + task *new_task = (*i)->try_put_task(t); + last_task = combine_tasks(last_task, new_task); // enqueue if necessary + if(new_task) { + ++i; + } + else { // failed + if ( (*i)->register_predecessor(*this->my_owner) ) { + if (!upgraded) { + l.upgrade_to_writer(); + upgraded = true; + } + i = this->my_successors.erase(i); + } else { + ++i; + } + } + } + return last_task; + } + }; + + //! A cache of successors that are put in a round-robin fashion + template + class round_robin_cache : public successor_cache { + typedef size_t size_type; + typedef M my_mutex_type; + typedef std::list< receiver * > my_successors_type; + + public: + + round_robin_cache( ) {} + + size_type size() { + typename my_mutex_type::scoped_lock l(this->my_mutex, false); + return this->my_successors.size(); + } + + /*override*/task *try_put_task( const T &t ) { + bool upgraded = false; + typename my_mutex_type::scoped_lock l(this->my_mutex, false); + typename my_successors_type::iterator i = this->my_successors.begin(); + while ( i != this->my_successors.end() ) { + task *new_task = (*i)->try_put_task(t); + if ( new_task ) { + return new_task; + } else { + if ( (*i)->register_predecessor(*this->my_owner) ) { + if (!upgraded) { + l.upgrade_to_writer(); + upgraded = true; + } + i = this->my_successors.erase(i); + } + else { + ++i; + } + } + } + return NULL; + } + }; + + template + class decrementer : public continue_receiver, tbb::internal::no_copy { + + T *my_node; + + task *execute() { + return my_node->decrement_counter(); + } + + public: + + typedef continue_msg input_type; + typedef continue_msg output_type; + decrementer( int number_of_predecessors = 0 ) : continue_receiver( number_of_predecessors ) { } + void set_owner( T *node ) { my_node = node; } + }; + +} + +#endif // __TBB__flow_graph_impl_H + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_item_buffer_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_item_buffer_impl.h new file mode 100644 index 0000000000..216dfc92f0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_item_buffer_impl.h @@ -0,0 +1,199 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_item_buffer_impl_H +#define __TBB__flow_graph_item_buffer_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + + //! Expandable buffer of items. The possible operations are push, pop, + //* tests for empty and so forth. No mutual exclusion is built in. + template > + class item_buffer { + public: + typedef T input_type; + typedef T output_type; + protected: + typedef size_t size_type; + typedef std::pair< T, bool > item_type; + typedef typename A::template rebind::other allocator_type; + + item_type *my_array; + size_type my_array_size; + static const size_type initial_buffer_size = 4; + size_type my_head; + size_type my_tail; + + bool buffer_empty() { return my_head == my_tail; } + + item_type &item(size_type i) { return my_array[i & (my_array_size - 1) ]; } // may not be marked valid + + bool item_valid(size_type i) { return item(i).second; } + + void fetch_front(T &v) { __TBB_ASSERT(item_valid(my_head), "front not valid"); v = item(my_head).first; } + void fetch_back(T &v) { __TBB_ASSERT(item_valid(my_tail-1), "back not valid"); v = item(my_tail-1).first; } + + void invalidate(size_type i) { __TBB_ASSERT(item_valid(i), "Item not valid"); item(i).second = false; } + void validate(size_type i) { __TBB_ASSERT(!item_valid(i), "Item already valid"); item(i).second = true; } + + void invalidate_front() { invalidate(my_head); } + void validate_front() { validate(my_head); } + void invalidate_back() { invalidate(my_tail-1); } + + size_type size() { return my_tail - my_head; } + size_type capacity() { return my_array_size; } + bool buffer_full() { return size() == capacity(); } + + //! Grows the internal array. + void grow_my_array( size_t minimum_size ) { + size_type old_size = my_array_size; + size_type new_size = old_size ? 2*old_size : initial_buffer_size; + while( new_size > + class reservable_item_buffer : public item_buffer { + protected: + using item_buffer::buffer_empty; + using item_buffer::fetch_front; + using item_buffer::invalidate_front; + using item_buffer::validate_front; + using item_buffer::item_valid; + using item_buffer::my_head; + + public: + reservable_item_buffer() : item_buffer(), my_reserved(false) {} + void reset() {my_reserved = false; item_buffer::reset(); } + protected: + + bool reserve_front(T &v) { + if(my_reserved || !item_valid(my_head)) return false; + my_reserved = true; + // reserving the head + fetch_front(v); + // invalidate the head, but don't commit until consume is called + invalidate_front(); + return true; + } + + void consume_front() { + __TBB_ASSERT(my_reserved, "Attempt to consume a non-reserved item"); + ++my_head; + my_reserved = false; + } + + void release_front() { + __TBB_ASSERT(my_reserved, "Attempt to release a non-reserved item"); + validate_front(); + my_reserved = false; + } + + bool my_reserved; + }; + +#endif // __TBB__flow_graph_item_buffer_impl_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_join_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_join_impl.h new file mode 100644 index 0000000000..751620b643 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_join_impl.h @@ -0,0 +1,1525 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_join_impl_H +#define __TBB__flow_graph_join_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#include "tbb/internal/_flow_graph_types_impl.h" + +namespace internal { + + typedef size_t tag_value; + static const tag_value NO_TAG = tag_value(-1); + + struct forwarding_base { + forwarding_base(task *rt) : my_root_task(rt), current_tag(NO_TAG) {} + virtual ~forwarding_base() {} + // decrement_port_count may create a forwarding task. If we cannot handle the task + // ourselves, ask decrement_port_count to deal with it. + virtual task * decrement_port_count(bool handle_task) = 0; + virtual void increment_port_count() = 0; + virtual task * increment_tag_count(tag_value /*t*/, bool /*handle_task*/) {return NULL;} + // moved here so input ports can queue tasks + task* my_root_task; + tag_value current_tag; // so ports can refer to FE's desired items + }; + + template< int N > + struct join_helper { + + template< typename TupleType, typename PortType > + static inline void set_join_node_pointer(TupleType &my_input, PortType *port) { + tbb::flow::get( my_input ).set_join_node_pointer(port); + join_helper::set_join_node_pointer( my_input, port ); + } + template< typename TupleType > + static inline void consume_reservations( TupleType &my_input ) { + tbb::flow::get( my_input ).consume(); + join_helper::consume_reservations( my_input ); + } + + template< typename TupleType > + static inline void release_my_reservation( TupleType &my_input ) { + tbb::flow::get( my_input ).release(); + } + + template + static inline void release_reservations( TupleType &my_input) { + join_helper::release_reservations(my_input); + release_my_reservation(my_input); + } + + template< typename InputTuple, typename OutputTuple > + static inline bool reserve( InputTuple &my_input, OutputTuple &out) { + if ( !tbb::flow::get( my_input ).reserve( tbb::flow::get( out ) ) ) return false; + if ( !join_helper::reserve( my_input, out ) ) { + release_my_reservation( my_input ); + return false; + } + return true; + } + + template + static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) { + bool res = tbb::flow::get(my_input).get_item(tbb::flow::get(out) ); // may fail + return join_helper::get_my_item(my_input, out) && res; // do get on other inputs before returning + } + + template + static inline bool get_items(InputTuple &my_input, OutputTuple &out) { + return get_my_item(my_input, out); + } + + template + static inline void reset_my_port(InputTuple &my_input) { + join_helper::reset_my_port(my_input); + tbb::flow::get(my_input).reset_port(); + } + + template + static inline void reset_ports(InputTuple& my_input) { + reset_my_port(my_input); + } + + template + static inline void set_tag_func(InputTuple &my_input, TagFuncTuple &my_tag_funcs) { + tbb::flow::get(my_input).set_my_original_tag_func(tbb::flow::get(my_tag_funcs)); + tbb::flow::get(my_input).set_my_tag_func(tbb::flow::get(my_input).my_original_func()->clone()); + tbb::flow::get(my_tag_funcs) = NULL; + join_helper::set_tag_func(my_input, my_tag_funcs); + } + + template< typename TagFuncTuple1, typename TagFuncTuple2> + static inline void copy_tag_functors(TagFuncTuple1 &my_inputs, TagFuncTuple2 &other_inputs) { + if(tbb::flow::get(other_inputs).my_original_func()) { + tbb::flow::get(my_inputs).set_my_tag_func(tbb::flow::get(other_inputs).my_original_func()->clone()); + tbb::flow::get(my_inputs).set_my_original_tag_func(tbb::flow::get(other_inputs).my_original_func()->clone()); + } + join_helper::copy_tag_functors(my_inputs, other_inputs); + } + + template + static inline void reset_inputs(InputTuple &my_input) { + join_helper::reset_inputs(my_input); + tbb::flow::get(my_input).reinitialize_port(); + } + }; + + template< > + struct join_helper<1> { + + template< typename TupleType, typename PortType > + static inline void set_join_node_pointer(TupleType &my_input, PortType *port) { + tbb::flow::get<0>( my_input ).set_join_node_pointer(port); + } + + template< typename TupleType > + static inline void consume_reservations( TupleType &my_input ) { + tbb::flow::get<0>( my_input ).consume(); + } + + template< typename TupleType > + static inline void release_my_reservation( TupleType &my_input ) { + tbb::flow::get<0>( my_input ).release(); + } + + template + static inline void release_reservations( TupleType &my_input) { + release_my_reservation(my_input); + } + + template< typename InputTuple, typename OutputTuple > + static inline bool reserve( InputTuple &my_input, OutputTuple &out) { + return tbb::flow::get<0>( my_input ).reserve( tbb::flow::get<0>( out ) ); + } + + template + static inline bool get_my_item( InputTuple &my_input, OutputTuple &out) { + return tbb::flow::get<0>(my_input).get_item(tbb::flow::get<0>(out)); + } + + template + static inline bool get_items(InputTuple &my_input, OutputTuple &out) { + return get_my_item(my_input, out); + } + + template + static inline void reset_my_port(InputTuple &my_input) { + tbb::flow::get<0>(my_input).reset_port(); + } + + template + static inline void reset_ports(InputTuple& my_input) { + reset_my_port(my_input); + } + + template + static inline void set_tag_func(InputTuple &my_input, TagFuncTuple &my_tag_funcs) { + tbb::flow::get<0>(my_input).set_my_original_tag_func(tbb::flow::get<0>(my_tag_funcs)); + tbb::flow::get<0>(my_input).set_my_tag_func(tbb::flow::get<0>(my_input).my_original_func()->clone()); + tbb::flow::get<0>(my_tag_funcs) = NULL; + } + + template< typename TagFuncTuple1, typename TagFuncTuple2> + static inline void copy_tag_functors(TagFuncTuple1 &my_inputs, TagFuncTuple2 &other_inputs) { + if(tbb::flow::get<0>(other_inputs).my_original_func()) { + tbb::flow::get<0>(my_inputs).set_my_tag_func(tbb::flow::get<0>(other_inputs).my_original_func()->clone()); + tbb::flow::get<0>(my_inputs).set_my_original_tag_func(tbb::flow::get<0>(other_inputs).my_original_func()->clone()); + } + } + template + static inline void reset_inputs(InputTuple &my_input) { + tbb::flow::get<0>(my_input).reinitialize_port(); + } + }; + + //! The two-phase join port + template< typename T > + class reserving_port : public receiver { + public: + typedef T input_type; + typedef sender predecessor_type; + private: + // ----------- Aggregator ------------ + enum op_type { reg_pred, rem_pred, res_item, rel_res, con_res }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef reserving_port my_class; + + class reserving_port_operation : public aggregated_operation { + public: + char type; + union { + T *my_arg; + predecessor_type *my_pred; + }; + reserving_port_operation(const T& e, op_type t) : + type(char(t)), my_arg(const_cast(&e)) {} + reserving_port_operation(const predecessor_type &s, op_type t) : type(char(t)), + my_pred(const_cast(&s)) {} + reserving_port_operation(op_type t) : type(char(t)) {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator my_aggregator; + + void handle_operations(reserving_port_operation* op_list) { + reserving_port_operation *current; + bool no_predecessors; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + case reg_pred: + no_predecessors = my_predecessors.empty(); + my_predecessors.add(*(current->my_pred)); + if ( no_predecessors ) { + (void) my_join->decrement_port_count(true); // may try to forward + } + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case rem_pred: + my_predecessors.remove(*(current->my_pred)); + if(my_predecessors.empty()) my_join->increment_port_count(); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case res_item: + if ( reserved ) { + __TBB_store_with_release(current->status, FAILED); + } + else if ( my_predecessors.try_reserve( *(current->my_arg) ) ) { + reserved = true; + __TBB_store_with_release(current->status, SUCCEEDED); + } else { + if ( my_predecessors.empty() ) { + my_join->increment_port_count(); + } + __TBB_store_with_release(current->status, FAILED); + } + break; + case rel_res: + reserved = false; + my_predecessors.try_release( ); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case con_res: + reserved = false; + my_predecessors.try_consume( ); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + } + } + } + + protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + task *try_put_task( const T & ) { + return NULL; + } + + public: + + //! Constructor + reserving_port() : reserved(false) { + my_join = NULL; + my_predecessors.set_owner( this ); + my_aggregator.initialize_handler(my_handler(this)); + } + + // copy constructor + reserving_port(const reserving_port& /* other */) : receiver() { + reserved = false; + my_join = NULL; + my_predecessors.set_owner( this ); + my_aggregator.initialize_handler(my_handler(this)); + } + + void set_join_node_pointer(forwarding_base *join) { + my_join = join; + } + + //! Add a predecessor + bool register_predecessor( sender &src ) { + reserving_port_operation op_data(src, reg_pred); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + //! Remove a predecessor + bool remove_predecessor( sender &src ) { + reserving_port_operation op_data(src, rem_pred); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + //! Reserve an item from the port + bool reserve( T &v ) { + reserving_port_operation op_data(v, res_item); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + //! Release the port + void release( ) { + reserving_port_operation op_data(rel_res); + my_aggregator.execute(&op_data); + } + + //! Complete use of the port + void consume( ) { + reserving_port_operation op_data(con_res); + my_aggregator.execute(&op_data); + } + + void reinitialize_port() { + my_predecessors.reset(); + reserved = false; + } + + protected: + + /*override*/void reset_receiver() { + my_predecessors.reset(); + } + + private: + forwarding_base *my_join; + reservable_predecessor_cache< T, null_mutex > my_predecessors; + bool reserved; + }; + + //! queueing join_port + template + class queueing_port : public receiver, public item_buffer { + public: + typedef T input_type; + typedef sender predecessor_type; + typedef queueing_port my_node_type; + + // ----------- Aggregator ------------ + private: + enum op_type { get__item, res_port, try__put_task }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef queueing_port my_class; + + class queueing_port_operation : public aggregated_operation { + public: + char type; + T my_val; + T *my_arg; + task * bypass_t; + // constructor for value parameter + queueing_port_operation(const T& e, op_type t) : + type(char(t)), my_val(e) + , bypass_t(NULL) + {} + // constructor for pointer parameter + queueing_port_operation(const T* p, op_type t) : + type(char(t)), my_arg(const_cast(p)) + , bypass_t(NULL) + {} + // constructor with no parameter + queueing_port_operation(op_type t) : type(char(t)) + , bypass_t(NULL) + {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator my_aggregator; + + void handle_operations(queueing_port_operation* op_list) { + queueing_port_operation *current; + bool was_empty; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + case try__put_task: { + task *rtask = NULL; + was_empty = this->buffer_empty(); + this->push_back(current->my_val); + if (was_empty) rtask = my_join->decrement_port_count(false); + else + rtask = SUCCESSFULLY_ENQUEUED; + current->bypass_t = rtask; + __TBB_store_with_release(current->status, SUCCEEDED); + } + break; + case get__item: + if(!this->buffer_empty()) { + this->fetch_front(*(current->my_arg)); + __TBB_store_with_release(current->status, SUCCEEDED); + } + else { + __TBB_store_with_release(current->status, FAILED); + } + break; + case res_port: + __TBB_ASSERT(this->item_valid(this->my_head), "No item to reset"); + this->invalidate_front(); ++(this->my_head); + if(this->item_valid(this->my_head)) { + (void)my_join->decrement_port_count(true); + } + __TBB_store_with_release(current->status, SUCCEEDED); + break; + } + } + } + // ------------ End Aggregator --------------- + + protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + /*override*/task *try_put_task(const T &v) { + queueing_port_operation op_data(v, try__put_task); + my_aggregator.execute(&op_data); + __TBB_ASSERT(op_data.status == SUCCEEDED || !op_data.bypass_t, "inconsistent return from aggregator"); + if(!op_data.bypass_t) return SUCCESSFULLY_ENQUEUED; + return op_data.bypass_t; + } + + public: + + //! Constructor + queueing_port() : item_buffer() { + my_join = NULL; + my_aggregator.initialize_handler(my_handler(this)); + } + + //! copy constructor + queueing_port(const queueing_port& /* other */) : receiver(), item_buffer() { + my_join = NULL; + my_aggregator.initialize_handler(my_handler(this)); + } + + //! record parent for tallying available items + void set_join_node_pointer(forwarding_base *join) { + my_join = join; + } + + bool get_item( T &v ) { + queueing_port_operation op_data(&v, get__item); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + // reset_port is called when item is accepted by successor, but + // is initiated by join_node. + void reset_port() { + queueing_port_operation op_data(res_port); + my_aggregator.execute(&op_data); + return; + } + + void reinitialize_port() { + item_buffer::reset(); + } + + protected: + + /*override*/void reset_receiver() { + // nothing to do. We queue, so no predecessor cache + } + + private: + forwarding_base *my_join; + }; + +#include "_flow_graph_tagged_buffer_impl.h" + + template< typename T > + class tag_matching_port : public receiver, public tagged_buffer< tag_value, T, NO_TAG > { + public: + typedef T input_type; + typedef sender predecessor_type; + typedef tag_matching_port my_node_type; // for forwarding, if needed + typedef function_body my_tag_func_type; + typedef tagged_buffer my_buffer_type; + private: +// ----------- Aggregator ------------ + private: + enum op_type { try__put, get__item, res_port }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef tag_matching_port my_class; + + class tag_matching_port_operation : public aggregated_operation { + public: + char type; + T my_val; + T *my_arg; + tag_value my_tag_value; + // constructor for value parameter + tag_matching_port_operation(const T& e, op_type t) : + type(char(t)), my_val(e) {} + // constructor for pointer parameter + tag_matching_port_operation(const T* p, op_type t) : + type(char(t)), my_arg(const_cast(p)) {} + // constructor with no parameter + tag_matching_port_operation(op_type t) : type(char(t)) {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator my_aggregator; + + void handle_operations(tag_matching_port_operation* op_list) { + tag_matching_port_operation *current; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + case try__put: { + bool was_inserted = this->tagged_insert(current->my_tag_value, current->my_val); + // return failure if a duplicate insertion occurs + __TBB_store_with_release(current->status, was_inserted ? SUCCEEDED : FAILED); + } + break; + case get__item: + // use current_tag from FE for item + if(!this->tagged_find(my_join->current_tag, *(current->my_arg))) { + __TBB_ASSERT(false, "Failed to find item corresponding to current_tag."); + } + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case res_port: + // use current_tag from FE for item + this->tagged_delete(my_join->current_tag); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + } + } + } +// ------------ End Aggregator --------------- + protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + /*override*/task *try_put_task(const T& v) { + tag_matching_port_operation op_data(v, try__put); + op_data.my_tag_value = (*my_tag_func)(v); + task *rtask = NULL; + my_aggregator.execute(&op_data); + if(op_data.status == SUCCEEDED) { + rtask = my_join->increment_tag_count(op_data.my_tag_value, false); // may spawn + // rtask has to reflect the return status of the try_put + if(!rtask) rtask = SUCCESSFULLY_ENQUEUED; + } + return rtask; + } + + public: + + tag_matching_port() : receiver(), tagged_buffer() { + my_join = NULL; + my_tag_func = NULL; + my_original_tag_func = NULL; + my_aggregator.initialize_handler(my_handler(this)); + } + + // copy constructor + tag_matching_port(const tag_matching_port& /*other*/) : receiver(), tagged_buffer() { + my_join = NULL; + // setting the tag methods is done in the copy-constructor for the front-end. + my_tag_func = NULL; + my_original_tag_func = NULL; + my_aggregator.initialize_handler(my_handler(this)); + } + + ~tag_matching_port() { + if (my_tag_func) delete my_tag_func; + if (my_original_tag_func) delete my_original_tag_func; + } + + void set_join_node_pointer(forwarding_base *join) { + my_join = join; + } + + void set_my_original_tag_func(my_tag_func_type *f) { + my_original_tag_func = f; + } + + void set_my_tag_func(my_tag_func_type *f) { + my_tag_func = f; + } + + bool get_item( T &v ) { + tag_matching_port_operation op_data(&v, get__item); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + // reset_port is called when item is accepted by successor, but + // is initiated by join_node. + void reset_port() { + tag_matching_port_operation op_data(res_port); + my_aggregator.execute(&op_data); + return; + } + + my_tag_func_type *my_func() { return my_tag_func; } + my_tag_func_type *my_original_func() { return my_original_tag_func; } + + void reinitialize_port() { + my_buffer_type::reset(); + } + + protected: + + /*override*/void reset_receiver() { + // nothing to do. We queue, so no predecessor cache + } + + private: + // need map of tags to values + forwarding_base *my_join; + my_tag_func_type *my_tag_func; + my_tag_func_type *my_original_tag_func; + }; // tag_matching_port + + using namespace graph_policy_namespace; + + template + class join_node_base; + + //! join_node_FE : implements input port policy + template + class join_node_FE; + + template + class join_node_FE : public forwarding_base { + public: + static const int N = tbb::flow::tuple_size::value; + typedef OutputTuple output_type; + typedef InputTuple input_type; + typedef join_node_base my_node_type; // for forwarding + + join_node_FE(graph &g) : forwarding_base(g.root_task()), my_node(NULL) { + ports_with_no_inputs = N; + join_helper::set_join_node_pointer(my_inputs, this); + } + + join_node_FE(const join_node_FE& other) : forwarding_base(other.my_root_task), my_node(NULL) { + ports_with_no_inputs = N; + join_helper::set_join_node_pointer(my_inputs, this); + } + + void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } + + void increment_port_count() { + ++ports_with_no_inputs; + } + + // if all input_ports have predecessors, spawn forward to try and consume tuples + task * decrement_port_count(bool handle_task) { + if(ports_with_no_inputs.fetch_and_decrement() == 1) { + task *rtask = new ( task::allocate_additional_child_of( *(this->my_root_task) ) ) + forward_task_bypass + (*my_node); + if(!handle_task) return rtask; + task::enqueue(*rtask); + } + return NULL; + } + + input_type &input_ports() { return my_inputs; } + + protected: + + void reset() { + // called outside of parallel contexts + ports_with_no_inputs = N; + join_helper::reset_inputs(my_inputs); + } + + // all methods on input ports should be called under mutual exclusion from join_node_base. + + bool tuple_build_may_succeed() { + return !ports_with_no_inputs; + } + + bool try_to_make_tuple(output_type &out) { + if(ports_with_no_inputs) return false; + return join_helper::reserve(my_inputs, out); + } + + void tuple_accepted() { + join_helper::consume_reservations(my_inputs); + } + void tuple_rejected() { + join_helper::release_reservations(my_inputs); + } + + input_type my_inputs; + my_node_type *my_node; + atomic ports_with_no_inputs; + }; + + template + class join_node_FE : public forwarding_base { + public: + static const int N = tbb::flow::tuple_size::value; + typedef OutputTuple output_type; + typedef InputTuple input_type; + typedef join_node_base my_node_type; // for forwarding + + join_node_FE(graph &g) : forwarding_base(g.root_task()), my_node(NULL) { + ports_with_no_items = N; + join_helper::set_join_node_pointer(my_inputs, this); + } + + join_node_FE(const join_node_FE& other) : forwarding_base(other.my_root_task), my_node(NULL) { + ports_with_no_items = N; + join_helper::set_join_node_pointer(my_inputs, this); + } + + // needed for forwarding + void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } + + void reset_port_count() { + ports_with_no_items = N; + } + + // if all input_ports have items, spawn forward to try and consume tuples + task * decrement_port_count(bool handle_task) + { + if(ports_with_no_items.fetch_and_decrement() == 1) { + task *rtask = new ( task::allocate_additional_child_of( *(this->my_root_task) ) ) + forward_task_bypass + (*my_node); + if(!handle_task) return rtask; + task::enqueue( *rtask); + } + return NULL; + } + + void increment_port_count() { __TBB_ASSERT(false, NULL); } // should never be called + + input_type &input_ports() { return my_inputs; } + + protected: + + void reset() { + reset_port_count(); + join_helper::reset_inputs(my_inputs); + } + + // all methods on input ports should be called under mutual exclusion from join_node_base. + + bool tuple_build_may_succeed() { + return !ports_with_no_items; + } + + bool try_to_make_tuple(output_type &out) { + if(ports_with_no_items) return false; + return join_helper::get_items(my_inputs, out); + } + + void tuple_accepted() { + reset_port_count(); + join_helper::reset_ports(my_inputs); + } + void tuple_rejected() { + // nothing to do. + } + + input_type my_inputs; + my_node_type *my_node; + atomic ports_with_no_items; + }; + + // tag_matching join input port. + template + class join_node_FE : public forwarding_base, + // buffer of tag value counts buffer of output items + public tagged_buffer, public item_buffer { + public: + static const int N = tbb::flow::tuple_size::value; + typedef OutputTuple output_type; + typedef InputTuple input_type; + typedef tagged_buffer my_tag_buffer; + typedef item_buffer output_buffer_type; + typedef join_node_base my_node_type; // for forwarding + +// ----------- Aggregator ------------ + // the aggregator is only needed to serialize the access to the hash table. + // and the output_buffer_type base class + private: + enum op_type { res_count, inc_count, may_succeed, try_make }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef join_node_FE my_class; + + class tag_matching_FE_operation : public aggregated_operation { + public: + char type; + union { + tag_value my_val; + output_type* my_output; + }; + task *bypass_t; + bool enqueue_task; + // constructor for value parameter + tag_matching_FE_operation(const tag_value& e , bool q_task , op_type t) : type(char(t)), my_val(e), + bypass_t(NULL), enqueue_task(q_task) {} + tag_matching_FE_operation(output_type *p, op_type t) : type(char(t)), my_output(p), bypass_t(NULL), + enqueue_task(true) {} + // constructor with no parameter + tag_matching_FE_operation(op_type t) : type(char(t)), bypass_t(NULL), enqueue_task(true) {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator my_aggregator; + + // called from aggregator, so serialized + // construct as many output objects as possible. + // returns a task pointer if the a task would have been enqueued but we asked that + // it be returned. Otherwise returns NULL. + task * fill_output_buffer(bool should_enqueue, bool handle_task) { + output_type l_out; + task *rtask = NULL; + bool do_fwd = should_enqueue && this->buffer_empty(); + while(find_value_tag(this->current_tag,N)) { // while there are completed items + this->tagged_delete(this->current_tag); // remove the tag + if(join_helper::get_items(my_inputs, l_out)) { // <== call back + this->push_back(l_out); + if(do_fwd) { // we enqueue if receiving an item from predecessor, not if successor asks for item + rtask = new ( task::allocate_additional_child_of( *(this->my_root_task) ) ) + forward_task_bypass(*my_node); + if(handle_task) { + task::enqueue(*rtask); + rtask = NULL; + } + do_fwd = false; + } + // retire the input values + join_helper::reset_ports(my_inputs); // <== call back + this->current_tag = NO_TAG; + } + else { + __TBB_ASSERT(false, "should have had something to push"); + } + } + return rtask; + } + + void handle_operations(tag_matching_FE_operation* op_list) { + tag_matching_FE_operation *current; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + case res_count: // called from BE + { + output_type l_out; + this->pop_front(l_out); // don't care about returned value. + // buffer as many tuples as we can make + (void)fill_output_buffer(true, true); + __TBB_store_with_release(current->status, SUCCEEDED); + } + break; + case inc_count: { // called from input ports + size_t *p = 0; + tag_value t = current->my_val; + bool do_enqueue = current->enqueue_task; + if(!(this->tagged_find_ref(t,p))) { + this->tagged_insert(t, 0); + if(!(this->tagged_find_ref(t,p))) { + __TBB_ASSERT(false, "should find tag after inserting it"); + } + } + if(++(*p) == size_t(N)) { + task *rtask = fill_output_buffer(true, do_enqueue); + __TBB_ASSERT(!rtask || !do_enqueue, "task should not be returned"); + current->bypass_t = rtask; + } + } + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case may_succeed: // called from BE + (void)fill_output_buffer(false, /*handle_task*/true); // handle_task not used + __TBB_store_with_release(current->status, this->buffer_empty() ? FAILED : SUCCEEDED); + break; + case try_make: // called from BE + if(this->buffer_empty()) { + __TBB_store_with_release(current->status, FAILED); + } + else { + this->fetch_front(*(current->my_output)); + __TBB_store_with_release(current->status, SUCCEEDED); + } + break; + } + } + } +// ------------ End Aggregator --------------- + + public: + template + join_node_FE(graph &g, FunctionTuple tag_funcs) : forwarding_base(g.root_task()), my_node(NULL) { + join_helper::set_join_node_pointer(my_inputs, this); + join_helper::set_tag_func(my_inputs, tag_funcs); + my_aggregator.initialize_handler(my_handler(this)); + } + + join_node_FE(const join_node_FE& other) : forwarding_base(other.my_root_task), my_tag_buffer(), + output_buffer_type() { + my_node = NULL; + join_helper::set_join_node_pointer(my_inputs, this); + join_helper::copy_tag_functors(my_inputs, const_cast(other.my_inputs)); + my_aggregator.initialize_handler(my_handler(this)); + } + + // needed for forwarding + void set_my_node(my_node_type *new_my_node) { my_node = new_my_node; } + + void reset_port_count() { // called from BE + tag_matching_FE_operation op_data(res_count); + my_aggregator.execute(&op_data); + return; + } + + // if all input_ports have items, spawn forward to try and consume tuples + // return a task if we are asked and did create one. + task *increment_tag_count(tag_value t, bool handle_task) { // called from input_ports + tag_matching_FE_operation op_data(t, handle_task, inc_count); + my_aggregator.execute(&op_data); + return op_data.bypass_t; + } + + /*override*/ task *decrement_port_count(bool /*handle_task*/) { __TBB_ASSERT(false, NULL); return NULL; } + + void increment_port_count() { __TBB_ASSERT(false, NULL); } // should never be called + + input_type &input_ports() { return my_inputs; } + + protected: + + void reset() { + // called outside of parallel contexts + join_helper::reset_inputs(my_inputs); + + my_tag_buffer::reset(); // have to reset the tag counts + output_buffer_type::reset(); // also the queue of outputs + my_node->current_tag = NO_TAG; + } + + // all methods on input ports should be called under mutual exclusion from join_node_base. + + bool tuple_build_may_succeed() { // called from back-end + tag_matching_FE_operation op_data(may_succeed); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + // cannot lock while calling back to input_ports. current_tag will only be set + // and reset under the aggregator, so it will remain consistent. + bool try_to_make_tuple(output_type &out) { + tag_matching_FE_operation op_data(&out,try_make); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + void tuple_accepted() { + reset_port_count(); // reset current_tag after ports reset. + } + + void tuple_rejected() { + // nothing to do. + } + + input_type my_inputs; // input ports + my_node_type *my_node; + }; // join_node_FE + + //! join_node_base + template + class join_node_base : public graph_node, public join_node_FE, + public sender { + protected: + using graph_node::my_graph; + public: + typedef OutputTuple output_type; + + typedef receiver successor_type; + typedef join_node_FE input_ports_type; + using input_ports_type::tuple_build_may_succeed; + using input_ports_type::try_to_make_tuple; + using input_ports_type::tuple_accepted; + using input_ports_type::tuple_rejected; + + private: + // ----------- Aggregator ------------ + enum op_type { reg_succ, rem_succ, try__get, do_fwrd, do_fwrd_bypass }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef join_node_base my_class; + + class join_node_base_operation : public aggregated_operation { + public: + char type; + union { + output_type *my_arg; + successor_type *my_succ; + }; + task *bypass_t; + join_node_base_operation(const output_type& e, op_type t) : type(char(t)), + my_arg(const_cast(&e)), bypass_t(NULL) {} + join_node_base_operation(const successor_type &s, op_type t) : type(char(t)), + my_succ(const_cast(&s)), bypass_t(NULL) {} + join_node_base_operation(op_type t) : type(char(t)), bypass_t(NULL) {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + bool forwarder_busy; + aggregator my_aggregator; + + void handle_operations(join_node_base_operation* op_list) { + join_node_base_operation *current; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + case reg_succ: + my_successors.register_successor(*(current->my_succ)); + if(tuple_build_may_succeed() && !forwarder_busy) { + task *rtask = new ( task::allocate_additional_child_of(*(this->my_root_task)) ) + forward_task_bypass + >(*this); + task::enqueue(*rtask); + forwarder_busy = true; + } + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case rem_succ: + my_successors.remove_successor(*(current->my_succ)); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case try__get: + if(tuple_build_may_succeed()) { + if(try_to_make_tuple(*(current->my_arg))) { + tuple_accepted(); + __TBB_store_with_release(current->status, SUCCEEDED); + } + else __TBB_store_with_release(current->status, FAILED); + } + else __TBB_store_with_release(current->status, FAILED); + break; + case do_fwrd_bypass: { + bool build_succeeded; + task *last_task = NULL; + output_type out; + if(tuple_build_may_succeed()) { + do { + build_succeeded = try_to_make_tuple(out); + if(build_succeeded) { + task *new_task = my_successors.try_put_task(out); + last_task = combine_tasks(last_task, new_task); + if(new_task) { + tuple_accepted(); + } + else { + tuple_rejected(); + build_succeeded = false; + } + } + } while(build_succeeded); + } + current->bypass_t = last_task; + __TBB_store_with_release(current->status, SUCCEEDED); + forwarder_busy = false; + } + break; + } + } + } + // ---------- end aggregator ----------- + public: + join_node_base(graph &g) : graph_node(g), input_ports_type(g), forwarder_busy(false) { + my_successors.set_owner(this); + input_ports_type::set_my_node(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + join_node_base(const join_node_base& other) : + graph_node(other.my_graph), input_ports_type(other), + sender(), forwarder_busy(false), my_successors() { + my_successors.set_owner(this); + input_ports_type::set_my_node(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + template + join_node_base(graph &g, FunctionTuple f) : graph_node(g), input_ports_type(g, f), forwarder_busy(false) { + my_successors.set_owner(this); + input_ports_type::set_my_node(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + bool register_successor(successor_type &r) { + join_node_base_operation op_data(r, reg_succ); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + bool remove_successor( successor_type &r) { + join_node_base_operation op_data(r, rem_succ); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + bool try_get( output_type &v) { + join_node_base_operation op_data(v, try__get); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + protected: + + /*override*/void reset() { + input_ports_type::reset(); + } + + private: + broadcast_cache my_successors; + + friend class forward_task_bypass< join_node_base >; + task *forward_task() { + join_node_base_operation op_data(do_fwrd_bypass); + my_aggregator.execute(&op_data); + return op_data.bypass_t; + } + + }; + + // join base class type generator + template class PT, typename OutputTuple, graph_buffer_policy JP> + struct join_base { + typedef typename internal::join_node_base::type, OutputTuple> type; + }; + + //! unfolded_join_node : passes input_ports_type to join_node_base. We build the input port type + // using tuple_element. The class PT is the port type (reserving_port, queueing_port, tag_matching_port) + // and should match the graph_buffer_policy. + + template class PT, typename OutputTuple, graph_buffer_policy JP> + class unfolded_join_node : public join_base::type { + public: + typedef typename wrap_tuple_elements::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + public: + unfolded_join_node(graph &g) : base_type(g) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; + + // tag_matching unfolded_join_node. This must be a separate specialization because the constructors + // differ. + + template + class unfolded_join_node<2,tag_matching_port,OutputTuple,tag_matching> : public + join_base<2,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + public: + typedef typename wrap_tuple_elements<2,tag_matching_port,OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename tbb::flow::tuple< f0_p, f1_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; + + template + class unfolded_join_node<3,tag_matching_port,OutputTuple,tag_matching> : public + join_base<3,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + public: + typedef typename wrap_tuple_elements<3, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; + + template + class unfolded_join_node<4,tag_matching_port,OutputTuple,tag_matching> : public + join_base<4,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + public: + typedef typename wrap_tuple_elements<4, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; + + template + class unfolded_join_node<5,tag_matching_port,OutputTuple,tag_matching> : public + join_base<5,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + public: + typedef typename wrap_tuple_elements<5, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; + +#if __TBB_VARIADIC_MAX >= 6 + template + class unfolded_join_node<6,tag_matching_port,OutputTuple,tag_matching> : public + join_base<6,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; + public: + typedef typename wrap_tuple_elements<6, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename internal::function_body *f5_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4), + new internal::function_body_leaf(b5) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; +#endif + +#if __TBB_VARIADIC_MAX >= 7 + template + class unfolded_join_node<7,tag_matching_port,OutputTuple,tag_matching> : public + join_base<7,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; + typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; + public: + typedef typename wrap_tuple_elements<7, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename internal::function_body *f5_p; + typedef typename internal::function_body *f6_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4), + new internal::function_body_leaf(b5), + new internal::function_body_leaf(b6) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; +#endif + +#if __TBB_VARIADIC_MAX >= 8 + template + class unfolded_join_node<8,tag_matching_port,OutputTuple,tag_matching> : public + join_base<8,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; + typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; + typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; + public: + typedef typename wrap_tuple_elements<8, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename internal::function_body *f5_p; + typedef typename internal::function_body *f6_p; + typedef typename internal::function_body *f7_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4), + new internal::function_body_leaf(b5), + new internal::function_body_leaf(b6), + new internal::function_body_leaf(b7) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; +#endif + +#if __TBB_VARIADIC_MAX >= 9 + template + class unfolded_join_node<9,tag_matching_port,OutputTuple,tag_matching> : public + join_base<9,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; + typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; + typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; + typedef typename tbb::flow::tuple_element<8, OutputTuple>::type T8; + public: + typedef typename wrap_tuple_elements<9, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename internal::function_body *f5_p; + typedef typename internal::function_body *f6_p; + typedef typename internal::function_body *f7_p; + typedef typename internal::function_body *f8_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4), + new internal::function_body_leaf(b5), + new internal::function_body_leaf(b6), + new internal::function_body_leaf(b7), + new internal::function_body_leaf(b8) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; +#endif + +#if __TBB_VARIADIC_MAX >= 10 + template + class unfolded_join_node<10,tag_matching_port,OutputTuple,tag_matching> : public + join_base<10,tag_matching_port,OutputTuple,tag_matching>::type { + typedef typename tbb::flow::tuple_element<0, OutputTuple>::type T0; + typedef typename tbb::flow::tuple_element<1, OutputTuple>::type T1; + typedef typename tbb::flow::tuple_element<2, OutputTuple>::type T2; + typedef typename tbb::flow::tuple_element<3, OutputTuple>::type T3; + typedef typename tbb::flow::tuple_element<4, OutputTuple>::type T4; + typedef typename tbb::flow::tuple_element<5, OutputTuple>::type T5; + typedef typename tbb::flow::tuple_element<6, OutputTuple>::type T6; + typedef typename tbb::flow::tuple_element<7, OutputTuple>::type T7; + typedef typename tbb::flow::tuple_element<8, OutputTuple>::type T8; + typedef typename tbb::flow::tuple_element<9, OutputTuple>::type T9; + public: + typedef typename wrap_tuple_elements<10, tag_matching_port, OutputTuple>::type input_ports_type; + typedef OutputTuple output_type; + private: + typedef join_node_base base_type; + typedef typename internal::function_body *f0_p; + typedef typename internal::function_body *f1_p; + typedef typename internal::function_body *f2_p; + typedef typename internal::function_body *f3_p; + typedef typename internal::function_body *f4_p; + typedef typename internal::function_body *f5_p; + typedef typename internal::function_body *f6_p; + typedef typename internal::function_body *f7_p; + typedef typename internal::function_body *f8_p; + typedef typename internal::function_body *f9_p; + typedef typename tbb::flow::tuple< f0_p, f1_p, f2_p, f3_p, f4_p, f5_p, f6_p, f7_p, f8_p, f9_p > func_initializer_type; + public: + template + unfolded_join_node(graph &g, B0 b0, B1 b1, B2 b2, B3 b3, B4 b4, B5 b5, B6 b6, B7 b7, B8 b8, B9 b9) : base_type(g, + func_initializer_type( + new internal::function_body_leaf(b0), + new internal::function_body_leaf(b1), + new internal::function_body_leaf(b2), + new internal::function_body_leaf(b3), + new internal::function_body_leaf(b4), + new internal::function_body_leaf(b5), + new internal::function_body_leaf(b6), + new internal::function_body_leaf(b7), + new internal::function_body_leaf(b8), + new internal::function_body_leaf(b9) + ) ) {} + unfolded_join_node(const unfolded_join_node &other) : base_type(other) {} + }; +#endif + + //! templated function to refer to input ports of the join node + template + typename tbb::flow::tuple_element::type &input_port(JNT &jn) { + return tbb::flow::get(jn.input_ports()); + } + +} +#endif // __TBB__flow_graph_join_impl_H + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_node_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_node_impl.h new file mode 100644 index 0000000000..4a36fc9bd0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_node_impl.h @@ -0,0 +1,575 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_node_impl_H +#define __TBB__flow_graph_node_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#include "_flow_graph_item_buffer_impl.h" + +//! @cond INTERNAL +namespace internal { + + using tbb::internal::aggregated_operation; + using tbb::internal::aggregating_functor; + using tbb::internal::aggregator; + + template< typename T, typename A > + class function_input_queue : public item_buffer { + public: + bool pop( T& t ) { + return this->pop_front( t ); + } + + bool push( T& t ) { + return this->push_back( t ); + } + }; + + //! Input and scheduling for a function node that takes a type Input as input + // The only up-ref is apply_body_impl, which should implement the function + // call and any handling of the result. + template< typename Input, typename A, typename ImplType > + class function_input_base : public receiver, tbb::internal::no_assign { + typedef sender predecessor_type; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + enum op_type {reg_pred, rem_pred, app_body, try_fwd, tryput_bypass, app_body_bypass }; + typedef function_input_base my_class; + + public: + + //! The input type of this receiver + typedef Input input_type; + + //! Constructor for function_input_base + function_input_base( graph &g, size_t max_concurrency, function_input_queue *q = NULL ) + : my_root_task(g.root_task()), my_max_concurrency(max_concurrency), my_concurrency(0), + my_queue(q), forwarder_busy(false) { + my_predecessors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + //! Copy constructor + function_input_base( const function_input_base& src, function_input_queue *q = NULL ) : + receiver(), tbb::internal::no_assign(), + my_root_task( src.my_root_task), my_max_concurrency(src.my_max_concurrency), + my_concurrency(0), my_queue(q), forwarder_busy(false) + { + my_predecessors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + //! Destructor + virtual ~function_input_base() { + if ( my_queue ) delete my_queue; + } + + //! Put to the node, returning a task if available + virtual task * try_put_task( const input_type &t ) { + if ( my_max_concurrency == 0 ) { + return create_body_task( t ); + } else { + my_operation op_data(t, tryput_bypass); + my_aggregator.execute(&op_data); + if(op_data.status == SUCCEEDED ) { + return op_data.bypass_t; + } + return NULL; + } + } + + //! Adds src to the list of cached predecessors. + /* override */ bool register_predecessor( predecessor_type &src ) { + my_operation op_data(reg_pred); + op_data.r = &src; + my_aggregator.execute(&op_data); + return true; + } + + //! Removes src from the list of cached predecessors. + /* override */ bool remove_predecessor( predecessor_type &src ) { + my_operation op_data(rem_pred); + op_data.r = &src; + my_aggregator.execute(&op_data); + return true; + } + + protected: + + void reset_function_input_base() { + my_concurrency = 0; + if(my_queue) { + my_queue->reset(); + } + my_predecessors.reset(); + forwarder_busy = false; + } + + task *my_root_task; + const size_t my_max_concurrency; + size_t my_concurrency; + function_input_queue *my_queue; + predecessor_cache my_predecessors; + + /*override*/void reset_receiver() { + my_predecessors.reset(); + } + + private: + + friend class apply_body_task_bypass< my_class, input_type >; + friend class forward_task_bypass< my_class >; + + class my_operation : public aggregated_operation< my_operation > { + public: + char type; + union { + input_type *elem; + predecessor_type *r; + }; + tbb::task *bypass_t; + my_operation(const input_type& e, op_type t) : + type(char(t)), elem(const_cast(&e)) {} + my_operation(op_type t) : type(char(t)), r(NULL) {} + }; + + bool forwarder_busy; + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator< my_handler, my_operation > my_aggregator; + + void handle_operations(my_operation *op_list) { + my_operation *tmp; + while (op_list) { + tmp = op_list; + op_list = op_list->next; + switch (tmp->type) { + case reg_pred: + my_predecessors.add(*(tmp->r)); + __TBB_store_with_release(tmp->status, SUCCEEDED); + if (!forwarder_busy) { + forwarder_busy = true; + spawn_forward_task(); + } + break; + case rem_pred: + my_predecessors.remove(*(tmp->r)); + __TBB_store_with_release(tmp->status, SUCCEEDED); + break; + case app_body: + __TBB_ASSERT(my_max_concurrency != 0, NULL); + --my_concurrency; + __TBB_store_with_release(tmp->status, SUCCEEDED); + if (my_concurrencypop(i); + else + item_was_retrieved = my_predecessors.get_item(i); + if (item_was_retrieved) { + ++my_concurrency; + spawn_body_task(i); + } + } + break; + case app_body_bypass: { + task * new_task = NULL; + __TBB_ASSERT(my_max_concurrency != 0, NULL); + --my_concurrency; + if (my_concurrencypop(i); + else + item_was_retrieved = my_predecessors.get_item(i); + if (item_was_retrieved) { + ++my_concurrency; + new_task = create_body_task(i); + } + } + tmp->bypass_t = new_task; + __TBB_store_with_release(tmp->status, SUCCEEDED); + } + break; + case tryput_bypass: internal_try_put_task(tmp); break; + case try_fwd: internal_forward(tmp); break; + } + } + } + + //! Put to the node, but return the task instead of enqueueing it + void internal_try_put_task(my_operation *op) { + __TBB_ASSERT(my_max_concurrency != 0, NULL); + if (my_concurrency < my_max_concurrency) { + ++my_concurrency; + task * new_task = create_body_task(*(op->elem)); + op->bypass_t = new_task; + __TBB_store_with_release(op->status, SUCCEEDED); + } else if ( my_queue && my_queue->push(*(op->elem)) ) { + op->bypass_t = SUCCESSFULLY_ENQUEUED; + __TBB_store_with_release(op->status, SUCCEEDED); + } else { + op->bypass_t = NULL; + __TBB_store_with_release(op->status, FAILED); + } + } + + //! Tries to spawn bodies if available and if concurrency allows + void internal_forward(my_operation *op) { + op->bypass_t = NULL; + if (my_concurrencypop(i); + else + item_was_retrieved = my_predecessors.get_item(i); + if (item_was_retrieved) { + ++my_concurrency; + op->bypass_t = create_body_task(i); + __TBB_store_with_release(op->status, SUCCEEDED); + return; + } + } + __TBB_store_with_release(op->status, FAILED); + forwarder_busy = false; + } + + //! Applies the body to the provided input + // then decides if more work is available + void apply_body( input_type &i ) { + task *new_task = apply_body_bypass(i); + if(!new_task) return; + if(new_task == SUCCESSFULLY_ENQUEUED) return; + task::enqueue(*new_task); + return; + } + + //! Applies the body to the provided input + // then decides if more work is available + task * apply_body_bypass( input_type &i ) { + task * new_task = static_cast(this)->apply_body_impl_bypass(i); + if ( my_max_concurrency != 0 ) { + my_operation op_data(app_body_bypass); // tries to pop an item or get_item, enqueues another apply_body + my_aggregator.execute(&op_data); + tbb::task *ttask = op_data.bypass_t; + new_task = combine_tasks(new_task, ttask); + } + return new_task; + } + + //! allocates a task to call apply_body( input ) + inline task * create_body_task( const input_type &input ) { + return new(task::allocate_additional_child_of(*my_root_task)) + apply_body_task_bypass < my_class, input_type >(*this, input); + } + + //! Spawns a task that calls apply_body( input ) + inline void spawn_body_task( const input_type &input ) { + task::enqueue(*create_body_task(input)); + } + + //! This is executed by an enqueued task, the "forwarder" + task *forward_task() { + my_operation op_data(try_fwd); + task *rval = NULL; + do { + op_data.status = WAIT; + my_aggregator.execute(&op_data); + if(op_data.status == SUCCEEDED) { + tbb::task *ttask = op_data.bypass_t; + rval = combine_tasks(rval, ttask); + } + } while (op_data.status == SUCCEEDED); + return rval; + } + + inline task *create_forward_task() { + task *rval = new(task::allocate_additional_child_of(*my_root_task)) forward_task_bypass< my_class >(*this); + return rval; + } + + //! Spawns a task that calls forward() + inline void spawn_forward_task() { + task::enqueue(*create_forward_task()); + } + }; // function_input_base + + //! Implements methods for a function node that takes a type Input as input and sends + // a type Output to its successors. + template< typename Input, typename Output, typename A> + class function_input : public function_input_base > { + public: + typedef Input input_type; + typedef Output output_type; + typedef function_input my_class; + typedef function_input_base base_type; + typedef function_input_queue input_queue_type; + + + // constructor + template + function_input( graph &g, size_t max_concurrency, Body& body, function_input_queue *q = NULL ) : + base_type(g, max_concurrency, q), + my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { + } + + //! Copy constructor + function_input( const function_input& src, input_queue_type *q = NULL ) : + base_type(src, q), + my_body( src.my_body->clone() ) { + } + + ~function_input() { + delete my_body; + } + + template< typename Body > + Body copy_function_object() { + internal::function_body &body_ref = *this->my_body; + return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); + } + + task * apply_body_impl_bypass( const input_type &i) { + task * new_task = successors().try_put_task( (*my_body)(i) ); + return new_task; + } + + protected: + + void reset_function_input() { + base_type::reset_function_input_base(); + } + + function_body *my_body; + virtual broadcast_cache &successors() = 0; + + }; + + //! Implements methods for a function node that takes a type Input as input + // and has a tuple of output ports specified. + template< typename Input, typename OutputPortSet, typename A> + class multifunction_input : public function_input_base > { + public: + typedef Input input_type; + typedef OutputPortSet output_ports_type; + typedef multifunction_input my_class; + typedef function_input_base base_type; + typedef function_input_queue input_queue_type; + + + // constructor + template + multifunction_input( + graph &g, + size_t max_concurrency, + Body& body, + function_input_queue *q = NULL ) : + base_type(g, max_concurrency, q), + my_body( new internal::multifunction_body_leaf(body) ) { + } + + //! Copy constructor + multifunction_input( const multifunction_input& src, input_queue_type *q = NULL ) : + base_type(src, q), + my_body( src.my_body->clone() ) { + } + + ~multifunction_input() { + delete my_body; + } + + template< typename Body > + Body copy_function_object() { + internal::multifunction_body &body_ref = *this->my_body; + return dynamic_cast< internal::multifunction_body_leaf & >(body_ref).get_body(); + } + + // for multifunction nodes we do not have a single successor as such. So we just tell + // the task we were successful. + task * apply_body_impl_bypass( const input_type &i) { + (*my_body)(i, my_output_ports); + task * new_task = SUCCESSFULLY_ENQUEUED; + return new_task; + } + + output_ports_type &output_ports(){ return my_output_ports; } + + protected: + + void reset() { + base_type::reset_function_input_base(); + } + + multifunction_body *my_body; + output_ports_type my_output_ports; + + }; + + // template to refer to an output port of a multifunction_node + template + typename tbb::flow::tuple_element::type &output_port(MOP &op) { + return tbb::flow::get(op.output_ports()); + } + +// helper structs for split_node + template + struct emit_element { + template + static void emit_this(const T &t, P &p) { + (void)tbb::flow::get(p).try_put(tbb::flow::get(t)); + emit_element::emit_this(t,p); + } + }; + + template<> + struct emit_element<1> { + template + static void emit_this(const T &t, P &p) { + (void)tbb::flow::get<0>(p).try_put(tbb::flow::get<0>(t)); + } + }; + + //! Implements methods for an executable node that takes continue_msg as input + template< typename Output > + class continue_input : public continue_receiver { + public: + + //! The input type of this receiver + typedef continue_msg input_type; + + //! The output type of this receiver + typedef Output output_type; + + template< typename Body > + continue_input( graph &g, Body& body ) + : my_root_task(g.root_task()), + my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } + + template< typename Body > + continue_input( graph &g, int number_of_predecessors, Body& body ) + : continue_receiver( number_of_predecessors ), my_root_task(g.root_task()), + my_body( new internal::function_body_leaf< input_type, output_type, Body>(body) ) { } + + continue_input( const continue_input& src ) : continue_receiver(src), + my_root_task(src.my_root_task), my_body( src.my_body->clone() ) {} + + template< typename Body > + Body copy_function_object() { + internal::function_body &body_ref = *my_body; + return dynamic_cast< internal::function_body_leaf & >(body_ref).get_body(); + } + + protected: + + task *my_root_task; + function_body *my_body; + + virtual broadcast_cache &successors() = 0; + + friend class apply_body_task_bypass< continue_input< Output >, continue_msg >; + + //! Applies the body to the provided input + /* override */ task *apply_body_bypass( input_type ) { + return successors().try_put_task( (*my_body)( continue_msg() ) ); + } + + //! Spawns a task that applies the body + /* override */ task *execute( ) { + task *res = new ( task::allocate_additional_child_of( *my_root_task ) ) + apply_body_task_bypass< continue_input< Output >, continue_msg >( *this, continue_msg() ); + return res; + } + + }; + + //! Implements methods for both executable and function nodes that puts Output to its successors + template< typename Output > + class function_output : public sender { + public: + + typedef Output output_type; + + function_output() { my_successors.set_owner(this); } + function_output(const function_output & /*other*/) : sender() { + my_successors.set_owner(this); + } + + //! Adds a new successor to this node + /* override */ bool register_successor( receiver &r ) { + successors().register_successor( r ); + return true; + } + + //! Removes a successor from this node + /* override */ bool remove_successor( receiver &r ) { + successors().remove_successor( r ); + return true; + } + + // for multifunction_node. The function_body that implements + // the node will have an input and an output tuple of ports. To put + // an item to a successor, the body should + // + // get(output_ports).try_put(output_value); + // + // return value will be bool returned from successors.try_put. + task *try_put_task(const output_type &i) { return my_successors.try_put_task(i); } + + protected: + broadcast_cache my_successors; + broadcast_cache &successors() { return my_successors; } + + }; + + template< typename Output > + class multifunction_output : public function_output { + public: + typedef Output output_type; + typedef function_output base_type; + using base_type::my_successors; + + multifunction_output() : base_type() {my_successors.set_owner(this);} + multifunction_output( const multifunction_output &/*other*/) : base_type() { my_successors.set_owner(this); } + + bool try_put(const output_type &i) { + task *res = my_successors.try_put_task(i); + if(!res) return false; + if(res != SUCCESSFULLY_ENQUEUED) task::enqueue(*res); + return true; + } + }; + +} // internal + +#endif // __TBB__flow_graph_node_impl_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_or_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_or_impl.h new file mode 100644 index 0000000000..37ee950e49 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_or_impl.h @@ -0,0 +1,295 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_or_impl_H +#define __TBB__flow_graph_or_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#if TBB_PREVIEW_GRAPH_NODES +#include "tbb/internal/_flow_graph_types_impl.h" + +namespace internal { + + // Output of the or_node is a struct containing a tbb::flow::tuple, and will be of + // the form + // + // struct { + // size_t indx; + // tuple_types result; + // }; + // + // where the value of indx will indicate which result was put to the + // successor. So if oval is the output to the successor, indx == 0 + // means tbb::flow::get<0>(oval.result) is the output, and so on. + // + // tuple_types is the tuple that specified the possible outputs (and + // the corresponding inputs to the or_node.) + // + // the types of each element are represented by tuple_types, a typedef + // in the or_node. So the 2nd type in the union that is the + // output type for an or_node OrType is + // + // tbb::flow::tuple_element<1,OrType::tuple_types>::type + + // the struct has an OutputTuple default constructed, with element index assigned + // the actual output value. + template + struct or_output_type { + typedef OutputTuple tuple_types; + struct type { + size_t indx; + OutputTuple result; + +// The LLVM libc++ that ships with OS X* 10.7 has a bug in tuple that disables +// the copy assignment operator (LLVM bug #11921). +//TODO: introduce according broken macro. +//it can not be done right now, as tbb_config.h does not allowed to include other headers, +//and without this it is not possible to detect libc++ version, as compiler version for clang +//is vendor specific +#ifdef _LIBCPP_TUPLE + type &operator=(type const &x) { + indx = x.indx; + result = const_cast(x.result); + return *this; + } +#endif + }; + }; + + template + struct or_item_helper { + template + static inline void create_output_value(OutputType &o, void *v) { + o.indx = N; + tbb::flow::get(o.result) = *(reinterpret_cast::type *>(v)); + } + }; + + template + struct or_helper { + template + static inline void create_output(OutputType &o, size_t i, void* v) { + if(i == N-1) { + or_item_helper::create_output_value(o,v); + } + else + or_helper::create_output(o,i,v); + } + template + static inline void set_or_node_pointer(PortTuple &my_input, PutBase *p) { + tbb::flow::get(my_input).set_up(p, N-1); + or_helper::set_or_node_pointer(my_input, p); + } + }; + + template + struct or_helper { + template + static inline void create_output(OutputType &o, size_t i, void* v) { + if(i == 0) { + or_item_helper::create_output_value(o,v); + } + } + template + static inline void set_or_node_pointer(PortTuple &my_input, PutBase *p) { + tbb::flow::get<0>(my_input).set_up(p, 0); + } + }; + + struct put_base { + // virtual bool try_put_with_index(size_t index, void *v) = 0; + virtual task * try_put_task_with_index(size_t index, void *v) = 0; + virtual ~put_base() { } + }; + + template + class or_input_port : public receiver { + private: + size_t my_index; + put_base *my_or_node; + public: + void set_up(put_base *p, size_t i) { my_index = i; my_or_node = p; } + protected: + template< typename R, typename B > friend class run_and_put_task; + template friend class internal::broadcast_cache; + template friend class internal::round_robin_cache; + task *try_put_task(const T &v) { + return my_or_node->try_put_task_with_index(my_index, reinterpret_cast(const_cast(&v))); + } + /*override*/void reset_receiver() {} + }; + + template + class or_node_FE : public put_base { + public: + static const int N = tbb::flow::tuple_size::value; + typedef OutputType output_type; + typedef InputTuple input_type; + + or_node_FE( ) { + or_helper::set_or_node_pointer(my_inputs, this); + } + + input_type &input_ports() { return my_inputs; } + protected: + input_type my_inputs; + }; + + //! or_node_base + template + class or_node_base : public graph_node, public or_node_FE, + public sender { + protected: + using graph_node::my_graph; + public: + static const size_t N = tbb::flow::tuple_size::value; + typedef OutputType output_type; + typedef StructTypes tuple_types; + typedef receiver successor_type; + typedef or_node_FE input_ports_type; + + private: + // ----------- Aggregator ------------ + enum op_type { reg_succ, rem_succ, try__put_task }; + enum op_stat {WAIT=0, SUCCEEDED, FAILED}; + typedef or_node_base my_class; + + class or_node_base_operation : public aggregated_operation { + public: + char type; + size_t indx; + union { + void *my_arg; + successor_type *my_succ; + task *bypass_t; + }; + or_node_base_operation(size_t i, const void* e, op_type t) : + type(char(t)), indx(i), my_arg(const_cast(e)) {} + or_node_base_operation(const successor_type &s, op_type t) : type(char(t)), + my_succ(const_cast(&s)) {} + or_node_base_operation(op_type t) : type(char(t)) {} + }; + + typedef internal::aggregating_functor my_handler; + friend class internal::aggregating_functor; + aggregator my_aggregator; + + void handle_operations(or_node_base_operation* op_list) { + or_node_base_operation *current; + while(op_list) { + current = op_list; + op_list = op_list->next; + switch(current->type) { + + case reg_succ: + my_successors.register_successor(*(current->my_succ)); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + + case rem_succ: + my_successors.remove_successor(*(current->my_succ)); + __TBB_store_with_release(current->status, SUCCEEDED); + break; + case try__put_task: { + output_type oo; + or_helper::create_output(oo, current->indx, current->my_arg); + current->bypass_t = my_successors.try_put_task(oo); + __TBB_store_with_release(current->status, SUCCEEDED); // return of try_put_task actual return value + } + break; + } + } + } + // ---------- end aggregator ----------- + public: + or_node_base(graph& g) : graph_node(g), input_ports_type() { + my_successors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + or_node_base(const or_node_base& other) : graph_node(other.my_graph), input_ports_type(), sender() { + my_successors.set_owner(this); + my_aggregator.initialize_handler(my_handler(this)); + } + + bool register_successor(successor_type &r) { + or_node_base_operation op_data(r, reg_succ); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + bool remove_successor( successor_type &r) { + or_node_base_operation op_data(r, rem_succ); + my_aggregator.execute(&op_data); + return op_data.status == SUCCEEDED; + } + + task * try_put_task_with_index(size_t indx, void *v) { + or_node_base_operation op_data(indx, v, try__put_task); + my_aggregator.execute(&op_data); + return op_data.bypass_t; + } + + protected: + /*override*/void reset() {} + + private: + broadcast_cache my_successors; + }; + + // type generators + template + struct or_types { + static const int N = tbb::flow::tuple_size::value; + typedef typename wrap_tuple_elements::type input_ports_type; + typedef typename or_output_type::type output_type; + typedef internal::or_node_FE or_FE_type; + typedef internal::or_node_base or_base_type; + }; + + template + class unfolded_or_node : public or_types::or_base_type { + public: + typedef typename or_types::input_ports_type input_ports_type; + typedef OutputTuple tuple_types; + typedef typename or_types::output_type output_type; + private: + typedef typename or_types::or_base_type base_type; + public: + unfolded_or_node(graph& g) : base_type(g) {} + unfolded_or_node(const unfolded_or_node &other) : base_type(other) {} + }; + + +} /* namespace internal */ +#endif // TBB_PREVIEW_GRAPH_NODES + +#endif /* __TBB__flow_graph_or_impl_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_tagged_buffer_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_tagged_buffer_impl.h new file mode 100644 index 0000000000..bed28f031f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_tagged_buffer_impl.h @@ -0,0 +1,220 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// tagged buffer that can expand, and can support as many deletions as additions +// list-based, with elements of list held in std::vector (for destruction management), +// multiplicative hashing (like ets). No synchronization built-in. +// + +#ifndef __TBB__flow_graph_tagged_buffer_impl_H +#define __TBB__flow_graph_tagged_buffer_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +template +struct buffer_element { + TagType t; + ValueType v; + buffer_element *next; + buffer_element() : t(NoTagMark), next(NULL) {} +}; + +template + < + typename TagType, + typename ValueType, + size_t NoTagMark = 0, + typename Allocator=tbb::cache_aligned_allocator< buffer_element > + > +class tagged_buffer { +public: + static const size_t INITIAL_SIZE = 8; // initial size of the hash pointer table + static const TagType NO_TAG = TagType(NoTagMark); + typedef ValueType value_type; + typedef buffer_element element_type; + typedef value_type *pointer_type; + typedef std::vector list_array_type; + typedef typename Allocator::template rebind::other pointer_array_allocator_type; + typedef typename Allocator::template rebind::other list_array_allocator; +private: + + size_t my_size; + size_t nelements; + element_type** array; + std::vector *lists; + element_type* free_list; + + size_t mask() { return my_size - 1; } + + static size_t hash(TagType t) { + return uintptr_t(t)*tbb::internal::select_size_t_constant<0x9E3779B9,0x9E3779B97F4A7C15ULL>::value; + } + + void set_up_free_list( element_type **p_free_list, list_array_type *la, size_t sz) { + for(size_t i=0; i < sz - 1; ++i ) { // construct free list + (*la)[i].next = &((*la)[i+1]); + (*la)[i].t = NO_TAG; + } + (*la)[sz-1].next = NULL; + *p_free_list = &((*la)[0]); + } + + void grow_array() { + // make the pointer array larger + element_type **new_array; + element_type **old_array = array; + size_t old_size = my_size; + my_size *=2; + new_array = pointer_array_allocator_type().allocate(my_size); + for(size_t i=0; i < my_size; ++i) new_array[i] = NULL; + list_array_type *new_list_array = new list_array_type(old_size, element_type(), Allocator()); + set_up_free_list(&free_list, new_list_array, old_size ); + + for(size_t i=0; i < old_size; ++i) { + for( element_type* op = old_array[i]; op; op = op->next) { + internal_tagged_insert(new_array, my_size, op->t, op->v); + } + } + pointer_array_allocator_type().deallocate(old_array, old_size); + + delete lists; // destroy and deallocate instead + array = new_array; + lists = new_list_array; + } + + void internal_tagged_insert( element_type **ar, size_t sz, TagType t, value_type v) { + size_t l_mask = sz-1; + size_t h = hash(t) & l_mask; + __TBB_ASSERT(free_list, "Error: free list not set up."); + element_type* my_elem = free_list; free_list = free_list->next; + my_elem->t = t; + my_elem->v = v; + my_elem->next = ar[h]; + ar[h] = my_elem; + } + + void internal_initialize_buffer() { + array = pointer_array_allocator_type().allocate(my_size); + for(size_t i = 0; i < my_size; ++i) array[i] = NULL; + lists = new list_array_type(INITIAL_SIZE/2, element_type(), Allocator()); + set_up_free_list(&free_list, lists, INITIAL_SIZE/2); + } + + void internal_free_buffer() { + if(array) { + pointer_array_allocator_type().deallocate(array, my_size); + array = NULL; + } + if(lists) { + delete lists; + lists = NULL; + } + my_size = INITIAL_SIZE; + nelements = 0; + } + +public: + tagged_buffer() : my_size(INITIAL_SIZE), nelements(0) { + internal_initialize_buffer(); + } + + ~tagged_buffer() { + internal_free_buffer(); + } + + void reset() { + internal_free_buffer(); + internal_initialize_buffer(); + } + + bool tagged_insert(TagType t, value_type v) { + pointer_type p; + if(tagged_find_ref(t, p)) { + *p = v; // replace the value + return false; + } + ++nelements; + if(nelements*2 > my_size) grow_array(); + internal_tagged_insert(array, my_size, t, v); + return true; + } + + // returns reference to array element.v + bool tagged_find_ref(TagType t, pointer_type &v) { + size_t i = hash(t) & mask(); + for(element_type* p = array[i]; p; p = p->next) { + if(p->t == t) { + v = &(p->v); + return true; + } + } + return false; + } + + bool tagged_find( TagType t, value_type &v) { + value_type *p; + if(tagged_find_ref(t, p)) { + v = *p; + return true; + } + else + return false; + } + + void tagged_delete(TagType t) { + size_t h = hash(t) & mask(); + element_type* prev = NULL; + for(element_type* p = array[h]; p; prev = p, p = p->next) { + if(p->t == t) { + p->t = NO_TAG; + if(prev) prev->next = p->next; + else array[h] = p->next; + p->next = free_list; + free_list = p; + --nelements; + return; + } + } + __TBB_ASSERT(false, "tag not found for delete"); + } + + // search for v in the array; if found {set t, return true} else return false + // we use this in join_node_FE to find if a tag's items are all available. + bool find_value_tag( TagType &t, value_type v) { + for(size_t i= 0; i < my_size / 2; ++i) { // remember the vector is half the size of the hash array + if( (*lists)[i].t != NO_TAG && (*lists)[i].v == v) { + t = (*lists)[i].t; + return true; + } + } + return false; + } +}; +#endif // __TBB__flow_graph_tagged_buffer_impl_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_types_impl.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_types_impl.h new file mode 100644 index 0000000000..98611e3248 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_flow_graph_types_impl.h @@ -0,0 +1,168 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB__flow_graph_types_impl_H +#define __TBB__flow_graph_types_impl_H + +#ifndef __TBB_flow_graph_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +namespace internal { +// wrap each element of a tuple in a template, and make a tuple of the result. + + template class PT, typename TypeTuple> + struct wrap_tuple_elements; + + template class PT, typename TypeTuple> + struct wrap_tuple_elements<1, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type> > + type; + }; + + template class PT, typename TypeTuple> + struct wrap_tuple_elements<2, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type> > + type; + }; + + template class PT, typename TypeTuple> + struct wrap_tuple_elements<3, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type> > + type; + }; + + template class PT, typename TypeTuple> + struct wrap_tuple_elements<4, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; + + template class PT, typename TypeTuple> + struct wrap_tuple_elements<5, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; + +#if __TBB_VARIADIC_MAX >= 6 + template class PT, typename TypeTuple> + struct wrap_tuple_elements<6, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; +#endif + +#if __TBB_VARIADIC_MAX >= 7 + template class PT, typename TypeTuple> + struct wrap_tuple_elements<7, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; +#endif + +#if __TBB_VARIADIC_MAX >= 8 + template class PT, typename TypeTuple> + struct wrap_tuple_elements<8, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; +#endif + +#if __TBB_VARIADIC_MAX >= 9 + template class PT, typename TypeTuple> + struct wrap_tuple_elements<9, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; +#endif + +#if __TBB_VARIADIC_MAX >= 10 + template class PT, typename TypeTuple> + struct wrap_tuple_elements<10, PT, TypeTuple> { + typedef typename tbb::flow::tuple< + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type>, + PT::type> > + type; + }; +#endif + +} // namespace internal +#endif /* __TBB__flow_graph_types_impl_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_tbb_windef.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_tbb_windef.h new file mode 100644 index 0000000000..4f11a132e9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/internal/_tbb_windef.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_windef_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif /* __TBB_tbb_windef_H */ + +// Check that the target Windows version has all API calls requried for TBB. +// Do not increase the version in condition beyond 0x0500 without prior discussion! +#if defined(_WIN32_WINNT) && _WIN32_WINNT<0x0501 +#error TBB is unable to run on old Windows versions; _WIN32_WINNT must be 0x0501 or greater. +#endif + +#if !defined(_MT) +#error TBB requires linkage with multithreaded C/C++ runtime library. \ + Choose multithreaded DLL runtime in project settings, or use /MD[d] compiler switch. +#endif + +// Workaround for the problem with MVSC headers failing to define namespace std +namespace std { + using ::size_t; using ::ptrdiff_t; +} + +#define __TBB_STRING_AUX(x) #x +#define __TBB_STRING(x) __TBB_STRING_AUX(x) + +// Default setting of TBB_USE_DEBUG +#ifdef TBB_USE_DEBUG +# if TBB_USE_DEBUG +# if !defined(_DEBUG) +# pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MDd if compiling with TBB_USE_DEBUG!=0") +# endif +# else +# if defined(_DEBUG) +# pragma message(__FILE__ "(" __TBB_STRING(__LINE__) ") : Warning: Recommend using /MD if compiling with TBB_USE_DEBUG==0") +# endif +# endif +#endif + +#if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBB_NO_IMPLICIT_LINKAGE) +#define __TBB_NO_IMPLICIT_LINKAGE 1 +#endif + +#if _MSC_VER + #if !__TBB_NO_IMPLICIT_LINKAGE + #ifdef __TBB_LIB_NAME + #pragma comment(lib, __TBB_STRING(__TBB_LIB_NAME)) + #else + #ifdef _DEBUG + #pragma comment(lib, "tbb_debug.lib") + #else + #pragma comment(lib, "tbb.lib") + #endif + #endif + #endif +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_armv7.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_armv7.h new file mode 100644 index 0000000000..25df2bc2c4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_armv7.h @@ -0,0 +1,222 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* + This is the TBB implementation for the ARMv7-a architecture. +*/ + +#ifndef __TBB_machine_H +#error Do not include this file directly; include tbb_machine.h instead +#endif + +//TODO: is ARMv7 is the only version ever to support? +#if !(__ARM_ARCH_7A__) +#error compilation requires an ARMv7-a architecture. +#endif + +#include +#include + +#define __TBB_WORDSIZE 4 + +#ifndef __BYTE_ORDER__ + // Hopefully endianness can be validly determined at runtime. + // This may silently fail in some embedded systems with page-specific endianness. +#elif __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ + #define __TBB_BIG_ENDIAN 1 +#elif __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + #define __TBB_BIG_ENDIAN 0 +#else + #define __TBB_BIG_ENDIAN -1 // not currently supported +#endif + + +#define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") +#define __TBB_control_consistency_helper() __TBB_compiler_fence() + +#define __TBB_armv7_inner_shareable_barrier() __asm__ __volatile__("dmb ish": : :"memory") +#define __TBB_acquire_consistency_helper() __TBB_armv7_inner_shareable_barrier() +#define __TBB_release_consistency_helper() __TBB_armv7_inner_shareable_barrier() +#define __TBB_full_memory_fence() __TBB_armv7_inner_shareable_barrier() + + +//-------------------------------------------------- +// Compare and swap +//-------------------------------------------------- + +/** + * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr + * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand + * @param value value to assign *ptr to if *ptr==comparand + * @param comparand value to compare with *ptr + * @return value originally in memory at ptr, regardless of success +*/ +static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand ) +{ + int32_t oldval, res; + + __TBB_full_memory_fence(); + + do { + __asm__ __volatile__( + "ldrex %1, [%3]\n" + "mov %0, #0\n" + "cmp %1, %4\n" + "strexeq %0, %5, [%3]\n" + : "=&r" (res), "=&r" (oldval), "+Qo" (*(volatile int32_t*)ptr) + : "r" ((int32_t *)ptr), "Ir" (comparand), "r" (value) + : "cc"); + } while (res); + + __TBB_full_memory_fence(); + + return oldval; +} + +/** + * Atomic CAS for 64 bit values, if *ptr==comparand, then *ptr=value, returns *ptr + * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand + * @param value value to assign *ptr to if *ptr==comparand + * @param comparand value to compare with *ptr + * @return value originally in memory at ptr, regardless of success + */ +static inline int64_t __TBB_machine_cmpswp8(volatile void *ptr, int64_t value, int64_t comparand ) +{ + int64_t oldval; + int32_t res; + + __TBB_full_memory_fence(); + + do { + __asm__ __volatile__( + "mov %0, #0\n" + "ldrexd %1, %H1, [%3]\n" + "cmp %1, %4\n" + "cmpeq %H1, %H4\n" + "strexdeq %0, %5, %H5, [%3]" + : "=&r" (res), "=&r" (oldval), "+Qo" (*(volatile int64_t*)ptr) + : "r" ((int64_t *)ptr), "r" (comparand), "r" (value) + : "cc"); + } while (res); + + __TBB_full_memory_fence(); + + return oldval; +} + +static inline int32_t __TBB_machine_fetchadd4(volatile void* ptr, int32_t addend) +{ + unsigned long tmp; + int32_t result, tmp2; + + __TBB_full_memory_fence(); + + __asm__ __volatile__( +"1: ldrex %0, [%4]\n" +" add %3, %0, %5\n" +" strex %1, %3, [%4]\n" +" cmp %1, #0\n" +" bne 1b\n" + : "=&r" (result), "=&r" (tmp), "+Qo" (*(volatile int32_t*)ptr), "=&r"(tmp2) + : "r" ((int32_t *)ptr), "Ir" (addend) + : "cc"); + + __TBB_full_memory_fence(); + + return result; +} + +static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend) +{ + unsigned long tmp; + int64_t result, tmp2; + + __TBB_full_memory_fence(); + + __asm__ __volatile__( +"1: ldrexd %0, %H0, [%4]\n" +" adds %3, %0, %5\n" +" adc %H3, %H0, %H5\n" +" strexd %1, %3, %H3, [%4]\n" +" cmp %1, #0\n" +" bne 1b" + : "=&r" (result), "=&r" (tmp), "+Qo" (*(volatile int64_t*)ptr), "=&r"(tmp2) + : "r" ((int64_t *)ptr), "r" (addend) + : "cc"); + + + __TBB_full_memory_fence(); + + return result; +} + +inline void __TBB_machine_pause (int32_t delay ) +{ + while(delay>0) + { + __TBB_compiler_fence(); + delay--; + } +} + +namespace tbb { +namespace internal { + template + struct machine_load_store_relaxed { + static inline T load ( const volatile T& location ) { + const T value = location; + + /* + * An extra memory barrier is required for errata #761319 + * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a + */ + __TBB_armv7_inner_shareable_barrier(); + return value; + } + + static inline void store ( volatile T& location, T value ) { + location = value; + } + }; +}} // namespaces internal, tbb + +// Machine specific atomic operations + +#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C) +#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C) +#define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C) +#define __TBB_Pause(V) __TBB_machine_pause(V) + +// Use generics for some things +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 +#define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_generic.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_generic.h new file mode 100644 index 0000000000..953b9b1526 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_generic.h @@ -0,0 +1,133 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_generic_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_gcc_generic_H + +#include +#include + +#define __TBB_WORDSIZE __SIZEOF_POINTER__ + +#if __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN + #define __TBB_64BIT_ATOMICS 0 +#endif + +/** FPU control setting not available for non-Intel architectures on Android **/ +#if __ANDROID__ && __TBB_generic_arch + #define __TBB_CPU_CTL_ENV_PRESENT 0 +#endif + +#ifdef __BYTE_ORDER__ + #if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ + #define __TBB_BIG_ENDIAN 1 + #elif __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + #define __TBB_BIG_ENDIAN 0 + #elif __BYTE_ORDER__==__ORDER_PDP_ENDIAN__ + #define __TBB_BIG_ENDIAN -1 // not currently supported + #endif +#endif + +/** As this generic implementation has absolutely no information about underlying + hardware, its performance most likely will be sub-optimal because of full memory + fence usages where a more lightweight synchronization means (or none at all) + could suffice. Thus if you use this header to enable TBB on a new platform, + consider forking it and relaxing below helpers as appropriate. **/ +#define __TBB_acquire_consistency_helper() __sync_synchronize() +#define __TBB_release_consistency_helper() __sync_synchronize() +#define __TBB_full_memory_fence() __sync_synchronize() +#define __TBB_control_consistency_helper() __sync_synchronize() + +#define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \ +inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \ + return __sync_val_compare_and_swap(reinterpret_cast(ptr),comparand,value); \ +} \ + \ +inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \ + return __sync_fetch_and_add(reinterpret_cast(ptr),value); \ +} \ + +__TBB_MACHINE_DEFINE_ATOMICS(1,int8_t) +__TBB_MACHINE_DEFINE_ATOMICS(2,int16_t) +__TBB_MACHINE_DEFINE_ATOMICS(4,int32_t) +__TBB_MACHINE_DEFINE_ATOMICS(8,int64_t) + +#undef __TBB_MACHINE_DEFINE_ATOMICS + +namespace tbb{ namespace internal { namespace gcc_builtins { + inline int clz(unsigned int x){ return __builtin_clz(x);}; + inline int clz(unsigned long int x){ return __builtin_clzl(x);}; + inline int clz(unsigned long long int x){ return __builtin_clzll(x);}; +}}} +//gcc __builtin_clz builtin count _number_ of leading zeroes +static inline intptr_t __TBB_machine_lg( uintptr_t x ) { + return sizeof(x)*8 - tbb::internal::gcc_builtins::clz(x) -1 ; +} + +static inline void __TBB_machine_or( volatile void *ptr, uintptr_t addend ) { + __sync_fetch_and_or(reinterpret_cast(ptr),addend); +} + +static inline void __TBB_machine_and( volatile void *ptr, uintptr_t addend ) { + __sync_fetch_and_and(reinterpret_cast(ptr),addend); +} + + +typedef unsigned char __TBB_Flag; + +typedef __TBB_atomic __TBB_Flag __TBB_atomic_flag; + +inline bool __TBB_machine_try_lock_byte( __TBB_atomic_flag &flag ) { + return __sync_lock_test_and_set(&flag,1)==0; +} + +inline void __TBB_machine_unlock_byte( __TBB_atomic_flag &flag , __TBB_Flag) { + __sync_lock_release(&flag); +} + +// Machine specific atomic operations +#define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) + +#define __TBB_TryLockByte __TBB_machine_try_lock_byte +#define __TBB_UnlockByte __TBB_machine_unlock_byte + +// Definition of other functions +#define __TBB_Log2(V) __TBB_machine_lg(V) + +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#if __TBB_WORDSIZE==4 + #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_ia32_common.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_ia32_common.h new file mode 100644 index 0000000000..61270452dd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/gcc_ia32_common.h @@ -0,0 +1,97 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_machine_gcc_ia32_common_H +#define __TBB_machine_gcc_ia32_common_H + +//TODO: Add a higher-level function, e.g. tbb::interal::log2(), into tbb_stddef.h, which +//uses __TBB_Log2 and contains the assert and remove the assert from here and all other +//platform-specific headers. +//TODO: Check if use of gcc intrinsic gives a better chance for cross call optimizations +static inline intptr_t __TBB_machine_lg( uintptr_t x ) { + __TBB_ASSERT(x, "__TBB_Log2(0) undefined"); + uintptr_t j; + __asm__ ("bsr %1,%0" : "=r"(j) : "r"(x)); + return j; +} +#define __TBB_Log2(V) __TBB_machine_lg(V) + +#ifndef __TBB_Pause +//TODO: check if raising a ratio of pause instructions to loop control instructions +//(via e.g. loop unrolling) gives any benefit for HT. E.g, the current implementation +//does about 2 CPU-consuming instructions for every pause instruction. Perhaps for +//high pause counts it should use an unrolled loop to raise the ratio, and thus free +//up more integer cycles for the other hyperthread. On the other hand, if the loop is +//unrolled too far, it won't fit in the core's loop cache, and thus take away +//instruction decode slots from the other hyperthread. + +//TODO: check if use of gcc __builtin_ia32_pause intrinsic gives a "some how" better performing code +static inline void __TBB_machine_pause( int32_t delay ) { + for (int32_t i = 0; i < delay; i++) { + __asm__ __volatile__("pause;"); + } + return; +} +#define __TBB_Pause(V) __TBB_machine_pause(V) +#endif /* !__TBB_Pause */ + +// API to retrieve/update FPU control setting +#ifndef __TBB_CPU_CTL_ENV_PRESENT +#define __TBB_CPU_CTL_ENV_PRESENT 1 + +struct __TBB_cpu_ctl_env_t { + int mxcsr; + short x87cw; +}; +inline void __TBB_get_cpu_ctl_env ( __TBB_cpu_ctl_env_t* ctl ) { +#if __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN + __TBB_cpu_ctl_env_t loc_ctl; + __asm__ __volatile__ ( + "stmxcsr %0\n\t" + "fstcw %1" + : "=m"(loc_ctl.mxcsr), "=m"(loc_ctl.x87cw) + ); + *ctl = loc_ctl; +#else + __asm__ __volatile__ ( + "stmxcsr %0\n\t" + "fstcw %1" + : "=m"(ctl->mxcsr), "=m"(ctl->x87cw) + ); +#endif +} +inline void __TBB_set_cpu_ctl_env ( const __TBB_cpu_ctl_env_t* ctl ) { + __asm__ __volatile__ ( + "ldmxcsr %0\n\t" + "fldcw %1" + : : "m"(ctl->mxcsr), "m"(ctl->x87cw) + ); +} +#endif /* !__TBB_CPU_CTL_ENV_PRESENT */ + +#endif /* __TBB_machine_gcc_ia32_common_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/ibm_aix51.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/ibm_aix51.h new file mode 100644 index 0000000000..9814eaab8d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/ibm_aix51.h @@ -0,0 +1,78 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// TODO: revise by comparing with mac_ppc.h + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_ibm_aix51_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_ibm_aix51_H + +#define __TBB_WORDSIZE 8 +#define __TBB_BIG_ENDIAN 1 // assumption based on operating system + +#include +#include +#include + +extern "C" { +int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand); +int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand); +void __TBB_machine_flush (); +void __TBB_machine_lwsync (); +void __TBB_machine_isync (); +} + +// Mapping of old entry point names retained for the sake of backward binary compatibility +#define __TBB_machine_cmpswp4 __TBB_machine_cas_32 +#define __TBB_machine_cmpswp8 __TBB_machine_cas_64 + +#define __TBB_Yield() sched_yield() + +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_FETCH_ADD 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#if __GNUC__ + #define __TBB_control_consistency_helper() __asm__ __volatile__( "isync": : :"memory") + #define __TBB_acquire_consistency_helper() __asm__ __volatile__("lwsync": : :"memory") + #define __TBB_release_consistency_helper() __asm__ __volatile__("lwsync": : :"memory") + #define __TBB_full_memory_fence() __asm__ __volatile__( "sync": : :"memory") +#else + // IBM C++ Compiler does not support inline assembly + // TODO: Since XL 9.0 or earlier GCC syntax is supported. Replace with more + // lightweight implementation (like in mac_ppc.h) + #define __TBB_control_consistency_helper() __TBB_machine_isync () + #define __TBB_acquire_consistency_helper() __TBB_machine_lwsync () + #define __TBB_release_consistency_helper() __TBB_machine_lwsync () + #define __TBB_full_memory_fence() __TBB_machine_flush () +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/icc_generic.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/icc_generic.h new file mode 100644 index 0000000000..d4c5cef824 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/icc_generic.h @@ -0,0 +1,258 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_icc_generic_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#if ! __TBB_ICC_BUILTIN_ATOMICS_PRESENT + #error "Intel C++ Compiler of at least 12.1 version is needed to use ICC intrinsics port" +#endif + +#define __TBB_machine_icc_generic_H + +//ICC mimics the "native" target compiler +#if _MSC_VER + #include "msvc_ia32_common.h" +#else + #include "gcc_ia32_common.h" +#endif + +//TODO: Make __TBB_WORDSIZE macro optional for ICC intrinsics port. +//As compiler intrinsics are used for all the operations it is possible to do. + +#if __TBB_x86_32 + #define __TBB_WORDSIZE 4 +#else + #define __TBB_WORDSIZE 8 +#endif +#define __TBB_BIG_ENDIAN 0 + +//__TBB_compiler_fence() defined just in case, as it seems not to be used on its own anywhere else +#if _MSC_VER + //TODO: any way to use same intrinsics on windows and linux? + #pragma intrinsic(_ReadWriteBarrier) + #pragma intrinsic(_mm_mfence) + #define __TBB_compiler_fence() _ReadWriteBarrier() + #define __TBB_full_memory_fence() _mm_mfence() +#else + #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") + #define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") +#endif + +#define __TBB_control_consistency_helper() __TBB_compiler_fence() + +namespace tbb { namespace internal { +//TODO: is there any way to reuse definition of memory_order enum from ICC instead of copy paste. +//however it seems unlikely that ICC will silently change exact enum values, as they are defined +//in the ISO exactly like this. +//TODO: add test that exact values of the enum are same as in the ISO C++11 +typedef enum memory_order { + memory_order_relaxed, memory_order_consume, memory_order_acquire, + memory_order_release, memory_order_acq_rel, memory_order_seq_cst +} memory_order; + +namespace icc_intrinsics_port { + template + T convert_argument(T value){ + return value; + } + //The overload below is needed to have explicit conversion of pointer to void* in argument list. + //compiler bug? + //TODO: add according broken macro and recheck with ICC 13.0 if the overload is still needed + template + void* convert_argument(T* value){ + return (void*)value; + } +} +//TODO: code bellow is a bit repetitive, consider simplifying it +template +struct machine_load_store { + static T load_with_acquire ( const volatile T& location ) { + return __atomic_load_explicit(&location, memory_order_acquire); + } + static void store_with_release ( volatile T &location, T value ) { + __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_release); + } +}; + +template +struct machine_load_store_relaxed { + static inline T load ( const T& location ) { + return __atomic_load_explicit(&location, memory_order_relaxed); + } + static inline void store ( T& location, T value ) { + __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_relaxed); + } +}; + +template +struct machine_load_store_seq_cst { + static T load ( const volatile T& location ) { + return __atomic_load_explicit(&location, memory_order_seq_cst); + } + + static void store ( volatile T &location, T value ) { + __atomic_store_explicit(&location, value, memory_order_seq_cst); + } +}; + +}} // namespace tbb::internal + +namespace tbb{ namespace internal { namespace icc_intrinsics_port{ + typedef enum memory_order_map { + relaxed = memory_order_relaxed, + acquire = memory_order_acquire, + release = memory_order_release, + full_fence= memory_order_seq_cst + } memory_order_map; +}}}// namespace tbb::internal + +#define __TBB_MACHINE_DEFINE_ATOMICS(S,T,M) \ +inline T __TBB_machine_cmpswp##S##M( volatile void *ptr, T value, T comparand ) { \ + __atomic_compare_exchange_strong_explicit( \ + (T*)ptr \ + ,&comparand \ + ,value \ + , tbb::internal::icc_intrinsics_port::M \ + , tbb::internal::icc_intrinsics_port::M); \ + return comparand; \ +} \ + \ +inline T __TBB_machine_fetchstore##S##M(volatile void *ptr, T value) { \ + return __atomic_exchange_explicit((T*)ptr, value, tbb::internal::icc_intrinsics_port::M); \ +} \ + \ +inline T __TBB_machine_fetchadd##S##M(volatile void *ptr, T value) { \ + return __atomic_fetch_add_explicit((T*)ptr, value, tbb::internal::icc_intrinsics_port::M); \ +} \ + +__TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, full_fence) +__TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, acquire) +__TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, release) +__TBB_MACHINE_DEFINE_ATOMICS(1,tbb::internal::int8_t, relaxed) + +__TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, full_fence) +__TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, acquire) +__TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, release) +__TBB_MACHINE_DEFINE_ATOMICS(2,tbb::internal::int16_t, relaxed) + +__TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, full_fence) +__TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, acquire) +__TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, release) +__TBB_MACHINE_DEFINE_ATOMICS(4,tbb::internal::int32_t, relaxed) + +__TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, full_fence) +__TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, acquire) +__TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, release) +__TBB_MACHINE_DEFINE_ATOMICS(8,tbb::internal::int64_t, relaxed) + + +#undef __TBB_MACHINE_DEFINE_ATOMICS + +#define __TBB_USE_FENCED_ATOMICS 1 + +namespace tbb { namespace internal { +#if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN +__TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(full_fence) +__TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(full_fence) + +__TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(acquire) +__TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(release) + +__TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(relaxed) +__TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(relaxed) + +template +struct machine_load_store { + static T load_with_acquire ( const volatile T& location ) { + if( tbb::internal::is_aligned(&location,8)) { + return __atomic_load_explicit(&location, memory_order_acquire); + } else { + return __TBB_machine_generic_load8acquire(&location); + } + } + static void store_with_release ( volatile T &location, T value ) { + if( tbb::internal::is_aligned(&location,8)) { + __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_release); + } else { + return __TBB_machine_generic_store8release(&location,value); + } + } +}; + +template +struct machine_load_store_relaxed { + static T load( const volatile T& location ) { + if( tbb::internal::is_aligned(&location,8)) { + return __atomic_load_explicit(&location, memory_order_relaxed); + } else { + return __TBB_machine_generic_load8relaxed(&location); + } + } + static void store( volatile T &location, T value ) { + if( tbb::internal::is_aligned(&location,8)) { + __atomic_store_explicit(&location, icc_intrinsics_port::convert_argument(value), memory_order_relaxed); + } else { + return __TBB_machine_generic_store8relaxed(&location,value); + } + } +}; + +template +struct machine_load_store_seq_cst { + static T load ( const volatile T& location ) { + if( tbb::internal::is_aligned(&location,8)) { + return __atomic_load_explicit(&location, memory_order_seq_cst); + } else { + return __TBB_machine_generic_load8full_fence(&location); + } + + } + + static void store ( volatile T &location, T value ) { + if( tbb::internal::is_aligned(&location,8)) { + __atomic_store_explicit(&location, value, memory_order_seq_cst); + } else { + return __TBB_machine_generic_store8full_fence(&location,value); + } + + } +}; + +#endif +}} // namespace tbb::internal +template +inline void __TBB_machine_OR( T *operand, T addend ) { + __atomic_fetch_or_explicit(operand, addend, tbb::internal::memory_order_seq_cst); +} + +template +inline void __TBB_machine_AND( T *operand, T addend ) { + __atomic_fetch_and_explicit(operand, addend, tbb::internal::memory_order_seq_cst); +} diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_common.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_common.h new file mode 100644 index 0000000000..c412807f65 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_common.h @@ -0,0 +1,92 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_machine_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#include +#define __TBB_Yield() sched_yield() + +#include +/* Futex definitions */ +#include + +#if defined(SYS_futex) + +#define __TBB_USE_FUTEX 1 +#include +#include +// Unfortunately, some versions of Linux do not have a header that defines FUTEX_WAIT and FUTEX_WAKE. + +#ifdef FUTEX_WAIT +#define __TBB_FUTEX_WAIT FUTEX_WAIT +#else +#define __TBB_FUTEX_WAIT 0 +#endif + +#ifdef FUTEX_WAKE +#define __TBB_FUTEX_WAKE FUTEX_WAKE +#else +#define __TBB_FUTEX_WAKE 1 +#endif + +#ifndef __TBB_ASSERT +#error machine specific headers must be included after tbb_stddef.h +#endif + +namespace tbb { + +namespace internal { + +inline int futex_wait( void *futex, int comparand ) { + int r = syscall( SYS_futex,futex,__TBB_FUTEX_WAIT,comparand,NULL,NULL,0 ); +#if TBB_USE_ASSERT + int e = errno; + __TBB_ASSERT( r==0||r==EWOULDBLOCK||(r==-1&&(e==EAGAIN||e==EINTR)), "futex_wait failed." ); +#endif /* TBB_USE_ASSERT */ + return r; +} + +inline int futex_wakeup_one( void *futex ) { + int r = ::syscall( SYS_futex,futex,__TBB_FUTEX_WAKE,1,NULL,NULL,0 ); + __TBB_ASSERT( r==0||r==1, "futex_wakeup_one: more than one thread woken up?" ); + return r; +} + +inline int futex_wakeup_all( void *futex ) { + int r = ::syscall( SYS_futex,futex,__TBB_FUTEX_WAKE,INT_MAX,NULL,NULL,0 ); + __TBB_ASSERT( r>=0, "futex_wakeup_all: error in waking up threads" ); + return r; +} + +} /* namespace internal */ + +} /* namespace tbb */ + +#endif /* SYS_futex */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia32.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia32.h new file mode 100644 index 0000000000..092f997fed --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia32.h @@ -0,0 +1,231 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia32_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_linux_ia32_H + +#include +#include "gcc_ia32_common.h" + +#define __TBB_WORDSIZE 4 +#define __TBB_BIG_ENDIAN 0 + +#define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") +#define __TBB_control_consistency_helper() __TBB_compiler_fence() +#define __TBB_acquire_consistency_helper() __TBB_compiler_fence() +#define __TBB_release_consistency_helper() __TBB_compiler_fence() +#define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") + +#if __TBB_ICC_ASM_VOLATILE_BROKEN +#define __TBB_VOLATILE +#else +#define __TBB_VOLATILE volatile +#endif + +#define __TBB_MACHINE_DEFINE_ATOMICS(S,T,X,R) \ +static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \ +{ \ + T result; \ + \ + __asm__ __volatile__("lock\ncmpxchg" X " %2,%1" \ + : "=a"(result), "=m"(*(__TBB_VOLATILE T*)ptr) \ + : "q"(value), "0"(comparand), "m"(*(__TBB_VOLATILE T*)ptr) \ + : "memory"); \ + return result; \ +} \ + \ +static inline T __TBB_machine_fetchadd##S(volatile void *ptr, T addend) \ +{ \ + T result; \ + __asm__ __volatile__("lock\nxadd" X " %0,%1" \ + : R (result), "=m"(*(__TBB_VOLATILE T*)ptr) \ + : "0"(addend), "m"(*(__TBB_VOLATILE T*)ptr) \ + : "memory"); \ + return result; \ +} \ + \ +static inline T __TBB_machine_fetchstore##S(volatile void *ptr, T value) \ +{ \ + T result; \ + __asm__ __volatile__("lock\nxchg" X " %0,%1" \ + : R (result), "=m"(*(__TBB_VOLATILE T*)ptr) \ + : "0"(value), "m"(*(__TBB_VOLATILE T*)ptr) \ + : "memory"); \ + return result; \ +} \ + +__TBB_MACHINE_DEFINE_ATOMICS(1,int8_t,"","=q") +__TBB_MACHINE_DEFINE_ATOMICS(2,int16_t,"","=r") +__TBB_MACHINE_DEFINE_ATOMICS(4,int32_t,"l","=r") + +#if __INTEL_COMPILER +#pragma warning( push ) +// reference to EBX in a function requiring stack alignment +#pragma warning( disable: 998 ) +#endif + +static inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) { +#if __TBB_GCC_BUILTIN_ATOMICS_PRESENT + return __sync_val_compare_and_swap( reinterpret_cast(ptr), comparand, value ); +#else /* !__TBB_GCC_BUILTIN_ATOMICS_PRESENT */ + //TODO: look like ICC 13.0 has some issues with this code, investigate it more deeply + int64_t result; + union { + int64_t i64; + int32_t i32[2]; + }; + i64 = value; +#if __PIC__ + /* compiling position-independent code */ + // EBX register preserved for compliance with position-independent code rules on IA32 + int32_t tmp; + __asm__ __volatile__ ( + "movl %%ebx,%2\n\t" + "movl %5,%%ebx\n\t" +#if __GNUC__==3 + "lock\n\t cmpxchg8b %1\n\t" +#else + "lock\n\t cmpxchg8b (%3)\n\t" +#endif + "movl %2,%%ebx" + : "=A"(result) + , "=m"(*(__TBB_VOLATILE int64_t *)ptr) + , "=m"(tmp) +#if __GNUC__==3 + : "m"(*(__TBB_VOLATILE int64_t *)ptr) +#else + : "SD"(ptr) +#endif + , "0"(comparand) + , "m"(i32[0]), "c"(i32[1]) + : "memory" +#if __INTEL_COMPILER + ,"ebx" +#endif + ); +#else /* !__PIC__ */ + __asm__ __volatile__ ( + "lock\n\t cmpxchg8b %1\n\t" + : "=A"(result), "=m"(*(__TBB_VOLATILE int64_t *)ptr) + : "m"(*(__TBB_VOLATILE int64_t *)ptr) + , "0"(comparand) + , "b"(i32[0]), "c"(i32[1]) + : "memory" + ); +#endif /* __PIC__ */ + return result; +#endif /* !__TBB_GCC_BUILTIN_ATOMICS_PRESENT */ +} + +#if __INTEL_COMPILER +#pragma warning( pop ) +#endif // warning 998 is back + +static inline void __TBB_machine_or( volatile void *ptr, uint32_t addend ) { + __asm__ __volatile__("lock\norl %1,%0" : "=m"(*(__TBB_VOLATILE uint32_t *)ptr) : "r"(addend), "m"(*(__TBB_VOLATILE uint32_t *)ptr) : "memory"); +} + +static inline void __TBB_machine_and( volatile void *ptr, uint32_t addend ) { + __asm__ __volatile__("lock\nandl %1,%0" : "=m"(*(__TBB_VOLATILE uint32_t *)ptr) : "r"(addend), "m"(*(__TBB_VOLATILE uint32_t *)ptr) : "memory"); +} + +//TODO: Check if it possible and profitable for IA-32 on (Linux and Windows) +//to use of 64-bit load/store via floating point registers together with full fence +//for sequentially consistent load/store, instead of CAS. + +#if __clang__ +#define __TBB_fildq "fildll" +#define __TBB_fistpq "fistpll" +#else +#define __TBB_fildq "fildq" +#define __TBB_fistpq "fistpq" +#endif + +static inline int64_t __TBB_machine_aligned_load8 (const volatile void *ptr) { + __TBB_ASSERT(tbb::internal::is_aligned(ptr,8),"__TBB_machine_aligned_load8 should be used with 8 byte aligned locations only \n"); + int64_t result; + __asm__ __volatile__ ( __TBB_fildq " %1\n\t" + __TBB_fistpq " %0" : "=m"(result) : "m"(*(const __TBB_VOLATILE uint64_t*)ptr) : "memory" ); + return result; +} + +static inline void __TBB_machine_aligned_store8 (volatile void *ptr, int64_t value ) { + __TBB_ASSERT(tbb::internal::is_aligned(ptr,8),"__TBB_machine_aligned_store8 should be used with 8 byte aligned locations only \n"); + // Aligned store + __asm__ __volatile__ ( __TBB_fildq " %1\n\t" + __TBB_fistpq " %0" : "=m"(*(__TBB_VOLATILE int64_t*)ptr) : "m"(value) : "memory" ); +} + +static inline int64_t __TBB_machine_load8 (const volatile void *ptr) { +#if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN + if( tbb::internal::is_aligned(ptr,8)) { +#endif + return __TBB_machine_aligned_load8(ptr); +#if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN + } else { + // Unaligned load + return __TBB_machine_cmpswp8(const_cast(ptr),0,0); + } +#endif +} + +//! Handles misaligned 8-byte store +/** Defined in tbb_misc.cpp */ +extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ); +extern "C" void __TBB_machine_store8_slow_perf_warning( volatile void *ptr ); + +static inline void __TBB_machine_store8(volatile void *ptr, int64_t value) { +#if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN + if( tbb::internal::is_aligned(ptr,8)) { +#endif + __TBB_machine_aligned_store8(ptr,value); +#if __TBB_FORCE_64BIT_ALIGNMENT_BROKEN + } else { + // Unaligned store +#if TBB_USE_PERFORMANCE_WARNINGS + __TBB_machine_store8_slow_perf_warning(ptr); +#endif /* TBB_USE_PERFORMANCE_WARNINGS */ + __TBB_machine_store8_slow(ptr,value); + } +#endif +} + +// Machine specific atomic operations +#define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) + +#define __TBB_USE_GENERIC_DWORD_FETCH_ADD 1 +#define __TBB_USE_GENERIC_DWORD_FETCH_STORE 1 +#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia64.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia64.h new file mode 100644 index 0000000000..fb7530a86a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_ia64.h @@ -0,0 +1,189 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_ia64_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_linux_ia64_H + +#include +#include + +#define __TBB_WORDSIZE 8 +#define __TBB_BIG_ENDIAN 0 + +#if __INTEL_COMPILER + #define __TBB_compiler_fence() + #define __TBB_control_consistency_helper() __TBB_compiler_fence() + #define __TBB_acquire_consistency_helper() + #define __TBB_release_consistency_helper() + #define __TBB_full_memory_fence() __mf() +#else + #define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") + #define __TBB_control_consistency_helper() __TBB_compiler_fence() + // Even though GCC imbues volatile loads with acquire semantics, it sometimes moves + // loads over the acquire fence. The following helpers stop such incorrect code motion. + #define __TBB_acquire_consistency_helper() __TBB_compiler_fence() + #define __TBB_release_consistency_helper() __TBB_compiler_fence() + #define __TBB_full_memory_fence() __asm__ __volatile__("mf": : :"memory") +#endif /* !__INTEL_COMPILER */ + +// Most of the functions will be in a .s file +// TODO: revise dynamic_link, memory pools and etc. if the library dependency is removed. + +extern "C" { + int8_t __TBB_machine_fetchadd1__TBB_full_fence (volatile void *ptr, int8_t addend); + int8_t __TBB_machine_fetchadd1acquire(volatile void *ptr, int8_t addend); + int8_t __TBB_machine_fetchadd1release(volatile void *ptr, int8_t addend); + + int16_t __TBB_machine_fetchadd2__TBB_full_fence (volatile void *ptr, int16_t addend); + int16_t __TBB_machine_fetchadd2acquire(volatile void *ptr, int16_t addend); + int16_t __TBB_machine_fetchadd2release(volatile void *ptr, int16_t addend); + + int32_t __TBB_machine_fetchadd4__TBB_full_fence (volatile void *ptr, int32_t value); + int32_t __TBB_machine_fetchadd4acquire(volatile void *ptr, int32_t addend); + int32_t __TBB_machine_fetchadd4release(volatile void *ptr, int32_t addend); + + int64_t __TBB_machine_fetchadd8__TBB_full_fence (volatile void *ptr, int64_t value); + int64_t __TBB_machine_fetchadd8acquire(volatile void *ptr, int64_t addend); + int64_t __TBB_machine_fetchadd8release(volatile void *ptr, int64_t addend); + + int8_t __TBB_machine_fetchstore1__TBB_full_fence (volatile void *ptr, int8_t value); + int8_t __TBB_machine_fetchstore1acquire(volatile void *ptr, int8_t value); + int8_t __TBB_machine_fetchstore1release(volatile void *ptr, int8_t value); + + int16_t __TBB_machine_fetchstore2__TBB_full_fence (volatile void *ptr, int16_t value); + int16_t __TBB_machine_fetchstore2acquire(volatile void *ptr, int16_t value); + int16_t __TBB_machine_fetchstore2release(volatile void *ptr, int16_t value); + + int32_t __TBB_machine_fetchstore4__TBB_full_fence (volatile void *ptr, int32_t value); + int32_t __TBB_machine_fetchstore4acquire(volatile void *ptr, int32_t value); + int32_t __TBB_machine_fetchstore4release(volatile void *ptr, int32_t value); + + int64_t __TBB_machine_fetchstore8__TBB_full_fence (volatile void *ptr, int64_t value); + int64_t __TBB_machine_fetchstore8acquire(volatile void *ptr, int64_t value); + int64_t __TBB_machine_fetchstore8release(volatile void *ptr, int64_t value); + + int8_t __TBB_machine_cmpswp1__TBB_full_fence (volatile void *ptr, int8_t value, int8_t comparand); + int8_t __TBB_machine_cmpswp1acquire(volatile void *ptr, int8_t value, int8_t comparand); + int8_t __TBB_machine_cmpswp1release(volatile void *ptr, int8_t value, int8_t comparand); + + int16_t __TBB_machine_cmpswp2__TBB_full_fence (volatile void *ptr, int16_t value, int16_t comparand); + int16_t __TBB_machine_cmpswp2acquire(volatile void *ptr, int16_t value, int16_t comparand); + int16_t __TBB_machine_cmpswp2release(volatile void *ptr, int16_t value, int16_t comparand); + + int32_t __TBB_machine_cmpswp4__TBB_full_fence (volatile void *ptr, int32_t value, int32_t comparand); + int32_t __TBB_machine_cmpswp4acquire(volatile void *ptr, int32_t value, int32_t comparand); + int32_t __TBB_machine_cmpswp4release(volatile void *ptr, int32_t value, int32_t comparand); + + int64_t __TBB_machine_cmpswp8__TBB_full_fence (volatile void *ptr, int64_t value, int64_t comparand); + int64_t __TBB_machine_cmpswp8acquire(volatile void *ptr, int64_t value, int64_t comparand); + int64_t __TBB_machine_cmpswp8release(volatile void *ptr, int64_t value, int64_t comparand); + + int64_t __TBB_machine_lg(uint64_t value); + void __TBB_machine_pause(int32_t delay); + bool __TBB_machine_trylockbyte( volatile unsigned char &ptr ); + int64_t __TBB_machine_lockbyte( volatile unsigned char &ptr ); + + //! Retrieves the current RSE backing store pointer. IA64 specific. + void* __TBB_get_bsp(); + + int32_t __TBB_machine_load1_relaxed(const void *ptr); + int32_t __TBB_machine_load2_relaxed(const void *ptr); + int32_t __TBB_machine_load4_relaxed(const void *ptr); + int64_t __TBB_machine_load8_relaxed(const void *ptr); + + void __TBB_machine_store1_relaxed(void *ptr, int32_t value); + void __TBB_machine_store2_relaxed(void *ptr, int32_t value); + void __TBB_machine_store4_relaxed(void *ptr, int32_t value); + void __TBB_machine_store8_relaxed(void *ptr, int64_t value); +} // extern "C" + +// Mapping old entry points to the names corresponding to the new full_fence identifier. +#define __TBB_machine_fetchadd1full_fence __TBB_machine_fetchadd1__TBB_full_fence +#define __TBB_machine_fetchadd2full_fence __TBB_machine_fetchadd2__TBB_full_fence +#define __TBB_machine_fetchadd4full_fence __TBB_machine_fetchadd4__TBB_full_fence +#define __TBB_machine_fetchadd8full_fence __TBB_machine_fetchadd8__TBB_full_fence +#define __TBB_machine_fetchstore1full_fence __TBB_machine_fetchstore1__TBB_full_fence +#define __TBB_machine_fetchstore2full_fence __TBB_machine_fetchstore2__TBB_full_fence +#define __TBB_machine_fetchstore4full_fence __TBB_machine_fetchstore4__TBB_full_fence +#define __TBB_machine_fetchstore8full_fence __TBB_machine_fetchstore8__TBB_full_fence +#define __TBB_machine_cmpswp1full_fence __TBB_machine_cmpswp1__TBB_full_fence +#define __TBB_machine_cmpswp2full_fence __TBB_machine_cmpswp2__TBB_full_fence +#define __TBB_machine_cmpswp4full_fence __TBB_machine_cmpswp4__TBB_full_fence +#define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8__TBB_full_fence + +// Mapping relaxed operations to the entry points implementing them. +/** On IA64 RMW operations implicitly have acquire semantics. Thus one cannot + actually have completely relaxed RMW operation here. **/ +#define __TBB_machine_fetchadd1relaxed __TBB_machine_fetchadd1acquire +#define __TBB_machine_fetchadd2relaxed __TBB_machine_fetchadd2acquire +#define __TBB_machine_fetchadd4relaxed __TBB_machine_fetchadd4acquire +#define __TBB_machine_fetchadd8relaxed __TBB_machine_fetchadd8acquire +#define __TBB_machine_fetchstore1relaxed __TBB_machine_fetchstore1acquire +#define __TBB_machine_fetchstore2relaxed __TBB_machine_fetchstore2acquire +#define __TBB_machine_fetchstore4relaxed __TBB_machine_fetchstore4acquire +#define __TBB_machine_fetchstore8relaxed __TBB_machine_fetchstore8acquire +#define __TBB_machine_cmpswp1relaxed __TBB_machine_cmpswp1acquire +#define __TBB_machine_cmpswp2relaxed __TBB_machine_cmpswp2acquire +#define __TBB_machine_cmpswp4relaxed __TBB_machine_cmpswp4acquire +#define __TBB_machine_cmpswp8relaxed __TBB_machine_cmpswp8acquire + +#define __TBB_MACHINE_DEFINE_ATOMICS(S,V) \ + template \ + struct machine_load_store_relaxed { \ + static inline T load ( const T& location ) { \ + return (T)__TBB_machine_load##S##_relaxed(&location); \ + } \ + static inline void store ( T& location, T value ) { \ + __TBB_machine_store##S##_relaxed(&location, (V)value); \ + } \ + } + +namespace tbb { +namespace internal { + __TBB_MACHINE_DEFINE_ATOMICS(1,int8_t); + __TBB_MACHINE_DEFINE_ATOMICS(2,int16_t); + __TBB_MACHINE_DEFINE_ATOMICS(4,int32_t); + __TBB_MACHINE_DEFINE_ATOMICS(8,int64_t); +}} // namespaces internal, tbb + +#undef __TBB_MACHINE_DEFINE_ATOMICS + +#define __TBB_USE_FENCED_ATOMICS 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +// Definition of Lock functions +#define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) +#define __TBB_LockByte(P) __TBB_machine_lockbyte(P) + +// Definition of other utility functions +#define __TBB_Pause(V) __TBB_machine_pause(V) +#define __TBB_Log2(V) __TBB_machine_lg(V) diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_intel64.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_intel64.h new file mode 100644 index 0000000000..c1675e3eea --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/linux_intel64.h @@ -0,0 +1,103 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_linux_intel64_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_linux_intel64_H + +#include +#include "gcc_ia32_common.h" + +#define __TBB_WORDSIZE 8 +#define __TBB_BIG_ENDIAN 0 + +#define __TBB_compiler_fence() __asm__ __volatile__("": : :"memory") +#define __TBB_control_consistency_helper() __TBB_compiler_fence() +#define __TBB_acquire_consistency_helper() __TBB_compiler_fence() +#define __TBB_release_consistency_helper() __TBB_compiler_fence() + +#ifndef __TBB_full_memory_fence +#define __TBB_full_memory_fence() __asm__ __volatile__("mfence": : :"memory") +#endif + +#define __TBB_MACHINE_DEFINE_ATOMICS(S,T,X) \ +static inline T __TBB_machine_cmpswp##S (volatile void *ptr, T value, T comparand ) \ +{ \ + T result; \ + \ + __asm__ __volatile__("lock\ncmpxchg" X " %2,%1" \ + : "=a"(result), "=m"(*(volatile T*)ptr) \ + : "q"(value), "0"(comparand), "m"(*(volatile T*)ptr) \ + : "memory"); \ + return result; \ +} \ + \ +static inline T __TBB_machine_fetchadd##S(volatile void *ptr, T addend) \ +{ \ + T result; \ + __asm__ __volatile__("lock\nxadd" X " %0,%1" \ + : "=r"(result),"=m"(*(volatile T*)ptr) \ + : "0"(addend), "m"(*(volatile T*)ptr) \ + : "memory"); \ + return result; \ +} \ + \ +static inline T __TBB_machine_fetchstore##S(volatile void *ptr, T value) \ +{ \ + T result; \ + __asm__ __volatile__("lock\nxchg" X " %0,%1" \ + : "=r"(result),"=m"(*(volatile T*)ptr) \ + : "0"(value), "m"(*(volatile T*)ptr) \ + : "memory"); \ + return result; \ +} \ + +__TBB_MACHINE_DEFINE_ATOMICS(1,int8_t,"") +__TBB_MACHINE_DEFINE_ATOMICS(2,int16_t,"") +__TBB_MACHINE_DEFINE_ATOMICS(4,int32_t,"") +__TBB_MACHINE_DEFINE_ATOMICS(8,int64_t,"q") + +#undef __TBB_MACHINE_DEFINE_ATOMICS + +static inline void __TBB_machine_or( volatile void *ptr, uint64_t value ) { + __asm__ __volatile__("lock\norq %1,%0" : "=m"(*(volatile uint64_t*)ptr) : "r"(value), "m"(*(volatile uint64_t*)ptr) : "memory"); +} + +static inline void __TBB_machine_and( volatile void *ptr, uint64_t value ) { + __asm__ __volatile__("lock\nandq %1,%0" : "=m"(*(volatile uint64_t*)ptr) : "r"(value), "m"(*(volatile uint64_t*)ptr) : "memory"); +} + +#define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) + +#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mac_ppc.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mac_ppc.h new file mode 100644 index 0000000000..e2d4d39c18 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mac_ppc.h @@ -0,0 +1,318 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_gcc_power_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_gcc_power_H + +#include +#include + +// TODO: rename to gcc_power.h? +// This file is for Power Architecture with compilers supporting GNU inline-assembler syntax (currently GNU g++ and IBM XL). +// Note that XL V9.0 (sometimes?) has trouble dealing with empty input and/or clobber lists, so they should be avoided. + +#if __powerpc64__ || __ppc64__ + // IBM XL documents __powerpc64__ (and __PPC64__). + // Apple documents __ppc64__ (with __ppc__ only on 32-bit). + #define __TBB_WORDSIZE 8 +#else + #define __TBB_WORDSIZE 4 +#endif + +#ifndef __BYTE_ORDER__ + // Hopefully endianness can be validly determined at runtime. + // This may silently fail in some embedded systems with page-specific endianness. +#elif __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ + #define __TBB_BIG_ENDIAN 1 +#elif __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__ + #define __TBB_BIG_ENDIAN 0 +#else + #define __TBB_BIG_ENDIAN -1 // not currently supported +#endif + +// On Power Architecture, (lock-free) 64-bit atomics require 64-bit hardware: +#if __TBB_WORDSIZE==8 + // Do not change the following definition, because TBB itself will use 64-bit atomics in 64-bit builds. + #define __TBB_64BIT_ATOMICS 1 +#elif __bgp__ + // Do not change the following definition, because this is known 32-bit hardware. + #define __TBB_64BIT_ATOMICS 0 +#else + // To enable 64-bit atomics in 32-bit builds, set the value below to 1 instead of 0. + // You must make certain that the program will only use them on actual 64-bit hardware + // (which typically means that the entire program is only executed on such hardware), + // because their implementation involves machine instructions that are illegal elsewhere. + // The setting can be chosen independently per compilation unit, + // which also means that TBB itself does not need to be rebuilt. + // Alternatively (but only for the current architecture and TBB version), + // override the default as a predefined macro when invoking the compiler. + #ifndef __TBB_64BIT_ATOMICS + #define __TBB_64BIT_ATOMICS 0 + #endif +#endif + +inline int32_t __TBB_machine_cmpswp4 (volatile void *ptr, int32_t value, int32_t comparand ) +{ + int32_t result; + + __asm__ __volatile__("sync\n" + "0:\n\t" + "lwarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ + "cmpw %[res],%[cmp]\n\t" /* compare against comparand */ + "bne- 1f\n\t" /* exit if not same */ + "stwcx. %[val],0,%[ptr]\n\t" /* store new value */ + "bne- 0b\n" /* retry if reservation lost */ + "1:\n\t" /* the exit */ + "isync" + : [res]"=&r"(result) + , "+m"(* (int32_t*) ptr) /* redundant with "memory" */ + : [ptr]"r"(ptr) + , [val]"r"(value) + , [cmp]"r"(comparand) + : "memory" /* compiler full fence */ + , "cr0" /* clobbered by cmp and/or stwcx. */ + ); + return result; +} + +#if __TBB_WORDSIZE==8 + +inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) +{ + int64_t result; + __asm__ __volatile__("sync\n" + "0:\n\t" + "ldarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ + "cmpd %[res],%[cmp]\n\t" /* compare against comparand */ + "bne- 1f\n\t" /* exit if not same */ + "stdcx. %[val],0,%[ptr]\n\t" /* store new value */ + "bne- 0b\n" /* retry if reservation lost */ + "1:\n\t" /* the exit */ + "isync" + : [res]"=&r"(result) + , "+m"(* (int64_t*) ptr) /* redundant with "memory" */ + : [ptr]"r"(ptr) + , [val]"r"(value) + , [cmp]"r"(comparand) + : "memory" /* compiler full fence */ + , "cr0" /* clobbered by cmp and/or stdcx. */ + ); + return result; +} + +#elif __TBB_64BIT_ATOMICS /* && __TBB_WORDSIZE==4 */ + +inline int64_t __TBB_machine_cmpswp8 (volatile void *ptr, int64_t value, int64_t comparand ) +{ + int64_t result; + int64_t value_register, comparand_register, result_register; // dummy variables to allocate registers + __asm__ __volatile__("sync\n\t" + "ld %[val],%[valm]\n\t" + "ld %[cmp],%[cmpm]\n" + "0:\n\t" + "ldarx %[res],0,%[ptr]\n\t" /* load w/ reservation */ + "cmpd %[res],%[cmp]\n\t" /* compare against comparand */ + "bne- 1f\n\t" /* exit if not same */ + "stdcx. %[val],0,%[ptr]\n\t" /* store new value */ + "bne- 0b\n" /* retry if reservation lost */ + "1:\n\t" /* the exit */ + "std %[res],%[resm]\n\t" + "isync" + : [resm]"=m"(result) + , [res] "=&r"( result_register) + , [val] "=&r"( value_register) + , [cmp] "=&r"(comparand_register) + , "+m"(* (int64_t*) ptr) /* redundant with "memory" */ + : [ptr] "r"(ptr) + , [valm]"m"(value) + , [cmpm]"m"(comparand) + : "memory" /* compiler full fence */ + , "cr0" /* clobbered by cmpd and/or stdcx. */ + ); + return result; +} + +#endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ + +#define __TBB_MACHINE_DEFINE_LOAD_STORE(S,ldx,stx,cmpx) \ + template \ + struct machine_load_store { \ + static inline T load_with_acquire(const volatile T& location) { \ + T result; \ + __asm__ __volatile__(ldx " %[res],0(%[ptr])\n" \ + "0:\n\t" \ + cmpx " %[res],%[res]\n\t" \ + "bne- 0b\n\t" \ + "isync" \ + : [res]"=r"(result) \ + : [ptr]"b"(&location) /* cannot use register 0 here */ \ + , "m"(location) /* redundant with "memory" */ \ + : "memory" /* compiler acquire fence */ \ + , "cr0" /* clobbered by cmpw/cmpd */); \ + return result; \ + } \ + static inline void store_with_release(volatile T &location, T value) { \ + __asm__ __volatile__("lwsync\n\t" \ + stx " %[val],0(%[ptr])" \ + : "=m"(location) /* redundant with "memory" */ \ + : [ptr]"b"(&location) /* cannot use register 0 here */ \ + , [val]"r"(value) \ + : "memory"/*compiler release fence*/ /*(cr0 not affected)*/); \ + } \ + }; \ + \ + template \ + struct machine_load_store_relaxed { \ + static inline T load (const __TBB_atomic T& location) { \ + T result; \ + __asm__ __volatile__(ldx " %[res],0(%[ptr])" \ + : [res]"=r"(result) \ + : [ptr]"b"(&location) /* cannot use register 0 here */ \ + , "m"(location) \ + ); /*(no compiler fence)*/ /*(cr0 not affected)*/ \ + return result; \ + } \ + static inline void store (__TBB_atomic T &location, T value) { \ + __asm__ __volatile__(stx " %[val],0(%[ptr])" \ + : "=m"(location) \ + : [ptr]"b"(&location) /* cannot use register 0 here */ \ + , [val]"r"(value) \ + ); /*(no compiler fence)*/ /*(cr0 not affected)*/ \ + } \ + }; + +namespace tbb { +namespace internal { + __TBB_MACHINE_DEFINE_LOAD_STORE(1,"lbz","stb","cmpw") + __TBB_MACHINE_DEFINE_LOAD_STORE(2,"lhz","sth","cmpw") + __TBB_MACHINE_DEFINE_LOAD_STORE(4,"lwz","stw","cmpw") + +#if __TBB_WORDSIZE==8 + + __TBB_MACHINE_DEFINE_LOAD_STORE(8,"ld" ,"std","cmpd") + +#elif __TBB_64BIT_ATOMICS /* && __TBB_WORDSIZE==4 */ + + template + struct machine_load_store { + static inline T load_with_acquire(const volatile T& location) { + T result; + T result_register; // dummy variable to allocate a register + __asm__ __volatile__("ld %[res],0(%[ptr])\n\t" + "std %[res],%[resm]\n" + "0:\n\t" + "cmpd %[res],%[res]\n\t" + "bne- 0b\n\t" + "isync" + : [resm]"=m"(result) + , [res]"=&r"(result_register) + : [ptr]"b"(&location) /* cannot use register 0 here */ + , "m"(location) /* redundant with "memory" */ + : "memory" /* compiler acquire fence */ + , "cr0" /* clobbered by cmpd */); + return result; + } + + static inline void store_with_release(volatile T &location, T value) { + T value_register; // dummy variable to allocate a register + __asm__ __volatile__("lwsync\n\t" + "ld %[val],%[valm]\n\t" + "std %[val],0(%[ptr])" + : "=m"(location) /* redundant with "memory" */ + , [val]"=&r"(value_register) + : [ptr]"b"(&location) /* cannot use register 0 here */ + , [valm]"m"(value) + : "memory"/*compiler release fence*/ /*(cr0 not affected)*/); + } + }; + + struct machine_load_store_relaxed { + static inline T load (const volatile T& location) { + T result; + T result_register; // dummy variable to allocate a register + __asm__ __volatile__("ld %[res],0(%[ptr])\n\t" + "std %[res],%[resm]" + : [resm]"=m"(result) + , [res]"=&r"(result_register) + : [ptr]"b"(&location) /* cannot use register 0 here */ + , "m"(location) + ); /*(no compiler fence)*/ /*(cr0 not affected)*/ + return result; + } + + static inline void store (volatile T &location, T value) { + T value_register; // dummy variable to allocate a register + __asm__ __volatile__("ld %[val],%[valm]\n\t" + "std %[val],0(%[ptr])" + : "=m"(location) + , [val]"=&r"(value_register) + : [ptr]"b"(&location) /* cannot use register 0 here */ + , [valm]"m"(value) + ); /*(no compiler fence)*/ /*(cr0 not affected)*/ + } + }; + #define __TBB_machine_load_store_relaxed_8 + +#endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ + +}} // namespaces internal, tbb + +#undef __TBB_MACHINE_DEFINE_LOAD_STORE + +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_FETCH_ADD 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#define __TBB_control_consistency_helper() __asm__ __volatile__("isync": : :"memory") +#define __TBB_full_memory_fence() __asm__ __volatile__( "sync": : :"memory") + +static inline intptr_t __TBB_machine_lg( uintptr_t x ) { + __TBB_ASSERT(x, "__TBB_Log2(0) undefined"); + // cntlzd/cntlzw starts counting at 2^63/2^31 (ignoring any higher-order bits), and does not affect cr0 +#if __TBB_WORDSIZE==8 + __asm__ __volatile__ ("cntlzd %0,%0" : "+r"(x)); + return 63-static_cast(x); +#else + __asm__ __volatile__ ("cntlzw %0,%0" : "+r"(x)); + return 31-static_cast(x); +#endif +} +#define __TBB_Log2(V) __TBB_machine_lg(V) + +// Assumes implicit alignment for any 32-bit value +typedef uint32_t __TBB_Flag; +#define __TBB_Flag __TBB_Flag + +inline bool __TBB_machine_trylockbyte( __TBB_atomic __TBB_Flag &flag ) { + return __TBB_machine_cmpswp4(&flag,1,0)==0; +} +#define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/macos_common.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/macos_common.h new file mode 100644 index 0000000000..591adc6cff --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/macos_common.h @@ -0,0 +1,141 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_macos_common_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_macos_common_H + +#include +#define __TBB_Yield() sched_yield() + +// __TBB_HardwareConcurrency + +#include +#include + +static inline int __TBB_macos_available_cpu() { + int name[2] = {CTL_HW, HW_AVAILCPU}; + int ncpu; + size_t size = sizeof(ncpu); + sysctl( name, 2, &ncpu, &size, NULL, 0 ); + return ncpu; +} + +#define __TBB_HardwareConcurrency() __TBB_macos_available_cpu() + +#ifndef __TBB_full_memory_fence + // TBB has not recognized the architecture (none of the architecture abstraction + // headers was included). + #define __TBB_UnknownArchitecture 1 +#endif + +#if __TBB_UnknownArchitecture +// Implementation of atomic operations based on OS provided primitives +#include + +static inline int64_t __TBB_machine_cmpswp8_OsX(volatile void *ptr, int64_t value, int64_t comparand) +{ + __TBB_ASSERT( tbb::internal::is_aligned(ptr,8), "address not properly aligned for Mac OS atomics"); + int64_t* address = (int64_t*)ptr; + while( !OSAtomicCompareAndSwap64Barrier(comparand, value, address) ){ +#if __TBB_WORDSIZE==8 + int64_t snapshot = *address; +#else + int64_t snapshot = OSAtomicAdd64( 0, address ); +#endif + if( snapshot!=comparand ) return snapshot; + } + return comparand; +} + +#define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8_OsX + +#endif /* __TBB_UnknownArchitecture */ + +#if __TBB_UnknownArchitecture + +#ifndef __TBB_WORDSIZE +#define __TBB_WORDSIZE 4 +#endif + +#ifdef __TBB_BIG_ENDIAN + // Already determined based on hardware architecture. +#elif __BIG_ENDIAN__ + #define __TBB_BIG_ENDIAN 1 +#elif __LITTLE_ENDIAN__ + #define __TBB_BIG_ENDIAN 0 +#else + #define __TBB_BIG_ENDIAN -1 // not currently supported +#endif + +/** As this generic implementation has absolutely no information about underlying + hardware, its performance most likely will be sub-optimal because of full memory + fence usages where a more lightweight synchronization means (or none at all) + could suffice. Thus if you use this header to enable TBB on a new platform, + consider forking it and relaxing below helpers as appropriate. **/ +#define __TBB_control_consistency_helper() OSMemoryBarrier() +#define __TBB_acquire_consistency_helper() OSMemoryBarrier() +#define __TBB_release_consistency_helper() OSMemoryBarrier() +#define __TBB_full_memory_fence() OSMemoryBarrier() + +static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand) +{ + __TBB_ASSERT( tbb::internal::is_aligned(ptr,4), "address not properly aligned for Mac OS atomics"); + int32_t* address = (int32_t*)ptr; + while( !OSAtomicCompareAndSwap32Barrier(comparand, value, address) ){ + int32_t snapshot = *address; + if( snapshot!=comparand ) return snapshot; + } + return comparand; +} + +static inline int32_t __TBB_machine_fetchadd4(volatile void *ptr, int32_t addend) +{ + __TBB_ASSERT( tbb::internal::is_aligned(ptr,4), "address not properly aligned for Mac OS atomics"); + return OSAtomicAdd32Barrier(addend, (int32_t*)ptr) - addend; +} + +static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend) +{ + __TBB_ASSERT( tbb::internal::is_aligned(ptr,8), "address not properly aligned for Mac OS atomics"); + return OSAtomicAdd64Barrier(addend, (int64_t*)ptr) - addend; +} + +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#if __TBB_WORDSIZE == 4 + #define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 +#endif +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#endif /* __TBB_UnknownArchitecture */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mic_common.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mic_common.h new file mode 100644 index 0000000000..ffc252edf7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/mic_common.h @@ -0,0 +1,68 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_mic_common_H +#define __TBB_mic_common_H + +#ifndef __TBB_machine_H +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#if ! __TBB_DEFINE_MIC + #error mic_common.h should be included only when building for Intel(R) Many Integrated Core Architecture +#endif + +#ifndef __TBB_PREFETCHING +#define __TBB_PREFETCHING 1 +#endif +#if __TBB_PREFETCHING +#include +#define __TBB_cl_prefetch(p) _mm_prefetch((const char*)p, _MM_HINT_T1) +#define __TBB_cl_evict(p) _mm_clevict(p, _MM_HINT_T1) +#endif + +/** Early Intel(R) MIC Architecture does not support mfence and pause instructions **/ +#define __TBB_full_memory_fence __TBB_release_consistency_helper +#define __TBB_Pause(x) _mm_delay_32(16*(x)) +#define __TBB_STEALING_PAUSE 1500/16 +#include +#define __TBB_Yield() sched_yield() + +/** FPU control setting **/ +#define __TBB_CPU_CTL_ENV_PRESENT 0 + +/** Specifics **/ +#define __TBB_STEALING_ABORT_ON_CONTENTION 1 +#define __TBB_YIELD2P 1 +#define __TBB_HOARD_NONLOCAL_TASKS 1 + +#if ! ( __FreeBSD__ || __linux__ ) + #error Intel(R) Many Integrated Core Compiler does not define __FreeBSD__ or __linux__ anymore. Check for the __TBB_XXX_BROKEN defined under __FreeBSD__ or __linux__. +#endif /* ! ( __FreeBSD__ || __linux__ ) */ + +#endif /* __TBB_mic_common_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_armv7.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_armv7.h new file mode 100644 index 0000000000..19d0234585 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_armv7.h @@ -0,0 +1,151 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_msvc_armv7_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_msvc_armv7_H + +#include +#include + +#define __TBB_WORDSIZE 4 + +#define __TBB_BIG_ENDIAN -1 // not currently supported + +#define __TBB_compiler_fence() __dmb(_ARM_BARRIER_SY) +#define __TBB_control_consistency_helper() __TBB_compiler_fence() + +#define __TBB_armv7_inner_shareable_barrier() __dmb(_ARM_BARRIER_ISH) +#define __TBB_acquire_consistency_helper() __TBB_armv7_inner_shareable_barrier() +#define __TBB_release_consistency_helper() __TBB_armv7_inner_shareable_barrier() +#define __TBB_full_memory_fence() __TBB_armv7_inner_shareable_barrier() + +//-------------------------------------------------- +// Compare and swap +//-------------------------------------------------- + +/** + * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr + * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand + * @param value value to assign *ptr to if *ptr==comparand + * @param comparand value to compare with *ptr + * @return value originally in memory at ptr, regardless of success +*/ + +#define __TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(S,T,F) \ +inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \ + return _InterlockedCompareExchange##F(reinterpret_cast(ptr),comparand,value); \ +} \ + +#define __TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(S,T,F) \ +inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \ + return _InterlockedAdd##F(reinterpret_cast(ptr),value); \ +} \ + +__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(1,char,8) +__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(2,short,16) +__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(4,long,) +__TBB_MACHINE_DEFINE_ATOMICS_CMPSWP(8,__int64,64) +__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(4,long,) +__TBB_MACHINE_DEFINE_ATOMICS_FETCHADD(8,__int64,64) + + +inline void __TBB_machine_pause (int32_t delay ) +{ + while(delay>0) + { + __TBB_compiler_fence(); + delay--; + } +} + +namespace tbb { +namespace internal { + template + struct machine_load_store_relaxed { + static inline T load ( const volatile T& location ) { + const T value = location; + + /* + * An extra memory barrier is required for errata #761319 + * Please see http://infocenter.arm.com/help/topic/com.arm.doc.uan0004a + */ + __TBB_armv7_inner_shareable_barrier(); + return value; + } + + static inline void store ( volatile T& location, T value ) { + location = value; + } + }; +}} // namespaces internal, tbb + +// Machine specific atomic operations + +#define __TBB_CompareAndSwap4(P,V,C) __TBB_machine_cmpswp4(P,V,C) +#define __TBB_CompareAndSwap8(P,V,C) __TBB_machine_cmpswp8(P,V,C) +#define __TBB_Pause(V) __TBB_machine_pause(V) + +// Use generics for some things +#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 +#define __TBB_USE_GENERIC_PART_WORD_FETCH_STORE 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#define __TBB_Yield() __yield() + +// API to retrieve/update FPU control setting not implemented +#define __TBB_CPU_CTL_ENV_PRESENT 1 + +typedef unsigned int __TBB_cpu_ctl_env_t; + +inline void __TBB_get_cpu_ctl_env ( __TBB_cpu_ctl_env_t* ctl ) { + *ctl = _control87(0, 0); +} +inline void __TBB_set_cpu_ctl_env ( const __TBB_cpu_ctl_env_t* ctl ) { + _control87( *ctl, ~0U ); +} + +// Machine specific atomic operations +#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) + +template +inline void __TBB_machine_OR( T1 *operand, T2 addend ) { + _InterlockedOr((long volatile *)operand, (long)addend); +} + +template +inline void __TBB_machine_AND( T1 *operand, T2 addend ) { + _InterlockedAnd((long volatile *)operand, (long)addend); +} + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_ia32_common.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_ia32_common.h new file mode 100644 index 0000000000..b2e6cb5537 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/msvc_ia32_common.h @@ -0,0 +1,184 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_machine_msvc_ia32_common_H +#define __TBB_machine_msvc_ia32_common_H + +#include + +//TODO: consider moving this macro to tbb_config.h and used there MSVC asm is used +#if !_M_X64 || __INTEL_COMPILER + #define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE 1 + + #if _M_X64 + #define __TBB_r(reg_name) r##reg_name + #else + #define __TBB_r(reg_name) e##reg_name + #endif +#else + //MSVC in x64 mode does not accept inline assembler + #define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE 0 +#endif + + +#define __TBB_NO_X86_MSVC_INLINE_ASM_MSG "The compiler being used is not supported (outdated?)" + +#if (_MSC_VER >= 1300) || (__INTEL_COMPILER) //Use compiler intrinsic when available + #define __TBB_PAUSE_USE_INTRINSIC 1 + #pragma intrinsic(_mm_pause) + namespace tbb { namespace internal { namespace intrinsics { namespace msvc { + static inline void __TBB_machine_pause (uintptr_t delay ) { + for (;delay>0; --delay ) + _mm_pause(); + } + }}}} +#else + #if !__TBB_X86_MSVC_INLINE_ASM_AVAILABLE + #error __TBB_NO_X86_MSVC_INLINE_ASM_MSG + #endif + + namespace tbb { namespace internal { namespace inline_asm { namespace msvc { + static inline void __TBB_machine_pause (uintptr_t delay ) { + _asm + { + mov __TBB_r(ax), delay + __TBB_L1: + pause + add __TBB_r(ax), -1 + jne __TBB_L1 + } + return; + } + }}}} +#endif + +static inline void __TBB_machine_pause (uintptr_t delay ){ + #if __TBB_PAUSE_USE_INTRINSIC + tbb::internal::intrinsics::msvc::__TBB_machine_pause(delay); + #else + tbb::internal::inline_asm::msvc::__TBB_machine_pause(delay); + #endif +} + +//TODO: move this function to windows_api.h or to place where it is used +#if (_MSC_VER<1400) && (!_WIN64) && (__TBB_X86_MSVC_INLINE_ASM_AVAILABLE) + static inline void* __TBB_machine_get_current_teb () { + void* pteb; + __asm mov eax, fs:[0x18] + __asm mov pteb, eax + return pteb; + } +#endif + +#if ( _MSC_VER>=1400 && !defined(__INTEL_COMPILER) ) || (__INTEL_COMPILER>=1200) +// MSVC did not have this intrinsic prior to VC8. +// ICL 11.1 fails to compile a TBB example if __TBB_Log2 uses the intrinsic. + #define __TBB_LOG2_USE_BSR_INTRINSIC 1 + #if _M_X64 + #define __TBB_BSR_INTRINSIC _BitScanReverse64 + #else + #define __TBB_BSR_INTRINSIC _BitScanReverse + #endif + #pragma intrinsic(__TBB_BSR_INTRINSIC) + + namespace tbb { namespace internal { namespace intrinsics { namespace msvc { + inline uintptr_t __TBB_machine_lg( uintptr_t i ){ + unsigned long j; + __TBB_BSR_INTRINSIC( &j, i ); + return j; + } + }}}} +#else + #if !__TBB_X86_MSVC_INLINE_ASM_AVAILABLE + #error __TBB_NO_X86_MSVC_INLINE_ASM_MSG + #endif + + namespace tbb { namespace internal { namespace inline_asm { namespace msvc { + inline uintptr_t __TBB_machine_lg( uintptr_t i ){ + uintptr_t j; + __asm + { + bsr __TBB_r(ax), i + mov j, __TBB_r(ax) + } + return j; + } + }}}} +#endif + +static inline intptr_t __TBB_machine_lg( uintptr_t i ) { +#if __TBB_LOG2_USE_BSR_INTRINSIC + return tbb::internal::intrinsics::msvc::__TBB_machine_lg(i); +#else + return tbb::internal::inline_asm::msvc::__TBB_machine_lg(i); +#endif +} + +// API to retrieve/update FPU control setting +#define __TBB_CPU_CTL_ENV_PRESENT 1 +struct __TBB_cpu_ctl_env_t { + int mxcsr; + short x87cw; +}; +#if __TBB_X86_MSVC_INLINE_ASM_AVAILABLE + inline void __TBB_get_cpu_ctl_env ( __TBB_cpu_ctl_env_t* ctl ) { + __asm { + __asm mov __TBB_r(ax), ctl + __asm stmxcsr [__TBB_r(ax)] + __asm fstcw [__TBB_r(ax)+4] + } + } + inline void __TBB_set_cpu_ctl_env ( const __TBB_cpu_ctl_env_t* ctl ) { + __asm { + __asm mov __TBB_r(ax), ctl + __asm ldmxcsr [__TBB_r(ax)] + __asm fldcw [__TBB_r(ax)+4] + } + } +#else + extern "C" { + void __TBB_EXPORTED_FUNC __TBB_get_cpu_ctl_env ( __TBB_cpu_ctl_env_t* ); + void __TBB_EXPORTED_FUNC __TBB_set_cpu_ctl_env ( const __TBB_cpu_ctl_env_t* ); + } +#endif + + +#if !__TBB_WIN8UI_SUPPORT +extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); +#define __TBB_Yield() SwitchToThread() +#else +#include +#define __TBB_Yield() std::this_thread::yield() +#endif + +#define __TBB_Pause(V) __TBB_machine_pause(V) +#define __TBB_Log2(V) __TBB_machine_lg(V) + +#undef __TBB_r + +#endif /* __TBB_machine_msvc_ia32_common_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/sunos_sparc.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/sunos_sparc.h new file mode 100644 index 0000000000..c45f48fab5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/sunos_sparc.h @@ -0,0 +1,209 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_sunos_sparc_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_sunos_sparc_H + +#include +#include + +#define __TBB_WORDSIZE 8 +#define __TBB_BIG_ENDIAN 1 // assumption (hardware may support page-specific bi-endianness) + +/** To those working on SPARC hardware. Consider relaxing acquire and release + consistency helpers to no-op (as this port covers TSO mode only). **/ +#define __TBB_compiler_fence() __asm__ __volatile__ ("": : :"memory") +#define __TBB_control_consistency_helper() __TBB_compiler_fence() +#define __TBB_acquire_consistency_helper() __TBB_compiler_fence() +#define __TBB_release_consistency_helper() __TBB_compiler_fence() +#define __TBB_full_memory_fence() __asm__ __volatile__("membar #LoadLoad|#LoadStore|#StoreStore|#StoreLoad": : : "memory") + +//-------------------------------------------------- +// Compare and swap +//-------------------------------------------------- + +/** + * Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr + * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand + * @param value value to assign *ptr to if *ptr==comparand + * @param comparand value to compare with *ptr + ( @return value originally in memory at ptr, regardless of success +*/ +static inline int32_t __TBB_machine_cmpswp4(volatile void *ptr, int32_t value, int32_t comparand ){ + int32_t result; + __asm__ __volatile__( + "cas\t[%5],%4,%1" + : "=m"(*(int32_t *)ptr), "=r"(result) + : "m"(*(int32_t *)ptr), "1"(value), "r"(comparand), "r"(ptr) + : "memory"); + return result; +} + +/** + * Atomic CAS for 64 bit values, if *ptr==comparand, then *ptr=value, returns *ptr + * @param ptr pointer to value in memory to be swapped with value if *ptr==comparand + * @param value value to assign *ptr to if *ptr==comparand + * @param comparand value to compare with *ptr + ( @return value originally in memory at ptr, regardless of success + */ +static inline int64_t __TBB_machine_cmpswp8(volatile void *ptr, int64_t value, int64_t comparand ){ + int64_t result; + __asm__ __volatile__( + "casx\t[%5],%4,%1" + : "=m"(*(int64_t *)ptr), "=r"(result) + : "m"(*(int64_t *)ptr), "1"(value), "r"(comparand), "r"(ptr) + : "memory"); + return result; +} + +//--------------------------------------------------- +// Fetch and add +//--------------------------------------------------- + +/** + * Atomic fetch and add for 32 bit values, in this case implemented by continuously checking success of atomicity + * @param ptr pointer to value to add addend to + * @param addened value to add to *ptr + * @return value at ptr before addened was added + */ +static inline int32_t __TBB_machine_fetchadd4(volatile void *ptr, int32_t addend){ + int32_t result; + __asm__ __volatile__ ( + "0:\t add\t %3, %4, %0\n" // do addition + "\t cas\t [%2], %3, %0\n" // cas to store result in memory + "\t cmp\t %3, %0\n" // check if value from memory is original + "\t bne,a,pn\t %%icc, 0b\n" // if not try again + "\t mov %0, %3\n" // use branch delay slot to move new value in memory to be added + : "=&r"(result), "=m"(*(int32_t *)ptr) + : "r"(ptr), "r"(*(int32_t *)ptr), "r"(addend), "m"(*(int32_t *)ptr) + : "ccr", "memory"); + return result; +} + +/** + * Atomic fetch and add for 64 bit values, in this case implemented by continuously checking success of atomicity + * @param ptr pointer to value to add addend to + * @param addened value to add to *ptr + * @return value at ptr before addened was added + */ +static inline int64_t __TBB_machine_fetchadd8(volatile void *ptr, int64_t addend){ + int64_t result; + __asm__ __volatile__ ( + "0:\t add\t %3, %4, %0\n" // do addition + "\t casx\t [%2], %3, %0\n" // cas to store result in memory + "\t cmp\t %3, %0\n" // check if value from memory is original + "\t bne,a,pn\t %%xcc, 0b\n" // if not try again + "\t mov %0, %3\n" // use branch delay slot to move new value in memory to be added + : "=&r"(result), "=m"(*(int64_t *)ptr) + : "r"(ptr), "r"(*(int64_t *)ptr), "r"(addend), "m"(*(int64_t *)ptr) + : "ccr", "memory"); + return result; +} + +//-------------------------------------------------------- +// Logarithm (base two, integer) +//-------------------------------------------------------- + +static inline int64_t __TBB_machine_lg( uint64_t x ) { + __TBB_ASSERT(x, "__TBB_Log2(0) undefined"); + uint64_t count; + // one hot encode + x |= (x >> 1); + x |= (x >> 2); + x |= (x >> 4); + x |= (x >> 8); + x |= (x >> 16); + x |= (x >> 32); + // count 1's + __asm__ ("popc %1, %0" : "=r"(count) : "r"(x) ); + return count-1; +} + +//-------------------------------------------------------- + +static inline void __TBB_machine_or( volatile void *ptr, uint64_t value ) { + __asm__ __volatile__ ( + "0:\t or\t %2, %3, %%g1\n" // do operation + "\t casx\t [%1], %2, %%g1\n" // cas to store result in memory + "\t cmp\t %2, %%g1\n" // check if value from memory is original + "\t bne,a,pn\t %%xcc, 0b\n" // if not try again + "\t mov %%g1, %2\n" // use branch delay slot to move new value in memory to be added + : "=m"(*(int64_t *)ptr) + : "r"(ptr), "r"(*(int64_t *)ptr), "r"(value), "m"(*(int64_t *)ptr) + : "ccr", "g1", "memory"); +} + +static inline void __TBB_machine_and( volatile void *ptr, uint64_t value ) { + __asm__ __volatile__ ( + "0:\t and\t %2, %3, %%g1\n" // do operation + "\t casx\t [%1], %2, %%g1\n" // cas to store result in memory + "\t cmp\t %2, %%g1\n" // check if value from memory is original + "\t bne,a,pn\t %%xcc, 0b\n" // if not try again + "\t mov %%g1, %2\n" // use branch delay slot to move new value in memory to be added + : "=m"(*(int64_t *)ptr) + : "r"(ptr), "r"(*(int64_t *)ptr), "r"(value), "m"(*(int64_t *)ptr) + : "ccr", "g1", "memory"); +} + + +static inline void __TBB_machine_pause( int32_t delay ) { + // do nothing, inlined, doesn't matter +} + +// put 0xff in memory location, return memory value, +// generic trylockbyte puts 0x01, however this is fine +// because all that matters is that 0 is unlocked +static inline bool __TBB_machine_trylockbyte(unsigned char &flag){ + unsigned char result; + __asm__ __volatile__ ( + "ldstub\t [%2], %0\n" + : "=r"(result), "=m"(flag) + : "r"(&flag), "m"(flag) + : "memory"); + return result == 0; +} + +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#define __TBB_AtomicOR(P,V) __TBB_machine_or(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_and(P,V) + +// Definition of other functions +#define __TBB_Pause(V) __TBB_machine_pause(V) +#define __TBB_Log2(V) __TBB_machine_lg(V) + +#define __TBB_TryLockByte(P) __TBB_machine_trylockbyte(P) diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_api.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_api.h new file mode 100644 index 0000000000..2b5d33b4da --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_api.h @@ -0,0 +1,87 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_machine_windows_api_H +#define __TBB_machine_windows_api_H + +#if _WIN32 || _WIN64 + +#if _XBOX + +#define NONET +#define NOD3D +#include + +#else // Assume "usual" Windows + +#include + +#endif // _XBOX + +#if _WIN32_WINNT < 0x0600 +// The following Windows API function is declared explicitly; +// otherwise it fails to compile by VS2005. +#if !defined(WINBASEAPI) || (_WIN32_WINNT < 0x0501 && _MSC_VER == 1400) +#define __TBB_WINBASEAPI extern "C" +#else +#define __TBB_WINBASEAPI WINBASEAPI +#endif +__TBB_WINBASEAPI BOOL WINAPI TryEnterCriticalSection( LPCRITICAL_SECTION ); +__TBB_WINBASEAPI BOOL WINAPI InitializeCriticalSectionAndSpinCount( LPCRITICAL_SECTION, DWORD ); +// Overloading WINBASEAPI macro and using local functions missing in Windows XP/2003 +#define InitializeCriticalSectionEx inlineInitializeCriticalSectionEx +#define CreateSemaphoreEx inlineCreateSemaphoreEx +#define CreateEventEx inlineCreateEventEx +inline BOOL WINAPI inlineInitializeCriticalSectionEx( LPCRITICAL_SECTION lpCriticalSection, DWORD dwSpinCount, DWORD ) +{ + return InitializeCriticalSectionAndSpinCount( lpCriticalSection, dwSpinCount ); +} +inline HANDLE WINAPI inlineCreateSemaphoreEx( LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lInitialCount, LONG lMaximumCount, LPCTSTR lpName, DWORD, DWORD ) +{ + return CreateSemaphore( lpSemaphoreAttributes, lInitialCount, lMaximumCount, lpName ); +} +inline HANDLE WINAPI inlineCreateEventEx( LPSECURITY_ATTRIBUTES lpEventAttributes, LPCTSTR lpName, DWORD dwFlags, DWORD ) +{ + BOOL manual_reset = dwFlags&0x00000001 ? TRUE : FALSE; // CREATE_EVENT_MANUAL_RESET + BOOL initial_set = dwFlags&0x00000002 ? TRUE : FALSE; // CREATE_EVENT_INITIAL_SET + return CreateEvent( lpEventAttributes, manual_reset, initial_set, lpName ); +} +#endif + +#if defined(RTL_SRWLOCK_INIT) +#ifndef __TBB_USE_SRWLOCK +// TODO: turn it on when bug 1952 will be fixed +#define __TBB_USE_SRWLOCK 0 +#endif +#endif + +#else +#error tbb/machine/windows_api.h should only be used for Windows based platforms +#endif // _WIN32 || _WIN64 + +#endif // __TBB_machine_windows_api_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_ia32.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_ia32.h new file mode 100644 index 0000000000..d633765067 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_ia32.h @@ -0,0 +1,152 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_ia32_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_windows_ia32_H + +#include "msvc_ia32_common.h" + +#define __TBB_WORDSIZE 4 +#define __TBB_BIG_ENDIAN 0 + +#if __INTEL_COMPILER && (__INTEL_COMPILER < 1100) + #define __TBB_compiler_fence() __asm { __asm nop } + #define __TBB_full_memory_fence() __asm { __asm mfence } +#elif _MSC_VER >= 1300 || __INTEL_COMPILER + #pragma intrinsic(_ReadWriteBarrier) + #pragma intrinsic(_mm_mfence) + #define __TBB_compiler_fence() _ReadWriteBarrier() + #define __TBB_full_memory_fence() _mm_mfence() +#else + #error Unsupported compiler - need to define __TBB_{control,acquire,release}_consistency_helper to support it +#endif + +#define __TBB_control_consistency_helper() __TBB_compiler_fence() +#define __TBB_acquire_consistency_helper() __TBB_compiler_fence() +#define __TBB_release_consistency_helper() __TBB_compiler_fence() + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (push) + #pragma warning (disable: 4244 4267) +#endif + +extern "C" { + __int64 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ); + __int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend ); + __int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value ); + void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value ); + __int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr); +} + +//TODO: use _InterlockedXXX intrinsics as they available since VC 2005 +#define __TBB_MACHINE_DEFINE_ATOMICS(S,T,U,A,C) \ +static inline T __TBB_machine_cmpswp##S ( volatile void * ptr, U value, U comparand ) { \ + T result; \ + volatile T *p = (T *)ptr; \ + __asm \ + { \ + __asm mov edx, p \ + __asm mov C , value \ + __asm mov A , comparand \ + __asm lock cmpxchg [edx], C \ + __asm mov result, A \ + } \ + return result; \ +} \ +\ +static inline T __TBB_machine_fetchadd##S ( volatile void * ptr, U addend ) { \ + T result; \ + volatile T *p = (T *)ptr; \ + __asm \ + { \ + __asm mov edx, p \ + __asm mov A, addend \ + __asm lock xadd [edx], A \ + __asm mov result, A \ + } \ + return result; \ +}\ +\ +static inline T __TBB_machine_fetchstore##S ( volatile void * ptr, U value ) { \ + T result; \ + volatile T *p = (T *)ptr; \ + __asm \ + { \ + __asm mov edx, p \ + __asm mov A, value \ + __asm lock xchg [edx], A \ + __asm mov result, A \ + } \ + return result; \ +} + + +__TBB_MACHINE_DEFINE_ATOMICS(1, __int8, __int8, al, cl) +__TBB_MACHINE_DEFINE_ATOMICS(2, __int16, __int16, ax, cx) +__TBB_MACHINE_DEFINE_ATOMICS(4, ptrdiff_t, ptrdiff_t, eax, ecx) + +#undef __TBB_MACHINE_DEFINE_ATOMICS + +static inline void __TBB_machine_OR( volatile void *operand, __int32 addend ) { + __asm + { + mov eax, addend + mov edx, [operand] + lock or [edx], eax + } +} + +static inline void __TBB_machine_AND( volatile void *operand, __int32 addend ) { + __asm + { + mov eax, addend + mov edx, [operand] + lock and [edx], eax + } +} + +#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) + +//TODO: Check if it possible and profitable for IA-32 on (Linux and Windows) +//to use of 64-bit load/store via floating point registers together with full fence +//for sequentially consistent load/store, instead of CAS. +#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warnings 4244, 4267 are back + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_intel64.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_intel64.h new file mode 100644 index 0000000000..8bde875873 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/windows_intel64.h @@ -0,0 +1,113 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_windows_intel64_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_windows_intel64_H + +#define __TBB_WORDSIZE 8 +#define __TBB_BIG_ENDIAN 0 + +#include +#include "msvc_ia32_common.h" + +//TODO: Use _InterlockedXXX16 intrinsics for 2 byte operations +#if !__INTEL_COMPILER + #pragma intrinsic(_InterlockedOr64) + #pragma intrinsic(_InterlockedAnd64) + #pragma intrinsic(_InterlockedCompareExchange) + #pragma intrinsic(_InterlockedCompareExchange64) + #pragma intrinsic(_InterlockedExchangeAdd) + #pragma intrinsic(_InterlockedExchangeAdd64) + #pragma intrinsic(_InterlockedExchange) + #pragma intrinsic(_InterlockedExchange64) +#endif /* !(__INTEL_COMPILER) */ + +#if __INTEL_COMPILER && (__INTEL_COMPILER < 1100) + #define __TBB_compiler_fence() __asm { __asm nop } + #define __TBB_full_memory_fence() __asm { __asm mfence } +#elif _MSC_VER >= 1300 || __INTEL_COMPILER + #pragma intrinsic(_ReadWriteBarrier) + #pragma intrinsic(_mm_mfence) + #define __TBB_compiler_fence() _ReadWriteBarrier() + #define __TBB_full_memory_fence() _mm_mfence() +#endif + +#define __TBB_control_consistency_helper() __TBB_compiler_fence() +#define __TBB_acquire_consistency_helper() __TBB_compiler_fence() +#define __TBB_release_consistency_helper() __TBB_compiler_fence() + +// ATTENTION: if you ever change argument types in machine-specific primitives, +// please take care of atomic_word<> specializations in tbb/atomic.h +extern "C" { + __int8 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp1 (volatile void *ptr, __int8 value, __int8 comparand ); + __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd1 (volatile void *ptr, __int8 addend ); + __int8 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore1 (volatile void *ptr, __int8 value ); + __int16 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp2 (volatile void *ptr, __int16 value, __int16 comparand ); + __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd2 (volatile void *ptr, __int16 addend ); + __int16 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore2 (volatile void *ptr, __int16 value ); +} + +inline long __TBB_machine_cmpswp4 (volatile void *ptr, __int32 value, __int32 comparand ) { + return _InterlockedCompareExchange( (long*)ptr, value, comparand ); +} +inline long __TBB_machine_fetchadd4 (volatile void *ptr, __int32 addend ) { + return _InterlockedExchangeAdd( (long*)ptr, addend ); +} +inline long __TBB_machine_fetchstore4 (volatile void *ptr, __int32 value ) { + return _InterlockedExchange( (long*)ptr, value ); +} + +inline __int64 __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand ) { + return _InterlockedCompareExchange64( (__int64*)ptr, value, comparand ); +} +inline __int64 __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend ) { + return _InterlockedExchangeAdd64( (__int64*)ptr, addend ); +} +inline __int64 __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value ) { + return _InterlockedExchange64( (__int64*)ptr, value ); +} + +#define __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +inline void __TBB_machine_OR( volatile void *operand, intptr_t addend ) { + _InterlockedOr64((__int64*)operand, addend); +} + +inline void __TBB_machine_AND( volatile void *operand, intptr_t addend ) { + _InterlockedAnd64((__int64*)operand, addend); +} + +#define __TBB_AtomicOR(P,V) __TBB_machine_OR(P,V) +#define __TBB_AtomicAND(P,V) __TBB_machine_AND(P,V) + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/xbox360_ppc.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/xbox360_ppc.h new file mode 100644 index 0000000000..c97555dc6f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/machine/xbox360_ppc.h @@ -0,0 +1,127 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// TODO: revise by comparing with mac_ppc.h + +#if !defined(__TBB_machine_H) || defined(__TBB_machine_xbox360_ppc_H) +#error Do not #include this internal file directly; use public TBB headers instead. +#endif + +#define __TBB_machine_xbox360_ppc_H + +#define NONET +#define NOD3D +#include "xtl.h" +#include "ppcintrinsics.h" + +#if _MSC_VER >= 1300 +extern "C" void _MemoryBarrier(); +#pragma intrinsic(_MemoryBarrier) +#define __TBB_control_consistency_helper() __isync() +#define __TBB_acquire_consistency_helper() _MemoryBarrier() +#define __TBB_release_consistency_helper() _MemoryBarrier() +#endif + +#define __TBB_full_memory_fence() __sync() + +#define __TBB_WORDSIZE 4 +#define __TBB_BIG_ENDIAN 1 + +//todo: define __TBB_USE_FENCED_ATOMICS and define acquire/release primitives to maximize performance + +inline __int32 __TBB_machine_cmpswp4(volatile void *ptr, __int32 value, __int32 comparand ) { + __sync(); + __int32 result = InterlockedCompareExchange((volatile LONG*)ptr, value, comparand); + __isync(); + return result; +} + +inline __int64 __TBB_machine_cmpswp8(volatile void *ptr, __int64 value, __int64 comparand ) +{ + __sync(); + __int64 result = InterlockedCompareExchange64((volatile LONG64*)ptr, value, comparand); + __isync(); + return result; +} + +#define __TBB_USE_GENERIC_PART_WORD_CAS 1 +#define __TBB_USE_GENERIC_FETCH_ADD 1 +#define __TBB_USE_GENERIC_FETCH_STORE 1 +#define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_RELAXED_LOAD_STORE 1 +#define __TBB_USE_GENERIC_DWORD_LOAD_STORE 1 +#define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE 1 + +#pragma optimize( "", off ) +inline void __TBB_machine_pause (__int32 delay ) +{ + for (__int32 i=0; i> 0) & 1) + + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 1) & 1) + + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 2) & 1) + + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 3) & 1) + + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 4) & 1) + + ((__TBB_XBOX360_HARDWARE_THREAD_MASK >> 5) & 1) + 1; // +1 accomodates for the master thread +} + +static inline int __TBB_XBOX360_GetHardwareThreadIndex(int workerThreadIndex) +{ + workerThreadIndex %= __TBB_XBOX360_DetectNumberOfWorkers()-1; + int m = __TBB_XBOX360_HARDWARE_THREAD_MASK; + int index = 0; + int skipcount = workerThreadIndex; + while (true) + { + if ((m & 1)!=0) + { + if (skipcount==0) break; + skipcount--; + } + m >>= 1; + index++; + } + return index; +} + +#define __TBB_HardwareConcurrency() __TBB_XBOX360_DetectNumberOfWorkers() diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/memory_pool.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/memory_pool.h new file mode 100644 index 0000000000..ea254a9590 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/memory_pool.h @@ -0,0 +1,278 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_memory_pool_H +#define __TBB_memory_pool_H + +#if !TBB_PREVIEW_MEMORY_POOL +#error Set TBB_PREVIEW_MEMORY_POOL to include memory_pool.h +#endif +/** @file */ + +#include "scalable_allocator.h" +#include "tbb_stddef.h" +#include "tbb_machine.h" // TODO: avoid linkage with libtbb on IA-64 +#include // std::bad_alloc +#if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_CPP11_STD_FORWARD_BROKEN +#include // std::forward +#endif + +#if __TBB_EXTRA_DEBUG +#define __TBBMALLOC_ASSERT ASSERT +#else +#define __TBBMALLOC_ASSERT(a,b) ((void)0) +#endif + +namespace tbb { +namespace interface6 { +//! @cond INTERNAL +namespace internal { + +//! Base of thread-safe pool allocator for variable-size requests +class pool_base : tbb::internal::no_copy { + // Pool interface is separate from standard allocator classes because it has + // to maintain internal state, no copy or assignment. Move and swap are possible. +public: + //! Reset pool to reuse its memory (free all objects at once) + void recycle() { rml::pool_reset(my_pool); } + + //! The "malloc" analogue to allocate block of memory of size bytes + void *malloc(size_t size) { return rml::pool_malloc(my_pool, size); } + + //! The "free" analogue to discard a previously allocated piece of memory. + void free(void* ptr) { rml::pool_free(my_pool, ptr); } + + //! The "realloc" analogue complementing pool_malloc. + // Enables some low-level optimization possibilities + void *realloc(void* ptr, size_t size) { + return rml::pool_realloc(my_pool, ptr, size); + } + +protected: + //! destroy pool - must be called in a child class + void destroy() { rml::pool_destroy(my_pool); } + + rml::MemoryPool *my_pool; +}; + +} // namespace internal +//! @endcond + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for erroneous "unreferenced parameter" warning in method destroy. + #pragma warning (push) + #pragma warning (disable: 4100) +#endif + +//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 +/** @ingroup memory_allocation */ +template +class memory_pool_allocator { +protected: + typedef P pool_type; + pool_type *my_pool; + template + friend class memory_pool_allocator; + template + friend bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b); + template + friend bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b); +public: + typedef typename tbb::internal::allocator_type::value_type value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + template struct rebind { + typedef memory_pool_allocator other; + }; + + memory_pool_allocator(pool_type &pool) throw() : my_pool(&pool) {} + memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + template + memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + + pointer address(reference x) const { return &x; } + const_pointer address(const_reference x) const { return &x; } + + //! Allocate space for n objects. + pointer allocate( size_type n, const void* /*hint*/ = 0) { + return static_cast( my_pool->malloc( n*sizeof(value_type) ) ); + } + //! Free previously allocated block of memory. + void deallocate( pointer p, size_type ) { + my_pool->free(p); + } + //! Largest value for which method allocate might succeed. + size_type max_size() const throw() { + size_type max = static_cast(-1) / sizeof (value_type); + return (max > 0 ? max : 1); + } + //! Copy-construct value at location pointed to by p. +#if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + template + void construct(U *p, Args&&... args) + #if __TBB_CPP11_STD_FORWARD_BROKEN + { ::new((void *)p) U((args)...); } + #else + { ::new((void *)p) U(std::forward(args)...); } + #endif +#else // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + void construct( pointer p, const value_type& value ) { ::new((void*)(p)) value_type(value); } +#endif // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + + //! Destroy value at location pointed to by p. + void destroy( pointer p ) { p->~value_type(); } + +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4100 is back + +//! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 +/** @ingroup memory_allocation */ +template +class memory_pool_allocator { +public: + typedef P pool_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template struct rebind { + typedef memory_pool_allocator other; + }; + + memory_pool_allocator( pool_type &pool) throw() : my_pool(&pool) {} + memory_pool_allocator( const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + template + memory_pool_allocator(const memory_pool_allocator& src) throw() : my_pool(src.my_pool) {} + +protected: + pool_type *my_pool; + template + friend class memory_pool_allocator; + template + friend bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b); + template + friend bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b); +}; + +template +inline bool operator==( const memory_pool_allocator& a, const memory_pool_allocator& b) {return a.my_pool==b.my_pool;} + +template +inline bool operator!=( const memory_pool_allocator& a, const memory_pool_allocator& b) {return a.my_pool!=b.my_pool;} + + +//! Thread-safe growable pool allocator for variable-size requests +template +class memory_pool : public internal::pool_base { + Alloc my_alloc; // TODO: base-class optimization + static void *allocate_request(intptr_t pool_id, size_t & bytes); + static int deallocate_request(intptr_t pool_id, void*, size_t raw_bytes); + +public: + //! construct pool with underlying allocator + memory_pool(const Alloc &src = Alloc()); + + //! destroy pool + ~memory_pool() { destroy(); } // call the callbacks first and destroy my_alloc latter + +}; + +class fixed_pool : public internal::pool_base { + void *my_buffer; + size_t my_size; + inline static void *allocate_request(intptr_t pool_id, size_t & bytes); + +public: + //! construct pool with underlying allocator + inline fixed_pool(void *buf, size_t size); + //! destroy pool + ~fixed_pool() { destroy(); } +}; + +//////////////// Implementation /////////////// + +template +memory_pool::memory_pool(const Alloc &src) : my_alloc(src) { + rml::MemPoolPolicy args(allocate_request, deallocate_request, + sizeof(typename Alloc::value_type)); + rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool); + if( res!=rml::POOL_OK ) __TBB_THROW(std::bad_alloc()); +} +template +void *memory_pool::allocate_request(intptr_t pool_id, size_t & bytes) { + memory_pool &self = *reinterpret_cast*>(pool_id); + const size_t unit_size = sizeof(typename Alloc::value_type); + __TBBMALLOC_ASSERT( 0 == bytes%unit_size, NULL); + void *ptr; + __TBB_TRY { ptr = self.my_alloc.allocate( bytes/unit_size ); } + __TBB_CATCH(...) { return 0; } + return ptr; +} +#if _MSC_VER==1700 && !defined(__INTEL_COMPILER) + // Workaround for erroneous "unreachable code" warning in the template below. + // Specific for VC++ 17 compiler + #pragma warning (push) + #pragma warning (disable: 4702) +#endif +template +int memory_pool::deallocate_request(intptr_t pool_id, void* raw_ptr, size_t raw_bytes) { + memory_pool &self = *reinterpret_cast*>(pool_id); + const size_t unit_size = sizeof(typename Alloc::value_type); + __TBBMALLOC_ASSERT( 0 == raw_bytes%unit_size, NULL); + self.my_alloc.deallocate( static_cast(raw_ptr), raw_bytes/unit_size ); + return 0; +} +#if _MSC_VER==1700 && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif +inline fixed_pool::fixed_pool(void *buf, size_t size) : my_buffer(buf), my_size(size) { + rml::MemPoolPolicy args(allocate_request, 0, size, /*fixedPool=*/true); + rml::MemPoolError res = rml::pool_create_v1(intptr_t(this), &args, &my_pool); + if( res!=rml::POOL_OK ) __TBB_THROW(std::bad_alloc()); +} +inline void *fixed_pool::allocate_request(intptr_t pool_id, size_t & bytes) { + fixed_pool &self = *reinterpret_cast(pool_id); + if( !__TBB_CompareAndSwapW(&self.my_size, 0, (bytes=self.my_size)) ) + return 0; // all the memory was given already + return self.my_buffer; +} + +} //namespace interface6 +using interface6::memory_pool_allocator; +using interface6::memory_pool; +using interface6::fixed_pool; +} //namespace tbb + +#undef __TBBMALLOC_ASSERT +#endif// __TBB_memory_pool_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/mutex.h new file mode 100644 index 0000000000..f9fd845f52 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/mutex.h @@ -0,0 +1,240 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_mutex_H +#define __TBB_mutex_H + +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#else +#include +#endif /* _WIN32||_WIN64 */ + +#include +#include "aligned_space.h" +#include "tbb_stddef.h" +#include "tbb_profiling.h" + +namespace tbb { + +//! Wrapper around the platform's native reader-writer lock. +/** For testing purposes only. + @ingroup synchronization */ +class mutex { +public: + //! Construct unacquired mutex. + mutex() { +#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS + internal_construct(); +#else + #if _WIN32||_WIN64 + InitializeCriticalSectionEx(&impl, 4000, 0); + #else + int error_code = pthread_mutex_init(&impl,NULL); + if( error_code ) + tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed"); + #endif /* _WIN32||_WIN64*/ +#endif /* TBB_USE_ASSERT */ + }; + + ~mutex() { +#if TBB_USE_ASSERT + internal_destroy(); +#else + #if _WIN32||_WIN64 + DeleteCriticalSection(&impl); + #else + pthread_mutex_destroy(&impl); + + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + }; + + class scoped_lock; + friend class scoped_lock; + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock : internal::no_copy { + public: + //! Construct lock that has not acquired a mutex. + scoped_lock() : my_mutex(NULL) {}; + + //! Acquire lock on given mutex. + scoped_lock( mutex& mutex ) { + acquire( mutex ); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( my_mutex ) + release(); + } + + //! Acquire lock on given mutex. + void acquire( mutex& mutex ) { +#if TBB_USE_ASSERT + internal_acquire(mutex); +#else + mutex.lock(); + my_mutex = &mutex; +#endif /* TBB_USE_ASSERT */ + } + + //! Try acquire lock on given mutex. + bool try_acquire( mutex& mutex ) { +#if TBB_USE_ASSERT + return internal_try_acquire (mutex); +#else + bool result = mutex.try_lock(); + if( result ) + my_mutex = &mutex; + return result; +#endif /* TBB_USE_ASSERT */ + } + + //! Release lock + void release() { +#if TBB_USE_ASSERT + internal_release (); +#else + my_mutex->unlock(); + my_mutex = NULL; +#endif /* TBB_USE_ASSERT */ + } + + private: + //! The pointer to the current mutex to work + mutex* my_mutex; + + //! All checks from acquire using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_acquire( mutex& m ); + + //! All checks from try_acquire using mutex.state were moved here + bool __TBB_EXPORTED_METHOD internal_try_acquire( mutex& m ); + + //! All checks from release using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_release(); + + friend class mutex; + }; + + // Mutex traits + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = false; + + // ISO C++0x compatibility methods + + //! Acquire lock + void lock() { +#if TBB_USE_ASSERT + aligned_space tmp; + new(tmp.begin()) scoped_lock(*this); +#else + #if _WIN32||_WIN64 + EnterCriticalSection(&impl); + #else + pthread_mutex_lock(&impl); + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Try acquiring lock (non-blocking) + /** Return true if lock acquired; false otherwise. */ + bool try_lock() { +#if TBB_USE_ASSERT + aligned_space tmp; + scoped_lock& s = *tmp.begin(); + s.my_mutex = NULL; + return s.internal_try_acquire(*this); +#else + #if _WIN32||_WIN64 + return TryEnterCriticalSection(&impl)!=0; + #else + return pthread_mutex_trylock(&impl)==0; + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Release lock + void unlock() { +#if TBB_USE_ASSERT + aligned_space tmp; + scoped_lock& s = *tmp.begin(); + s.my_mutex = this; + s.internal_release(); +#else + #if _WIN32||_WIN64 + LeaveCriticalSection(&impl); + #else + pthread_mutex_unlock(&impl); + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Return native_handle + #if _WIN32||_WIN64 + typedef LPCRITICAL_SECTION native_handle_type; + #else + typedef pthread_mutex_t* native_handle_type; + #endif + native_handle_type native_handle() { return (native_handle_type) &impl; } + + enum state_t { + INITIALIZED=0x1234, + DESTROYED=0x789A, + HELD=0x56CD + }; +private: +#if _WIN32||_WIN64 + CRITICAL_SECTION impl; + enum state_t state; +#else + pthread_mutex_t impl; +#endif /* _WIN32||_WIN64 */ + + //! All checks from mutex constructor using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_construct(); + + //! All checks from mutex destructor using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_destroy(); + +#if _WIN32||_WIN64 +public: + //! Set the internal state + void set_state( state_t to ) { state = to; } +#endif +}; + +__TBB_DEFINE_PROFILING_SET_NAME(mutex) + +} // namespace tbb + +#endif /* __TBB_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/null_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/null_mutex.h new file mode 100644 index 0000000000..c945a1e364 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/null_mutex.h @@ -0,0 +1,63 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_null_mutex_H +#define __TBB_null_mutex_H + +namespace tbb { + +//! A mutex which does nothing +/** A null_mutex does no operation and simulates success. + @ingroup synchronization */ +class null_mutex { + //! Deny assignment and copy construction + null_mutex( const null_mutex& ); + void operator=( const null_mutex& ); +public: + //! Represents acquisition of a mutex. + class scoped_lock { + public: + scoped_lock() {} + scoped_lock( null_mutex& ) {} + ~scoped_lock() {} + void acquire( null_mutex& ) {} + bool try_acquire( null_mutex& ) { return true; } + void release() {} + }; + + null_mutex() {} + + // Mutex traits + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = true; + static const bool is_fair_mutex = true; +}; + +} + +#endif /* __TBB_null_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/null_rw_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/null_rw_mutex.h new file mode 100644 index 0000000000..a3d0ecfe70 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/null_rw_mutex.h @@ -0,0 +1,65 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_null_rw_mutex_H +#define __TBB_null_rw_mutex_H + +namespace tbb { + +//! A rw mutex which does nothing +/** A null_rw_mutex is a rw mutex that does nothing and simulates successful operation. + @ingroup synchronization */ +class null_rw_mutex { + //! Deny assignment and copy construction + null_rw_mutex( const null_rw_mutex& ); + void operator=( const null_rw_mutex& ); +public: + //! Represents acquisition of a mutex. + class scoped_lock { + public: + scoped_lock() {} + scoped_lock( null_rw_mutex& , bool = true ) {} + ~scoped_lock() {} + void acquire( null_rw_mutex& , bool = true ) {} + bool upgrade_to_writer() { return true; } + bool downgrade_to_reader() { return true; } + bool try_acquire( null_rw_mutex& , bool = true ) { return true; } + void release() {} + }; + + null_rw_mutex() {} + + // Mutex traits + static const bool is_rw_mutex = true; + static const bool is_recursive_mutex = true; + static const bool is_fair_mutex = true; +}; + +} + +#endif /* __TBB_null_rw_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_do.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_do.h new file mode 100644 index 0000000000..f7663d443e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_do.h @@ -0,0 +1,508 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_do_H +#define __TBB_parallel_do_H + +#include "task.h" +#include "aligned_space.h" +#include + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + template class parallel_do_feeder_impl; + template class do_group_task; + + //! Strips its template type argument from 'cv' and '&' qualifiers + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; + // Most of the compilers remove cv-qualifiers from non-reference function argument types. + // But unfortunately there are those that don't. + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; + template + struct strip { typedef T type; }; +} // namespace internal +//! @endcond + +//! Class the user supplied algorithm body uses to add new tasks +/** \param Item Work item type **/ +template +class parallel_do_feeder: internal::no_copy +{ + parallel_do_feeder() {} + virtual ~parallel_do_feeder () {} + virtual void internal_add( const Item& item ) = 0; + template friend class internal::parallel_do_feeder_impl; +public: + //! Add a work item to a running parallel_do. + void add( const Item& item ) {internal_add(item);} +}; + +//! @cond INTERNAL +namespace internal { + //! For internal use only. + /** Selects one of the two possible forms of function call member operator. + @ingroup algorithms **/ + template + class parallel_do_operator_selector + { + typedef parallel_do_feeder Feeder; + template + static void internal_call( const Body& obj, A1& arg1, A2&, void (Body::*)(CvItem) const ) { + obj(arg1); + } + template + static void internal_call( const Body& obj, A1& arg1, A2& arg2, void (Body::*)(CvItem, parallel_do_feeder&) const ) { + obj(arg1, arg2); + } + + public: + template + static void call( const Body& obj, A1& arg1, A2& arg2 ) + { + internal_call( obj, arg1, arg2, &Body::operator() ); + } + }; + + //! For internal use only. + /** Executes one iteration of a do. + @ingroup algorithms */ + template + class do_iteration_task: public task + { + typedef parallel_do_feeder_impl feeder_type; + + Item my_value; + feeder_type& my_feeder; + + do_iteration_task( const Item& value, feeder_type& feeder ) : + my_value(value), my_feeder(feeder) + {} + + /*override*/ + task* execute() + { + parallel_do_operator_selector::call(*my_feeder.my_body, my_value, my_feeder); + return NULL; + } + + template friend class parallel_do_feeder_impl; + }; // class do_iteration_task + + template + class do_iteration_task_iter: public task + { + typedef parallel_do_feeder_impl feeder_type; + + Iterator my_iter; + feeder_type& my_feeder; + + do_iteration_task_iter( const Iterator& iter, feeder_type& feeder ) : + my_iter(iter), my_feeder(feeder) + {} + + /*override*/ + task* execute() + { + parallel_do_operator_selector::call(*my_feeder.my_body, *my_iter, my_feeder); + return NULL; + } + + template friend class do_group_task_forward; + template friend class do_group_task_input; + template friend class do_task_iter; + }; // class do_iteration_task_iter + + //! For internal use only. + /** Implements new task adding procedure. + @ingroup algorithms **/ + template + class parallel_do_feeder_impl : public parallel_do_feeder + { + /*override*/ + void internal_add( const Item& item ) + { + typedef do_iteration_task iteration_type; + + iteration_type& t = *new (task::allocate_additional_child_of(*my_barrier)) iteration_type(item, *this); + + t.spawn( t ); + } + public: + const Body* my_body; + empty_task* my_barrier; + + parallel_do_feeder_impl() + { + my_barrier = new( task::allocate_root() ) empty_task(); + __TBB_ASSERT(my_barrier, "root task allocation failed"); + } + +#if __TBB_TASK_GROUP_CONTEXT + parallel_do_feeder_impl(tbb::task_group_context &context) + { + my_barrier = new( task::allocate_root(context) ) empty_task(); + __TBB_ASSERT(my_barrier, "root task allocation failed"); + } +#endif + + ~parallel_do_feeder_impl() + { + my_barrier->destroy(*my_barrier); + } + }; // class parallel_do_feeder_impl + + + //! For internal use only + /** Unpacks a block of iterations. + @ingroup algorithms */ + + template + class do_group_task_forward: public task + { + static const size_t max_arg_size = 4; + + typedef parallel_do_feeder_impl feeder_type; + + feeder_type& my_feeder; + Iterator my_first; + size_t my_size; + + do_group_task_forward( Iterator first, size_t size, feeder_type& feeder ) + : my_feeder(feeder), my_first(first), my_size(size) + {} + + /*override*/ task* execute() + { + typedef do_iteration_task_iter iteration_type; + __TBB_ASSERT( my_size>0, NULL ); + task_list list; + task* t; + size_t k=0; + for(;;) { + t = new( allocate_child() ) iteration_type( my_first, my_feeder ); + ++my_first; + if( ++k==my_size ) break; + list.push_back(*t); + } + set_ref_count(int(k+1)); + spawn(list); + spawn_and_wait_for_all(*t); + return NULL; + } + + template friend class do_task_iter; + }; // class do_group_task_forward + + template + class do_group_task_input: public task + { + static const size_t max_arg_size = 4; + + typedef parallel_do_feeder_impl feeder_type; + + feeder_type& my_feeder; + size_t my_size; + aligned_space my_arg; + + do_group_task_input( feeder_type& feeder ) + : my_feeder(feeder), my_size(0) + {} + + /*override*/ task* execute() + { + typedef do_iteration_task_iter iteration_type; + __TBB_ASSERT( my_size>0, NULL ); + task_list list; + task* t; + size_t k=0; + for(;;) { + t = new( allocate_child() ) iteration_type( my_arg.begin() + k, my_feeder ); + if( ++k==my_size ) break; + list.push_back(*t); + } + set_ref_count(int(k+1)); + spawn(list); + spawn_and_wait_for_all(*t); + return NULL; + } + + ~do_group_task_input(){ + for( size_t k=0; k~Item(); + } + + template friend class do_task_iter; + }; // class do_group_task_input + + //! For internal use only. + /** Gets block of iterations and packages them into a do_group_task. + @ingroup algorithms */ + template + class do_task_iter: public task + { + typedef parallel_do_feeder_impl feeder_type; + + public: + do_task_iter( Iterator first, Iterator last , feeder_type& feeder ) : + my_first(first), my_last(last), my_feeder(feeder) + {} + + private: + Iterator my_first; + Iterator my_last; + feeder_type& my_feeder; + + /* Do not merge run(xxx) and run_xxx() methods. They are separated in order + to make sure that compilers will eliminate unused argument of type xxx + (that is will not put it on stack). The sole purpose of this argument + is overload resolution. + + An alternative could be using template functions, but explicit specialization + of member function templates is not supported for non specialized class + templates. Besides template functions would always fall back to the least + efficient variant (the one for input iterators) in case of iterators having + custom tags derived from basic ones. */ + /*override*/ task* execute() + { + typedef typename std::iterator_traits::iterator_category iterator_tag; + return run( (iterator_tag*)NULL ); + } + + /** This is the most restricted variant that operates on input iterators or + iterators with unknown tags (tags not derived from the standard ones). **/ + inline task* run( void* ) { return run_for_input_iterator(); } + + task* run_for_input_iterator() { + typedef do_group_task_input block_type; + + block_type& t = *new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(my_feeder); + size_t k=0; + while( !(my_first == my_last) ) { + new (t.my_arg.begin() + k) Item(*my_first); + ++my_first; + if( ++k==block_type::max_arg_size ) { + if ( !(my_first == my_last) ) + recycle_to_reexecute(); + break; + } + } + if( k==0 ) { + destroy(t); + return NULL; + } else { + t.my_size = k; + return &t; + } + } + + inline task* run( std::forward_iterator_tag* ) { return run_for_forward_iterator(); } + + task* run_for_forward_iterator() { + typedef do_group_task_forward block_type; + + Iterator first = my_first; + size_t k=0; + while( !(my_first==my_last) ) { + ++my_first; + if( ++k==block_type::max_arg_size ) { + if ( !(my_first==my_last) ) + recycle_to_reexecute(); + break; + } + } + return k==0 ? NULL : new( allocate_additional_child_of(*my_feeder.my_barrier) ) block_type(first, k, my_feeder); + } + + inline task* run( std::random_access_iterator_tag* ) { return run_for_random_access_iterator(); } + + task* run_for_random_access_iterator() { + typedef do_group_task_forward block_type; + typedef do_iteration_task_iter iteration_type; + + size_t k = static_cast(my_last-my_first); + if( k > block_type::max_arg_size ) { + Iterator middle = my_first + k/2; + + empty_task& c = *new( allocate_continuation() ) empty_task; + do_task_iter& b = *new( c.allocate_child() ) do_task_iter(middle, my_last, my_feeder); + recycle_as_child_of(c); + + my_last = middle; + c.set_ref_count(2); + c.spawn(b); + return this; + }else if( k != 0 ) { + task_list list; + task* t; + size_t k1=0; + for(;;) { + t = new( allocate_child() ) iteration_type(my_first, my_feeder); + ++my_first; + if( ++k1==k ) break; + list.push_back(*t); + } + set_ref_count(int(k+1)); + spawn(list); + spawn_and_wait_for_all(*t); + } + return NULL; + } + }; // class do_task_iter + + //! For internal use only. + /** Implements parallel iteration over a range. + @ingroup algorithms */ + template + void run_parallel_do( Iterator first, Iterator last, const Body& body +#if __TBB_TASK_GROUP_CONTEXT + , task_group_context& context +#endif + ) + { + typedef do_task_iter root_iteration_task; +#if __TBB_TASK_GROUP_CONTEXT + parallel_do_feeder_impl feeder(context); +#else + parallel_do_feeder_impl feeder; +#endif + feeder.my_body = &body; + + root_iteration_task &t = *new( feeder.my_barrier->allocate_child() ) root_iteration_task(first, last, feeder); + + feeder.my_barrier->set_ref_count(2); + feeder.my_barrier->spawn_and_wait_for_all(t); + } + + //! For internal use only. + /** Detects types of Body's operator function arguments. + @ingroup algorithms **/ + template + void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item) const +#if __TBB_TASK_GROUP_CONTEXT + , task_group_context& context +#endif // __TBB_TASK_GROUP_CONTEXT + ) + { + run_parallel_do::type>( first, last, body +#if __TBB_TASK_GROUP_CONTEXT + , context +#endif // __TBB_TASK_GROUP_CONTEXT + ); + } + + //! For internal use only. + /** Detects types of Body's operator function arguments. + @ingroup algorithms **/ + template + void select_parallel_do( Iterator first, Iterator last, const Body& body, void (Body::*)(Item, parallel_do_feeder<_Item>&) const +#if __TBB_TASK_GROUP_CONTEXT + , task_group_context& context +#endif // __TBB_TASK_GROUP_CONTEXT + ) + { + run_parallel_do::type>( first, last, body +#if __TBB_TASK_GROUP_CONTEXT + , context +#endif // __TBB_TASK_GROUP_CONTEXT + ); + } + +} // namespace internal +//! @endcond + + +/** \page parallel_do_body_req Requirements on parallel_do body + Class \c Body implementing the concept of parallel_do body must define: + - \code + B::operator()( + cv_item_type item, + parallel_do_feeder& feeder + ) const + + OR + + B::operator()( cv_item_type& item ) const + \endcode Process item. + May be invoked concurrently for the same \c this but different \c item. + + - \code item_type( const item_type& ) \endcode + Copy a work item. + - \code ~item_type() \endcode Destroy a work item +**/ + +/** \name parallel_do + See also requirements on \ref parallel_do_body_req "parallel_do Body". **/ +//@{ +//! Parallel iteration over a range, with optional addition of more work. +/** @ingroup algorithms */ +template +void parallel_do( Iterator first, Iterator last, const Body& body ) +{ + if ( first == last ) + return; +#if __TBB_TASK_GROUP_CONTEXT + task_group_context context; +#endif // __TBB_TASK_GROUP_CONTEXT + internal::select_parallel_do( first, last, body, &Body::operator() +#if __TBB_TASK_GROUP_CONTEXT + , context +#endif // __TBB_TASK_GROUP_CONTEXT + ); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration over a range, with optional addition of more work and user-supplied context +/** @ingroup algorithms */ +template +void parallel_do( Iterator first, Iterator last, const Body& body, task_group_context& context ) +{ + if ( first == last ) + return; + internal::select_parallel_do( first, last, body, &Body::operator(), context ); +} +#endif // __TBB_TASK_GROUP_CONTEXT + +//@} + +} // namespace + +#endif /* __TBB_parallel_do_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for.h new file mode 100644 index 0000000000..17fe991b78 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for.h @@ -0,0 +1,353 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_for_H +#define __TBB_parallel_for_H + +#include +#include "task.h" +#include "partitioner.h" +#include "blocked_range.h" +#include "tbb_exception.h" + +namespace tbb { + +namespace interface6 { +//! @cond INTERNAL +namespace internal { + + //! Task type used in parallel_for + /** @ingroup algorithms */ + template + class start_for: public task { + Range my_range; + const Body my_body; + typename Partitioner::task_partition_type my_partition; + /*override*/ task* execute(); + + public: + //! Constructor for root task. + start_for( const Range& range, const Body& body, Partitioner& partitioner ) : + my_range(range), + my_body(body), + my_partition(partitioner) + { + } + //! Splitting constructor used to generate children. + /** parent_ becomes left child. Newly constructed object is right child. */ + start_for( start_for& parent_, split ) : + my_range(parent_.my_range,split()), + my_body(parent_.my_body), + my_partition(parent_.my_partition, split()) + { + my_partition.set_affinity(*this); + } + //! Construct right child from the given range as response to the demand. + /** parent_ remains left child. Newly constructed object is right child. */ + start_for( start_for& parent_, const Range& r, depth_t d ) : + my_range(r), + my_body(parent_.my_body), + my_partition(parent_.my_partition,split()) + { + my_partition.set_affinity(*this); + my_partition.align_depth( d ); + } + //! Update affinity info, if any. + /*override*/ void note_affinity( affinity_id id ) { + my_partition.note_affinity( id ); + } + static void run( const Range& range, const Body& body, Partitioner& partitioner ) { + if( !range.empty() ) { +#if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP + start_for& a = *new(task::allocate_root()) start_for(range,body,partitioner); +#else + // Bound context prevents exceptions from body to affect nesting or sibling algorithms, + // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. + task_group_context context; + start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner); +#endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ + task::spawn_root_and_wait(a); + } + } +#if __TBB_TASK_GROUP_CONTEXT + static void run( const Range& range, const Body& body, Partitioner& partitioner, task_group_context& context ) { + if( !range.empty() ) { + start_for& a = *new(task::allocate_root(context)) start_for(range,body,partitioner); + task::spawn_root_and_wait(a); + } + } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + //! create a continuation task, serve as callback for partitioner + flag_task *create_continuation() { + return new( allocate_continuation() ) flag_task(); + } + //! Run body for range + void run_body( Range &r ) { my_body( r ); } + }; + + template + task* start_for::execute() { + my_partition.check_being_stolen( *this ); + my_partition.execute(*this, my_range); + return NULL; + } +} // namespace internal +//! @endcond +} // namespace interfaceX + +//! @cond INTERNAL +namespace internal { + using interface6::internal::start_for; + + //! Calls the function with values from range [begin, end) with a step provided + template + class parallel_for_body : internal::no_assign { + const Function &my_func; + const Index my_begin; + const Index my_step; + public: + parallel_for_body( const Function& _func, Index& _begin, Index& _step) + : my_func(_func), my_begin(_begin), my_step(_step) {} + + void operator()( tbb::blocked_range& r ) const { +#if __INTEL_COMPILER +#pragma ivdep +#endif + for( Index i = r.begin(), k = my_begin + i * my_step; i < r.end(); i++, k = k + my_step) + my_func( k ); + } + }; +} // namespace internal +//! @endcond + +// Requirements on Range concept are documented in blocked_range.h + +/** \page parallel_for_body_req Requirements on parallel_for body + Class \c Body implementing the concept of parallel_for body must define: + - \code Body::Body( const Body& ); \endcode Copy constructor + - \code Body::~Body(); \endcode Destructor + - \code void Body::operator()( Range& r ) const; \endcode Function call operator applying the body to range \c r. +**/ + +/** \name parallel_for + See also requirements on \ref range_req "Range" and \ref parallel_for_body_req "parallel_for Body". **/ +//@{ + +//! Parallel iteration over range with default partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body ) { + internal::start_for::run(range,body,__TBB_DEFAULT_PARTITIONER()); +} + +//! Parallel iteration over range with simple partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner ) { + internal::start_for::run(range,body,partitioner); +} + +//! Parallel iteration over range with auto_partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner ) { + internal::start_for::run(range,body,partitioner); +} + +//! Parallel iteration over range with affinity_partitioner. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner ) { + internal::start_for::run(range,body,partitioner); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration over range with default partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, task_group_context& context ) { + internal::start_for::run(range, body, __TBB_DEFAULT_PARTITIONER(), context); +} + +//! Parallel iteration over range with simple partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const simple_partitioner& partitioner, task_group_context& context ) { + internal::start_for::run(range, body, partitioner, context); +} + +//! Parallel iteration over range with auto_partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, const auto_partitioner& partitioner, task_group_context& context ) { + internal::start_for::run(range, body, partitioner, context); +} + +//! Parallel iteration over range with affinity_partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_for( const Range& range, const Body& body, affinity_partitioner& partitioner, task_group_context& context ) { + internal::start_for::run(range,body,partitioner, context); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ +//@} + +namespace strict_ppl { + +//@{ +//! Implementation of parallel iteration over stepped range of integers with explicit step and partitioner +template +void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner) { + if (step <= 0 ) + internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument + else if (last > first) { + // Above "else" avoids "potential divide by zero" warning on some platforms + Index end = (last - first - Index(1)) / step + Index(1); + tbb::blocked_range range(static_cast(0), end); + internal::parallel_for_body body(f, first, step); + tbb::parallel_for(range, body, partitioner); + } +} + +//! Parallel iteration over a range of integers with a step provided and default partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f) { + parallel_for_impl(first, last, step, f, auto_partitioner()); +} +//! Parallel iteration over a range of integers with a step provided and simple partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner) { + parallel_for_impl(first, last, step, f, partitioner); +} +//! Parallel iteration over a range of integers with a step provided and auto partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner) { + parallel_for_impl(first, last, step, f, partitioner); +} +//! Parallel iteration over a range of integers with a step provided and affinity partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner) { + parallel_for_impl(first, last, step, f, partitioner); +} + +//! Parallel iteration over a range of integers with a default step value and default partitioner +template +void parallel_for(Index first, Index last, const Function& f) { + parallel_for_impl(first, last, static_cast(1), f, auto_partitioner()); +} +//! Parallel iteration over a range of integers with a default step value and simple partitioner +template +void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner) { + parallel_for_impl(first, last, static_cast(1), f, partitioner); +} +//! Parallel iteration over a range of integers with a default step value and auto partitioner +template +void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner) { + parallel_for_impl(first, last, static_cast(1), f, partitioner); +} +//! Parallel iteration over a range of integers with a default step value and affinity partitioner +template +void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner) { + parallel_for_impl(first, last, static_cast(1), f, partitioner); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Implementation of parallel iteration over stepped range of integers with explicit step, task group context, and partitioner +template +void parallel_for_impl(Index first, Index last, Index step, const Function& f, Partitioner& partitioner, tbb::task_group_context &context) { + if (step <= 0 ) + internal::throw_exception(internal::eid_nonpositive_step); // throws std::invalid_argument + else if (last > first) { + // Above "else" avoids "potential divide by zero" warning on some platforms + Index end = (last - first - Index(1)) / step + Index(1); + tbb::blocked_range range(static_cast(0), end); + internal::parallel_for_body body(f, first, step); + tbb::parallel_for(range, body, partitioner, context); + } +} + +//! Parallel iteration over a range of integers with explicit step, task group context, and default partitioner +template +void parallel_for(Index first, Index last, Index step, const Function& f, tbb::task_group_context &context) { + parallel_for_impl(first, last, step, f, auto_partitioner(), context); +} +//! Parallel iteration over a range of integers with explicit step, task group context, and simple partitioner + template +void parallel_for(Index first, Index last, Index step, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, step, f, partitioner, context); +} +//! Parallel iteration over a range of integers with explicit step, task group context, and auto partitioner + template +void parallel_for(Index first, Index last, Index step, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, step, f, partitioner, context); +} +//! Parallel iteration over a range of integers with explicit step, task group context, and affinity partitioner + template +void parallel_for(Index first, Index last, Index step, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, step, f, partitioner, context); +} + + +//! Parallel iteration over a range of integers with a default step value, explicit task group context, and default partitioner +template +void parallel_for(Index first, Index last, const Function& f, tbb::task_group_context &context) { + parallel_for_impl(first, last, static_cast(1), f, auto_partitioner(), context); +} +//! Parallel iteration over a range of integers with a default step value, explicit task group context, and simple partitioner + template +void parallel_for(Index first, Index last, const Function& f, const simple_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, static_cast(1), f, partitioner, context); +} +//! Parallel iteration over a range of integers with a default step value, explicit task group context, and auto partitioner + template +void parallel_for(Index first, Index last, const Function& f, const auto_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, static_cast(1), f, partitioner, context); +} +//! Parallel iteration over a range of integers with a default step value, explicit task group context, and affinity_partitioner + template +void parallel_for(Index first, Index last, const Function& f, affinity_partitioner& partitioner, tbb::task_group_context &context) { + parallel_for_impl(first, last, static_cast(1), f, partitioner, context); +} + +#endif /* __TBB_TASK_GROUP_CONTEXT */ +//@} + +} // namespace strict_ppl + +using strict_ppl::parallel_for; + +} // namespace tbb + +#if TBB_PREVIEW_SERIAL_SUBSET +#define __TBB_NORMAL_EXECUTION +#include "../serial/tbb/parallel_for.h" +#undef __TBB_NORMAL_EXECUTION +#endif + +#endif /* __TBB_parallel_for_H */ + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for_each.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for_each.h new file mode 100644 index 0000000000..195f212533 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_for_each.h @@ -0,0 +1,77 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_for_each_H +#define __TBB_parallel_for_each_H + +#include "parallel_do.h" + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + // The class calls user function in operator() + template + class parallel_for_each_body : internal::no_assign { + const Function &my_func; + public: + parallel_for_each_body(const Function &_func) : my_func(_func) {} + parallel_for_each_body(const parallel_for_each_body &_caller) : my_func(_caller.my_func) {} + + void operator() ( typename std::iterator_traits::reference value ) const { + my_func(value); + } + }; +} // namespace internal +//! @endcond + +/** \name parallel_for_each + **/ +//@{ +//! Calls function f for all items from [first, last) interval using user-supplied context +/** @ingroup algorithms */ +#if __TBB_TASK_GROUP_CONTEXT +template +void parallel_for_each(InputIterator first, InputIterator last, const Function& f, task_group_context &context) { + internal::parallel_for_each_body body(f); + tbb::parallel_do (first, last, body, context); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! Uses default context +template +void parallel_for_each(InputIterator first, InputIterator last, const Function& f) { + internal::parallel_for_each_body body(f); + tbb::parallel_do (first, last, body); +} + +//@} + +} // namespace + +#endif /* __TBB_parallel_for_each_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_invoke.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_invoke.h new file mode 100644 index 0000000000..841c941214 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_invoke.h @@ -0,0 +1,371 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_invoke_H +#define __TBB_parallel_invoke_H + +#include "task.h" + +namespace tbb { + +#if !__TBB_TASK_GROUP_CONTEXT + /** Dummy to avoid cluttering the bulk of the header with enormous amount of ifdefs. **/ + struct task_group_context {}; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! @cond INTERNAL +namespace internal { + // Simple task object, executing user method + template + class function_invoker : public task{ + public: + function_invoker(const function& _function) : my_function(_function) {} + private: + const function &my_function; + /*override*/ + task* execute() + { + my_function(); + return NULL; + } + }; + + // The class spawns two or three child tasks + template + class spawner : public task { + private: + const function1& my_func1; + const function2& my_func2; + const function3& my_func3; + bool is_recycled; + + task* execute (){ + if(is_recycled){ + return NULL; + }else{ + __TBB_ASSERT(N==2 || N==3, "Number of arguments passed to spawner is wrong"); + set_ref_count(N); + recycle_as_safe_continuation(); + internal::function_invoker* invoker2 = new (allocate_child()) internal::function_invoker(my_func2); + __TBB_ASSERT(invoker2, "Child task allocation failed"); + spawn(*invoker2); + size_t n = N; // To prevent compiler warnings + if (n>2) { + internal::function_invoker* invoker3 = new (allocate_child()) internal::function_invoker(my_func3); + __TBB_ASSERT(invoker3, "Child task allocation failed"); + spawn(*invoker3); + } + my_func1(); + is_recycled = true; + return NULL; + } + } // execute + + public: + spawner(const function1& _func1, const function2& _func2, const function3& _func3) : my_func1(_func1), my_func2(_func2), my_func3(_func3), is_recycled(false) {} + }; + + // Creates and spawns child tasks + class parallel_invoke_helper : public empty_task { + public: + // Dummy functor class + class parallel_invoke_noop { + public: + void operator() () const {} + }; + // Creates a helper object with user-defined number of children expected + parallel_invoke_helper(int number_of_children) + { + set_ref_count(number_of_children + 1); + } + // Adds child task and spawns it + template + void add_child (const function &_func) + { + internal::function_invoker* invoker = new (allocate_child()) internal::function_invoker(_func); + __TBB_ASSERT(invoker, "Child task allocation failed"); + spawn(*invoker); + } + + // Adds a task with multiple child tasks and spawns it + // two arguments + template + void add_children (const function1& _func1, const function2& _func2) + { + // The third argument is dummy, it is ignored actually. + parallel_invoke_noop noop; + internal::spawner<2, function1, function2, parallel_invoke_noop>& sub_root = *new(allocate_child())internal::spawner<2, function1, function2, parallel_invoke_noop>(_func1, _func2, noop); + spawn(sub_root); + } + // three arguments + template + void add_children (const function1& _func1, const function2& _func2, const function3& _func3) + { + internal::spawner<3, function1, function2, function3>& sub_root = *new(allocate_child())internal::spawner<3, function1, function2, function3>(_func1, _func2, _func3); + spawn(sub_root); + } + + // Waits for all child tasks + template + void run_and_finish(const F0& f0) + { + internal::function_invoker* invoker = new (allocate_child()) internal::function_invoker(f0); + __TBB_ASSERT(invoker, "Child task allocation failed"); + spawn_and_wait_for_all(*invoker); + } + }; + // The class destroys root if exception occurred as well as in normal case + class parallel_invoke_cleaner: internal::no_copy { + public: +#if __TBB_TASK_GROUP_CONTEXT + parallel_invoke_cleaner(int number_of_children, tbb::task_group_context& context) + : root(*new(task::allocate_root(context)) internal::parallel_invoke_helper(number_of_children)) +#else + parallel_invoke_cleaner(int number_of_children, tbb::task_group_context&) + : root(*new(task::allocate_root()) internal::parallel_invoke_helper(number_of_children)) +#endif /* !__TBB_TASK_GROUP_CONTEXT */ + {} + + ~parallel_invoke_cleaner(){ + root.destroy(root); + } + internal::parallel_invoke_helper& root; + }; +} // namespace internal +//! @endcond + +/** \name parallel_invoke + **/ +//@{ +//! Executes a list of tasks in parallel and waits for all tasks to complete. +/** @ingroup algorithms */ + +// parallel_invoke with user-defined context +// two arguments +template +void parallel_invoke(const F0& f0, const F1& f1, tbb::task_group_context& context) { + internal::parallel_invoke_cleaner cleaner(2, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_child(f1); + + root.run_and_finish(f0); +} + +// three arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, tbb::task_group_context& context) { + internal::parallel_invoke_cleaner cleaner(3, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_child(f2); + root.add_child(f1); + + root.run_and_finish(f0); +} + +// four arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(4, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_child(f3); + root.add_child(f2); + root.add_child(f1); + + root.run_and_finish(f0); +} + +// five arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(3, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f4, f3); + root.add_children(f2, f1); + + root.run_and_finish(f0); +} + +// six arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(3, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f5, f4, f3); + root.add_children(f2, f1); + + root.run_and_finish(f0); +} + +// seven arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(3, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f6, f5, f4); + root.add_children(f3, f2, f1); + + root.run_and_finish(f0); +} + +// eight arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(4, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f7, f6, f5); + root.add_children(f4, f3); + root.add_children(f2, f1); + + root.run_and_finish(f0); +} + +// nine arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7, const F8& f8, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(4, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f8, f7, f6); + root.add_children(f5, f4, f3); + root.add_children(f2, f1); + + root.run_and_finish(f0); +} + +// ten arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7, const F8& f8, const F9& f9, + tbb::task_group_context& context) +{ + internal::parallel_invoke_cleaner cleaner(4, context); + internal::parallel_invoke_helper& root = cleaner.root; + + root.add_children(f9, f8, f7); + root.add_children(f6, f5, f4); + root.add_children(f3, f2, f1); + + root.run_and_finish(f0); +} + +// two arguments +template +void parallel_invoke(const F0& f0, const F1& f1) { + task_group_context context; + parallel_invoke(f0, f1, context); +} +// three arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2) { + task_group_context context; + parallel_invoke(f0, f1, f2, context); +} +// four arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3) { + task_group_context context; + parallel_invoke(f0, f1, f2, f3, context); +} +// five arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4) { + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, context); +} +// six arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, const F5& f5) { + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, f5, context); +} +// seven arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6) +{ + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, f5, f6, context); +} +// eigth arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7) +{ + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, context); +} +// nine arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7, const F8& f8) +{ + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, f8, context); +} +// ten arguments +template +void parallel_invoke(const F0& f0, const F1& f1, const F2& f2, const F3& f3, const F4& f4, + const F5& f5, const F6& f6, const F7& f7, const F8& f8, const F9& f9) +{ + task_group_context context; + parallel_invoke(f0, f1, f2, f3, f4, f5, f6, f7, f8, f9, context); +} + +//@} + +} // namespace + +#endif /* __TBB_parallel_invoke_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_reduce.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_reduce.h new file mode 100644 index 0000000000..fbe1eefb0f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_reduce.h @@ -0,0 +1,511 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_reduce_H +#define __TBB_parallel_reduce_H + +#include +#include "task.h" +#include "aligned_space.h" +#include "partitioner.h" +#include "tbb_profiling.h" + +namespace tbb { + +namespace interface6 { +//! @cond INTERNAL +namespace internal { + + using namespace tbb::internal; + + /** Values for reduction_context. */ + enum { + root_task, left_child, right_child + }; + + /** Represented as a char, not enum, for compactness. */ + typedef char reduction_context; + + //! Task type used to combine the partial results of parallel_reduce. + /** @ingroup algorithms */ + template + class finish_reduce: public flag_task { + //! Pointer to body, or NULL if the left child has not yet finished. + bool has_right_zombie; + const reduction_context my_context; + Body* my_body; + aligned_space zombie_space; + finish_reduce( reduction_context context_ ) : + has_right_zombie(false), // TODO: substitute by flag_task::child_stolen? + my_context(context_), + my_body(NULL) + { + } + task* execute() { + if( has_right_zombie ) { + // Right child was stolen. + Body* s = zombie_space.begin(); + my_body->join( *s ); + s->~Body(); + } + if( my_context==left_child ) + itt_store_word_with_release( static_cast(parent())->my_body, my_body ); + return NULL; + } + template + friend class start_reduce; + }; + + //! Task type used to split the work of parallel_reduce. + /** @ingroup algorithms */ + template + class start_reduce: public task { + typedef finish_reduce finish_type; + Body* my_body; + Range my_range; + typename Partitioner::task_partition_type my_partition; + reduction_context my_context; // TODO: factor out into start_reduce_base + /*override*/ task* execute(); + template + friend class finish_reduce; + +public: + //! Constructor used for root task + start_reduce( const Range& range, Body* body, Partitioner& partitioner ) : + my_body(body), + my_range(range), + my_partition(partitioner), + my_context(root_task) + { + } + //! Splitting constructor used to generate children. + /** parent_ becomes left child. Newly constructed object is right child. */ + start_reduce( start_reduce& parent_, split ) : + my_body(parent_.my_body), + my_range(parent_.my_range,split()), + my_partition(parent_.my_partition,split()), + my_context(right_child) + { + my_partition.set_affinity(*this); + parent_.my_context = left_child; + } + //! Construct right child from the given range as response to the demand. + /** parent_ remains left child. Newly constructed object is right child. */ + start_reduce( start_reduce& parent_, const Range& r, depth_t d ) : + my_body(parent_.my_body), + my_range(r), + my_partition(parent_.my_partition,split()), + my_context(right_child) + { + my_partition.set_affinity(*this); + my_partition.align_depth( d ); + parent_.my_context = left_child; + } + //! Update affinity info, if any + /*override*/ void note_affinity( affinity_id id ) { + my_partition.note_affinity( id ); + } + static void run( const Range& range, Body& body, Partitioner& partitioner ) { + if( !range.empty() ) { +#if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP + task::spawn_root_and_wait( *new(task::allocate_root()) start_reduce(range,&body,partitioner) ); +#else + // Bound context prevents exceptions from body to affect nesting or sibling algorithms, + // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. + task_group_context context; + task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) ); +#endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ + } + } +#if __TBB_TASK_GROUP_CONTEXT + static void run( const Range& range, Body& body, Partitioner& partitioner, task_group_context& context ) { + if( !range.empty() ) + task::spawn_root_and_wait( *new(task::allocate_root(context)) start_reduce(range,&body,partitioner) ); + } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + //! create a continuation task, serve as callback for partitioner + finish_type *create_continuation() { + return new( allocate_continuation() ) finish_type(my_context); + } + //! Run body for range + void run_body( Range &r ) { (*my_body)( r ); } + }; + template + task* start_reduce::execute() { + my_partition.check_being_stolen( *this ); + if( my_context==right_child ) { + finish_type* parent_ptr = static_cast(parent()); + if( !itt_load_word_with_acquire(parent_ptr->my_body) ) { // TODO: replace by is_stolen_task() or by parent_ptr->ref_count() == 2??? + my_body = new( parent_ptr->zombie_space.begin() ) Body(*my_body,split()); + parent_ptr->has_right_zombie = true; + } + } else __TBB_ASSERT(my_context==root_task,NULL);// because left leaf spawns right leafs without recycling + my_partition.execute(*this, my_range); + if( my_context==left_child ) { + finish_type* parent_ptr = static_cast(parent()); + __TBB_ASSERT(my_body!=parent_ptr->zombie_space.begin(),NULL); + itt_store_word_with_release(parent_ptr->my_body, my_body ); + } + return NULL; + } + + //! Task type used to combine the partial results of parallel_deterministic_reduce. + /** @ingroup algorithms */ + template + class finish_deterministic_reduce: public task { + Body &my_left_body; + Body my_right_body; + + finish_deterministic_reduce( Body &body ) : + my_left_body( body ), + my_right_body( body, split() ) + { + } + task* execute() { + my_left_body.join( my_right_body ); + return NULL; + } + template + friend class start_deterministic_reduce; + }; + + //! Task type used to split the work of parallel_deterministic_reduce. + /** @ingroup algorithms */ + template + class start_deterministic_reduce: public task { + typedef finish_deterministic_reduce finish_type; + Body &my_body; + Range my_range; + /*override*/ task* execute(); + + //! Constructor used for root task + start_deterministic_reduce( const Range& range, Body& body ) : + my_body( body ), + my_range( range ) + { + } + //! Splitting constructor used to generate children. + /** parent_ becomes left child. Newly constructed object is right child. */ + start_deterministic_reduce( start_deterministic_reduce& parent_, finish_type& c ) : + my_body( c.my_right_body ), + my_range( parent_.my_range, split() ) + { + } + +public: + static void run( const Range& range, Body& body ) { + if( !range.empty() ) { +#if !__TBB_TASK_GROUP_CONTEXT || TBB_JOIN_OUTER_TASK_GROUP + task::spawn_root_and_wait( *new(task::allocate_root()) start_deterministic_reduce(range,&body) ); +#else + // Bound context prevents exceptions from body to affect nesting or sibling algorithms, + // and allows users to handle exceptions safely by wrapping parallel_for in the try-block. + task_group_context context; + task::spawn_root_and_wait( *new(task::allocate_root(context)) start_deterministic_reduce(range,body) ); +#endif /* __TBB_TASK_GROUP_CONTEXT && !TBB_JOIN_OUTER_TASK_GROUP */ + } + } +#if __TBB_TASK_GROUP_CONTEXT + static void run( const Range& range, Body& body, task_group_context& context ) { + if( !range.empty() ) + task::spawn_root_and_wait( *new(task::allocate_root(context)) start_deterministic_reduce(range,body) ); + } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + }; + + template + task* start_deterministic_reduce::execute() { + if( !my_range.is_divisible() ) { + my_body( my_range ); + return NULL; + } else { + finish_type& c = *new( allocate_continuation() ) finish_type( my_body ); + recycle_as_child_of(c); + c.set_ref_count(2); + start_deterministic_reduce& b = *new( c.allocate_child() ) start_deterministic_reduce( *this, c ); + task::spawn(b); + return this; + } + } +} // namespace internal +//! @endcond +} //namespace interfaceX + +//! @cond INTERNAL +namespace internal { + using interface6::internal::start_reduce; + using interface6::internal::start_deterministic_reduce; + //! Auxiliary class for parallel_reduce; for internal use only. + /** The adaptor class that implements \ref parallel_reduce_body_req "parallel_reduce Body" + using given \ref parallel_reduce_lambda_req "anonymous function objects". + **/ + /** @ingroup algorithms */ + template + class lambda_reduce_body { + +//FIXME: decide if my_real_body, my_reduction, and identity_element should be copied or referenced +// (might require some performance measurements) + + const Value& identity_element; + const RealBody& my_real_body; + const Reduction& my_reduction; + Value my_value; + lambda_reduce_body& operator= ( const lambda_reduce_body& other ); + public: + lambda_reduce_body( const Value& identity, const RealBody& body, const Reduction& reduction ) + : identity_element(identity) + , my_real_body(body) + , my_reduction(reduction) + , my_value(identity) + { } + lambda_reduce_body( const lambda_reduce_body& other ) + : identity_element(other.identity_element) + , my_real_body(other.my_real_body) + , my_reduction(other.my_reduction) + , my_value(other.my_value) + { } + lambda_reduce_body( lambda_reduce_body& other, tbb::split ) + : identity_element(other.identity_element) + , my_real_body(other.my_real_body) + , my_reduction(other.my_reduction) + , my_value(other.identity_element) + { } + void operator()(Range& range) { + my_value = my_real_body(range, const_cast(my_value)); + } + void join( lambda_reduce_body& rhs ) { + my_value = my_reduction(const_cast(my_value), const_cast(rhs.my_value)); + } + Value result() const { + return my_value; + } + }; + +} // namespace internal +//! @endcond + +// Requirements on Range concept are documented in blocked_range.h + +/** \page parallel_reduce_body_req Requirements on parallel_reduce body + Class \c Body implementing the concept of parallel_reduce body must define: + - \code Body::Body( Body&, split ); \endcode Splitting constructor. + Must be able to run concurrently with operator() and method \c join + - \code Body::~Body(); \endcode Destructor + - \code void Body::operator()( Range& r ); \endcode Function call operator applying body to range \c r + and accumulating the result + - \code void Body::join( Body& b ); \endcode Join results. + The result in \c b should be merged into the result of \c this +**/ + +/** \page parallel_reduce_lambda_req Requirements on parallel_reduce anonymous function objects (lambda functions) + TO BE DOCUMENTED +**/ + +/** \name parallel_reduce + See also requirements on \ref range_req "Range" and \ref parallel_reduce_body_req "parallel_reduce Body". **/ +//@{ + +//! Parallel iteration with reduction and default partitioner. +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body ) { + internal::start_reduce::run( range, body, __TBB_DEFAULT_PARTITIONER() ); +} + +//! Parallel iteration with reduction and simple_partitioner +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner ) { + internal::start_reduce::run( range, body, partitioner ); +} + +//! Parallel iteration with reduction and auto_partitioner +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner ) { + internal::start_reduce::run( range, body, partitioner ); +} + +//! Parallel iteration with reduction and affinity_partitioner +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner ) { + internal::start_reduce::run( range, body, partitioner ); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration with reduction, simple partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, const simple_partitioner& partitioner, task_group_context& context ) { + internal::start_reduce::run( range, body, partitioner, context ); +} + +//! Parallel iteration with reduction, auto_partitioner and user-supplied context +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, const auto_partitioner& partitioner, task_group_context& context ) { + internal::start_reduce::run( range, body, partitioner, context ); +} + +//! Parallel iteration with reduction, affinity_partitioner and user-supplied context +/** @ingroup algorithms **/ +template +void parallel_reduce( const Range& range, Body& body, affinity_partitioner& partitioner, task_group_context& context ) { + internal::start_reduce::run( range, body, partitioner, context ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/** parallel_reduce overloads that work with anonymous function objects + (see also \ref parallel_reduce_lambda_req "requirements on parallel_reduce anonymous function objects"). **/ + +//! Parallel iteration with reduction and default partitioner. +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,const __TBB_DEFAULT_PARTITIONER> + ::run(range, body, __TBB_DEFAULT_PARTITIONER() ); + return body.result(); +} + +//! Parallel iteration with reduction and simple_partitioner. +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + const simple_partitioner& partitioner ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,const simple_partitioner> + ::run(range, body, partitioner ); + return body.result(); +} + +//! Parallel iteration with reduction and auto_partitioner +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + const auto_partitioner& partitioner ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,const auto_partitioner> + ::run( range, body, partitioner ); + return body.result(); +} + +//! Parallel iteration with reduction and affinity_partitioner +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + affinity_partitioner& partitioner ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,affinity_partitioner> + ::run( range, body, partitioner ); + return body.result(); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration with reduction, simple partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + const simple_partitioner& partitioner, task_group_context& context ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,const simple_partitioner> + ::run( range, body, partitioner, context ); + return body.result(); +} + +//! Parallel iteration with reduction, auto_partitioner and user-supplied context +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + const auto_partitioner& partitioner, task_group_context& context ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,const auto_partitioner> + ::run( range, body, partitioner, context ); + return body.result(); +} + +//! Parallel iteration with reduction, affinity_partitioner and user-supplied context +/** @ingroup algorithms **/ +template +Value parallel_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + affinity_partitioner& partitioner, task_group_context& context ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_reduce,affinity_partitioner> + ::run( range, body, partitioner, context ); + return body.result(); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! Parallel iteration with deterministic reduction and default partitioner. +/** @ingroup algorithms **/ +template +void parallel_deterministic_reduce( const Range& range, Body& body ) { + internal::start_deterministic_reduce::run( range, body ); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +void parallel_deterministic_reduce( const Range& range, Body& body, task_group_context& context ) { + internal::start_deterministic_reduce::run( range, body, context ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/** parallel_reduce overloads that work with anonymous function objects + (see also \ref parallel_reduce_lambda_req "requirements on parallel_reduce anonymous function objects"). **/ + +//! Parallel iteration with deterministic reduction and default partitioner. +/** @ingroup algorithms **/ +template +Value parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_deterministic_reduce > + ::run(range, body); + return body.result(); +} + +#if __TBB_TASK_GROUP_CONTEXT +//! Parallel iteration with deterministic reduction, simple partitioner and user-supplied context. +/** @ingroup algorithms **/ +template +Value parallel_deterministic_reduce( const Range& range, const Value& identity, const RealBody& real_body, const Reduction& reduction, + task_group_context& context ) { + internal::lambda_reduce_body body(identity, real_body, reduction); + internal::start_deterministic_reduce > + ::run( range, body, context ); + return body.result(); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ +//@} + +} // namespace tbb + +#endif /* __TBB_parallel_reduce_H */ + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_scan.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_scan.h new file mode 100644 index 0000000000..eb81ae82ea --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_scan.h @@ -0,0 +1,354 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_scan_H +#define __TBB_parallel_scan_H + +#include "task.h" +#include "aligned_space.h" +#include +#include "partitioner.h" + +namespace tbb { + +//! Used to indicate that the initial scan is being performed. +/** @ingroup algorithms */ +struct pre_scan_tag { + static bool is_final_scan() {return false;} +}; + +//! Used to indicate that the final scan is being performed. +/** @ingroup algorithms */ +struct final_scan_tag { + static bool is_final_scan() {return true;} +}; + +//! @cond INTERNAL +namespace internal { + + //! Performs final scan for a leaf + /** @ingroup algorithms */ + template + class final_sum: public task { + public: + Body my_body; + private: + aligned_space my_range; + //! Where to put result of last subrange, or NULL if not last subrange. + Body* my_stuff_last; + public: + final_sum( Body& body_ ) : + my_body(body_,split()) + { + poison_pointer(my_stuff_last); + } + ~final_sum() { + my_range.begin()->~Range(); + } + void finish_construction( const Range& range_, Body* stuff_last_ ) { + new( my_range.begin() ) Range(range_); + my_stuff_last = stuff_last_; + } + private: + /*override*/ task* execute() { + my_body( *my_range.begin(), final_scan_tag() ); + if( my_stuff_last ) + my_stuff_last->assign(my_body); + return NULL; + } + }; + + //! Split work to be done in the scan. + /** @ingroup algorithms */ + template + class sum_node: public task { + typedef final_sum final_sum_type; + public: + final_sum_type *my_incoming; + final_sum_type *my_body; + Body *my_stuff_last; + private: + final_sum_type *my_left_sum; + sum_node *my_left; + sum_node *my_right; + bool my_left_is_final; + Range my_range; + sum_node( const Range range_, bool left_is_final_ ) : + my_left_sum(NULL), + my_left(NULL), + my_right(NULL), + my_left_is_final(left_is_final_), + my_range(range_) + { + // Poison fields that will be set by second pass. + poison_pointer(my_body); + poison_pointer(my_incoming); + } + task* create_child( const Range& range_, final_sum_type& f, sum_node* n, final_sum_type* incoming_, Body* stuff_last_ ) { + if( !n ) { + f.recycle_as_child_of( *this ); + f.finish_construction( range_, stuff_last_ ); + return &f; + } else { + n->my_body = &f; + n->my_incoming = incoming_; + n->my_stuff_last = stuff_last_; + return n; + } + } + /*override*/ task* execute() { + if( my_body ) { + if( my_incoming ) + my_left_sum->my_body.reverse_join( my_incoming->my_body ); + recycle_as_continuation(); + sum_node& c = *this; + task* b = c.create_child(Range(my_range,split()),*my_left_sum,my_right,my_left_sum,my_stuff_last); + task* a = my_left_is_final ? NULL : c.create_child(my_range,*my_body,my_left,my_incoming,NULL); + set_ref_count( (a!=NULL)+(b!=NULL) ); + my_body = NULL; + if( a ) spawn(*b); + else a = b; + return a; + } else { + return NULL; + } + } + template + friend class start_scan; + + template + friend class finish_scan; + }; + + //! Combine partial results + /** @ingroup algorithms */ + template + class finish_scan: public task { + typedef sum_node sum_node_type; + typedef final_sum final_sum_type; + final_sum_type** const my_sum; + sum_node_type*& my_return_slot; + public: + final_sum_type* my_right_zombie; + sum_node_type& my_result; + + /*override*/ task* execute() { + __TBB_ASSERT( my_result.ref_count()==(my_result.my_left!=NULL)+(my_result.my_right!=NULL), NULL ); + if( my_result.my_left ) + my_result.my_left_is_final = false; + if( my_right_zombie && my_sum ) + ((*my_sum)->my_body).reverse_join(my_result.my_left_sum->my_body); + __TBB_ASSERT( !my_return_slot, NULL ); + if( my_right_zombie || my_result.my_right ) { + my_return_slot = &my_result; + } else { + destroy( my_result ); + } + if( my_right_zombie && !my_sum && !my_result.my_right ) { + destroy(*my_right_zombie); + my_right_zombie = NULL; + } + return NULL; + } + + finish_scan( sum_node_type*& return_slot_, final_sum_type** sum_, sum_node_type& result_ ) : + my_sum(sum_), + my_return_slot(return_slot_), + my_right_zombie(NULL), + my_result(result_) + { + __TBB_ASSERT( !my_return_slot, NULL ); + } + }; + + //! Initial task to split the work + /** @ingroup algorithms */ + template + class start_scan: public task { + typedef sum_node sum_node_type; + typedef final_sum final_sum_type; + final_sum_type* my_body; + /** Non-null if caller is requesting total. */ + final_sum_type** my_sum; + sum_node_type** my_return_slot; + /** Null if computing root. */ + sum_node_type* my_parent_sum; + bool my_is_final; + bool my_is_right_child; + Range my_range; + typename Partitioner::partition_type my_partition; + /*override*/ task* execute(); + public: + start_scan( sum_node_type*& return_slot_, start_scan& parent_, sum_node_type* parent_sum_ ) : + my_body(parent_.my_body), + my_sum(parent_.my_sum), + my_return_slot(&return_slot_), + my_parent_sum(parent_sum_), + my_is_final(parent_.my_is_final), + my_is_right_child(false), + my_range(parent_.my_range,split()), + my_partition(parent_.my_partition,split()) + { + __TBB_ASSERT( !*my_return_slot, NULL ); + } + + start_scan( sum_node_type*& return_slot_, const Range& range_, final_sum_type& body_, const Partitioner& partitioner_) : + my_body(&body_), + my_sum(NULL), + my_return_slot(&return_slot_), + my_parent_sum(NULL), + my_is_final(true), + my_is_right_child(false), + my_range(range_), + my_partition(partitioner_) + { + __TBB_ASSERT( !*my_return_slot, NULL ); + } + + static void run( const Range& range_, Body& body_, const Partitioner& partitioner_ ) { + if( !range_.empty() ) { + typedef internal::start_scan start_pass1_type; + internal::sum_node* root = NULL; + typedef internal::final_sum final_sum_type; + final_sum_type* temp_body = new(task::allocate_root()) final_sum_type( body_ ); + start_pass1_type& pass1 = *new(task::allocate_root()) start_pass1_type( + /*my_return_slot=*/root, + range_, + *temp_body, + partitioner_ ); + task::spawn_root_and_wait( pass1 ); + if( root ) { + root->my_body = temp_body; + root->my_incoming = NULL; + root->my_stuff_last = &body_; + task::spawn_root_and_wait( *root ); + } else { + body_.assign(temp_body->my_body); + temp_body->finish_construction( range_, NULL ); + temp_body->destroy(*temp_body); + } + } + } + }; + + template + task* start_scan::execute() { + typedef internal::finish_scan finish_pass1_type; + finish_pass1_type* p = my_parent_sum ? static_cast( parent() ) : NULL; + // Inspecting p->result.left_sum would ordinarily be a race condition. + // But we inspect it only if we are not a stolen task, in which case we + // know that task assigning to p->result.left_sum has completed. + bool treat_as_stolen = my_is_right_child && (is_stolen_task() || my_body!=p->my_result.my_left_sum); + if( treat_as_stolen ) { + // Invocation is for right child that has been really stolen or needs to be virtually stolen + p->my_right_zombie = my_body = new( allocate_root() ) final_sum_type(my_body->my_body); + my_is_final = false; + } + task* next_task = NULL; + if( (my_is_right_child && !treat_as_stolen) || !my_range.is_divisible() || my_partition.should_execute_range(*this) ) { + if( my_is_final ) + (my_body->my_body)( my_range, final_scan_tag() ); + else if( my_sum ) + (my_body->my_body)( my_range, pre_scan_tag() ); + if( my_sum ) + *my_sum = my_body; + __TBB_ASSERT( !*my_return_slot, NULL ); + } else { + sum_node_type* result; + if( my_parent_sum ) + result = new(allocate_additional_child_of(*my_parent_sum)) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); + else + result = new(task::allocate_root()) sum_node_type(my_range,/*my_left_is_final=*/my_is_final); + finish_pass1_type& c = *new( allocate_continuation()) finish_pass1_type(*my_return_slot,my_sum,*result); + // Split off right child + start_scan& b = *new( c.allocate_child() ) start_scan( /*my_return_slot=*/result->my_right, *this, result ); + b.my_is_right_child = true; + // Left child is recycling of *this. Must recycle this before spawning b, + // otherwise b might complete and decrement c.ref_count() to zero, which + // would cause c.execute() to run prematurely. + recycle_as_child_of(c); + c.set_ref_count(2); + c.spawn(b); + my_sum = &result->my_left_sum; + my_return_slot = &result->my_left; + my_is_right_child = false; + next_task = this; + my_parent_sum = result; + __TBB_ASSERT( !*my_return_slot, NULL ); + } + return next_task; + } +} // namespace internal +//! @endcond + +// Requirements on Range concept are documented in blocked_range.h + +/** \page parallel_scan_body_req Requirements on parallel_scan body + Class \c Body implementing the concept of parallel_scan body must define: + - \code Body::Body( Body&, split ); \endcode Splitting constructor. + Split \c b so that \c this and \c b can accumulate separately + - \code Body::~Body(); \endcode Destructor + - \code void Body::operator()( const Range& r, pre_scan_tag ); \endcode + Preprocess iterations for range \c r + - \code void Body::operator()( const Range& r, final_scan_tag ); \endcode + Do final processing for iterations of range \c r + - \code void Body::reverse_join( Body& a ); \endcode + Merge preprocessing state of \c a into \c this, where \c a was + created earlier from \c b by b's splitting constructor +**/ + +/** \name parallel_scan + See also requirements on \ref range_req "Range" and \ref parallel_scan_body_req "parallel_scan Body". **/ +//@{ + +//! Parallel prefix with default partitioner +/** @ingroup algorithms **/ +template +void parallel_scan( const Range& range, Body& body ) { + internal::start_scan::run(range,body,__TBB_DEFAULT_PARTITIONER()); +} + +//! Parallel prefix with simple_partitioner +/** @ingroup algorithms **/ +template +void parallel_scan( const Range& range, Body& body, const simple_partitioner& partitioner ) { + internal::start_scan::run(range,body,partitioner); +} + +//! Parallel prefix with auto_partitioner +/** @ingroup algorithms **/ +template +void parallel_scan( const Range& range, Body& body, const auto_partitioner& partitioner ) { + internal::start_scan::run(range,body,partitioner); +} +//@} + +} // namespace tbb + +#endif /* __TBB_parallel_scan_H */ + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_sort.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_sort.h new file mode 100644 index 0000000000..743eb3cf4e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_sort.h @@ -0,0 +1,231 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_sort_H +#define __TBB_parallel_sort_H + +#include "parallel_for.h" +#include "blocked_range.h" +#include +#include +#include + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + +//! Range used in quicksort to split elements into subranges based on a value. +/** The split operation selects a splitter and places all elements less than or equal + to the value in the first range and the remaining elements in the second range. + @ingroup algorithms */ +template +class quick_sort_range: private no_assign { + + inline size_t median_of_three(const RandomAccessIterator &array, size_t l, size_t m, size_t r) const { + return comp(array[l], array[m]) ? ( comp(array[m], array[r]) ? m : ( comp( array[l], array[r]) ? r : l ) ) + : ( comp(array[r], array[m]) ? m : ( comp( array[r], array[l] ) ? r : l ) ); + } + + inline size_t pseudo_median_of_nine( const RandomAccessIterator &array, const quick_sort_range &range ) const { + size_t offset = range.size/8u; + return median_of_three(array, + median_of_three(array, 0, offset, offset*2), + median_of_three(array, offset*3, offset*4, offset*5), + median_of_three(array, offset*6, offset*7, range.size - 1) ); + + } + +public: + + static const size_t grainsize = 500; + const Compare ∁ + RandomAccessIterator begin; + size_t size; + + quick_sort_range( RandomAccessIterator begin_, size_t size_, const Compare &comp_ ) : + comp(comp_), begin(begin_), size(size_) {} + + bool empty() const {return size==0;} + bool is_divisible() const {return size>=grainsize;} + + quick_sort_range( quick_sort_range& range, split ) : comp(range.comp) { + RandomAccessIterator array = range.begin; + RandomAccessIterator key0 = range.begin; + size_t m = pseudo_median_of_nine(array, range); + if (m) std::swap ( array[0], array[m] ); + + size_t i=0; + size_t j=range.size; + // Partition interval [i+1,j-1] with key *key0. + for(;;) { + __TBB_ASSERT( i +class quick_sort_pretest_body : internal::no_assign { + const Compare ∁ + +public: + quick_sort_pretest_body(const Compare &_comp) : comp(_comp) {} + + void operator()( const blocked_range& range ) const { + task &my_task = task::self(); + RandomAccessIterator my_end = range.end(); + + int i = 0; + for (RandomAccessIterator k = range.begin(); k != my_end; ++k, ++i) { + if ( i%64 == 0 && my_task.is_cancelled() ) break; + + // The k-1 is never out-of-range because the first chunk starts at begin+serial_cutoff+1 + if ( comp( *(k), *(k-1) ) ) { + my_task.cancel_group_execution(); + break; + } + } + } + +}; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! Body class used to sort elements in a range that is smaller than the grainsize. +/** @ingroup algorithms */ +template +struct quick_sort_body { + void operator()( const quick_sort_range& range ) const { + //SerialQuickSort( range.begin, range.size, range.comp ); + std::sort( range.begin, range.begin + range.size, range.comp ); + } +}; + +//! Wrapper method to initiate the sort by calling parallel_for. +/** @ingroup algorithms */ +template +void parallel_quick_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp ) { +#if __TBB_TASK_GROUP_CONTEXT + task_group_context my_context; + const int serial_cutoff = 9; + + __TBB_ASSERT( begin + serial_cutoff < end, "min_parallel_size is smaller than serial cutoff?" ); + RandomAccessIterator k; + for ( k = begin ; k != begin + serial_cutoff; ++k ) { + if ( comp( *(k+1), *k ) ) { + goto do_parallel_quick_sort; + } + } + + parallel_for( blocked_range(k+1, end), + quick_sort_pretest_body(comp), + auto_partitioner(), + my_context); + + if (my_context.is_group_execution_cancelled()) +do_parallel_quick_sort: +#endif /* __TBB_TASK_GROUP_CONTEXT */ + parallel_for( quick_sort_range(begin, end-begin, comp ), + quick_sort_body(), + auto_partitioner() ); +} + +} // namespace internal +//! @endcond + +/** \page parallel_sort_iter_req Requirements on iterators for parallel_sort + Requirements on value type \c T of \c RandomAccessIterator for \c parallel_sort: + - \code void swap( T& x, T& y ) \endcode Swaps \c x and \c y + - \code bool Compare::operator()( const T& x, const T& y ) \endcode + True if x comes before y; +**/ + +/** \name parallel_sort + See also requirements on \ref parallel_sort_iter_req "iterators for parallel_sort". **/ +//@{ + +//! Sorts the data in [begin,end) using the given comparator +/** The compare function object is used for all comparisons between elements during sorting. + The compare object must define a bool operator() function. + @ingroup algorithms **/ +template +void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end, const Compare& comp) { + const int min_parallel_size = 500; + if( end > begin ) { + if (end - begin < min_parallel_size) { + std::sort(begin, end, comp); + } else { + internal::parallel_quick_sort(begin, end, comp); + } + } +} + +//! Sorts the data in [begin,end) with a default comparator \c std::less +/** @ingroup algorithms **/ +template +inline void parallel_sort( RandomAccessIterator begin, RandomAccessIterator end ) { + parallel_sort( begin, end, std::less< typename std::iterator_traits::value_type >() ); +} + +//! Sorts the data in the range \c [begin,end) with a default comparator \c std::less +/** @ingroup algorithms **/ +template +inline void parallel_sort( T * begin, T * end ) { + parallel_sort( begin, end, std::less< T >() ); +} +//@} + + +} // namespace tbb + +#endif + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_while.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_while.h new file mode 100644 index 0000000000..0450de5351 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/parallel_while.h @@ -0,0 +1,194 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_parallel_while +#define __TBB_parallel_while + +#include "task.h" +#include + +namespace tbb { + +template +class parallel_while; + +//! @cond INTERNAL +namespace internal { + + template class while_task; + + //! For internal use only. + /** Executes one iteration of a while. + @ingroup algorithms */ + template + class while_iteration_task: public task { + const Body& my_body; + typename Body::argument_type my_value; + /*override*/ task* execute() { + my_body(my_value); + return NULL; + } + while_iteration_task( const typename Body::argument_type& value, const Body& body ) : + my_body(body), my_value(value) + {} + template friend class while_group_task; + friend class tbb::parallel_while; + }; + + //! For internal use only + /** Unpacks a block of iterations. + @ingroup algorithms */ + template + class while_group_task: public task { + static const size_t max_arg_size = 4; + const Body& my_body; + size_t size; + typename Body::argument_type my_arg[max_arg_size]; + while_group_task( const Body& body ) : my_body(body), size(0) {} + /*override*/ task* execute() { + typedef while_iteration_task iteration_type; + __TBB_ASSERT( size>0, NULL ); + task_list list; + task* t; + size_t k=0; + for(;;) { + t = new( allocate_child() ) iteration_type(my_arg[k],my_body); + if( ++k==size ) break; + list.push_back(*t); + } + set_ref_count(int(k+1)); + spawn(list); + spawn_and_wait_for_all(*t); + return NULL; + } + template friend class while_task; + }; + + //! For internal use only. + /** Gets block of iterations from a stream and packages them into a while_group_task. + @ingroup algorithms */ + template + class while_task: public task { + Stream& my_stream; + const Body& my_body; + empty_task& my_barrier; + /*override*/ task* execute() { + typedef while_group_task block_type; + block_type& t = *new( allocate_additional_child_of(my_barrier) ) block_type(my_body); + size_t k=0; + while( my_stream.pop_if_present(t.my_arg[k]) ) { + if( ++k==block_type::max_arg_size ) { + // There might be more iterations. + recycle_to_reexecute(); + break; + } + } + if( k==0 ) { + destroy(t); + return NULL; + } else { + t.size = k; + return &t; + } + } + while_task( Stream& stream, const Body& body, empty_task& barrier ) : + my_stream(stream), + my_body(body), + my_barrier(barrier) + {} + friend class tbb::parallel_while; + }; + +} // namespace internal +//! @endcond + +//! Parallel iteration over a stream, with optional addition of more work. +/** The Body b has the requirement: \n + "b(v)" \n + "b.argument_type" \n + where v is an argument_type + @ingroup algorithms */ +template +class parallel_while: internal::no_copy { +public: + //! Construct empty non-running parallel while. + parallel_while() : my_body(NULL), my_barrier(NULL) {} + + //! Destructor cleans up data members before returning. + ~parallel_while() { + if( my_barrier ) { + my_barrier->destroy(*my_barrier); + my_barrier = NULL; + } + } + + //! Type of items + typedef typename Body::argument_type value_type; + + //! Apply body.apply to each item in the stream. + /** A Stream s has the requirements \n + "S::value_type" \n + "s.pop_if_present(value) is convertible to bool */ + template + void run( Stream& stream, const Body& body ); + + //! Add a work item while running. + /** Should be executed only by body.apply or a thread spawned therefrom. */ + void add( const value_type& item ); + +private: + const Body* my_body; + empty_task* my_barrier; +}; + +template +template +void parallel_while::run( Stream& stream, const Body& body ) { + using namespace internal; + empty_task& barrier = *new( task::allocate_root() ) empty_task(); + my_body = &body; + my_barrier = &barrier; + my_barrier->set_ref_count(2); + while_task& w = *new( my_barrier->allocate_child() ) while_task( stream, body, barrier ); + my_barrier->spawn_and_wait_for_all(w); + my_barrier->destroy(*my_barrier); + my_barrier = NULL; + my_body = NULL; +} + +template +void parallel_while::add( const value_type& item ) { + __TBB_ASSERT(my_barrier,"attempt to add to parallel_while that is not running"); + typedef internal::while_iteration_task iteration_type; + iteration_type& i = *new( task::allocate_additional_child_of(*my_barrier) ) iteration_type(item,*my_body); + task::self().spawn( i ); +} + +} // namespace + +#endif /* __TBB_parallel_while */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/partitioner.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/partitioner.h new file mode 100644 index 0000000000..c921bebd05 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/partitioner.h @@ -0,0 +1,521 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_partitioner_H +#define __TBB_partitioner_H + +#ifndef __TBB_INITIAL_CHUNKS +#define __TBB_INITIAL_CHUNKS 2 +#endif +#ifndef __TBB_RANGE_POOL_CAPACITY +#define __TBB_RANGE_POOL_CAPACITY 8 +#endif +#ifndef __TBB_INIT_DEPTH +#define __TBB_INIT_DEPTH 5 +#endif + +#include "task.h" +#include "aligned_space.h" +#include "atomic.h" + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (push) + #pragma warning (disable: 4244) +#endif + +namespace tbb { + +class auto_partitioner; +class simple_partitioner; +class affinity_partitioner; +namespace interface6 { + namespace internal { + class affinity_partition_type; + } +} + +namespace internal { +size_t __TBB_EXPORTED_FUNC get_initial_auto_partitioner_divisor(); + +//! Defines entry point for affinity partitioner into tbb run-time library. +class affinity_partitioner_base_v3: no_copy { + friend class tbb::affinity_partitioner; + friend class tbb::interface6::internal::affinity_partition_type; + //! Array that remembers affinities of tree positions to affinity_id. + /** NULL if my_size==0. */ + affinity_id* my_array; + //! Number of elements in my_array. + size_t my_size; + //! Zeros the fields. + affinity_partitioner_base_v3() : my_array(NULL), my_size(0) {} + //! Deallocates my_array. + ~affinity_partitioner_base_v3() {resize(0);} + //! Resize my_array. + /** Retains values if resulting size is the same. */ + void __TBB_EXPORTED_METHOD resize( unsigned factor ); +}; + +//! Provides backward-compatible methods for partition objects without affinity. +class partition_type_base { +public: + void set_affinity( task & ) {} + void note_affinity( task::affinity_id ) {} + task* continue_after_execute_range() {return NULL;} + bool decide_whether_to_delay() {return false;} + void spawn_or_delay( bool, task& b ) { + task::spawn(b); + } +}; + +template class start_scan; + +} // namespace internal +//! @endcond + +namespace serial { +namespace interface6 { +template class start_for; +} +} + +namespace interface6 { +//! @cond INTERNAL +namespace internal { +using namespace tbb::internal; +template class start_for; +template class start_reduce; + +//! Join task node that contains shared flag for stealing feedback +class flag_task: public task { +public: + tbb::atomic my_child_stolen; + flag_task() { my_child_stolen = false; } + task* execute() { return NULL; } + static void mark_task_stolen(task &t) { + tbb::atomic &flag = static_cast(t.parent())->my_child_stolen; +#if TBB_USE_THREADING_TOOLS + // Threading tools respect lock prefix but report false-positive data-race via plain store + flag.fetch_and_store(true); +#else + flag = true; +#endif //TBB_USE_THREADING_TOOLS + } + static bool is_peer_stolen(task &t) { + return static_cast(t.parent())->my_child_stolen; + } +}; + +//! Task to signal the demand without carrying the work +class signal_task: public task { +public: + task* execute() { + if( is_stolen_task() ) { + flag_task::mark_task_stolen(*this); + } + return NULL; + } +}; + +//! Depth is a relative depth of recursive division inside a range pool. Relative depth allows +//! infinite absolute depth of the recursion for heavily imbalanced workloads with range represented +//! by a number that cannot fit into machine word. +typedef unsigned char depth_t; + +//! Range pool stores ranges of type T in a circular buffer with MaxCapacity +template +class range_vector { + depth_t my_head; + depth_t my_tail; + depth_t my_size; + depth_t my_depth[MaxCapacity]; // relative depths of stored ranges + tbb::aligned_space my_pool; + +public: + //! initialize via first range in pool + range_vector(const T& elem) : my_head(0), my_tail(0), my_size(1) { + my_depth[0] = 0; + new( my_pool.begin() ) T(elem);//TODO: std::move? + } + ~range_vector() { + while( !empty() ) pop_back(); + } + bool empty() const { return my_size == 0; } + depth_t size() const { return my_size; } + //! Populates range pool via ranges up to max depth or while divisible + //! max_depth starts from 0, e.g. value 2 makes 3 ranges in the pool up to two 1/4 pieces + void split_to_fill(depth_t max_depth) { + while( my_size < MaxCapacity && my_depth[my_head] < max_depth + && my_pool.begin()[my_head].is_divisible() ) { + depth_t prev = my_head; + my_head = (my_head + 1) % MaxCapacity; + new(my_pool.begin()+my_head) T(my_pool.begin()[prev]); // copy TODO: std::move? + my_pool.begin()[prev].~T(); // instead of assignment + new(my_pool.begin()+prev) T(my_pool.begin()[my_head], split()); // do 'inverse' split + my_depth[my_head] = ++my_depth[prev]; + my_size++; + } + } + void pop_back() { + __TBB_ASSERT(my_size > 0, "range_vector::pop_back() with empty size"); + my_pool.begin()[my_head].~T(); + my_size--; + my_head = (my_head + MaxCapacity - 1) % MaxCapacity; + } + void pop_front() { + __TBB_ASSERT(my_size > 0, "range_vector::pop_front() with empty size"); + my_pool.begin()[my_tail].~T(); + my_size--; + my_tail = (my_tail + 1) % MaxCapacity; + } + T& back() { + __TBB_ASSERT(my_size > 0, "range_vector::back() with empty size"); + return my_pool.begin()[my_head]; + } + T& front() { + __TBB_ASSERT(my_size > 0, "range_vector::front() with empty size"); + return my_pool.begin()[my_tail]; + } + //! similarly to front(), returns depth of the first range in the pool + depth_t front_depth() { + __TBB_ASSERT(my_size > 0, "range_vector::front_depth() with empty size"); + return my_depth[my_tail]; + } +}; + +//! Provides default methods for partition objects and common algorithm blocks. +template +struct partition_type_base { + // decision makers + void set_affinity( task & ) {} + void note_affinity( task::affinity_id ) {} + bool check_being_stolen(task &) { return false; } // part of old should_execute_range() + bool check_for_demand(task &) { return false; } + bool divisions_left() { return true; } // part of old should_execute_range() + bool should_create_trap() { return false; } + depth_t max_depth() { return 0; } + void align_depth(depth_t) { } + // common function blocks + Partition& derived() { return *static_cast(this); } + template + flag_task* split_work(StartType &start) { + flag_task* parent_ptr = start.create_continuation(); // the type here is to express expectation + start.set_parent(parent_ptr); + parent_ptr->set_ref_count(2); + StartType& right_work = *new( parent_ptr->allocate_child() ) StartType(start, split()); + start.spawn(right_work); + return parent_ptr; + } + template + void execute(StartType &start, Range &range) { + // The algorithm in a few words ([]-denotes calls to decision methods of partitioner): + // [If this task is stolen, adjust depth and divisions if necessary, set flag]. + // If range is divisible { + // Spread the work while [initial divisions left]; + // Create trap task [if necessary]; + // } + // If not divisible or [max depth is reached], execute, else do the range pool part + task* parent_ptr = start.parent(); + if( range.is_divisible() ) { + if( derived().divisions_left() ) + do parent_ptr = split_work(start); // split until divisions_left() + while( range.is_divisible() && derived().divisions_left() ); + if( derived().should_create_trap() ) { // only for range pool + if( parent_ptr->ref_count() > 1 ) { // create new parent if necessary + parent_ptr = start.create_continuation(); + start.set_parent(parent_ptr); + } else __TBB_ASSERT(parent_ptr->ref_count() == 1, NULL); + parent_ptr->set_ref_count(2); // safe because parent has only one reference + signal_task& right_signal = *new( parent_ptr->allocate_child() ) signal_task(); + start.spawn(right_signal); // pure signal is to avoid deep recursion in the end + } + } + if( !range.is_divisible() || !derived().max_depth() ) + start.run_body( range ); // simple partitioner goes always here + else { // do range pool + internal::range_vector range_pool(range); + do { + range_pool.split_to_fill(derived().max_depth()); // fill range pool + if( derived().check_for_demand( start ) ) { + if( range_pool.size() > 1 ) { + parent_ptr = start.create_continuation(); + start.set_parent(parent_ptr); + parent_ptr->set_ref_count(2); + StartType& right_work = *new( parent_ptr->allocate_child() ) StartType(start, range_pool.front(), range_pool.front_depth()); + start.spawn(right_work); + range_pool.pop_front(); + continue; + } + if( range_pool.back().is_divisible() ) // was not enough depth to fork a task + continue; // note: check_for_demand() should guarantee increasing max_depth() next time + } + start.run_body( range_pool.back() ); + range_pool.pop_back(); + } while( !range_pool.empty() && !start.is_cancelled() ); + } + } +}; + +//! Provides default methods for auto (adaptive) partition objects. +template +struct auto_partition_type_base : partition_type_base { + size_t my_divisor; + depth_t my_max_depth; + auto_partition_type_base() : my_max_depth(__TBB_INIT_DEPTH) { + my_divisor = tbb::internal::get_initial_auto_partitioner_divisor()*__TBB_INITIAL_CHUNKS/4; + __TBB_ASSERT(my_divisor, "initial value of get_initial_auto_partitioner_divisor() is not valid"); + } + auto_partition_type_base(auto_partition_type_base &src, split) { + my_max_depth = src.my_max_depth; +#if __TBB_INITIAL_TASK_IMBALANCE + if( src.my_divisor <= 1 ) my_divisor = 0; + else my_divisor = src.my_divisor = (src.my_divisor+1u) / 2u; +#else + my_divisor = src.my_divisor / 2u; + src.my_divisor = src.my_divisor - my_divisor; // TODO: check the effect separately + if(my_divisor) src.my_max_depth += static_cast(__TBB_Log2(src.my_divisor/my_divisor)); +#endif + } + bool check_being_stolen( task &t) { // part of old should_execute_range() + if( !my_divisor ) { // if not from the top P tasks of binary tree + my_divisor = 1; // TODO: replace by on-stack flag (partition_state's member)? + if( t.is_stolen_task() ) { +#if TBB_USE_EXCEPTIONS + // RTTI is available, check whether the cast is valid + __TBB_ASSERT(dynamic_cast(t.parent()), 0); + // correctness of the cast relies on avoiding the root task for which: + // - initial value of my_divisor != 0 (protected by separate assertion) + // - is_stolen_task() always returns false for the root task. +#endif + flag_task::mark_task_stolen(t); + my_max_depth++; + return true; + } + } + return false; + } + bool divisions_left() { // part of old should_execute_range() + if( my_divisor > 1 ) return true; + if( my_divisor && my_max_depth > 1 ) { // can split the task and once more internally. TODO: on-stack flag instead + // keep same fragmentation while splitting for the local task pool + my_max_depth--; + my_divisor = 0; // decrease max_depth once per task + return true; + } else return false; + } + bool should_create_trap() { + return my_divisor > 0; + } + bool check_for_demand(task &t) { + if( flag_task::is_peer_stolen(t) ) { + my_max_depth++; + return true; + } else return false; + } + void align_depth(depth_t base) { + __TBB_ASSERT(base <= my_max_depth, 0); + my_max_depth -= base; + } + depth_t max_depth() { return my_max_depth; } +}; + +//! Provides default methods for affinity (adaptive) partition objects. +class affinity_partition_type : public auto_partition_type_base { + static const unsigned factor_power = 4; + static const unsigned factor = 1< factor ) + d &= 0u-factor; + map_mid = map_end - d; + } +public: + affinity_partition_type( tbb::internal::affinity_partitioner_base_v3& ap ) { + __TBB_ASSERT( (factor&(factor-1))==0, "factor must be power of two" ); + ap.resize(factor); + my_array = ap.my_array; + map_begin = 0; + map_end = unsigned(ap.my_size); + set_mid(); + my_delay = true; + my_divisor /= __TBB_INITIAL_CHUNKS; // let exactly P tasks to be distributed across workers + my_max_depth = factor_power+1; // the first factor_power ranges will be spawned, and >=1 ranges should be left + __TBB_ASSERT( my_max_depth < __TBB_RANGE_POOL_CAPACITY, 0 ); + } + affinity_partition_type(affinity_partition_type& p, split) + : auto_partition_type_base(p, split()), my_array(p.my_array) { + __TBB_ASSERT( p.map_end-p.map_begin__TBB_Log2(map_end-map_mid), 0); + return true;// do not do my_max_depth++ here, but be sure my_max_depth is big enough + } + if( flag_task::is_peer_stolen(t) ) { + my_max_depth++; + return true; + } + } else my_delay = false; + return false; + } + bool divisions_left() { // part of old should_execute_range() + return my_divisor > 1; + } + bool should_create_trap() { + return true; // TODO: rethink for the stage after memorizing level + } + static const unsigned range_pool_size = __TBB_RANGE_POOL_CAPACITY; +}; + +class auto_partition_type: public auto_partition_type_base { +public: + auto_partition_type( const auto_partitioner& ) {} + auto_partition_type( auto_partition_type& src, split) + : auto_partition_type_base(src, split()) {} + static const unsigned range_pool_size = __TBB_RANGE_POOL_CAPACITY; +}; + +class simple_partition_type: public partition_type_base { +public: + simple_partition_type( const simple_partitioner& ) {} + simple_partition_type( const simple_partition_type&, split ) {} + //! simplified algorithm + template + void execute(StartType &start, Range &range) { + while( range.is_divisible() ) + split_work( start ); + start.run_body( range ); + } + //static const unsigned range_pool_size = 1; - not necessary because execute() is overridden +}; + +//! Backward-compatible partition for auto and affinity partition objects. +class old_auto_partition_type: public tbb::internal::partition_type_base { + size_t num_chunks; + static const size_t VICTIM_CHUNKS = 4; +public: + bool should_execute_range(const task &t) { + if( num_chunks friend class serial::interface6::start_for; + template friend class interface6::internal::start_for; + template friend class interface6::internal::start_reduce; + template friend class internal::start_scan; + // backward compatibility + class partition_type: public internal::partition_type_base { + public: + bool should_execute_range(const task& ) {return false;} + partition_type( const simple_partitioner& ) {} + partition_type( const partition_type&, split ) {} + }; + // new implementation just extends existing interface + typedef interface6::internal::simple_partition_type task_partition_type; +}; + +//! An auto partitioner +/** The range is initial divided into several large chunks. + Chunks are further subdivided into smaller pieces if demand detected and they are divisible. + @ingroup algorithms */ +class auto_partitioner { +public: + auto_partitioner() {} + +private: + template friend class serial::interface6::start_for; + template friend class interface6::internal::start_for; + template friend class interface6::internal::start_reduce; + template friend class internal::start_scan; + // backward compatibility + typedef interface6::internal::old_auto_partition_type partition_type; + // new implementation just extends existing interface + typedef interface6::internal::auto_partition_type task_partition_type; +}; + +//! An affinity partitioner +class affinity_partitioner: internal::affinity_partitioner_base_v3 { +public: + affinity_partitioner() {} + +private: + template friend class serial::interface6::start_for; + template friend class interface6::internal::start_for; + template friend class interface6::internal::start_reduce; + template friend class internal::start_scan; + // backward compatibility - for parallel_scan only + typedef interface6::internal::old_auto_partition_type partition_type; + // new implementation just extends existing interface + typedef interface6::internal::affinity_partition_type task_partition_type; +}; + +} // namespace tbb + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4244 is back +#undef __TBB_INITIAL_CHUNKS +#undef __TBB_RANGE_POOL_CAPACITY +#undef __TBB_INIT_DEPTH +#endif /* __TBB_partitioner_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/pipeline.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/pipeline.h new file mode 100644 index 0000000000..e6d3a9005f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/pipeline.h @@ -0,0 +1,673 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_pipeline_H +#define __TBB_pipeline_H + +#include "atomic.h" +#include "task.h" +#include "tbb_allocator.h" +#include + +//TODO: consider more accurate method to check if need to implement ourself +#if !TBB_IMPLEMENT_CPP0X +#include +#endif + +namespace tbb { + +class pipeline; +class filter; + +//! @cond INTERNAL +namespace internal { + +// The argument for PIPELINE_VERSION should be an integer between 2 and 9 +#define __TBB_PIPELINE_VERSION(x) ((unsigned char)(x-2)<<1) + +typedef unsigned long Token; +typedef long tokendiff_t; +class stage_task; +class input_buffer; +class pipeline_root_task; +class pipeline_cleaner; + +} // namespace internal + +namespace interface6 { + template class filter_t; + + namespace internal { + class pipeline_proxy; + } +} + +//! @endcond + +//! A stage in a pipeline. +/** @ingroup algorithms */ +class filter: internal::no_copy { +private: + //! Value used to mark "not in pipeline" + static filter* not_in_pipeline() {return reinterpret_cast(intptr_t(-1));} +protected: + //! The lowest bit 0 is for parallel vs. serial + static const unsigned char filter_is_serial = 0x1; + + //! 4th bit distinguishes ordered vs unordered filters. + /** The bit was not set for parallel filters in TBB 2.1 and earlier, + but is_ordered() function always treats parallel filters as out of order. */ + static const unsigned char filter_is_out_of_order = 0x1<<4; + + //! 5th bit distinguishes thread-bound and regular filters. + static const unsigned char filter_is_bound = 0x1<<5; + + //! 6th bit marks input filters emitting small objects + static const unsigned char filter_may_emit_null = 0x1<<6; + + //! 7th bit defines exception propagation mode expected by the application. + static const unsigned char exact_exception_propagation = +#if TBB_USE_CAPTURED_EXCEPTION + 0x0; +#else + 0x1<<7; +#endif /* TBB_USE_CAPTURED_EXCEPTION */ + + static const unsigned char current_version = __TBB_PIPELINE_VERSION(5); + static const unsigned char version_mask = 0x7<<1; // bits 1-3 are for version +public: + enum mode { + //! processes multiple items in parallel and in no particular order + parallel = current_version | filter_is_out_of_order, + //! processes items one at a time; all such filters process items in the same order + serial_in_order = current_version | filter_is_serial, + //! processes items one at a time and in no particular order + serial_out_of_order = current_version | filter_is_serial | filter_is_out_of_order, + //! @deprecated use serial_in_order instead + serial = serial_in_order + }; +protected: + filter( bool is_serial_ ) : + next_filter_in_pipeline(not_in_pipeline()), + my_input_buffer(NULL), + my_filter_mode(static_cast((is_serial_ ? serial : parallel) | exact_exception_propagation)), + prev_filter_in_pipeline(not_in_pipeline()), + my_pipeline(NULL), + next_segment(NULL) + {} + + filter( mode filter_mode ) : + next_filter_in_pipeline(not_in_pipeline()), + my_input_buffer(NULL), + my_filter_mode(static_cast(filter_mode | exact_exception_propagation)), + prev_filter_in_pipeline(not_in_pipeline()), + my_pipeline(NULL), + next_segment(NULL) + {} + + // signal end-of-input for concrete_filters + void __TBB_EXPORTED_METHOD set_end_of_input(); + +public: + //! True if filter is serial. + bool is_serial() const { + return bool( my_filter_mode & filter_is_serial ); + } + + //! True if filter must receive stream in order. + bool is_ordered() const { + return (my_filter_mode & (filter_is_out_of_order|filter_is_serial))==filter_is_serial; + } + + //! True if filter is thread-bound. + bool is_bound() const { + return ( my_filter_mode & filter_is_bound )==filter_is_bound; + } + + //! true if an input filter can emit null + bool object_may_be_null() { + return ( my_filter_mode & filter_may_emit_null ) == filter_may_emit_null; + } + + //! Operate on an item from the input stream, and return item for output stream. + /** Returns NULL if filter is a sink. */ + virtual void* operator()( void* item ) = 0; + + //! Destroy filter. + /** If the filter was added to a pipeline, the pipeline must be destroyed first. */ + virtual __TBB_EXPORTED_METHOD ~filter(); + +#if __TBB_TASK_GROUP_CONTEXT + //! Destroys item if pipeline was cancelled. + /** Required to prevent memory leaks. + Note it can be called concurrently even for serial filters.*/ + virtual void finalize( void* /*item*/ ) {}; +#endif + +private: + //! Pointer to next filter in the pipeline. + filter* next_filter_in_pipeline; + + //! has the filter not yet processed all the tokens it will ever see? + // (pipeline has not yet reached end_of_input or this filter has not yet + // seen the last token produced by input_filter) + bool has_more_work(); + + //! Buffer for incoming tokens, or NULL if not required. + /** The buffer is required if the filter is serial or follows a thread-bound one. */ + internal::input_buffer* my_input_buffer; + + friend class internal::stage_task; + friend class internal::pipeline_root_task; + friend class pipeline; + friend class thread_bound_filter; + + //! Storage for filter mode and dynamically checked implementation version. + const unsigned char my_filter_mode; + + //! Pointer to previous filter in the pipeline. + filter* prev_filter_in_pipeline; + + //! Pointer to the pipeline. + pipeline* my_pipeline; + + //! Pointer to the next "segment" of filters, or NULL if not required. + /** In each segment, the first filter is not thread-bound but follows a thread-bound one. */ + filter* next_segment; +}; + +//! A stage in a pipeline served by a user thread. +/** @ingroup algorithms */ +class thread_bound_filter: public filter { +public: + enum result_type { + // item was processed + success, + // item is currently not available + item_not_available, + // there are no more items to process + end_of_stream + }; +protected: + thread_bound_filter(mode filter_mode): + filter(static_cast(filter_mode | filter::filter_is_bound)) + {} +public: + //! If a data item is available, invoke operator() on that item. + /** This interface is non-blocking. + Returns 'success' if an item was processed. + Returns 'item_not_available' if no item can be processed now + but more may arrive in the future, or if token limit is reached. + Returns 'end_of_stream' if there are no more items to process. */ + result_type __TBB_EXPORTED_METHOD try_process_item(); + + //! Wait until a data item becomes available, and invoke operator() on that item. + /** This interface is blocking. + Returns 'success' if an item was processed. + Returns 'end_of_stream' if there are no more items to process. + Never returns 'item_not_available', as it blocks until another return condition applies. */ + result_type __TBB_EXPORTED_METHOD process_item(); + +private: + //! Internal routine for item processing + result_type internal_process_item(bool is_blocking); +}; + +//! A processing pipeline that applies filters to items. +/** @ingroup algorithms */ +class pipeline { +public: + //! Construct empty pipeline. + __TBB_EXPORTED_METHOD pipeline(); + + /** Though the current implementation declares the destructor virtual, do not rely on this + detail. The virtualness is deprecated and may disappear in future versions of TBB. */ + virtual __TBB_EXPORTED_METHOD ~pipeline(); + + //! Add filter to end of pipeline. + void __TBB_EXPORTED_METHOD add_filter( filter& filter_ ); + + //! Run the pipeline to completion. + void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens ); + +#if __TBB_TASK_GROUP_CONTEXT + //! Run the pipeline to completion with user-supplied context. + void __TBB_EXPORTED_METHOD run( size_t max_number_of_live_tokens, tbb::task_group_context& context ); +#endif + + //! Remove all filters from the pipeline. + void __TBB_EXPORTED_METHOD clear(); + +private: + friend class internal::stage_task; + friend class internal::pipeline_root_task; + friend class filter; + friend class thread_bound_filter; + friend class internal::pipeline_cleaner; + friend class tbb::interface6::internal::pipeline_proxy; + + //! Pointer to first filter in the pipeline. + filter* filter_list; + + //! Pointer to location where address of next filter to be added should be stored. + filter* filter_end; + + //! task who's reference count is used to determine when all stages are done. + task* end_counter; + + //! Number of idle tokens waiting for input stage. + atomic input_tokens; + + //! Global counter of tokens + atomic token_counter; + + //! False until fetch_input returns NULL. + bool end_of_input; + + //! True if the pipeline contains a thread-bound filter; false otherwise. + bool has_thread_bound_filters; + + //! Remove filter from pipeline. + void remove_filter( filter& filter_ ); + + //! Not used, but retained to satisfy old export files. + void __TBB_EXPORTED_METHOD inject_token( task& self ); + +#if __TBB_TASK_GROUP_CONTEXT + //! Does clean up if pipeline is cancelled or exception occurred + void clear_filters(); +#endif +}; + +//------------------------------------------------------------------------ +// Support for lambda-friendly parallel_pipeline interface +//------------------------------------------------------------------------ + +namespace interface6 { + +namespace internal { + template class concrete_filter; +} + +//! input_filter control to signal end-of-input for parallel_pipeline +class flow_control { + bool is_pipeline_stopped; + flow_control() { is_pipeline_stopped = false; } + template friend class internal::concrete_filter; +public: + void stop() { is_pipeline_stopped = true; } +}; + +//! @cond INTERNAL +namespace internal { + +template struct tbb_large_object {enum { value = sizeof(T) > sizeof(void *) }; }; + +#if TBB_IMPLEMENT_CPP0X +// cannot use SFINAE in current compilers. Explicitly list the types we wish to be +// placed as-is in the pipeline input_buffers. +template struct tbb_trivially_copyable { enum { value = false }; }; +template struct tbb_trivially_copyable { enum { value = true }; }; +template<> struct tbb_trivially_copyable { enum { value = true }; }; +template<> struct tbb_trivially_copyable { enum { value = true }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +template<> struct tbb_trivially_copyable { enum { value = !tbb_large_object::value }; }; +#else +#if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__ +template struct tbb_trivially_copyable { enum { value = std::has_trivial_copy_constructor::value }; }; +#else +template struct tbb_trivially_copyable { enum { value = std::is_trivially_copyable::value }; }; +#endif // +#endif // TBB_IMPLEMENT_CPP0X + +template struct is_large_object {enum { value = tbb_large_object::value || !tbb_trivially_copyable::value }; }; + +template class token_helper; + +// large object helper (uses tbb_allocator) +template +class token_helper { + public: + typedef typename tbb::tbb_allocator allocator; + typedef T* pointer; + typedef T value_type; + static pointer create_token(const value_type & source) { + pointer output_t = allocator().allocate(1); + return new (output_t) T(source); + } + static value_type & token(pointer & t) { return *t;} + static void * cast_to_void_ptr(pointer ref) { return (void *) ref; } + static pointer cast_from_void_ptr(void * ref) { return (pointer)ref; } + static void destroy_token(pointer token) { + allocator().destroy(token); + allocator().deallocate(token,1); + } +}; + +// pointer specialization +template +class token_helper { + public: + typedef T* pointer; + typedef T* value_type; + static pointer create_token(const value_type & source) { return source; } + static value_type & token(pointer & t) { return t;} + static void * cast_to_void_ptr(pointer ref) { return (void *)ref; } + static pointer cast_from_void_ptr(void * ref) { return (pointer)ref; } + static void destroy_token( pointer /*token*/) {} +}; + +// small object specialization (converts void* to the correct type, passes objects directly.) +template +class token_helper { + typedef union { + T actual_value; + void * void_overlay; + } type_to_void_ptr_map; + public: + typedef T pointer; // not really a pointer in this case. + typedef T value_type; + static pointer create_token(const value_type & source) { + return source; } + static value_type & token(pointer & t) { return t;} + static void * cast_to_void_ptr(pointer ref) { + type_to_void_ptr_map mymap; + mymap.void_overlay = NULL; + mymap.actual_value = ref; + return mymap.void_overlay; + } + static pointer cast_from_void_ptr(void * ref) { + type_to_void_ptr_map mymap; + mymap.void_overlay = ref; + return mymap.actual_value; + } + static void destroy_token( pointer /*token*/) {} +}; + +template +class concrete_filter: public tbb::filter { + const Body& my_body; + typedef token_helper::value > t_helper; + typedef typename t_helper::pointer t_pointer; + typedef token_helper::value > u_helper; + typedef typename u_helper::pointer u_pointer; + + /*override*/ void* operator()(void* input) { + t_pointer temp_input = t_helper::cast_from_void_ptr(input); + u_pointer output_u = u_helper::create_token(my_body(t_helper::token(temp_input))); + t_helper::destroy_token(temp_input); + return u_helper::cast_to_void_ptr(output_u); + } + + /*override*/ void finalize(void * input) { + t_pointer temp_input = t_helper::cast_from_void_ptr(input); + t_helper::destroy_token(temp_input); + } + +public: + concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} +}; + +// input +template +class concrete_filter: public filter { + const Body& my_body; + typedef token_helper::value > u_helper; + typedef typename u_helper::pointer u_pointer; + + /*override*/void* operator()(void*) { + flow_control control; + u_pointer output_u = u_helper::create_token(my_body(control)); + if(control.is_pipeline_stopped) { + u_helper::destroy_token(output_u); + set_end_of_input(); + return NULL; + } + return u_helper::cast_to_void_ptr(output_u); + } + +public: + concrete_filter(tbb::filter::mode filter_mode, const Body& body) : + filter(static_cast(filter_mode | filter_may_emit_null)), + my_body(body) + {} +}; + +template +class concrete_filter: public filter { + const Body& my_body; + typedef token_helper::value > t_helper; + typedef typename t_helper::pointer t_pointer; + + /*override*/ void* operator()(void* input) { + t_pointer temp_input = t_helper::cast_from_void_ptr(input); + my_body(t_helper::token(temp_input)); + t_helper::destroy_token(temp_input); + return NULL; + } + /*override*/ void finalize(void* input) { + t_pointer temp_input = t_helper::cast_from_void_ptr(input); + t_helper::destroy_token(temp_input); + } + +public: + concrete_filter(tbb::filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} +}; + +template +class concrete_filter: public filter { + const Body& my_body; + + /** Override privately because it is always called virtually */ + /*override*/ void* operator()(void*) { + flow_control control; + my_body(control); + void* output = control.is_pipeline_stopped ? NULL : (void*)(intptr_t)-1; + return output; + } +public: + concrete_filter(filter::mode filter_mode, const Body& body) : filter(filter_mode), my_body(body) {} +}; + +//! The class that represents an object of the pipeline for parallel_pipeline(). +/** It primarily serves as RAII class that deletes heap-allocated filter instances. */ +class pipeline_proxy { + tbb::pipeline my_pipe; +public: + pipeline_proxy( const filter_t& filter_chain ); + ~pipeline_proxy() { + while( filter* f = my_pipe.filter_list ) + delete f; // filter destructor removes it from the pipeline + } + tbb::pipeline* operator->() { return &my_pipe; } +}; + +//! Abstract base class that represents a node in a parse tree underlying a filter_t. +/** These nodes are always heap-allocated and can be shared by filter_t objects. */ +class filter_node: tbb::internal::no_copy { + /** Count must be atomic because it is hidden state for user, but might be shared by threads. */ + tbb::atomic ref_count; +protected: + filter_node() { + ref_count = 0; +#ifdef __TBB_TEST_FILTER_NODE_COUNT + ++(__TBB_TEST_FILTER_NODE_COUNT); +#endif + } +public: + //! Add concrete_filter to pipeline + virtual void add_to( pipeline& ) = 0; + //! Increment reference count + void add_ref() {++ref_count;} + //! Decrement reference count and delete if it becomes zero. + void remove_ref() { + __TBB_ASSERT(ref_count>0,"ref_count underflow"); + if( --ref_count==0 ) + delete this; + } + virtual ~filter_node() { +#ifdef __TBB_TEST_FILTER_NODE_COUNT + --(__TBB_TEST_FILTER_NODE_COUNT); +#endif + } +}; + +//! Node in parse tree representing result of make_filter. +template +class filter_node_leaf: public filter_node { + const tbb::filter::mode mode; + const Body body; + /*override*/void add_to( pipeline& p ) { + concrete_filter* f = new concrete_filter(mode,body); + p.add_filter( *f ); + } +public: + filter_node_leaf( tbb::filter::mode m, const Body& b ) : mode(m), body(b) {} +}; + +//! Node in parse tree representing join of two filters. +class filter_node_join: public filter_node { + friend class filter_node; // to suppress GCC 3.2 warnings + filter_node& left; + filter_node& right; + /*override*/~filter_node_join() { + left.remove_ref(); + right.remove_ref(); + } + /*override*/void add_to( pipeline& p ) { + left.add_to(p); + right.add_to(p); + } +public: + filter_node_join( filter_node& x, filter_node& y ) : left(x), right(y) { + left.add_ref(); + right.add_ref(); + } +}; + +} // namespace internal +//! @endcond + +//! Create a filter to participate in parallel_pipeline +template +filter_t make_filter(tbb::filter::mode mode, const Body& body) { + return new internal::filter_node_leaf(mode, body); +} + +template +filter_t operator& (const filter_t& left, const filter_t& right) { + __TBB_ASSERT(left.root,"cannot use default-constructed filter_t as left argument of '&'"); + __TBB_ASSERT(right.root,"cannot use default-constructed filter_t as right argument of '&'"); + return new internal::filter_node_join(*left.root,*right.root); +} + +//! Class representing a chain of type-safe pipeline filters +template +class filter_t { + typedef internal::filter_node filter_node; + filter_node* root; + filter_t( filter_node* root_ ) : root(root_) { + root->add_ref(); + } + friend class internal::pipeline_proxy; + template + friend filter_t make_filter(tbb::filter::mode, const Body& ); + template + friend filter_t operator& (const filter_t& , const filter_t& ); +public: + filter_t() : root(NULL) {} + filter_t( const filter_t& rhs ) : root(rhs.root) { + if( root ) root->add_ref(); + } + template + filter_t( tbb::filter::mode mode, const Body& body ) : + root( new internal::filter_node_leaf(mode, body) ) { + root->add_ref(); + } + + void operator=( const filter_t& rhs ) { + // Order of operations below carefully chosen so that reference counts remain correct + // in unlikely event that remove_ref throws exception. + filter_node* old = root; + root = rhs.root; + if( root ) root->add_ref(); + if( old ) old->remove_ref(); + } + ~filter_t() { + if( root ) root->remove_ref(); + } + void clear() { + // Like operator= with filter_t() on right side. + if( root ) { + filter_node* old = root; + root = NULL; + old->remove_ref(); + } + } +}; + +inline internal::pipeline_proxy::pipeline_proxy( const filter_t& filter_chain ) : my_pipe() { + __TBB_ASSERT( filter_chain.root, "cannot apply parallel_pipeline to default-constructed filter_t" ); + filter_chain.root->add_to(my_pipe); +} + +inline void parallel_pipeline(size_t max_number_of_live_tokens, const filter_t& filter_chain +#if __TBB_TASK_GROUP_CONTEXT + , tbb::task_group_context& context +#endif + ) { + internal::pipeline_proxy pipe(filter_chain); + // tbb::pipeline::run() is called via the proxy + pipe->run(max_number_of_live_tokens +#if __TBB_TASK_GROUP_CONTEXT + , context +#endif + ); +} + +#if __TBB_TASK_GROUP_CONTEXT +inline void parallel_pipeline(size_t max_number_of_live_tokens, const filter_t& filter_chain) { + tbb::task_group_context context; + parallel_pipeline(max_number_of_live_tokens, filter_chain, context); +} +#endif // __TBB_TASK_GROUP_CONTEXT + +} // interface6 + +using interface6::flow_control; +using interface6::filter_t; +using interface6::make_filter; +using interface6::parallel_pipeline; + +} // tbb + +#endif /* __TBB_pipeline_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_mutex.h new file mode 100644 index 0000000000..a588ac7d8e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_mutex.h @@ -0,0 +1,131 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_queuing_mutex_H +#define __TBB_queuing_mutex_H + +#include "tbb_config.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#include "atomic.h" +#include "tbb_profiling.h" + +namespace tbb { + +//! Queuing mutex with local-only spinning. +/** @ingroup synchronization */ +class queuing_mutex { +public: + //! Construct unacquired mutex. + queuing_mutex() { + q_tail = NULL; +#if TBB_USE_THREADING_TOOLS + internal_construct(); +#endif + } + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock: internal::no_copy { + //! Initialize fields to mean "no lock held". + void initialize() { + mutex = NULL; +#if TBB_USE_ASSERT + internal::poison_pointer(next); +#endif /* TBB_USE_ASSERT */ + } + + public: + //! Construct lock that has not acquired a mutex. + /** Equivalent to zero-initialization of *this. */ + scoped_lock() {initialize();} + + //! Acquire lock on given mutex. + scoped_lock( queuing_mutex& m ) { + initialize(); + acquire(m); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( mutex ) release(); + } + + //! Acquire lock on given mutex. + void __TBB_EXPORTED_METHOD acquire( queuing_mutex& m ); + + //! Acquire lock on given mutex if free (i.e. non-blocking) + bool __TBB_EXPORTED_METHOD try_acquire( queuing_mutex& m ); + + //! Release lock. + void __TBB_EXPORTED_METHOD release(); + + private: + //! The pointer to the mutex owned, or NULL if not holding a mutex. + queuing_mutex* mutex; + + //! The pointer to the next competitor for a mutex + scoped_lock *next; + + //! The local spin-wait variable + /** Inverted (0 - blocked, 1 - acquired the mutex) for the sake of + zero-initialization. Defining it as an entire word instead of + a byte seems to help performance slightly. */ + uintptr_t going; + }; + + void __TBB_EXPORTED_METHOD internal_construct(); + + // Mutex traits + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = true; + +private: + //! The last competitor requesting the lock + atomic q_tail; + +}; + +__TBB_DEFINE_PROFILING_SET_NAME(queuing_mutex) + +} // namespace tbb + +#endif /* __TBB_queuing_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_rw_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_rw_mutex.h new file mode 100644 index 0000000000..1a9d8ecb5d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/queuing_rw_mutex.h @@ -0,0 +1,171 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_queuing_rw_mutex_H +#define __TBB_queuing_rw_mutex_H + +#include "tbb_config.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#include "atomic.h" +#include "tbb_profiling.h" + +namespace tbb { + +//! Queuing reader-writer mutex with local-only spinning. +/** Adapted from Krieger, Stumm, et al. pseudocode at + http://www.eecg.toronto.edu/parallel/pubs_abs.html#Krieger_etal_ICPP93 + @ingroup synchronization */ +class queuing_rw_mutex { +public: + //! Construct unacquired mutex. + queuing_rw_mutex() { + q_tail = NULL; +#if TBB_USE_THREADING_TOOLS + internal_construct(); +#endif + } + + //! Destructor asserts if the mutex is acquired, i.e. q_tail is non-NULL + ~queuing_rw_mutex() { +#if TBB_USE_ASSERT + __TBB_ASSERT( !q_tail, "destruction of an acquired mutex"); +#endif + } + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock: internal::no_copy { + //! Initialize fields to mean "no lock held". + void initialize() { + my_mutex = NULL; +#if TBB_USE_ASSERT + my_state = 0xFF; // Set to invalid state + internal::poison_pointer(my_next); + internal::poison_pointer(my_prev); +#endif /* TBB_USE_ASSERT */ + } + + public: + //! Construct lock that has not acquired a mutex. + /** Equivalent to zero-initialization of *this. */ + scoped_lock() {initialize();} + + //! Acquire lock on given mutex. + scoped_lock( queuing_rw_mutex& m, bool write=true ) { + initialize(); + acquire(m,write); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( my_mutex ) release(); + } + + //! Acquire lock on given mutex. + void acquire( queuing_rw_mutex& m, bool write=true ); + + //! Acquire lock on given mutex if free (i.e. non-blocking) + bool try_acquire( queuing_rw_mutex& m, bool write=true ); + + //! Release lock. + void release(); + + //! Upgrade reader to become a writer. + /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ + bool upgrade_to_writer(); + + //! Downgrade writer to become a reader. + bool downgrade_to_reader(); + + private: + //! The pointer to the mutex owned, or NULL if not holding a mutex. + queuing_rw_mutex* my_mutex; + + //! The pointer to the previous and next competitors for a mutex + scoped_lock *__TBB_atomic my_prev, *__TBB_atomic my_next; + + typedef unsigned char state_t; + + //! State of the request: reader, writer, active reader, other service states + atomic my_state; + + //! The local spin-wait variable + /** Corresponds to "spin" in the pseudocode but inverted for the sake of zero-initialization */ + unsigned char __TBB_atomic my_going; + + //! A tiny internal lock + unsigned char my_internal_lock; + + //! Acquire the internal lock + void acquire_internal_lock(); + + //! Try to acquire the internal lock + /** Returns true if lock was successfully acquired. */ + bool try_acquire_internal_lock(); + + //! Release the internal lock + void release_internal_lock(); + + //! Wait for internal lock to be released + void wait_for_release_of_internal_lock(); + + //! A helper function + void unblock_or_wait_on_internal_lock( uintptr_t ); + }; + + void __TBB_EXPORTED_METHOD internal_construct(); + + // Mutex traits + static const bool is_rw_mutex = true; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = true; + +private: + //! The last competitor requesting the lock + atomic q_tail; + +}; + +__TBB_DEFINE_PROFILING_SET_NAME(queuing_rw_mutex) + +} // namespace tbb + +#endif /* __TBB_queuing_rw_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/reader_writer_lock.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/reader_writer_lock.h new file mode 100644 index 0000000000..068a0d57ee --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/reader_writer_lock.h @@ -0,0 +1,240 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_reader_writer_lock_H +#define __TBB_reader_writer_lock_H + +#include "tbb_thread.h" +#include "tbb_allocator.h" +#include "atomic.h" + +namespace tbb { +namespace interface5 { +//! Writer-preference reader-writer lock with local-only spinning on readers. +/** Loosely adapted from Mellor-Crummey and Scott pseudocode at + http://www.cs.rochester.edu/research/synchronization/pseudocode/rw.html#s_wp + @ingroup synchronization */ + class reader_writer_lock : tbb::internal::no_copy { + public: + friend class scoped_lock; + friend class scoped_lock_read; + //! Status type for nodes associated with lock instances + /** waiting_nonblocking: the wait state for nonblocking lock + instances; for writes, these transition straight to active + states; for reads, these are unused. + + waiting: the start and spin state for all lock instances; these will + transition to active state when appropriate. Non-blocking write locks + transition from this state to waiting_nonblocking immediately. + + active: the active state means that the lock instance holds + the lock; it will transition to invalid state during node deletion + + invalid: the end state for all nodes; this is set in the + destructor so if we encounter this state, we are looking at + memory that has already been freed + + The state diagrams below describe the status transitions. + Single arrows indicate that the thread that owns the node is + responsible for the transition; double arrows indicate that + any thread could make the transition. + + State diagram for scoped_lock status: + + waiting ----------> waiting_nonblocking + | _____________/ | + V V V + active -----------------> invalid + + State diagram for scoped_lock_read status: + + waiting + | + V + active ----------------->invalid + + */ + enum status_t { waiting_nonblocking, waiting, active, invalid }; + + //! Constructs a new reader_writer_lock + reader_writer_lock() { + internal_construct(); + } + + //! Destructs a reader_writer_lock object + ~reader_writer_lock() { + internal_destroy(); + } + + //! The scoped lock pattern for write locks + /** Scoped locks help avoid the common problem of forgetting to release the lock. + This type also serves as the node for queuing locks. */ + class scoped_lock : tbb::internal::no_copy { + public: + friend class reader_writer_lock; + + //! Construct with blocking attempt to acquire write lock on the passed-in lock + scoped_lock(reader_writer_lock& lock) { + internal_construct(lock); + } + + //! Destructor, releases the write lock + ~scoped_lock() { + internal_destroy(); + } + + void* operator new(size_t s) { + return tbb::internal::allocate_via_handler_v3(s); + } + void operator delete(void* p) { + tbb::internal::deallocate_via_handler_v3(p); + } + + private: + //! The pointer to the mutex to lock + reader_writer_lock *mutex; + //! The next queued competitor for the mutex + scoped_lock* next; + //! Status flag of the thread associated with this node + atomic status; + + //! Construct scoped_lock that is not holding lock + scoped_lock(); + + void __TBB_EXPORTED_METHOD internal_construct(reader_writer_lock&); + void __TBB_EXPORTED_METHOD internal_destroy(); + }; + + //! The scoped lock pattern for read locks + class scoped_lock_read : tbb::internal::no_copy { + public: + friend class reader_writer_lock; + + //! Construct with blocking attempt to acquire read lock on the passed-in lock + scoped_lock_read(reader_writer_lock& lock) { + internal_construct(lock); + } + + //! Destructor, releases the read lock + ~scoped_lock_read() { + internal_destroy(); + } + + void* operator new(size_t s) { + return tbb::internal::allocate_via_handler_v3(s); + } + void operator delete(void* p) { + tbb::internal::deallocate_via_handler_v3(p); + } + + private: + //! The pointer to the mutex to lock + reader_writer_lock *mutex; + //! The next queued competitor for the mutex + scoped_lock_read *next; + //! Status flag of the thread associated with this node + atomic status; + + //! Construct scoped_lock_read that is not holding lock + scoped_lock_read(); + + void __TBB_EXPORTED_METHOD internal_construct(reader_writer_lock&); + void __TBB_EXPORTED_METHOD internal_destroy(); + }; + + //! Acquires the reader_writer_lock for write. + /** If the lock is currently held in write mode by another + context, the writer will block by spinning on a local + variable. Exceptions thrown: improper_lock The context tries + to acquire a reader_writer_lock that it already has write + ownership of.*/ + void __TBB_EXPORTED_METHOD lock(); + + //! Tries to acquire the reader_writer_lock for write. + /** This function does not block. Return Value: True or false, + depending on whether the lock is acquired or not. If the lock + is already held by this acquiring context, try_lock() returns + false. */ + bool __TBB_EXPORTED_METHOD try_lock(); + + //! Acquires the reader_writer_lock for read. + /** If the lock is currently held by a writer, this reader will + block and wait until the writers are done. Exceptions thrown: + improper_lock The context tries to acquire a + reader_writer_lock that it already has write ownership of. */ + void __TBB_EXPORTED_METHOD lock_read(); + + //! Tries to acquire the reader_writer_lock for read. + /** This function does not block. Return Value: True or false, + depending on whether the lock is acquired or not. */ + bool __TBB_EXPORTED_METHOD try_lock_read(); + + //! Releases the reader_writer_lock + void __TBB_EXPORTED_METHOD unlock(); + + private: + void __TBB_EXPORTED_METHOD internal_construct(); + void __TBB_EXPORTED_METHOD internal_destroy(); + + //! Attempts to acquire write lock + /** If unavailable, spins in blocking case, returns false in non-blocking case. */ + bool start_write(scoped_lock *); + //! Sets writer_head to w and attempts to unblock + void set_next_writer(scoped_lock *w); + //! Relinquishes write lock to next waiting writer or group of readers + void end_write(scoped_lock *); + //! Checks if current thread holds write lock + bool is_current_writer(); + + //! Attempts to acquire read lock + /** If unavailable, spins in blocking case, returns false in non-blocking case. */ + void start_read(scoped_lock_read *); + //! Unblocks pending readers + void unblock_readers(); + //! Relinquishes read lock by decrementing counter; last reader wakes pending writer + void end_read(); + + //! The list of pending readers + atomic reader_head; + //! The list of pending writers + atomic writer_head; + //! The last node in the list of pending writers + atomic writer_tail; + //! Writer that owns the mutex; tbb_thread::id() otherwise. + tbb_thread::id my_current_writer; + //! Status of mutex + atomic rdr_count_and_flags; // used with __TBB_AtomicOR, which assumes uintptr_t +}; + +} // namespace interface5 + +using interface5::reader_writer_lock; + +} // namespace tbb + +#endif /* __TBB_reader_writer_lock_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/recursive_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/recursive_mutex.h new file mode 100644 index 0000000000..4ace6e16cc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/recursive_mutex.h @@ -0,0 +1,240 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_recursive_mutex_H +#define __TBB_recursive_mutex_H + +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#else +#include +#endif /* _WIN32||_WIN64 */ + +#include +#include "aligned_space.h" +#include "tbb_stddef.h" +#include "tbb_profiling.h" + +namespace tbb { +//! Mutex that allows recursive mutex acquisition. +/** Mutex that allows recursive mutex acquisition. + @ingroup synchronization */ +class recursive_mutex { +public: + //! Construct unacquired recursive_mutex. + recursive_mutex() { +#if TBB_USE_ASSERT || TBB_USE_THREADING_TOOLS + internal_construct(); +#else + #if _WIN32||_WIN64 + InitializeCriticalSectionEx(&impl, 4000, 0); + #else + pthread_mutexattr_t mtx_attr; + int error_code = pthread_mutexattr_init( &mtx_attr ); + if( error_code ) + tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed"); + + pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE ); + error_code = pthread_mutex_init( &impl, &mtx_attr ); + if( error_code ) + tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed"); + + pthread_mutexattr_destroy( &mtx_attr ); + #endif /* _WIN32||_WIN64*/ +#endif /* TBB_USE_ASSERT */ + }; + + ~recursive_mutex() { +#if TBB_USE_ASSERT + internal_destroy(); +#else + #if _WIN32||_WIN64 + DeleteCriticalSection(&impl); + #else + pthread_mutex_destroy(&impl); + + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + }; + + class scoped_lock; + friend class scoped_lock; + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock: internal::no_copy { + public: + //! Construct lock that has not acquired a recursive_mutex. + scoped_lock() : my_mutex(NULL) {}; + + //! Acquire lock on given mutex. + scoped_lock( recursive_mutex& mutex ) { +#if TBB_USE_ASSERT + my_mutex = &mutex; +#endif /* TBB_USE_ASSERT */ + acquire( mutex ); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( my_mutex ) + release(); + } + + //! Acquire lock on given mutex. + void acquire( recursive_mutex& mutex ) { +#if TBB_USE_ASSERT + internal_acquire( mutex ); +#else + my_mutex = &mutex; + mutex.lock(); +#endif /* TBB_USE_ASSERT */ + } + + //! Try acquire lock on given recursive_mutex. + bool try_acquire( recursive_mutex& mutex ) { +#if TBB_USE_ASSERT + return internal_try_acquire( mutex ); +#else + bool result = mutex.try_lock(); + if( result ) + my_mutex = &mutex; + return result; +#endif /* TBB_USE_ASSERT */ + } + + //! Release lock + void release() { +#if TBB_USE_ASSERT + internal_release(); +#else + my_mutex->unlock(); + my_mutex = NULL; +#endif /* TBB_USE_ASSERT */ + } + + private: + //! The pointer to the current recursive_mutex to work + recursive_mutex* my_mutex; + + //! All checks from acquire using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_acquire( recursive_mutex& m ); + + //! All checks from try_acquire using mutex.state were moved here + bool __TBB_EXPORTED_METHOD internal_try_acquire( recursive_mutex& m ); + + //! All checks from release using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_release(); + + friend class recursive_mutex; + }; + + // Mutex traits + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = true; + static const bool is_fair_mutex = false; + + // C++0x compatibility interface + + //! Acquire lock + void lock() { +#if TBB_USE_ASSERT + aligned_space tmp; + new(tmp.begin()) scoped_lock(*this); +#else + #if _WIN32||_WIN64 + EnterCriticalSection(&impl); + #else + pthread_mutex_lock(&impl); + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Try acquiring lock (non-blocking) + /** Return true if lock acquired; false otherwise. */ + bool try_lock() { +#if TBB_USE_ASSERT + aligned_space tmp; + return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this); +#else + #if _WIN32||_WIN64 + return TryEnterCriticalSection(&impl)!=0; + #else + return pthread_mutex_trylock(&impl)==0; + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Release lock + void unlock() { +#if TBB_USE_ASSERT + aligned_space tmp; + scoped_lock& s = *tmp.begin(); + s.my_mutex = this; + s.internal_release(); +#else + #if _WIN32||_WIN64 + LeaveCriticalSection(&impl); + #else + pthread_mutex_unlock(&impl); + #endif /* _WIN32||_WIN64 */ +#endif /* TBB_USE_ASSERT */ + } + + //! Return native_handle + #if _WIN32||_WIN64 + typedef LPCRITICAL_SECTION native_handle_type; + #else + typedef pthread_mutex_t* native_handle_type; + #endif + native_handle_type native_handle() { return (native_handle_type) &impl; } + +private: +#if _WIN32||_WIN64 + CRITICAL_SECTION impl; + enum state_t { + INITIALIZED=0x1234, + DESTROYED=0x789A, + } state; +#else + pthread_mutex_t impl; +#endif /* _WIN32||_WIN64 */ + + //! All checks from mutex constructor using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_construct(); + + //! All checks from mutex destructor using mutex.state were moved here + void __TBB_EXPORTED_METHOD internal_destroy(); +}; + +__TBB_DEFINE_PROFILING_SET_NAME(recursive_mutex) + +} // namespace tbb + +#endif /* __TBB_recursive_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/runtime_loader.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/runtime_loader.h new file mode 100644 index 0000000000..8903d01d15 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/runtime_loader.h @@ -0,0 +1,188 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_runtime_loader_H +#define __TBB_runtime_loader_H + +#if ! TBB_PREVIEW_RUNTIME_LOADER + #error Set TBB_PREVIEW_RUNTIME_LOADER to include runtime_loader.h +#endif + +#include "tbb/tbb_stddef.h" +#include + +#if _MSC_VER + #if ! __TBB_NO_IMPLICIT_LINKAGE + #ifdef _DEBUG + #pragma comment( linker, "/nodefaultlib:tbb_debug.lib" ) + #pragma comment( linker, "/defaultlib:tbbproxy_debug.lib" ) + #else + #pragma comment( linker, "/nodefaultlib:tbb.lib" ) + #pragma comment( linker, "/defaultlib:tbbproxy.lib" ) + #endif + #endif +#endif + +namespace tbb { + +namespace interface6 { + +//! Load TBB at runtime. +/*! + +\b Usage: + +In source code: + +\code +#include "tbb/runtime_loader.h" + +char const * path[] = { "/lib/ia32", NULL }; +tbb::runtime_loader loader( path ); + +// Now use TBB. +\endcode + +Link with \c tbbproxy.lib (or \c libtbbproxy.a) instead of \c tbb.lib (\c libtbb.dylib, +\c libtbb.so). + +TBB library will be loaded at runtime from \c /lib/ia32 directory. + +\b Attention: + +All \c runtime_loader objects (in the same module, i.e. exe or dll) share some global state. +The most noticeable piece of global state is loaded TBB library. +There are some implications: + + - Only one TBB library can be loaded per module. + + - If one object has already loaded TBB library, another object will not load TBB. + If the loaded TBB library is suitable for the second object, both will use TBB + cooperatively, otherwise the second object will report an error. + + - \c runtime_loader objects will not work (correctly) in parallel due to absence of + syncronization. + +*/ + +class runtime_loader : tbb::internal::no_copy { + + public: + + //! Error mode constants. + enum error_mode { + em_status, //!< Save status of operation and continue. + em_throw, //!< Throw an exception of tbb::runtime_loader::error_code type. + em_abort //!< Print message to \c stderr and call \c abort(). + }; // error_mode + + //! Error codes. + enum error_code { + ec_ok, //!< No errors. + ec_bad_call, //!< Invalid function call (e. g. load() called when TBB is already loaded). + ec_bad_arg, //!< Invalid argument passed. + ec_bad_lib, //!< Invalid library found (e. g. \c TBB_runtime_version symbol not found). + ec_bad_ver, //!< TBB found but version is not suitable. + ec_no_lib //!< No suitable TBB library found. + }; // error_code + + //! Initialize object but do not load TBB. + runtime_loader( error_mode mode = em_abort ); + + //! Initialize object and load TBB. + /*! + See load() for details. + + If error mode is \c em_status, call status() to check whether TBB was loaded or not. + */ + runtime_loader( + char const * path[], //!< List of directories to search TBB in. + int min_ver = TBB_INTERFACE_VERSION, //!< Minimal suitable version of TBB. + int max_ver = INT_MAX, //!< Maximal suitable version of TBB. + error_mode mode = em_abort //!< Error mode for this object. + ); + + //! Destroy object. + ~runtime_loader(); + + //! Load TBB. + /*! + The method searches the directories specified in \c path[] array for the TBB library. + When the library is found, it is loaded and its version is checked. If the version is + not suitable, the library is unloaded, and the search continues. + + \b Note: + + For security reasons, avoid using relative directory names. For example, never load + TBB from current (\c "."), parent (\c "..") or any other relative directory (like + \c "lib" ). Use only absolute directory names (e. g. "/usr/local/lib"). + + For the same security reasons, avoid using system default directories (\c "") on + Windows. (See http://www.microsoft.com/technet/security/advisory/2269637.mspx for + details.) + + Neglecting these rules may cause your program to execute 3-rd party malicious code. + + \b Errors: + - \c ec_bad_call - TBB already loaded by this object. + - \c ec_bad_arg - \p min_ver and/or \p max_ver negative or zero, + or \p min_ver > \p max_ver. + - \c ec_bad_ver - TBB of unsuitable version already loaded by another object. + - \c ec_no_lib - No suitable library found. + */ + error_code + load( + char const * path[], //!< List of directories to search TBB in. + int min_ver = TBB_INTERFACE_VERSION, //!< Minimal suitable version of TBB. + int max_ver = INT_MAX //!< Maximal suitable version of TBB. + + ); + + + //! Report status. + /*! + If error mode is \c em_status, the function returns status of the last operation. + */ + error_code status(); + + private: + + error_mode const my_mode; + error_code my_status; + bool my_loaded; + +}; // class runtime_loader + +} // namespace interface6 + +using interface6::runtime_loader; + +} // namespace tbb + +#endif /* __TBB_runtime_loader_H */ + diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/scalable_allocator.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/scalable_allocator.h new file mode 100644 index 0000000000..10c460469a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/scalable_allocator.h @@ -0,0 +1,291 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_scalable_allocator_H +#define __TBB_scalable_allocator_H +/** @file */ + +#include /* Need ptrdiff_t and size_t from here. */ +#if !_MSC_VER +#include /* Need intptr_t from here. */ +#endif + +#if !defined(__cplusplus) && __ICC==1100 + #pragma warning (push) + #pragma warning (disable: 991) +#endif + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#if _MSC_VER >= 1400 +#define __TBB_EXPORTED_FUNC __cdecl +#else +#define __TBB_EXPORTED_FUNC +#endif + +/** The "malloc" analogue to allocate block of memory of size bytes. + * @ingroup memory_allocation */ +void * __TBB_EXPORTED_FUNC scalable_malloc (size_t size); + +/** The "free" analogue to discard a previously allocated piece of memory. + @ingroup memory_allocation */ +void __TBB_EXPORTED_FUNC scalable_free (void* ptr); + +/** The "realloc" analogue complementing scalable_malloc. + @ingroup memory_allocation */ +void * __TBB_EXPORTED_FUNC scalable_realloc (void* ptr, size_t size); + +/** The "calloc" analogue complementing scalable_malloc. + @ingroup memory_allocation */ +void * __TBB_EXPORTED_FUNC scalable_calloc (size_t nobj, size_t size); + +/** The "posix_memalign" analogue. + @ingroup memory_allocation */ +int __TBB_EXPORTED_FUNC scalable_posix_memalign (void** memptr, size_t alignment, size_t size); + +/** The "_aligned_malloc" analogue. + @ingroup memory_allocation */ +void * __TBB_EXPORTED_FUNC scalable_aligned_malloc (size_t size, size_t alignment); + +/** The "_aligned_realloc" analogue. + @ingroup memory_allocation */ +void * __TBB_EXPORTED_FUNC scalable_aligned_realloc (void* ptr, size_t size, size_t alignment); + +/** The "_aligned_free" analogue. + @ingroup memory_allocation */ +void __TBB_EXPORTED_FUNC scalable_aligned_free (void* ptr); + +/** The analogue of _msize/malloc_size/malloc_usable_size. + Returns the usable size of a memory block previously allocated by scalable_*, + or 0 (zero) if ptr does not point to such a block. + @ingroup memory_allocation */ +size_t __TBB_EXPORTED_FUNC scalable_msize (void* ptr); + +/* Setting TBB_MALLOC_USE_HUGE_PAGES environment variable to 1 enables huge pages. + scalable_allocation_mode call has priority over environment variable. */ +enum AllocationModeParam { + USE_HUGE_PAGES /* value turns using huge pages on and off */ +}; + +/** Set TBB allocator-specific allocation modes. + @ingroup memory_allocation */ +int __TBB_EXPORTED_FUNC scalable_allocation_mode(int param, intptr_t value); + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#ifdef __cplusplus + +namespace rml { +class MemoryPool; + +typedef void *(*rawAllocType)(intptr_t pool_id, size_t &bytes); +typedef int (*rawFreeType)(intptr_t pool_id, void* raw_ptr, size_t raw_bytes); + +/* +MemPoolPolicy extension must be compatible with such structure fields layout + +struct MemPoolPolicy { + rawAllocType pAlloc; + rawFreeType pFree; + size_t granularity; // granularity of pAlloc allocations +}; +*/ + +struct MemPoolPolicy { + enum { + TBBMALLOC_POOL_VERSION = 1 + }; + + rawAllocType pAlloc; + rawFreeType pFree; + // granularity of pAlloc allocations. 0 means default used. + size_t granularity; + int version; + // all memory consumed at 1st pAlloc call and never returned, + // no more pAlloc calls after 1st + unsigned fixedPool : 1, + // memory consumed but returned only at pool termination + keepAllMemory : 1, + reserved : 30; + + MemPoolPolicy(rawAllocType pAlloc_, rawFreeType pFree_, + size_t granularity_ = 0, bool fixedPool_ = false, + bool keepAllMemory_ = false) : + pAlloc(pAlloc_), pFree(pFree_), granularity(granularity_), version(TBBMALLOC_POOL_VERSION), + fixedPool(fixedPool_), keepAllMemory(keepAllMemory_), + reserved(0) {} +}; + +enum MemPoolError { + POOL_OK, // pool created successfully + INVALID_POLICY, // invalid policy parameters found + UNSUPPORTED_POLICY, // requested pool policy is not supported by allocator library + NO_MEMORY // lack of memory during pool creation +}; + +MemPoolError pool_create_v1(intptr_t pool_id, const MemPoolPolicy *policy, + rml::MemoryPool **pool); + +bool pool_destroy(MemoryPool* memPool); +void *pool_malloc(MemoryPool* memPool, size_t size); +void *pool_realloc(MemoryPool* memPool, void *object, size_t size); +void *pool_aligned_malloc(MemoryPool* mPool, size_t size, size_t alignment); +void *pool_aligned_realloc(MemoryPool* mPool, void *ptr, size_t size, size_t alignment); +bool pool_reset(MemoryPool* memPool); +bool pool_free(MemoryPool *memPool, void *object); +} + +#include /* To use new with the placement argument */ + +/* Ensure that including this header does not cause implicit linkage with TBB */ +#ifndef __TBB_NO_IMPLICIT_LINKAGE + #define __TBB_NO_IMPLICIT_LINKAGE 1 + #include "tbb_stddef.h" + #undef __TBB_NO_IMPLICIT_LINKAGE +#else + #include "tbb_stddef.h" +#endif + +#if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_CPP11_STD_FORWARD_BROKEN + #include // std::forward +#endif + +namespace tbb { + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for erroneous "unreferenced parameter" warning in method destroy. + #pragma warning (push) + #pragma warning (disable: 4100) +#endif + +//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 +/** The members are ordered the same way they are in section 20.4.1 + of the ISO C++ standard. + @ingroup memory_allocation */ +template +class scalable_allocator { +public: + typedef typename internal::allocator_type::value_type value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + template struct rebind { + typedef scalable_allocator other; + }; + + scalable_allocator() throw() {} + scalable_allocator( const scalable_allocator& ) throw() {} + template scalable_allocator(const scalable_allocator&) throw() {} + + pointer address(reference x) const {return &x;} + const_pointer address(const_reference x) const {return &x;} + + //! Allocate space for n objects. + pointer allocate( size_type n, const void* /*hint*/ =0 ) { + return static_cast( scalable_malloc( n * sizeof(value_type) ) ); + } + + //! Free previously allocated block of memory + void deallocate( pointer p, size_type ) { + scalable_free( p ); + } + + //! Largest value for which method allocate might succeed. + size_type max_size() const throw() { + size_type absolutemax = static_cast(-1) / sizeof (value_type); + return (absolutemax > 0 ? absolutemax : 1); + } +#if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + template + void construct(U *p, Args&&... args) + #if __TBB_CPP11_STD_FORWARD_BROKEN + { ::new((void *)p) U((args)...); } + #else + { ::new((void *)p) U(std::forward(args)...); } + #endif +#else // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} +#endif // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + void destroy( pointer p ) {p->~value_type();} +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4100 is back + +//! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 +/** @ingroup memory_allocation */ +template<> +class scalable_allocator { +public: + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template struct rebind { + typedef scalable_allocator other; + }; +}; + +template +inline bool operator==( const scalable_allocator&, const scalable_allocator& ) {return true;} + +template +inline bool operator!=( const scalable_allocator&, const scalable_allocator& ) {return false;} + +} // namespace tbb + +#if _MSC_VER + #if (__TBB_BUILD || __TBBMALLOC_BUILD) && !defined(__TBBMALLOC_NO_IMPLICIT_LINKAGE) + #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 + #endif + + #if !__TBBMALLOC_NO_IMPLICIT_LINKAGE + #ifdef _DEBUG + #pragma comment(lib, "tbbmalloc_debug.lib") + #else + #pragma comment(lib, "tbbmalloc.lib") + #endif + #endif + + +#endif + +#endif /* __cplusplus */ + +#if !defined(__cplusplus) && __ICC==1100 + #pragma warning (pop) +#endif // ICC 11.0 warning 991 is back + +#endif /* __TBB_scalable_allocator_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_mutex.h new file mode 100644 index 0000000000..3be8e494b4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_mutex.h @@ -0,0 +1,192 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_spin_mutex_H +#define __TBB_spin_mutex_H + +#include +#include +#include "aligned_space.h" +#include "tbb_stddef.h" +#include "tbb_machine.h" +#include "tbb_profiling.h" + +namespace tbb { + +//! A lock that occupies a single byte. +/** A spin_mutex is a spin mutex that fits in a single byte. + It should be used only for locking short critical sections + (typically less than 20 instructions) when fairness is not an issue. + If zero-initialized, the mutex is considered unheld. + @ingroup synchronization */ +class spin_mutex { + //! 0 if lock is released, 1 if lock is acquired. + __TBB_atomic_flag flag; + +public: + //! Construct unacquired lock. + /** Equivalent to zero-initialization of *this. */ + spin_mutex() : flag(0) { +#if TBB_USE_THREADING_TOOLS + internal_construct(); +#endif + } + + //! Represents acquisition of a mutex. + class scoped_lock : internal::no_copy { + private: + //! Points to currently held mutex, or NULL if no lock is held. + spin_mutex* my_mutex; + + //! Value to store into spin_mutex::flag to unlock the mutex. + /** This variable is no longer used. Instead, 0 and 1 are used to + represent that the lock is free and acquired, respectively. + We keep the member variable here to ensure backward compatibility */ + __TBB_Flag my_unlock_value; + + //! Like acquire, but with ITT instrumentation. + void __TBB_EXPORTED_METHOD internal_acquire( spin_mutex& m ); + + //! Like try_acquire, but with ITT instrumentation. + bool __TBB_EXPORTED_METHOD internal_try_acquire( spin_mutex& m ); + + //! Like release, but with ITT instrumentation. + void __TBB_EXPORTED_METHOD internal_release(); + + friend class spin_mutex; + + public: + //! Construct without acquiring a mutex. + scoped_lock() : my_mutex(NULL), my_unlock_value(0) {} + + //! Construct and acquire lock on a mutex. + scoped_lock( spin_mutex& m ) : my_unlock_value(0) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + my_mutex=NULL; + internal_acquire(m); +#else + __TBB_LockByte(m.flag); + my_mutex=&m; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ + } + + //! Acquire lock. + void acquire( spin_mutex& m ) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_acquire(m); +#else + __TBB_LockByte(m.flag); + my_mutex = &m; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ + } + + //! Try acquiring lock (non-blocking) + /** Return true if lock acquired; false otherwise. */ + bool try_acquire( spin_mutex& m ) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + return internal_try_acquire(m); +#else + bool result = __TBB_TryLockByte(m.flag); + if( result ) + my_mutex = &m; + return result; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT*/ + } + + //! Release lock + void release() { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_release(); +#else + __TBB_UnlockByte(my_mutex->flag, 0); + my_mutex = NULL; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + + //! Destroy lock. If holding a lock, releases the lock first. + ~scoped_lock() { + if( my_mutex ) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_release(); +#else + __TBB_UnlockByte(my_mutex->flag, 0); +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + } + }; + + void __TBB_EXPORTED_METHOD internal_construct(); + + // Mutex traits + static const bool is_rw_mutex = false; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = false; + + // ISO C++0x compatibility methods + + //! Acquire lock + void lock() { +#if TBB_USE_THREADING_TOOLS + aligned_space tmp; + new(tmp.begin()) scoped_lock(*this); +#else + __TBB_LockByte(flag); +#endif /* TBB_USE_THREADING_TOOLS*/ + } + + //! Try acquiring lock (non-blocking) + /** Return true if lock acquired; false otherwise. */ + bool try_lock() { +#if TBB_USE_THREADING_TOOLS + aligned_space tmp; + return (new(tmp.begin()) scoped_lock)->internal_try_acquire(*this); +#else + return __TBB_TryLockByte(flag); +#endif /* TBB_USE_THREADING_TOOLS*/ + } + + //! Release lock + void unlock() { +#if TBB_USE_THREADING_TOOLS + aligned_space tmp; + scoped_lock& s = *tmp.begin(); + s.my_mutex = this; + s.internal_release(); +#else + __TBB_store_with_release(flag, 0); +#endif /* TBB_USE_THREADING_TOOLS */ + } + + friend class scoped_lock; +}; + +__TBB_DEFINE_PROFILING_SET_NAME(spin_mutex) + +} // namespace tbb + +#endif /* __TBB_spin_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_rw_mutex.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_rw_mutex.h new file mode 100644 index 0000000000..c1c161089a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/spin_rw_mutex.h @@ -0,0 +1,227 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_spin_rw_mutex_H +#define __TBB_spin_rw_mutex_H + +#include "tbb_stddef.h" +#include "tbb_machine.h" +#include "tbb_profiling.h" + +namespace tbb { + +class spin_rw_mutex_v3; +typedef spin_rw_mutex_v3 spin_rw_mutex; + +//! Fast, unfair, spinning reader-writer lock with backoff and writer-preference +/** @ingroup synchronization */ +class spin_rw_mutex_v3 { + //! @cond INTERNAL + + //! Internal acquire write lock. + bool __TBB_EXPORTED_METHOD internal_acquire_writer(); + + //! Out of line code for releasing a write lock. + /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ + void __TBB_EXPORTED_METHOD internal_release_writer(); + + //! Internal acquire read lock. + void __TBB_EXPORTED_METHOD internal_acquire_reader(); + + //! Internal upgrade reader to become a writer. + bool __TBB_EXPORTED_METHOD internal_upgrade(); + + //! Out of line code for downgrading a writer to a reader. + /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ + void __TBB_EXPORTED_METHOD internal_downgrade(); + + //! Internal release read lock. + void __TBB_EXPORTED_METHOD internal_release_reader(); + + //! Internal try_acquire write lock. + bool __TBB_EXPORTED_METHOD internal_try_acquire_writer(); + + //! Internal try_acquire read lock. + bool __TBB_EXPORTED_METHOD internal_try_acquire_reader(); + + //! @endcond +public: + //! Construct unacquired mutex. + spin_rw_mutex_v3() : state(0) { +#if TBB_USE_THREADING_TOOLS + internal_construct(); +#endif + } + +#if TBB_USE_ASSERT + //! Destructor asserts if the mutex is acquired, i.e. state is zero. + ~spin_rw_mutex_v3() { + __TBB_ASSERT( !state, "destruction of an acquired mutex"); + }; +#endif /* TBB_USE_ASSERT */ + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock : internal::no_copy { + public: + //! Construct lock that has not acquired a mutex. + /** Equivalent to zero-initialization of *this. */ + scoped_lock() : mutex(NULL), is_writer(false) {} + + //! Acquire lock on given mutex. + scoped_lock( spin_rw_mutex& m, bool write = true ) : mutex(NULL) { + acquire(m, write); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( mutex ) release(); + } + + //! Acquire lock on given mutex. + void acquire( spin_rw_mutex& m, bool write = true ) { + __TBB_ASSERT( !mutex, "holding mutex already" ); + is_writer = write; + mutex = &m; + if( write ) mutex->internal_acquire_writer(); + else mutex->internal_acquire_reader(); + } + + //! Upgrade reader to become a writer. + /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ + bool upgrade_to_writer() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + __TBB_ASSERT( !is_writer, "not a reader" ); + is_writer = true; + return mutex->internal_upgrade(); + } + + //! Release lock. + void release() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + spin_rw_mutex *m = mutex; + mutex = NULL; +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + if( is_writer ) m->internal_release_writer(); + else m->internal_release_reader(); +#else + if( is_writer ) __TBB_AtomicAND( &m->state, READERS ); + else __TBB_FetchAndAddWrelease( &m->state, -(intptr_t)ONE_READER); +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + + //! Downgrade writer to become a reader. + bool downgrade_to_reader() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + __TBB_ASSERT( is_writer, "not a writer" ); +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + mutex->internal_downgrade(); +#else + __TBB_FetchAndAddW( &mutex->state, ((intptr_t)ONE_READER-WRITER)); +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + is_writer = false; + return true; + } + + //! Try acquire lock on given mutex. + bool try_acquire( spin_rw_mutex& m, bool write = true ) { + __TBB_ASSERT( !mutex, "holding mutex already" ); + bool result; + is_writer = write; + result = write? m.internal_try_acquire_writer() + : m.internal_try_acquire_reader(); + if( result ) + mutex = &m; + return result; + } + + protected: + //! The pointer to the current mutex that is held, or NULL if no mutex is held. + spin_rw_mutex* mutex; + + //! If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. + /** Not defined if not holding a lock. */ + bool is_writer; + }; + + // Mutex traits + static const bool is_rw_mutex = true; + static const bool is_recursive_mutex = false; + static const bool is_fair_mutex = false; + + // ISO C++0x compatibility methods + + //! Acquire writer lock + void lock() {internal_acquire_writer();} + + //! Try acquiring writer lock (non-blocking) + /** Return true if lock acquired; false otherwise. */ + bool try_lock() {return internal_try_acquire_writer();} + + //! Release lock + void unlock() { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + if( state&WRITER ) internal_release_writer(); + else internal_release_reader(); +#else + if( state&WRITER ) __TBB_AtomicAND( &state, READERS ); + else __TBB_FetchAndAddWrelease( &state, -(intptr_t)ONE_READER); +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + + // Methods for reader locks that resemble ISO C++0x compatibility methods. + + //! Acquire reader lock + void lock_read() {internal_acquire_reader();} + + //! Try acquiring reader lock (non-blocking) + /** Return true if reader lock acquired; false otherwise. */ + bool try_lock_read() {return internal_try_acquire_reader();} + +private: + typedef intptr_t state_t; + static const state_t WRITER = 1; + static const state_t WRITER_PENDING = 2; + static const state_t READERS = ~(WRITER | WRITER_PENDING); + static const state_t ONE_READER = 4; + static const state_t BUSY = WRITER | READERS; + //! State of lock + /** Bit 0 = writer is holding lock + Bit 1 = request by a writer to acquire lock (hint to readers to wait) + Bit 2..N = number of readers holding lock */ + state_t state; + + void __TBB_EXPORTED_METHOD internal_construct(); +}; + +__TBB_DEFINE_PROFILING_SET_NAME(spin_rw_mutex) + +} // namespace tbb + +#endif /* __TBB_spin_rw_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/task.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/task.h new file mode 100644 index 0000000000..dc233ab229 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/task.h @@ -0,0 +1,977 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_task_H +#define __TBB_task_H + +#include "tbb_stddef.h" +#include "tbb_machine.h" +#include + +typedef struct ___itt_caller *__itt_caller; + +namespace tbb { + +class task; +class task_list; + +#if __TBB_TASK_GROUP_CONTEXT +class task_group_context; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// MSVC does not allow taking the address of a member that was defined +// privately in task_base and made public in class task via a using declaration. +#if _MSC_VER || (__GNUC__==3 && __GNUC_MINOR__<3) +#define __TBB_TASK_BASE_ACCESS public +#else +#define __TBB_TASK_BASE_ACCESS private +#endif + +namespace internal { + + class allocate_additional_child_of_proxy: no_assign { + //! No longer used, but retained for binary layout compatibility. Always NULL. + task* self; + task& parent; + public: + explicit allocate_additional_child_of_proxy( task& parent_ ) : self(NULL), parent(parent_) {} + task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; + void __TBB_EXPORTED_METHOD free( task& ) const; + }; + +} + +namespace interface5 { + namespace internal { + //! Base class for methods that became static in TBB 3.0. + /** TBB's evolution caused the "this" argument for several methods to become obsolete. + However, for backwards binary compatibility, the new methods need distinct names, + otherwise the One Definition Rule would be broken. Hence the new methods are + defined in this private base class, and then exposed in class task via + using declarations. */ + class task_base: tbb::internal::no_copy { + __TBB_TASK_BASE_ACCESS: + friend class tbb::task; + + //! Schedule task for execution when a worker becomes available. + static void spawn( task& t ); + + //! Spawn multiple tasks and clear list. + static void spawn( task_list& list ); + + //! Like allocate_child, except that task's parent becomes "t", not this. + /** Typically used in conjunction with schedule_to_reexecute to implement while loops. + Atomically increments the reference count of t.parent() */ + static tbb::internal::allocate_additional_child_of_proxy allocate_additional_child_of( task& t ) { + return tbb::internal::allocate_additional_child_of_proxy(t); + } + + //! Destroy a task. + /** Usually, calling this method is unnecessary, because a task is + implicitly deleted after its execute() method runs. However, + sometimes a task needs to be explicitly deallocated, such as + when a root task is used as the parent in spawn_and_wait_for_all. */ + static void __TBB_EXPORTED_FUNC destroy( task& victim ); + }; + } // internal +} // interface5 + +//! @cond INTERNAL +namespace internal { + + class scheduler: no_copy { + public: + //! For internal use only + virtual void spawn( task& first, task*& next ) = 0; + + //! For internal use only + virtual void wait_for_all( task& parent, task* child ) = 0; + + //! For internal use only + virtual void spawn_root_and_wait( task& first, task*& next ) = 0; + + //! Pure virtual destructor; + // Have to have it just to shut up overzealous compilation warnings + virtual ~scheduler() = 0; + + //! For internal use only + virtual void enqueue( task& t, void* reserved ) = 0; + }; + + //! A reference count + /** Should always be non-negative. A signed type is used so that underflow can be detected. */ + typedef intptr_t reference_count; + + //! An id as used for specifying affinity. + typedef unsigned short affinity_id; + +#if __TBB_TASK_GROUP_CONTEXT + class generic_scheduler; + + struct context_list_node_t { + context_list_node_t *my_prev, + *my_next; + }; + + class allocate_root_with_context_proxy: no_assign { + task_group_context& my_context; + public: + allocate_root_with_context_proxy ( task_group_context& ctx ) : my_context(ctx) {} + task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; + void __TBB_EXPORTED_METHOD free( task& ) const; + }; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + class allocate_root_proxy: no_assign { + public: + static task& __TBB_EXPORTED_FUNC allocate( size_t size ); + static void __TBB_EXPORTED_FUNC free( task& ); + }; + + class allocate_continuation_proxy: no_assign { + public: + task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; + void __TBB_EXPORTED_METHOD free( task& ) const; + }; + + class allocate_child_proxy: no_assign { + public: + task& __TBB_EXPORTED_METHOD allocate( size_t size ) const; + void __TBB_EXPORTED_METHOD free( task& ) const; + }; + + //! Memory prefix to a task object. + /** This class is internal to the library. + Do not reference it directly, except within the library itself. + Fields are ordered in way that preserves backwards compatibility and yields + good packing on typical 32-bit and 64-bit platforms. + + In case task prefix size exceeds 32 or 64 bytes on IA32 and Intel64 + architectures correspondingly, consider dynamic setting of task_alignment + and task_prefix_reservation_size based on the maximal operand size supported + by the current CPU. + + @ingroup task_scheduling */ + class task_prefix { + private: + friend class tbb::task; + friend class tbb::interface5::internal::task_base; + friend class tbb::task_list; + friend class internal::scheduler; + friend class internal::allocate_root_proxy; + friend class internal::allocate_child_proxy; + friend class internal::allocate_continuation_proxy; + friend class internal::allocate_additional_child_of_proxy; + +#if __TBB_TASK_GROUP_CONTEXT + //! Shared context that is used to communicate asynchronous state changes + /** Currently it is used to broadcast cancellation requests generated both + by users and as the result of unhandled exceptions in the task::execute() + methods. */ + task_group_context *context; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + //! The scheduler that allocated the task, or NULL if the task is big. + /** Small tasks are pooled by the scheduler that allocated the task. + If a scheduler needs to free a small task allocated by another scheduler, + it returns the task to that other scheduler. This policy avoids + memory space blowup issues for memory allocators that allocate from + thread-specific pools. */ + scheduler* origin; + +#if __TBB_TASK_PRIORITY + union { +#endif /* __TBB_TASK_PRIORITY */ + //! Obsolete. The scheduler that owns the task. + /** Retained only for the sake of backward binary compatibility. + Still used by inline methods in the task.h header. **/ + scheduler* owner; + +#if __TBB_TASK_PRIORITY + //! Pointer to the next offloaded lower priority task. + /** Used to maintain a list of offloaded tasks inside the scheduler. **/ + task* next_offloaded; + }; +#endif /* __TBB_TASK_PRIORITY */ + + //! The task whose reference count includes me. + /** In the "blocking style" of programming, this field points to the parent task. + In the "continuation-passing style" of programming, this field points to the + continuation of the parent. */ + tbb::task* parent; + + //! Reference count used for synchronization. + /** In the "continuation-passing style" of programming, this field is + the difference of the number of allocated children minus the + number of children that have completed. + In the "blocking style" of programming, this field is one more than the difference. */ + __TBB_atomic reference_count ref_count; + + //! Obsolete. Used to be scheduling depth before TBB 2.2 + /** Retained only for the sake of backward binary compatibility. + Not used by TBB anymore. **/ + int depth; + + //! A task::state_type, stored as a byte for compactness. + /** This state is exposed to users via method task::state(). */ + unsigned char state; + + //! Miscellaneous state that is not directly visible to users, stored as a byte for compactness. + /** 0x0 -> version 1.0 task + 0x1 -> version >=2.1 task + 0x10 -> task was enqueued + 0x20 -> task_proxy + 0x40 -> task has live ref_count + 0x80 -> a stolen task */ + unsigned char extra_state; + + affinity_id affinity; + + //! "next" field for list of task + tbb::task* next; + + //! The task corresponding to this task_prefix. + tbb::task& task() {return *reinterpret_cast(this+1);} + }; + +} // namespace internal +//! @endcond + +#if __TBB_TASK_GROUP_CONTEXT + +#if __TBB_TASK_PRIORITY +namespace internal { + static const int priority_stride_v4 = INT_MAX / 4; +} + +enum priority_t { + priority_normal = internal::priority_stride_v4 * 2, + priority_low = priority_normal - internal::priority_stride_v4, + priority_high = priority_normal + internal::priority_stride_v4 +}; + +#endif /* __TBB_TASK_PRIORITY */ + +#if TBB_USE_CAPTURED_EXCEPTION + class tbb_exception; +#else + namespace internal { + class tbb_exception_ptr; + } +#endif /* !TBB_USE_CAPTURED_EXCEPTION */ + +class task_scheduler_init; + +//! Used to form groups of tasks +/** @ingroup task_scheduling + The context services explicit cancellation requests from user code, and unhandled + exceptions intercepted during tasks execution. Intercepting an exception results + in generating internal cancellation requests (which is processed in exactly the + same way as external ones). + + The context is associated with one or more root tasks and defines the cancellation + group that includes all the descendants of the corresponding root task(s). Association + is established when a context object is passed as an argument to the task::allocate_root() + method. See task_group_context::task_group_context for more details. + + The context can be bound to another one, and other contexts can be bound to it, + forming a tree-like structure: parent -> this -> children. Arrows here designate + cancellation propagation direction. If a task in a cancellation group is cancelled + all the other tasks in this group and groups bound to it (as children) get cancelled too. + + IMPLEMENTATION NOTE: + When adding new members to task_group_context or changing types of existing ones, + update the size of both padding buffers (_leading_padding and _trailing_padding) + appropriately. See also VERSIONING NOTE at the constructor definition below. **/ +class task_group_context : internal::no_copy { +private: + friend class internal::generic_scheduler; + friend class task_scheduler_init; + +#if TBB_USE_CAPTURED_EXCEPTION + typedef tbb_exception exception_container_type; +#else + typedef internal::tbb_exception_ptr exception_container_type; +#endif + + enum version_traits_word_layout { + traits_offset = 16, + version_mask = 0xFFFF, + traits_mask = 0xFFFFul << traits_offset + }; + +public: + enum kind_type { + isolated, + bound + }; + + enum traits_type { + exact_exception = 0x0001ul << traits_offset, + concurrent_wait = 0x0004ul << traits_offset, +#if TBB_USE_CAPTURED_EXCEPTION + default_traits = 0 +#else + default_traits = exact_exception +#endif /* !TBB_USE_CAPTURED_EXCEPTION */ + }; + +private: + enum state { + may_have_children = 1 + }; + + union { + //! Flavor of this context: bound or isolated. + kind_type my_kind; + uintptr_t _my_kind_aligner; + }; + + //! Pointer to the context of the parent cancellation group. NULL for isolated contexts. + task_group_context *my_parent; + + //! Used to form the thread specific list of contexts without additional memory allocation. + /** A context is included into the list of the current thread when its binding to + its parent happens. Any context can be present in the list of one thread only. **/ + internal::context_list_node_t my_node; + + //! Used to set and maintain stack stitching point for Intel Performance Tools. + __itt_caller itt_caller; + + //! Leading padding protecting accesses to frequently used members from false sharing. + /** Read accesses to the field my_cancellation_requested are on the hot path inside + the scheduler. This padding ensures that this field never shares the same cache + line with a local variable that is frequently written to. **/ + char _leading_padding[internal::NFS_MaxLineSize + - 2 * sizeof(uintptr_t)- sizeof(void*) - sizeof(internal::context_list_node_t) + - sizeof(__itt_caller)]; + + //! Specifies whether cancellation was requested for this task group. + uintptr_t my_cancellation_requested; + + //! Version for run-time checks and behavioral traits of the context. + /** Version occupies low 16 bits, and traits (zero or more ORed enumerators + from the traits_type enumerations) take the next 16 bits. + Original (zeroth) version of the context did not support any traits. **/ + uintptr_t my_version_and_traits; + + //! Pointer to the container storing exception being propagated across this task group. + exception_container_type *my_exception; + + //! Scheduler instance that registered this context in its thread specific list. + internal::generic_scheduler *my_owner; + + //! Internal state (combination of state flags). + uintptr_t my_state; + +#if __TBB_TASK_PRIORITY + //! Priority level of the task group (in normalized representation) + intptr_t my_priority; +#endif /* __TBB_TASK_PRIORITY */ + + //! Trailing padding protecting accesses to frequently used members from false sharing + /** \sa _leading_padding **/ + char _trailing_padding[internal::NFS_MaxLineSize - 2 * sizeof(uintptr_t) - 2 * sizeof(void*) +#if __TBB_TASK_PRIORITY + - sizeof(intptr_t) +#endif /* __TBB_TASK_PRIORITY */ + ]; + +public: + //! Default & binding constructor. + /** By default a bound context is created. That is this context will be bound + (as child) to the context of the task calling task::allocate_root(this_context) + method. Cancellation requests passed to the parent context are propagated + to all the contexts bound to it. Similarly priority change is propagated + from the parent context to its children. + + If task_group_context::isolated is used as the argument, then the tasks associated + with this context will never be affected by events in any other context. + + Creating isolated contexts involve much less overhead, but they have limited + utility. Normally when an exception occurs in an algorithm that has nested + ones running, it is desirably to have all the nested algorithms cancelled + as well. Such a behavior requires nested algorithms to use bound contexts. + + There is one good place where using isolated algorithms is beneficial. It is + a master thread. That is if a particular algorithm is invoked directly from + the master thread (not from a TBB task), supplying it with explicitly + created isolated context will result in a faster algorithm startup. + + VERSIONING NOTE: + Implementation(s) of task_group_context constructor(s) cannot be made + entirely out-of-line because the run-time version must be set by the user + code. This will become critically important for binary compatibility, if + we ever have to change the size of the context object. + + Boosting the runtime version will also be necessary if new data fields are + introduced in the currently unused padding areas and these fields are updated + by inline methods. **/ + task_group_context ( kind_type relation_with_parent = bound, + uintptr_t traits = default_traits ) + : my_kind(relation_with_parent) + , my_version_and_traits(1 | traits) + { + init(); + } + + __TBB_EXPORTED_METHOD ~task_group_context (); + + //! Forcefully reinitializes the context after the task tree it was associated with is completed. + /** Because the method assumes that all the tasks that used to be associated with + this context have already finished, calling it while the context is still + in use somewhere in the task hierarchy leads to undefined behavior. + + IMPORTANT: This method is not thread safe! + + The method does not change the context's parent if it is set. **/ + void __TBB_EXPORTED_METHOD reset (); + + //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups. + /** \return false if cancellation has already been requested, true otherwise. + + Note that canceling never fails. When false is returned, it just means that + another thread (or this one) has already sent cancellation request to this + context or to one of its ancestors (if this context is bound). It is guaranteed + that when this method is concurrently called on the same not yet cancelled + context, true will be returned by one and only one invocation. **/ + bool __TBB_EXPORTED_METHOD cancel_group_execution (); + + //! Returns true if the context received cancellation request. + bool __TBB_EXPORTED_METHOD is_group_execution_cancelled () const; + + //! Records the pending exception, and cancels the task group. + /** May be called only from inside a catch-block. If the context is already + cancelled, does nothing. + The method brings the task group associated with this context exactly into + the state it would be in, if one of its tasks threw the currently pending + exception during its execution. In other words, it emulates the actions + of the scheduler's dispatch loop exception handler. **/ + void __TBB_EXPORTED_METHOD register_pending_exception (); + +#if __TBB_TASK_PRIORITY + //! Changes priority of the task group + void set_priority ( priority_t ); + + //! Retrieves current priority of the current task group + priority_t priority () const; +#endif /* __TBB_TASK_PRIORITY */ + +protected: + //! Out-of-line part of the constructor. + /** Singled out to ensure backward binary compatibility of the future versions. **/ + void __TBB_EXPORTED_METHOD init (); + +private: + friend class task; + friend class internal::allocate_root_with_context_proxy; + + static const kind_type binding_required = bound; + static const kind_type binding_completed = kind_type(bound+1); + static const kind_type detached = kind_type(binding_completed+1); + static const kind_type dying = kind_type(detached+1); + + //! Propagates state change (if any) from an ancestor + /** Checks if one of this object's ancestors is in a new state, and propagates + the new state to all its descendants in this object's heritage line. **/ + template + void propagate_state_from_ancestors ( T task_group_context::*mptr_state, T new_state ); + + //! Makes sure that the context is registered with a scheduler instance. + inline void finish_initialization ( internal::generic_scheduler *local_sched ); + + //! Registers this context with the local scheduler and binds it to its parent context + void bind_to ( internal::generic_scheduler *local_sched ); + + //! Registers this context with the local scheduler + void register_with ( internal::generic_scheduler *local_sched ); + +}; // class task_group_context + +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! Base class for user-defined tasks. +/** @ingroup task_scheduling */ +class task: __TBB_TASK_BASE_ACCESS interface5::internal::task_base { + + //! Set reference count + void __TBB_EXPORTED_METHOD internal_set_ref_count( int count ); + + //! Decrement reference count and return its new value. + internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count(); + +protected: + //! Default constructor. + task() {prefix().extra_state=1;} + +public: + //! Destructor. + virtual ~task() {} + + //! Should be overridden by derived classes. + virtual task* execute() = 0; + + //! Enumeration of task states that the scheduler considers. + enum state_type { + //! task is running, and will be destroyed after method execute() completes. + executing, + //! task to be rescheduled. + reexecute, + //! task is in ready pool, or is going to be put there, or was just taken off. + ready, + //! task object is freshly allocated or recycled. + allocated, + //! task object is on free list, or is going to be put there, or was just taken off. + freed, + //! task to be recycled as continuation + recycle +#if __TBB_RECYCLE_TO_ENQUEUE + //! task to be scheduled for starvation-resistant execution + ,to_enqueue +#endif + }; + + //------------------------------------------------------------------------ + // Allocating tasks + //------------------------------------------------------------------------ + + //! Returns proxy for overloaded new that allocates a root task. + static internal::allocate_root_proxy allocate_root() { + return internal::allocate_root_proxy(); + } + +#if __TBB_TASK_GROUP_CONTEXT + //! Returns proxy for overloaded new that allocates a root task associated with user supplied context. + static internal::allocate_root_with_context_proxy allocate_root( task_group_context& ctx ) { + return internal::allocate_root_with_context_proxy(ctx); + } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + //! Returns proxy for overloaded new that allocates a continuation task of *this. + /** The continuation's parent becomes the parent of *this. */ + internal::allocate_continuation_proxy& allocate_continuation() { + return *reinterpret_cast(this); + } + + //! Returns proxy for overloaded new that allocates a child task of *this. + internal::allocate_child_proxy& allocate_child() { + return *reinterpret_cast(this); + } + + //! Define recommended static form via import from base class. + using task_base::allocate_additional_child_of; + +#if __TBB_DEPRECATED_TASK_INTERFACE + //! Destroy a task. + /** Usually, calling this method is unnecessary, because a task is + implicitly deleted after its execute() method runs. However, + sometimes a task needs to be explicitly deallocated, such as + when a root task is used as the parent in spawn_and_wait_for_all. */ + void __TBB_EXPORTED_METHOD destroy( task& t ); +#else /* !__TBB_DEPRECATED_TASK_INTERFACE */ + //! Define recommended static form via import from base class. + using task_base::destroy; +#endif /* !__TBB_DEPRECATED_TASK_INTERFACE */ + + //------------------------------------------------------------------------ + // Recycling of tasks + //------------------------------------------------------------------------ + + //! Change this to be a continuation of its former self. + /** The caller must guarantee that the task's refcount does not become zero until + after the method execute() returns. Typically, this is done by having + method execute() return a pointer to a child of the task. If the guarantee + cannot be made, use method recycle_as_safe_continuation instead. + + Because of the hazard, this method may be deprecated in the future. */ + void recycle_as_continuation() { + __TBB_ASSERT( prefix().state==executing, "execute not running?" ); + prefix().state = allocated; + } + + //! Recommended to use, safe variant of recycle_as_continuation + /** For safety, it requires additional increment of ref_count. + With no descendants and ref_count of 1, it has the semantics of recycle_to_reexecute. */ + void recycle_as_safe_continuation() { + __TBB_ASSERT( prefix().state==executing, "execute not running?" ); + prefix().state = recycle; + } + + //! Change this to be a child of new_parent. + void recycle_as_child_of( task& new_parent ) { + internal::task_prefix& p = prefix(); + __TBB_ASSERT( prefix().state==executing||prefix().state==allocated, "execute not running, or already recycled" ); + __TBB_ASSERT( prefix().ref_count==0, "no child tasks allowed when recycled as a child" ); + __TBB_ASSERT( p.parent==NULL, "parent must be null" ); + __TBB_ASSERT( new_parent.prefix().state<=recycle, "corrupt parent's state" ); + __TBB_ASSERT( new_parent.prefix().state!=freed, "parent already freed" ); + p.state = allocated; + p.parent = &new_parent; +#if __TBB_TASK_GROUP_CONTEXT + p.context = new_parent.prefix().context; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + } + + //! Schedule this for reexecution after current execute() returns. + /** Made obsolete by recycle_as_safe_continuation; may become deprecated. */ + void recycle_to_reexecute() { + __TBB_ASSERT( prefix().state==executing, "execute not running, or already recycled" ); + __TBB_ASSERT( prefix().ref_count==0, "no child tasks allowed when recycled for reexecution" ); + prefix().state = reexecute; + } + +#if __TBB_RECYCLE_TO_ENQUEUE + //! Schedule this to enqueue after descendant tasks complete. + /** Save enqueue/spawn difference, it has the semantics of recycle_as_safe_continuation. */ + void recycle_to_enqueue() { + __TBB_ASSERT( prefix().state==executing, "execute not running, or already recycled" ); + prefix().state = to_enqueue; + } +#endif /* __TBB_RECYCLE_TO_ENQUEUE */ + + // All depth-related methods are obsolete, and are retained for the sake + // of backward source compatibility only + intptr_t depth() const {return 0;} + void set_depth( intptr_t ) {} + void add_to_depth( int ) {} + + + //------------------------------------------------------------------------ + // Spawning and blocking + //------------------------------------------------------------------------ + + //! Set reference count + void set_ref_count( int count ) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_set_ref_count(count); +#else + prefix().ref_count = count; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + + //! Atomically increment reference count and returns its old value. + /** Has acquire semantics */ + void increment_ref_count() { + __TBB_FetchAndIncrementWacquire( &prefix().ref_count ); + } + + //! Atomically decrement reference count and returns its new value. + /** Has release semantics. */ + int decrement_ref_count() { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + return int(internal_decrement_ref_count()); +#else + return int(__TBB_FetchAndDecrementWrelease( &prefix().ref_count ))-1; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } + + //! Define recommended static forms via import from base class. + using task_base::spawn; + + //! Similar to spawn followed by wait_for_all, but more efficient. + void spawn_and_wait_for_all( task& child ) { + prefix().owner->wait_for_all( *this, &child ); + } + + //! Similar to spawn followed by wait_for_all, but more efficient. + void __TBB_EXPORTED_METHOD spawn_and_wait_for_all( task_list& list ); + + //! Spawn task allocated by allocate_root, wait for it to complete, and deallocate it. + static void spawn_root_and_wait( task& root ) { + root.prefix().owner->spawn_root_and_wait( root, root.prefix().next ); + } + + //! Spawn root tasks on list and wait for all of them to finish. + /** If there are more tasks than worker threads, the tasks are spawned in + order of front to back. */ + static void spawn_root_and_wait( task_list& root_list ); + + //! Wait for reference count to become one, and set reference count to zero. + /** Works on tasks while waiting. */ + void wait_for_all() { + prefix().owner->wait_for_all( *this, NULL ); + } + + //! Enqueue task for starvation-resistant execution. +#if __TBB_TASK_PRIORITY + /** The task will be enqueued on the normal priority level disregarding the + priority of its task group. + + The rationale of such semantics is that priority of an enqueued task is + statically fixed at the moment of its enqueuing, while task group priority + is dynamic. Thus automatic priority inheritance would be generally a subject + to the race, which may result in unexpected behavior. + + Use enqueue() overload with explicit priority value and task::group_priority() + method to implement such priority inheritance when it is really necessary. **/ +#endif /* __TBB_TASK_PRIORITY */ + static void enqueue( task& t ) { + t.prefix().owner->enqueue( t, NULL ); + } + +#if __TBB_TASK_PRIORITY + //! Enqueue task for starvation-resistant execution on the specified priority level. + static void enqueue( task& t, priority_t p ) { + __TBB_ASSERT( p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value" ); + t.prefix().owner->enqueue( t, (void*)p ); + } +#endif /* __TBB_TASK_PRIORITY */ + + //! The innermost task being executed or destroyed by the current thread at the moment. + static task& __TBB_EXPORTED_FUNC self(); + + //! task on whose behalf this task is working, or NULL if this is a root. + task* parent() const {return prefix().parent;} + + //! sets parent task pointer to specified value + void set_parent(task* p) { +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT(prefix().context == p->prefix().context, "The tasks must be in the same context"); +#endif + prefix().parent = p; + } + +#if __TBB_TASK_GROUP_CONTEXT + //! This method is deprecated and will be removed in the future. + /** Use method group() instead. **/ + task_group_context* context() {return prefix().context;} + + //! Pointer to the task group descriptor. + task_group_context* group () { return prefix().context; } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + //! True if task was stolen from the task pool of another thread. + bool is_stolen_task() const { + return (prefix().extra_state & 0x80)!=0; + } + + //------------------------------------------------------------------------ + // Debugging + //------------------------------------------------------------------------ + + //! Current execution state + state_type state() const {return state_type(prefix().state);} + + //! The internal reference count. + int ref_count() const { +#if TBB_USE_ASSERT + internal::reference_count ref_count_ = prefix().ref_count; + __TBB_ASSERT( ref_count_==int(ref_count_), "integer overflow error"); +#endif + return int(prefix().ref_count); + } + + //! Obsolete, and only retained for the sake of backward compatibility. Always returns true. + bool __TBB_EXPORTED_METHOD is_owned_by_current_thread() const; + + //------------------------------------------------------------------------ + // Affinity + //------------------------------------------------------------------------ + + //! An id as used for specifying affinity. + /** Guaranteed to be integral type. Value of 0 means no affinity. */ + typedef internal::affinity_id affinity_id; + + //! Set affinity for this task. + void set_affinity( affinity_id id ) {prefix().affinity = id;} + + //! Current affinity of this task + affinity_id affinity() const {return prefix().affinity;} + + //! Invoked by scheduler to notify task that it ran on unexpected thread. + /** Invoked before method execute() runs, if task is stolen, or task has + affinity but will be executed on another thread. + + The default action does nothing. */ + virtual void __TBB_EXPORTED_METHOD note_affinity( affinity_id id ); + +#if __TBB_TASK_GROUP_CONTEXT + //! Moves this task from its current group into another one. + /** Argument ctx specifies the new group. + + The primary purpose of this method is to associate unique task group context + with a task allocated for subsequent enqueuing. In contrast to spawned tasks + enqueued ones normally outlive the scope where they were created. This makes + traditional usage model where task group context are allocated locally on + the stack inapplicable. Dynamic allocation of context objects is performance + inefficient. Method change_group() allows to make task group context object + a member of the task class, and then associate it with its containing task + object in the latter's constructor. **/ + void __TBB_EXPORTED_METHOD change_group ( task_group_context& ctx ); + + //! Initiates cancellation of all tasks in this cancellation group and its subordinate groups. + /** \return false if cancellation has already been requested, true otherwise. **/ + bool cancel_group_execution () { return prefix().context->cancel_group_execution(); } + + //! Returns true if the context has received cancellation request. + bool is_cancelled () const { return prefix().context->is_group_execution_cancelled(); } +#else + bool is_cancelled () const { return false; } +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#if __TBB_TASK_PRIORITY + //! Changes priority of the task group this task belongs to. + void set_group_priority ( priority_t p ) { prefix().context->set_priority(p); } + + //! Retrieves current priority of the task group this task belongs to. + priority_t group_priority () const { return prefix().context->priority(); } + +#endif /* __TBB_TASK_PRIORITY */ + +private: + friend class interface5::internal::task_base; + friend class task_list; + friend class internal::scheduler; + friend class internal::allocate_root_proxy; +#if __TBB_TASK_GROUP_CONTEXT + friend class internal::allocate_root_with_context_proxy; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + friend class internal::allocate_continuation_proxy; + friend class internal::allocate_child_proxy; + friend class internal::allocate_additional_child_of_proxy; + + //! Get reference to corresponding task_prefix. + /** Version tag prevents loader on Linux from using the wrong symbol in debug builds. **/ + internal::task_prefix& prefix( internal::version_tag* = NULL ) const { + return reinterpret_cast(const_cast(this))[-1]; + } +}; // class task + +//! task that does nothing. Useful for synchronization. +/** @ingroup task_scheduling */ +class empty_task: public task { + /*override*/ task* execute() { + return NULL; + } +}; + +//! A list of children. +/** Used for method task::spawn_children + @ingroup task_scheduling */ +class task_list: internal::no_copy { +private: + task* first; + task** next_ptr; + friend class task; + friend class interface5::internal::task_base; +public: + //! Construct empty list + task_list() : first(NULL), next_ptr(&first) {} + + //! Destroys the list, but does not destroy the task objects. + ~task_list() {} + + //! True if list if empty; false otherwise. + bool empty() const {return !first;} + + //! Push task onto back of list. + void push_back( task& task ) { + task.prefix().next = NULL; + *next_ptr = &task; + next_ptr = &task.prefix().next; + } + + //! Pop the front task from the list. + task& pop_front() { + __TBB_ASSERT( !empty(), "attempt to pop item from empty task_list" ); + task* result = first; + first = result->prefix().next; + if( !first ) next_ptr = &first; + return *result; + } + + //! Clear the list + void clear() { + first=NULL; + next_ptr=&first; + } +}; + +inline void interface5::internal::task_base::spawn( task& t ) { + t.prefix().owner->spawn( t, t.prefix().next ); +} + +inline void interface5::internal::task_base::spawn( task_list& list ) { + if( task* t = list.first ) { + t->prefix().owner->spawn( *t, *list.next_ptr ); + list.clear(); + } +} + +inline void task::spawn_root_and_wait( task_list& root_list ) { + if( task* t = root_list.first ) { + t->prefix().owner->spawn_root_and_wait( *t, *root_list.next_ptr ); + root_list.clear(); + } +} + +} // namespace tbb + +inline void *operator new( size_t bytes, const tbb::internal::allocate_root_proxy& ) { + return &tbb::internal::allocate_root_proxy::allocate(bytes); +} + +inline void operator delete( void* task, const tbb::internal::allocate_root_proxy& ) { + tbb::internal::allocate_root_proxy::free( *static_cast(task) ); +} + +#if __TBB_TASK_GROUP_CONTEXT +inline void *operator new( size_t bytes, const tbb::internal::allocate_root_with_context_proxy& p ) { + return &p.allocate(bytes); +} + +inline void operator delete( void* task, const tbb::internal::allocate_root_with_context_proxy& p ) { + p.free( *static_cast(task) ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +inline void *operator new( size_t bytes, const tbb::internal::allocate_continuation_proxy& p ) { + return &p.allocate(bytes); +} + +inline void operator delete( void* task, const tbb::internal::allocate_continuation_proxy& p ) { + p.free( *static_cast(task) ); +} + +inline void *operator new( size_t bytes, const tbb::internal::allocate_child_proxy& p ) { + return &p.allocate(bytes); +} + +inline void operator delete( void* task, const tbb::internal::allocate_child_proxy& p ) { + p.free( *static_cast(task) ); +} + +inline void *operator new( size_t bytes, const tbb::internal::allocate_additional_child_of_proxy& p ) { + return &p.allocate(bytes); +} + +inline void operator delete( void* task, const tbb::internal::allocate_additional_child_of_proxy& p ) { + p.free( *static_cast(task) ); +} + +#endif /* __TBB_task_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/task_arena.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_arena.h new file mode 100644 index 0000000000..cce264efe6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_arena.h @@ -0,0 +1,228 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_task_arena_H +#define __TBB_task_arena_H + +#include "task.h" +#include "tbb_exception.h" + +#if __TBB_TASK_ARENA + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + //! Internal to library. Should not be used by clients. + /** @ingroup task_scheduling */ + class arena; + class task_scheduler_observer_v3; +} // namespace internal +//! @endcond + +namespace interface6 { +//! @cond INTERNAL +namespace internal { +using namespace tbb::internal; + +template +class enqueued_function_task : public task { // TODO: reuse from task_group? + F my_func; + /*override*/ task* execute() { + my_func(); + return NULL; + } +public: + enqueued_function_task ( const F& f ) : my_func(f) {} +}; + +class delegate_base : no_assign { +public: + virtual void operator()() const = 0; + virtual ~delegate_base() {} +}; + +template +class delegated_function : public delegate_base { + F &my_func; + /*override*/ void operator()() const { + my_func(); + } +public: + delegated_function ( F& f ) : my_func(f) {} +}; +} // namespace internal +//! @endcond + +/** 1-to-1 proxy representation class of scheduler's arena + * Constructors set up settings only, real construction is deferred till the first method invocation + * TODO: A side effect of this is that it's impossible to create a const task_arena object. Rethink? + * Destructor only removes one of the references to the inner arena representation. + * Final destruction happens when all the references (and the work) are gone. + */ +class task_arena { + friend class internal::task_scheduler_observer_v3; + //! Concurrency level for deferred initialization + int my_max_concurrency; + + //! Reserved master slots + unsigned my_master_slots; + + //! NULL if not currently initialized. + internal::arena* my_arena; + + // Initialization flag enabling compiler to throw excessive lazy initialization checks + bool my_initialized; + + // const methods help to optimize the !my_arena check TODO: check, IDEA: move to base-class? + void __TBB_EXPORTED_METHOD internal_initialize( ); + void __TBB_EXPORTED_METHOD internal_terminate( ); + void __TBB_EXPORTED_METHOD internal_enqueue( task&, intptr_t ) const; + void __TBB_EXPORTED_METHOD internal_execute( internal::delegate_base& ) const; + void __TBB_EXPORTED_METHOD internal_wait() const; + +public: + //! Typedef for number of threads that is automatic. + static const int automatic = -1; // any value < 1 means 'automatic' + + //! Creates task_arena with certain concurrency limits + /** @arg max_concurrency specifies total number of slots in arena where threads work + * @arg reserved_for_masters specifies number of slots to be used by master threads only. + * Value of 1 is default and reflects behavior of implicit arenas. + **/ + task_arena(int max_concurrency = automatic, unsigned reserved_for_masters = 1) + : my_max_concurrency(max_concurrency) + , my_master_slots(reserved_for_masters) + , my_arena(0) + , my_initialized(false) + {} + + //! Copies settings from another task_arena + task_arena(const task_arena &s) + : my_max_concurrency(s.my_max_concurrency) // copy settings + , my_master_slots(s.my_master_slots) + , my_arena(0) // but not the reference or instance + , my_initialized(false) + {} + + inline void initialize() { + if( !my_initialized ) { + internal_initialize(); + my_initialized = true; + } + } + + //! Overrides concurrency level and forces initialization of internal representation + inline void initialize(int max_concurrency, unsigned reserved_for_masters = 1) { + __TBB_ASSERT( !my_arena, "task_arena was initialized already"); + if( !my_initialized ) { + my_max_concurrency = max_concurrency; + my_master_slots = reserved_for_masters; + initialize(); + } // TODO: else throw? + } + + //! Removes the reference to the internal arena representation. + //! Not thread safe wrt concurrent invocations of other methods. + inline void terminate() { + if( my_initialized ) { + internal_terminate(); + my_initialized = false; + } + } + + //! Removes the reference to the internal arena representation, and destroys the external object. + //! Not thread safe wrt concurrent invocations of other methods. + ~task_arena() { + terminate(); + } + + //! Returns true if the arena is active (initialized); false otherwise. + //! The name was chosen to match a task_scheduler_init method with the same semantics. + bool is_active() const { return my_initialized; } + + //! Enqueues a task into the arena to process a functor, and immediately returns. + //! Does not require the calling thread to join the arena + template + void enqueue( const F& f ) { + initialize(); + internal_enqueue( *new( task::allocate_root() ) internal::enqueued_function_task(f), 0 ); + } + +#if __TBB_TASK_PRIORITY + //! Enqueues a task with priority p into the arena to process a functor f, and immediately returns. + //! Does not require the calling thread to join the arena + template + void enqueue( const F& f, priority_t p ) { + __TBB_ASSERT( p == priority_low || p == priority_normal || p == priority_high, "Invalid priority level value" ); + initialize(); + internal_enqueue( *new( task::allocate_root() ) internal::enqueued_function_task(f), (intptr_t)p ); + } +#endif// __TBB_TASK_PRIORITY + + //! Joins the arena and executes a functor, then returns + //! If not possible to join, wraps the functor into a task, enqueues it and waits for task completion + //! Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread + template + void execute(F& f) { + initialize(); + internal::delegated_function d(f); + internal_execute( d ); + } + + //! Joins the arena and executes a functor, then returns + //! If not possible to join, wraps the functor into a task, enqueues it and waits for task completion + //! Can decrement the arena demand for workers, causing a worker to leave and free a slot to the calling thread + template + void execute(const F& f) { + initialize(); + internal::delegated_function d(f); + internal_execute( d ); + } + + //! Wait for all work in the arena to be completed + //! Even submitted by other application threads + //! Joins arena if/when possible (in the same way as execute()) + void wait_until_empty() { + initialize(); + internal_wait(); + } + + //! Returns the index, aka slot number, of the calling thread in its current arena + static int __TBB_EXPORTED_FUNC current_slot(); +}; + +} // namespace interfaceX + +using interface6::task_arena; + +} // namespace tbb + +#endif /* __TBB_TASK_ARENA */ + +#endif /* __TBB_task_arena_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/task_group.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_group.h new file mode 100644 index 0000000000..0c5c5f832b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_group.h @@ -0,0 +1,252 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_task_group_H +#define __TBB_task_group_H + +#include "task.h" +#include "tbb_exception.h" + +#if __TBB_TASK_GROUP_CONTEXT + +namespace tbb { + +namespace internal { + template class task_handle_task; +} + +template +class task_handle : internal::no_assign { + template friend class internal::task_handle_task; + + static const intptr_t scheduled = 0x1; + + F my_func; + intptr_t my_state; + + void mark_scheduled () { + // The check here is intentionally lax to avoid the impact of interlocked operation + if ( my_state & scheduled ) + internal::throw_exception( internal::eid_invalid_multiple_scheduling ); + my_state |= scheduled; + } +public: + task_handle( const F& f ) : my_func(f), my_state(0) {} + + void operator() () const { my_func(); } +}; + +enum task_group_status { + not_complete, + complete, + canceled +}; + +namespace internal { + +// Suppress gratuitous warnings from icc 11.0 when lambda expressions are used in instances of function_task. +//#pragma warning(disable: 588) + +template +class function_task : public task { + F my_func; + /*override*/ task* execute() { + my_func(); + return NULL; + } +public: + function_task( const F& f ) : my_func(f) {} +}; + +template +class task_handle_task : public task { + task_handle& my_handle; + /*override*/ task* execute() { + my_handle(); + return NULL; + } +public: + task_handle_task( task_handle& h ) : my_handle(h) { h.mark_scheduled(); } +}; + +class task_group_base : internal::no_copy { +protected: + empty_task* my_root; + task_group_context my_context; + + task& owner () { return *my_root; } + + template + task_group_status internal_run_and_wait( F& f ) { + __TBB_TRY { + if ( !my_context.is_group_execution_cancelled() ) + f(); + } __TBB_CATCH( ... ) { + my_context.register_pending_exception(); + } + return wait(); + } + + template + void internal_run( F& f ) { + owner().spawn( *new( owner().allocate_additional_child_of(*my_root) ) Task(f) ); + } + +public: + task_group_base( uintptr_t traits = 0 ) + : my_context(task_group_context::bound, task_group_context::default_traits | traits) + { + my_root = new( task::allocate_root(my_context) ) empty_task; + my_root->set_ref_count(1); + } + + ~task_group_base() { + if( my_root->ref_count() > 1 ) { + bool stack_unwinding_in_progress = std::uncaught_exception(); + // Always attempt to do proper cleanup to avoid inevitable memory corruption + // in case of missing wait (for the sake of better testability & debuggability) + if ( !is_canceling() ) + cancel(); + __TBB_TRY { + my_root->wait_for_all(); + } __TBB_CATCH (...) { + task::destroy(*my_root); + __TBB_RETHROW(); + } + task::destroy(*my_root); + if ( !stack_unwinding_in_progress ) + internal::throw_exception( internal::eid_missing_wait ); + } + else { + task::destroy(*my_root); + } + } + + template + void run( task_handle& h ) { + internal_run< task_handle, internal::task_handle_task >( h ); + } + + task_group_status wait() { + __TBB_TRY { + my_root->wait_for_all(); + } __TBB_CATCH( ... ) { + my_context.reset(); + __TBB_RETHROW(); + } + if ( my_context.is_group_execution_cancelled() ) { + my_context.reset(); + return canceled; + } + return complete; + } + + bool is_canceling() { + return my_context.is_group_execution_cancelled(); + } + + void cancel() { + my_context.cancel_group_execution(); + } +}; // class task_group_base + +} // namespace internal + +class task_group : public internal::task_group_base { +public: + task_group () : task_group_base( task_group_context::concurrent_wait ) {} + +#if TBB_DEPRECATED + ~task_group() __TBB_TRY { + __TBB_ASSERT( my_root->ref_count() != 0, NULL ); + if( my_root->ref_count() > 1 ) + my_root->wait_for_all(); + } +#if TBB_USE_EXCEPTIONS + catch (...) { + // Have to destroy my_root here as the base class destructor won't be called + task::destroy(*my_root); + throw; + } +#endif /* TBB_USE_EXCEPTIONS */ +#endif /* TBB_DEPRECATED */ + +#if __SUNPRO_CC + template + void run( task_handle& h ) { + internal_run< task_handle, internal::task_handle_task >( h ); + } +#else + using task_group_base::run; +#endif + + template + void run( const F& f ) { + internal_run< const F, internal::function_task >( f ); + } + + template + task_group_status run_and_wait( const F& f ) { + return internal_run_and_wait( f ); + } + + template + task_group_status run_and_wait( task_handle& h ) { + return internal_run_and_wait< task_handle >( h ); + } +}; // class task_group + +class structured_task_group : public internal::task_group_base { +public: + template + task_group_status run_and_wait ( task_handle& h ) { + return internal_run_and_wait< task_handle >( h ); + } + + task_group_status wait() { + task_group_status res = task_group_base::wait(); + my_root->set_ref_count(1); + return res; + } +}; // class structured_task_group + +inline +bool is_current_task_group_canceling() { + return task::self().is_cancelled(); +} + +template +task_handle make_task( const F& f ) { + return task_handle( f ); +} + +} // namespace tbb + +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#endif /* __TBB_task_group_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_init.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_init.h new file mode 100644 index 0000000000..1a09df10fd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_init.h @@ -0,0 +1,161 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_task_scheduler_init_H +#define __TBB_task_scheduler_init_H + +#include "tbb_stddef.h" +#include "limits.h" + +namespace tbb { + +typedef std::size_t stack_size_type; + +//! @cond INTERNAL +namespace internal { + //! Internal to library. Should not be used by clients. + /** @ingroup task_scheduling */ + class scheduler; +} // namespace internal +//! @endcond + +//! Class delimiting the scope of task scheduler activity. +/** A thread can construct a task_scheduler_init object and keep it alive + while it uses TBB's tasking subsystem (including parallel algorithms). + + This class allows to customize properties of the TBB task pool to some extent. + For example it can limit concurrency level of parallel work initiated by the + given thread. It also can be used to specify stack size of the TBB worker threads, + though this setting is not effective if the thread pool has already been created. + + If a parallel construct is used without task_scheduler_init object previously + created, the scheduler will be initialized automatically with default settings, + and will persist until this thread exits. Default concurrency level is defined + as described in task_scheduler_init::initialize(). + @ingroup task_scheduling */ +class task_scheduler_init: internal::no_copy { + enum ExceptionPropagationMode { + propagation_mode_exact = 1u, + propagation_mode_captured = 2u, + propagation_mode_mask = propagation_mode_exact | propagation_mode_captured + }; +#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE + enum { + wait_workers_in_terminate_flag = 128u + }; +#endif + + /** NULL if not currently initialized. */ + internal::scheduler* my_scheduler; +public: + + //! Typedef for number of threads that is automatic. + static const int automatic = -1; + + //! Argument to initialize() or constructor that causes initialization to be deferred. + static const int deferred = -2; + + //! Ensure that scheduler exists for this thread + /** A value of -1 lets TBB decide on the number of threads, which is usually + maximal hardware concurrency for this process, that is the number of logical + CPUs on the machine (possibly limited by the processor affinity mask of this + process (Windows) or of this thread (Linux, FreeBSD). It is preferable option + for production code because it helps to avoid nasty surprises when several + TBB based components run side-by-side or in a nested fashion inside the same + process. + + The number_of_threads is ignored if any other task_scheduler_inits + currently exist. A thread may construct multiple task_scheduler_inits. + Doing so does no harm because the underlying scheduler is reference counted. */ + void __TBB_EXPORTED_METHOD initialize( int number_of_threads=automatic ); + + //! The overloaded method with stack size parameter + /** Overloading is necessary to preserve ABI compatibility */ + void __TBB_EXPORTED_METHOD initialize( int number_of_threads, stack_size_type thread_stack_size ); + + //! Inverse of method initialize. + void __TBB_EXPORTED_METHOD terminate(); + + //! Shorthand for default constructor followed by call to initialize(number_of_threads). +#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE + task_scheduler_init( int number_of_threads=automatic, stack_size_type thread_stack_size=0, bool wait_workers_in_terminate = false ) +#else + task_scheduler_init( int number_of_threads=automatic, stack_size_type thread_stack_size=0 ) +#endif + : my_scheduler(NULL) { + // Two lowest order bits of the stack size argument may be taken to communicate + // default exception propagation mode of the client to be used when the + // client manually creates tasks in the master thread and does not use + // explicit task group context object. This is necessary because newer + // TBB binaries with exact propagation enabled by default may be used + // by older clients that expect tbb::captured_exception wrapper. + // All zeros mean old client - no preference. + __TBB_ASSERT( !(thread_stack_size & propagation_mode_mask), "Requested stack size is not aligned" ); +#if TBB_USE_EXCEPTIONS + thread_stack_size |= TBB_USE_CAPTURED_EXCEPTION ? propagation_mode_captured : propagation_mode_exact; +#endif /* TBB_USE_EXCEPTIONS */ +#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE + if (wait_workers_in_terminate) + my_scheduler = (internal::scheduler*)wait_workers_in_terminate_flag; +#endif + initialize( number_of_threads, thread_stack_size ); + } + + //! Destroy scheduler for this thread if thread has no other live task_scheduler_inits. + ~task_scheduler_init() { + if( my_scheduler ) + terminate(); + internal::poison_pointer( my_scheduler ); + } + //! Returns the number of threads TBB scheduler would create if initialized by default. + /** Result returned by this method does not depend on whether the scheduler + has already been initialized. + + Because tbb 2.0 does not support blocking tasks yet, you may use this method + to boost the number of threads in the tbb's internal pool, if your tasks are + doing I/O operations. The optimal number of additional threads depends on how + much time your tasks spend in the blocked state. + + Before TBB 3.0 U4 this method returned the number of logical CPU in the + system. Currently on Windows, Linux and FreeBSD it returns the number of + logical CPUs available to the current process in accordance with its affinity + mask. + + NOTE: The return value of this method never changes after its first invocation. + This means that changes in the process affinity mask that took place after + this method was first invoked will not affect the number of worker threads + in the TBB worker threads pool. */ + static int __TBB_EXPORTED_FUNC default_num_threads (); + + //! Returns true if scheduler is active (initialized); false otherwise + bool is_active() const { return my_scheduler != NULL; } +}; + +} // namespace tbb + +#endif /* __TBB_task_scheduler_init_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_observer.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_observer.h new file mode 100644 index 0000000000..d529eac058 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/task_scheduler_observer.h @@ -0,0 +1,164 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_task_scheduler_observer_H +#define __TBB_task_scheduler_observer_H + +#include "atomic.h" +#if __TBB_TASK_ARENA +#include "task_arena.h" +#endif //__TBB_TASK_ARENA + +#if __TBB_SCHEDULER_OBSERVER + +namespace tbb { +namespace interface6 { +class task_scheduler_observer; +} +namespace internal { + +class observer_proxy; +class observer_list; + +class task_scheduler_observer_v3 { + friend class observer_proxy; + friend class observer_list; + friend class interface6::task_scheduler_observer; + + //! Pointer to the proxy holding this observer. + /** Observers are proxied by the scheduler to maintain persistent lists of them. **/ + observer_proxy* my_proxy; + + //! Counter preventing the observer from being destroyed while in use by the scheduler. + /** Valid only when observation is on. **/ + atomic my_busy_count; + +public: + //! Enable or disable observation + /** For local observers the method can be used only when the current thread + has the task scheduler initialized or is attached to an arena. + + Repeated calls with the same state are no-ops. **/ + void __TBB_EXPORTED_METHOD observe( bool state=true ); + + //! Returns true if observation is enabled, false otherwise. + bool is_observing() const {return my_proxy!=NULL;} + + //! Construct observer with observation disabled. + task_scheduler_observer_v3() : my_proxy(NULL) { my_busy_count.store(0); } + + //! Entry notification + /** Invoked from inside observe(true) call and whenever a worker enters the arena + this observer is associated with. If a thread is already in the arena when + the observer is activated, the entry notification is called before it + executes the first stolen task. + + Obsolete semantics. For global observers it is called by a thread before + the first steal since observation became enabled. **/ + virtual void on_scheduler_entry( bool /*is_worker*/ ) {} + + //! Exit notification + /** Invoked from inside observe(false) call and whenever a worker leaves the + arena this observer is associated with. + + Obsolete semantics. For global observers it is called by a thread before + the first steal since observation became enabled. **/ + virtual void on_scheduler_exit( bool /*is_worker*/ ) {} + + //! Destructor automatically switches observation off if it is enabled. + virtual ~task_scheduler_observer_v3() { if(my_proxy) observe(false);} +}; + +} // namespace internal + +#if TBB_PREVIEW_LOCAL_OBSERVER +namespace interface6 { +class task_scheduler_observer : public internal::task_scheduler_observer_v3 { + friend class internal::task_scheduler_observer_v3; + friend class internal::observer_proxy; + friend class internal::observer_list; + + /** Negative numbers with the largest absolute value to minimize probability + of coincidence in case of a bug in busy count usage. **/ + // TODO: take more high bits for version number + static const intptr_t v6_trait = (intptr_t)((~(uintptr_t)0 >> 1) + 1); + + //! contains task_arena pointer or tag indicating local or global semantics of the observer + intptr_t my_context_tag; + enum { global_tag = 0, implicit_tag = 1 }; + +public: + //! Construct local or global observer in inactive state (observation disabled). + /** For a local observer entry/exit notifications are invoked whenever a worker + thread joins/leaves the arena of the observer's owner thread. If a thread is + already in the arena when the observer is activated, the entry notification is + called before it executes the first stolen task. **/ + /** TODO: Obsolete. + Global observer semantics is obsolete as it violates master thread isolation + guarantees and is not composable. Thus the current default behavior of the + constructor is obsolete too and will be changed in one of the future versions + of the library. **/ + task_scheduler_observer( bool local = false ) { + my_busy_count.store(v6_trait); + my_context_tag = local? implicit_tag : global_tag; + } + +#if __TBB_TASK_ARENA + //! Construct local observer for a given arena in inactive state (observation disabled). + /** entry/exit notifications are invoked whenever a thread joins/leaves arena. + If a thread is already in the arena when the observer is activated, the entry notification + is called before it executes the first stolen task. **/ + task_scheduler_observer( task_arena & a) { + my_busy_count.store(v6_trait); + my_context_tag = (intptr_t)&a; + } +#endif //__TBB_TASK_ARENA + + //! The callback can be invoked in a worker thread before it leaves an arena. + /** If it returns false, the thread remains in the arena. Will not be called for masters + or if the worker leaves arena due to rebalancing or priority changes, etc. + NOTE: The preview library must be linked for this method to take effect **/ + virtual bool on_scheduler_leaving() { return true; } + + //! Destructor additionally protects concurrent on_scheduler_leaving notification + // It is recommended to disable observation before destructor of a derived class starts, + // otherwise it can lead to concurrent notification callback on partly destroyed object + virtual ~task_scheduler_observer() { if(my_proxy) observe(false); } +}; + +} //namespace interface6 +using interface6::task_scheduler_observer; +#else /*TBB_PREVIEW_LOCAL_OBSERVER*/ +typedef tbb::internal::task_scheduler_observer_v3 task_scheduler_observer; +#endif /*TBB_PREVIEW_LOCAL_OBSERVER*/ + +} // namespace tbb + +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#endif /* __TBB_task_scheduler_observer_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb.h new file mode 100644 index 0000000000..54b491772b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb.h @@ -0,0 +1,84 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_H +#define __TBB_tbb_H + +/** + This header bulk-includes declarations or definitions of all the functionality + provided by TBB (save for malloc dependent headers). + + If you use only a few TBB constructs, consider including specific headers only. + Any header listed below can be included independently of others. +**/ + +#if TBB_PREVIEW_AGGREGATOR +#include "aggregator.h" +#endif +#include "aligned_space.h" +#include "atomic.h" +#include "blocked_range.h" +#include "blocked_range2d.h" +#include "blocked_range3d.h" +#include "cache_aligned_allocator.h" +#include "combinable.h" +#include "concurrent_unordered_map.h" +#include "concurrent_hash_map.h" +#include "concurrent_queue.h" +#include "concurrent_vector.h" +#include "critical_section.h" +#include "enumerable_thread_specific.h" +#include "mutex.h" +#include "null_mutex.h" +#include "null_rw_mutex.h" +#include "parallel_do.h" +#include "parallel_for.h" +#include "parallel_for_each.h" +#include "parallel_invoke.h" +#include "parallel_reduce.h" +#include "parallel_scan.h" +#include "parallel_sort.h" +#include "partitioner.h" +#include "pipeline.h" +#include "queuing_mutex.h" +#include "queuing_rw_mutex.h" +#include "reader_writer_lock.h" +#include "concurrent_priority_queue.h" +#include "recursive_mutex.h" +#include "spin_mutex.h" +#include "spin_rw_mutex.h" +#include "task.h" +#include "task_group.h" +#include "task_scheduler_init.h" +#include "task_scheduler_observer.h" +#include "tbb_allocator.h" +#include "tbb_exception.h" +#include "tbb_thread.h" +#include "tick_count.h" + +#endif /* __TBB_tbb_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_allocator.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_allocator.h new file mode 100644 index 0000000000..3a753bb32c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_allocator.h @@ -0,0 +1,227 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_allocator_H +#define __TBB_tbb_allocator_H + +#include "tbb_stddef.h" +#include +#if __TBB_CPP11_RVALUE_REF_PRESENT && !__TBB_CPP11_STD_FORWARD_BROKEN + #include // std::forward +#endif + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + + //! Deallocates memory using FreeHandler + /** The function uses scalable_free if scalable allocator is available and free if not*/ + void __TBB_EXPORTED_FUNC deallocate_via_handler_v3( void *p ); + + //! Allocates memory using MallocHandler + /** The function uses scalable_malloc if scalable allocator is available and malloc if not*/ + void* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n ); + + //! Returns true if standard malloc/free are used to work with memory. + bool __TBB_EXPORTED_FUNC is_malloc_used_v3(); +} +//! @endcond + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for erroneous "unreferenced parameter" warning in method destroy. + #pragma warning (push) + #pragma warning (disable: 4100) +#endif + +//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 +/** The class selects the best memory allocation mechanism available + from scalable_malloc and standard malloc. + The members are ordered the same way they are in section 20.4.1 + of the ISO C++ standard. + @ingroup memory_allocation */ +template +class tbb_allocator { +public: + typedef typename internal::allocator_type::value_type value_type; + typedef value_type* pointer; + typedef const value_type* const_pointer; + typedef value_type& reference; + typedef const value_type& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + template struct rebind { + typedef tbb_allocator other; + }; + + //! Specifies current allocator + enum malloc_type { + scalable, + standard + }; + + tbb_allocator() throw() {} + tbb_allocator( const tbb_allocator& ) throw() {} + template tbb_allocator(const tbb_allocator&) throw() {} + + pointer address(reference x) const {return &x;} + const_pointer address(const_reference x) const {return &x;} + + //! Allocate space for n objects. + pointer allocate( size_type n, const void* /*hint*/ = 0) { + return pointer(internal::allocate_via_handler_v3( n * sizeof(value_type) )); + } + + //! Free previously allocated block of memory. + void deallocate( pointer p, size_type ) { + internal::deallocate_via_handler_v3(p); + } + + //! Largest value for which method allocate might succeed. + size_type max_size() const throw() { + size_type max = static_cast(-1) / sizeof (value_type); + return (max > 0 ? max : 1); + } + + //! Copy-construct value at location pointed to by p. +#if __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + template + void construct(U *p, Args&&... args) + #if __TBB_CPP11_STD_FORWARD_BROKEN + { ::new((void *)p) U((args)...); } + #else + { ::new((void *)p) U(std::forward(args)...); } + #endif +#else // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} +#endif // __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT && __TBB_CPP11_RVALUE_REF_PRESENT + + //! Destroy value at location pointed to by p. + void destroy( pointer p ) {p->~value_type();} + + //! Returns current allocator + static malloc_type allocator_type() { + return internal::is_malloc_used_v3() ? standard : scalable; + } +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4100 is back + +//! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 +/** @ingroup memory_allocation */ +template<> +class tbb_allocator { +public: + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; + template struct rebind { + typedef tbb_allocator other; + }; +}; + +template +inline bool operator==( const tbb_allocator&, const tbb_allocator& ) {return true;} + +template +inline bool operator!=( const tbb_allocator&, const tbb_allocator& ) {return false;} + +//! Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5 +/** The class is an adapter over an actual allocator that fills the allocation + using memset function with template argument C as the value. + The members are ordered the same way they are in section 20.4.1 + of the ISO C++ standard. + @ingroup memory_allocation */ +template class Allocator = tbb_allocator> +class zero_allocator : public Allocator +{ +public: + typedef Allocator base_allocator_type; + typedef typename base_allocator_type::value_type value_type; + typedef typename base_allocator_type::pointer pointer; + typedef typename base_allocator_type::const_pointer const_pointer; + typedef typename base_allocator_type::reference reference; + typedef typename base_allocator_type::const_reference const_reference; + typedef typename base_allocator_type::size_type size_type; + typedef typename base_allocator_type::difference_type difference_type; + template struct rebind { + typedef zero_allocator other; + }; + + zero_allocator() throw() { } + zero_allocator(const zero_allocator &a) throw() : base_allocator_type( a ) { } + template + zero_allocator(const zero_allocator &a) throw() : base_allocator_type( Allocator( a ) ) { } + + pointer allocate(const size_type n, const void *hint = 0 ) { + pointer ptr = base_allocator_type::allocate( n, hint ); + std::memset( ptr, 0, n * sizeof(value_type) ); + return ptr; + } +}; + +//! Analogous to std::allocator, as defined in ISO C++ Standard, Section 20.4.1 +/** @ingroup memory_allocation */ +template class Allocator> +class zero_allocator : public Allocator { +public: + typedef Allocator base_allocator_type; + typedef typename base_allocator_type::value_type value_type; + typedef typename base_allocator_type::pointer pointer; + typedef typename base_allocator_type::const_pointer const_pointer; + template struct rebind { + typedef zero_allocator other; + }; +}; + +template class B1, typename T2, template class B2> +inline bool operator==( const zero_allocator &a, const zero_allocator &b) { + return static_cast< B1 >(a) == static_cast< B2 >(b); +} +template class B1, typename T2, template class B2> +inline bool operator!=( const zero_allocator &a, const zero_allocator &b) { + return static_cast< B1 >(a) != static_cast< B2 >(b); +} + +} // namespace tbb + +#endif /* __TBB_tbb_allocator_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_config.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_config.h new file mode 100644 index 0000000000..20294df61f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_config.h @@ -0,0 +1,527 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_config_H +#define __TBB_tbb_config_H + +/** This header is supposed to contain macro definitions and C style comments only. + The macros defined here are intended to control such aspects of TBB build as + - presence of compiler features + - compilation modes + - feature sets + - known compiler/platform issues +**/ + +#define __TBB_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) + +#if __clang__ + /**according to clang documentation version can be vendor specific **/ + #define __TBB_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) +#endif + +/** Presence of compiler features **/ + +#if __INTEL_COMPILER == 9999 && __INTEL_COMPILER_BUILD_DATE == 20110811 +/* Intel(R) Composer XE 2011 Update 6 incorrectly sets __INTEL_COMPILER. Fix it. */ + #undef __INTEL_COMPILER + #define __INTEL_COMPILER 1210 +#endif + +#if (__TBB_GCC_VERSION >= 40400) && !defined(__INTEL_COMPILER) + /** warning suppression pragmas available in GCC since 4.4 **/ + #define __TBB_GCC_WARNING_SUPPRESSION_PRESENT 1 +#endif + +/* Select particular features of C++11 based on compiler version. + ICC 12.1 (Linux), GCC 4.3 and higher, clang 2.9 and higher + set __GXX_EXPERIMENTAL_CXX0X__ in c++11 mode. + + Compilers that mimics other compilers (ICC, clang) must be processed before + compilers they mimic (GCC, MSVC). + + TODO: The following conditions should be extended when new compilers/runtimes + support added. + */ + +#if __INTEL_COMPILER + /** On Windows environment when using Intel C++ compiler with Visual Studio 2010*, + the C++0x features supported by Visual C++ 2010 are enabled by default + TODO: find a way to get know if c++0x mode is specified in command line on windows **/ + #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT ( __GXX_EXPERIMENTAL_CXX0X__ && __VARIADIC_TEMPLATES ) + #define __TBB_CPP11_RVALUE_REF_PRESENT ( (__GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600) && (__INTEL_COMPILER >= 1200) ) + #if _MSC_VER >= 1600 + #define __TBB_EXCEPTION_PTR_PRESENT ( __INTEL_COMPILER > 1300 \ + /*ICC 12.1 Upd 10 and 13 beta Upd 2 fixed exception_ptr linking issue*/ \ + || (__INTEL_COMPILER == 1300 && __INTEL_COMPILER_BUILD_DATE >= 20120530) \ + || (__INTEL_COMPILER == 1210 && __INTEL_COMPILER_BUILD_DATE >= 20120410) ) + /** libstc++ that comes with GCC 4.6 use C++11 features not supported by ICC 12.1. + * Because of that ICC 12.1 does not support C++11 mode with with gcc 4.6. (or higher) + * , and therefore does not define __GXX_EXPERIMENTAL_CXX0X__ macro**/ + #elif (__TBB_GCC_VERSION >= 40404) && (__TBB_GCC_VERSION < 40600) + #define __TBB_EXCEPTION_PTR_PRESENT ( __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1200 ) + #elif (__TBB_GCC_VERSION >= 40600) + #define __TBB_EXCEPTION_PTR_PRESENT ( __GXX_EXPERIMENTAL_CXX0X__ && __INTEL_COMPILER >= 1300 ) + #else + #define __TBB_EXCEPTION_PTR_PRESENT 0 + #endif + #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1700 || (__GXX_EXPERIMENTAL_CXX0X__ && __TBB_GCC_VERSION >= 40600)) + #define __TBB_STATIC_ASSERT_PRESENT ( __GXX_EXPERIMENTAL_CXX0X__ || (_MSC_VER >= 1600) ) + #define __TBB_CPP11_TUPLE_PRESENT ( (_MSC_VER >= 1600) || ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40300)) ) + /** TODO: re-check for compiler version greater than 12.1 if it supports initializer lists**/ + #define __TBB_INITIALIZER_LISTS_PRESENT 0 + #define __TBB_CONSTEXPR_PRESENT 0 + #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT 0 +#elif __clang__ +//TODO: these options need to be rechecked +/** on OS X* the only way to get C++11 is to use clang. For library features (e.g. exception_ptr) libc++ is also + * required. So there is no need to check GCC version for clang**/ + #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __has_feature(__cxx_variadic_templates__) + #define __TBB_CPP11_RVALUE_REF_PRESENT __has_feature(__cxx_rvalue_references__) + #define __TBB_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && (__cplusplus >= 201103L)) + #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (__GXX_EXPERIMENTAL_CXX0X__ && (__cplusplus >= 201103L)) + #define __TBB_STATIC_ASSERT_PRESENT __has_feature(__cxx_static_assert__) + /**Clang (preprocessor) has problems with dealing with expression having __has_include in #if's + * used inside C++ code. (At least version that comes with OS X 10.8) **/ + #if (__GXX_EXPERIMENTAL_CXX0X__ && __has_include()) + #define __TBB_CPP11_TUPLE_PRESENT 1 + #endif + #if (__has_feature(__cxx_generalized_initializers__) && __has_include()) + #define __TBB_INITIALIZER_LISTS_PRESENT 1 + #endif + #define __TBB_CONSTEXPR_PRESENT __has_feature(__cxx_constexpr__) + #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT (__has_feature(__cxx_defaulted_functions__) && __has_feature(__cxx_deleted_functions__)) +#elif __GNUC__ + #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT __GXX_EXPERIMENTAL_CXX0X__ + #define __TBB_CPP11_RVALUE_REF_PRESENT __GXX_EXPERIMENTAL_CXX0X__ + /** __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 here is a substitution for _GLIBCXX_ATOMIC_BUILTINS_4, which is a prerequisite + for exception_ptr but cannot be used in this file because it is defined in a header, not by the compiler. + If the compiler has no atomic intrinsics, the C++ library should not expect those as well. **/ + #define __TBB_EXCEPTION_PTR_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40404) && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) + #define __TBB_MAKE_EXCEPTION_PTR_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40600)) + #define __TBB_STATIC_ASSERT_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40300)) + #define __TBB_CPP11_TUPLE_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40300)) + #define __TBB_INITIALIZER_LISTS_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40400)) + /** gcc seems have to support constexpr from 4.4 but tests in (test_atomic) seeming reasonable fail to compile prior 4.6**/ + #define __TBB_CONSTEXPR_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40400)) + #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT ((__GXX_EXPERIMENTAL_CXX0X__) && (__TBB_GCC_VERSION >= 40400)) +#elif _MSC_VER + #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT 0 + #define __TBB_CPP11_RVALUE_REF_PRESENT 0 + #define __TBB_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1600) + #define __TBB_STATIC_ASSERT_PRESENT (_MSC_VER >= 1600) + #define __TBB_MAKE_EXCEPTION_PTR_PRESENT (_MSC_VER >= 1700) + #define __TBB_CPP11_TUPLE_PRESENT (_MSC_VER >= 1600) + #define __TBB_INITIALIZER_LISTS_PRESENT 0 + #define __TBB_CONSTEXPR_PRESENT 0 + #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT 0 +#else + #define __TBB_CPP11_VARIADIC_TEMPLATES_PRESENT 0 + #define __TBB_CPP11_RVALUE_REF_PRESENT 0 + #define __TBB_EXCEPTION_PTR_PRESENT 0 + #define __TBB_STATIC_ASSERT_PRESENT 0 + #define __TBB_MAKE_EXCEPTION_PTR_PRESENT 0 + #define __TBB_CPP11_TUPLE_PRESENT 0 + #define __TBB_INITIALIZER_LISTS_PRESENT 0 + #define __TBB_CONSTEXPR_PRESENT 0 + #define __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT 0 +#endif + +//TODO: not clear how exactly this macro affects exception_ptr - investigate +// On linux ICC fails to find existing std::exception_ptr in libstdc++ without this define +#if __INTEL_COMPILER && __GNUC__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) + #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#endif + +// Work around a bug in MinGW32 +#if __MINGW32__ && __TBB_EXCEPTION_PTR_PRESENT && !defined(_GLIBCXX_ATOMIC_BUILTINS_4) + #define _GLIBCXX_ATOMIC_BUILTINS_4 +#endif + +#if __GNUC__ || __SUNPRO_CC || __IBMCPP__ + /* ICC defines __GNUC__ and so is covered */ + #define __TBB_ATTRIBUTE_ALIGNED_PRESENT 1 +#elif _MSC_VER && (_MSC_VER >= 1300 || __INTEL_COMPILER) + #define __TBB_DECLSPEC_ALIGN_PRESENT 1 +#endif + +/* Actually ICC supports gcc __sync_* intrinsics starting 11.1, + * but 64 bit support for 32 bit target comes in later ones*/ +/* TODO: change the version back to 4.1.2 once macro __TBB_WORD_SIZE become optional */ +#if (__TBB_GCC_VERSION >= 40306) || (__INTEL_COMPILER >= 1200) + /** built-in atomics available in GCC since 4.1.2 **/ + #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1 +#endif + +#if (__INTEL_COMPILER >= 1210) + /** built-in C++11 style atomics available in compiler since 12.1 **/ + #define __TBB_ICC_BUILTIN_ATOMICS_PRESENT 1 +#endif + +/** User controlled TBB features & modes **/ + +#ifndef TBB_USE_DEBUG +#ifdef TBB_DO_ASSERT +#define TBB_USE_DEBUG TBB_DO_ASSERT +#else +#ifdef _DEBUG +#define TBB_USE_DEBUG _DEBUG +#else +#define TBB_USE_DEBUG 0 +#endif +#endif /* TBB_DO_ASSERT */ +#endif /* TBB_USE_DEBUG */ + +#ifndef TBB_USE_ASSERT +#ifdef TBB_DO_ASSERT +#define TBB_USE_ASSERT TBB_DO_ASSERT +#else +#define TBB_USE_ASSERT TBB_USE_DEBUG +#endif /* TBB_DO_ASSERT */ +#endif /* TBB_USE_ASSERT */ + +#ifndef TBB_USE_THREADING_TOOLS +#ifdef TBB_DO_THREADING_TOOLS +#define TBB_USE_THREADING_TOOLS TBB_DO_THREADING_TOOLS +#else +#define TBB_USE_THREADING_TOOLS TBB_USE_DEBUG +#endif /* TBB_DO_THREADING_TOOLS */ +#endif /* TBB_USE_THREADING_TOOLS */ + +#ifndef TBB_USE_PERFORMANCE_WARNINGS +#ifdef TBB_PERFORMANCE_WARNINGS +#define TBB_USE_PERFORMANCE_WARNINGS TBB_PERFORMANCE_WARNINGS +#else +#define TBB_USE_PERFORMANCE_WARNINGS TBB_USE_DEBUG +#endif /* TBB_PEFORMANCE_WARNINGS */ +#endif /* TBB_USE_PERFORMANCE_WARNINGS */ + +#if __MIC__ || __MIC2__ +#define __TBB_DEFINE_MIC 1 +#endif + +#if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX) + #if TBB_USE_EXCEPTIONS + #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. + #elif !defined(TBB_USE_EXCEPTIONS) + #define TBB_USE_EXCEPTIONS 0 + #endif +#elif !defined(TBB_USE_EXCEPTIONS) + #if __TBB_DEFINE_MIC + #define TBB_USE_EXCEPTIONS 0 + #else + #define TBB_USE_EXCEPTIONS 1 + #endif +#elif TBB_USE_EXCEPTIONS && __TBB_DEFINE_MIC + #error Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. +#endif + +#ifndef TBB_IMPLEMENT_CPP0X + /** By default, use C++0x classes if available **/ + #if __GNUC__==4 && __GNUC_MINOR__>=4 && __GXX_EXPERIMENTAL_CXX0X__ + #define TBB_IMPLEMENT_CPP0X 0 + #elif __clang__ && __cplusplus >= 201103L + //TODO: consider introducing separate macroses for each file? + //prevent injection of according tbb names into std:: namespace if native headers are present + #if __has_include() || __has_include() + #define TBB_IMPLEMENT_CPP0X 0 + #else + #define TBB_IMPLEMENT_CPP0X 1 + #endif + #else + #define TBB_IMPLEMENT_CPP0X 1 + #endif +#endif /* TBB_IMPLEMENT_CPP0X */ + +/* TBB_USE_CAPTURED_EXCEPTION should be explicitly set to either 0 or 1, as it is used as C++ const */ +#ifndef TBB_USE_CAPTURED_EXCEPTION + /**TODO: enable it by default on OS X*, once it is enabled in pre-built binary **/ + /** OS X* and IA64 pre-built TBB binaries do not support exception_ptr. **/ + #if __TBB_EXCEPTION_PTR_PRESENT && !defined(__APPLE__) && !defined(__ia64__) + #define TBB_USE_CAPTURED_EXCEPTION 0 + #else + #define TBB_USE_CAPTURED_EXCEPTION 1 + #endif +#else /* defined TBB_USE_CAPTURED_EXCEPTION */ + #if !TBB_USE_CAPTURED_EXCEPTION && !__TBB_EXCEPTION_PTR_PRESENT + #error Current runtime does not support std::exception_ptr. Set TBB_USE_CAPTURED_EXCEPTION and make sure that your code is ready to catch tbb::captured_exception. + #endif +#endif /* defined TBB_USE_CAPTURED_EXCEPTION */ + +/** Check whether the request to use GCC atomics can be satisfied **/ +#if (TBB_USE_GCC_BUILTINS && !__TBB_GCC_BUILTIN_ATOMICS_PRESENT) + #error "GCC atomic built-ins are not supported." +#endif + +/** Internal TBB features & modes **/ + +/** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/ +#define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && ((__TBB_GCC_VERSION >= 40000) || __INTEL_COMPILER ) ) + +/** __TBB_DYNAMIC_LOAD_ENABLED describes the system possibility to load shared libraries at run time **/ +#ifndef __TBB_DYNAMIC_LOAD_ENABLED + #define __TBB_DYNAMIC_LOAD_ENABLED 1 +#endif + +/** __TBB_SOURCE_DIRECTLY_INCLUDED is a mode used in whitebox testing when + it's necessary to test internal functions not exported from TBB DLLs +**/ +#if (_WIN32||_WIN64) && __TBB_SOURCE_DIRECTLY_INCLUDED + #define __TBB_NO_IMPLICIT_LINKAGE 1 + #define __TBBMALLOC_NO_IMPLICIT_LINKAGE 1 +#endif + +#ifndef __TBB_COUNT_TASK_NODES + #define __TBB_COUNT_TASK_NODES TBB_USE_ASSERT +#endif + +#ifndef __TBB_TASK_GROUP_CONTEXT + #define __TBB_TASK_GROUP_CONTEXT 1 +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#ifndef __TBB_SCHEDULER_OBSERVER + #define __TBB_SCHEDULER_OBSERVER 1 +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#if !defined(TBB_PREVIEW_TASK_ARENA) && __TBB_BUILD + #define TBB_PREVIEW_TASK_ARENA __TBB_CPF_BUILD +#endif /* TBB_PREVIEW_TASK_ARENA */ +#define __TBB_TASK_ARENA TBB_PREVIEW_TASK_ARENA +#if TBB_PREVIEW_TASK_ARENA + #define TBB_PREVIEW_LOCAL_OBSERVER 1 + #define __TBB_NO_IMPLICIT_LINKAGE 1 + #define __TBB_RECYCLE_TO_ENQUEUE 1 + #define __TBB_TASK_PRIORITY 0 // TODO: it will be removed in next versions + #if !__TBB_SCHEDULER_OBSERVER + #error TBB_PREVIEW_TASK_ARENA requires __TBB_SCHEDULER_OBSERVER to be enabled + #endif +#endif /* TBB_PREVIEW_TASK_ARENA */ + +#if !defined(TBB_PREVIEW_LOCAL_OBSERVER) && __TBB_BUILD && __TBB_SCHEDULER_OBSERVER + #define TBB_PREVIEW_LOCAL_OBSERVER 1 +#endif /* TBB_PREVIEW_LOCAL_OBSERVER */ + +#if TBB_USE_EXCEPTIONS && !__TBB_TASK_GROUP_CONTEXT + #error TBB_USE_EXCEPTIONS requires __TBB_TASK_GROUP_CONTEXT to be enabled +#endif + +#ifndef __TBB_TASK_PRIORITY + #define __TBB_TASK_PRIORITY __TBB_TASK_GROUP_CONTEXT +#endif /* __TBB_TASK_PRIORITY */ + +#if __TBB_TASK_PRIORITY && !__TBB_TASK_GROUP_CONTEXT + #error __TBB_TASK_PRIORITY requires __TBB_TASK_GROUP_CONTEXT to be enabled +#endif + +#if TBB_PREVIEW_WAITING_FOR_WORKERS || __TBB_BUILD + #define __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE 1 +#endif + +#if !defined(__TBB_SURVIVE_THREAD_SWITCH) && \ + (_WIN32 || _WIN64 || __APPLE__ || (__linux__ && !__ANDROID__)) + #define __TBB_SURVIVE_THREAD_SWITCH 1 +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +#ifndef __TBB_DEFAULT_PARTITIONER +#if TBB_DEPRECATED +/** Default partitioner for parallel loop templates in TBB 1.0-2.1 */ +#define __TBB_DEFAULT_PARTITIONER tbb::simple_partitioner +#else +/** Default partitioner for parallel loop templates since TBB 2.2 */ +#define __TBB_DEFAULT_PARTITIONER tbb::auto_partitioner +#endif /* TBB_DEPRECATED */ +#endif /* !defined(__TBB_DEFAULT_PARTITIONER */ + +#ifdef _VARIADIC_MAX +#define __TBB_VARIADIC_MAX _VARIADIC_MAX +#else +#if _MSC_VER >= 1700 +#define __TBB_VARIADIC_MAX 5 /* current VS11 setting, may change. */ +#else +#define __TBB_VARIADIC_MAX 10 +#endif +#endif + +// Define preprocessor symbols used to determine architecture +#if _WIN32||_WIN64 +# if defined(_M_X64)||defined(__x86_64__) // the latter for MinGW support +# define __TBB_x86_64 1 +# elif defined(_M_IA64) +# define __TBB_ipf 1 +# elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support +# define __TBB_x86_32 1 +# endif +#else /* Assume generic Unix */ +# if !__linux__ && !__APPLE__ +# define __TBB_generic_os 1 +# endif +# if __x86_64__ +# define __TBB_x86_64 1 +# elif __ia64__ +# define __TBB_ipf 1 +# elif __i386__||__i386 // __i386 is for Sun OS +# define __TBB_x86_32 1 +# else +# define __TBB_generic_arch 1 +# endif +#endif +/** Macros of the form __TBB_XXX_BROKEN denote known issues that are caused by + the bugs in compilers, standard or OS specific libraries. They should be + removed as soon as the corresponding bugs are fixed or the buggy OS/compiler + versions go out of the support list. +**/ + +#if __ANDROID__ && __TBB_GCC_VERSION <= 40403 && !__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 + /** Necessary because on Android 8-byte CAS and F&A are not available for some processor architectures, + but no mandatory warning message appears from GCC 4.4.3. Instead, only a linkage error occurs when + these atomic operations are used (such as in unit test test_atomic.exe). **/ + #define __TBB_GCC_64BIT_ATOMIC_BUILTINS_BROKEN 1 +#endif + +#if __GNUC__ && __TBB_x86_64 && __INTEL_COMPILER == 1200 + #define __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN 1 +#endif + +#if _MSC_VER && __INTEL_COMPILER && (__INTEL_COMPILER<1110 || __INTEL_COMPILER==1110 && __INTEL_COMPILER_BUILD_DATE < 20091012) + /** Necessary to avoid ICL error (or warning in non-strict mode): + "exception specification for implicitly declared virtual destructor is + incompatible with that of overridden one". **/ + #define __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN 1 +#endif + +#if defined(_MSC_VER) && _MSC_VER < 1500 && !defined(__INTEL_COMPILER) + /** VS2005 and earlier do not allow declaring template class as a friend + of classes defined in other namespaces. **/ + #define __TBB_TEMPLATE_FRIENDS_BROKEN 1 +#endif + +//TODO: recheck for different clang versions +#if __GLIBC__==2 && __GLIBC_MINOR__==3 || __MINGW32__ || (__APPLE__ && (__clang__ || __INTEL_COMPILER==1200 && !TBB_USE_DEBUG)) + /** Macro controlling EH usages in TBB tests. + Some older versions of glibc crash when exception handling happens concurrently. **/ + #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 1 +#else + #define __TBB_THROW_ACROSS_MODULE_BOUNDARY_BROKEN 0 +#endif + +#if (_WIN32||_WIN64) && __INTEL_COMPILER == 1110 + /** That's a bug in Intel compiler 11.1.044/IA-32/Windows, that leads to a worker thread crash on the thread's startup. **/ + #define __TBB_ICL_11_1_CODE_GEN_BROKEN 1 +#endif + +#if __clang__ || (__GNUC__==3 && __GNUC_MINOR__==3 && !defined(__INTEL_COMPILER)) + /** Bugs with access to nested classes declared in protected area */ + #define __TBB_PROTECTED_NESTED_CLASS_BROKEN 1 +#endif + +#if __MINGW32__ && (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__<2) + /** MinGW has a bug with stack alignment for routines invoked from MS RTLs. + Since GCC 4.2, the bug can be worked around via a special attribute. **/ + #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 1 +#else + #define __TBB_SSE_STACK_ALIGNMENT_BROKEN 0 +#endif + +#if __GNUC__==4 && __GNUC_MINOR__==3 && __GNUC_PATCHLEVEL__==0 + /* GCC of this version may rashly ignore control dependencies */ + #define __TBB_GCC_OPTIMIZER_ORDERING_BROKEN 1 +#endif + +#if __FreeBSD__ + /** A bug in FreeBSD 8.0 results in kernel panic when there is contention + on a mutex created with this attribute. **/ + #define __TBB_PRIO_INHERIT_BROKEN 1 + + /** A bug in FreeBSD 8.0 results in test hanging when an exception occurs + during (concurrent?) object construction by means of placement new operator. **/ + #define __TBB_PLACEMENT_NEW_EXCEPTION_SAFETY_BROKEN 1 +#endif /* __FreeBSD__ */ + +#if (__linux__ || __APPLE__) && __i386__ && defined(__INTEL_COMPILER) + /** The Intel compiler for IA-32 (Linux|OS X) crashes or generates + incorrect code when __asm__ arguments have a cast to volatile. **/ + #define __TBB_ICC_ASM_VOLATILE_BROKEN 1 +#endif + +#if !__INTEL_COMPILER && (_MSC_VER || __GNUC__==3 && __GNUC_MINOR__<=2) + /** Bug in GCC 3.2 and MSVC compilers that sometimes return 0 for __alignof(T) + when T has not yet been instantiated. **/ + #define __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN 1 +#endif + +/* Actually for Clang it should be name __TBB_CPP11_STD_FORWARD_PRESENT. + * But in order to check for presence of std:: library feature we need to recognize + * is standard library actually used stdlibc++ (GNU one) or libc++ (clang one). + * Unfortunately it is not possible at the moment. So postponing it to later moment.*/ +/*TODO: for clang rename it to __TBB_CPP11_STD_FORWARD_PRESENT and re-implement it.*/ +#if (__INTEL_COMPILER) || (__clang__ && __TBB_GCC_VERSION <= 40300) + #define __TBB_CPP11_STD_FORWARD_BROKEN 1 +#else + #define __TBB_CPP11_STD_FORWARD_BROKEN 0 +#endif + +#if __TBB_DEFINE_MIC + /** Main thread and user's thread have different default thread affinity masks. **/ + #define __TBB_MAIN_THREAD_AFFINITY_BROKEN 1 +#endif + +/** __TBB_WIN8UI_SUPPORT enables support of New Windows*8 Store Apps and limit a possibility to load + shared libraries at run time only from application container **/ +#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP + #define __TBB_WIN8UI_SUPPORT 1 +#else + #define __TBB_WIN8UI_SUPPORT 0 +#endif + +#if !defined(__EXCEPTIONS) && __GNUC__==4 && (__GNUC_MINOR__==4 ||__GNUC_MINOR__==5 || (__INTEL_COMPILER==1300 && __TBB_GCC_VERSION>=40600 && __TBB_GCC_VERSION<=40700)) && defined(__GXX_EXPERIMENTAL_CXX0X__) +/* There is an issue for specific GCC toolchain when C++11 is enabled + and exceptions are disabled: + exceprion_ptr.h/nested_exception.h are using throw unconditionally. + */ + #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 1 +#else + #define __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN 0 +#endif + +#if __TBB_x86_32 && (__linux__ || __APPLE__ || _WIN32 || __sun) && ((defined(__INTEL_COMPILER) && (__INTEL_COMPILER <= 1300)) || (__GNUC__==3 && __GNUC_MINOR__==3 ) || defined(__SUNPRO_CC)) + // Some compilers for IA-32 fail to provide 8-byte alignment of objects on the stack, + // even if the object specifies 8-byte alignment. On such platforms, the IA-32 implementation + // of 64 bit atomics (e.g. atomic) use different tactics depending upon + // whether the object is properly aligned or not. + #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 1 +#else + #define __TBB_FORCE_64BIT_ALIGNMENT_BROKEN 0 +#endif + +#if (__TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && (__TBB_GCC_VERSION < 40700) && (!defined(__INTEL_COMPILER) && !defined (__clang__))) + #define __TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN 1 +#endif +/** End of __TBB_XXX_BROKEN macro section **/ + +#define __TBB_ATOMIC_CTORS (__TBB_CONSTEXPR_PRESENT && __TBB_DEFAULTED_AND_DELETED_FUNC_PRESENT && (!__TBB_ZERO_INIT_WITH_DEFAULTED_CTOR_BROKEN)) + +#endif /* __TBB_tbb_config_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_exception.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_exception.h new file mode 100644 index 0000000000..2077a1e441 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_exception.h @@ -0,0 +1,378 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_exception_H +#define __TBB_exception_H + +#include "tbb_stddef.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include +#include //required for bad_alloc definition, operators new +#include // required to construct std exception classes + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +namespace tbb { + +//! Exception for concurrent containers +class bad_last_alloc : public std::bad_alloc { +public: + /*override*/ const char* what() const throw(); +#if __TBB_DEFAULT_DTOR_THROW_SPEC_BROKEN + /*override*/ ~bad_last_alloc() throw() {} +#endif +}; + +//! Exception for PPL locks +class improper_lock : public std::exception { +public: + /*override*/ const char* what() const throw(); +}; + +//! Exception for user-initiated abort +class user_abort : public std::exception { +public: + /*override*/ const char* what() const throw(); +}; + +//! Exception for missing wait on structured_task_group +class missing_wait : public std::exception { +public: + /*override*/ const char* what() const throw(); +}; + +//! Exception for repeated scheduling of the same task_handle +class invalid_multiple_scheduling : public std::exception { +public: + /*override*/ const char* what() const throw(); +}; + +namespace internal { +//! Obsolete +void __TBB_EXPORTED_FUNC throw_bad_last_alloc_exception_v4(); + +enum exception_id { + eid_bad_alloc = 1, + eid_bad_last_alloc, + eid_nonpositive_step, + eid_out_of_range, + eid_segment_range_error, + eid_index_range_error, + eid_missing_wait, + eid_invalid_multiple_scheduling, + eid_improper_lock, + eid_possible_deadlock, + eid_operation_not_permitted, + eid_condvar_wait_failed, + eid_invalid_load_factor, + eid_reserved, // free slot for backward compatibility, can be reused. + eid_invalid_swap, + eid_reservation_length_error, + eid_invalid_key, + eid_user_abort, + eid_reserved1, +#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE + // This id is used only inside library and only for support of CPF functionality. + // So, if we drop the functionality, eid_reserved1 can be safely renamed and reused. + eid_blocking_sch_init = eid_reserved1, +#endif + //! The last enumerator tracks the number of defined IDs. It must remain the last one. + /** When adding new IDs, place them immediately _before_ this comment (that is + _after_ all the existing IDs. NEVER insert new IDs between the existing ones. **/ + eid_max +}; + +//! Gathers all throw operators in one place. +/** Its purpose is to minimize code bloat that can be caused by throw operators + scattered in multiple places, especially in templates. **/ +void __TBB_EXPORTED_FUNC throw_exception_v4 ( exception_id ); + +//! Versionless convenience wrapper for throw_exception_v4() +inline void throw_exception ( exception_id eid ) { throw_exception_v4(eid); } + +} // namespace internal +} // namespace tbb + +#if __TBB_TASK_GROUP_CONTEXT +#include "tbb_allocator.h" +#include //for typeid + +namespace tbb { + +//! Interface to be implemented by all exceptions TBB recognizes and propagates across the threads. +/** If an unhandled exception of the type derived from tbb::tbb_exception is intercepted + by the TBB scheduler in one of the worker threads, it is delivered to and re-thrown in + the root thread. The root thread is the thread that has started the outermost algorithm + or root task sharing the same task_group_context with the guilty algorithm/task (the one + that threw the exception first). + + Note: when documentation mentions workers with respect to exception handling, + masters are implied as well, because they are completely equivalent in this context. + Consequently a root thread can be master or worker thread. + + NOTE: In case of nested algorithms or complex task hierarchies when the nested + levels share (explicitly or by means of implicit inheritance) the task group + context of the outermost level, the exception may be (re-)thrown multiple times + (ultimately - in each worker on each nesting level) before reaching the root + thread at the outermost level. IMPORTANT: if you intercept an exception derived + from this class on a nested level, you must re-throw it in the catch block by means + of the "throw;" operator. + + TBB provides two implementations of this interface: tbb::captured_exception and + template class tbb::movable_exception. See their declarations for more info. **/ +class tbb_exception : public std::exception +{ + /** No operator new is provided because the TBB usage model assumes dynamic + creation of the TBB exception objects only by means of applying move() + operation on an exception thrown out of TBB scheduler. **/ + void* operator new ( size_t ); + +public: + //! Creates and returns pointer to the deep copy of this exception object. + /** Move semantics is allowed. **/ + virtual tbb_exception* move () throw() = 0; + + //! Destroys objects created by the move() method. + /** Frees memory and calls destructor for this exception object. + Can and must be used only on objects created by the move method. **/ + virtual void destroy () throw() = 0; + + //! Throws this exception object. + /** Make sure that if you have several levels of derivation from this interface + you implement or override this method on the most derived level. The implementation + is as simple as "throw *this;". Failure to do this will result in exception + of a base class type being thrown. **/ + virtual void throw_self () = 0; + + //! Returns RTTI name of the originally intercepted exception + virtual const char* name() const throw() = 0; + + //! Returns the result of originally intercepted exception's what() method. + virtual const char* what() const throw() = 0; + + /** Operator delete is provided only to allow using existing smart pointers + with TBB exception objects obtained as the result of applying move() + operation on an exception thrown out of TBB scheduler. + + When overriding method move() make sure to override operator delete as well + if memory is allocated not by TBB's scalable allocator. **/ + void operator delete ( void* p ) { + internal::deallocate_via_handler_v3(p); + } +}; + +//! This class is used by TBB to propagate information about unhandled exceptions into the root thread. +/** Exception of this type is thrown by TBB in the root thread (thread that started a parallel + algorithm ) if an unhandled exception was intercepted during the algorithm execution in one + of the workers. + \sa tbb::tbb_exception **/ +class captured_exception : public tbb_exception +{ +public: + captured_exception ( const captured_exception& src ) + : tbb_exception(src), my_dynamic(false) + { + set(src.my_exception_name, src.my_exception_info); + } + + captured_exception ( const char* name_, const char* info ) + : my_dynamic(false) + { + set(name_, info); + } + + __TBB_EXPORTED_METHOD ~captured_exception () throw(); + + captured_exception& operator= ( const captured_exception& src ) { + if ( this != &src ) { + clear(); + set(src.my_exception_name, src.my_exception_info); + } + return *this; + } + + /*override*/ + captured_exception* __TBB_EXPORTED_METHOD move () throw(); + + /*override*/ + void __TBB_EXPORTED_METHOD destroy () throw(); + + /*override*/ + void throw_self () { __TBB_THROW(*this); } + + /*override*/ + const char* __TBB_EXPORTED_METHOD name() const throw(); + + /*override*/ + const char* __TBB_EXPORTED_METHOD what() const throw(); + + void __TBB_EXPORTED_METHOD set ( const char* name, const char* info ) throw(); + void __TBB_EXPORTED_METHOD clear () throw(); + +private: + //! Used only by method clone(). + captured_exception() {} + + //! Functionally equivalent to {captured_exception e(name,info); return e.clone();} + static captured_exception* allocate ( const char* name, const char* info ); + + bool my_dynamic; + const char* my_exception_name; + const char* my_exception_info; +}; + +//! Template that can be used to implement exception that transfers arbitrary ExceptionData to the root thread +/** Code using TBB can instantiate this template with an arbitrary ExceptionData type + and throw this exception object. Such exceptions are intercepted by the TBB scheduler + and delivered to the root thread (). + \sa tbb::tbb_exception **/ +template +class movable_exception : public tbb_exception +{ + typedef movable_exception self_type; + +public: + movable_exception ( const ExceptionData& data_ ) + : my_exception_data(data_) + , my_dynamic(false) + , my_exception_name( +#if TBB_USE_EXCEPTIONS + typeid(self_type).name() +#else /* !TBB_USE_EXCEPTIONS */ + "movable_exception" +#endif /* !TBB_USE_EXCEPTIONS */ + ) + {} + + movable_exception ( const movable_exception& src ) throw () + : tbb_exception(src) + , my_exception_data(src.my_exception_data) + , my_dynamic(false) + , my_exception_name(src.my_exception_name) + {} + + ~movable_exception () throw() {} + + const movable_exception& operator= ( const movable_exception& src ) { + if ( this != &src ) { + my_exception_data = src.my_exception_data; + my_exception_name = src.my_exception_name; + } + return *this; + } + + ExceptionData& data () throw() { return my_exception_data; } + + const ExceptionData& data () const throw() { return my_exception_data; } + + /*override*/ const char* name () const throw() { return my_exception_name; } + + /*override*/ const char* what () const throw() { return "tbb::movable_exception"; } + + /*override*/ + movable_exception* move () throw() { + void* e = internal::allocate_via_handler_v3(sizeof(movable_exception)); + if ( e ) { + ::new (e) movable_exception(*this); + ((movable_exception*)e)->my_dynamic = true; + } + return (movable_exception*)e; + } + /*override*/ + void destroy () throw() { + __TBB_ASSERT ( my_dynamic, "Method destroy can be called only on dynamically allocated movable_exceptions" ); + if ( my_dynamic ) { + this->~movable_exception(); + internal::deallocate_via_handler_v3(this); + } + } + /*override*/ + void throw_self () { __TBB_THROW( *this ); } + +protected: + //! User data + ExceptionData my_exception_data; + +private: + //! Flag specifying whether this object has been dynamically allocated (by the move method) + bool my_dynamic; + + //! RTTI name of this class + /** We rely on the fact that RTTI names are static string constants. **/ + const char* my_exception_name; +}; + +#if !TBB_USE_CAPTURED_EXCEPTION +namespace internal { + +//! Exception container that preserves the exact copy of the original exception +/** This class can be used only when the appropriate runtime support (mandated + by C++0x) is present **/ +class tbb_exception_ptr { + std::exception_ptr my_ptr; + +public: + static tbb_exception_ptr* allocate (); + static tbb_exception_ptr* allocate ( const tbb_exception& tag ); + //! This overload uses move semantics (i.e. it empties src) + static tbb_exception_ptr* allocate ( captured_exception& src ); + + //! Destroys this objects + /** Note that objects of this type can be created only by the allocate() method. **/ + void destroy () throw(); + + //! Throws the contained exception . + void throw_self () { std::rethrow_exception(my_ptr); } + +private: + tbb_exception_ptr ( const std::exception_ptr& src ) : my_ptr(src) {} + tbb_exception_ptr ( const captured_exception& src ) : + #if __TBB_MAKE_EXCEPTION_PTR_PRESENT + my_ptr(std::make_exception_ptr(src)) // the final function name in C++11 + #else + my_ptr(std::copy_exception(src)) // early C++0x drafts name + #endif + {} +}; // class tbb::internal::tbb_exception_ptr + +} // namespace internal +#endif /* !TBB_USE_CAPTURED_EXCEPTION */ + +} // namespace tbb + +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#endif /* __TBB_exception_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_machine.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_machine.h new file mode 100644 index 0000000000..56800d0756 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_machine.h @@ -0,0 +1,928 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_machine_H +#define __TBB_machine_H + +/** This header provides basic platform abstraction layer by hooking up appropriate + architecture/OS/compiler specific headers from the /include/tbb/machine directory. + If a plug-in header does not implement all the required APIs, it must specify + the missing ones by setting one or more of the following macros: + + __TBB_USE_GENERIC_PART_WORD_CAS + __TBB_USE_GENERIC_PART_WORD_FETCH_ADD + __TBB_USE_GENERIC_PART_WORD_FETCH_STORE + __TBB_USE_GENERIC_FETCH_ADD + __TBB_USE_GENERIC_FETCH_STORE + __TBB_USE_GENERIC_DWORD_FETCH_ADD + __TBB_USE_GENERIC_DWORD_FETCH_STORE + __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE + __TBB_USE_GENERIC_FULL_FENCED_LOAD_STORE + __TBB_USE_GENERIC_RELAXED_LOAD_STORE + __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE + + In this case tbb_machine.h will add missing functionality based on a minimal set + of APIs that are required to be implemented by all plug-n headers as described + further. + Note that these generic implementations may be sub-optimal for a particular + architecture, and thus should be relied upon only after careful evaluation + or as the last resort. + + Additionally __TBB_64BIT_ATOMICS can be set to 0 on a 32-bit architecture to + indicate that the port is not going to support double word atomics. It may also + be set to 1 explicitly, though normally this is not necessary as tbb_machine.h + will set it automatically. + + __TBB_BIG_ENDIAN macro can be defined by the implementation as well. + It is used only if the __TBB_USE_GENERIC_PART_WORD_CAS is set. + Possible values are: + - 1 if the system is big endian, + - 0 if it is little endian, + - or -1 to explicitly state that __TBB_USE_GENERIC_PART_WORD_CAS can not be used. + -1 should be used when it is known in advance that endianness can change in run time + or it is not simple big or little but something more complex. + The system will try to detect it in run time if it is not set(in assumption that it + is either a big or little one). + + Prerequisites for each architecture port + ---------------------------------------- + The following functions and macros have no generic implementation. Therefore they must be + implemented in each machine architecture specific header either as a conventional + function or as a functional macro. + + __TBB_WORDSIZE + This is the size of machine word in bytes, i.e. for 32 bit systems it + should be defined to 4. + + __TBB_Yield() + Signals OS that the current thread is willing to relinquish the remainder + of its time quantum. + + __TBB_full_memory_fence() + Must prevent all memory operations from being reordered across it (both + by hardware and compiler). All such fences must be totally ordered (or + sequentially consistent). + + __TBB_machine_cmpswp4( volatile void *ptr, int32_t value, int32_t comparand ) + Must be provided if __TBB_USE_FENCED_ATOMICS is not set. + + __TBB_machine_cmpswp8( volatile void *ptr, int32_t value, int64_t comparand ) + Must be provided for 64-bit architectures if __TBB_USE_FENCED_ATOMICS is not set, + and for 32-bit architectures if __TBB_64BIT_ATOMICS is set + + __TBB_machine_(...), where + = {cmpswp, fetchadd, fetchstore} + = {1, 2, 4, 8} + = {full_fence, acquire, release, relaxed} + Must be provided if __TBB_USE_FENCED_ATOMICS is set. + + __TBB_control_consistency_helper() + Bridges the memory-semantics gap between architectures providing only + implicit C++0x "consume" semantics (like Power Architecture) and those + also implicitly obeying control dependencies (like IA-64). + It must be used only in conditional code where the condition is itself + data-dependent, and will then make subsequent code behave as if the + original data dependency were acquired. + It needs only a compiler fence where implied by the architecture + either specifically (like IA-64) or because generally stronger "acquire" + semantics are enforced (like x86). + It is always valid, though potentially suboptimal, to replace + control with acquire on the load and then remove the helper. + + __TBB_acquire_consistency_helper(), __TBB_release_consistency_helper() + Must be provided if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE is set. + Enforce acquire and release semantics in generic implementations of fenced + store and load operations. Depending on the particular architecture/compiler + combination they may be a hardware fence, a compiler fence, both or nothing. + **/ + +#include "tbb_stddef.h" + +namespace tbb { +namespace internal { + +//////////////////////////////////////////////////////////////////////////////// +// Overridable helpers declarations +// +// A machine/*.h file may choose to define these templates, otherwise it must +// request default implementation by setting appropriate __TBB_USE_GENERIC_XXX macro(s). +// +template +struct machine_load_store; + +template +struct machine_load_store_relaxed; + +template +struct machine_load_store_seq_cst; +// +// End of overridable helpers declarations +//////////////////////////////////////////////////////////////////////////////// + +template struct atomic_selector; + +template<> struct atomic_selector<1> { + typedef int8_t word; + inline static word fetch_store ( volatile void* location, word value ); +}; + +template<> struct atomic_selector<2> { + typedef int16_t word; + inline static word fetch_store ( volatile void* location, word value ); +}; + +template<> struct atomic_selector<4> { +#if _MSC_VER && !_WIN64 + // Work-around that avoids spurious /Wp64 warnings + typedef intptr_t word; +#else + typedef int32_t word; +#endif + inline static word fetch_store ( volatile void* location, word value ); +}; + +template<> struct atomic_selector<8> { + typedef int64_t word; + inline static word fetch_store ( volatile void* location, word value ); +}; + +}} // namespaces internal, tbb + +#define __TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(M) \ + inline void __TBB_machine_generic_store8##M(volatile void *ptr, int64_t value) { \ + for(;;) { \ + int64_t result = *(int64_t *)ptr; \ + if( __TBB_machine_cmpswp8##M(ptr,value,result)==result ) break; \ + } \ + } \ + +#define __TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(M) \ + inline int64_t __TBB_machine_generic_load8##M(const volatile void *ptr) { \ + /* Comparand and new value may be anything, they only must be equal, and */ \ + /* the value should have a low probability to be actually found in 'location'.*/ \ + const int64_t anyvalue = 2305843009213693951LL; \ + return __TBB_machine_cmpswp8##M(const_cast(ptr),anyvalue,anyvalue); \ + } \ + +#if _WIN32||_WIN64 + +#ifdef _MANAGED +#pragma managed(push, off) +#endif + + #if __MINGW64__ || __MINGW32__ + extern "C" __declspec(dllimport) int __stdcall SwitchToThread( void ); + #define __TBB_Yield() SwitchToThread() + #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) + #include "machine/gcc_generic.h" + #elif __MINGW64__ + #include "machine/linux_intel64.h" + #elif __MINGW32__ + #include "machine/linux_ia32.h" + #endif + #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) + #include "machine/icc_generic.h" + #elif defined(_M_IX86) + #include "machine/windows_ia32.h" + #elif defined(_M_X64) + #include "machine/windows_intel64.h" + #elif _XBOX + #include "machine/xbox360_ppc.h" + #elif _M_ARM + #include "machine/msvc_armv7.h" + #endif + +#ifdef _MANAGED +#pragma managed(pop) +#endif + +#elif __TBB_DEFINE_MIC + + #include "machine/mic_common.h" + //TODO: check if ICC atomic intrinsics are available for MIC + #include "machine/linux_intel64.h" + +#elif __linux__ || __FreeBSD__ || __NetBSD__ + + #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) + #include "machine/gcc_generic.h" + #elif (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) + #include "machine/icc_generic.h" + #elif __i386__ + #include "machine/linux_ia32.h" + #elif __x86_64__ + #include "machine/linux_intel64.h" + #elif __ia64__ + #include "machine/linux_ia64.h" + #elif __powerpc__ + #include "machine/mac_ppc.h" + #elif __arm__ + #include "machine/gcc_armv7.h" + #elif __TBB_GCC_BUILTIN_ATOMICS_PRESENT + #include "machine/gcc_generic.h" + #endif + #include "machine/linux_common.h" + +#elif __APPLE__ + //TODO: TBB_USE_GCC_BUILTINS is not used for Mac, Sun, Aix + #if (TBB_USE_ICC_BUILTINS && __TBB_ICC_BUILTIN_ATOMICS_PRESENT) + #include "machine/icc_generic.h" + #elif __i386__ + #include "machine/linux_ia32.h" + #elif __x86_64__ + #include "machine/linux_intel64.h" + #elif __POWERPC__ + #include "machine/mac_ppc.h" + #endif + #include "machine/macos_common.h" + +#elif _AIX + + #include "machine/ibm_aix51.h" + +#elif __sun || __SUNPRO_CC + + #define __asm__ asm + #define __volatile__ volatile + + #if __i386 || __i386__ + #include "machine/linux_ia32.h" + #elif __x86_64__ + #include "machine/linux_intel64.h" + #elif __sparc + #include "machine/sunos_sparc.h" + #endif + #include + + #define __TBB_Yield() sched_yield() + +#endif /* OS selection */ + +#ifndef __TBB_64BIT_ATOMICS + #define __TBB_64BIT_ATOMICS 1 +#endif + +//TODO: replace usage of these functions with usage of tbb::atomic, and then remove them +//TODO: map functions with W suffix to use cast to tbb::atomic and according op, i.e. as_atomic().op() +// Special atomic functions +#if __TBB_USE_FENCED_ATOMICS + #define __TBB_machine_cmpswp1 __TBB_machine_cmpswp1full_fence + #define __TBB_machine_cmpswp2 __TBB_machine_cmpswp2full_fence + #define __TBB_machine_cmpswp4 __TBB_machine_cmpswp4full_fence + #define __TBB_machine_cmpswp8 __TBB_machine_cmpswp8full_fence + + #if __TBB_WORDSIZE==8 + #define __TBB_machine_fetchadd8 __TBB_machine_fetchadd8full_fence + #define __TBB_machine_fetchstore8 __TBB_machine_fetchstore8full_fence + #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd8release(P,V) + #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd8acquire(P,1) + #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd8release(P,(-1)) + #else + #define __TBB_machine_fetchadd4 __TBB_machine_fetchadd4full_fence + #define __TBB_machine_fetchstore4 __TBB_machine_fetchstore4full_fence + #define __TBB_FetchAndAddWrelease(P,V) __TBB_machine_fetchadd4release(P,V) + #define __TBB_FetchAndIncrementWacquire(P) __TBB_machine_fetchadd4acquire(P,1) + #define __TBB_FetchAndDecrementWrelease(P) __TBB_machine_fetchadd4release(P,(-1)) + #endif /* __TBB_WORDSIZE==4 */ +#else /* !__TBB_USE_FENCED_ATOMICS */ + #define __TBB_FetchAndAddWrelease(P,V) __TBB_FetchAndAddW(P,V) + #define __TBB_FetchAndIncrementWacquire(P) __TBB_FetchAndAddW(P,1) + #define __TBB_FetchAndDecrementWrelease(P) __TBB_FetchAndAddW(P,(-1)) +#endif /* !__TBB_USE_FENCED_ATOMICS */ + +#if __TBB_WORDSIZE==4 + #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp4(P,V,C) + #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd4(P,V) + #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore4(P,V) +#elif __TBB_WORDSIZE==8 + #if __TBB_USE_GENERIC_DWORD_LOAD_STORE || __TBB_USE_GENERIC_DWORD_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_STORE + #error These macros should only be used on 32-bit platforms. + #endif + + #define __TBB_CompareAndSwapW(P,V,C) __TBB_machine_cmpswp8(P,V,C) + #define __TBB_FetchAndAddW(P,V) __TBB_machine_fetchadd8(P,V) + #define __TBB_FetchAndStoreW(P,V) __TBB_machine_fetchstore8(P,V) +#else /* __TBB_WORDSIZE != 8 */ + #error Unsupported machine word size. +#endif /* __TBB_WORDSIZE */ + +#ifndef __TBB_Pause + inline void __TBB_Pause(int32_t) { + __TBB_Yield(); + } +#endif + +namespace tbb { + +//! Sequentially consistent full memory fence. +inline void atomic_fence () { __TBB_full_memory_fence(); } + +namespace internal { + +//! Class that implements exponential backoff. +/** See implementation of spin_wait_while_eq for an example. */ +class atomic_backoff : no_copy { + //! Time delay, in units of "pause" instructions. + /** Should be equal to approximately the number of "pause" instructions + that take the same time as an context switch. */ + static const int32_t LOOPS_BEFORE_YIELD = 16; + int32_t count; +public: + atomic_backoff() : count(1) {} + + //! Pause for a while. + void pause() { + if( count<=LOOPS_BEFORE_YIELD ) { + __TBB_Pause(count); + // Pause twice as long the next time. + count*=2; + } else { + // Pause is so long that we might as well yield CPU to scheduler. + __TBB_Yield(); + } + } + + // pause for a few times and then return false immediately. + bool bounded_pause() { + if( count<=LOOPS_BEFORE_YIELD ) { + __TBB_Pause(count); + // Pause twice as long the next time. + count*=2; + return true; + } else { + return false; + } + } + + void reset() { + count = 1; + } +}; + +//! Spin WHILE the value of the variable is equal to a given value +/** T and U should be comparable types. */ +template +void spin_wait_while_eq( const volatile T& location, U value ) { + atomic_backoff backoff; + while( location==value ) backoff.pause(); +} + +//! Spin UNTIL the value of the variable is equal to a given value +/** T and U should be comparable types. */ +template +void spin_wait_until_eq( const volatile T& location, const U value ) { + atomic_backoff backoff; + while( location!=value ) backoff.pause(); +} + +#if (__TBB_USE_GENERIC_PART_WORD_CAS && ( __TBB_BIG_ENDIAN==-1)) + #error generic implementation of part-word CAS was explicitly disabled for this configuration +#endif + +#if (__TBB_BIG_ENDIAN!=-1) +// there are following restrictions/limitations for this operation: +// - T should be unsigned, otherwise sign propagation will break correctness of bit manipulations. +// - T should be integer type of at most 4 bytes, for the casts and calculations to work. +// (Together, these rules limit applicability of Masked CAS to uint8_t and uint16_t only, +// as it does nothing useful for 4 bytes). +// - The operation assumes that the architecture consistently uses either little-endian or big-endian: +// it does not support mixed-endian or page-specific bi-endian architectures. +// This function is the only use of __TBB_BIG_ENDIAN. +// +//TODO: add static_assert for the requirements stated above +//TODO: check if it works with signed types +template +inline T __TBB_MaskedCompareAndSwap (volatile T * const ptr, const T value, const T comparand ) { + struct endianness{ static bool is_big_endian(){ + #ifndef __TBB_BIG_ENDIAN + const uint32_t probe = 0x03020100; + return (((const char*)(&probe))[0]==0x03); + #elif (__TBB_BIG_ENDIAN==0) || (__TBB_BIG_ENDIAN==1) + return __TBB_BIG_ENDIAN; + #else + #error unexpected value of __TBB_BIG_ENDIAN + #endif + }}; + + const uint32_t byte_offset = (uint32_t) ((uintptr_t)ptr & 0x3); + volatile uint32_t * const aligned_ptr = (uint32_t*)((uintptr_t)ptr - byte_offset ); + + // location of T within uint32_t for a C++ shift operation + const uint32_t bits_to_shift = 8*(endianness::is_big_endian() ? (4 - sizeof(T) - (byte_offset)) : byte_offset); + const uint32_t mask = (((uint32_t)1<<(sizeof(T)*8)) - 1 )<> bits_to_shift); + } + else continue; // CAS failed but the bits of interest were not changed + } +} +#endif //__TBB_BIG_ENDIAN!=-1 +template +inline T __TBB_CompareAndSwapGeneric (volatile void *ptr, T value, T comparand ); + +template<> +inline uint8_t __TBB_CompareAndSwapGeneric <1,uint8_t> (volatile void *ptr, uint8_t value, uint8_t comparand ) { +#if __TBB_USE_GENERIC_PART_WORD_CAS + return __TBB_MaskedCompareAndSwap((volatile uint8_t *)ptr,value,comparand); +#else + return __TBB_machine_cmpswp1(ptr,value,comparand); +#endif +} + +template<> +inline uint16_t __TBB_CompareAndSwapGeneric <2,uint16_t> (volatile void *ptr, uint16_t value, uint16_t comparand ) { +#if __TBB_USE_GENERIC_PART_WORD_CAS + return __TBB_MaskedCompareAndSwap((volatile uint16_t *)ptr,value,comparand); +#else + return __TBB_machine_cmpswp2(ptr,value,comparand); +#endif +} + +template<> +inline uint32_t __TBB_CompareAndSwapGeneric <4,uint32_t> (volatile void *ptr, uint32_t value, uint32_t comparand ) { + // Cast shuts up /Wp64 warning + return (uint32_t)__TBB_machine_cmpswp4(ptr,value,comparand); +} + +#if __TBB_64BIT_ATOMICS +template<> +inline uint64_t __TBB_CompareAndSwapGeneric <8,uint64_t> (volatile void *ptr, uint64_t value, uint64_t comparand ) { + return __TBB_machine_cmpswp8(ptr,value,comparand); +} +#endif + +template +inline T __TBB_FetchAndAddGeneric (volatile void *ptr, T addend) { + atomic_backoff b; + T result; + for(;;) { + result = *reinterpret_cast(ptr); + // __TBB_CompareAndSwapGeneric presumed to have full fence. + if( __TBB_CompareAndSwapGeneric ( ptr, result+addend, result )==result ) + break; + b.pause(); + } + return result; +} + +template +inline T __TBB_FetchAndStoreGeneric (volatile void *ptr, T value) { + atomic_backoff b; + T result; + for(;;) { + result = *reinterpret_cast(ptr); + // __TBB_CompareAndSwapGeneric presumed to have full fence. + if( __TBB_CompareAndSwapGeneric ( ptr, value, result )==result ) + break; + b.pause(); + } + return result; +} + +#if __TBB_USE_GENERIC_PART_WORD_CAS +#define __TBB_machine_cmpswp1 tbb::internal::__TBB_CompareAndSwapGeneric<1,uint8_t> +#define __TBB_machine_cmpswp2 tbb::internal::__TBB_CompareAndSwapGeneric<2,uint16_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_PART_WORD_FETCH_ADD +#define __TBB_machine_fetchadd1 tbb::internal::__TBB_FetchAndAddGeneric<1,uint8_t> +#define __TBB_machine_fetchadd2 tbb::internal::__TBB_FetchAndAddGeneric<2,uint16_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_ADD +#define __TBB_machine_fetchadd4 tbb::internal::__TBB_FetchAndAddGeneric<4,uint32_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_ADD || __TBB_USE_GENERIC_DWORD_FETCH_ADD +#define __TBB_machine_fetchadd8 tbb::internal::__TBB_FetchAndAddGeneric<8,uint64_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_PART_WORD_FETCH_STORE +#define __TBB_machine_fetchstore1 tbb::internal::__TBB_FetchAndStoreGeneric<1,uint8_t> +#define __TBB_machine_fetchstore2 tbb::internal::__TBB_FetchAndStoreGeneric<2,uint16_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_STORE +#define __TBB_machine_fetchstore4 tbb::internal::__TBB_FetchAndStoreGeneric<4,uint32_t> +#endif + +#if __TBB_USE_GENERIC_FETCH_STORE || __TBB_USE_GENERIC_DWORD_FETCH_STORE +#define __TBB_machine_fetchstore8 tbb::internal::__TBB_FetchAndStoreGeneric<8,uint64_t> +#endif + +#if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE +#define __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(S) \ + atomic_selector::word atomic_selector::fetch_store ( volatile void* location, word value ) { \ + return __TBB_machine_fetchstore##S( location, value ); \ + } + +__TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(1) +__TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(2) +__TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(4) +__TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE(8) + +#undef __TBB_MACHINE_DEFINE_ATOMIC_SELECTOR_FETCH_STORE +#endif /* __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ + +#if __TBB_USE_GENERIC_DWORD_LOAD_STORE +/*TODO: find a more elegant way to handle function names difference*/ +#if ! __TBB_USE_FENCED_ATOMICS + /* This name forwarding is needed for generic implementation of + * load8/store8 defined below (via macro) to pick the right CAS function*/ + #define __TBB_machine_cmpswp8full_fence __TBB_machine_cmpswp8 +#endif +__TBB_MACHINE_DEFINE_LOAD8_GENERIC_FENCED(full_fence) +__TBB_MACHINE_DEFINE_STORE8_GENERIC_FENCED(full_fence) + +#if ! __TBB_USE_FENCED_ATOMICS + #undef __TBB_machine_cmpswp8full_fence +#endif + +#define __TBB_machine_store8 tbb::internal::__TBB_machine_generic_store8full_fence +#define __TBB_machine_load8 tbb::internal::__TBB_machine_generic_load8full_fence +#endif /* __TBB_USE_GENERIC_DWORD_LOAD_STORE */ + +#if __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE +/** Fenced operations use volatile qualifier to prevent compiler from optimizing + them out, and on architectures with weak memory ordering to induce compiler + to generate code with appropriate acquire/release semantics. + On architectures like IA32, Intel64 (and likely Sparc TSO) volatile has + no effect on code gen, and consistency helpers serve as a compiler fence (the + latter being true for IA64/gcc as well to fix a bug in some gcc versions). + This code assumes that the generated instructions will operate atomically, + which typically requires a type that can be moved in a single instruction, + cooperation from the compiler for effective use of such an instruction, + and appropriate alignment of the data. **/ +template +struct machine_load_store { + static T load_with_acquire ( const volatile T& location ) { + T to_return = location; + __TBB_acquire_consistency_helper(); + return to_return; + } + static void store_with_release ( volatile T &location, T value ) { + __TBB_release_consistency_helper(); + location = value; + } +}; + +//in general, plain load and store of 32bit compiler is not atomic for 64bit types +#if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS +template +struct machine_load_store { + static T load_with_acquire ( const volatile T& location ) { + return (T)__TBB_machine_load8( (const volatile void*)&location ); + } + static void store_with_release ( volatile T& location, T value ) { + __TBB_machine_store8( (volatile void*)&location, (int64_t)value ); + } +}; +#endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ +#endif /* __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE */ + +#if __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE +template +struct machine_load_store_seq_cst { + static T load ( const volatile T& location ) { + __TBB_full_memory_fence(); + return machine_load_store::load_with_acquire( location ); + } +#if __TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE + static void store ( volatile T &location, T value ) { + atomic_selector::fetch_store( (volatile void*)&location, (typename atomic_selector::word)value ); + } +#else /* !__TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ + static void store ( volatile T &location, T value ) { + machine_load_store::store_with_release( location, value ); + __TBB_full_memory_fence(); + } +#endif /* !__TBB_USE_FETCHSTORE_AS_FULL_FENCED_STORE */ +}; + +#if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS +/** The implementation does not use functions __TBB_machine_load8/store8 as they + are not required to be sequentially consistent. **/ +template +struct machine_load_store_seq_cst { + static T load ( const volatile T& location ) { + // Comparand and new value may be anything, they only must be equal, and + // the value should have a low probability to be actually found in 'location'. + const int64_t anyvalue = 2305843009213693951LL; + return __TBB_machine_cmpswp8( (volatile void*)const_cast(&location), anyvalue, anyvalue ); + } + static void store ( volatile T &location, T value ) { + int64_t result = (volatile int64_t&)location; + while ( __TBB_machine_cmpswp8((volatile void*)&location, (int64_t)value, result) != result ) + result = (volatile int64_t&)location; + } +}; +#endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ +#endif /*__TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE */ + +#if __TBB_USE_GENERIC_RELAXED_LOAD_STORE +// Relaxed operations add volatile qualifier to prevent compiler from optimizing them out. +/** Volatile should not incur any additional cost on IA32, Intel64, and Sparc TSO + architectures. However on architectures with weak memory ordering compiler may + generate code with acquire/release semantics for operations on volatile data. **/ +template +struct machine_load_store_relaxed { + static inline T load ( const volatile T& location ) { + return location; + } + static inline void store ( volatile T& location, T value ) { + location = value; + } +}; + +#if __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS +template +struct machine_load_store_relaxed { + static inline T load ( const volatile T& location ) { + return (T)__TBB_machine_load8( (const volatile void*)&location ); + } + static inline void store ( volatile T& location, T value ) { + __TBB_machine_store8( (volatile void*)&location, (int64_t)value ); + } +}; +#endif /* __TBB_WORDSIZE==4 && __TBB_64BIT_ATOMICS */ +#endif /* __TBB_USE_GENERIC_RELAXED_LOAD_STORE */ + +#undef __TBB_WORDSIZE //this macro is forbidden to use outside of atomic machinery + +template +inline T __TBB_load_with_acquire(const volatile T &location) { + return machine_load_store::load_with_acquire( location ); +} +template +inline void __TBB_store_with_release(volatile T& location, V value) { + machine_load_store::store_with_release( location, T(value) ); +} +//! Overload that exists solely to avoid /Wp64 warnings. +inline void __TBB_store_with_release(volatile size_t& location, size_t value) { + machine_load_store::store_with_release( location, value ); +} + +template +inline T __TBB_load_full_fence(const volatile T &location) { + return machine_load_store_seq_cst::load( location ); +} +template +inline void __TBB_store_full_fence(volatile T& location, V value) { + machine_load_store_seq_cst::store( location, T(value) ); +} +//! Overload that exists solely to avoid /Wp64 warnings. +inline void __TBB_store_full_fence(volatile size_t& location, size_t value) { + machine_load_store_seq_cst::store( location, value ); +} + +template +inline T __TBB_load_relaxed (const volatile T& location) { + return machine_load_store_relaxed::load( const_cast(location) ); +} +template +inline void __TBB_store_relaxed ( volatile T& location, V value ) { + machine_load_store_relaxed::store( const_cast(location), T(value) ); +} +//! Overload that exists solely to avoid /Wp64 warnings. +inline void __TBB_store_relaxed ( volatile size_t& location, size_t value ) { + machine_load_store_relaxed::store( const_cast(location), value ); +} + +// Macro __TBB_TypeWithAlignmentAtLeastAsStrict(T) should be a type with alignment at least as +// strict as type T. The type should have a trivial default constructor and destructor, so that +// arrays of that type can be declared without initializers. +// It is correct (but perhaps a waste of space) if __TBB_TypeWithAlignmentAtLeastAsStrict(T) expands +// to a type bigger than T. +// The default definition here works on machines where integers are naturally aligned and the +// strictest alignment is 64. +#ifndef __TBB_TypeWithAlignmentAtLeastAsStrict + +#if __TBB_ATTRIBUTE_ALIGNED_PRESENT + +#define __TBB_DefineTypeWithAlignment(PowerOf2) \ +struct __TBB_machine_type_with_alignment_##PowerOf2 { \ + uint32_t member[PowerOf2/sizeof(uint32_t)]; \ +} __attribute__((aligned(PowerOf2))); +#define __TBB_alignof(T) __alignof__(T) + +#elif __TBB_DECLSPEC_ALIGN_PRESENT + +#define __TBB_DefineTypeWithAlignment(PowerOf2) \ +__declspec(align(PowerOf2)) \ +struct __TBB_machine_type_with_alignment_##PowerOf2 { \ + uint32_t member[PowerOf2/sizeof(uint32_t)]; \ +}; +#define __TBB_alignof(T) __alignof(T) + +#else /* A compiler with unknown syntax for data alignment */ +#error Must define __TBB_TypeWithAlignmentAtLeastAsStrict(T) +#endif + +/* Now declare types aligned to useful powers of two */ +// TODO: Is __TBB_DefineTypeWithAlignment(8) needed on 32 bit platforms? +__TBB_DefineTypeWithAlignment(16) +__TBB_DefineTypeWithAlignment(32) +__TBB_DefineTypeWithAlignment(64) + +typedef __TBB_machine_type_with_alignment_64 __TBB_machine_type_with_strictest_alignment; + +// Primary template is a declaration of incomplete type so that it fails with unknown alignments +template struct type_with_alignment; + +// Specializations for allowed alignments +template<> struct type_with_alignment<1> { char member; }; +template<> struct type_with_alignment<2> { uint16_t member; }; +template<> struct type_with_alignment<4> { uint32_t member; }; +template<> struct type_with_alignment<8> { uint64_t member; }; +template<> struct type_with_alignment<16> {__TBB_machine_type_with_alignment_16 member; }; +template<> struct type_with_alignment<32> {__TBB_machine_type_with_alignment_32 member; }; +template<> struct type_with_alignment<64> {__TBB_machine_type_with_alignment_64 member; }; + +#if __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN +//! Work around for bug in GNU 3.2 and MSVC compilers. +/** Bug is that compiler sometimes returns 0 for __alignof(T) when T has not yet been instantiated. + The work-around forces instantiation by forcing computation of sizeof(T) before __alignof(T). */ +template +struct work_around_alignment_bug { + static const size_t alignment = __TBB_alignof(T); +}; +#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment::alignment> +#else +#define __TBB_TypeWithAlignmentAtLeastAsStrict(T) tbb::internal::type_with_alignment<__TBB_alignof(T)> +#endif /* __TBB_ALIGNOF_NOT_INSTANTIATED_TYPES_BROKEN */ + +#endif /* __TBB_TypeWithAlignmentAtLeastAsStrict */ + +// Template class here is to avoid instantiation of the static data for modules that don't use it +template +struct reverse { + static const T byte_table[256]; +}; +// An efficient implementation of the reverse function utilizes a 2^8 lookup table holding the bit-reversed +// values of [0..2^8 - 1]. Those values can also be computed on the fly at a slightly higher cost. +template +const T reverse::byte_table[256] = { + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF +}; + +} // namespace internal +} // namespace tbb + +// Preserving access to legacy APIs +using tbb::internal::__TBB_load_with_acquire; +using tbb::internal::__TBB_store_with_release; + +// Mapping historically used names to the ones expected by atomic_load_store_traits +#define __TBB_load_acquire __TBB_load_with_acquire +#define __TBB_store_release __TBB_store_with_release + +#ifndef __TBB_Log2 +inline intptr_t __TBB_Log2( uintptr_t x ) { + if( x==0 ) return -1; + intptr_t result = 0; + +#ifndef _M_ARM + uintptr_t tmp; + if( sizeof(x)>4 && (tmp = ((uint64_t)x)>>32) ) { x=tmp; result += 32; } +#endif + if( uintptr_t tmp = x>>16 ) { x=tmp; result += 16; } + if( uintptr_t tmp = x>>8 ) { x=tmp; result += 8; } + if( uintptr_t tmp = x>>4 ) { x=tmp; result += 4; } + if( uintptr_t tmp = x>>2 ) { x=tmp; result += 2; } + + return (x&2)? result+1: result; +} +#endif + +#ifndef __TBB_AtomicOR +inline void __TBB_AtomicOR( volatile void *operand, uintptr_t addend ) { + tbb::internal::atomic_backoff b; + for(;;) { + uintptr_t tmp = *(volatile uintptr_t *)operand; + uintptr_t result = __TBB_CompareAndSwapW(operand, tmp|addend, tmp); + if( result==tmp ) break; + b.pause(); + } +} +#endif + +#ifndef __TBB_AtomicAND +inline void __TBB_AtomicAND( volatile void *operand, uintptr_t addend ) { + tbb::internal::atomic_backoff b; + for(;;) { + uintptr_t tmp = *(volatile uintptr_t *)operand; + uintptr_t result = __TBB_CompareAndSwapW(operand, tmp&addend, tmp); + if( result==tmp ) break; + b.pause(); + } +} +#endif + +#if __TBB_PREFETCHING +#ifndef __TBB_cl_prefetch +#error This platform does not define cache management primitives required for __TBB_PREFETCHING +#endif + +#ifndef __TBB_cl_evict +#define __TBB_cl_evict(p) +#endif +#endif + +#ifndef __TBB_Flag +typedef unsigned char __TBB_Flag; +#endif +typedef __TBB_atomic __TBB_Flag __TBB_atomic_flag; + +#ifndef __TBB_TryLockByte +inline bool __TBB_TryLockByte( __TBB_atomic_flag &flag ) { + return __TBB_machine_cmpswp1(&flag,1,0)==0; +} +#endif + +#ifndef __TBB_LockByte +inline __TBB_Flag __TBB_LockByte( __TBB_atomic_flag& flag ) { + if ( !__TBB_TryLockByte(flag) ) { + tbb::internal::atomic_backoff b; + do { + b.pause(); + } while ( !__TBB_TryLockByte(flag) ); + } + return 0; +} +#endif + +#ifndef __TBB_UnlockByte +#define __TBB_UnlockByte __TBB_store_with_release +#endif + +#ifndef __TBB_ReverseByte +inline unsigned char __TBB_ReverseByte(unsigned char src) { + return tbb::internal::reverse::byte_table[src]; +} +#endif + +template +T __TBB_ReverseBits(T src) { + T dst; + unsigned char *original = (unsigned char *) &src; + unsigned char *reversed = (unsigned char *) &dst; + + for( int i = sizeof(T)-1; i >= 0; i-- ) + reversed[i] = __TBB_ReverseByte( original[sizeof(T)-i-1] ); + + return dst; +} + +#endif /* __TBB_machine_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_profiling.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_profiling.h new file mode 100644 index 0000000000..efafb82c99 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_profiling.h @@ -0,0 +1,205 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_profiling_H +#define __TBB_profiling_H + +// Check if the tools support is enabled +#if (_WIN32||_WIN64||__linux__) && !__MINGW32__ && TBB_USE_THREADING_TOOLS + +#if _WIN32||_WIN64 +#include /* mbstowcs_s */ +#endif +#include "tbb_stddef.h" + +namespace tbb { + namespace internal { +#if _WIN32||_WIN64 + void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void *obj, const wchar_t* name ); + inline size_t multibyte_to_widechar( wchar_t* wcs, const char* mbs, size_t bufsize) { +#if _MSC_VER>=1400 + size_t len; + mbstowcs_s( &len, wcs, bufsize, mbs, _TRUNCATE ); + return len; // mbstowcs_s counts null terminator +#else + size_t len = mbstowcs( wcs, mbs, bufsize ); + if(wcs && len!=size_t(-1) ) + wcs[len + inline void itt_store_word_with_release(tbb::atomic& dst, U src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); + itt_store_pointer_with_release_v3(&dst, (void *)uintptr_t(src)); +#else + dst = src; +#endif // TBB_USE_THREADING_TOOLS + } + + template + inline T itt_load_word_with_acquire(const tbb::atomic& src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (push) + #pragma warning (disable: 4311) +#endif + T result = (T)itt_load_pointer_with_acquire_v3(&src); +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif + return result; +#else + return src; +#endif // TBB_USE_THREADING_TOOLS + } + + template + inline void itt_store_word_with_release(T& dst, T src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); + itt_store_pointer_with_release_v3(&dst, (void *)src); +#else + __TBB_store_with_release(dst, src); +#endif // TBB_USE_THREADING_TOOLS + } + + template + inline T itt_load_word_with_acquire(const T& src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized"); + return (T)itt_load_pointer_with_acquire_v3(&src); +#else + return __TBB_load_with_acquire(src); +#endif // TBB_USE_THREADING_TOOLS + } + + template + inline void itt_hide_store_word(T& dst, T src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized"); + itt_store_pointer_with_release_v3(&dst, (void *)src); +#else + dst = src; +#endif + } + + template + inline T itt_hide_load_word(const T& src) { +#if TBB_USE_THREADING_TOOLS + // This assertion should be replaced with static_assert + __TBB_ASSERT(sizeof(T) == sizeof(void *), "Type must be word-sized."); + return (T)itt_load_pointer_v3(&src); +#else + return src; +#endif + } + +#if TBB_USE_THREADING_TOOLS + inline void call_itt_notify(notify_type t, void *ptr) { + call_itt_notify_v5((int)t, ptr); + } +#else + inline void call_itt_notify(notify_type /*t*/, void * /*ptr*/) {} +#endif // TBB_USE_THREADING_TOOLS + + } // namespace internal +} // namespace tbb + +#endif /* __TBB_profiling_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_stddef.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_stddef.h new file mode 100644 index 0000000000..04ae384303 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_stddef.h @@ -0,0 +1,427 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_stddef_H +#define __TBB_tbb_stddef_H + +// Marketing-driven product version +#define TBB_VERSION_MAJOR 4 +#define TBB_VERSION_MINOR 1 + +// Engineering-focused interface version +#define TBB_INTERFACE_VERSION 6104 +#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000 + +// The oldest major interface version still supported +// To be used in SONAME, manifests, etc. +#define TBB_COMPATIBLE_INTERFACE_VERSION 2 + +#define __TBB_STRING_AUX(x) #x +#define __TBB_STRING(x) __TBB_STRING_AUX(x) + +// We do not need defines below for resource processing on windows +#if !defined RC_INVOKED + +// Define groups for Doxygen documentation +/** + * @defgroup algorithms Algorithms + * @defgroup containers Containers + * @defgroup memory_allocation Memory Allocation + * @defgroup synchronization Synchronization + * @defgroup timing Timing + * @defgroup task_scheduling Task Scheduling + */ + +// Simple text that is displayed on the main page of Doxygen documentation. +/** + * \mainpage Main Page + * + * Click the tabs above for information about the + * - Modules (groups of functionality) implemented by the library + * - Classes provided by the library + * - Files constituting the library. + * . + * Please note that significant part of TBB functionality is implemented in the form of + * template functions, descriptions of which are not accessible on the Classes + * tab. Use Modules or Namespace/Namespace Members + * tabs to find them. + * + * Additional pieces of information can be found here + * - \subpage concepts + * . + */ + +/** \page concepts TBB concepts + + A concept is a set of requirements to a type, which are necessary and sufficient + for the type to model a particular behavior or a set of behaviors. Some concepts + are specific to a particular algorithm (e.g. algorithm body), while other ones + are common to several algorithms (e.g. range concept). + + All TBB algorithms make use of different classes implementing various concepts. + Implementation classes are supplied by the user as type arguments of template + parameters and/or as objects passed as function call arguments. The library + provides predefined implementations of some concepts (e.g. several kinds of + \ref range_req "ranges"), while other ones must always be implemented by the user. + + TBB defines a set of minimal requirements each concept must conform to. Here is + the list of different concepts hyperlinked to the corresponding requirements specifications: + - \subpage range_req + - \subpage parallel_do_body_req + - \subpage parallel_for_body_req + - \subpage parallel_reduce_body_req + - \subpage parallel_scan_body_req + - \subpage parallel_sort_iter_req +**/ + +// tbb_config.h should be included the first since it contains macro definitions used in other headers +#include "tbb_config.h" + +#if _MSC_VER >=1400 + #define __TBB_EXPORTED_FUNC __cdecl + #define __TBB_EXPORTED_METHOD __thiscall +#else + #define __TBB_EXPORTED_FUNC + #define __TBB_EXPORTED_METHOD +#endif + +#if __INTEL_COMPILER || _MSC_VER +#define __TBB_NOINLINE(decl) __declspec(noinline) decl +#elif __GNUC__ +#define __TBB_NOINLINE(decl) decl __attribute__ ((noinline)) +#else +#define __TBB_NOINLINE(decl) decl +#endif + +#include /* Need size_t and ptrdiff_t */ + +#if _MSC_VER + #define __TBB_tbb_windef_H + #include "internal/_tbb_windef.h" + #undef __TBB_tbb_windef_H +#endif +#if !defined(_MSC_VER) || _MSC_VER>=1600 + #include +#endif + +//! Type for an assertion handler +typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment ); + +#if TBB_USE_ASSERT + + #define __TBB_ASSERT_NS(predicate,message,ns) ((predicate)?((void)0) : ns::assertion_failure(__FILE__,__LINE__,#predicate,message)) + //! Assert that x is true. + /** If x is false, print assertion failure message. + If the comment argument is not NULL, it is printed as part of the failure message. + The comment argument has no other effect. */ +#if __TBBMALLOC_BUILD +namespace rml { namespace internal { + #define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,message,rml::internal) +#else +namespace tbb { + #define __TBB_ASSERT(predicate,message) __TBB_ASSERT_NS(predicate,message,tbb) +#endif + + #define __TBB_ASSERT_EX __TBB_ASSERT + + //! Set assertion handler and return previous value of it. + assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( assertion_handler_type new_handler ); + + //! Process an assertion failure. + /** Normally called from __TBB_ASSERT macro. + If assertion handler is null, print message for assertion failure and abort. + Otherwise call the assertion handler. */ + void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int line, const char* expression, const char* comment ); + +#if __TBBMALLOC_BUILD +}} // namespace rml::internal +#else +} // namespace tbb +#endif +#else /* !TBB_USE_ASSERT */ + + //! No-op version of __TBB_ASSERT. + #define __TBB_ASSERT(predicate,comment) ((void)0) + //! "Extended" version is useful to suppress warnings if a variable is only used with an assert + #define __TBB_ASSERT_EX(predicate,comment) ((void)(1 && (predicate))) + +#endif /* !TBB_USE_ASSERT */ + +//! The namespace tbb contains all components of the library. +namespace tbb { + +#if _MSC_VER && _MSC_VER<1600 + namespace internal { + typedef __int8 int8_t; + typedef __int16 int16_t; + typedef __int32 int32_t; + typedef __int64 int64_t; + typedef unsigned __int8 uint8_t; + typedef unsigned __int16 uint16_t; + typedef unsigned __int32 uint32_t; + typedef unsigned __int64 uint64_t; + } // namespace internal +#else /* Posix */ + namespace internal { + using ::int8_t; + using ::int16_t; + using ::int32_t; + using ::int64_t; + using ::uint8_t; + using ::uint16_t; + using ::uint32_t; + using ::uint64_t; + } // namespace internal +#endif /* Posix */ + + using std::size_t; + using std::ptrdiff_t; + +//! The function returns the interface version of the TBB shared library being used. +/** + * The version it returns is determined at runtime, not at compile/link time. + * So it can be different than the value of TBB_INTERFACE_VERSION obtained at compile time. + */ +extern "C" int __TBB_EXPORTED_FUNC TBB_runtime_interface_version(); + +//! Dummy type that distinguishes splitting constructor from copy constructor. +/** + * See description of parallel_for and parallel_reduce for example usages. + * @ingroup algorithms + */ +class split { +}; + +/** + * @cond INTERNAL + * @brief Identifiers declared inside namespace internal should never be used directly by client code. + */ +namespace internal { + +//! Compile-time constant that is upper bound on cache line/sector size. +/** It should be used only in situations where having a compile-time upper + bound is more useful than a run-time exact answer. + @ingroup memory_allocation */ +const size_t NFS_MaxLineSize = 128; + +/** Label for data that may be accessed from different threads, and that may eventually become wrapped + in a formal atomic type. + + Note that no problems have yet been observed relating to the definition currently being empty, + even if at least "volatile" would seem to be in order to avoid data sometimes temporarily hiding + in a register (although "volatile" as a "poor man's atomic" lacks several other features of a proper + atomic, some of which are now provided instead through specialized functions). + + Note that usage is intentionally compatible with a definition as qualifier "volatile", + both as a way to have the compiler help enforce use of the label and to quickly rule out + one potential issue. + + Note however that, with some architecture/compiler combinations, e.g. on IA-64, "volatile" + also has non-portable memory semantics that are needlessly expensive for "relaxed" operations. + + Note that this must only be applied to data that will not change bit patterns when cast to/from + an integral type of the same length; tbb::atomic must be used instead for, e.g., floating-point types. + + TODO: apply wherever relevant **/ +#define __TBB_atomic // intentionally empty, see above + +template +struct padded_base : T { + char pad[NFS_MaxLineSize - sizeof(T) % NFS_MaxLineSize]; +}; +template struct padded_base : T {}; + +//! Pads type T to fill out to a multiple of cache line size. +template +struct padded : padded_base {}; + +//! Extended variant of the standard offsetof macro +/** The standard offsetof macro is not sufficient for TBB as it can be used for + POD-types only. The constant 0x1000 (not NULL) is necessary to appease GCC. **/ +#define __TBB_offsetof(class_name, member_name) \ + ((ptrdiff_t)&(reinterpret_cast(0x1000)->member_name) - 0x1000) + +//! Returns address of the object containing a member with the given name and address +#define __TBB_get_object_ref(class_name, member_name, member_addr) \ + (*reinterpret_cast((char*)member_addr - __TBB_offsetof(class_name, member_name))) + +//! Throws std::runtime_error with what() returning error_code description prefixed with aux_info +void __TBB_EXPORTED_FUNC handle_perror( int error_code, const char* aux_info ); + +#if TBB_USE_EXCEPTIONS + #define __TBB_TRY try + #define __TBB_CATCH(e) catch(e) + #define __TBB_THROW(e) throw e + #define __TBB_RETHROW() throw +#else /* !TBB_USE_EXCEPTIONS */ + inline bool __TBB_false() { return false; } + #define __TBB_TRY + #define __TBB_CATCH(e) if ( tbb::internal::__TBB_false() ) + #define __TBB_THROW(e) ((void)0) + #define __TBB_RETHROW() ((void)0) +#endif /* !TBB_USE_EXCEPTIONS */ + +//! Report a runtime warning. +void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... ); + +#if TBB_USE_ASSERT +static void* const poisoned_ptr = reinterpret_cast(-1); + +//! Set p to invalid pointer value. +template +inline void poison_pointer( T*& p ) { p = reinterpret_cast(poisoned_ptr); } + +/** Expected to be used in assertions only, thus no empty form is defined. **/ +template +inline bool is_poisoned( T* p ) { return p == reinterpret_cast(poisoned_ptr); } +#else +template +inline void poison_pointer( T* ) {/*do nothing*/} +#endif /* !TBB_USE_ASSERT */ + +//! Cast between unrelated pointer types. +/** This method should be used sparingly as a last resort for dealing with + situations that inherently break strict ISO C++ aliasing rules. */ +// T is a pointer type because it will be explicitly provided by the programmer as a template argument; +// U is a referent type to enable the compiler to check that "ptr" is a pointer, deducing U in the process. +template +inline T punned_cast( U* ptr ) { + uintptr_t x = reinterpret_cast(ptr); + return reinterpret_cast(x); +} + +//! Base class for types that should not be assigned. +class no_assign { + // Deny assignment + void operator=( const no_assign& ); +public: +#if __GNUC__ + //! Explicitly define default construction, because otherwise gcc issues gratuitous warning. + no_assign() {} +#endif /* __GNUC__ */ +}; + +//! Base class for types that should not be copied or assigned. +class no_copy: no_assign { + //! Deny copy construction + no_copy( const no_copy& ); +public: + //! Allow default construction + no_copy() {} +}; + +//! Class for determining type of std::allocator::value_type. +template +struct allocator_type { + typedef T value_type; +}; + +#if _MSC_VER +//! Microsoft std::allocator has non-standard extension that strips const from a type. +template +struct allocator_type { + typedef T value_type; +}; +#endif + +//! A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size. +template +struct select_size_t_constant { + //Explicit cast is needed to avoid compiler warnings about possible truncation. + //The value of the right size, which is selected by ?:, is anyway not truncated or promoted. + static const size_t value = (size_t)((sizeof(size_t)==sizeof(u)) ? u : ull); +}; + +//! A function to check if passed in pointer is aligned on a specific border +template +inline bool is_aligned(T* pointer, uintptr_t alignment) { + return 0==((uintptr_t)pointer & (alignment-1)); +} + +//! A function to check if passed integer is a power of 2 +template +inline bool is_power_of_two(integer_type arg) { + return arg && (0 == (arg & (arg - 1))); +} + +//! A function to compute arg modulo divisor where divisor is a power of 2. +template +inline argument_integer_type modulo_power_of_two(argument_integer_type arg, divisor_integer_type divisor) { + // Divisor is assumed to be a power of two (which is valid for current uses). + __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" ); + return (arg & (divisor - 1)); +} + + +//! A function to determine if "arg is a multiplication of a number and a power of 2". +// i.e. for strictly positive i and j, with j a power of 2, +// determines whether i==j< +inline bool is_power_of_two_factor(argument_integer_type arg, divisor_integer_type divisor) { + // Divisor is assumed to be a power of two (which is valid for current uses). + __TBB_ASSERT( is_power_of_two(divisor), "Divisor should be a power of two" ); + return 0 == (arg & (arg - divisor)); +} + +// Struct to be used as a version tag for inline functions. +/** Version tag can be necessary to prevent loader on Linux from using the wrong + symbol in debug builds (when inline functions are compiled as out-of-line). **/ +struct version_tag_v3 {}; + +typedef version_tag_v3 version_tag; + +} // internal +//! @endcond + +} // tbb + +namespace tbb { namespace internal { +template +struct STATIC_ASSERTION_FAILED; + +template <> +struct STATIC_ASSERTION_FAILED { enum {value=1};}; + +template<> +struct STATIC_ASSERTION_FAILED; //intentionally left undefined to cause compile time error +}} // namespace tbb { namespace internal { + +#if __TBB_STATIC_ASSERT_PRESENT +#define __TBB_STATIC_ASSERT(condition,msg) static_assert(condition,msg) +#else +//please note condition is intentionally inverted to get a bit more understandable error msg +#define __TBB_STATIC_ASSERT_IMPL1(condition,msg,line) \ + enum {static_assert_on_line_##line = tbb::internal::STATIC_ASSERTION_FAILED::value} + +#define __TBB_STATIC_ASSERT_IMPL(condition,msg,line) __TBB_STATIC_ASSERT_IMPL1(condition,msg,line) +//! Verify at compile time that passed in condition is hold +#define __TBB_STATIC_ASSERT(condition,msg) __TBB_STATIC_ASSERT_IMPL(condition,msg,__LINE__) +#endif + +#endif /* RC_INVOKED */ +#endif /* __TBB_tbb_stddef_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_thread.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_thread.h new file mode 100644 index 0000000000..7ba6ff1a23 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbb_thread.h @@ -0,0 +1,307 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_thread_H +#define __TBB_tbb_thread_H + +#include "tbb_stddef.h" +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#define __TBB_NATIVE_THREAD_ROUTINE unsigned WINAPI +#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) unsigned (WINAPI* r)( void* ) +#if __TBB_WIN8UI_SUPPORT +typedef size_t thread_id_type; +#else // __TBB_WIN8UI_SUPPORT +typedef DWORD thread_id_type; +#endif // __TBB_WIN8UI_SUPPORT +#else +#define __TBB_NATIVE_THREAD_ROUTINE void* +#define __TBB_NATIVE_THREAD_ROUTINE_PTR(r) void* (*r)( void* ) +#include +#endif // _WIN32||_WIN64 + +#include "tick_count.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +namespace tbb { + +//! @cond INTERNAL +namespace internal { + + class tbb_thread_v3; + +} // namespace internal + +inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ); + +namespace internal { + + //! Allocate a closure + void* __TBB_EXPORTED_FUNC allocate_closure_v3( size_t size ); + //! Free a closure allocated by allocate_closure_v3 + void __TBB_EXPORTED_FUNC free_closure_v3( void* ); + + struct thread_closure_base { + void* operator new( size_t size ) {return allocate_closure_v3(size);} + void operator delete( void* ptr ) {free_closure_v3(ptr);} + }; + + template struct thread_closure_0: thread_closure_base { + F function; + + static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { + thread_closure_0 *self = static_cast(c); + self->function(); + delete self; + return 0; + } + thread_closure_0( const F& f ) : function(f) {} + }; + //! Structure used to pass user function with 1 argument to thread. + template struct thread_closure_1: thread_closure_base { + F function; + X arg1; + //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll + static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { + thread_closure_1 *self = static_cast(c); + self->function(self->arg1); + delete self; + return 0; + } + thread_closure_1( const F& f, const X& x ) : function(f), arg1(x) {} + }; + template struct thread_closure_2: thread_closure_base { + F function; + X arg1; + Y arg2; + //! Routine passed to Windows's _beginthreadex by thread::internal_start() inside tbb.dll + static __TBB_NATIVE_THREAD_ROUTINE start_routine( void* c ) { + thread_closure_2 *self = static_cast(c); + self->function(self->arg1, self->arg2); + delete self; + return 0; + } + thread_closure_2( const F& f, const X& x, const Y& y ) : function(f), arg1(x), arg2(y) {} + }; + + //! Versioned thread class. + class tbb_thread_v3 { + tbb_thread_v3(const tbb_thread_v3&); // = delete; // Deny access + public: +#if _WIN32||_WIN64 + typedef HANDLE native_handle_type; +#else + typedef pthread_t native_handle_type; +#endif // _WIN32||_WIN64 + + class id; + //! Constructs a thread object that does not represent a thread of execution. + tbb_thread_v3() : my_handle(0) +#if _WIN32||_WIN64 + , my_thread_id(0) +#endif // _WIN32||_WIN64 + {} + + //! Constructs an object and executes f() in a new thread + template explicit tbb_thread_v3(F f) { + typedef internal::thread_closure_0 closure_type; + internal_start(closure_type::start_routine, new closure_type(f)); + } + //! Constructs an object and executes f(x) in a new thread + template tbb_thread_v3(F f, X x) { + typedef internal::thread_closure_1 closure_type; + internal_start(closure_type::start_routine, new closure_type(f,x)); + } + //! Constructs an object and executes f(x,y) in a new thread + template tbb_thread_v3(F f, X x, Y y) { + typedef internal::thread_closure_2 closure_type; + internal_start(closure_type::start_routine, new closure_type(f,x,y)); + } + + tbb_thread_v3& operator=(tbb_thread_v3& x) { + if (joinable()) detach(); + my_handle = x.my_handle; + x.my_handle = 0; +#if _WIN32||_WIN64 + my_thread_id = x.my_thread_id; + x.my_thread_id = 0; +#endif // _WIN32||_WIN64 + return *this; + } + void swap( tbb_thread_v3& t ) {tbb::swap( *this, t );} + bool joinable() const {return my_handle!=0; } + //! The completion of the thread represented by *this happens before join() returns. + void __TBB_EXPORTED_METHOD join(); + //! When detach() returns, *this no longer represents the possibly continuing thread of execution. + void __TBB_EXPORTED_METHOD detach(); + ~tbb_thread_v3() {if( joinable() ) detach();} + inline id get_id() const; + native_handle_type native_handle() { return my_handle; } + + //! The number of hardware thread contexts. + /** Before TBB 3.0 U4 this methods returned the number of logical CPU in + the system. Currently on Windows, Linux and FreeBSD it returns the + number of logical CPUs available to the current process in accordance + with its affinity mask. + + NOTE: The return value of this method never changes after its first + invocation. This means that changes in the process affinity mask that + took place after this method was first invoked will not affect the + number of worker threads in the TBB worker threads pool. **/ + static unsigned __TBB_EXPORTED_FUNC hardware_concurrency(); + private: + native_handle_type my_handle; +#if _WIN32||_WIN64 + thread_id_type my_thread_id; +#endif // _WIN32||_WIN64 + + /** Runs start_routine(closure) on another thread and sets my_handle to the handle of the created thread. */ + void __TBB_EXPORTED_METHOD internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), + void* closure ); + friend void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ); + friend void tbb::swap( tbb_thread_v3& t1, tbb_thread_v3& t2 ); + }; + + class tbb_thread_v3::id { +#if _WIN32||_WIN64 + thread_id_type my_id; + id( thread_id_type id_ ) : my_id(id_) {} +#else + pthread_t my_id; + id( pthread_t id_ ) : my_id(id_) {} +#endif // _WIN32||_WIN64 + friend class tbb_thread_v3; + public: + id() : my_id(0) {} + + friend bool operator==( tbb_thread_v3::id x, tbb_thread_v3::id y ); + friend bool operator!=( tbb_thread_v3::id x, tbb_thread_v3::id y ); + friend bool operator<( tbb_thread_v3::id x, tbb_thread_v3::id y ); + friend bool operator<=( tbb_thread_v3::id x, tbb_thread_v3::id y ); + friend bool operator>( tbb_thread_v3::id x, tbb_thread_v3::id y ); + friend bool operator>=( tbb_thread_v3::id x, tbb_thread_v3::id y ); + + template + friend std::basic_ostream& + operator<< (std::basic_ostream &out, + tbb_thread_v3::id id) + { + out << id.my_id; + return out; + } + friend tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3(); + }; // tbb_thread_v3::id + + tbb_thread_v3::id tbb_thread_v3::get_id() const { +#if _WIN32||_WIN64 + return id(my_thread_id); +#else + return id(my_handle); +#endif // _WIN32||_WIN64 + } + void __TBB_EXPORTED_FUNC move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ); + tbb_thread_v3::id __TBB_EXPORTED_FUNC thread_get_id_v3(); + void __TBB_EXPORTED_FUNC thread_yield_v3(); + void __TBB_EXPORTED_FUNC thread_sleep_v3(const tick_count::interval_t &i); + + inline bool operator==(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id == y.my_id; + } + inline bool operator!=(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id != y.my_id; + } + inline bool operator<(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id < y.my_id; + } + inline bool operator<=(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id <= y.my_id; + } + inline bool operator>(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id > y.my_id; + } + inline bool operator>=(tbb_thread_v3::id x, tbb_thread_v3::id y) + { + return x.my_id >= y.my_id; + } + +} // namespace internal; + +//! Users reference thread class by name tbb_thread +typedef internal::tbb_thread_v3 tbb_thread; + +using internal::operator==; +using internal::operator!=; +using internal::operator<; +using internal::operator>; +using internal::operator<=; +using internal::operator>=; + +inline void move( tbb_thread& t1, tbb_thread& t2 ) { + internal::move_v3(t1, t2); +} + +inline void swap( internal::tbb_thread_v3& t1, internal::tbb_thread_v3& t2 ) { + tbb::tbb_thread::native_handle_type h = t1.my_handle; + t1.my_handle = t2.my_handle; + t2.my_handle = h; +#if _WIN32||_WIN64 + thread_id_type i = t1.my_thread_id; + t1.my_thread_id = t2.my_thread_id; + t2.my_thread_id = i; +#endif /* _WIN32||_WIN64 */ +} + +namespace this_tbb_thread { + inline tbb_thread::id get_id() { return internal::thread_get_id_v3(); } + //! Offers the operating system the opportunity to schedule another thread. + inline void yield() { internal::thread_yield_v3(); } + //! The current thread blocks at least until the time specified. + inline void sleep(const tick_count::interval_t &i) { + internal::thread_sleep_v3(i); + } +} // namespace this_tbb_thread + +} // namespace tbb + +#endif /* __TBB_tbb_thread_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tbbmalloc_proxy.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbbmalloc_proxy.h new file mode 100644 index 0000000000..0165073bdf --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tbbmalloc_proxy.h @@ -0,0 +1,74 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* +Replacing the standard memory allocation routines in Microsoft* C/C++ RTL +(malloc/free, global new/delete, etc.) with the TBB memory allocator. + +Include the following header to a source of any binary which is loaded during +application startup + +#include "tbb/tbbmalloc_proxy.h" + +or add following parameters to the linker options for the binary which is +loaded during application startup. It can be either exe-file or dll. + +For win32 +tbbmalloc_proxy.lib /INCLUDE:"___TBB_malloc_proxy" +win64 +tbbmalloc_proxy.lib /INCLUDE:"__TBB_malloc_proxy" +*/ + +#ifndef __TBB_tbbmalloc_proxy_H +#define __TBB_tbbmalloc_proxy_H + +#if _MSC_VER + +#ifdef _DEBUG + #pragma comment(lib, "tbbmalloc_proxy_debug.lib") +#else + #pragma comment(lib, "tbbmalloc_proxy.lib") +#endif + +#if defined(_WIN64) + #pragma comment(linker, "/include:__TBB_malloc_proxy") +#else + #pragma comment(linker, "/include:___TBB_malloc_proxy") +#endif + +#else +/* Primarily to support MinGW */ + +extern "C" void __TBB_malloc_proxy(); +struct __TBB_malloc_proxy_caller { + __TBB_malloc_proxy_caller() { __TBB_malloc_proxy(); } +} volatile __TBB_malloc_proxy_helper_object; + +#endif // _MSC_VER + +#endif //__TBB_tbbmalloc_proxy_H diff --git a/deal.II/bundled/tbb41_20130401oss/include/tbb/tick_count.h b/deal.II/bundled/tbb41_20130401oss/include/tbb/tick_count.h new file mode 100644 index 0000000000..c2207d712a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/include/tbb/tick_count.h @@ -0,0 +1,155 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tick_count_H +#define __TBB_tick_count_H + +#include "tbb_stddef.h" + +#if _WIN32||_WIN64 +#include "machine/windows_api.h" +#elif __linux__ +#include +#else /* generic Unix */ +#include +#endif /* (choice of OS) */ + +namespace tbb { + +//! Absolute timestamp +/** @ingroup timing */ +class tick_count { +public: + //! Relative time interval. + class interval_t { + long long value; + explicit interval_t( long long value_ ) : value(value_) {} + public: + //! Construct a time interval representing zero time duration + interval_t() : value(0) {}; + + //! Construct a time interval representing sec seconds time duration + explicit interval_t( double sec ); + + //! Return the length of a time interval in seconds + double seconds() const; + + friend class tbb::tick_count; + + //! Extract the intervals from the tick_counts and subtract them. + friend interval_t operator-( const tick_count& t1, const tick_count& t0 ); + + //! Add two intervals. + friend interval_t operator+( const interval_t& i, const interval_t& j ) { + return interval_t(i.value+j.value); + } + + //! Subtract two intervals. + friend interval_t operator-( const interval_t& i, const interval_t& j ) { + return interval_t(i.value-j.value); + } + + //! Accumulation operator + interval_t& operator+=( const interval_t& i ) {value += i.value; return *this;} + + //! Subtraction operator + interval_t& operator-=( const interval_t& i ) {value -= i.value; return *this;} + }; + + //! Construct an absolute timestamp initialized to zero. + tick_count() : my_count(0) {}; + + //! Return current time. + static tick_count now(); + + //! Subtract two timestamps to get the time interval between + friend interval_t operator-( const tick_count& t1, const tick_count& t0 ); + +private: + long long my_count; +}; + +inline tick_count tick_count::now() { + tick_count result; +#if _WIN32||_WIN64 + LARGE_INTEGER qpcnt; + QueryPerformanceCounter(&qpcnt); + result.my_count = qpcnt.QuadPart; +#elif __linux__ + struct timespec ts; +#if TBB_USE_ASSERT + int status = +#endif /* TBB_USE_ASSERT */ + clock_gettime( CLOCK_REALTIME, &ts ); + __TBB_ASSERT( status==0, "CLOCK_REALTIME not supported" ); + result.my_count = static_cast(1000000000UL)*static_cast(ts.tv_sec) + static_cast(ts.tv_nsec); +#else /* generic Unix */ + struct timeval tv; +#if TBB_USE_ASSERT + int status = +#endif /* TBB_USE_ASSERT */ + gettimeofday(&tv, NULL); + __TBB_ASSERT( status==0, "gettimeofday failed" ); + result.my_count = static_cast(1000000)*static_cast(tv.tv_sec) + static_cast(tv.tv_usec); +#endif /*(choice of OS) */ + return result; +} + +inline tick_count::interval_t::interval_t( double sec ) +{ +#if _WIN32||_WIN64 + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + value = static_cast(sec*qpfreq.QuadPart); +#elif __linux__ + value = static_cast(sec*1E9); +#else /* generic Unix */ + value = static_cast(sec*1E6); +#endif /* (choice of OS) */ +} + +inline tick_count::interval_t operator-( const tick_count& t1, const tick_count& t0 ) { + return tick_count::interval_t( t1.my_count-t0.my_count ); +} + +inline double tick_count::interval_t::seconds() const { +#if _WIN32||_WIN64 + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return value/(double)qpfreq.QuadPart; +#elif __linux__ + return value*1E-9; +#else /* generic Unix */ + return value*1E-6; +#endif /* (choice of OS) */ +} + +} // namespace tbb + +#endif /* __TBB_tick_count_H */ + diff --git a/deal.II/bundled/tbb41_20130401oss/index.html b/deal.II/bundled/tbb41_20130401oss/index.html new file mode 100644 index 0000000000..bf468e1e00 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/index.html @@ -0,0 +1,41 @@ + + + +

    Overview

    +Top level directory for Intel® Threading Building Blocks. +

    +To build Intel TBB, use the top-level Makefile; see also the build directions. +To port Intel TBB to a new platform, operating system or architecture, see the porting directions. +

    + +

    Files

    +
    +
    Makefile +
    Top-level Makefile for Intel TBB. See also the build directions. +
    + +

    Directories

    +
    +
    doc +
    Documentation for the library. +
    include +
    Include files required for compiling code that uses the library. +
    examples +
    Examples of how to use the library. +
    src +
    Source code for the library. +
    build +
    Internal Makefile infrastructure for Intel TBB. Do not use directly; see the build directions. +
    + +
    +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + + diff --git a/deal.II/bundled/tbb41_20130401oss/jni/Android.mk b/deal.II/bundled/tbb41_20130401oss/jni/Android.mk new file mode 100644 index 0000000000..761bb07ec5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/jni/Android.mk @@ -0,0 +1,45 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +ifeq (armeabi-v7a,$(APP_ABI)) + export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-arm +else + export SYSROOT:=$(NDK_ROOT)/platforms/$(APP_PLATFORM)/arch-$(APP_ABI) +endif +ifeq (windows,$(tbb_os)) + export CPATH_SEPARATOR :=; +else + export CPATH_SEPARATOR :=: +endif +export CPATH := $(SYSROOT)/usr/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/include$(CPATH_SEPARATOR)$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/$(APP_ABI)/include +#LIB_GNU_STL_ANDROID is required to be set up for copying Android specific library libgnustl_shared.so to '.' +export LIB_GNU_STL_ANDROID := $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(NDK_TOOLCHAIN_VERSION)/libs/$(APP_ABI) +export CPLUS_LIB_PATH := $(SYSROOT)/usr/lib -L$(LIB_GNU_STL_ANDROID) +export ANDROID_NDK_ROOT:=$(NDK_ROOT) +export target_os_version:=$(APP_PLATFORM) +export tbb_tool_prefix:=$(TOOLCHAIN_PREFIX) + +include $(NDK_PROJECT_PATH)/src/Makefile diff --git a/deal.II/bundled/tbb41_20130401oss/jni/Application.mk b/deal.II/bundled/tbb41_20130401oss/jni/Application.mk new file mode 100644 index 0000000000..0baabd9e7c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/jni/Application.mk @@ -0,0 +1,38 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +export tbb_os?=linux +export compiler?=gcc +export arch?=ia32 +export target?=android + +ifeq (arm,$(arch)) + APP_ABI:=armeabi-v7a +else + APP_ABI:=x86 +endif +APP_PLATFORM:=android-9 +NDK_TOOLCHAIN_VERSION:=4.6 diff --git a/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt new file mode 100644 index 0000000000..69f477862c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/CMakeLists.txt @@ -0,0 +1,113 @@ +##### +## +## Copyright (C) 2012, 2013 by the deal.II authors +## +## This file is part of the deal.II library. +## +## +## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later +## version of the LGPL license. +## +## Author: Matthias Maier +## +##### + +SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_SOURCE_DIR}/rml/include + ) + +IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/version_string.ver") + FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/version_string.ver" + "#define __TBB_VERSION_STRINGS(N) \"Empty\"\n" + "#define TBB_VERSION_STRINGS(N) \"Empty\"\n" + ) +ENDIF() + +# +# Some architectures need additional assembly files: +# + +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + SET(_assembly_files + tbb/intel64-masm/atomic_support.asm + tbb/intel64-masm/intel64_misc.asm + ) + ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86") + SET(_assembly_files + tbb/ia32-masm/atomic_support.asm + tbb/ia32-masm/intel64_misc.asm + ) + ENDIF() +ENDIF() + +IF(CMAKE_SYSTEM_PROCESSOR MATCHES "ia64") + SET(_assembly_files + tbb/ia64-gas/atomic_support.s + tbb/ia64-gas/lock_byte.s + tbb/ia64-gas/log2.s + tbb/ia64-gas/pause.s + ) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") + LIST(APPEND _assembly_files + tbb/ia64-gas/ia64_misc.s + ) + ENDIF() +ENDIF() + +SET(src_tbb + rml/client/rml_tbb.cpp + tbb/arena.cpp + tbb/cache_aligned_allocator.cpp + tbb/concurrent_hash_map.cpp + tbb/concurrent_monitor.cpp + tbb/concurrent_queue.cpp + tbb/concurrent_vector.cpp + tbb/condition_variable.cpp + tbb/critical_section.cpp + tbb/dynamic_link.cpp + tbb/governor.cpp + tbb/itt_notify.cpp + tbb/market.cpp + tbb/mutex.cpp + tbb/observer_proxy.cpp + tbb/pipeline.cpp + tbb/private_server.cpp + tbb/queuing_mutex.cpp + tbb/queuing_rw_mutex.cpp + tbb/reader_writer_lock.cpp + tbb/recursive_mutex.cpp + tbb/scheduler.cpp + tbb/semaphore.cpp + tbb/spin_mutex.cpp + tbb/spin_rw_mutex.cpp + tbb/task.cpp + tbb/task_group_context.cpp + tbb/tbb_main.cpp + tbb/tbb_misc.cpp + tbb/tbb_misc_ex.cpp + tbb/tbb_statistics.cpp + tbb/tbb_thread.cpp + ${_assembly_files} + ) +DEAL_II_ADD_LIBRARY(obj_tbb OBJECT ${src_tbb}) + +# +# Add necessary definitions: +# + +DEAL_II_ADD_DEFINITIONS(obj_tbb "__TBB_BUILD") + +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + DEAL_II_ADD_DEFINITIONS(obj_tbb "USE_WINTHREAD") + +ELSE() + + DEAL_II_ADD_DEFINITIONS(obj_tbb "USE_PTHREAD") + + IF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin") + DEAL_II_ADD_DEFINITIONS(obj_tbb "DO_ITT_NOTIFY") + ENDIF() +ENDIF() + diff --git a/deal.II/bundled/tbb41_20130401oss/src/Makefile b/deal.II/bundled/tbb41_20130401oss/src/Makefile new file mode 100644 index 0000000000..7649e9fdab --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/Makefile @@ -0,0 +1,237 @@ +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +tbb_root?=.. +examples_root:=$(tbb_root)/examples +include $(tbb_root)/build/common.inc + +.PHONY: all tbb tbbmalloc tbbproxy test test_no_depends release debug examples clean + +all: release debug examples + +tbb: tbb_release tbb_debug + +tbbmalloc: tbbmalloc_release tbbmalloc_debug + +tbbproxy: tbbproxy_release tbbproxy_debug + +rml: rml_release rml_debug + +test: tbbmalloc_test_release $(if $(use_proxy),tbbproxy_test_release) rml_test_release tbb_test_release tbbmalloc_test_debug $(if $(use_proxy),tbbproxy_test_debug) rml_test_debug tbb_test_debug + +tbb_test_no_depends: tbbmalloc_test_release_no_depends $(if $(use_proxy),tbbproxy_test_release_no_depends) tbb_test_release_no_depends tbbmalloc_test_debug_no_depends $(if $(use_proxy),tbbproxy_test_debug_no_depends) tbb_test_debug_no_depends + @echo done + +release: tbb_release tbbmalloc_release $(if $(use_proxy),tbbproxy_release) +release: $(call cross_cfg,tbbmalloc_test_release) $(call cross_cfg,test_release) + +debug: tbb_debug tbbmalloc_debug $(if $(use_proxy),tbbproxy_debug) +debug: $(call cross_cfg,tbbmalloc_test_debug) $(call cross_cfg, test_debug) + +examples: tbb tbbmalloc examples_debug clean_examples examples_release + +examples_no_depends: examples_release_no_depends examples_debug_no_depends + +clean: clean_release clean_debug clean_examples + @echo clean done + +.PHONY: full +full: + $(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. clean all +ifeq ($(tbb_os),windows) + $(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. compiler=icl clean all native_examples +else + $(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. compiler=icc clean all native_examples +endif +ifeq ($(arch),intel64) + $(MAKE) -s -i -r --no-print-directory -f Makefile tbb_root=. arch=ia32 clean all +endif +# it doesn't test compiler=icc arch=ia32 on intel64 systems due to enviroment settings of icc + +native_examples: tbb tbbmalloc + $(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. compiler=$(native_compiler) tbb_build_prefix=$(tbb_build_prefix) debug test + $(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. compiler=$(native_compiler) tbb_build_prefix=$(tbb_build_prefix) clean release test + +../examples/% examples/%:: + $(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. $(subst examples/,,$(subst ../,,$@)) + +debug_%:: cfg?=debug +debug_%:: run_cmd=$(debugger) +test_% stress_% time_% perf_%:: cfg?=release +debug_% test_% stress_% time_% perf_%:: + $(MAKE) -C "$(work_dir)_$(cfg)" -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) run_cmd="$(run_cmd)" tbb_root=$(tbb_root) $@ + +clean_%:: +ifeq ($(cfg),) + @$(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) $@ + @$(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) $@ +else + @$(MAKE) -C "$(work_dir)_$(cfg)" -r -f $(tbb_root)/build/Makefile.test cfg=$(cfg) tbb_root=$(tbb_root) $@ +endif + +.PHONY: test_release test_debug test_release_no_depends test_debug_no_depends +.PHONY: tbb_release tbb_debug tbb_test_release tbb_test_debug tbb_test_release_no_depends tbb_test_debug_no_depends +# do not delete double-space after -C option +tbb_release: mkdir_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release tbb_root=$(tbb_root) + +tbb_debug: mkdir_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug tbb_root=$(tbb_root) + +tbb_test_release: $(call cross_cfg,tbb_release) $(if $(use_proxy),$(call cross_cfg,tbbproxy_release)) tbb_test_release_no_depends +tbb_test_release_no_depends:$(call cross_cfg,mkdir_release) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_release)" -r -f $(tbb_root)/build/Makefile.test cfg=release tbb_root=$(tbb_root) + +tbb_test_debug: $(call cross_cfg,tbb_debug) $(if $(use_proxy),$(call cross_cfg,tbbproxy_debug)) tbb_test_debug_no_depends +tbb_test_debug_no_depends:$(call cross_cfg,mkdir_debug) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)" -r -f $(tbb_root)/build/Makefile.test cfg=debug tbb_root=$(tbb_root) +# backward compatibility +test_release: tbb_test_release +test_debug: tbb_test_debug +test_release_no_depends: tbb_test_release_no_depends +test_debug_no_depends: tbb_test_debug_no_depends + +.PHONY: tbbmalloc_release tbbmalloc_debug +.PHONY: tbbmalloc_dll_release tbbmalloc_dll_debug tbbmalloc_proxy_dll_release tbbmalloc_proxy_dll_debug +.PHONY: tbbmalloc_test tbbmalloc_test_release tbbmalloc_test_debug tbbmalloc_test_release_no_depends tbbmalloc_test_debug_no_depends + +tbbmalloc_release: mkdir_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc tbb_root=$(tbb_root) + +tbbmalloc_debug: mkdir_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc tbb_root=$(tbb_root) + +tbbmalloc_dll_release: mkdir_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_dll tbb_root=$(tbb_root) + +tbbmalloc_proxy_dll_release: mkdir_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_proxy_dll tbb_root=$(tbb_root) + +tbbmalloc_dll_debug: mkdir_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_dll tbb_root=$(tbb_root) + +tbbmalloc_proxy_dll_debug: mkdir_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_proxy_dll tbb_root=$(tbb_root) + +tbbmalloc_test: tbbmalloc_test_release tbbmalloc_test_debug + +tbbmalloc_test_release: $(call cross_cfg,tbbmalloc_release) tbbmalloc_test_release_no_depends +tbbmalloc_test_release_no_depends: $(call cross_cfg,mkdir_release) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_release)" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc_test_no_depends tbb_root=$(tbb_root) + +tbbmalloc_test_debug: $(call cross_cfg,tbbmalloc_debug) tbbmalloc_test_debug_no_depends +tbbmalloc_test_debug_no_depends: $(call cross_cfg,mkdir_debug) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc_test_no_depends tbb_root=$(tbb_root) + +.PHONY: tbbproxy_release tbbproxy_debug +.PHONY: tbbproxy_test tbbproxy_test_release tbbproxy_test_debug tbbproxy_test_release_no_depends tbbproxy_test_debug_no_depends + +tbbproxy_release: mkdir_release tbb_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy tbb_root=$(tbb_root) + +tbbproxy_debug: mkdir_debug tbb_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy tbb_root=$(tbb_root) + +tbbproxy_test: tbbproxy_test_release tbbproxy_test_debug + +tbbproxy_test_release: $(call cross_cfg,tbb_release) $(call cross_cfg,tbbproxy_release) tbbproxy_test_release_no_depends +tbbproxy_test_release_no_depends:$(call cross_cfg,mkdir_release) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_release)" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy_test tbb_root=$(tbb_root) + +tbbproxy_test_debug: $(call cross_cfg,tbb_debug) $(call cross_cfg,tbbproxy_debug) tbbproxy_test_debug_no_depends +tbbproxy_test_debug_no_depends: $(call cross_cfg,mkdir_debug) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy_test tbb_root=$(tbb_root) + +.PHONY: rml_release rml_debug rml_test_release rml_test_debug +.PHONY: rml_test_release_no_depends rml_test_debug_no_depends + +rml_release: mkdir_release + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.rml cfg=release tbb_root=$(tbb_root) rml + +rml_debug: mkdir_debug + $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.rml cfg=debug tbb_root=$(tbb_root) rml + +rml_test_release: $(call cross_cfg,rml_release) rml_test_release_no_depends +rml_test_release_no_depends: $(call cross_cfg,mkdir_release) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_release)" -r -f $(tbb_root)/build/Makefile.rml cfg=release rml_test tbb_root=$(tbb_root) + +rml_test_debug: $(call cross_cfg,rml_debug) rml_test_debug_no_depends +rml_test_debug_no_depends: $(call cross_cfg,mkdir_debug) + $(MAKE) -C "$(call cross_cfg,$(work_dir)_debug)" -r -f $(tbb_root)/build/Makefile.rml cfg=debug rml_test tbb_root=$(tbb_root) + +.PHONY: examples_release examples_debug examples_release_no_depends examples_debug_no_depends + +examples_release: tbb_release tbbmalloc_release examples_release_no_depends +examples_release_no_depends: + $(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. release test + +examples_debug: tbb_debug tbbmalloc_debug examples_debug_no_depends +examples_debug_no_depends: + $(MAKE) -C $(examples_root) -r -f Makefile tbb_root=.. debug test + +.PHONY: clean_release clean_debug clean_examples + +clean_release: + $(shell $(RM) $(work_dir)_release$(SLASH)*.* >$(NUL) 2>$(NUL)) + $(shell $(RD) $(work_dir)_release >$(NUL) 2>$(NUL)) + +clean_debug: + $(shell $(RM) $(work_dir)_debug$(SLASH)*.* >$(NUL) 2>$(NUL)) + $(shell $(RD) $(work_dir)_debug >$(NUL) 2>$(NUL)) + +clean_examples: + $(shell $(MAKE) -s -i -r -C $(examples_root) -f Makefile tbb_root=.. clean >$(NUL) 2>$(NUL)) + +.PHONY: mkdir_release mkdir_debug codecov do_codecov info + +mkdir_release: + $(shell $(MD) "$(work_dir)_release" >$(NUL) 2>$(NUL)) + @echo Created $(work_dir)_release directory + +mkdir_debug: + $(shell $(MD) "$(work_dir)_debug" >$(NUL) 2>$(NUL)) + @echo Created $(work_dir)_debug directory + +codecov: compiler=$(if $(findstring windows,$(tbb_os)),icl,icc) +codecov: + $(MAKE) tbb_root=.. codecov=yes do_codecov + +do_codecov: + $(MAKE) RML=yes tbbmalloc_test_release test_release + $(MAKE) clean_test_* cfg=release + $(MAKE) RML=yes crosstest=yes tbbmalloc_test_debug test_debug + $(MAKE) clean_test_* cfg=release + $(MAKE) rml_test_release + $(MAKE) clean_test_* cfg=release + $(MAKE) crosstest=yes rml_test_debug + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.test tbb_root=$(tbb_root) cfg=release codecov=yes codecov_gen + +info: + @echo OS: $(tbb_os) + @echo arch=$(arch) + @echo compiler=$(compiler) + @echo runtime=$(runtime) + @echo tbb_build_prefix=$(tbb_build_prefix) diff --git a/deal.II/bundled/tbb41_20130401oss/src/index.html b/deal.II/bundled/tbb41_20130401oss/src/index.html new file mode 100644 index 0000000000..d990480758 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/index.html @@ -0,0 +1,76 @@ + + + +

    Overview

    +This directory contains the source code and unit tests for Threading Building Blocks. + +

    Directories

    +
    +
    tbb +
    Source code of the TBB library core. +
    tbbmalloc +
    Source code of the TBB scalable memory allocator. +
    test +
    Source code of the TBB unit tests. +
    rml +
    Source code of the Resource Management Layer (RML). +
    perf +
    Source code of microbenchmarks. +
    old +
    Source code of deprecated TBB entities that are still shipped as part of the TBB library for the sake of backward compatibility. +
    + +

    Files

    +
    +
    Makefile +
    Advanced Makefile for developing and debugging of TBB. See the basic build directions. Additional targets and options: +
    +
    make test_{name} time_{name} +
    Make and run individual test or benchmark.
    +
    make stress_{name} +
    Equivalent to 'make test_{name}' but runs until a failure detected or terminated by user.
    +
    make run_cmd="{command}" [(above options or targets)] +
    Command prefix for tests execution. Also, "run_cmd=-" will ignore test execution failures. See also -k and -i options of the GNU make for more options to keep building and testing despite of failures.
    +
    make debug_{name} +
    Equivalent to 'make test_{name}' but compiles in debug mode and runs under debugger ("run_cmd=$(debugger)").
    +
    make args="{command-line arguments}" [(above options or targets)] +
    Additional arguments for the run.
    +
    make repeat="{N}" [(above options or targets)] +
    Repeats execution N times.
    +
    make clean_{filename} +
    Removes executable, object, and other intermediate files with specified filename ('*' also works).
    +
    make cfg={debug|release} [(above options or targets)] +
    Specifies a build mode or corresponding directory to work in.
    +
    make tbb_strict=1 [(above options or targets)] +
    Enables warnings as errors.
    +
    make examples/{target} +
    Invokes examples/Makefile with specified target.
    +
    make clean_release clean_debug clean_examples +
    Removes release or debug build directories, or cleans all examples.
    +
    make test_no_depends +
    Equivalent to 'make test' but does not check for libraries updates.
    +
    make info +
    Output information about build configuration and directories.
    +
    make cpp0x=1 [(above options or targets)] +
    Enables C++0x extensions like lambdas for compilers that implement them as experimental features.
    +
    make CXXFLAGS={Flags} [(above options or targets)] +
    Specifies additional options for compiler.
    +
    make target={name} [(above options or targets)] +
    Includes additional build/{name}.inc file after OS-specific one.
    +
    make extra_inc={filename} [(above options or targets)] +
    Includes additional makefile.
    + +
    + + +
    +Up to parent directory +

    +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +

    +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +

    +* Other names and brands may be claimed as the property of others. + + diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.cpp new file mode 100644 index 0000000000..9a4fafabd4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.cpp @@ -0,0 +1,378 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "concurrent_queue_v2.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/spin_mutex.h" +#include "tbb/atomic.h" +#include +#include + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4267) +#endif + +#define RECORD_EVENTS 0 + +using namespace std; + +namespace tbb { + +namespace internal { + +class concurrent_queue_rep; + +//! A queue using simple locking. +/** For efficiency, this class has no constructor. + The caller is expected to zero-initialize it. */ +struct micro_queue { + typedef concurrent_queue_base::page page; + typedef size_t ticket; + + atomic head_page; + atomic head_counter; + + atomic tail_page; + atomic tail_counter; + + spin_mutex page_mutex; + + class push_finalizer: no_copy { + ticket my_ticket; + micro_queue& my_queue; + public: + push_finalizer( micro_queue& queue, ticket k ) : + my_ticket(k), my_queue(queue) + {} + ~push_finalizer() { + my_queue.tail_counter = my_ticket; + } + }; + + void push( const void* item, ticket k, concurrent_queue_base& base ); + + class pop_finalizer: no_copy { + ticket my_ticket; + micro_queue& my_queue; + page* my_page; + public: + pop_finalizer( micro_queue& queue, ticket k, page* p ) : + my_ticket(k), my_queue(queue), my_page(p) + {} + ~pop_finalizer() { + page* p = my_page; + if( p ) { + spin_mutex::scoped_lock lock( my_queue.page_mutex ); + page* q = p->next; + my_queue.head_page = q; + if( !q ) { + my_queue.tail_page = NULL; + } + } + my_queue.head_counter = my_ticket; + if( p ) + operator delete(p); + } + }; + + bool pop( void* dst, ticket k, concurrent_queue_base& base ); +}; + +//! Internal representation of a ConcurrentQueue. +/** For efficiency, this class has no constructor. + The caller is expected to zero-initialize it. */ +class concurrent_queue_rep { +public: + typedef size_t ticket; + +private: + friend struct micro_queue; + + //! Approximately n_queue/golden ratio + static const size_t phi = 3; + +public: + //! Must be power of 2 + static const size_t n_queue = 8; + + //! Map ticket to an array index + static size_t index( ticket k ) { + return k*phi%n_queue; + } + + atomic head_counter; + char pad1[NFS_MaxLineSize-sizeof(atomic)]; + + atomic tail_counter; + char pad2[NFS_MaxLineSize-sizeof(atomic)]; + micro_queue array[n_queue]; + + micro_queue& choose( ticket k ) { + // The formula here approximates LRU in a cache-oblivious way. + return array[index(k)]; + } + + //! Value for effective_capacity that denotes unbounded queue. + static const ptrdiff_t infinite_capacity = ptrdiff_t(~size_t(0)/2); +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // unary minus operator applied to unsigned type, result still unsigned + #pragma warning( push ) + #pragma warning( disable: 4146 ) +#endif + +//------------------------------------------------------------------------ +// micro_queue +//------------------------------------------------------------------------ +void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base ) { + k &= -concurrent_queue_rep::n_queue; + page* p = NULL; + size_t index = modulo_power_of_two( k/concurrent_queue_rep::n_queue, base.items_per_page ); + if( !index ) { + size_t n = sizeof(page) + base.items_per_page*base.item_size; + p = static_cast(operator new( n )); + p->mask = 0; + p->next = NULL; + } + { + push_finalizer finalizer( *this, k+concurrent_queue_rep::n_queue ); + spin_wait_until_eq( tail_counter, k ); + if( p ) { + spin_mutex::scoped_lock lock( page_mutex ); + if( page* q = tail_page ) + q->next = p; + else + head_page = p; + tail_page = p; + } else { + p = tail_page; + } + base.copy_item( *p, index, item ); + // If no exception was thrown, mark item as present. + p->mask |= uintptr_t(1)<1 ? item_sz : 2); + my_rep = cache_aligned_allocator().allocate(1); + __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" ); + memset(my_rep,0,sizeof(concurrent_queue_rep)); + this->item_size = item_sz; +} + +concurrent_queue_base::~concurrent_queue_base() { + size_t nq = my_rep->n_queue; + for( size_t i=0; iarray[i].tail_page; + __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" ); + if( tp!=NULL ) + delete tp; + } + cache_aligned_allocator().deallocate(my_rep,1); +} + +void concurrent_queue_base::internal_push( const void* src ) { + concurrent_queue_rep& r = *my_rep; + concurrent_queue_rep::ticket k = r.tail_counter++; + ptrdiff_t e = my_capacity; + if( e(my_capacity); + } + } + r.choose(k).push(src,k,*this); +} + +void concurrent_queue_base::internal_pop( void* dst ) { + concurrent_queue_rep& r = *my_rep; + concurrent_queue_rep::ticket k; + do { + k = r.head_counter++; + } while( !r.choose(k).pop(dst,k,*this) ); +} + +bool concurrent_queue_base::internal_pop_if_present( void* dst ) { + concurrent_queue_rep& r = *my_rep; + concurrent_queue_rep::ticket k; + do { + for( atomic_backoff backoff;;backoff.pause() ) { + k = r.head_counter; + if( r.tail_counter<=k ) { + // Queue is empty + return false; + } + // Queue had item with ticket k when we looked. Attempt to get that item. + if( r.head_counter.compare_and_swap(k+1,k)==k ) { + break; + } + // Another thread snatched the item, so pause and retry. + } + } while( !r.choose(k).pop(dst,k,*this) ); + return true; +} + +bool concurrent_queue_base::internal_push_if_not_full( const void* src ) { + concurrent_queue_rep& r = *my_rep; + concurrent_queue_rep::ticket k; + for( atomic_backoff backoff;;backoff.pause() ) { + k = r.tail_counter; + if( (ptrdiff_t)(k-r.head_counter)>=my_capacity ) { + // Queue is full + return false; + } + // Queue had empty slot with ticket k when we looked. Attempt to claim that slot. + if( r.tail_counter.compare_and_swap(k+1,k)==k ) + break; + // Another thread claimed the slot, so pause and retry. + } + r.choose(k).push(src,k,*this); + return true; +} + +ptrdiff_t concurrent_queue_base::internal_size() const { + __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL ); + return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter); +} + +void concurrent_queue_base::internal_set_capacity( ptrdiff_t capacity, size_t /*item_sz*/ ) { + my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity; +} + +//------------------------------------------------------------------------ +// concurrent_queue_iterator_rep +//------------------------------------------------------------------------ +class concurrent_queue_iterator_rep: no_assign { +public: + typedef concurrent_queue_rep::ticket ticket; + ticket head_counter; + const concurrent_queue_base& my_queue; + concurrent_queue_base::page* array[concurrent_queue_rep::n_queue]; + concurrent_queue_iterator_rep( const concurrent_queue_base& queue ) : + head_counter(queue.my_rep->head_counter), + my_queue(queue) + { + const concurrent_queue_rep& rep = *queue.my_rep; + for( size_t k=0; ktail_counter ) + return NULL; + else { + concurrent_queue_base::page* p = array[concurrent_queue_rep::index(k)]; + __TBB_ASSERT(p,NULL); + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, my_queue.items_per_page ); + return static_cast(static_cast(p+1)) + my_queue.item_size*i; + } + } +}; + +//------------------------------------------------------------------------ +// concurrent_queue_iterator_base +//------------------------------------------------------------------------ +concurrent_queue_iterator_base::concurrent_queue_iterator_base( const concurrent_queue_base& queue ) { + my_rep = new concurrent_queue_iterator_rep(queue); + my_item = my_rep->choose(my_rep->head_counter); +} + +void concurrent_queue_iterator_base::assign( const concurrent_queue_iterator_base& other ) { + if( my_rep!=other.my_rep ) { + if( my_rep ) { + delete my_rep; + my_rep = NULL; + } + if( other.my_rep ) { + my_rep = new concurrent_queue_iterator_rep( *other.my_rep ); + } + } + my_item = other.my_item; +} + +void concurrent_queue_iterator_base::advance() { + __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" ); + size_t k = my_rep->head_counter; + const concurrent_queue_base& queue = my_rep->my_queue; + __TBB_ASSERT( my_item==my_rep->choose(k), NULL ); + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, queue.items_per_page ); + if( i==queue.items_per_page-1 ) { + concurrent_queue_base::page*& root = my_rep->array[concurrent_queue_rep::index(k)]; + root = root->next; + } + my_rep->head_counter = k+1; + my_item = my_rep->choose(k+1); +} + +concurrent_queue_iterator_base::~concurrent_queue_iterator_base() { + delete my_rep; + my_rep = NULL; +} + +} // namespace internal + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.h b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.h new file mode 100644 index 0000000000..c7614e9235 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_queue_v2.h @@ -0,0 +1,332 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_queue_H +#define __TBB_concurrent_queue_H + +#include "tbb/tbb_stddef.h" +#include + +namespace tbb { + +template class concurrent_queue; + +//! @cond INTERNAL +namespace internal { + +class concurrent_queue_rep; +class concurrent_queue_iterator_rep; +template class concurrent_queue_iterator; + +//! For internal use only. +/** Type-independent portion of concurrent_queue. + @ingroup containers */ +class concurrent_queue_base: no_copy { + //! Internal representation + concurrent_queue_rep* my_rep; + + friend class concurrent_queue_rep; + friend struct micro_queue; + friend class concurrent_queue_iterator_rep; + friend class concurrent_queue_iterator_base; + + // In C++ 1998/2003 (but quite likely not beyond), friend micro_queue's rights + // do not apply to the declaration of micro_queue::pop_finalizer::my_page, + // as a member of a class nested within that friend class, so... +public: + //! Prefix on a page + struct page { + page* next; + uintptr_t mask; + }; + +protected: + //! Capacity of the queue + ptrdiff_t my_capacity; + + //! Always a power of 2 + size_t items_per_page; + + //! Size of an item + size_t item_size; +private: + virtual void copy_item( page& dst, size_t index, const void* src ) = 0; + virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) = 0; +protected: + __TBB_EXPORTED_METHOD concurrent_queue_base( size_t item_size ); + virtual __TBB_EXPORTED_METHOD ~concurrent_queue_base(); + + //! Enqueue item at tail of queue + void __TBB_EXPORTED_METHOD internal_push( const void* src ); + + //! Dequeue item from head of queue + void __TBB_EXPORTED_METHOD internal_pop( void* dst ); + + //! Attempt to enqueue item onto queue. + bool __TBB_EXPORTED_METHOD internal_push_if_not_full( const void* src ); + + //! Attempt to dequeue item from queue. + /** NULL if there was no item to dequeue. */ + bool __TBB_EXPORTED_METHOD internal_pop_if_present( void* dst ); + + //! Get size of queue + ptrdiff_t __TBB_EXPORTED_METHOD internal_size() const; + + void __TBB_EXPORTED_METHOD internal_set_capacity( ptrdiff_t capacity, size_t element_size ); +}; + +//! Type-independent portion of concurrent_queue_iterator. +/** @ingroup containers */ +class concurrent_queue_iterator_base : no_assign{ + //! concurrent_queue over which we are iterating. + /** NULL if one past last element in queue. */ + concurrent_queue_iterator_rep* my_rep; + + template + friend bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); + + template + friend bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ); +protected: + //! Pointer to current item + mutable void* my_item; + + //! Default constructor + __TBB_EXPORTED_METHOD concurrent_queue_iterator_base() : my_rep(NULL), my_item(NULL) {} + + //! Copy constructor + concurrent_queue_iterator_base( const concurrent_queue_iterator_base& i ) : my_rep(NULL), my_item(NULL) { + assign(i); + } + + //! Construct iterator pointing to head of queue. + concurrent_queue_iterator_base( const concurrent_queue_base& queue ); + + //! Assignment + void __TBB_EXPORTED_METHOD assign( const concurrent_queue_iterator_base& i ); + + //! Advance iterator one step towards tail of queue. + void __TBB_EXPORTED_METHOD advance(); + + //! Destructor + __TBB_EXPORTED_METHOD ~concurrent_queue_iterator_base(); +}; + +//! Meets requirements of a forward iterator for STL. +/** Value is either the T or const T type of the container. + @ingroup containers */ +template +class concurrent_queue_iterator: public concurrent_queue_iterator_base { +#if !defined(_MSC_VER) || defined(__INTEL_COMPILER) + template + friend class ::tbb::concurrent_queue; +#else +public: // workaround for MSVC +#endif + //! Construct iterator pointing to head of queue. + concurrent_queue_iterator( const concurrent_queue_base& queue ) : + concurrent_queue_iterator_base(queue) + { + } +public: + concurrent_queue_iterator() {} + + /** If Value==Container::value_type, then this routine is the copy constructor. + If Value==const Container::value_type, then this routine is a conversion constructor. */ + concurrent_queue_iterator( const concurrent_queue_iterator& other ) : + concurrent_queue_iterator_base(other) + {} + + //! Iterator assignment + concurrent_queue_iterator& operator=( const concurrent_queue_iterator& other ) { + assign(other); + return *this; + } + + //! Reference to current item + Value& operator*() const { + return *static_cast(my_item); + } + + Value* operator->() const {return &operator*();} + + //! Advance to next item in queue + concurrent_queue_iterator& operator++() { + advance(); + return *this; + } + + //! Post increment + Value* operator++(int) { + Value* result = &operator*(); + operator++(); + return result; + } +}; // concurrent_queue_iterator + +template +bool operator==( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item==j.my_item; +} + +template +bool operator!=( const concurrent_queue_iterator& i, const concurrent_queue_iterator& j ) { + return i.my_item!=j.my_item; +} + +} // namespace internal; +//! @endcond + +//! A high-performance thread-safe queue. +/** Multiple threads may each push and pop concurrently. + Assignment and copy construction are not allowed. + @ingroup containers */ +template +class concurrent_queue: public internal::concurrent_queue_base { + template friend class internal::concurrent_queue_iterator; + + //! Class used to ensure exception-safety of method "pop" + class destroyer { + T& my_value; + public: + destroyer( T& value ) : my_value(value) {} + ~destroyer() {my_value.~T();} + }; + + T& get_ref( page& pg, size_t index ) { + __TBB_ASSERT( index(static_cast(&pg+1))[index]; + } + + /*override*/ virtual void copy_item( page& dst, size_t index, const void* src ) { + new( &get_ref(dst,index) ) T(*static_cast(src)); + } + + /*override*/ virtual void assign_and_destroy_item( void* dst, page& src, size_t index ) { + T& from = get_ref(src,index); + destroyer d(from); + *static_cast(dst) = from; + } + +public: + //! Element type in the queue. + typedef T value_type; + + //! Reference type + typedef T& reference; + + //! Const reference type + typedef const T& const_reference; + + //! Integral type for representing size of the queue. + /** Note that the size_type is a signed integral type. + This is because the size can be negative if there are pending pops without corresponding pushes. */ + typedef std::ptrdiff_t size_type; + + //! Difference type for iterator + typedef std::ptrdiff_t difference_type; + + //! Construct empty queue + concurrent_queue() : + concurrent_queue_base( sizeof(T) ) + { + } + + //! Destroy queue + ~concurrent_queue(); + + //! Enqueue an item at tail of queue. + void push( const T& source ) { + internal_push( &source ); + } + + //! Dequeue item from head of queue. + /** Block until an item becomes available, and then dequeue it. */ + void pop( T& destination ) { + internal_pop( &destination ); + } + + //! Enqueue an item at tail of queue if queue is not already full. + /** Does not wait for queue to become not full. + Returns true if item is pushed; false if queue was already full. */ + bool push_if_not_full( const T& source ) { + return internal_push_if_not_full( &source ); + } + + //! Attempt to dequeue an item from head of queue. + /** Does not wait for item to become available. + Returns true if successful; false otherwise. */ + bool pop_if_present( T& destination ) { + return internal_pop_if_present( &destination ); + } + + //! Return number of pushes minus number of pops. + /** Note that the result can be negative if there are pops waiting for the + corresponding pushes. The result can also exceed capacity() if there + are push operations in flight. */ + size_type size() const {return internal_size();} + + //! Equivalent to size()<=0. + bool empty() const {return size()<=0;} + + //! Maximum number of allowed elements + size_type capacity() const { + return my_capacity; + } + + //! Set the capacity + /** Setting the capacity to 0 causes subsequent push_if_not_full operations to always fail, + and subsequent push operations to block forever. */ + void set_capacity( size_type new_capacity ) { + internal_set_capacity( new_capacity, sizeof(T) ); + } + + typedef internal::concurrent_queue_iterator iterator; + typedef internal::concurrent_queue_iterator const_iterator; + + //------------------------------------------------------------------------ + // The iterators are intended only for debugging. They are slow and not thread safe. + //------------------------------------------------------------------------ + iterator begin() {return iterator(*this);} + iterator end() {return iterator();} + const_iterator begin() const {return const_iterator(*this);} + const_iterator end() const {return const_iterator();} + +}; + +template +concurrent_queue::~concurrent_queue() { + while( !empty() ) { + T value; + internal_pop(&value); + } +} + +} // namespace tbb + +#endif /* __TBB_concurrent_queue_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.cpp new file mode 100644 index 0000000000..14be6e7af7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.cpp @@ -0,0 +1,276 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "concurrent_vector_v2.h" +#include "tbb/tbb_machine.h" +#include "../tbb/itt_notify.h" +#include "tbb/task.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include // std::length_error +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4267) +#endif + +namespace tbb { + +namespace internal { + +void concurrent_vector_base::internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op1 init ) { + size_type e = my_early_size; + while( e=pointers_per_short_segment && v.my_segment==v.my_storage ) { + extend_segment(v); + } + } +}; + +void concurrent_vector_base::helper::extend_segment( concurrent_vector_base& v ) { + const size_t pointers_per_long_segment = sizeof(void*)==4 ? 32 : 64; + segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_segment, sizeof(segment_t), NULL ); + std::memset( s, 0, pointers_per_long_segment*sizeof(segment_t) ); + // If other threads are trying to set pointers in the short segment, wait for them to finish their + // assignments before we copy the short segment to the long segment. + atomic_backoff backoff; + while( !v.my_storage[0].array || !v.my_storage[1].array ) { + backoff.pause(); + } + s[0] = v.my_storage[0]; + s[1] = v.my_storage[1]; + if( v.my_segment.compare_and_swap( s, v.my_storage )!=v.my_storage ) + NFS_Free(s); +} + +concurrent_vector_base::size_type concurrent_vector_base::internal_capacity() const { + return segment_base( helper::find_segment_end(*this) ); +} + +void concurrent_vector_base::internal_reserve( size_type n, size_type element_size, size_type max_size ) { + if( n>max_size ) { + __TBB_THROW( std::length_error("argument to concurrent_vector::reserve exceeds concurrent_vector::max_size()") ); + } + for( segment_index_t k = helper::find_segment_end(*this); segment_base(k)n-b ) m = n-b; + copy( my_segment[k].array, src.my_segment[k].array, m ); + } + } +} + +void concurrent_vector_base::internal_assign( const concurrent_vector_base& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) { + size_type n = src.my_early_size; + while( my_early_size>n ) { + segment_index_t k = segment_index_of( my_early_size-1 ); + size_type b=segment_base(k); + size_type new_end = b>=n ? b : n; + __TBB_ASSERT( my_early_size>new_end, NULL ); + destroy( (char*)my_segment[k].array+element_size*(new_end-b), my_early_size-new_end ); + my_early_size = new_end; + } + size_type dst_initialized_size = my_early_size; + my_early_size = n; + size_type b; + for( segment_index_t k=0; (b=segment_base(k))n-b ) m = n-b; + size_type a = 0; + if( dst_initialized_size>b ) { + a = dst_initialized_size-b; + if( a>m ) a = m; + assign( my_segment[k].array, src.my_segment[k].array, a ); + m -= a; + a *= element_size; + } + if( m>0 ) + copy( (char*)my_segment[k].array+a, (char*)src.my_segment[k].array+a, m ); + } + __TBB_ASSERT( src.my_early_size==n, "detected use of concurrent_vector::operator= with right side that was concurrently modified" ); +} + +void* concurrent_vector_base::internal_push_back( size_type element_size, size_type& index ) { + __TBB_ASSERT( sizeof(my_early_size)==sizeof(reference_count), NULL ); + //size_t tmp = __TBB_FetchAndIncrementWacquire(*(tbb::internal::reference_count*)&my_early_size); + size_t tmp = __TBB_FetchAndIncrementWacquire((tbb::internal::reference_count*)&my_early_size); + index = tmp; + segment_index_t k_old = segment_index_of( tmp ); + size_type base = segment_base(k_old); + helper::extend_segment_if_necessary(*this,k_old); + segment_t& s = my_segment[k_old]; + void* array = s.array; + if( !array ) { + // FIXME - consider factoring this out and share with internal_grow_by + if( base==tmp ) { + __TBB_ASSERT( !s.array, NULL ); + size_t n = segment_size(k_old); + array = NFS_Allocate( n, element_size, NULL ); + ITT_NOTIFY( sync_releasing, &s.array ); + s.array = array; + } else { + ITT_NOTIFY(sync_prepare, &s.array); + spin_wait_while_eq( s.array, (void*)0 ); + ITT_NOTIFY(sync_acquired, &s.array); + array = s.array; + } + } + size_type j_begin = tmp-base; + return (void*)((char*)array+element_size*j_begin); +} + +concurrent_vector_base::size_type concurrent_vector_base::internal_grow_by( size_type delta, size_type element_size, internal_array_op1 init ) { + size_type result = my_early_size.fetch_and_add(delta); + internal_grow( result, result+delta, element_size, init ); + return result; +} + +void concurrent_vector_base::internal_grow( const size_type start, size_type finish, size_type element_size, internal_array_op1 init ) { + __TBB_ASSERT( start finish-base ? finish-base : n; + (*init)( (void*)((char*)array+element_size*j_begin), j_end-j_begin ); + tmp = base+j_end; + } while( tmp0 ) { + segment_index_t k_old = segment_index_of(finish-1); + segment_t& s = my_segment[k_old]; + __TBB_ASSERT( s.array, NULL ); + size_type base = segment_base(k_old); + size_type j_end = finish-base; + __TBB_ASSERT( j_end, NULL ); + (*destroy)( s.array, j_end ); + finish = base; + } + + // Free the arrays + if( reclaim_storage ) { + size_t k = helper::find_segment_end(*this); + while( k>0 ) { + --k; + segment_t& s = my_segment[k]; + void* array = s.array; + s.array = NULL; + NFS_Free( array ); + } + // Clear short segment. + my_storage[0].array = NULL; + my_storage[1].array = NULL; + segment_t* s = my_segment; + if( s!=my_storage ) { + my_segment = my_storage; + NFS_Free( s ); + } + } +} + +} // namespace internal + +} // tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.h b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.h new file mode 100644 index 0000000000..6754ac80d6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/concurrent_vector_v2.h @@ -0,0 +1,531 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_vector_H +#define __TBB_concurrent_vector_H + +#include "tbb/tbb_stddef.h" +#include "tbb/atomic.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/blocked_range.h" +#include "tbb/tbb_machine.h" +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +namespace tbb { + +template +class concurrent_vector; + +//! @cond INTERNAL +namespace internal { + + //! Base class of concurrent vector implementation. + /** @ingroup containers */ + class concurrent_vector_base { + protected: + + // Basic types declarations + typedef unsigned long segment_index_t; + typedef size_t size_type; + + //! Log2 of "min_segment_size". + static const int lg_min_segment_size = 4; + + //! Minimum size (in physical items) of a segment. + static const int min_segment_size = segment_index_t(1)<>1< my_early_size; + + /** Can be zero-initialized. */ + struct segment_t { + /** Declared volatile because in weak memory model, must have ld.acq/st.rel */ + void* volatile array; +#if TBB_USE_ASSERT + ~segment_t() { + __TBB_ASSERT( !array, "should have been set to NULL by clear" ); + } +#endif /* TBB_USE_ASSERT */ + }; + + // Data fields + + //! Pointer to the segments table + atomic my_segment; + + //! embedded storage of segment pointers + segment_t my_storage[2]; + + // Methods + + concurrent_vector_base() { + my_early_size = 0; + my_storage[0].array = NULL; + my_storage[1].array = NULL; + my_segment = my_storage; + } + + //! An operation on an n-element array starting at begin. + typedef void(__TBB_EXPORTED_FUNC *internal_array_op1)(void* begin, size_type n ); + + //! An operation on n-element destination array and n-element source array. + typedef void(__TBB_EXPORTED_FUNC *internal_array_op2)(void* dst, const void* src, size_type n ); + + void __TBB_EXPORTED_METHOD internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op1 init ); + void internal_grow( size_type start, size_type finish, size_type element_size, internal_array_op1 init ); + size_type __TBB_EXPORTED_METHOD internal_grow_by( size_type delta, size_type element_size, internal_array_op1 init ); + void* __TBB_EXPORTED_METHOD internal_push_back( size_type element_size, size_type& index ); + void __TBB_EXPORTED_METHOD internal_clear( internal_array_op1 destroy, bool reclaim_storage ); + void __TBB_EXPORTED_METHOD internal_copy( const concurrent_vector_base& src, size_type element_size, internal_array_op2 copy ); + void __TBB_EXPORTED_METHOD internal_assign( const concurrent_vector_base& src, size_type element_size, + internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ); +private: + //! Private functionality that does not cross DLL boundary. + class helper; + friend class helper; + }; + + //! Meets requirements of a forward iterator for STL and a Value for a blocked_range.*/ + /** Value is either the T or const T type of the container. + @ingroup containers */ + template + class vector_iterator +#if defined(_WIN64) && defined(_MSC_VER) + // Ensure that Microsoft's internal template function _Val_type works correctly. + : public std::iterator +#endif /* defined(_WIN64) && defined(_MSC_VER) */ + { + //! concurrent_vector over which we are iterating. + Container* my_vector; + + //! Index into the vector + size_t my_index; + + //! Caches my_vector->internal_subscript(my_index) + /** NULL if cached value is not available */ + mutable Value* my_item; + + template + friend bool operator==( const vector_iterator& i, const vector_iterator& j ); + + template + friend bool operator<( const vector_iterator& i, const vector_iterator& j ); + + template + friend ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ); + + template + friend class internal::vector_iterator; + +#if !defined(_MSC_VER) || defined(__INTEL_COMPILER) + template + friend class tbb::concurrent_vector; +#else +public: // workaround for MSVC +#endif + + vector_iterator( const Container& vector, size_t index ) : + my_vector(const_cast(&vector)), + my_index(index), + my_item(NULL) + {} + + public: + //! Default constructor + vector_iterator() : my_vector(NULL), my_index(~size_t(0)), my_item(NULL) {} + + vector_iterator( const vector_iterator& other ) : + my_vector(other.my_vector), + my_index(other.my_index), + my_item(other.my_item) + {} + + vector_iterator operator+( ptrdiff_t offset ) const { + return vector_iterator( *my_vector, my_index+offset ); + } + friend vector_iterator operator+( ptrdiff_t offset, const vector_iterator& v ) { + return vector_iterator( *v.my_vector, v.my_index+offset ); + } + vector_iterator operator+=( ptrdiff_t offset ) { + my_index+=offset; + my_item = NULL; + return *this; + } + vector_iterator operator-( ptrdiff_t offset ) const { + return vector_iterator( *my_vector, my_index-offset ); + } + vector_iterator operator-=( ptrdiff_t offset ) { + my_index-=offset; + my_item = NULL; + return *this; + } + Value& operator*() const { + Value* item = my_item; + if( !item ) { + item = my_item = &my_vector->internal_subscript(my_index); + } + __TBB_ASSERT( item==&my_vector->internal_subscript(my_index), "corrupt cache" ); + return *item; + } + Value& operator[]( ptrdiff_t k ) const { + return my_vector->internal_subscript(my_index+k); + } + Value* operator->() const {return &operator*();} + + //! Pre increment + vector_iterator& operator++() { + size_t k = ++my_index; + if( my_item ) { + // Following test uses 2's-complement wizardry and fact that + // min_segment_size is a power of 2. + if( (k& k-concurrent_vector::min_segment_size)==0 ) { + // k is a power of two that is at least k-min_segment_size + my_item= NULL; + } else { + ++my_item; + } + } + return *this; + } + + //! Pre decrement + vector_iterator& operator--() { + __TBB_ASSERT( my_index>0, "operator--() applied to iterator already at beginning of concurrent_vector" ); + size_t k = my_index--; + if( my_item ) { + // Following test uses 2's-complement wizardry and fact that + // min_segment_size is a power of 2. + if( (k& k-concurrent_vector::min_segment_size)==0 ) { + // k is a power of two that is at least k-min_segment_size + my_item= NULL; + } else { + --my_item; + } + } + return *this; + } + + //! Post increment + vector_iterator operator++(int) { + vector_iterator result = *this; + operator++(); + return result; + } + + //! Post decrement + vector_iterator operator--(int) { + vector_iterator result = *this; + operator--(); + return result; + } + + // STL support + + typedef ptrdiff_t difference_type; + typedef Value value_type; + typedef Value* pointer; + typedef Value& reference; + typedef std::random_access_iterator_tag iterator_category; + }; + + template + bool operator==( const vector_iterator& i, const vector_iterator& j ) { + return i.my_index==j.my_index; + } + + template + bool operator!=( const vector_iterator& i, const vector_iterator& j ) { + return !(i==j); + } + + template + bool operator<( const vector_iterator& i, const vector_iterator& j ) { + return i.my_index + bool operator>( const vector_iterator& i, const vector_iterator& j ) { + return j + bool operator>=( const vector_iterator& i, const vector_iterator& j ) { + return !(i + bool operator<=( const vector_iterator& i, const vector_iterator& j ) { + return !(j + ptrdiff_t operator-( const vector_iterator& i, const vector_iterator& j ) { + return ptrdiff_t(i.my_index)-ptrdiff_t(j.my_index); + } + +} // namespace internal +//! @endcond + +//! Concurrent vector +/** @ingroup containers */ +template +class concurrent_vector: private internal::concurrent_vector_base { +public: + using internal::concurrent_vector_base::size_type; +private: + template + class generic_range_type: public blocked_range { + public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + typedef I iterator; + typedef ptrdiff_t difference_type; + generic_range_type( I begin_, I end_, size_t grainsize_ ) : blocked_range(begin_,end_,grainsize_) {} + generic_range_type( generic_range_type& r, split ) : blocked_range(r,split()) {} + }; + + template + friend class internal::vector_iterator; +public: + typedef T& reference; + typedef const T& const_reference; + typedef T value_type; + typedef ptrdiff_t difference_type; + + //! Construct empty vector. + concurrent_vector() {} + + //! Copy a vector. + concurrent_vector( const concurrent_vector& vector ) : internal::concurrent_vector_base() + { internal_copy(vector,sizeof(T),©_array); } + + //! Assignment + concurrent_vector& operator=( const concurrent_vector& vector ) { + if( this!=&vector ) + internal_assign(vector,sizeof(T),&destroy_array,&assign_array,©_array); + return *this; + } + + //! Clear and destroy vector. + ~concurrent_vector() {internal_clear(&destroy_array,/*reclaim_storage=*/true);} + + //------------------------------------------------------------------------ + // Concurrent operations + //------------------------------------------------------------------------ + //! Grow by "delta" elements. + /** Returns old size. */ + size_type grow_by( size_type delta ) { + return delta ? internal_grow_by( delta, sizeof(T), &initialize_array ) : my_early_size; + } + + //! Grow array until it has at least n elements. + void grow_to_at_least( size_type n ) { + if( my_early_size iterator; + typedef internal::vector_iterator const_iterator; + +#if !defined(_MSC_VER) || _CPPLIB_VER>=300 + // Assume ISO standard definition of std::reverse_iterator + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#else + // Use non-standard std::reverse_iterator + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; +#endif /* defined(_MSC_VER) && (_MSC_VER<1300) */ + + // Forward sequence + iterator begin() {return iterator(*this,0);} + iterator end() {return iterator(*this,size());} + const_iterator begin() const {return const_iterator(*this,0);} + const_iterator end() const {return const_iterator(*this,size());} + + // Reverse sequence + reverse_iterator rbegin() {return reverse_iterator(end());} + reverse_iterator rend() {return reverse_iterator(begin());} + const_reverse_iterator rbegin() const {return const_reverse_iterator(end());} + const_reverse_iterator rend() const {return const_reverse_iterator(begin());} + + //------------------------------------------------------------------------ + // Support for TBB algorithms (ranges) + //------------------------------------------------------------------------ + typedef generic_range_type range_type; + typedef generic_range_type const_range_type; + + //! Get range to use with parallel algorithms + range_type range( size_t grainsize = 1 ) { + return range_type( begin(), end(), grainsize ); + } + + //! Get const range for iterating with parallel algorithms + const_range_type range( size_t grainsize = 1 ) const { + return const_range_type( begin(), end(), grainsize ); + } + + //------------------------------------------------------------------------ + // Size and capacity + //------------------------------------------------------------------------ + //! Return size of vector. + size_type size() const {return my_early_size;} + + //! Return false if vector is not empty. + bool empty() const {return !my_early_size;} + + //! Maximum size to which array can grow without allocating more memory. + size_type capacity() const {return internal_capacity();} + + //! Allocate enough space to grow to size n without having to allocate more memory later. + /** Like most of the methods provided for STL compatibility, this method is *not* thread safe. + The capacity afterwards may be bigger than the requested reservation. */ + void reserve( size_type n ) { + if( n ) + internal_reserve(n, sizeof(T), max_size()); + } + + //! Upper bound on argument to reserve. + size_type max_size() const {return (~size_t(0))/sizeof(T);} + + //! Not thread safe + /** Does not change capacity. */ + void clear() {internal_clear(&destroy_array,/*reclaim_storage=*/false);} +private: + //! Get reference to element at given index. + T& internal_subscript( size_type index ) const; + + //! Construct n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC initialize_array( void* begin, size_type n ); + + //! Construct n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC copy_array( void* dst, const void* src, size_type n ); + + //! Assign n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC assign_array( void* dst, const void* src, size_type n ); + + //! Destroy n instances of T, starting at "begin". + static void __TBB_EXPORTED_FUNC destroy_array( void* begin, size_type n ); +}; + +template +T& concurrent_vector::internal_subscript( size_type index ) const { + __TBB_ASSERT( index(my_segment[k].array)[j]; +} + +template +void concurrent_vector::initialize_array( void* begin, size_type n ) { + T* array = static_cast(begin); + for( size_type j=0; j +void concurrent_vector::copy_array( void* dst, const void* src, size_type n ) { + T* d = static_cast(dst); + const T* s = static_cast(src); + for( size_type j=0; j +void concurrent_vector::assign_array( void* dst, const void* src, size_type n ) { + T* d = static_cast(dst); + const T* s = static_cast(src); + for( size_type j=0; j +void concurrent_vector::destroy_array( void* begin, size_type n ) { + T* array = static_cast(begin); + for( size_type j=n; j>0; --j ) + array[j-1].~T(); +} + +} // namespace tbb + +#endif /* __TBB_concurrent_vector_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.cpp new file mode 100644 index 0000000000..f5f04dbefd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.cpp @@ -0,0 +1,163 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "spin_rw_mutex_v2.h" +#include "tbb/tbb_machine.h" +#include "../tbb/itt_notify.h" + +namespace tbb { + +using namespace internal; + +static inline bool CAS(volatile uintptr_t &addr, uintptr_t newv, uintptr_t oldv) { + return __TBB_CompareAndSwapW((volatile void *)&addr, (intptr_t)newv, (intptr_t)oldv) == (intptr_t)oldv; +} + +//! Signal that write lock is released +void spin_rw_mutex::internal_itt_releasing(spin_rw_mutex *mutex) { + __TBB_ASSERT_EX(mutex, NULL); // To prevent compiler warnings + ITT_NOTIFY(sync_releasing, mutex); +} + +//! Acquire write (exclusive) lock on the given mutex. +bool spin_rw_mutex::internal_acquire_writer(spin_rw_mutex *mutex) +{ + ITT_NOTIFY(sync_prepare, mutex); + for( atomic_backoff backoff;;backoff.pause() ) { + state_t s = mutex->state; + if( !(s & BUSY) ) { // no readers, no writers + if( CAS(mutex->state, WRITER, s) ) + break; // successfully stored writer flag + backoff.reset(); // we could be very close to complete op. + } else if( !(s & WRITER_PENDING) ) { // no pending writers + __TBB_AtomicOR(&mutex->state, WRITER_PENDING); + } + } + ITT_NOTIFY(sync_acquired, mutex); + __TBB_ASSERT( (mutex->state & BUSY)==WRITER, "invalid state of a write lock" ); + return false; +} + +//! Release write lock on the given mutex +void spin_rw_mutex::internal_release_writer(spin_rw_mutex *mutex) { + __TBB_ASSERT( (mutex->state & BUSY)==WRITER, "invalid state of a write lock" ); + ITT_NOTIFY(sync_releasing, mutex); + mutex->state = 0; +} + +//! Acquire read (shared) lock on the given mutex. +void spin_rw_mutex::internal_acquire_reader(spin_rw_mutex *mutex) { + ITT_NOTIFY(sync_prepare, mutex); + for( atomic_backoff backoff;;backoff.pause() ) { + state_t s = mutex->state; + if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests + if( CAS(mutex->state, s+ONE_READER, s) ) + break; // successfully stored increased number of readers + backoff.reset(); // we could be very close to complete op. + } + } + ITT_NOTIFY(sync_acquired, mutex); + __TBB_ASSERT( mutex->state & READERS, "invalid state of a read lock: no readers" ); + __TBB_ASSERT( !(mutex->state & WRITER), "invalid state of a read lock: active writer" ); +} + +//! Upgrade reader to become a writer. +/** Returns whether the upgrade happened without releasing and re-acquiring the lock */ +bool spin_rw_mutex::internal_upgrade(spin_rw_mutex *mutex) { + state_t s = mutex->state; + __TBB_ASSERT( s & READERS, "invalid state before upgrade: no readers " ); + __TBB_ASSERT( !(s & WRITER), "invalid state before upgrade: active writer " ); + // check and set writer-pending flag + // required conditions: either no pending writers, or we are the only reader + // (with multiple readers and pending writer, another upgrade could have been requested) + while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) { + if( CAS(mutex->state, s | WRITER_PENDING, s) ) + { + ITT_NOTIFY(sync_prepare, mutex); + for( atomic_backoff backoff; (mutex->state & READERS) != ONE_READER; ) + backoff.pause(); // while more than 1 reader + __TBB_ASSERT(mutex->state == (ONE_READER | WRITER_PENDING),"invalid state when upgrading to writer"); + // both new readers and writers are blocked at this time + mutex->state = WRITER; + ITT_NOTIFY(sync_acquired, mutex); + __TBB_ASSERT( (mutex->state & BUSY) == WRITER, "invalid state after upgrade" ); + return true; // successfully upgraded + } else { + s = mutex->state; // re-read + } + } + // slow reacquire + internal_release_reader(mutex); + return internal_acquire_writer(mutex); // always returns false +} + +//! Downgrade writer to a reader +void spin_rw_mutex::internal_downgrade(spin_rw_mutex *mutex) { + __TBB_ASSERT( (mutex->state & BUSY) == WRITER, "invalid state before downgrade" ); + ITT_NOTIFY(sync_releasing, mutex); + mutex->state = ONE_READER; + __TBB_ASSERT( mutex->state & READERS, "invalid state after downgrade: no readers" ); + __TBB_ASSERT( !(mutex->state & WRITER), "invalid state after downgrade: active writer" ); +} + +//! Release read lock on the given mutex +void spin_rw_mutex::internal_release_reader(spin_rw_mutex *mutex) +{ + __TBB_ASSERT( mutex->state & READERS, "invalid state of a read lock: no readers" ); + __TBB_ASSERT( !(mutex->state & WRITER), "invalid state of a read lock: active writer" ); + ITT_NOTIFY(sync_releasing, mutex); // release reader + __TBB_FetchAndAddWrelease((volatile void *)&(mutex->state),-(intptr_t)ONE_READER); +} + +//! Try to acquire write lock on the given mutex +bool spin_rw_mutex::internal_try_acquire_writer( spin_rw_mutex * mutex ) +{ + // for a writer: only possible to acquire if no active readers or writers + state_t s = mutex->state; // on IA-64, this volatile load has acquire semantic + if( !(s & BUSY) ) // no readers, no writers; mask is 1..1101 + if( CAS(mutex->state, WRITER, s) ) { + ITT_NOTIFY(sync_acquired, mutex); + return true; // successfully stored writer flag + } + return false; +} + +//! Try to acquire read lock on the given mutex +bool spin_rw_mutex::internal_try_acquire_reader( spin_rw_mutex * mutex ) +{ + // for a reader: acquire if no active or waiting writers + state_t s = mutex->state; // on IA-64, a load of volatile variable has acquire semantic + while( !(s & (WRITER|WRITER_PENDING)) ) // no writers + if( CAS(mutex->state, s+ONE_READER, s) ) { + ITT_NOTIFY(sync_acquired, mutex); + return true; // successfully stored increased number of readers + } + return false; +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.h b/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.h new file mode 100644 index 0000000000..3ebe9f5356 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/spin_rw_mutex_v2.h @@ -0,0 +1,183 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_spin_rw_mutex_H +#define __TBB_spin_rw_mutex_H + +#include "tbb/tbb_stddef.h" + +namespace tbb { + +//! Fast, unfair, spinning reader-writer lock with backoff and writer-preference +/** @ingroup synchronization */ +class spin_rw_mutex { + //! @cond INTERNAL + + //! Present so that 1.0 headers work with 1.1 dynamic library. + static void __TBB_EXPORTED_FUNC internal_itt_releasing(spin_rw_mutex *); + + //! Internal acquire write lock. + static bool __TBB_EXPORTED_FUNC internal_acquire_writer(spin_rw_mutex *); + + //! Out of line code for releasing a write lock. + /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ + static void __TBB_EXPORTED_FUNC internal_release_writer(spin_rw_mutex *); + + //! Internal acquire read lock. + static void __TBB_EXPORTED_FUNC internal_acquire_reader(spin_rw_mutex *); + + //! Internal upgrade reader to become a writer. + static bool __TBB_EXPORTED_FUNC internal_upgrade(spin_rw_mutex *); + + //! Out of line code for downgrading a writer to a reader. + /** This code has debug checking and instrumentation for Intel(R) Thread Checker and Intel(R) Thread Profiler. */ + static void __TBB_EXPORTED_FUNC internal_downgrade(spin_rw_mutex *); + + //! Internal release read lock. + static void __TBB_EXPORTED_FUNC internal_release_reader(spin_rw_mutex *); + + //! Internal try_acquire write lock. + static bool __TBB_EXPORTED_FUNC internal_try_acquire_writer(spin_rw_mutex *); + + //! Internal try_acquire read lock. + static bool __TBB_EXPORTED_FUNC internal_try_acquire_reader(spin_rw_mutex *); + + //! @endcond +public: + //! Construct unacquired mutex. + spin_rw_mutex() : state(0) {} + +#if TBB_USE_ASSERT + //! Destructor asserts if the mutex is acquired, i.e. state is zero. + ~spin_rw_mutex() { + __TBB_ASSERT( !state, "destruction of an acquired mutex"); + }; +#endif /* TBB_USE_ASSERT */ + + //! The scoped locking pattern + /** It helps to avoid the common problem of forgetting to release lock. + It also nicely provides the "node" for queuing locks. */ + class scoped_lock : internal::no_copy { + public: + //! Construct lock that has not acquired a mutex. + /** Equivalent to zero-initialization of *this. */ + scoped_lock() : mutex(NULL) {} + + //! Construct and acquire lock on given mutex. + scoped_lock( spin_rw_mutex& m, bool write = true ) : mutex(NULL) { + acquire(m, write); + } + + //! Release lock (if lock is held). + ~scoped_lock() { + if( mutex ) release(); + } + + //! Acquire lock on given mutex. + void acquire( spin_rw_mutex& m, bool write = true ) { + __TBB_ASSERT( !mutex, "holding mutex already" ); + mutex = &m; + is_writer = write; + if( write ) internal_acquire_writer(mutex); + else internal_acquire_reader(mutex); + } + + //! Upgrade reader to become a writer. + /** Returns whether the upgrade happened without releasing and re-acquiring the lock */ + bool upgrade_to_writer() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + __TBB_ASSERT( !is_writer, "not a reader" ); + is_writer = true; + return internal_upgrade(mutex); + } + + //! Release lock. + void release() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + spin_rw_mutex *m = mutex; + mutex = NULL; + if( is_writer ) { +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_release_writer(m); +#else + m->state = 0; +#endif /* TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT */ + } else { + internal_release_reader(m); + } + }; + + //! Downgrade writer to become a reader. + bool downgrade_to_reader() { + __TBB_ASSERT( mutex, "lock is not acquired" ); + __TBB_ASSERT( is_writer, "not a writer" ); +#if TBB_USE_THREADING_TOOLS||TBB_USE_ASSERT + internal_downgrade(mutex); +#else + mutex->state = 4; // Bit 2 - reader, 00..00100 +#endif + is_writer = false; + return true; + } + + //! Try acquire lock on given mutex. + bool try_acquire( spin_rw_mutex& m, bool write = true ) { + __TBB_ASSERT( !mutex, "holding mutex already" ); + bool result; + is_writer = write; + result = write? internal_try_acquire_writer(&m) + : internal_try_acquire_reader(&m); + if( result ) mutex = &m; + return result; + } + + private: + //! The pointer to the current mutex that is held, or NULL if no mutex is held. + spin_rw_mutex* mutex; + + //! If mutex!=NULL, then is_writer is true if holding a writer lock, false if holding a reader lock. + /** Not defined if not holding a lock. */ + bool is_writer; + }; + +private: + typedef uintptr_t state_t; + static const state_t WRITER = 1; + static const state_t WRITER_PENDING = 2; + static const state_t READERS = ~(WRITER | WRITER_PENDING); + static const state_t ONE_READER = 4; + static const state_t BUSY = WRITER | READERS; + /** Bit 0 = writer is holding lock + Bit 1 = request by a writer to acquire lock (hint to readers to wait) + Bit 2..N = number of readers holding lock */ + volatile state_t state; +}; + +} // namespace tbb + +#endif /* __TBB_spin_rw_mutex_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/task_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/task_v2.cpp new file mode 100644 index 0000000000..42d5f8509c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/task_v2.cpp @@ -0,0 +1,46 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* This compilation unit provides definition of task::destroy( task& ) + that is binary compatible with TBB 2.x. In TBB 3.0, the method became + static, and its name decoration changed, though the definition remained. + + The macro switch should be set prior to including task.h + or any TBB file that might bring task.h up. +*/ +#define __TBB_DEPRECATED_TASK_INTERFACE 1 +#include "tbb/task.h" + +namespace tbb { + +void task::destroy( task& victim ) { + // Forward to static version + task_base::destroy( victim ); +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_queue_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_queue_v2.cpp new file mode 100644 index 0000000000..64127ba253 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_queue_v2.cpp @@ -0,0 +1,356 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/concurrent_queue.h" +#include "tbb/atomic.h" +#include "tbb/tick_count.h" + +#include "../test/harness_assert.h" +#include "../test/harness.h" + +static tbb::atomic FooConstructed; +static tbb::atomic FooDestroyed; + +class Foo { + enum state_t{ + LIVE=0x1234, + DEAD=0xDEAD + }; + state_t state; +public: + int thread_id; + int serial; + Foo() : state(LIVE) { + ++FooConstructed; + } + Foo( const Foo& item ) : state(LIVE) { + ASSERT( item.state==LIVE, NULL ); + ++FooConstructed; + thread_id = item.thread_id; + serial = item.serial; + } + ~Foo() { + ASSERT( state==LIVE, NULL ); + ++FooDestroyed; + state=DEAD; + thread_id=0xDEAD; + serial=0xDEAD; + } + void operator=( Foo& item ) { + ASSERT( item.state==LIVE, NULL ); + ASSERT( state==LIVE, NULL ); + thread_id = item.thread_id; + serial = item.serial; + } + bool is_const() {return false;} + bool is_const() const {return true;} +}; + +const size_t MAXTHREAD = 256; + +static int Sum[MAXTHREAD]; + +//! Count of various pop operations +/** [0] = pop_if_present that failed + [1] = pop_if_present that succeeded + [2] = pop */ +static tbb::atomic PopKind[3]; + +const int M = 10000; + +struct Body: NoAssign { + tbb::concurrent_queue* queue; + const int nthread; + Body( int nthread_ ) : nthread(nthread_) {} + void operator()( long thread_id ) const { + long pop_kind[3] = {0,0,0}; + int serial[MAXTHREAD+1]; + memset( serial, 0, nthread*sizeof(unsigned) ); + ASSERT( thread_idpop_if_present(f); + ++pop_kind[prepopped]; + } + Foo g; + g.thread_id = thread_id; + g.serial = j+1; + queue->push( g ); + if( !prepopped ) { + queue->pop(f); + ++pop_kind[2]; + } + ASSERT( f.thread_id<=nthread, NULL ); + ASSERT( f.thread_id==nthread || serial[f.thread_id]0, "nthread must be positive" ); + if( prefill+1>=capacity ) + return; + bool success = false; + for( int k=0; k<3; ++k ) + PopKind[k] = 0; + for( int trial=0; !success; ++trial ) { + FooConstructed = 0; + FooDestroyed = 0; + Body body(nthread); + tbb::concurrent_queue queue; + queue.set_capacity( capacity ); + body.queue = &queue; + for( int i=0; i=0; ) { + ASSERT( !queue.empty(), NULL ); + Foo f; + queue.pop(f); + ASSERT( queue.size()==i, NULL ); + sum += f.serial-1; + } + ASSERT( queue.empty(), NULL ); + ASSERT( queue.size()==0, NULL ); + if( sum!=expected ) + printf("sum=%d expected=%d\n",sum,expected); + ASSERT( FooConstructed==FooDestroyed, NULL ); + + success = true; + if( nthread>1 && prefill==0 ) { + // Check that pop_if_present got sufficient exercise + for( int k=0; k<2; ++k ) { +#if (_WIN32||_WIN64) + // The TBB library on Windows seems to have a tough time generating + // the desired interleavings for pop_if_present, so the code tries longer, and settles + // for fewer desired interleavings. + const int max_trial = 100; + const int min_requirement = 20; +#else + const int min_requirement = 100; + const int max_trial = 20; +#endif /* _WIN32||_WIN64 */ + if( PopKind[k]=max_trial ) { + if( Verbose ) + printf("Warning: %d threads had only %ld pop_if_present operations %s after %d trials (expected at least %d). " + "This problem may merely be unlucky scheduling. " + "Investigate only if it happens repeatedly.\n", + nthread, long(PopKind[k]), k==0?"failed":"succeeded", max_trial, min_requirement); + else + printf("Warning: the number of %s pop_if_present operations is less than expected for %d threads. Investigate if it happens repeatedly.\n", + k==0?"failed":"succeeded", nthread ); + } else { + success = false; + } + } + } + } + } +} + +template +void TestIteratorAux( Iterator1 i, Iterator2 j, int size ) { + // Now test iteration + Iterator1 old_i; + for( int k=0; k" + ASSERT( k+2==i->serial, NULL ); + } + // Test assignment + old_i = i; + } + ASSERT( k+1==f.serial, NULL ); + } + ASSERT( !(i!=j), NULL ); + ASSERT( i==j, NULL ); +} + +template +void TestIteratorAssignment( Iterator2 j ) { + Iterator1 i(j); + ASSERT( i==j, NULL ); + ASSERT( !(i!=j), NULL ); + Iterator1 k; + k = j; + ASSERT( k==j, NULL ); + ASSERT( !(k!=j), NULL ); +} + +//! Test the iterators for concurrent_queue +void TestIterator() { + tbb::concurrent_queue queue; + tbb::concurrent_queue& const_queue = queue; + for( int j=0; j<500; ++j ) { + TestIteratorAux( queue.begin(), queue.end(), j ); + TestIteratorAux( const_queue.begin(), const_queue.end(), j ); + TestIteratorAux( const_queue.begin(), queue.end(), j ); + TestIteratorAux( queue.begin(), const_queue.end(), j ); + Foo f; + f.serial = j+1; + queue.push(f); + } + TestIteratorAssignment::const_iterator>( const_queue.begin() ); + TestIteratorAssignment::const_iterator>( queue.begin() ); + TestIteratorAssignment:: iterator>( queue.begin() ); +} + +void TestConcurrentQueueType() { + AssertSameType( tbb::concurrent_queue::value_type(), Foo() ); + Foo f; + const Foo g; + tbb::concurrent_queue::reference r = f; + ASSERT( &r==&f, NULL ); + ASSERT( !r.is_const(), NULL ); + tbb::concurrent_queue::const_reference cr = g; + ASSERT( &cr==&g, NULL ); + ASSERT( cr.is_const(), NULL ); +} + +template +void TestEmptyQueue() { + const tbb::concurrent_queue queue; + ASSERT( queue.size()==0, NULL ); + ASSERT( queue.capacity()>0, NULL ); + ASSERT( size_t(queue.capacity())>=size_t(-1)/(sizeof(void*)+sizeof(T)), NULL ); +} + +void TestFullQueue() { + for( int n=0; n<10; ++n ) { + FooConstructed = 0; + FooDestroyed = 0; + tbb::concurrent_queue queue; + queue.set_capacity(n); + for( int i=0; i<=n; ++i ) { + Foo f; + f.serial = i; + bool result = queue.push_if_not_full( f ); + ASSERT( result==(i +struct TestNegativeQueueBody: NoAssign { + tbb::concurrent_queue& queue; + const int nthread; + TestNegativeQueueBody( tbb::concurrent_queue& q, int n ) : queue(q), nthread(n) {} + void operator()( int k ) const { + if( k==0 ) { + int number_of_pops = nthread-1; + // Wait for all pops to pend. + while( queue.size()>-number_of_pops ) { + __TBB_Yield(); + } + for( int i=0; ; ++i ) { + ASSERT( queue.size()==i-number_of_pops, NULL ); + ASSERT( queue.empty()==(queue.size()<=0), NULL ); + if( i==number_of_pops ) break; + // Satisfy another pop + queue.push( T() ); + } + } else { + // Pop item from queue + T item; + queue.pop(item); + } + } +}; + +//! Test a queue with a negative size. +template +void TestNegativeQueue( int nthread ) { + tbb::concurrent_queue queue; + NativeParallelFor( nthread, TestNegativeQueueBody(queue,nthread) ); +} + +int TestMain () { + TestEmptyQueue(); + TestEmptyQueue(); + TestFullQueue(); + TestConcurrentQueueType(); + TestIterator(); + + // Test concurrent operations + for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { + TestNegativeQueue(nthread); + for( int prefill=0; prefill<64; prefill+=(1+prefill/3) ) { + TestPushPop(prefill,ptrdiff_t(-1),nthread); + TestPushPop(prefill,ptrdiff_t(1),nthread); + TestPushPop(prefill,ptrdiff_t(2),nthread); + TestPushPop(prefill,ptrdiff_t(10),nthread); + TestPushPop(prefill,ptrdiff_t(100),nthread); + } + } + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_vector_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_vector_v2.cpp new file mode 100644 index 0000000000..41203b197d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/test_concurrent_vector_v2.cpp @@ -0,0 +1,566 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "concurrent_vector_v2.h" +#include +#include +#include "../test/harness_assert.h" + +tbb::atomic FooCount; + +//! Problem size +const size_t N = 500000; + +struct Foo { + int my_bar; +public: + enum State { + DefaultInitialized=0x1234, + CopyInitialized=0x89ab, + Destroyed=0x5678 + } state; + int& bar() { + ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL ); + return my_bar; + } + int bar() const { + ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL ); + return my_bar; + } + static const int initial_value_of_bar = 42; + Foo() { + state = DefaultInitialized; + ++FooCount; + my_bar = initial_value_of_bar; + } + Foo( const Foo& foo ) { + state = CopyInitialized; + ++FooCount; + my_bar = foo.my_bar; + } + ~Foo() { + ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL ); + state = Destroyed; + my_bar = ~initial_value_of_bar; + --FooCount; + } + bool is_const() const {return true;} + bool is_const() {return false;} +}; + +class FooWithAssign: public Foo { +public: + void operator=( const FooWithAssign& x ) { + ASSERT( x.state==DefaultInitialized||x.state==CopyInitialized, NULL ); + ASSERT( state==DefaultInitialized||state==CopyInitialized, NULL ); + my_bar = x.my_bar; + } +}; + +inline void NextSize( int& s ) { + if( s<=32 ) ++s; + else s += s/10; +} + +static void CheckVector( const tbb::concurrent_vector& cv, size_t expected_size, size_t old_size ) { + ASSERT( cv.size()==expected_size, NULL ); + ASSERT( cv.empty()==(expected_size==0), NULL ); + for( int j=0; j vector_t; + for( int old_size=0; old_size<=128; NextSize( old_size ) ) { + for( int new_size=old_size; new_size<=128; NextSize( new_size ) ) { + long count = FooCount; + vector_t v; + ASSERT( count==FooCount, NULL ); + v.grow_by(old_size); + ASSERT( count+old_size==FooCount, NULL ); + for( int j=0; j vector_t; + vector_t v; + v.reserve( old_size ); + ASSERT( v.capacity()>=old_size, NULL ); + v.reserve( new_size ); + ASSERT( v.capacity()>=old_size, NULL ); + ASSERT( v.capacity()>=new_size, NULL ); + for( size_t i=0; i<2*new_size; ++i ) { + ASSERT( size_t(FooCount)==count+i, NULL ); + size_t j = v.grow_by(1); + ASSERT( j==i, NULL ); + } + } + ASSERT( FooCount==count, NULL ); + } + } +} + +struct AssignElement { + typedef tbb::concurrent_vector::range_type::iterator iterator; + iterator base; + void operator()( const tbb::concurrent_vector::range_type& range ) const { + for( iterator i=range.begin(); i!=range.end(); ++i ) { + if( *i!=0 ) + std::printf("ERROR for v[%ld]\n", long(i-base)); + *i = int(i-base); + } + } + AssignElement( iterator base_ ) : base(base_) {} +}; + +struct CheckElement { + typedef tbb::concurrent_vector::const_range_type::iterator iterator; + iterator base; + void operator()( const tbb::concurrent_vector::const_range_type& range ) const { + for( iterator i=range.begin(); i!=range.end(); ++i ) + if( *i != int(i-base) ) + std::printf("ERROR for v[%ld]\n", long(i-base)); + } + CheckElement( iterator base_ ) : base(base_) {} +}; + +#include "tbb/tick_count.h" +#include "tbb/parallel_for.h" +#include "../test/harness.h" + +//! Test parallel access by iterators +void TestParallelFor( int nthread ) { + typedef tbb::concurrent_vector vector_t; + vector_t v; + v.grow_to_at_least(N); + tbb::tick_count t0 = tbb::tick_count::now(); + if( Verbose ) + std::printf("Calling parallel_for.h with %ld threads\n",long(nthread)); + tbb::parallel_for( v.range(10000), AssignElement(v.begin()) ); + tbb::tick_count t1 = tbb::tick_count::now(); + const vector_t& u = v; + tbb::parallel_for( u.range(10000), CheckElement(u.begin()) ); + tbb::tick_count t2 = tbb::tick_count::now(); + if( Verbose ) + std::printf("Time for parallel_for.h: assign time = %8.5f, check time = %8.5f\n", + (t1-t0).seconds(),(t2-t1).seconds()); + for( long i=0; size_t(i) +void TestIteratorAssignment( Iterator2 j ) { + Iterator1 i(j); + ASSERT( i==j, NULL ); + ASSERT( !(i!=j), NULL ); + Iterator1 k; + k = j; + ASSERT( k==j, NULL ); + ASSERT( !(k!=j), NULL ); +} + +template +void TestIteratorTraits() { + AssertSameType( static_cast(0), static_cast(0) ); + AssertSameType( static_cast(0), static_cast(0) ); + AssertSameType( static_cast(0), static_cast(0) ); + AssertSameType( static_cast(0), static_cast(0) ); + T x; + typename Iterator::reference xr = x; + typename Iterator::pointer xp = &x; + ASSERT( &xr==xp, NULL ); +} + +template +void CheckConstIterator( const Vector& u, int i, const Iterator& cp ) { + typename Vector::const_reference pref = *cp; + if( pref.bar()!=i ) + std::printf("ERROR for u[%ld] using const_iterator\n", long(i)); + typename Vector::difference_type delta = cp-u.begin(); + ASSERT( delta==i, NULL ); + if( u[i].bar()!=i ) + std::printf("ERROR for u[%ld] using subscripting\n", long(i)); + ASSERT( u.begin()[i].bar()==i, NULL ); +} + +template +void CheckIteratorComparison( V& u ) { + Iterator1 i = u.begin(); + for( int i_count=0; i_count<100; ++i_count ) { + Iterator2 j = u.begin(); + for( int j_count=0; j_count<100; ++j_count ) { + ASSERT( (i==j)==(i_count==j_count), NULL ); + ASSERT( (i!=j)==(i_count!=j_count), NULL ); + ASSERT( (i-j)==(i_count-j_count), NULL ); + ASSERT( (ij)==(i_count>j_count), NULL ); + ASSERT( (i<=j)==(i_count<=j_count), NULL ); + ASSERT( (i>=j)==(i_count>=j_count), NULL ); + ++j; + } + ++i; + } +} + +//! Test sequential iterators for vector type V. +/** Also does timing. */ +template +void TestSequentialFor() { + V v; + v.grow_by(N); + + // Check iterator + tbb::tick_count t0 = tbb::tick_count::now(); + typename V::iterator p = v.begin(); + ASSERT( !(*p).is_const(), NULL ); + ASSERT( !p->is_const(), NULL ); + for( int i=0; size_t(i)is_const(), NULL ); + for( int i=0; size_t(i)0; ) { + --i; + --cp; + if( i>0 ) { + typename V::const_iterator cp_old = cp--; + int here = (*cp_old).bar(); + ASSERT( here==u[i].bar(), NULL ); + typename V::const_iterator cp_new = cp++; + int prev = (*cp_new).bar(); + ASSERT( prev==u[i-1].bar(), NULL ); + } + CheckConstIterator(u,i,cp); + } + + // Now go forwards and backwards + cp = u.begin(); + ptrdiff_t k = 0; + for( size_t i=0; i(v); + CheckIteratorComparison(v); + CheckIteratorComparison(v); + CheckIteratorComparison(v); + + TestIteratorAssignment( u.begin() ); + TestIteratorAssignment( v.begin() ); + TestIteratorAssignment( v.begin() ); + + // Check reverse_iterator + typename V::reverse_iterator rp = v.rbegin(); + for( size_t i=v.size(); i>0; --i, ++rp ) { + typename V::reference pref = *rp; + ASSERT( size_t(pref.bar())==i-1, NULL ); + ASSERT( rp!=v.rend(), NULL ); + } + ASSERT( rp==v.rend(), NULL ); + + // Check const_reverse_iterator + typename V::const_reverse_iterator crp = u.rbegin(); + for( size_t i=v.size(); i>0; --i, ++crp ) { + typename V::const_reference cpref = *crp; + ASSERT( size_t(cpref.bar())==i-1, NULL ); + ASSERT( crp!=u.rend(), NULL ); + } + ASSERT( crp==u.rend(), NULL ); + + TestIteratorAssignment( u.rbegin() ); + TestIteratorAssignment( v.rbegin() ); +} + +static const size_t Modulus = 7; + +typedef tbb::concurrent_vector MyVector; + +class GrowToAtLeast { + MyVector& my_vector; +public: + void operator()( const tbb::blocked_range& range ) const { + for( size_t i=range.begin(); i!=range.end(); ++i ) { + size_t n = my_vector.size(); + size_t k = n==0 ? 0 : i % (2*n+1); + my_vector.grow_to_at_least(k+1); + ASSERT( my_vector.size()>=k+1, NULL ); + } + } + GrowToAtLeast( MyVector& vector ) : my_vector(vector) {} +}; + +void TestConcurrentGrowToAtLeast() { + MyVector v; + for( size_t s=1; s<1000; s*=10 ) { + tbb::parallel_for( tbb::blocked_range(0,1000000,100), GrowToAtLeast(v) ); + } +} + +//! Test concurrent invocations of method concurrent_vector::grow_by +class GrowBy { + MyVector& my_vector; +public: + void operator()( const tbb::blocked_range& range ) const { + for( int i=range.begin(); i!=range.end(); ++i ) { + if( i%3 ) { + Foo& element = my_vector[my_vector.grow_by(1)]; + element.bar() = i; + } else { + Foo f; + f.bar() = i; + size_t k = my_vector.push_back( f ); + ASSERT( my_vector[k].bar()==i, NULL ); + } + } + } + GrowBy( MyVector& vector ) : my_vector(vector) {} +}; + +//! Test concurrent invocations of method concurrent_vector::grow_by +void TestConcurrentGrowBy( int nthread ) { + int m = 100000; + MyVector v; + tbb::parallel_for( tbb::blocked_range(0,m,1000), GrowBy(v) ); + ASSERT( v.size()==size_t(m), NULL ); + + // Verify that v is a permutation of 0..m + int inversions = 0; + bool* found = new bool[m]; + memset( found, 0, m ); + for( int i=0; i0 ) + inversions += v[i].bar()1 || v[i].bar()==i, "sequential execution is wrong" ); + } + delete[] found; + if( nthread>1 && inversions vector_t; + for( int dst_size=1; dst_size<=128; NextSize( dst_size ) ) { + for( int src_size=2; src_size<=128; NextSize( src_size ) ) { + vector_t u; + u.grow_to_at_least(src_size); + for( int i=0; i + +typedef unsigned long Number; + +static tbb::concurrent_vector Primes; + +class FindPrimes { + bool is_prime( Number val ) const { + int limit, factor = 3; + if( val<5u ) + return val==2; + else { + limit = long(sqrtf(float(val))+0.5f); + while( factor<=limit && val % factor ) + ++factor; + return factor>limit; + } + } +public: + void operator()( const tbb::blocked_range& r ) const { + for( Number i=r.begin(); i!=r.end(); ++i ) { + if( i%2 && is_prime(i) ) { + Primes[Primes.grow_by(1)] = i; + } + } + } +}; + +static double TimeFindPrimes( int nthread ) { + Primes.clear(); + tbb::task_scheduler_init init(nthread); + tbb::tick_count t0 = tbb::tick_count::now(); + tbb::parallel_for( tbb::blocked_range(0,1000000,500), FindPrimes() ); + tbb::tick_count t1 = tbb::tick_count::now(); + return (t1-t0).seconds(); +} + +static void TestFindPrimes() { + // Time fully subscribed run. + double t2 = TimeFindPrimes( tbb::task_scheduler_init::automatic ); + + // Time parallel run that is very likely oversubscribed. + double t128 = TimeFindPrimes(128); + + if( Verbose ) + std::printf("TestFindPrimes: t2==%g t128=%g\n", t2, t128 ); + + // We allow the 128-thread run a little extra time to allow for thread overhead. + // Theoretically, following test will fail on machine with >128 processors. + // But that situation is not going to come up in the near future, + // and the generalization to fix the issue is not worth the trouble. + if( t128>1.10*t2 ) { + std::printf("Warning: grow_by is pathetically slow: t2==%g t128=%g\n", t2, t128); + } +} + +//------------------------------------------------------------------------ +// Test compatibility with STL sort. +//------------------------------------------------------------------------ + +#include + +void TestSort() { + for( int n=1; n<100; n*=3 ) { + tbb::concurrent_vector array; + array.grow_by( n ); + for( int i=0; i::iterator,Foo>(); + TestIteratorTraits::const_iterator,const Foo>(); + TestSequentialFor > (); + TestResizeAndCopy(); + TestAssign(); + TestCapacity(); + for( int nthread=MinThread; nthread<=MaxThread; ++nthread ) { + tbb::task_scheduler_init init( nthread ); + TestParallelFor( nthread ); + TestConcurrentGrowToAtLeast(); + TestConcurrentGrowBy( nthread ); + } + TestFindPrimes(); + TestSort(); + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/test_mutex_v2.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/test_mutex_v2.cpp new file mode 100644 index 0000000000..b66532fa5f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/test_mutex_v2.cpp @@ -0,0 +1,249 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +//------------------------------------------------------------------------ +// Test TBB mutexes when used with parallel_for.h +// +// Usage: test_Mutex.exe [-v] nthread +// +// The -v option causes timing information to be printed. +// +// Compile with _OPENMP and -openmp +//------------------------------------------------------------------------ +#include "../test/harness_defs.h" +#include "tbb/atomic.h" +#include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" +#include "tbb/tick_count.h" +#include "../test/harness.h" +#include "spin_rw_mutex_v2.h" +#include +#include + +// This test deliberately avoids a "using tbb" statement, +// so that the error of putting types in the wrong namespace will be caught. + +template +struct Counter { + typedef M mutex_type; + M mutex; + volatile long value; +}; + +//! Function object for use with parallel_for.h. +template +struct AddOne: NoAssign { + C& counter; + /** Increments counter once for each iteration in the iteration space. */ + void operator()( tbb::blocked_range& range ) const { + for( size_t i=range.begin(); i!=range.end(); ++i ) { + if( i&1 ) { + // Try implicit acquire and explicit release + typename C::mutex_type::scoped_lock lock(counter.mutex); + counter.value = counter.value+1; + lock.release(); + } else { + // Try explicit acquire and implicit release + typename C::mutex_type::scoped_lock lock; + lock.acquire(counter.mutex); + counter.value = counter.value+1; + } + } + } + AddOne( C& counter_ ) : counter(counter_) {} +}; + +//! Generic test of a TBB mutex type M. +/** Does not test features specific to reader-writer locks. */ +template +void Test( const char * name ) { + if( Verbose ) { + printf("%s time = ",name); + fflush(stdout); + } + Counter counter; + counter.value = 0; + const int n = 100000; + tbb::tick_count t0 = tbb::tick_count::now(); + tbb::parallel_for(tbb::blocked_range(0,n,n/10),AddOne >(counter)); + tbb::tick_count t1 = tbb::tick_count::now(); + if( Verbose ) + printf("%g usec\n",(t1-t0).seconds()); + if( counter.value!=n ) + printf("ERROR for %s: counter.value=%ld\n",name,counter.value); +} + +template +struct Invariant { + typedef M mutex_type; + M mutex; + const char* mutex_name; + volatile long value[N]; + volatile long single_value; + Invariant( const char* mutex_name_ ) : + mutex_name(mutex_name_) + { + single_value = 0; + for( size_t k=0; k +struct TwiddleInvariant: NoAssign { + I& invariant; + TwiddleInvariant( I& invariant_ ) : invariant(invariant_) {} + + /** Increments counter once for each iteration in the iteration space. */ + void operator()( tbb::blocked_range& range ) const { + for( size_t i=range.begin(); i!=range.end(); ++i ) { + //! Every 8th access is a write access + const bool write = (i%8)==7; + bool okay = true; + bool lock_kept = true; + if( (i/8)&1 ) { + // Try implicit acquire and explicit release + typename I::mutex_type::scoped_lock lock(invariant.mutex,write); + execute_aux(lock, i, write, okay, lock_kept); + lock.release(); + } else { + // Try explicit acquire and implicit release + typename I::mutex_type::scoped_lock lock; + lock.acquire(invariant.mutex,write); + execute_aux(lock, i, write, okay, lock_kept); + } + if( !okay ) { + printf( "ERROR for %s at %ld: %s %s %s %s\n",invariant.mutex_name, long(i), + write ? "write," : "read,", + write ? (i%16==7?"downgrade,":"") : (i%8==3?"upgrade,":""), + lock_kept ? "lock kept," : "lock not kept,", // TODO: only if downgrade/upgrade + (i/8)&1 ? "impl/expl" : "expl/impl" ); + } + } + } +private: + void execute_aux(typename I::mutex_type::scoped_lock & lock, const size_t i, const bool write, bool & okay, bool & lock_kept) const { + if( write ) { + long my_value = invariant.value[0]; + invariant.update(); + if( i%16==7 ) { + lock_kept = lock.downgrade_to_reader(); + if( !lock_kept ) + my_value = invariant.value[0] - 1; + okay = invariant.value_is(my_value+1); + } + } else { + okay = invariant.is_okay(); + if( i%8==3 ) { + long my_value = invariant.value[0]; + lock_kept = lock.upgrade_to_writer(); + if( !lock_kept ) + my_value = invariant.value[0]; + invariant.update(); + okay = invariant.value_is(my_value+1); + } + } + } +}; + +/** This test is generic so that we can test any other kinds of ReaderWriter locks we write later. */ +template +void TestReaderWriterLock( const char * mutex_name ) { + if( Verbose ) { + printf("%s readers & writers time = ",mutex_name); + fflush(stdout); + } + Invariant invariant(mutex_name); + const size_t n = 500000; + tbb::tick_count t0 = tbb::tick_count::now(); + tbb::parallel_for(tbb::blocked_range(0,n,n/100),TwiddleInvariant >(invariant)); + tbb::tick_count t1 = tbb::tick_count::now(); + // There is either a writer or a reader upgraded to a writer for each 4th iteration + long expected_value = n/4; + if( !invariant.value_is(expected_value) ) + printf("ERROR for %s: final invariant value is wrong\n",mutex_name); + if( Verbose ) + printf("%g usec\n", (t1-t0).seconds()); +} + +/** Test try_acquire functionality of a non-reenterable mutex */ +template +void TestTryAcquire_OneThread( const char * mutex_name ) { + M tested_mutex; + typename M::scoped_lock lock1; + if( lock1.try_acquire(tested_mutex) ) + lock1.release(); + else + printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name); + { + typename M::scoped_lock lock2(tested_mutex); + if( lock1.try_acquire(tested_mutex) ) + printf("ERROR for %s: try_acquire succeeded though it should not\n", mutex_name); + } + if( lock1.try_acquire(tested_mutex) ) + lock1.release(); + else + printf("ERROR for %s: try_acquire failed though it should not\n", mutex_name); +} + +#include "tbb/task_scheduler_init.h" + +int TestMain () { + for( int p=MinThread; p<=MaxThread; ++p ) { + tbb::task_scheduler_init init( p ); + if( Verbose ) + printf( "testing with %d workers\n", static_cast(p) ); + const int n = 3; + // Run each test several times. + for( int i=0; i( "Spin RW Mutex" ); + TestTryAcquire_OneThread("Spin RW Mutex"); // only tests try_acquire for writers + TestReaderWriterLock( "Spin RW Mutex" ); + } + if( Verbose ) + printf( "calling destructor for task_scheduler_init\n" ); + } + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/old/test_task_scheduler_observer_v3.cpp b/deal.II/bundled/tbb41_20130401oss/src/old/test_task_scheduler_observer_v3.cpp new file mode 100644 index 0000000000..5c994e3dc1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/old/test_task_scheduler_observer_v3.cpp @@ -0,0 +1,129 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +//TODO: when removing TBB_PREVIEW_LOCAL_OBSERVER, change the header or defines here +#include "tbb/task_scheduler_observer.h" + +typedef uintptr_t FlagType; +const int MaxFlagIndex = sizeof(FlagType)*8-1; + +class MyObserver: public tbb::task_scheduler_observer { + FlagType flags; + /*override*/ void on_scheduler_entry( bool is_worker ); + /*override*/ void on_scheduler_exit( bool is_worker ); +public: + MyObserver( FlagType flags_ ) : flags(flags_) { + observe(true); + } +}; + +#include "harness_assert.h" +#include "tbb/atomic.h" + +tbb::atomic EntryCount; +tbb::atomic ExitCount; + +struct State { + FlagType MyFlags; + bool IsMaster; + State() : MyFlags(), IsMaster() {} +}; + +#include "../tbb/tls.h" +tbb::internal::tls LocalState; + +void MyObserver::on_scheduler_entry( bool is_worker ) { + State& state = *LocalState; + ASSERT( is_worker==!state.IsMaster, NULL ); + ++EntryCount; + state.MyFlags |= flags; +} + +void MyObserver::on_scheduler_exit( bool is_worker ) { + State& state = *LocalState; + ASSERT( is_worker==!state.IsMaster, NULL ); + ++ExitCount; + state.MyFlags &= ~flags; +} + +#include "tbb/task.h" + +class FibTask: public tbb::task { + const int n; + FlagType flags; +public: + FibTask( int n_, FlagType flags_ ) : n(n_), flags(flags_) {} + /*override*/ tbb::task* execute() { + ASSERT( !(~LocalState->MyFlags & flags), NULL ); + if( n>=2 ) { + set_ref_count(3); + spawn(*new( allocate_child() ) FibTask(n-1,flags)); + spawn_and_wait_for_all(*new( allocate_child() ) FibTask(n-2,flags)); + } + return NULL; + } +}; + +void DoFib( FlagType flags ) { + tbb::task* t = new( tbb::task::allocate_root() ) FibTask(10,flags); + tbb::task::spawn_root_and_wait(*t); +} + +#include "tbb/task_scheduler_init.h" +#include "harness.h" + +class DoTest { + int nthread; +public: + DoTest( int n ) : nthread(n) {} + void operator()( int i ) const { + LocalState->IsMaster = true; + if( i==0 ) { + tbb::task_scheduler_init init(nthread); + DoFib(0); + } else { + FlagType f = i<=MaxFlagIndex? 1<0, "on_scheduler_entry not exercised" ); + ASSERT( ExitCount>0, "on_scheduler_exit not exercised" ); + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/coarse_grained_raii_lru_cache.h b/deal.II/bundled/tbb41_20130401oss/src/perf/coarse_grained_raii_lru_cache.h new file mode 100644 index 0000000000..99aff02c0a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/coarse_grained_raii_lru_cache.h @@ -0,0 +1,153 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef coarse_grained_raii_lru_cache_H +#define coarse_grained_raii_lru_cache_H + +#include +#include + +#include "tbb/spin_mutex.h" +#include "tbb/tbb_stddef.h" +template +class coarse_grained_raii_lru_cache : tbb::internal::no_assign{ + typedef value_functor_type value_function_type; + + typedef std::size_t ref_counter_type; + struct map_value_type; + typedef std::map map_storage_type; + typedef std::list lru_list_type; + struct map_value_type { + value_type my_value; + ref_counter_type my_ref_counter; + typename lru_list_type::iterator my_lru_list_iterator; + bool my_is_ready; + + map_value_type (value_type const& a_value, ref_counter_type a_ref_counter, typename lru_list_type::iterator a_lru_list_iterator, bool a_is_ready) + : my_value(a_value), my_ref_counter(a_ref_counter), my_lru_list_iterator (a_lru_list_iterator) + ,my_is_ready(a_is_ready) + {} + }; + + class handle_object; +public: + typedef handle_object handle; + + coarse_grained_raii_lru_cache(value_function_type f, std::size_t number_of_lru_history_items): my_value_function(f),my_number_of_lru_history_items(number_of_lru_history_items){} + handle_object operator[](key_type k){ + tbb::spin_mutex::scoped_lock lock(my_mutex); + bool is_new_value_needed = false; + typename map_storage_type::iterator it = my_map_storage.find(k); + if (it == my_map_storage.end()){ + it = my_map_storage.insert(it,std::make_pair(k,map_value_type(value_type(),0,my_lru_list.end(),false))); + is_new_value_needed = true; + }else { + typename lru_list_type::iterator list_it = it->second.my_lru_list_iterator; + if (list_it!=my_lru_list.end()) { + my_lru_list.erase(list_it); + it->second.my_lru_list_iterator= my_lru_list.end(); + } + } + typename map_storage_type::reference value_ref = *it; + //increase ref count + ++(value_ref.second.my_ref_counter); + if (is_new_value_needed){ + lock.release(); + value_ref.second.my_value = my_value_function(k); + __TBB_store_with_release(value_ref.second.my_is_ready, true); + + }else{ + if (!value_ref.second.my_is_ready){ + lock.release(); + tbb::internal::spin_wait_while_eq(value_ref.second.my_is_ready,false); + } + } + return handle_object(*this,(value_ref)); + } +private: + void signal_end_of_usage(typename map_storage_type::reference value_ref){ + tbb::spin_mutex::scoped_lock lock(my_mutex); + typename map_storage_type::iterator it = my_map_storage.find(value_ref.first); + __TBB_ASSERT(it!=my_map_storage.end(),"cache should not return past-end iterators to outer world"); + __TBB_ASSERT(&(*it) == &value_ref,"dangling reference has been returned to outside world? data race ?"); + __TBB_ASSERT( my_lru_list.end()== std::find(my_lru_list.begin(),my_lru_list.end(),it), + "object in use should not be in list of unused objects "); + if (! --(it->second.my_ref_counter)){ //decrease ref count, and check if it was the last reference + if (my_lru_list.size()>=my_number_of_lru_history_items){ + size_t number_of_elements_to_evict = 1 + my_lru_list.size() - my_number_of_lru_history_items; + for (size_t i=0; isecond.my_lru_list_iterator = my_lru_list.begin(); + } + } +private: + value_function_type my_value_function; + std::size_t const my_number_of_lru_history_items; + map_storage_type my_map_storage; + lru_list_type my_lru_list; + tbb::spin_mutex my_mutex; +private: + struct handle_move_t:tbb::internal::no_assign{ + coarse_grained_raii_lru_cache & my_cache_ref; + typename map_storage_type::reference my_value_ref; + handle_move_t(coarse_grained_raii_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_ref(cache_ref),my_value_ref(value_ref) {}; + }; + class handle_object { + coarse_grained_raii_lru_cache * my_cache_pointer; + typename map_storage_type::reference my_value_ref; + public: + handle_object(coarse_grained_raii_lru_cache & cache_ref, typename map_storage_type::reference value_ref):my_cache_pointer(&cache_ref), my_value_ref(value_ref) {} + handle_object(handle_move_t m):my_cache_pointer(&m.my_cache_ref), my_value_ref(m.my_value_ref){} + operator handle_move_t(){ return move(*this);} + value_type& value(){return my_value_ref.second.my_value;} + ~handle_object(){ + if (my_cache_pointer){ + my_cache_pointer->signal_end_of_usage(my_value_ref); + } + } + private: + friend handle_move_t move(handle_object& h){ + return handle_object::move(h); + } + static handle_move_t move(handle_object& h){ + __TBB_ASSERT(h.my_cache_pointer,"move from the same object twice ?"); + coarse_grained_raii_lru_cache * cache_pointer = NULL; + std::swap(cache_pointer,h.my_cache_pointer); + return handle_move_t(*cache_pointer,h.my_value_ref); + } + private: + void operator=(handle_object&); + handle_object(handle_object &); + }; +}; +#endif //coarse_grained_raii_lru_cache_H diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_pdes.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_pdes.cpp new file mode 100644 index 0000000000..b6e8aa309c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_pdes.cpp @@ -0,0 +1,239 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include +#include +#include "tbb/tbb_stddef.h" +#include "tbb/spin_mutex.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/tick_count.h" +#include "tbb/blocked_range.h" +#include "../test/harness.h" +#include "tbb/concurrent_priority_queue.h" + +#pragma warning(disable: 4996) + +#define IMPL_STL 0 +#define IMPL_CPQ 1 + +using namespace tbb; + +//const int contention = 75; // degree contention. 100 = 0 us busy_wait, 50 = 50*contention_unit us +const double contention_unit = 0.025; // in microseconds (us) +const double throughput_window = 30; // in seconds +const int num_initial_events = 10000; // number of initial events in the queue +const int min_elapse = 20; // min contention_units to elapse between event spawns +const int max_elapse = 40; // max contention_units to elapse between event spawns +const int min_spawn = 0; // min number of events to spawn +const int max_spawn = 2; // max number of events to spawn + +tbb::atomic operation_count; +tbb::tick_count start; +bool done; + +class event { +public: + int timestamp; + int elapse; + int spawn; +}; + +class timestamp_compare { +public: + bool operator()(event e1, event e2) { + return e2.timestamp, timestamp_compare > *stl_cpq; +concurrent_priority_queue *lfc_pq; + +unsigned int one_us_iters = 429; // default value + +// if user wants to calibrate to microseconds on particular machine, call this at beginning of program +// sets one_us_iters to number of iters to busy_wait for approx. 1 us +void calibrate_busy_wait() { + tbb::tick_count t0, t1; + + t0 = tbb::tick_count::now(); + for (volatile unsigned int i=0; i<1000000; ++i) continue; + t1 = tbb::tick_count::now(); + + one_us_iters = (1000000.0/(t1-t0).seconds())*0.000001; + printf("one_us_iters: %d\n", one_us_iters); +} + +void busy_wait(double us) +{ + unsigned int iter = us*one_us_iters; + for (volatile unsigned int i=0; ipush(elem); + } + else { + tbb::spin_mutex::scoped_lock myLock(*my_mutex); + stl_cpq->push(elem); + } + } + else { + lfc_pq->push(elem); + } +} + +bool do_pop(event& elem, int nThr, int impl) { + if (impl == IMPL_STL) { + if (nThr == 1) { + if (!stl_cpq->empty()) { + elem = stl_cpq->top(); + stl_cpq->pop(); + return true; + } + } + else { + tbb::spin_mutex::scoped_lock myLock(*my_mutex); + if (!stl_cpq->empty()) { + elem = stl_cpq->top(); + stl_cpq->pop(); + return true; + } + } + } + else { + if (lfc_pq->try_pop(elem)) { + return true; + } + } + return false; +} + +struct TestPDESloadBody : NoAssign { + int nThread; + int implementation; + + TestPDESloadBody(int nThread_, int implementation_) : + nThread(nThread_), implementation(implementation_) {} + + void operator()(const int threadID) const { + if (threadID == nThread) { + sleep(throughput_window); + done = true; + } + else { + event e, tmp; + unsigned int num_operations = 0; + for (;;) { + // pop an event + if (do_pop(e, nThread, implementation)) { + num_operations++; + // do the event + busy_wait(e.elapse*contention_unit); + while (e.spawn > 0) { + tmp.spawn = ((e.spawn+1-min_spawn) % ((max_spawn-min_spawn)+1))+min_spawn; + tmp.timestamp = e.timestamp + e.elapse; + e.timestamp = tmp.timestamp; + e.elapse = ((e.elapse+1-min_elapse) % ((max_elapse-min_elapse)+1))+min_elapse; + tmp.elapse = e.elapse; + do_push(tmp, nThread, implementation); + num_operations++; + e.spawn--; + busy_wait(e.elapse*contention_unit); + if (done) break; + } + } + if (done) break; + } + operation_count += num_operations; + } + } +}; + +void preload_queue(int nThr, int impl) { + event an_event; + for (int i=0; i, timestamp_compare >; + preload_queue(nThreads, IMPL_STL); + TestPDESloadBody my_stl_test(nThreads, IMPL_STL); + start = tbb::tick_count::now(); + NativeParallelFor(nThreads+1, my_stl_test); + delete stl_cpq; + + REPORT(" %10d", operation_count/throughput_window); + + operation_count = 0; + done = false; + lfc_pq = new concurrent_priority_queue; + preload_queue(nThreads, IMPL_CPQ); + TestPDESloadBody my_cpq_test(nThreads, IMPL_CPQ); + start = tbb::tick_count::now(); + NativeParallelFor(nThreads+1, my_cpq_test); + delete lfc_pq; + + REPORT(" %10d\n", operation_count/throughput_window); +} + +int TestMain() { + srand(42); + if (MinThread < 1) + MinThread = 1; + //calibrate_busy_wait(); + cache_aligned_allocator my_mutex_allocator; + my_mutex = (spin_mutex *)my_mutex_allocator.allocate(1); + + REPORT("#Thr "); + REPORT("STL "); +#ifdef LINEARIZABLE + REPORT("CPQ_L\n"); +#else + REPORT("CPQ_N\n"); +#endif + for (int p = MinThread; p <= MaxThread; ++p) { + TestPDESload(p); + } + + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_throughput_test.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_throughput_test.cpp new file mode 100644 index 0000000000..61809d04f4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/cpq_throughput_test.cpp @@ -0,0 +1,381 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define HARNESS_CUSTOM_MAIN 1 +#define HARNESS_NO_PARSE_COMMAND_LINE 1 + +#include +#include +#include +#include "tbb/tbb_stddef.h" +#include "tbb/spin_mutex.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/concurrent_priority_queue.h" +#include "../test/harness.h" +#pragma warning(disable: 4996) + +#define IMPL_SERIAL 0 +#define IMPL_STL 1 +#define IMPL_CPQ 2 + +using namespace tbb; + +// test parameters & defaults +int impl; // which implementation to test +int contention = 1; // busywork between operations in us +int preload = 0; // # elements to pre-load queue with +double throughput_window = 30.0; // in seconds +int ops_per_iteration = 20; // minimum: 2 (1 push, 1 pop) +const int sample_operations = 1000; // for timing checks +int min_threads = 1; +int max_threads; + +// global data & types +int pushes_per_iter; +int pops_per_iter; +tbb::atomic operation_count; +tbb::tick_count start; + +// a non-trivial data element to use in the priority queue +const int padding_size = 15; // change to get cache line size for test machine +class padding_type { +public: + int p[padding_size]; + padding_type& operator=(const padding_type& other) { + if (this != &other) { + for (int i=0; i, my_less > *serial_cpq; + +// Coarse-locked priority queue +spin_mutex *my_mutex; +std::priority_queue, my_less > *stl_cpq; + +// TBB concurrent_priority_queue +concurrent_priority_queue *agg_cpq; + +// Busy work and calibration helpers +unsigned int one_us_iters = 345; // default value + +// if user wants to calibrate to microseconds on particular machine, call +// this at beginning of program; sets one_us_iters to number of iters to +// busy_wait for approx. 1 us +void calibrate_busy_wait() { + tbb::tick_count t0, t1; + + t0 = tbb::tick_count::now(); + for (volatile unsigned int i=0; i<1000000; ++i) continue; + t1 = tbb::tick_count::now(); + + one_us_iters = (unsigned int)((1000000.0/(t1-t0).seconds())*0.000001); + printf("one_us_iters: %d\n", one_us_iters); +} + +void busy_wait(int us) +{ + unsigned int iter = us*one_us_iters; + for (volatile unsigned int i=0; ipush(elem); + } + else if (impl == IMPL_STL) { + tbb::spin_mutex::scoped_lock myLock(*my_mutex); + stl_cpq->push(elem); + } + else if (impl == IMPL_CPQ) { + agg_cpq->push(elem); + } +} + +// Pop from priority queue, depending on implementation +my_data_type do_pop(int nThr, int impl) { + my_data_type elem; + if (impl == IMPL_SERIAL) { + if (!serial_cpq->empty()) { + elem = serial_cpq->top(); + serial_cpq->pop(); + return elem; + } + } + else if (impl == IMPL_STL) { + tbb::spin_mutex::scoped_lock myLock(*my_mutex); + if (!stl_cpq->empty()) { + elem = stl_cpq->top(); + stl_cpq->pop(); + return elem; + } + } + else if (impl == IMPL_CPQ) { + if (agg_cpq->try_pop(elem)) { + return elem; + } + } + return elem; +} + + +struct TestThroughputBody : NoAssign { + int nThread; + int implementation; + + TestThroughputBody(int nThread_, int implementation_) : + nThread(nThread_), implementation(implementation_) {} + + void operator()(const int threadID) const { + tbb::tick_count now; + int pos_in = threadID, pos_out = threadID; + my_data_type elem; + while (1) { + for (int i=0; i= arrsz) pos_in = pos_in % arrsz; + } + // do pops + for (int j=0; j= arrsz) pos_out = pos_out % arrsz; + } + } + now = tbb::tick_count::now(); + operation_count += sample_operations; + if ((now-start).seconds() >= throughput_window) break; + } + } +}; + +void TestSerialThroughput() { + tbb::tick_count now; + + serial_cpq = new std::priority_queue, my_less >; + for (int i=0; i, my_less >; + for (int i=0; i; + for (int i=0; i[:] " + "contention(us) queue_type pre-load batch duration" + "\n where queue_type is one of 0(SERIAL), 1(STL), 2(CPQ).\n"); +} + +void ParseCommandLine(int argc, char *argv[]) { + // Initialize defaults + max_threads = 1; + impl = IMPL_SERIAL; + int i = 1; + if (argc > 1) { + // read n_thread range + char* endptr; + min_threads = strtol( argv[i], &endptr, 0 ); + if (*endptr == ':') + max_threads = strtol( endptr+1, &endptr, 0 ); + else if (*endptr == '\0') + max_threads = min_threads; + if (*endptr != '\0') { + printCommandLineErrorMsg(); + exit(1); + } + if (min_threads < 1) { + printf("ERROR: min_threads must be at least one.\n"); + exit(1); + } + if (max_threads < min_threads) { + printf("ERROR: max_threads should not be less than min_threads\n"); + exit(1); + } + ++i; + if (argc > 2) { + // read contention + contention = strtol( argv[i], &endptr, 0 ); + if( *endptr!='\0' ) { + printf("ERROR: contention is garbled\n"); + printCommandLineErrorMsg(); + exit(1); + } + ++i; + if (argc > 3) { + // read impl + impl = strtol( argv[i], &endptr, 0 ); + if( *endptr!='\0' ) { + printf("ERROR: impl is garbled\n"); + printCommandLineErrorMsg(); + exit(1); + } + if ((impl != IMPL_SERIAL) && (impl != IMPL_STL) && (impl != IMPL_CPQ)) { + + printf("ERROR: impl of %d is invalid\n", impl); + printCommandLineErrorMsg(); + exit(1); + } + ++i; + if (argc > 4) { + // read pre-load + preload = strtol( argv[i], &endptr, 0 ); + if( *endptr!='\0' ) { + printf("ERROR: pre-load is garbled\n"); + printCommandLineErrorMsg(); + exit(1); + } + ++i; + if (argc > 5) { + //read batch + ops_per_iteration = strtol( argv[i], &endptr, 0 ); + if( *endptr!='\0' ) { + printf("ERROR: batch size is garbled\n"); + printCommandLineErrorMsg(); + exit(1); + } + ++i; + if (argc > 6) { + // read duration + if (argc != 7) { + printf("ERROR: maximum of six args\n"); + printCommandLineErrorMsg(); + exit(1); + } + throughput_window = strtol( argv[i], &endptr, 0 ); + if( *endptr!='\0' ) { + printf("ERROR: duration is garbled\n"); + printCommandLineErrorMsg(); + exit(1); + } + } + } + } + } + } + } + printf("Priority queue performance test %d will run with %dus contention " + "using %d:%d threads, %d batch size, %d pre-loaded elements, for %d seconds.\n", + (int)impl, (int)contention, (int)min_threads, (int)max_threads, + (int)ops_per_iteration, (int) preload, (int)throughput_window); +} + +int main(int argc, char *argv[]) { + ParseCommandLine(argc, argv); + srand(42); + arrsz = 100000; + input_data = new my_data_type[arrsz]; + output_data = new my_data_type[arrsz]; + for (int i=0; i my_mutex_allocator; + my_mutex = (spin_mutex *)my_mutex_allocator.allocate(1); + + if (impl == IMPL_SERIAL) { + TestSerialThroughput(); + } + else { + for (int p = min_threads; p <= max_threads; ++p) { + TestThroughputCpqOnNThreads(p); + } + } + return Harness::Done; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_cutoff.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_cutoff.cpp new file mode 100644 index 0000000000..73ef1f5b0f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_cutoff.cpp @@ -0,0 +1,134 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include + +#include "tbb/task_scheduler_init.h" +#include "tbb/task.h" +#include "tbb/tick_count.h" + +long CutOff = 1; + +long SerialFib( const long n ); + +long ParallelFib( const long n ); + +inline void dump_title() { + printf("Serial/Parallel, P, N, cutoff, repetitions, time, fib, speedup\n"); +} + +inline void output(int P, long n, long c, int T, double serial_elapsed, double elapsed, long result) { + printf("%s, %d, %ld, %ld, %d, %g, %ld, %g\n", ( (P == 0) ? "Serial" : "Parallel" ), P, n, c, T, elapsed, result, serial_elapsed / elapsed); +} + +#define MOVE_BY_FOURTHS 1 +inline long calculate_new_cutoff(const long lo, const long hi) { +#if MOVE_BY_FOURTHS + return lo + (3 + hi - lo ) / 4; +#else + return (hi + lo)/2; +#endif +} + +void find_cutoff(const int P, const long n, const int T, const double serial_elapsed) { + long lo = 1, hi = n; + double elapsed = 0, lo_elapsed = 0, hi_elapsed = 0; + long final_cutoff = -1; + + tbb::task_scheduler_init init(P); + + while(true) { + CutOff = calculate_new_cutoff(lo, hi); + long result = 0; + tbb::tick_count t0; + for (int t = -1; t < T; ++t) { + if (t == 0) t0 = tbb::tick_count::now(); + result += ParallelFib(n); + } + elapsed = (tbb::tick_count::now() - t0).seconds(); + output(P,n,CutOff,T,serial_elapsed,elapsed,result); + + if (serial_elapsed / elapsed >= P/2.0) { + final_cutoff = CutOff; + if (hi == CutOff) { + if (hi == lo) { + // we have had this value at both above and below 50% + lo = 1; lo_elapsed = 0; + } else { + break; + } + } + hi = CutOff; + hi_elapsed = elapsed; + } else { + if (lo == CutOff) break; + lo = CutOff; + lo_elapsed = elapsed; + } + } + + double interpolated_cutoff = lo + ( P/2.0 - serial_elapsed/lo_elapsed ) * ( (hi - lo) / ( serial_elapsed/hi_elapsed - serial_elapsed/lo_elapsed )); + + if (final_cutoff != -1) { + printf("50%% efficiency cutoff is %ld ( linearly interpolated cutoff is %g )\n", final_cutoff, interpolated_cutoff); + } else { + printf("Cannot achieve 50%% efficiency\n"); + } + + return; +} + +int main(int argc, char *argv[]) { + if (argc < 4) { + printf("Usage: %s threads n repetitions\n",argv[0]); + return 1; + } + + dump_title(); + + int P = atoi(argv[1]); + long n = atol(argv[2]); + int T = atoi(argv[3]); + + // collect serial time + long serial_result = 0; + tbb::tick_count t0; + for (int t = -1; t < T; ++t) { + if (t == 0) t0 = tbb::tick_count::now(); + serial_result += SerialFib(n); + } + double serial_elapsed = (tbb::tick_count::now() - t0).seconds(); + output(0,n,0,T,serial_elapsed,serial_elapsed,serial_result); + + // perform search + find_cutoff(P,n,T,serial_elapsed); + + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_impl_tbb.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_impl_tbb.cpp new file mode 100644 index 0000000000..50bab0bda3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/fibonacci_impl_tbb.cpp @@ -0,0 +1,86 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include +#include + +#include "tbb/task_scheduler_init.h" +#include "tbb/task.h" +#include "tbb/tick_count.h" + +extern long CutOff; + +long SerialFib( const long n ) { + if( n<2 ) + return n; + else + return SerialFib(n-1)+SerialFib(n-2); +} + +struct FibContinuation: public tbb::task { + long* const sum; + long x, y; + FibContinuation( long* sum_ ) : sum(sum_) {} + tbb::task* execute() { + *sum = x+y; + return NULL; + } +}; + +struct FibTask: public tbb::task { + long n; + long * sum; + FibTask( const long n_, long * const sum_ ) : + n(n_), sum(sum_) + {} + tbb::task* execute() { + if( n +#include +#include +#include +#include + +#include "tbb/tick_count.h" + +#define HARNESS_CUSTOM_MAIN 1 +#include "../src/test/harness.h" +#include "../src/test/harness_barrier.h" + +#include "tbb/task_scheduler_init.h" +#include "tbb/task.h" +#include "tbb/atomic.h" + +#if __linux__ || __APPLE__ || __FreeBSD__ || __NetBSD__ + #include +#endif + +__TBB_PERF_API int NumCpus = tbb::task_scheduler_init::default_num_threads(), + NumThreads, + MaxConcurrency; + +namespace Perf { + +SessionSettings theSettings; + +namespace internal { + + typedef std::vector durations_t; + + static uintptr_t NumRuns = 7; + static duration_t RunDuration = 0.01; + + static const int RateFieldLen = 10; + static const int OvhdFieldLen = 12; + + const char* TestNameColumnTitle = "Test name"; + const char* WorkloadNameColumnTitle = "Workload"; + + size_t TitleFieldLen = 0; + size_t WorkloadFieldLen = 0; + + int TotalConfigs = 0; + int MaxTbbMasters = 1; + + //! Defines the mapping between threads and cores in the undersubscription mode + /** When adding new enumerator, insert it before amLast, and do not specify + its value explicitly. **/ + enum AffinitizationMode { + amFirst = 0, + amDense = amFirst, + amSparse, + //! Used to track the number of supported affinitization modes + amLast + }; + + static const int NumAffinitizationModes = amLast - amFirst; + + const char* AffinitizationModeNames[] = { "dense", "sparse" }; + + int NumActiveAffModes = 1; + + //! Settings of a test run configuration + struct RunConfig { + int my_maxConcurrency; + int my_numThreads; // For task scheduler tests this is number of workers + 1 + int my_numMasters; // Used for task scheduler tests only + int my_affinityMode; // Used for task scheduler tests only + int my_workloadID; + + int NumMasters () const { + return theSettings.my_opts & UseTaskScheduler ? my_numMasters : my_numThreads; + } + }; + + double StandardDeviation ( double avg, const durations_t& d ) { + double std_dev = 0; + for ( uintptr_t i = 0; i < d.size(); ++i ) { + double dev = fabs(d[i] - avg); + std_dev += dev * dev; + } + std_dev = sqrt(std_dev / d.size()); + return std_dev / avg * 100; + } + + void Statistics ( const durations_t& d, + duration_t& avgTime, double& stdDev, + duration_t& minTime, duration_t& maxTime ) + { + minTime = maxTime = avgTime = d[0]; + for ( size_t i = 1; i < d.size(); ++i ) { + avgTime += d[i]; + if ( minTime > d[i] ) + minTime = d[i]; + else if ( maxTime < d[i] ) + maxTime = d[i]; + } + avgTime = avgTime / d.size(); + stdDev = StandardDeviation( avgTime, d ); + } + + //! Timing data for the series of repeated runs and results of their statistical processing + struct TimingSeries { + //! Statistical timing series + durations_t my_durations; + + //! Average time obtained from my_durations data + duration_t my_avgTime; + + //! Minimal time obtained from my_durations data + duration_t my_minTime; + + //! Minimal time obtained from my_durations data + duration_t my_maxTime; + + //! Standard deviation of my_avgTime value (per cent) + double my_stdDev; + + TimingSeries ( uintptr_t nruns = NumRuns ) + : my_durations(nruns), my_avgTime(0), my_minTime(0), my_maxTime(0) + {} + + void CalculateStatistics () { + Statistics( my_durations, my_avgTime, my_stdDev, my_minTime, my_maxTime ); + } + }; // struct TimingSeries + + //! Settings and timing results for a test run configuration + struct RunResults { + //! Run configuration settings + RunConfig my_config; + + //! Timing results for this run configuration + TimingSeries my_timing; + }; + + typedef std::vector names_t; + typedef std::vector timings_t; + typedef std::vector test_results_t; + + enum TestMethods { + idRunSerial = 0x01, + idOnStart = 0x02, + idOnFinish = 0x04, + idPrePostProcess = idOnStart | idOnFinish + }; + + //! Set of flags identifying methods not overridden by the currently active test + /** Used as a scratch var. **/ + uintptr_t g_absentMethods; + + //! Test object and timing results for all of its configurations + struct TestResults { + //! Pointer to the test object interface + Test* my_test; + + //! Set of flags identifying optional methods overridden by my_test + /** A set of ORed TestMethods flags **/ + uintptr_t my_availableMethods; + + //! Vector of serial times for each workload supported by this test + /** Element index in the vector serves as a zero based workload ID. **/ + timings_t my_serialBaselines; + + //! Common baselines for both parallel and serial variants + /** Element index in the vector serves as a zero based workload ID. **/ + timings_t my_baselines; + + //! Strings identifying workloads to be used in output + names_t my_workloadNames; + + //! Vector of timings for all run configurations of my_test + test_results_t my_results; + + const char* my_testName; + + mutable bool my_hasOwnership; + + TestResults ( Test* t, const char* className, bool takeOwnership ) + : my_test(t), my_availableMethods(0), my_testName(className), my_hasOwnership(takeOwnership) + {} + + TestResults ( const TestResults& tr ) + : my_test(tr.my_test) + , my_availableMethods(0) + , my_testName(tr.my_testName) + , my_hasOwnership(tr.my_hasOwnership) + { + tr.my_hasOwnership = false; + } + + ~TestResults () { + for ( size_t i = 0; i < my_workloadNames.size(); ++i ) + delete my_workloadNames[i]; + if ( my_hasOwnership ) + delete my_test; + } + }; // struct TestResults + + typedef std::vector session_t; + + session_t theSession; + + TimingSeries CalibrationTiming; + + const uintptr_t CacheSize = 8*1024*1024; + volatile intptr_t W[CacheSize]; + + struct WiperBody { + void operator()( int ) const { + volatile intptr_t sink = 0; + for ( uintptr_t i = 0; i < CacheSize; ++i ) + sink += W[i]; + } + }; + + void TraceHistogram ( const durations_t& t, const char* histogramFileName ) { + FILE* f = histogramFileName ? fopen(histogramFileName, "wt") : stdout; + uintptr_t n = t.size(); + const uintptr_t num_buckets = 100; + double min_val = *std::min_element(t.begin(), t.end()), + max_val = *std::max_element(t.begin(), t.end()), + bucket_size = (max_val - min_val) / num_buckets; + std::vector hist(num_buckets + 1, 0); + for ( uintptr_t i = 0; i < n; ++i ) + ++hist[uintptr_t((t[i]-min_val)/bucket_size)]; + ASSERT (hist[num_buckets] == 1, ""); + ++hist[num_buckets - 1]; + hist.resize(num_buckets); + fprintf (f, "Histogram: nvals = %u, min = %g, max = %g, nbuckets = %u\n", (unsigned)n, min_val, max_val, (unsigned)num_buckets); + double bucket = min_val; + for ( uintptr_t i = 0; i < num_buckets; ++i, bucket+=bucket_size ) + fprintf (f, "%12g\t%u\n", bucket, (unsigned)hist[i]); + fclose(f); + } + +#if _MSC_VER + typedef DWORD_PTR cpu_set_t; + + class AffinityHelper { + static const unsigned MaxAffinitySetSize = sizeof(cpu_set_t) * 8; + static unsigned AffinitySetSize; + + //! Mapping from a CPU index to a valid affinity cpu_mask + /** The first element is not used. **/ + static cpu_set_t m_affinities[MaxAffinitySetSize + 1]; + + static cpu_set_t m_processMask; + + class Initializer { + public: + Initializer () { + SYSTEM_INFO si; + GetNativeSystemInfo(&si); + ASSERT( si.dwNumberOfProcessors <= MaxAffinitySetSize, "Too many CPUs" ); + AffinitySetSize = min (si.dwNumberOfProcessors, MaxAffinitySetSize); + cpu_set_t systemMask = 0; + GetProcessAffinityMask( GetCurrentProcess(), &m_processMask, &systemMask ); + cpu_set_t cpu_mask = 1; + for ( DWORD i = 0; i < AffinitySetSize; ++i ) { + while ( !(cpu_mask & m_processMask) && cpu_mask ) + cpu_mask <<= 1; + ASSERT( cpu_mask != 0, "Process affinity set is culled?" ); + m_affinities[i] = cpu_mask; + cpu_mask <<= 1; + } + } + }; // class AffinityHelper::Initializer + + static Initializer m_initializer; + + public: + static cpu_set_t CpuAffinity ( int cpuIndex ) { + return m_affinities[cpuIndex % AffinitySetSize]; + } + + static const cpu_set_t& ProcessMask () { return m_processMask; } + }; // class AffinityHelper + + unsigned AffinityHelper::AffinitySetSize = 0; + cpu_set_t AffinityHelper::m_affinities[AffinityHelper::MaxAffinitySetSize + 1] = {0}; + cpu_set_t AffinityHelper::m_processMask = 0; + AffinityHelper::Initializer AffinityHelper::m_initializer; + + #define CPU_ZERO(cpu_mask) (*cpu_mask = 0) + #define CPU_SET(cpu_idx, cpu_mask) (*cpu_mask |= AffinityHelper::CpuAffinity(cpu_idx)) + #define CPU_CLR(cpu_idx, cpu_mask) (*cpu_mask &= ~AffinityHelper::CpuAffinity(cpu_idx)) + #define CPU_ISSET(cpu_idx, cpu_mask) ((*cpu_mask & AffinityHelper::CpuAffinity(cpu_idx)) != 0) + +#elif __linux__ /* end of _MSC_VER */ + + #include + #include + #include + + pid_t gettid() { return (pid_t)syscall(__NR_gettid); } + + #define GET_MASK(cpu_set) (*(unsigned*)(void*)&cpu_set) + #define RES_STAT(res) (res != 0 ? "failed" : "ok") + + class AffinityHelper { + static cpu_set_t m_processMask; + + class Initializer { + public: + Initializer () { + CPU_ZERO (&m_processMask); + int res = sched_getaffinity( getpid(), sizeof(cpu_set_t), &m_processMask ); + ASSERT ( res == 0, "sched_getaffinity failed" ); + } + }; // class AffinityHelper::Initializer + + static Initializer m_initializer; + + public: + static const cpu_set_t& ProcessMask () { return m_processMask; } + }; // class AffinityHelper + + cpu_set_t AffinityHelper::m_processMask; + AffinityHelper::Initializer AffinityHelper::m_initializer; +#endif /* __linux__ */ + + bool PinTheThread ( int cpu_idx, tbb::atomic& nThreads ) { + cpu_set_t orig_mask, target_mask; + CPU_ZERO( &target_mask ); + CPU_SET( cpu_idx, &target_mask ); + ASSERT ( CPU_ISSET(cpu_idx, &target_mask), "CPU_SET failed" ); + #if _MSC_VER + orig_mask = SetThreadAffinityMask( GetCurrentThread(), target_mask ); + if ( !orig_mask ) + return false; + #elif __linux__ + CPU_ZERO( &orig_mask ); + int res = sched_getaffinity( gettid(), sizeof(cpu_set_t), &orig_mask ); + ASSERT ( res == 0, "sched_getaffinity failed" ); + res = sched_setaffinity( gettid(), sizeof(cpu_set_t), &target_mask ); + ASSERT ( res == 0, "sched_setaffinity failed" ); + #endif /* _MSC_VER */ + --nThreads; + while ( nThreads ) + __TBB_Yield(); + #if _MSC_VER + SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_HIGHEST); + #endif + return true; + } + + class AffinitySetterTask : tbb::task { + static bool m_result; + static tbb::atomic m_nThreads; + int m_idx; + + tbb::task* execute () { + //TestAffinityOps(); + m_result = PinTheThread( m_idx, m_nThreads ); + return NULL; + } + + public: + AffinitySetterTask ( int idx ) : m_idx(idx) {} + + friend bool AffinitizeTBB ( int, int /*mode*/ ); + }; + + bool AffinitySetterTask::m_result = true; + tbb::atomic AffinitySetterTask::m_nThreads; + + bool AffinitizeTBB ( int p, int affMode ) { + #if _MSC_VER + SetThreadPriority (GetCurrentThread(), THREAD_PRIORITY_HIGHEST); + SetPriorityClass (GetCurrentProcess(), HIGH_PRIORITY_CLASS); + #endif + AffinitySetterTask::m_result = true; + AffinitySetterTask::m_nThreads = p; + tbb::task_list tl; + for ( int i = 0; i < p; ++i ) { + tbb::task &t = *new( tbb::task::allocate_root() ) AffinitySetterTask( affMode == amSparse ? i * NumCpus / p : i ); + t.set_affinity( tbb::task::affinity_id(i + 1) ); + tl.push_back( t ); + } + tbb::task::spawn_root_and_wait(tl); + return AffinitySetterTask::m_result; + } + + inline + void Affinitize ( int p, int affMode ) { + if ( !AffinitizeTBB (p, affMode) ) + REPORT("Warning: Failed to set affinity for %d TBB threads\n", p); + } + + class TbbWorkersTrapper { + tbb::atomic my_refcount; + tbb::task *my_root; + tbb::task_group_context my_context; + Harness::SpinBarrier my_barrier; + + friend class TrapperTask; + + class TrapperTask : public tbb::task { + TbbWorkersTrapper& my_owner; + + tbb::task* execute () { + my_owner.my_barrier.wait(); + my_owner.my_root->wait_for_all(); + my_owner.my_barrier.wait(); + return NULL; + } + public: + TrapperTask ( TbbWorkersTrapper& owner ) : my_owner(owner) {} + }; + + public: + TbbWorkersTrapper () + : my_context(tbb::task_group_context::bound, + tbb::task_group_context::default_traits | tbb::task_group_context::concurrent_wait) + { + my_root = new ( tbb::task::allocate_root(my_context) ) tbb::empty_task; + my_root->set_ref_count(2); + my_barrier.initialize(NumThreads); + for ( int i = 1; i < NumThreads; ++i ) + tbb::task::spawn( *new(tbb::task::allocate_root()) TrapperTask(*this) ); + my_barrier.wait(); // Wait util all workers are ready + } + + ~TbbWorkersTrapper () { + my_root->decrement_ref_count(); + my_barrier.wait(); // Make sure no tasks are referencing us + tbb::task::destroy(*my_root); + } + }; // TbbWorkersTrapper + + +#if __TBB_STATISTICS + static bool StatisticsMode = true; +#else + static bool StatisticsMode = false; +#endif + +//! Suppresses silly warning +inline bool __TBB_bool( bool b ) { return b; } + +#define START_WORKERS(needScheduler, p, a, setWorkersAffinity, trapWorkers) \ + tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred); \ + TbbWorkersTrapper *trapper = NULL; \ + if ( theSettings.my_opts & UseTaskScheduler \ + && (needScheduler) && ((setWorkersAffinity) || (trapWorkers)) ) \ + { \ + init.initialize( p ); \ + if ( __TBB_bool(setWorkersAffinity) ) \ + Affinitize( p, a ); \ + if ( __TBB_bool(trapWorkers) ) \ + trapper = new TbbWorkersTrapper; \ + } + +#define STOP_WORKERS() \ + if ( theSettings.my_opts & UseTaskScheduler && init.is_active() ) { \ + if ( trapper ) \ + delete trapper; \ + init.terminate(); \ + /* Give asynchronous deinitialization time to complete */ \ + Harness::Sleep(50); \ + } + + typedef void (Test::*RunMemFnPtr)( Test::ThreadInfo& ); + + TimingSeries *TlsTimings; + Harness::SpinBarrier multipleMastersBarrier; + + class TimingFunctor { + Test* my_test; + RunConfig *my_cfg; + RunMemFnPtr my_fnRun; + size_t my_numRuns; + size_t my_numRepeats; + uintptr_t my_availableMethods; + + duration_t TimeSingleRun ( Test::ThreadInfo& ti ) const { + if ( my_availableMethods & idOnStart ) + my_test->OnStart(ti); + // Warming run + (my_test->*my_fnRun)(ti); + multipleMastersBarrier.wait(); + tbb::tick_count t0 = tbb::tick_count::now(); + (my_test->*my_fnRun)(ti); + duration_t t = (tbb::tick_count::now() - t0).seconds(); + if ( my_availableMethods & idOnFinish ) + my_test->OnFinish(ti); + return t; + } + + public: + TimingFunctor ( Test* test, RunConfig *cfg, RunMemFnPtr fnRun, + size_t numRuns, size_t nRepeats, uintptr_t availableMethods ) + : my_test(test), my_cfg(cfg), my_fnRun(fnRun) + , my_numRuns(numRuns), my_numRepeats(nRepeats), my_availableMethods(availableMethods) + {} + + void operator()( int tid ) const { + Test::ThreadInfo ti = { tid, NULL }; + durations_t &d = TlsTimings[tid].my_durations; + bool singleMaster = my_cfg->my_numMasters == 1; + START_WORKERS( (!singleMaster || (singleMaster && StatisticsMode)) && my_fnRun != &Test::RunSerial, + my_cfg->my_numThreads, my_cfg->my_affinityMode, singleMaster, singleMaster ); + for ( uintptr_t k = 0; k < my_numRuns; ++k ) { + if ( my_numRepeats > 1 ) { + d[k] = 0; + if ( my_availableMethods & idPrePostProcess ) { + for ( uintptr_t i = 0; i < my_numRepeats; ++i ) + d[k] += TimeSingleRun(ti); + } + else { + multipleMastersBarrier.wait(); + tbb::tick_count t0 = tbb::tick_count::now(); + for ( uintptr_t i = 0; i < my_numRepeats; ++i ) + (my_test->*my_fnRun)(ti); + d[k] = (tbb::tick_count::now() - t0).seconds(); + } + d[k] /= my_numRepeats; + } + else + d[k] = TimeSingleRun(ti); + } + STOP_WORKERS(); + TlsTimings[tid].CalculateStatistics(); + } + }; // class TimingFunctor + + void DoTiming ( TestResults& tr, RunConfig &cfg, RunMemFnPtr fnRun, size_t nRepeats, TimingSeries& ts ) { + int numThreads = cfg.NumMasters(); + size_t numRuns = ts.my_durations.size() / numThreads; + TimingFunctor body( tr.my_test, &cfg, fnRun, numRuns, nRepeats, tr.my_availableMethods ); + multipleMastersBarrier.initialize(numThreads); + tr.my_test->SetWorkload(cfg.my_workloadID); + if ( numThreads == 1 ) { + TimingSeries *t = TlsTimings; + TlsTimings = &ts; + body(0); + TlsTimings = t; + } + else { + ts.my_durations.resize(numThreads * numRuns); + NativeParallelFor( numThreads, body ); + for ( int i = 0, j = 0; i < numThreads; ++i ) { + durations_t &d = TlsTimings[i].my_durations; + for ( size_t k = 0; k < numRuns; ++k, ++j ) + ts.my_durations[j] = d[k]; + } + ts.CalculateStatistics(); + } + } + + //! Runs the test function, does statistical processing, and, if title is nonzero, prints results. + /** If histogramFileName is a string, the histogram of individual runs is generated and stored + in a file with the given name. If it is NULL then the histogram is printed on the console. + By default no histogram is generated. + The histogram format is: "rate bucket start" "number of tests in this bucket". **/ + void RunTestImpl ( TestResults& tr, RunConfig &cfg, RunMemFnPtr pfnTest, TimingSeries& ts ) { + // nRepeats is a number of repeated calls to the test function made as + // part of the same run. It is determined experimentally by the following + // calibration process so that the total run time was approx. RunDuration. + // This is helpful to increase the measurement precision in case of very + // short tests. + size_t nRepeats = 1; + // A minimal stats is enough when doing calibration + CalibrationTiming.my_durations.resize( (NumRuns < 4 ? NumRuns : 3) * cfg.NumMasters() ); + // There's no need to be too precise when calculating nRepeats. And reasonably + // far extrapolation can speed up the process significantly. + for (;;) { + DoTiming( tr, cfg, pfnTest, nRepeats, CalibrationTiming ); + if ( CalibrationTiming.my_avgTime * nRepeats > 1e-4 ) + break; + nRepeats *= 2; + } + nRepeats *= (uintptr_t)ceil( RunDuration / (CalibrationTiming.my_avgTime * nRepeats) ); + + DoTiming(tr, cfg, pfnTest, nRepeats, ts); + + // No histogram for baseline measurements + if ( pfnTest != &Test::RunSerial && pfnTest != &Test::Baseline ) { + const char* histogramName = theSettings.my_histogramName; + if ( histogramName != NoHistogram && tr.my_test->HistogramName() != DefaultHistogram ) + histogramName = tr.my_test->HistogramName(); + if ( histogramName != NoHistogram ) + TraceHistogram( ts.my_durations, histogramName ); + } + } // RunTestImpl + + typedef void (*TestActionFn) ( TestResults&, int mastersRange, int w, int p, int m, int a, int& numTests ); + + int TestResultIndex ( int mastersRange, int w, int p, int m, int a ) { + return ((w * (MaxThread - MinThread + 1) + (p - MinThread)) * mastersRange + m) * NumActiveAffModes + a; + } + + void RunTest ( TestResults& tr, int mastersRange, int w, int p, int m, int a, int& numTests ) { + size_t r = TestResultIndex(mastersRange, w, p, m, a); + ASSERT( r < tr.my_results.size(), NULL ); + RunConfig &rc = tr.my_results[r].my_config; + rc.my_maxConcurrency = MaxConcurrency; + rc.my_numThreads = p; + rc.my_numMasters = m + tr.my_test->MinNumMasters(); + rc.my_affinityMode = a; + rc.my_workloadID = w; + RunTestImpl( tr, rc, &Test::Run, tr.my_results[r].my_timing ); + printf( "Running tests: %04.1f%%\r", ++numTests * 100. / TotalConfigs ); fflush(stdout); + } + + void WalkTests ( TestActionFn fn, int& numTests, bool setAffinity, bool trapWorkers, bool multipleMasters ) { + for ( int p = MinThread; p <= MaxThread; ++p ) { + NumThreads = p; + MaxConcurrency = p < NumCpus ? p : NumCpus; + for ( int a = 0; a < NumActiveAffModes; ++a ) { + START_WORKERS( multipleMasters || !StatisticsMode, p, a, setAffinity, trapWorkers ); + for ( size_t i = 0; i < theSession.size(); ++i ) { + TestResults &tr = theSession[i]; + Test *t = tr.my_test; + int mastersRange = t->MaxNumMasters() - t->MinNumMasters() + 1; + int numWorkloads = theSettings.my_opts & UseSmallestWorkloadOnly ? 1 : t->NumWorkloads(); + for ( int w = 0; w < numWorkloads; ++w ) { + if ( multipleMasters ) + for ( int m = 1; m < mastersRange; ++m ) + fn( tr, mastersRange, w, p, m, a, numTests ); + else + fn( tr, mastersRange, w, p, 0, a, numTests ); + } + } + STOP_WORKERS(); + } + } + } + + void RunTests () { + int numTests = 0; + WalkTests( &RunTest, numTests, !StatisticsMode, !StatisticsMode, false ); + if ( MaxTbbMasters > 1 ) + WalkTests( &RunTest, numTests, true, false, true ); + } + + void InitTestData ( TestResults& tr, int mastersRange, int w, int p, int m, int a, int& ) { + size_t r = TestResultIndex(mastersRange, w, p, m, a); + ASSERT( r < tr.my_results.size(), NULL ); + tr.my_results[r].my_timing.my_durations.resize( + (theSettings.my_opts & UseTaskScheduler ? tr.my_test->MinNumMasters() + m : p) * NumRuns ); + } + + char WorkloadName[MaxWorkloadNameLen + 1]; + + void PrepareTests () { + printf( "Initializing...\r" ); + NumActiveAffModes = theSettings.my_opts & UseAffinityModes ? NumAffinitizationModes : 1; + TotalConfigs = 0; + TitleFieldLen = strlen( TestNameColumnTitle ); + WorkloadFieldLen = strlen( WorkloadNameColumnTitle ); + int numThreads = MaxThread - MinThread + 1; + int numConfigsBase = numThreads * NumActiveAffModes; + int totalWorkloads = 0; + for ( size_t i = 0; i < theSession.size(); ++i ) { + TestResults &tr = theSession[i]; + Test &t = *tr.my_test; + int numWorkloads = theSettings.my_opts & UseSmallestWorkloadOnly ? 1 : t.NumWorkloads(); + int numConfigs = numConfigsBase * numWorkloads; + if ( t.MaxNumMasters() > 1 ) { + ASSERT( theSettings.my_opts & UseTaskScheduler, "Multiple masters mode is only valid for task scheduler tests" ); + if ( MaxTbbMasters < t.MaxNumMasters() ) + MaxTbbMasters = t.MaxNumMasters(); + numConfigs *= t.MaxNumMasters() - t.MinNumMasters() + 1; + } + totalWorkloads += numWorkloads; + TotalConfigs += numConfigs; + + const char* testName = t.Name(); + if ( testName ) + tr.my_testName = testName; + ASSERT( tr.my_testName, "Neither Test::Name() is implemented, nor RTTI is enabled" ); + TitleFieldLen = max( TitleFieldLen, strlen(tr.my_testName) ); + + tr.my_results.resize( numConfigs ); + tr.my_serialBaselines.resize( numWorkloads ); + tr.my_baselines.resize( numWorkloads ); + tr.my_workloadNames.resize( numWorkloads ); + } + TimingSeries tmpTiming; + TlsTimings = &tmpTiming; // All measurements are serial here + int n = 0; + for ( size_t i = 0; i < theSession.size(); ++i ) { + TestResults &tr = theSession[i]; + Test &t = *tr.my_test; + // Detect which methods are overridden by the test implementation + g_absentMethods = 0; + Test::ThreadInfo ti = { 0 }; + t.SetWorkload(0); + t.OnStart(ti); + t.RunSerial(ti); + t.OnFinish(ti); + if ( theSettings.my_opts & UseSerialBaseline && !(g_absentMethods & idRunSerial) ) + tr.my_availableMethods |= idRunSerial; + if ( !(g_absentMethods & idOnStart) ) + tr.my_availableMethods |= idOnStart; + + RunConfig rc = { 1, 1, 1, 0, 0 }; + int numWorkloads = theSettings.my_opts & UseSmallestWorkloadOnly ? 1 : t.NumWorkloads(); + for ( int w = 0; w < numWorkloads; ++w ) { + WorkloadName[0] = 0; + t.SetWorkload(w); + if ( !WorkloadName[0] ) + sprintf( WorkloadName, "%d", w ); + size_t len = strlen(WorkloadName); + tr.my_workloadNames[w] = new char[len + 1]; + strcpy ( (char*)tr.my_workloadNames[w], WorkloadName ); + WorkloadFieldLen = max( WorkloadFieldLen, len ); + + rc.my_workloadID = w; + if ( theSettings.my_opts & UseBaseline ) + RunTestImpl( tr, rc, &Test::Baseline, tr.my_baselines[w] ); + if ( tr.my_availableMethods & idRunSerial ) + RunTestImpl( tr, rc, &Test::RunSerial, tr.my_serialBaselines[w] ); + printf( "Measuring baselines: %04.1f%%\r", ++n * 100. / totalWorkloads ); fflush(stdout); + } + } + TlsTimings = new TimingSeries[MaxThread + MaxTbbMasters - 1]; + if ( theSettings.my_opts & UseTaskScheduler ? MaxTbbMasters : MaxThread ) + WalkTests( &InitTestData, n, false, false, theSettings.my_opts & UseTaskScheduler ? true : false ); + CalibrationTiming.my_durations.reserve( MaxTbbMasters * 3 ); + printf( " \r"); + } + + FILE* ResFile = NULL; + + void Report ( char const* fmt, ... ) { + va_list args; + if ( ResFile ) { + va_start( args, fmt ); + vfprintf( ResFile, fmt, args ); + va_end( args ); + } + va_start( args, fmt ); + vprintf( fmt, args ); + va_end( args ); + } + + void PrintResults () { + if ( theSettings.my_resFile ) + ResFile = fopen( theSettings.my_resFile, "w" ); + Report( "%-*s %-*s %s", TitleFieldLen, "Test name", WorkloadFieldLen, "Workload", + MaxTbbMasters > 1 ? "W M " : "T " ); + if ( theSettings.my_opts & UseAffinityModes ) + Report( "Aff " ); + Report( "%-*s SD, %% %-*s %-*s %-*s ", + RateFieldLen, "Avg.time", OvhdFieldLen, "Par.ovhd,%", + RateFieldLen, "Min.time", RateFieldLen, "Max.time" ); + Report( " | Repeats = %lu, CPUs %d\n", (unsigned long)NumRuns, NumCpus ); + for ( size_t i = 0; i < theSession.size(); ++i ) { + TestResults &tr = theSession[i]; + for ( size_t j = 0; j < tr.my_results.size(); ++j ) { + RunResults &rr = tr.my_results[j]; + RunConfig &rc = rr.my_config; + int w = rc.my_workloadID; + TimingSeries &ts = rr.my_timing; + duration_t baselineTime = tr.my_baselines[w].my_avgTime, + cleanTime = ts.my_avgTime - baselineTime; + Report( "%-*s %-*s ", TitleFieldLen, tr.my_testName, WorkloadFieldLen, tr.my_workloadNames[w] ); + if ( MaxTbbMasters > 1 ) + Report( "%-4d %-4d ", rc.my_numThreads - 1, rc.my_numMasters ); + else + Report( "%-4d ", rc.my_numThreads ); + if ( theSettings.my_opts & UseAffinityModes ) + Report( "%%-8s ", AffinitizationModeNames[rc.my_affinityMode] ); + Report( "%-*.2e %-6.1f ", RateFieldLen, cleanTime, ts.my_stdDev); + if ( tr.my_availableMethods & idRunSerial ) { + duration_t serialTime = (tr.my_serialBaselines[w].my_avgTime - baselineTime) / rc.my_maxConcurrency; + Report( "%-*.1f ", OvhdFieldLen, 100*(cleanTime - serialTime)/serialTime ); + } + else + Report( "%*s%*s ", OvhdFieldLen/2, "-", OvhdFieldLen - OvhdFieldLen/2, "" ); + Report( "%-*.2e %-*.2e ", RateFieldLen, ts.my_minTime - baselineTime, RateFieldLen, ts.my_maxTime - baselineTime); + Report( "\n" ); + } + } + delete [] TlsTimings; + if ( ResFile ) + fclose(ResFile); + } + + __TBB_PERF_API void RegisterTest ( Test* t, const char* className, bool takeOwnership ) { + // Just collect test objects at this stage + theSession.push_back( TestResults(t, className, takeOwnership) ); + } + +} // namespace internal + +__TBB_PERF_API void Test::Baseline ( ThreadInfo& ) {} + +__TBB_PERF_API void Test::RunSerial ( ThreadInfo& ) { internal::g_absentMethods |= internal::idRunSerial; } + +__TBB_PERF_API void Test::OnStart ( ThreadInfo& ) { internal::g_absentMethods |= internal::idOnStart; } + +__TBB_PERF_API void Test::OnFinish ( ThreadInfo& ) { internal::g_absentMethods |= internal::idOnFinish; } + +__TBB_PERF_API void WipeCaches () { NativeParallelFor( NumCpus, internal::WiperBody() ); } + +__TBB_PERF_API void EmptyFunc () {} +__TBB_PERF_API void AnchorFunc ( void* ) {} +__TBB_PERF_API void AnchorFunc2 ( void*, void* ) {} + +__TBB_PERF_API void SetWorkloadName( const char* format, ... ) { + internal::WorkloadName[MaxWorkloadNameLen] = 0; + va_list args; + va_start(args, format); + vsnprintf( internal::WorkloadName, MaxWorkloadNameLen, format, args ); + va_end(args); +} + + +__TBB_PERF_API int TestMain( int argc, char* argv[], const SessionSettings* defaultSettings ) { +#if _MSC_VER + HANDLE hMutex = CreateMutex( NULL, FALSE, "Global\\TBB_OMP_PerfSession" ); + WaitForSingleObject( hMutex, INFINITE ); +#endif + MinThread = MaxThread = NumCpus; + if ( defaultSettings ) + theSettings = *defaultSettings; + ParseCommandLine( argc, argv ); // May override data in theSettings + + internal::PrepareTests (); + internal::RunTests (); + internal::PrintResults(); + REPORT("\n"); +#if _MSC_VER + ReleaseMutex( hMutex ); + CloseHandle( hMutex ); +#endif + return 0; +} + +} // namespace Perf diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/perf.h b/deal.II/bundled/tbb41_20130401oss/src/perf/perf.h new file mode 100644 index 0000000000..c0d30abc22 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/perf.h @@ -0,0 +1,265 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __tbb_perf_h__ +#define __tbb_perf_h__ + +#ifndef TBB_PERF_TYPEINFO +#define TBB_PERF_TYPEINFO 1 +#endif + +#if TBB_PERF_TYPEINFO + #include + #define __TBB_PERF_TEST_CLASS_NAME(T) typeid(T).name() +#else /* !TBB_PERF_TYPEINFO */ + #define __TBB_PERF_TEST_CLASS_NAME(T) NULL +#endif /* !TBB_PERF_TYPEINFO */ + + +#include "tbb/tick_count.h" + +// TODO: Fix build scripts to provide more reliable build phase identification means +#ifndef __TBB_PERF_API +#if _USRDLL + #if _MSC_VER + #define __TBB_PERF_API __declspec(dllexport) + #else /* !_MSC_VER */ + #define __TBB_PERF_API + #endif /* !_MSC_VER */ +#else /* !_USRDLL */ + #if _MSC_VER + #define __TBB_PERF_API __declspec(dllimport) + #else /* !_MSC_VER */ + #define __TBB_PERF_API + #endif /* !_MSC_VER */ +#endif /* !_USRDLL */ +#endif /* !__TBB_PERF_API */ + +#if _WIN32||_WIN64 + +namespace Perf { + typedef unsigned __int64 tick_t; + #if defined(_M_X64) + inline tick_t rdtsc () { return __rdtsc(); } + #elif _M_IX86 + inline tick_t rdtsc () { __asm { rdtsc } } + #else + #error Unsupported ISA + #endif +} // namespace Perf + +#elif __linux__ || __APPLE__ + +#include + +namespace Perf { + typedef uint64_t tick_t; + #if __x86_64__ || __i386__ || __i386 + inline tick_t rdtsc () { + uint32_t lo, hi; + __asm__ __volatile__ ( "rdtsc" : "=a" (lo), "=d" (hi) ); + return (tick_t)lo | ((tick_t)hi) << 32; + } + #else + #error Unsupported ISA + #endif +} // namespace Perf + +#else + #error Unsupported OS +#endif /* OS */ + +__TBB_PERF_API extern int NumThreads, + MaxConcurrency, + NumCpus; + +// Functions and global variables provided by the benchmarking framework +namespace Perf { + +typedef double duration_t; + +static const int MaxWorkloadNameLen = 64; + +static const char* NoHistogram = (char*)-1; +static const char* DefaultHistogram = (char*)-2; + +__TBB_PERF_API void AnchorFunc ( void* ); +__TBB_PERF_API void AnchorFunc2 ( void*, void* ); + +//! Helper that can be used in the preprocess handler to clean caches +/** Cleaning caches is necessary to obtain reproducible results when a test + accesses significant ranges of memory. **/ +__TBB_PERF_API void WipeCaches (); + +//! Specifies the name to be used to designate the current workload in output +/** Should be used from Test::SetWorkload(). If necessary workload name will be + truncated to MaxWorkloadNameLen characters. **/ +__TBB_PERF_API void SetWorkloadName( const char* format, ... ); + +class __TBB_PERF_API Test { +public: + virtual ~Test () {} + + //! Struct used by tests running in multiple masters mode + struct ThreadInfo { + //! Zero based thread ID + int tid; + //! Pointer to test specific data + /** If used by the test, should be initialized by OnStartLocal(), and + finalized by OnFinishLocal(). **/ + void* data; + }; + + //////////////////////////////////////////////////////////////////////////////// + // Mandatory methods + + //! Returns the number of workloads supported + virtual int NumWorkloads () = 0; + + //! Set workload info for the subsequent calls to Run() and RunSerial() + /** This method can use global helper function Perf::SetWorkloadName() in order + to specify the name of the current workload, which will be used in output + to designate the workload. If SetWorkloadName is not called, workloadIndex + will be used for this purpose. + + When testing task scheduler, make sure that this method does not trigger + its automatic initialization. **/ + virtual void SetWorkload ( int workloadIndex ) = 0; + + //! Test implementation + /** Called by the timing framework several times in a loop to achieve approx. + RunDuration time, and this loop is timed NumRuns times to collect statistics. + Argument ti specifies information about the master thread calling this method. **/ + virtual void Run ( ThreadInfo& ti ) = 0; + + //////////////////////////////////////////////////////////////////////////////// + // Optional methods + + //! Returns short title string to be used in the regular output to identify the test + /** Should uniquely identify the test among other ones in the given benchmark suite. + If not implemented, the test implementation class' RTTI name is used. **/ + virtual const char* Name () { return NULL; }; + + //! Returns minimal number of master threads + /** Used for task scheduler tests only (when UseTbbScheduler option is specified + in session settings). **/ + virtual int MinNumMasters () { return 1; } + + //! Returns maximal number of master threads + /** Used for task scheduler tests only (when UseTbbScheduler option is specified + in session settings). **/ + virtual int MaxNumMasters () { return 1; } + + //! Executes serial workload equivalent to the one processed by Run() + /** Called by the timing framework several times in a loop to collect statistics. **/ + virtual void RunSerial ( ThreadInfo& ti ); + + //! Invoked before each call to Run() + /** Can be used to preinitialize data necessary for the test, clean up + caches (see Perf::WipeCaches), etc. + In multiple masters mode this method is called on each thread. **/ + virtual void OnStart ( ThreadInfo& ti ); + + //! Invoked after each call to Run() + /** Can be used to free resources allocated by OnStart(). + Note that this method must work correctly independently of whether Run(), + RunSerial() or nothing is called between OnStart() and OnFinish(). + In multiple masters mode this method is called on each thread. **/ + virtual void OnFinish ( ThreadInfo& ti ); + + //! Functionality, the cost of which has to be factored out from timing results + /** Applies to both parallel and serial versions. **/ + virtual void Baseline ( ThreadInfo& ); + + //! Returns description string to be used in the benchmark info/summary output + virtual const char* Description () { return NULL; } + + //! Specifies if the histogram of individual run times in a series + /** If the method is not overridden, histogramName argument of TestMain is used. **/ + virtual const char* HistogramName () { return DefaultHistogram; } +}; // class Test + +namespace internal { + __TBB_PERF_API void RegisterTest ( Test*, const char* testClassName, bool takeOwnership ); +} + +template +void RegisterTest() { internal::RegisterTest( new T, __TBB_PERF_TEST_CLASS_NAME(T), true ); } + +template +void RegisterTest( T& t ) { internal::RegisterTest( &t, __TBB_PERF_TEST_CLASS_NAME(T), false ); } + +enum SessionOptions { + //! Use Test::RunSerial if present + UseBaseline = 0x01, + UseSerialBaseline = 0x02, + UseBaselines = UseBaseline | UseSerialBaseline, + UseTaskScheduler = 0x10, + UseAffinityModes = 0x20, + UseSmallestWorkloadOnly = 0x40 +}; + +struct SessionSettings { + //! A combination of SessionOptions flags + uintptr_t my_opts; + + //! Name of a file to store performance results + /** These results are duplicates of what is printed on the console. **/ + const char* my_resFile; + + //! Output destination for the histogram of individual run times in a series + /** If it is a string, the histogram is stored in a file with such name. + If it is NULL, the histogram is printed on the console. By default histograms + are suppressed. + + The histogram is formatted as two column table: + "time bucket start" "number of tests in this bucket" + + When this setting enables histogram generation, an individual test + can override it by implementing HistogramName method. **/ + const char* my_histogramName; + + SessionSettings ( uintptr_t opts = 0, const char* resFile = NULL, const char* histogram = NoHistogram ) + : my_opts(opts) + , my_resFile(resFile) + , my_histogramName(histogram) + {} +}; // struct SessionSettings + +//! Benchmarking session entry point +/** Executes all the individual tests registered previously by means of + RegisterTest **/ +__TBB_PERF_API int TestMain( int argc, char* argv[], + const SessionSettings* defaultSettings = NULL ); + + +} // namespace Perf + +#endif /* __tbb_perf_h__ */ + + diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/perf_sched.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/perf_sched.cpp new file mode 100644 index 0000000000..a4a9172502 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/perf_sched.cpp @@ -0,0 +1,464 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "perf.h" + +#include + +#include "tbb/blocked_range.h" +#include "tbb/parallel_for.h" +#include "tbb/parallel_reduce.h" + +#define NUM_CHILD_TASKS 2096 +#define NUM_ROOT_TASKS 256 + +#define N 100000000 +#define FINEST_GRAIN 10 +#define FINE_GRAIN 50 +#define MED_GRAIN 200 +#define COARSE_GRAIN 1000 + + +typedef int count_t; + +const count_t N_finest = (count_t)(N/log((double)N)/10); +const count_t N_fine = N_finest * 20; +const count_t N_med = N_fine * (count_t)log((double)N) / 5; + +class StaticTaskHolder { +public: + tbb::task *my_leafTaskPtr; + StaticTaskHolder (); +}; + +static StaticTaskHolder s_tasks; + +static count_t NumIterations; +static count_t NumLeafTasks; +static count_t NumRootTasks; + +class LeafTaskBase : public tbb::task { +public: + count_t my_ID; + + LeafTaskBase () {} + LeafTaskBase ( count_t id ) : my_ID(id) {} +}; + +class SimpleLeafTask : public LeafTaskBase { + task* execute () { + volatile count_t anchor = 0; + for ( count_t i=0; i < NumIterations; ++i ) + anchor += i; + return NULL; + } +public: + SimpleLeafTask ( count_t ) {} +}; + +StaticTaskHolder::StaticTaskHolder () { + static SimpleLeafTask s_t1(0); + my_leafTaskPtr = &s_t1; +} + +class Test_SPMC : public Perf::Test { +protected: + static const int numWorkloads = 4; + static const count_t workloads[numWorkloads]; + + LeafTaskBase* my_leafTaskPtr; + + const char* Name () { return "SPMC"; } + + int NumWorkloads () { return numWorkloads; } + + void SetWorkload ( int idx ) { + NumRootTasks = 1; + NumIterations = workloads[idx]; + NumLeafTasks = NUM_CHILD_TASKS * NUM_ROOT_TASKS / (NumIterations > 1000 ? 32 : 8); + Perf::SetWorkloadName( "%d x %d", NumLeafTasks, NumIterations ); + } + + void Run ( ThreadInfo& ) { + tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task; + r.set_ref_count( NumLeafTasks + 1 ); + for ( count_t i = 0; i < NumLeafTasks; ++i ) + r.spawn( *new(r.allocate_child()) SimpleLeafTask(0) ); + r.wait_for_all(); + tbb::task::destroy(r); + } + + void RunSerial ( ThreadInfo& ) { + const count_t n = NumLeafTasks * NumRootTasks; + for ( count_t i=0; i < n; ++i ) { + my_leafTaskPtr->my_ID = i; + my_leafTaskPtr->execute(); + } + } + +public: + Test_SPMC ( LeafTaskBase* leafTaskPtr = NULL ) { + static SimpleLeafTask t(0); + my_leafTaskPtr = leafTaskPtr ? leafTaskPtr : &t; + } +}; // class Test_SPMC + +const count_t Test_SPMC::workloads[Test_SPMC::numWorkloads] = { 1, 50, 500, 5000 }; + +template +class LeavesLauncherTask : public tbb::task { + count_t my_groupId; + + task* execute () { + count_t base = my_groupId * NumLeafTasks; + set_ref_count(NumLeafTasks + 1); + for ( count_t i = 0; i < NumLeafTasks; ++i ) + spawn( *new(allocate_child()) LeafTask(base + i) ); + wait_for_all(); + return NULL; + } +public: + LeavesLauncherTask ( count_t groupId ) : my_groupId(groupId) {} +}; + +template +void RunShallowTree () { + tbb::empty_task &r = *new( tbb::task::allocate_root() ) tbb::empty_task; + r.set_ref_count( NumRootTasks + 1 ); + for ( count_t i = 0; i < NumRootTasks; ++i ) + r.spawn( *new(r.allocate_child()) LeavesLauncherTask(i) ); + r.wait_for_all(); + tbb::task::destroy(r); +} + +class Test_ShallowTree : public Test_SPMC { + const char* Name () { return "ShallowTree"; } + + void SetWorkload ( int idx ) { + NumRootTasks = NUM_ROOT_TASKS; + NumIterations = workloads[idx]; + NumLeafTasks = NumIterations > 200 ? NUM_CHILD_TASKS / 10 : + (NumIterations > 50 ? NUM_CHILD_TASKS / 2 : NUM_CHILD_TASKS * 2); + Perf::SetWorkloadName( "%d x %d", NumRootTasks * NumLeafTasks, NumIterations ); + } + + void Run ( ThreadInfo& ) { + RunShallowTree(); + } +}; // class Test_ShallowTree + +class LeafTaskSkewed : public LeafTaskBase { + task* execute () { + volatile count_t anchor = 0; + double K = (double)NumRootTasks * NumLeafTasks; + count_t n = count_t(sqrt(double(my_ID)) * double(my_ID) * my_ID / (4 * K * K)); + for ( count_t i = 0; i < n; ++i ) + anchor += i; + return NULL; + } +public: + LeafTaskSkewed ( count_t id ) : LeafTaskBase(id) {} +}; + +class Test_ShallowTree_Skewed : public Test_SPMC { + static LeafTaskSkewed SerialTaskBody; + + const char* Name () { return "ShallowTree_Skewed"; } + + int NumWorkloads () { return 1; } + + void SetWorkload ( int ) { + NumRootTasks = NUM_ROOT_TASKS; + NumLeafTasks = NUM_CHILD_TASKS; + Perf::SetWorkloadName( "%d", NumRootTasks * NumLeafTasks ); + } + + void Run ( ThreadInfo& ) { + RunShallowTree(); + } + +public: + Test_ShallowTree_Skewed () : Test_SPMC(&SerialTaskBody) {} +}; // class Test_ShallowTree_Skewed + +LeafTaskSkewed Test_ShallowTree_Skewed::SerialTaskBody(0); + +typedef tbb::blocked_range range_t; + +static count_t IterRange = N, + IterGrain = 1; + +enum PartitionerType { + SimplePartitioner = 0, + AutoPartitioner = 1 +}; + +class Test_Algs : public Perf::Test { +protected: + static const int numWorkloads = 4; + static const count_t algRanges[numWorkloads]; + static const count_t algGrains[numWorkloads]; + + tbb::simple_partitioner my_simplePartitioner; + tbb::auto_partitioner my_autoPartitioner; + PartitionerType my_partitionerType; + + bool UseAutoPartitioner () const { return my_partitionerType == AutoPartitioner; } + + int NumWorkloads () { return UseAutoPartitioner() ? 3 : numWorkloads; } + + void SetWorkload ( int idx ) { + if ( UseAutoPartitioner() ) { + IterRange = algRanges[idx ? numWorkloads - 1 : 0]; + IterGrain = idx > 1 ? algGrains[numWorkloads - 1] : 1; + } + else { + IterRange = algRanges[idx]; + IterGrain = algGrains[idx]; + } + Perf::SetWorkloadName( "%d / %d", IterRange, IterGrain ); + } +public: + Test_Algs ( PartitionerType pt = SimplePartitioner ) : my_partitionerType(pt) {} +}; // class Test_Algs + +const count_t Test_Algs::algRanges[] = {N_finest, N_fine, N_med, N}; +const count_t Test_Algs::algGrains[] = {1, FINE_GRAIN, MED_GRAIN, COARSE_GRAIN}; + +template +class Test_PFor : public Test_Algs { +protected: + void Run ( ThreadInfo& ) { + if ( UseAutoPartitioner() ) + tbb::parallel_for( range_t(0, IterRange, IterGrain), Body(), my_autoPartitioner ); + else + tbb::parallel_for( range_t(0, IterRange, IterGrain), Body(), my_simplePartitioner ); + } + + void RunSerial ( ThreadInfo& ) { + Body body; + body( range_t(0, IterRange, IterGrain) ); + } +public: + Test_PFor ( PartitionerType pt = SimplePartitioner ) : Test_Algs(pt) {} +}; // class Test_PFor + +class SimpleForBody { +public: + void operator()( const range_t& r ) const { + count_t end = r.end(); + volatile count_t anchor = 0; + for( count_t i = r.begin(); i < end; ++i ) + anchor += i; + } +}; // class SimpleForBody + +class Test_PFor_Simple : public Test_PFor { +protected: + const char* Name () { return UseAutoPartitioner() ? "PFor-AP" : "PFor"; } +public: + Test_PFor_Simple ( PartitionerType pt = SimplePartitioner ) : Test_PFor(pt) {} +}; // class Test_PFor_Simple + +class SkewedForBody { +public: + void operator()( const range_t& r ) const { + count_t end = (r.end() + 1) * (r.end() + 1); + volatile count_t anchor = 0; + for( count_t i = r.begin() * r.begin(); i < end; ++i ) + anchor += i; + } +}; // class SkewedForBody + +class Test_PFor_Skewed : public Test_PFor { + typedef Test_PFor base_type; +protected: + const char* Name () { return UseAutoPartitioner() ? "PFor-Skewed-AP" : "PFor-Skewed"; } + + void SetWorkload ( int idx ) { + base_type::SetWorkload(idx); + IterRange = (count_t)(sqrt((double)IterRange) * sqrt(sqrt((double)N / IterRange))); + Perf::SetWorkloadName( "%d", IterRange ); + } + +public: + Test_PFor_Skewed ( PartitionerType pt = SimplePartitioner ) : base_type(pt) {} +}; // class Test_PFor_Skewed + +PartitionerType gPartitionerType; +count_t NestingRange; +count_t NestingGrain; + +class NestingForBody { + count_t my_depth; + tbb::simple_partitioner my_simplePartitioner; + tbb::auto_partitioner my_autoPartitioner; + + template + void run ( const range_t& r, Partitioner& p ) const { + count_t end = r.end(); + if ( my_depth > 1 ) + for ( count_t i = r.begin(); i < end; ++i ) + tbb::parallel_for( range_t(0, IterRange, IterGrain), NestingForBody(my_depth - 1), p ); + else + for ( count_t i = r.begin(); i < end; ++i ) + tbb::parallel_for( range_t(0, IterRange, IterGrain), SimpleForBody(), p ); + } +public: + void operator()( const range_t& r ) const { + if ( gPartitionerType == AutoPartitioner ) + run( r, my_autoPartitioner ); + else + run( r, my_simplePartitioner ); + } + NestingForBody ( count_t depth = 1 ) : my_depth(depth) {} +}; // class NestingForBody + +enum NestingType { + HollowNesting, + ShallowNesting, + DeepNesting +}; + +class Test_PFor_Nested : public Test_Algs { + typedef Test_Algs base_type; + + NestingType my_nestingType; + count_t my_nestingDepth; + +protected: + const char* Name () { + static const char* names[] = { "PFor-HollowNested", "PFor-HollowNested-AP", + "PFor-ShallowNested", "PFor-ShallowNested-AP", + "PFor-DeeplyNested", "PFor-DeeplyNested-AP" }; + return names[my_nestingType * 2 + my_partitionerType]; + } + + int NumWorkloads () { return my_nestingType == ShallowNesting ? (UseAutoPartitioner() ? 3 : 2) : 1; } + + void SetWorkload ( int idx ) { + gPartitionerType = my_partitionerType; + if ( my_nestingType == DeepNesting ) { + NestingRange = 1024; + IterGrain = NestingGrain = 1; + IterRange = 4; + my_nestingDepth = 4; + } + else if ( my_nestingType == ShallowNesting ) { + int i = idx ? numWorkloads - 1 : 0; + count_t baseRange = algRanges[i]; + count_t baseGrain = !UseAutoPartitioner() || idx > 1 ? algGrains[i] : 1; + NestingRange = IterRange = (count_t)sqrt((double)baseRange); + NestingGrain = IterGrain = (count_t)sqrt((double)baseGrain); + } + else { + NestingRange = N / 100; + NestingGrain = COARSE_GRAIN / 10; + IterRange = 2; + IterGrain = 1; + } + Perf::SetWorkloadName( "%d / %d", NestingRange, NestingGrain ); + } + + void Run ( ThreadInfo& ) { + if ( UseAutoPartitioner() ) + tbb::parallel_for( range_t(0, NestingRange, NestingGrain), NestingForBody(my_nestingDepth), my_autoPartitioner ); + else + tbb::parallel_for( range_t(0, NestingRange, NestingGrain), NestingForBody(my_nestingDepth), my_simplePartitioner ); + } + + void RunSerial ( ThreadInfo& ) { + for ( int i = 0; i < NestingRange; ++i ) { + SimpleForBody body; + body( range_t(0, IterRange, IterGrain) ); + } + } +public: + Test_PFor_Nested ( NestingType nt, PartitionerType pt ) : base_type(pt), my_nestingType(nt), my_nestingDepth(1) {} +}; // class Test_PFor_Nested + +class SimpleReduceBody { +public: + count_t my_sum; + SimpleReduceBody () : my_sum(0) {} + SimpleReduceBody ( SimpleReduceBody&, tbb::split ) : my_sum(0) {} + void join( SimpleReduceBody& rhs ) { my_sum += rhs.my_sum;} + void operator()( const range_t& r ) { + count_t end = r.end(); + volatile count_t anchor = 0; + for( count_t i = r.begin(); i < end; ++i ) + anchor += i; + my_sum = anchor; + } +}; // class SimpleReduceBody + +class Test_PReduce : public Test_Algs { +protected: + const char* Name () { return UseAutoPartitioner() ? "PReduce-AP" : "PReduce"; } + + void Run ( ThreadInfo& ) { + SimpleReduceBody body; + if ( UseAutoPartitioner() ) + tbb::parallel_reduce( range_t(0, IterRange, IterGrain), body, my_autoPartitioner ); + else + tbb::parallel_reduce( range_t(0, IterRange, IterGrain), body, my_simplePartitioner ); + } + + void RunSerial ( ThreadInfo& ) { + SimpleReduceBody body; + body( range_t(0, IterRange, IterGrain) ); + } +public: + Test_PReduce ( PartitionerType pt = SimplePartitioner ) : Test_Algs(pt) {} +}; // class Test_PReduce + +int main( int argc, char* argv[] ) { + Perf::SessionSettings opts (Perf::UseTaskScheduler | Perf::UseSerialBaseline, "perf_sched.txt"); // Perf::UseBaseline, Perf::UseSmallestWorkloadOnly + Perf::RegisterTest(); + Perf::RegisterTest(); + Perf::RegisterTest(); + Test_PFor_Simple pf_sp(SimplePartitioner), pf_ap(AutoPartitioner); + Perf::RegisterTest(pf_sp); + Perf::RegisterTest(pf_ap); + Test_PReduce pr_sp(SimplePartitioner), pr_ap(AutoPartitioner); + Perf::RegisterTest(pr_sp); + Perf::RegisterTest(pr_ap); + Test_PFor_Skewed pf_s_sp(SimplePartitioner), pf_s_ap(AutoPartitioner); + Perf::RegisterTest(pf_s_sp); + Perf::RegisterTest(pf_s_ap); + Test_PFor_Nested pf_hn_sp(HollowNesting, SimplePartitioner), pf_hn_ap(HollowNesting, AutoPartitioner), + pf_sn_sp(ShallowNesting, SimplePartitioner), pf_sn_ap(ShallowNesting, AutoPartitioner), + pf_dn_sp(DeepNesting, SimplePartitioner), pf_dn_ap(DeepNesting, AutoPartitioner); + Perf::RegisterTest(pf_hn_sp); + Perf::RegisterTest(pf_hn_ap); + Perf::RegisterTest(pf_sn_sp); + Perf::RegisterTest(pf_sn_ap); + Perf::RegisterTest(pf_dn_sp); + Perf::RegisterTest(pf_dn_ap); + return Perf::TestMain(argc, argv, &opts); +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/run_statistics.sh b/deal.II/bundled/tbb41_20130401oss/src/perf/run_statistics.sh new file mode 100644 index 0000000000..60c2c035fa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/run_statistics.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# Copyright 2005-2013 Intel Corporation. All Rights Reserved. +# +# This file is part of Threading Building Blocks. +# +# Threading Building Blocks is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License +# version 2 as published by the Free Software Foundation. +# +# Threading Building Blocks is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty +# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Threading Building Blocks; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# +# As a special exception, you may use this file as part of a free software +# library without restriction. Specifically, if other files instantiate +# templates or use macros or inline functions from this file, or you compile +# this file and link it with other files to produce an executable, this +# file does not by itself cause the resulting executable to be covered by +# the GNU General Public License. This exception does not however +# invalidate any other reasons why the executable file might be covered by +# the GNU General Public License. + +export LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH +#setting output format .csv, 'pivot' - is pivot table mode, ++ means append +export STAT_FORMAT=pivot-csv++ +#check existing files because of apend mode +ls *.csv +rm -i *.csv +#setting a delimiter in txt or csv file +#export STAT_DELIMITER=, +export STAT_RUNINFO1=Host=`hostname -s` +#append a suffix after the filename +#export STAT_SUFFIX=$STAT_RUNINFO1 +for ((i=1;i<=${repeat:=100};++i)); do echo $i of $repeat: && STAT_RUNINFO2=Run=$i $* || break; done diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.cpp new file mode 100644 index 0000000000..9620ede231 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.cpp @@ -0,0 +1,452 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "statistics.h" +#include "statistics_xml.h" + +#define COUNT_PARAMETERS 3 + +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + +void GetTime(char* buff,int size_buff) +{ + tm *newtime; + time_t timer; + time(&timer); + newtime=localtime(&timer); + strftime(buff,size_buff,"%H:%M:%S",newtime); +} + +void GetDate(char* buff,int size_buff) +{ + tm *newtime; + time_t timer; + time(&timer); + newtime=localtime(&timer); + strftime(buff,size_buff,"%Y-%m-%d",newtime); +} + + +StatisticsCollector::TestCase StatisticsCollector::SetTestCase(const char *name, const char *mode, int threads) +{ + string KeyName(name); + switch (SortMode) + { + case ByThreads: KeyName += Format("_%02d_%s", threads, mode); break; + default: + case ByAlg: KeyName += Format("_%s_%02d", mode, threads); break; + } + CurrentKey = Statistics[KeyName]; + if(!CurrentKey) { + CurrentKey = new StatisticResults; + CurrentKey->Mode = mode; + CurrentKey->Name = name; + CurrentKey->Threads = threads; + CurrentKey->Results.reserve(RoundTitles.size()); + Statistics[KeyName] = CurrentKey; + } + return TestCase(CurrentKey); +} + +StatisticsCollector::~StatisticsCollector() +{ + for(Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + delete i->second; +} + +void StatisticsCollector::ReserveRounds(size_t index) +{ + size_t i = RoundTitles.size(); + if (i > index) return; + char buf[16]; + RoundTitles.resize(index+1); + for(; i <= index; i++) { + snprintf( buf, 15, "%u", unsigned(i+1) ); + RoundTitles[i] = buf; + } + for(Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) { + if(!i->second) printf("!!!'%s' = NULL\n", i->first.c_str()); + else i->second->Results.reserve(index+1); + } +} + +void StatisticsCollector::AddRoundResult(const TestCase &key, value_t v) +{ + ReserveRounds(key.access->Results.size()); + key.access->Results.push_back(v); +} + +void StatisticsCollector::SetRoundTitle(size_t index, const char *fmt, ...) +{ + vargf2buff(buff, 128, fmt); + ReserveRounds(index); + RoundTitles[index] = buff; +} + +void StatisticsCollector::AddStatisticValue(const TestCase &key, const char *type, const char *fmt, ...) +{ + vargf2buff(buff, 128, fmt); + AnalysisTitles.insert(type); + key.access->Analysis[type] = buff; +} + +void StatisticsCollector::AddStatisticValue(const char *type, const char *fmt, ...) +{ + vargf2buff(buff, 128, fmt); + AnalysisTitles.insert(type); + CurrentKey->Analysis[type] = buff; +} + +void StatisticsCollector::SetRunInfo(const char *title, const char *fmt, ...) +{ + vargf2buff(buff, 256, fmt); + RunInfo.push_back(make_pair(title, buff)); +} + +void StatisticsCollector::SetStatisticFormula(const char *name, const char *formula) +{ + Formulas[name] = formula; +} + +void StatisticsCollector::SetTitle(const char *fmt, ...) +{ + vargf2buff(buff, 256, fmt); + Title = buff; +} + +string ExcelFormula(const string &fmt, size_t place, size_t rounds, bool is_horizontal) +{ + char buff[16]; + if(is_horizontal) + snprintf(buff, 15, "RC[%u]:RC[%u]", unsigned(place), unsigned(place+rounds-1)); + else + snprintf(buff, 15, "R[%u]C:R[%u]C", unsigned(place+1), unsigned(place+rounds)); + string result(fmt); size_t pos = 0; + while ( (pos = result.find("ROUNDS", pos, 6)) != string::npos ) + result.replace(pos, 6, buff); + return result; +} + +void StatisticsCollector::Print(int dataOutput, const char *ModeName) +{ + FILE *OutputFile; + const char *file_suffix = getenv("STAT_SUFFIX"); + if( !file_suffix ) file_suffix = ""; + const char *file_format = getenv("STAT_FORMAT"); + if( file_format ) { + dataOutput = 0; + if( strstr(file_format, "con")||strstr(file_format, "std") ) dataOutput |= StatisticsCollector::Stdout; + if( strstr(file_format, "txt")||strstr(file_format, "csv") ) dataOutput |= StatisticsCollector::TextFile; + if( strstr(file_format, "excel")||strstr(file_format, "xml") ) dataOutput |= StatisticsCollector::ExcelXML; + if( strstr(file_format, "htm") ) dataOutput |= StatisticsCollector::HTMLFile; + if( strstr(file_format, "pivot") ) dataOutput |= StatisticsCollector::PivotMode; + } + for(int i = 1; i < 10; i++) { + string env = Format("STAT_RUNINFO%d", i); + const char *info = getenv(env.c_str()); + if( info ) { + string title(info); + size_t pos = title.find('='); + if( pos != string::npos ) { + env = title.substr(pos+1); + title.resize(pos); + } else env = title; + RunInfo.push_back(make_pair(title, env)); + } + } + + if (dataOutput & StatisticsCollector::Stdout) + { + printf("\n-=# %s #=-\n", Title.c_str()); + if(SortMode == ByThreads) + printf(" Name | # | %s ", ModeName); + else + printf(" Name | %s | # ", ModeName); + for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++) + printf("|%s", i->c_str()+1); + + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + if(SortMode == ByThreads) + printf("\n%12s|% 5d|%6s", i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str()); + else + printf("\n%12s|%6s|% 5d", i->second->Name.c_str(), i->second->Mode.c_str(), i->second->Threads); + Analysis_t &analisis = i->second->Analysis; + AnalysisTitles_t::iterator t = AnalysisTitles.begin(); + for (Analysis_t::iterator a = analisis.begin(); a != analisis.end(); t++) + { + char fmt[8]; snprintf(fmt, 7, "|%% %us", unsigned(max(size_t(3), t->size()))); + if(*t != a->first) + printf(fmt, ""); + else { + printf(fmt, a->second.c_str()); a++; + } + } + } + printf("\n"); + } + if (dataOutput & StatisticsCollector::TextFile) + { + bool append = false; + const char *file_ext = ".txt"; + if( file_format && strstr(file_format, "++") ) append = true; + if( file_format && strstr(file_format, "csv") ) file_ext = ".csv"; + if ((OutputFile = fopen((Name+file_suffix+file_ext).c_str(), append?"at":"wt")) == NULL) { + printf("Can't open .txt file\n"); + } else { + const char *delim = getenv("STAT_DELIMITER"); + if( !delim || !delim[0] ) { + if( file_format && strstr(file_format, "csv") ) delim = ","; + else delim = "\t"; + } + if( !append || !ftell(OutputFile) ) { // header needed + append = false; + if(SortMode == ByThreads) fprintf(OutputFile, "Name%s#%s%s", delim, delim, ModeName); + else fprintf(OutputFile, "Name%s%s%s#", delim, ModeName, delim); + for( size_t k = 0; k < RunInfo.size(); k++ ) + fprintf(OutputFile, "%s%s", delim, RunInfo[k].first.c_str()); + } + if(dataOutput & StatisticsCollector::PivotMode) { + if( !append) fprintf(OutputFile, "%sColumn%sValue", delim, delim); + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + string RowHead; + if(SortMode == ByThreads) + RowHead = Format("\n%s%s%d%s%s%s", i->second->Name.c_str(), delim, i->second->Threads, delim, i->second->Mode.c_str(), delim); + else + RowHead = Format("\n%s%s%s%s%d%s", i->second->Name.c_str(), delim, i->second->Mode.c_str(), delim, i->second->Threads, delim); + for( size_t k = 0; k < RunInfo.size(); k++ ) + RowHead.append(RunInfo[k].second + delim); + Analysis_t &analisis = i->second->Analysis; + for (Analysis_t::iterator a = analisis.begin(); a != analisis.end(); ++a) + fprintf(OutputFile, "%s%s%s%s", RowHead.c_str(), a->first.c_str(), delim, a->second.c_str()); + Results_t &r = i->second->Results; + for (size_t k = 0; k < r.size(); k++) { + fprintf(OutputFile, "%s%s%s", RowHead.c_str(), RoundTitles[k].c_str(), delim); + fprintf(OutputFile, ResultsFmt, r[k]); + } + } + } else { + if( !append ) { + for( size_t k = 0; k < RunInfo.size(); k++ ) + fprintf(OutputFile, "%s%s", delim, RunInfo[k].first.c_str()); + for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++) + fprintf(OutputFile, "%s%s", delim, i->c_str()+1); + for (size_t i = 0; i < RoundTitles.size(); i++) + fprintf(OutputFile, "%s%s", delim, RoundTitles[i].c_str()); + } + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + if(SortMode == ByThreads) + fprintf(OutputFile, "\n%s%s%d%s%s", i->second->Name.c_str(), delim, i->second->Threads, delim, i->second->Mode.c_str()); + else + fprintf(OutputFile, "\n%s%s%s%s%d", i->second->Name.c_str(), delim, i->second->Mode.c_str(), delim, i->second->Threads); + for( size_t k = 0; k < RunInfo.size(); k++ ) + fprintf(OutputFile, "%s%s", delim, RunInfo[k].second.c_str()); + Analysis_t &analisis = i->second->Analysis; + AnalysisTitles_t::iterator t = AnalysisTitles.begin(); + for (Analysis_t::iterator a = analisis.begin(); a != analisis.end(); ++t) { + fprintf(OutputFile, "%s", delim); + if(*t == a->first) { + fprintf(OutputFile, "%s", a->second.c_str()); ++a; + } + } + //data + Results_t &r = i->second->Results; + for (size_t k = 0; k < r.size(); k++) + { + fprintf(OutputFile, "%s", delim); + fprintf(OutputFile, ResultsFmt, r[k]); + } + } + } + fprintf(OutputFile, "\n"); + fclose(OutputFile); + } + } + if (dataOutput & StatisticsCollector::HTMLFile) + { + if ((OutputFile = fopen((Name+file_suffix+".html").c_str(), "w+t")) == NULL) { + printf("Can't open .html file\n"); + } else { + char TimerBuff[100], DateBuff[100]; + GetTime(TimerBuff,sizeof(TimerBuff)); + GetDate(DateBuff,sizeof(DateBuff)); + fprintf(OutputFile, "\n%s\n\n", Title.c_str()); + //----------------------- + fprintf(OutputFile, "\n"); + fprintf(OutputFile, "" + "\n", ModeName); + for (AnalysisTitles_t::iterator i = AnalysisTitles.begin(); i != AnalysisTitles.end(); i++) + fprintf(OutputFile, "", i->c_str()+1); + for (size_t i = 0; i < RoundTitles.size(); i++) + fprintf(OutputFile, "", RoundTitles[i].c_str()); + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + fprintf(OutputFile, "\n", + i->second->Name.c_str(), i->second->Threads, i->second->Mode.c_str()); + //statistics + AnalysisTitles_t::iterator t = AnalysisTitles.begin(); + for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); t++) + { + fprintf(OutputFile, "", (*t != j->first)?" ":(i->second->Analysis[j->first]).c_str()); + if(*t == j->first) j++; + } + //data + Results_t &r = i->second->Results; + for (size_t k = 0; k < r.size(); k++) + { + fprintf(OutputFile, ""); + } + } + fprintf(OutputFile, "\n
    Flip[H]%s%s%s", + DateBuff, TimerBuff, unsigned(AnalysisTitles.size() + RoundTitles.size()), Title.c_str()); + for( size_t k = 0; k < RunInfo.size(); k++ ) + fprintf(OutputFile, "; %s: %s", RunInfo[k].first.c_str(), RunInfo[k].second.c_str()); + fprintf(OutputFile, "
    NameThreads%s%s%s
    %s%d%4s%s"); + fprintf(OutputFile, ResultsFmt, r[k]); + fprintf(OutputFile, "
    \n"); + ////////////////////////////////////////////////////// + fprintf(OutputFile, "\n"); + fprintf(OutputFile, "\n" + "", + DateBuff, TimerBuff, unsigned(max(Statistics.size()-2,size_t(1))), Title.c_str()); + + fprintf(OutputFile, "\n"); + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + fprintf(OutputFile, "", i->second->Name.c_str()); + fprintf(OutputFile, "\n"); + for (Statistics_t::iterator n = Statistics.begin(); n != Statistics.end(); n++) + fprintf(OutputFile, "", n->second->Threads); + fprintf(OutputFile, "\n", ModeName); + for (Statistics_t::iterator m = Statistics.begin(); m != Statistics.end(); m++) + fprintf(OutputFile, "", m->second->Mode.c_str()); + + for (AnalysisTitles_t::iterator t = AnalysisTitles.begin(); t != AnalysisTitles.end(); t++) + { + fprintf(OutputFile, "\n", t->c_str()+1); + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + fprintf(OutputFile, "", i->second->Analysis.count(*t)?i->second->Analysis[*t].c_str():" "); + } + + for (size_t r = 0; r < RoundTitles.size(); r++) + { + fprintf(OutputFile, "\n", RoundTitles[r].c_str()); + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + Results_t &result = i->second->Results; + fprintf(OutputFile, ""); + } + } + fprintf(OutputFile, "\n
    Flip[V]%s%s%s
    Name%s
    Threads%d
    %s%s
    %s%s
    %s"); + if(result.size() > r) + fprintf(OutputFile, ResultsFmt, result[r]); + fprintf(OutputFile, "
    \n\n"); + fclose(OutputFile); + } + } + if (dataOutput & StatisticsCollector::ExcelXML) + { + if ((OutputFile = fopen((Name+file_suffix+".xml").c_str(), "w+t")) == NULL) { + printf("Can't open .xml file\n"); + } else { + // TODO:PivotMode + char UserName[100]; + char TimerBuff[100], DateBuff[100]; +#if _WIN32 || _WIN64 + strcpy(UserName,getenv("USERNAME")); +#else + strcpy(UserName,getenv("USER")); +#endif + //-------------------------------- + GetTime(TimerBuff,sizeof(TimerBuff)); + GetDate(DateBuff,sizeof(DateBuff)); + //-------------------------- + fprintf(OutputFile, XMLHead, UserName, TimerBuff); + fprintf(OutputFile, XMLStyles); + fprintf(OutputFile, XMLBeginSheet, "Horizontal"); + fprintf(OutputFile, XMLNames,1,1,1,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS)); + fprintf(OutputFile, XMLBeginTable, int(RoundTitles.size()+Formulas.size()+AnalysisTitles.size()+COUNT_PARAMETERS+1/*title*/), int(Statistics.size()+1)); + fprintf(OutputFile, XMLBRow); + fprintf(OutputFile, XMLCellTopName); + fprintf(OutputFile, XMLCellTopThread); + fprintf(OutputFile, XMLCellTopMode, ModeName); + for (AnalysisTitles_t::iterator j = AnalysisTitles.begin(); j != AnalysisTitles.end(); j++) + fprintf(OutputFile, XMLAnalysisTitle, j->c_str()+1); + for (Formulas_t::iterator j = Formulas.begin(); j != Formulas.end(); j++) + fprintf(OutputFile, XMLAnalysisTitle, j->first.c_str()+1); + for (RoundTitles_t::iterator j = RoundTitles.begin(); j != RoundTitles.end(); j++) + fprintf(OutputFile, XMLAnalysisTitle, j->c_str()); + string Info = Title; + for( size_t k = 0; k < RunInfo.size(); k++ ) + Info.append("; " + RunInfo[k].first + "=" + RunInfo[k].second); + fprintf(OutputFile, XMLCellEmptyWhite, Info.c_str()); + fprintf(OutputFile, XMLERow); + //------------------------ + for (Statistics_t::iterator i = Statistics.begin(); i != Statistics.end(); i++) + { + fprintf(OutputFile, XMLBRow); + fprintf(OutputFile, XMLCellName, i->second->Name.c_str()); + fprintf(OutputFile, XMLCellThread,i->second->Threads); + fprintf(OutputFile, XMLCellMode, i->second->Mode.c_str()); + //statistics + AnalysisTitles_t::iterator at = AnalysisTitles.begin(); + for (Analysis_t::iterator j = i->second->Analysis.begin(); j != i->second->Analysis.end(); at++) + { + fprintf(OutputFile, XMLCellAnalysis, (*at != j->first)?"":(i->second->Analysis[j->first]).c_str()); + if(*at == j->first) j++; + } + //formulas + size_t place = 0; + Results_t &v = i->second->Results; + for (Formulas_t::iterator f = Formulas.begin(); f != Formulas.end(); f++, place++) + fprintf(OutputFile, XMLCellFormula, ExcelFormula(f->second, Formulas.size()-place, v.size(), true).c_str()); + //data + for (size_t k = 0; k < v.size(); k++) + { + fprintf(OutputFile, XMLCellData, v[k]); + } + if(v.size() < RoundTitles.size()) + fprintf(OutputFile, XMLMergeRow, int(RoundTitles.size() - v.size())); + fprintf(OutputFile, XMLERow); + } + //------------------------ + fprintf(OutputFile, XMLEndTable); + fprintf(OutputFile, XMLWorkSheetProperties,1,1,3,3,int(RoundTitles.size()+AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS)); + fprintf(OutputFile, XMLAutoFilter,1,1,1,int(AnalysisTitles.size()+Formulas.size()+COUNT_PARAMETERS)); + fprintf(OutputFile, XMLEndWorkSheet); + //---------------------------------------- + fprintf(OutputFile, XMLEndWorkbook); + fclose(OutputFile); + } + } +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.h b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.h new file mode 100644 index 0000000000..66f298e8a9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics.h @@ -0,0 +1,199 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Internal Intel tool + +#ifndef __STATISTICS_H__ +#define __STATISTICS_H__ + +#define _CRT_SECURE_NO_DEPRECATE 1 + +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; +typedef double value_t; + +/* + Statistical collector class. + + Resulting table output: + +---------------------------------------------------------------------------+ + | [Date] ... | + +----------+----v----+--v---+----------------+------------+-..-+------------+ + | TestName | Threads | Mode | Rounds results | Stat_type1 | .. | Stat_typeN | + +----------+---------+------+-+-+-+-..-+-+-+-+------------+-..-+------------+ + | | | | | | | .. | | | | | | | + .. ... ... .................. ...... .. + | | | | | | | .. | | | | | | | + +----------+---------+------+-+-+-+-..-+-+-+-+------------+-..-+------------+ + + Iterating table output: + +---------------------------------------------------------------------------+ + | [Date] <TestName>, Threads: <N>, Mode: <M>; for <Title>... | + +----------+----v----+--v---+----------------+------------+-..-+------------+ + +*/ + +class StatisticsCollector +{ +public: + typedef map<string, string> Analysis_t; + typedef vector<value_t> Results_t; + +protected: + StatisticsCollector(const StatisticsCollector &); + + struct StatisticResults + { + string Name; + string Mode; + int Threads; + Results_t Results; + Analysis_t Analysis; + }; + + // internal members + //bool OpenFile; + StatisticResults *CurrentKey; + string Title; + const char /**Name,*/ *ResultsFmt; + string Name; + //! Data + typedef map<string, StatisticResults*> Statistics_t; + Statistics_t Statistics; + typedef vector<string> RoundTitles_t; + RoundTitles_t RoundTitles; + //TODO: merge those into one structure + typedef map<string, string> Formulas_t; + Formulas_t Formulas; + typedef set<string> AnalysisTitles_t; + AnalysisTitles_t AnalysisTitles; + typedef vector<pair<string, string> > RunInfo_t; + RunInfo_t RunInfo; + +public: + struct TestCase { + StatisticResults *access; + TestCase() : access(0) {} + TestCase(StatisticResults *link) : access(link) {} + const char *getName() const { return access->Name.c_str(); } + const char *getMode() const { return access->Mode.c_str(); } + int getThreads() const { return access->Threads; } + const Results_t &getResults() const { return access->Results; } + const Analysis_t &getAnalysis() const { return access->Analysis; } + }; + + enum Sorting { + ByThreads, ByAlg + }; + + //! Data and output types + enum DataOutput { + // Verbosity level enumeration + Statistic = 1, //< Analytical data - computed after all iterations and rounds passed + Result = 2, //< Testing data - collected after all iterations passed + Iteration = 3, //< Verbose data - collected at each iteration (for each size - in case of containers) + // ExtraVerbose is not applicabe yet :) be happy, but flexibility is always welcome + + // Next constants are bit-fields + Stdout = 1<<8, //< Output to the console + TextFile = 1<<9, //< Output to plain text file "name.txt" (delimiter is TAB by default) + ExcelXML = 1<<10, //< Output to Excel-readable XML-file "name.xml" + HTMLFile = 1<<11, //< Output to HTML file "name.html" + PivotMode= 1<<15 //< Puts all the rounds into one columt to better fit for pivot table in Excel + }; + + //! Constructor. Specify tests set name which used as name of output files + StatisticsCollector(const char *name, Sorting mode = ByThreads, const char *fmt = "%g") + : CurrentKey(NULL), ResultsFmt(fmt), Name(name), SortMode(mode) {} + + ~StatisticsCollector(); + + //! Set tests set title, supporting printf-like arguments + void SetTitle(const char *fmt, ...); + + //! Specify next test key + TestCase SetTestCase(const char *name, const char *mode, int threads); + //! Specify next test key + void SetTestCase(const TestCase &t) { SetTestCase(t.getName(), t.getMode(), t.getThreads()); } + //! Reserve specified number of rounds. Use for effeciency. Used mostly internally + void ReserveRounds(size_t index); + //! Add result of the measure + void AddRoundResult(const TestCase &, value_t v); + //! Add result of the current measure + void AddRoundResult(value_t v) { if(CurrentKey) AddRoundResult(TestCase(CurrentKey), v); } + //! Add title of round + void SetRoundTitle(size_t index, const char *fmt, ...); + //! Add numbered title of round + void SetRoundTitle(size_t index, int num) { SetRoundTitle(index, "%d", num); } + //! Get number of rounds + size_t GetRoundsCount() const { return RoundTitles.size(); } + // Set statistic value for the test + void AddStatisticValue(const TestCase &, const char *type, const char *fmt, ...); + // Set statistic value for the current test + void AddStatisticValue(const char *type, const char *fmt, ...); + //! Add Excel-processing formulas. @arg formula can contain more than one instances of + //! ROUNDS template which transforms into the range of cells with result values + //TODO://! #1 .. #n templates represent data cells from the first to the last + //TODO: merge with Analisis + void SetStatisticFormula(const char *name, const char *formula); + //! Add information about run or compile parameters + void SetRunInfo(const char *title, const char *fmt, ...); + void SetRunInfo(const char *title, int num) { SetRunInfo(title, "%d", num); } + + //! Data output + void Print(int dataOutput, const char *ModeName = "Mode"); + +private: + Sorting SortMode; +}; + +//! using: Func(const char *fmt, ...) { vargf2buff(buff, 128, fmt);... +#define vargf2buff(name, size, fmt) \ + char name[size]; memset(name, 0, size); \ + va_list args; va_start(args, fmt); \ + vsnprintf(name, size-1, fmt, args); \ + va_end(args); + + +inline std::string Format(const char *fmt, ...) { + vargf2buff(buf, 1024, fmt); // from statistics.h + return std::string(buf); +} + +#ifdef STATISTICS_INLINE +#include "statistics.cpp" +#endif +#endif //__STATISTICS_H__ diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/statistics_xml.h b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics_xml.h new file mode 100644 index 0000000000..db5b42f44c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/statistics_xml.h @@ -0,0 +1,208 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +const char XMLBRow[]= +" <Row>\n"; + +const char XMLERow[]= +" </Row>\n"; + +const char XMLHead[]= +"<?xml version=\"1.0\"?>\n" +"<?mso-application progid=\"Excel.Sheet\"?>\n\ +<Workbook xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"\n\ + xmlns:o=\"urn:schemas-microsoft-com:office:office\"\n\ + xmlns:x=\"urn:schemas-microsoft-com:office:excel\"\n\ + xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\"\n\ + xmlns:html=\"http://www.w3.org/TR/REC-html40\">\n\ + <DocumentProperties xmlns=\"urn:schemas-microsoft-com:office:office\">\n\ + <Author>%s</Author>\n\ + <Created>%s</Created>\n\ + <Company>Intel Corporation</Company>\n\ + </DocumentProperties>\n\ + <ExcelWorkbook xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\ + <RefModeR1C1/>\n\ + </ExcelWorkbook>\n"; + + const char XMLStyles[]= + " <Styles>\n\ + <Style ss:ID=\"Default\" ss:Name=\"Normal\">\n\ + <Alignment ss:Vertical=\"Bottom\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\ + </Style>\n\ + <Style ss:ID=\"s26\">\n\ + <Alignment ss:Vertical=\"Top\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\ + <Borders>\n\ + <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + </Borders>\n\ + <Interior ss:Color=\"#FFFF99\" ss:Pattern=\"Solid\"/>\n\ + </Style>\n\ + <Style ss:ID=\"s25\">\n\ + <Alignment ss:Vertical=\"Top\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\ + <Borders>\n\ + <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + </Borders>\n\ + <Interior ss:Color=\"#CCFFFF\" ss:Pattern=\"Solid\"/>\n\ + </Style>\n\ + <Style ss:ID=\"s24\">\n\ + <Alignment ss:Vertical=\"Top\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\ + <Borders>\n\ + <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + </Borders>\n\ + <Interior ss:Color=\"#CCFFCC\" ss:Pattern=\"Solid\"/>\n\ + </Style>\n\ + <Style ss:ID=\"s23\">\n\ + <Alignment ss:Vertical=\"Top\" ss:Horizontal=\"Left\" ss:WrapText=\"0\"/>\n\ + <Borders>\n\ + <Border ss:Position=\"Bottom\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Left\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Right\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + <Border ss:Position=\"Top\" ss:LineStyle=\"Continuous\" ss:Weight=\"1\"/>\n\ + </Borders>\n\ + </Style>\n\ + </Styles>\n"; + +const char XMLBeginSheet[]= +" <Worksheet ss:Name=\"%s\">\n"; + +const char XMLNames[]= +" <Names>\n\ + <NamedRange ss:Name=\"_FilterDatabase\" ss:RefersTo=\"R%dC%d:R%dC%d\" ss:Hidden=\"1\"/>\n\ + </Names>\n"; + +const char XMLBeginTable[]= +" <Table ss:ExpandedColumnCount=\"%d\" ss:ExpandedRowCount=\"%d\" x:FullColumns=\"1\"\n\ + x:FullRows=\"1\">\n"; + +const char XMLColumsHorizontalTable[]= +" <Column ss:Index=\"1\" ss:Width=\"108.75\"/>\n\ + <Column ss:Index=\"%d\" ss:Width=\"77.25\" ss:Span=\"%d\"/>\n"; + +const char XMLColumsVerticalTable[]= +" <Column ss:Index=\"1\" ss:Width=\"77.25\" ss:Span=\"%d\"/>\n"; + +const char XMLNameAndTime[]= +" <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n\ + <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n\ + <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLTableParamAndTitle[]= +" <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\ + <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\ + <Cell><Data ss:Type=\"Number\">%d</Data></Cell>\n\ + <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +//-------------- +const char XMLCellTopName[]= +" <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">Name</Data></Cell>\n"; +const char XMLCellTopThread[]= +" <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">Threads</Data></Cell>\n"; +const char XMLCellTopMode[]= +" <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">%s</Data></Cell>\n"; +//--------------------- +const char XMLAnalysisTitle[]= +" <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLCellName[]= +" <Cell ss:StyleID=\"s24\"><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLCellThread[]= +" <Cell ss:StyleID=\"s24\"><Data ss:Type=\"Number\">%d</Data></Cell>\n"; + +const char XMLCellMode[]= +" <Cell ss:StyleID=\"s24\"><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLCellAnalysis[]= +" <Cell ss:StyleID=\"s26\"><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLCellFormula[]= +" <Cell ss:StyleID=\"s26\" ss:Formula=\"%s\"><Data ss:Type=\"Number\"></Data></Cell>\n"; + +const char XMLCellData[]= +" <Cell ss:StyleID=\"s23\"><Data ss:Type=\"Number\">%g</Data></Cell>\n"; + +const char XMLMergeRow[]= +" <Cell ss:StyleID=\"s23\" ss:MergeAcross=\"%d\" ><Data ss:Type=\"String\"></Data></Cell>\n"; + +const char XMLCellEmptyWhite[]= +" <Cell><Data ss:Type=\"String\">%s</Data></Cell>\n"; + +const char XMLCellEmptyTitle[]= +" <Cell ss:StyleID=\"s25\"><Data ss:Type=\"String\"></Data></Cell>\n"; + +const char XMLEndTable[]= +" </Table>\n"; + +const char XMLAutoFilter[]= +" <AutoFilter x:Range=\"R%dC%d:R%dC%d\" xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\ + </AutoFilter>\n"; + +const char XMLEndWorkSheet[]= + " </Worksheet>\n"; + +const char XMLWorkSheetProperties[]= +" <WorksheetOptions xmlns=\"urn:schemas-microsoft-com:office:excel\">\n\ + <Unsynced/>\n\ + <Selected/>\n\ + <FreezePanes/>\n\ + <FrozenNoSplit/>\n\ + <SplitHorizontal>%d</SplitHorizontal>\n\ + <TopRowBottomPane>%d</TopRowBottomPane>\n\ + <SplitVertical>%d</SplitVertical>\n\ + <LeftColumnRightPane>%d</LeftColumnRightPane>\n\ + <ActivePane>0</ActivePane>\n\ + <Panes>\n\ + <Pane>\n\ + <Number>3</Number>\n\ + </Pane>\n\ + <Pane>\n\ + <Number>1</Number>\n\ + </Pane>\n\ + <Pane>\n\ + <Number>2</Number>\n\ + </Pane>\n\ + <Pane>\n\ + <Number>0</Number>\n\ + <ActiveRow>0</ActiveRow>\n\ + <ActiveCol>%d</ActiveCol>\n\ + </Pane>\n\ + </Panes>\n\ + <ProtectObjects>False</ProtectObjects>\n\ + <ProtectScenarios>False</ProtectScenarios>\n\ + </WorksheetOptions>\n"; + +const char XMLEndWorkbook[]= + "</Workbook>\n"; diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_framework.h b/deal.II/bundled/tbb41_20130401oss/src/perf/time_framework.h new file mode 100644 index 0000000000..3fe73dbd65 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_framework.h @@ -0,0 +1,359 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TIME_FRAMEWORK_H__ +#define __TIME_FRAMEWORK_H__ + +#include <cstdlib> +#include <math.h> +#include <vector> +#include <string> +#include <sstream> +#include "tbb/tbb_stddef.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/tick_count.h" +#define HARNESS_CUSTOM_MAIN 1 +#include "../test/harness.h" +#include "../test/harness_barrier.h" +#define STATISTICS_INLINE +#include "statistics.h" + +#ifndef ARG_TYPE +typedef intptr_t arg_t; +#else +typedef ARG_TYPE arg_t; +#endif + +class Timer { + tbb::tick_count tick; +public: + Timer() { tick = tbb::tick_count::now(); } + double get_time() { return (tbb::tick_count::now() - tick).seconds(); } + double diff_time(const Timer &newer) { return (newer.tick - tick).seconds(); } + double mark_time() { tbb::tick_count t1(tbb::tick_count::now()), t2(tick); tick = t1; return (t1 - t2).seconds(); } + double mark_time(const Timer &newer) { tbb::tick_count t(tick); tick = newer.tick; return (tick - t).seconds(); } +}; + +class TesterBase /*: public tbb::internal::no_copy*/ { +protected: + friend class TestProcessor; + friend class TestRunner; + + //! it is barrier for synchronizing between threads + Harness::SpinBarrier *barrier; + + //! number of tests per this tester + const int tests_count; + + //! number of threads to operate + int threads_count; + + //! some value for tester + arg_t value; + + //! tester name + const char *tester_name; + + // avoid false sharing + char pad[128 - sizeof(arg_t) - sizeof(int)*2 - sizeof(void*)*2 ]; + +public: + //! init tester base. @arg ntests is number of embeded tests in this tester. + TesterBase(int ntests) + : barrier(NULL), tests_count(ntests) + {} + virtual ~TesterBase() {} + + //! internal function + void base_init(arg_t v, int t, Harness::SpinBarrier &b) { + threads_count = t; + barrier = &b; + value = v; + init(); + } + + //! optionally override to init after value and threads count were set. + virtual void init() { } + + //! Override to provide your names + virtual std::string get_name(int testn) { + return Format("test %d", testn); + } + + //! optionally override to init test mode just before execution for a given thread number. + virtual void test_prefix(int testn, int threadn) { } + + //! Override to provide main test's entry function returns a value to record + virtual value_t test(int testn, int threadn) = 0; + + //! Type of aggregation from results of threads + enum result_t { + SUM, AVG, MIN, MAX + }; + + //! Override to change result type for the test. Return postfix for test name or 0 if result type is not needed. + virtual const char *get_result_type(int /*testn*/, result_t type) const { + return type == AVG ? "" : 0; // only average result by default + } +}; + +/***** +a user's tester concept: + +class tester: public TesterBase { +public: + //! init tester with known amount of work + tester() : TesterBase(<user-specified tests count>) { ... } + + //! run a test with sequental number @arg test_number for @arg thread. + / *override* / value_t test(int test_number, int thread); +}; + +******/ + +template<typename Tester, int scale = 1> +class TimeTest : public Tester { + /*override*/ value_t test(int testn, int threadn) { + Timer timer; + Tester::test(testn, threadn); + return timer.get_time() * double(scale); + } +}; + +template<typename Tester> +class NanosecPerValue : public Tester { + /*override*/ value_t test(int testn, int threadn) { + Timer timer; + Tester::test(testn, threadn); + // return time (ns) per value + return timer.get_time()*1000000.0/double(Tester::value); + } +}; + +template<typename Tester, int scale = 1> +class ValuePerSecond : public Tester { + /*override*/ value_t test(int testn, int threadn) { + Timer timer; + Tester::test(testn, threadn); + // return value per seconds/scale + return double(Tester::value)/(timer.get_time()*scale); + } +}; + +template<typename Tester, int scale = 1> +class NumberPerSecond : public Tester { + /*override*/ value_t test(int testn, int threadn) { + Timer timer; + Tester::test(testn, threadn); + // return a scale per seconds + return double(scale)/timer.get_time(); + } +}; + +// operate with single tester +class TestRunner { + friend class TestProcessor; + friend struct RunArgsBody; + TestRunner(const TestRunner &); // don't copy + + const char *tester_name; + StatisticsCollector *stat; + std::vector<std::vector<StatisticsCollector::TestCase> > keys; + +public: + TesterBase &tester; + + template<typename Test> + TestRunner(const char *name, Test *test) + : tester_name(name), tester(*static_cast<TesterBase*>(test)) + { + test->tester_name = name; + } + + ~TestRunner() { delete &tester; } + + void init(arg_t value, int threads, Harness::SpinBarrier &barrier, StatisticsCollector *s) { + tester.base_init(value, threads, barrier); + stat = s; + keys.resize(tester.tests_count); + for(int testn = 0; testn < tester.tests_count; testn++) { + keys[testn].resize(threads); + std::string test_name(tester.get_name(testn)); + for(int threadn = 0; threadn < threads; threadn++) + keys[testn][threadn] = stat->SetTestCase(tester_name, test_name.c_str(), threadn); + } + } + + void run_test(int threadn) { + for(int testn = 0; testn < tester.tests_count; testn++) { + tester.test_prefix(testn, threadn); + tester.barrier->wait(); // <<<<<<<<<<<<<<<<< Barrier before running test mode + value_t result = tester.test(testn, threadn); + stat->AddRoundResult(keys[testn][threadn], result); + } + } + + void post_process(StatisticsCollector &report) { + const int threads = tester.threads_count; + for(int testn = 0; testn < tester.tests_count; testn++) { + size_t coln = keys[testn][0].getResults().size()-1; + value_t rsum = keys[testn][0].getResults()[coln]; + value_t rmin = rsum, rmax = rsum; + for(int threadn = 1; threadn < threads; threadn++) { + value_t result = keys[testn][threadn].getResults()[coln]; + rsum += result; // for both SUM or AVG + if(rmin > result) rmin = result; + if(rmax < result) rmax = result; + } + std::string test_name(tester.get_name(testn)); + const char *rname = tester.get_result_type(testn, TesterBase::SUM); + if( rname ) { + report.SetTestCase(tester_name, (test_name+rname).c_str(), threads); + report.AddRoundResult(rsum); + } + rname = tester.get_result_type(testn, TesterBase::MIN); + if( rname ) { + report.SetTestCase(tester_name, (test_name+rname).c_str(), threads); + report.AddRoundResult(rmin); + } + rname = tester.get_result_type(testn, TesterBase::AVG); + if( rname ) { + report.SetTestCase(tester_name, (test_name+rname).c_str(), threads); + report.AddRoundResult(rsum / threads); + } + rname = tester.get_result_type(testn, TesterBase::MAX); + if( rname ) { + report.SetTestCase(tester_name, (test_name+rname).c_str(), threads); + report.AddRoundResult(rmax); + } + } + } +}; + +struct RunArgsBody { + const vector<TestRunner*> &run_list; + RunArgsBody(const vector<TestRunner*> &a) : run_list(a) { } +#ifndef __TBB_parallel_for_H + void operator()(int thread) const { +#else + void operator()(const tbb::blocked_range<int> &r) const { + ASSERT( r.begin() + 1 == r.end(), 0); + int thread = r.begin(); +#endif + for(size_t i = 0; i < run_list.size(); i++) + run_list[i]->run_test(thread); + } +}; + +//! Main test processor. +/** Override or use like this: + class MyTestCollection : public TestProcessor { + void factory(arg_t value, int threads) { + process( value, threads, + run("my1", new tester<my1>() ), + run("my2", new tester<my2>() ), + end ); + if(value == threads) + stat->Print(); + } +}; +*/ + +class TestProcessor { + friend class TesterBase; + + // <threads, collector> + typedef std::map<int, StatisticsCollector *> statistics_collection; + statistics_collection stat_by_threads; + +protected: + // Members + const char *collection_name; + // current stat + StatisticsCollector *stat; + // token + size_t end; + +public: + StatisticsCollector report; + + // token of tests list + template<typename Test> + TestRunner *run(const char *name, Test *test) { + return new TestRunner(name, test); + } + + // iteration processing + void process(arg_t value, int threads, ...) { + // prepare items + stat = stat_by_threads[threads]; + if(!stat) { + stat_by_threads[threads] = stat = new StatisticsCollector((collection_name + Format("@%d", threads)).c_str(), StatisticsCollector::ByAlg); + stat->SetTitle("Detailed log of %s running with %d threads.", collection_name, threads); + } + Harness::SpinBarrier barrier(threads); + // init args + va_list args; va_start(args, threads); + vector<TestRunner*> run_list; run_list.reserve(16); + while(true) { + TestRunner *item = va_arg(args, TestRunner*); + if( !item ) break; + item->init(value, threads, barrier, stat); + run_list.push_back(item); + } + va_end(args); + std::ostringstream buf; + buf << value; + const size_t round_number = stat->GetRoundsCount(); + stat->SetRoundTitle(round_number, buf.str().c_str()); + report.SetRoundTitle(round_number, buf.str().c_str()); + // run them +#ifndef __TBB_parallel_for_H + NativeParallelFor(threads, RunArgsBody(run_list)); +#else + tbb::parallel_for(tbb::blocked_range<int>(0,threads,1), RunArgsBody(run_list)); +#endif + // destroy args + for(size_t i = 0; i < run_list.size(); i++) { + run_list[i]->post_process(report); + delete run_list[i]; + } + } + +public: + TestProcessor(const char *name, StatisticsCollector::Sorting sort_by = StatisticsCollector::ByAlg) + : collection_name(name), stat(NULL), end(0), report(collection_name, sort_by) + { } + + ~TestProcessor() { + for(statistics_collection::iterator i = stat_by_threads.begin(); i != stat_by_threads.end(); i++) + delete i->second; + } +}; + +#endif// __TIME_FRAMEWORK_H__ diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map.cpp new file mode 100644 index 0000000000..7ba99e05ec --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map.cpp @@ -0,0 +1,269 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// configuration: +#define TBB_USE_THREADING_TOOLS 0 + +//! enable/disable std::map tests +#define STDTABLE 0 + +//! enable/disable old implementation tests (correct include file also) +#define OLDTABLE 0 +#define OLDTABLEHEADER "tbb/concurrent_hash_map-5468.h"//-4329 + +//! enable/disable experimental implementation tests (correct include file also) +#define TESTTABLE 1 +#define TESTTABLEHEADER "tbb/concurrent_unordered_map.h" + +//! avoid erase() +#define TEST_ERASE 0 + +////////////////////////////////////////////////////////////////////////////////// + +#include <cstdlib> +#include <math.h> +#include "tbb/tbb_stddef.h" +#include <vector> +#include <map> +// needed by hash_maps +#include <stdexcept> +#include <iterator> +#include <algorithm> // std::swap +#include <utility> // Need std::pair from here +#include "tbb/cache_aligned_allocator.h" +#include "tbb/tbb_allocator.h" +#include "tbb/spin_rw_mutex.h" +#include "tbb/aligned_space.h" +#include "tbb/atomic.h" +#define __TBB_concurrent_unordered_set_H +#include "tbb/internal/_concurrent_unordered_impl.h" +#undef __TBB_concurrent_unordered_set_H +// for test +#include "tbb/spin_mutex.h" +#include "time_framework.h" + + +using namespace tbb; +using namespace tbb::internal; + +struct IntHashCompare { + size_t operator() ( int x ) const { return x; } + bool operator() ( int x, int y ) const { return x==y; } + static long hash( int x ) { return x; } + bool equal( int x, int y ) const { return x==y; } +}; + +namespace version_current { + namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } } + namespace tbb { namespace interface5 { using namespace ::tbb::interface5; namespace internal { using namespace ::tbb::interface5::internal; } } } + #include "tbb/concurrent_hash_map.h" +} +typedef version_current::tbb::concurrent_hash_map<int,int> IntTable; + +#if OLDTABLE +#undef __TBB_concurrent_hash_map_H +namespace version_base { + namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } } + namespace tbb { namespace interface5 { using namespace ::tbb::interface5; namespace internal { using namespace ::tbb::interface5::internal; } } } + #include OLDTABLEHEADER +} +typedef version_base::tbb::concurrent_hash_map<int,int> OldTable; +#endif + +#if TESTTABLE +#undef __TBB_concurrent_hash_map_H +namespace version_new { + namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } } + namespace tbb { namespace interface5 { using namespace ::tbb::interface5; namespace internal { using namespace ::tbb::interface5::internal; } } } + #include TESTTABLEHEADER +} +typedef version_new::tbb::concurrent_unordered_map<int,int> TestTable; +#define TESTTABLE 1 +#endif + +/////////////////////////////////////// + +static const char *map_testnames[] = { + "1.insert", "2.count1st", "3.count2nd", "4.insert existing", "5.erase" +}; + +template<typename TableType> +struct TestTBBMap : TesterBase { + TableType Table; + int n_items; + + TestTBBMap() : TesterBase(4+TEST_ERASE), Table(MaxThread*4) {} + void init() { n_items = value/threads_count; } + + std::string get_name(int testn) { + return std::string(map_testnames[testn]); + } + + double test(int test, int t) + { + switch(test) { + case 0: // fill + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + Table.insert( std::make_pair(i,i) ); + } + break; + case 1: // work1 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + size_t c = Table.count( i ); + ASSERT( c == 1, NULL); + } + break; + case 2: // work2 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + Table.count( i ); + } + break; + case 3: // work3 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + Table.insert( std::make_pair(i,i) ); + } + break; +#if TEST_ERASE + case 4: // clean + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + ASSERT( Table.erase( i ), NULL); + } +#endif + } + return 0; + } +}; + +template<typename M> +struct TestSTLMap : TesterBase { + std::map<int, int> Table; + M mutex; + + int n_items; + TestSTLMap() : TesterBase(4+TEST_ERASE) {} + void init() { n_items = value/threads_count; } + + std::string get_name(int testn) { + return std::string(map_testnames[testn]); + } + + double test(int test, int t) + { + switch(test) { + case 0: // fill + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + typename M::scoped_lock with(mutex); + Table[i] = 0; + } + break; + case 1: // work1 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + typename M::scoped_lock with(mutex); + size_t c = Table.count(i); + ASSERT( c == 1, NULL); + } + break; + case 2: // work2 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + typename M::scoped_lock with(mutex); + Table.count(i); + } + break; + case 3: // work3 + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + typename M::scoped_lock with(mutex); + Table.insert(std::make_pair(i,i)); + } + break; + case 4: // clean + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + typename M::scoped_lock with(mutex); + Table.erase(i); + } + } + return 0; + } +}; + +class fake_mutex { +public: + class scoped_lock { + fake_mutex *p; + + public: + scoped_lock() {} + scoped_lock( fake_mutex &m ) { p = &m; } + ~scoped_lock() { } + void acquire( fake_mutex &m ) { p = &m; } + void release() { } + }; +}; + +class test_hash_map : public TestProcessor { +public: + test_hash_map() : TestProcessor("test_hash_map") {} + void factory(int value, int threads) { + if(Verbose) printf("Processing with %d threads: %d...\n", threads, value); + process( value, threads, +#if STDTABLE + run("std::map ", new NanosecPerValue<TestSTLMap<spin_mutex> >() ), +#endif +#if OLDTABLE + run("old::hmap", new NanosecPerValue<TestTBBMap<OldTable> >() ), +#endif + run("tbb::hmap", new NanosecPerValue<TestTBBMap<IntTable> >() ), +#if TESTTABLE + run("new::hmap", new NanosecPerValue<TestTBBMap<TestTable> >() ), +#endif + end ); + //stat->Print(StatisticsCollector::Stdout); + //if(value >= 2097152) stat->Print(StatisticsCollector::HTMLFile); + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +int main(int argc, char* argv[]) { + if(argc>1) Verbose = true; + //if(argc>2) ExtraVerbose = true; + MinThread = 1; MaxThread = task_scheduler_init::default_num_threads(); + ParseCommandLine( argc, argv ); + + ASSERT(tbb_allocator<int>::allocator_type() == tbb_allocator<int>::scalable, "expecting scalable allocator library to be loaded. Please build it by:\n\t\tmake tbbmalloc"); + + { + test_hash_map the_test; + for( int t=MinThread; t <= MaxThread; t++) + for( int o=/*2048*/(1<<8)*8; o<2200000; o*=2 ) + the_test.factory(o, t); + the_test.report.SetTitle("Nanoseconds per operation of (Mode) for N items in container (Name)"); + the_test.report.SetStatisticFormula("1AVG per size", "=AVERAGE(ROUNDS)"); + the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); + } + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.cpp new file mode 100644 index 0000000000..508d01caa1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.cpp @@ -0,0 +1,173 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// configuration: + +// Size of final table (must be multiple of STEP_*) +int MAX_TABLE_SIZE = 2000000; + +// Specify list of unique percents (5-30,100) to test against. Max 10 values +#define UNIQUE_PERCENTS PERCENT(5); PERCENT(10); PERCENT(20); PERCENT(30); PERCENT(100) + +// enable/disable tests for: +#define BOX1 "CHMap" +#define BOX1TEST ValuePerSecond<Uniques<tbb::concurrent_hash_map<int,int> >, 1000000/*ns*/> +#define BOX1HEADER "tbb/concurrent_hash_map.h" + +// enable/disable tests for: +#define BOX2 "CUMap" +#define BOX2TEST ValuePerSecond<Uniques<tbb::concurrent_unordered_map<int,int> >, 1000000/*ns*/> +#define BOX2HEADER "tbb/concurrent_unordered_map.h" + +// enable/disable tests for: +//#define BOX3 "OLD" +#define BOX3TEST ValuePerSecond<Uniques<tbb::concurrent_hash_map<int,int> >, 1000000/*ns*/> +#define BOX3HEADER "tbb/concurrent_hash_map-5468.h" + +#define TBB_USE_THREADING_TOOLS 0 +////////////////////////////////////////////////////////////////////////////////// + +#include <cstdlib> +#include <math.h> +#include "tbb/tbb_stddef.h" +#include <vector> +#include <map> +// needed by hash_maps +#include <stdexcept> +#include <iterator> +#include <algorithm> // std::swap +#include <utility> // Need std::pair +#include <cstring> // Need std::memset +#include <typeinfo> +#include "tbb/cache_aligned_allocator.h" +#include "tbb/tbb_allocator.h" +#include "tbb/spin_rw_mutex.h" +#include "tbb/aligned_space.h" +#include "tbb/atomic.h" +#define __TBB_concurrent_unordered_set_H +#include "tbb/internal/_concurrent_unordered_impl.h" +#undef __TBB_concurrent_unordered_set_H +// for test +#include "tbb/spin_mutex.h" +#include "time_framework.h" + + +using namespace tbb; +using namespace tbb::internal; + +///////////////////////////////////////////////////////////////////////////////////////// +// Input data built for test +int *Data; + +// Main test class used to run the timing tests. All overridden methods are called by the framework +template<typename TableType> +struct Uniques : TesterBase { + TableType Table; + int n_items; + + // Initializes base class with number of test modes + Uniques() : TesterBase(2), Table(MaxThread*16) { + //Table->max_load_factor(1); // add stub into hash_map to uncomment it + } + ~Uniques() {} + + // Returns name of test mode specified by number + /*override*/ std::string get_name(int testn) { + if(testn == 1) return "find"; + return "insert"; + } + + // Informs the class that value and threads number become known + /*override*/ void init() { + n_items = value/threads_count; // operations + } + + // Informs the class that the test mode for specified thread is about to start + /*override*/ void test_prefix(int testn, int t) { + barrier->wait(); + if(Verbose && !t && testn) printf("%s: inserted %u, %g%% of operations\n", tester_name, unsigned(Table.size()), 100.0*Table.size()/(value*testn)); + } + + // Executes test mode for a given thread. Return value is ignored when used with timing wrappers. + /*override*/ double test(int testn, int t) + { + if( testn != 1 ) { // do insertions + for(int i = testn*value+t*n_items, e = testn*value+(t+1)*n_items; i < e; i++) { + Table.insert( std::make_pair(Data[i],t) ); + } + } else { // do last finds + for(int i = t*n_items, e = (t+1)*n_items; i < e; i++) { + size_t c = + Table.count( Data[i] ); + ASSERT( c == 1, NULL ); // must exist + } + } + return 0; + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// +#undef max +#include <limits> + +// Using BOX declarations from configuration +#include "time_sandbox.h" + +int rounds = 0; +// Prepares the input data for given unique percent +void execute_percent(test_sandbox &the_test, int p) { + int input_size = MAX_TABLE_SIZE*100/p; + Data = new int[input_size]; + int uniques = p==100?std::numeric_limits<int>::max() : MAX_TABLE_SIZE; + ASSERT(p==100 || p <= 30, "Function is broken for %% > 30 except for 100%%"); + for(int i = 0; i < input_size; i++) + Data[i] = rand()%uniques; + for(int t = MinThread; t <= MaxThread; t++) + the_test.factory(input_size, t); // executes the tests specified in BOX-es for given 'value' and threads + the_test.report.SetRoundTitle(rounds++, "%d%%", p); +} +#define PERCENT(x) execute_percent(the_test, x) + +int main(int argc, char* argv[]) { + if(argc>1) Verbose = true; + //if(argc>2) ExtraVerbose = true; + MinThread = 1; MaxThread = task_scheduler_init::default_num_threads(); + ParseCommandLine( argc, argv ); + if(getenv("TABLE_SIZE")) + MAX_TABLE_SIZE = atoi(getenv("TABLE_SIZE")); + + ASSERT(tbb_allocator<int>::allocator_type() == tbb_allocator<int>::scalable, "expecting scalable allocator library to be loaded. Please build it by:\n\t\tmake tbbmalloc"); + // Declares test processor + test_sandbox the_test("time_hash_map_fill"/*, StatisticsCollector::ByThreads*/); + srand(10101); + UNIQUE_PERCENTS; // test the percents + the_test.report.SetTitle("Operations per nanosecond"); + the_test.report.SetRunInfo("Items", MAX_TABLE_SIZE); + the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); // Write files + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.html b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.html new file mode 100644 index 0000000000..c43bb43663 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_hash_map_fill.html @@ -0,0 +1,120 @@ +<HTML><BODY> +<H2>time_hash_map_fill</H2> +<P><a href=time_hash_map_fill.cpp>time_hash_map_fill.cpp</a> is a micro-benchmark specifically designed to highlight aspects of concurrent resizing algorithm of the hash tables. +It was derived from the Count Strings example that counts the number of unique words. But to exclude synchronization on the counters from the picture, +it was simplified to build just a set of unique numbers from an input array. The array is filled evenly by using a pseudo-random number generator from the standard C library for various proportions of unique numbers. +For example, for 5% of unique numbers, the same number is repeated 20 times on average. Together, it gives 5% of actual insertions and 95% are just lookups. However, in the beginning, there are more new keys occur than in the end. +In addition, a size of the source array correlates with input rates in order to produce the same number of unique keys at the end, and so exclude cache effects from the equation. +<H2>Diagram</H2><img src="time_hash_map_fill.gif"> +<H3>Prepare results</H3> +<P>This benchmark outputs results in Excel* and html file formats by default. To generate text (CSV) file instead, specify STAT_FORMAT=pivot-csv evironment variable. To change the default table size, set TABLE_SIZE. +<code><b><pre>src$ make time_hash_map_fill args=-v STAT_FORMAT=pivot-csv TABLE_SIZE=250000</pre></b></code>Or to get statistics from different runs: +<code><b><pre>src$ make time_hash_map_fill TABLE_SIZE=50000 run_cmd="bash ../../src/perf/<a href=run_statistics.sh>run_statistics.sh</a>"</pre></b></code> +<H3>Build diagram</H3>You can use <a href="http://ploticus.sourceforge.net/">Ploticus</a> to build diagram from the prepared data using this html file as a script. But first, the input data file should be sorted to join lines from different runs together, e.g.: +<code><b><pre>src$ sort -t , -k 1dr,2 -k 3n,4 -k 7n,7 ../build/<i>{scrambled_path}</i>/time_hash_map_fill.csv -o perf/time_hash_map_fill.csv</pre></b></code>Here, field 7 is "Column" field that contains input rates because run_statistics.sh adds hostname and number of the run as 5 and 6 fields. Now, to build gif diagram, run: +<code><b><pre>perf$ pl -maxrows 200000 -maxfields 1500000 -maxvector 1200000 -gif -scale 1.8 time_hash_map_fill.html</pre></b></code> +<H3>Script body</H3> +<hr><pre> + +#setifnotgiven NAMES = $makelist("1.CHMap 2.CUMap 3.OLD") +#setifnotgiven LABLESIZE = 0.06 + +#proc settings + encodenames: yes + units: cm + +#proc getdata + file: time_hash_map_fill.csv + fieldnameheader: yes + delim: comma + showdata: no + select: @@Mode = insert + pf_fieldnames: Name Mode Threads Value + filter: + ##print @@Name,"@@Items on @@Column",@@3,@@Value + +#endproc + +#proc page + pagesize: 70 50 + tightcrop: yes +#endproc + +#proc processdata + action: summary + fields: Name Mode Threads + valfield: Value + fieldnames: Name Mode Threads Average sd sem n_obs Min Max + showdata: no + +#proc categories + axis: x + datafield: Mode + +#proc areadef + title: Throughput on Insert operation + titledetails: size=14 align=C + areaname: slide + xscaletype: categories + xautorange: datafield=Mode + xaxis.stubs: usecategories + xaxis.label: Threads across table sizes and % of input rates +// yrange: 0 70 + yautorange: datafield=Max,Min + yaxis.stubs: inc + yaxis.label: ops/ns +// yaxis.stubformat: %3.1f + autowidth: 1.1 + autoheight: 0.07 + frame: yes + +#for LABEL in @NAMES +#set NLABEL = $arithl(@NLABEL+1) +#set COLOR = $icolor( @NLABEL ) +#proc legendentry + label: @LABEL + sampletype: color + details: @COLOR + +#procdef catlines + select: @Name = @LABEL + catfield: Mode + subcatfield: Threads + subcats: auto + plotwidth: 0.8 + #saveas C + +#proc catlines + #clone C + dpsymbol: shape=square radius=@LABLESIZE style=solid color=@COLOR + valfield: Average + errfield: sd + +#proc catlines + #clone C + valfield: Max + dpsymbol: shape=triangle radius=@LABLESIZE style=solid color=@COLOR + +#proc catlines + #clone C + valfield: Min + dpsymbol: shape=downtriangle radius=@LABLESIZE style=solid color=@COLOR + +#endloop + +#proc legend + location: 3.2 max + seglen: 0.2 +#endproc +</pre> +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_locked_work.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/time_locked_work.cpp new file mode 100644 index 0000000000..9975e8290f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_locked_work.cpp @@ -0,0 +1,174 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +////// Test configuration //////////////////////////////////////////////////// +#define SECONDS_RATIO 1000000 // microseconds + +#ifndef REPEAT_K +#define REPEAT_K 50 // repeat coefficient +#endif + +int outer_work[] = {/*256,*/ 64, 16, 4, 0}; +int inner_work[] = {32, 8, 0 }; + +// keep it to calibrate the time of work without synchronization +#define BOX1 "baseline" +#define BOX1TEST TimeTest< TBB_Mutex<tbb::null_mutex>, SECONDS_RATIO > + +// enable/disable tests for: +#define BOX2 "spin_mutex" +#define BOX2TEST TimeTest< TBB_Mutex<tbb::spin_mutex>, SECONDS_RATIO > + +// enable/disable tests for: +#define BOX3 "spin_rw_mutex" +#define BOX3TEST TimeTest< TBB_Mutex<tbb::spin_rw_mutex>, SECONDS_RATIO > + +// enable/disable tests for: +#define BOX4 "queuing_mutex" +#define BOX4TEST TimeTest< TBB_Mutex<tbb::queuing_mutex>, SECONDS_RATIO > + +// enable/disable tests for: +//#define BOX5 "queuing_rw_mutex" +#define BOX5TEST TimeTest< TBB_Mutex<tbb::queuing_rw_mutex>, SECONDS_RATIO > + +////////////////////////////////////////////////////////////////////////////// + +#include <cstdlib> +#include <math.h> +#include <algorithm> // std::swap +#include <utility> // Need std::pair from here +#include <sstream> +#include "tbb/tbb_stddef.h" +#include "tbb/null_mutex.h" +#include "tbb/spin_rw_mutex.h" +#include "tbb/spin_mutex.h" +#include "tbb/queuing_mutex.h" +#include "tbb/queuing_rw_mutex.h" +#include "tbb/mutex.h" + +#if INTEL_TRIAL==2 +#include "tbb/parallel_for.h" // enable threading by TBB scheduler +#include "tbb/task_scheduler_init.h" +#include "tbb/blocked_range.h" +#endif +// for test +#include "time_framework.h" + +using namespace tbb; +using namespace tbb::internal; + +///////////////////////////////////////////////////////////////////////////////////////// + +//! base class for tests family +struct TestLocks : TesterBase { + // Inherits "value", "threads_count", and other variables + TestLocks() : TesterBase(/*number of modes*/sizeof(outer_work)/sizeof(int)) {} + //! returns name of test part/mode + /*override*/std::string get_name(int testn) { + std::ostringstream buf; + buf.width(4); buf.fill('0'); + buf << outer_work[testn]; // mode number + return buf.str(); + } + //! enables results types and returns theirs suffixes + /*override*/const char *get_result_type(int, result_t type) const { + switch(type) { + case MIN: return " min"; + case MAX: return " max"; + default: return 0; + } + } + //! repeats count + int repeat_until(int /*test_n*/) const { + return REPEAT_K*100;//TODO: suggest better? + } + //! fake work + void do_work(int work) volatile { + for(int i = 0; i < work; i++) { + volatile int x = i; + __TBB_Pause(0); // just to call inline assembler + x *= work/threads_count; + } + } +}; + +//! template test unit for any of TBB mutexes +template<typename M> +struct TBB_Mutex : TestLocks { + M mutex; + + double test(int testn, int /*threadn*/) + { + for(int r = 0; r < repeat_until(testn); ++r) { + do_work(outer_work[testn]); + { + typename M::scoped_lock with(mutex); + do_work(/*inner work*/value); + } + } + return 0; + } +}; + +///////////////////////////////////////////////////////////////////////////////////////// + +//Using BOX declarations +#include "time_sandbox.h" + +// run tests for each of inner work value +void RunLoops(test_sandbox &the_test, int thread) { + for( unsigned i=0; i<sizeof(inner_work)/sizeof(int); ++i ) + the_test.factory(inner_work[i], thread); +} + +int main(int argc, char* argv[]) { + if(argc>1) Verbose = true; + int DefThread = task_scheduler_init::default_num_threads(); + MinThread = 1; MaxThread = DefThread+1; + ParseCommandLine( argc, argv ); + ASSERT(MinThread <= MaxThread, 0); +#if INTEL_TRIAL && defined(__TBB_parallel_for_H) + task_scheduler_init me(MaxThread); +#endif + { + test_sandbox the_test("time_locked_work", StatisticsCollector::ByThreads); + //TODO: refactor this out as RunThreads(test&) + for( int t = MinThread; t < DefThread && t <= MaxThread; t *= 2) + RunLoops( the_test, t ); // execute undersubscribed threads + if( DefThread > MinThread && DefThread <= MaxThread ) + RunLoops( the_test, DefThread ); // execute on all hw threads + if( DefThread < MaxThread) + RunLoops( the_test, MaxThread ); // execute requested oversubscribed threads + + the_test.report.SetTitle("Time of lock/unlock for mutex Name with Outer and Inner work"); + //the_test.report.SetStatisticFormula("1AVG per size", "=AVERAGE(ROUNDS)"); + the_test.report.Print(StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML, /*ModeName*/ "Outer work"); + } + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_lru_cache_throughput.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/time_lru_cache_throughput.cpp new file mode 100644 index 0000000000..96b852f8b6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_lru_cache_throughput.cpp @@ -0,0 +1,224 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "../examples/common/utility/utility.h" +#include "tbb/tick_count.h" +//#include <tbb/parallel_for.h> +#include "tbb/task_scheduler_init.h" //for number of threads +#include <functional> + +#include "coarse_grained_raii_lru_cache.h" +#define TBB_PREVIEW_CONCURRENT_LRU_CACHE 1 +#include "tbb/concurrent_lru_cache.h" + +#define HARNESS_CUSTOM_MAIN 1 +#define HARNESS_NO_PARSE_COMMAND_LINE 1 + +#include "../src/test/harness.h" +#include "../src/test/harness_barrier.h" + +#include <vector> +#include <algorithm> +#include "tbb/mutex.h" + +//TODO: probably move this to separate header utlity file +namespace micro_benchmarking{ +namespace utils{ + template <typename type> + void disable_elimination(type const& v){ + volatile type dummy = v; + (void) dummy; + } + //Busy work and calibration helpers + unsigned int one_us_iters = 345; // default value + + //TODO: add a CLI parameter for calibration run + // if user wants to calibrate to microseconds on particular machine, call + // this at beginning of program; sets one_us_iters to number of iters to + // busy_wait for approx. 1 us + void calibrate_busy_wait() { + tbb::tick_count t0 = tbb::tick_count::now(); + for (volatile unsigned int i=0; i<1000000; ++i) continue; + tbb::tick_count t1 = tbb::tick_count::now(); + + one_us_iters = (unsigned int)((1000000.0/(t1-t0).seconds())*0.000001); + } + + void busy_wait(int us) + { + unsigned int iter = us*one_us_iters; + for (volatile unsigned int i=0; i<iter; ++i) continue; + } +} +} + +struct parameter_pack{ + size_t time_window_sec; + size_t time_check_granularity_ops; + size_t cache_lru_history_size; + size_t time_of_item_use_usec; + size_t cache_miss_percent; + int threads_number; + size_t weight_of_initiation_call_usec; + bool use_serial_initiation_function; + parameter_pack( + size_t a_time_window_sec + ,size_t a_time_check_granularity_ops + ,size_t a_cache_lru_history_size + ,size_t a_time_of_item_use_usec, size_t a_cache_miss_percent + , int a_threads_number ,size_t a_weight_of_initiation_call_usec + , bool a_use_serial_initiation_function + ) : + time_window_sec(a_time_window_sec) + ,time_check_granularity_ops(a_time_check_granularity_ops) + ,cache_lru_history_size(a_cache_lru_history_size) + ,time_of_item_use_usec(a_time_of_item_use_usec) + ,cache_miss_percent(a_cache_miss_percent) + ,threads_number(a_threads_number) + ,weight_of_initiation_call_usec(a_weight_of_initiation_call_usec) + ,use_serial_initiation_function(a_use_serial_initiation_function) + {} +}; + +struct return_size_t { + size_t m_weight_of_initiation_call_usec; + bool use_serial_initiation_function; + return_size_t(size_t a_weight_of_initiation_call_usec, bool a_use_serial_initiation_function) + :m_weight_of_initiation_call_usec(a_weight_of_initiation_call_usec), use_serial_initiation_function(a_use_serial_initiation_function) + {} + size_t operator()(size_t key){ + static tbb::mutex mtx; + if (use_serial_initiation_function){ + mtx.lock(); + } + micro_benchmarking::utils::busy_wait(m_weight_of_initiation_call_usec); + if (use_serial_initiation_function){ + mtx.unlock(); + } + + return key; + } +}; + +template< typename a_cache_type> +struct throughput { + typedef throughput self_type; + typedef a_cache_type cache_type; + + parameter_pack m_parameter_pack; + + + const size_t per_thread_sample_size ; + typedef std::vector<size_t> access_sequence_type; + access_sequence_type m_access_sequence; + cache_type m_cache; + Harness::SpinBarrier m_barrier; + tbb::atomic<size_t> loops_count; + + throughput(parameter_pack a_parameter_pack) + :m_parameter_pack(a_parameter_pack) + ,per_thread_sample_size(m_parameter_pack.cache_lru_history_size *(1 + m_parameter_pack.cache_miss_percent/100)) + ,m_access_sequence(m_parameter_pack.threads_number * per_thread_sample_size ) + ,m_cache(return_size_t(m_parameter_pack.weight_of_initiation_call_usec,m_parameter_pack.use_serial_initiation_function),m_parameter_pack.cache_lru_history_size) + + { + loops_count=0; + //TODO: check if changing from generating longer sequence to generating indexes in a specified range (i.e. making per_thread_sample_size fixed) give any change + std::generate(m_access_sequence.begin(),m_access_sequence.end(),std::rand); + } + + size_t operator()(){ + struct _{ static void retrieve_from_cache(self_type* _this, size_t thread_index){ + parameter_pack& p = _this->m_parameter_pack; + access_sequence_type::iterator const begin_it =_this->m_access_sequence.begin()+ thread_index * _this->per_thread_sample_size; + access_sequence_type::iterator const end_it = begin_it + _this->per_thread_sample_size; + + _this->m_barrier.wait(); + tbb::tick_count start = tbb::tick_count::now(); + + size_t local_loops_count =0; + do { + size_t part_of_the_sample_so_far = (local_loops_count * p.time_check_granularity_ops) % _this->per_thread_sample_size; + access_sequence_type::iterator const iteration_begin_it = begin_it + part_of_the_sample_so_far; + access_sequence_type::iterator const iteration_end_it = iteration_begin_it + + (std::min)(p.time_check_granularity_ops, _this->per_thread_sample_size - part_of_the_sample_so_far); + + for (access_sequence_type::iterator it = iteration_begin_it; it < iteration_end_it; ++it){ + typename cache_type::handle h = _this->m_cache(*it); + micro_benchmarking::utils::busy_wait(p.time_of_item_use_usec); + micro_benchmarking::utils::disable_elimination(h.value()); + } + ++local_loops_count; + }while((tbb::tick_count::now()-start).seconds() < p.time_window_sec); + _this->loops_count+=local_loops_count; + }}; + m_barrier.initialize(m_parameter_pack.threads_number); + + NativeParallelFor(m_parameter_pack.threads_number,std::bind1st(std::ptr_fun(&_::retrieve_from_cache),this)); + + return loops_count * m_parameter_pack.time_check_granularity_ops; + } +}; + +int main(int argc,const char** args ){ + + size_t time_window_sec = 10; + size_t cache_lru_history_size = 1000; + size_t time_check_granularity_ops = 200; + size_t time_of_item_use_usec = 100; + size_t cache_miss_percent = 5; + int threads_number =tbb::task_scheduler_init::default_num_threads(); + size_t weight_of_initiation_call_usec =1000; + bool use_serial_initiation_function = false; + bool use_coarse_grained_locked_cache = false; + + parameter_pack p(time_window_sec, time_check_granularity_ops, cache_lru_history_size,time_of_item_use_usec,cache_miss_percent,threads_number,weight_of_initiation_call_usec,use_serial_initiation_function); + + utility::parse_cli_arguments(argc,args,utility::cli_argument_pack() + .arg(p.cache_lru_history_size,"cache-lru-history-size","") + .arg(p.time_window_sec,"time-window","time frame for measuring, in seconds") + .arg(p.threads_number,"n-of-threads","number of threads to run on") + .arg(p.time_of_item_use_usec,"time-of-item-use","time between consequent requests to the cache, in microseconds") + .arg(p.cache_miss_percent,"cache-miss-percent","cache miss percent ") + .arg(p.weight_of_initiation_call_usec,"initiation-call-weight","time occupied by a single call to initiation function, in microseconds") + .arg(p.use_serial_initiation_function,"use-serial-initiation-function","limit lock-based serial initiation function") + .arg(use_coarse_grained_locked_cache,"use-locked-version","use stl coarse grained lock based version") + ); + + typedef tbb::concurrent_lru_cache<size_t,size_t,return_size_t> tbb_cache; + typedef coarse_grained_raii_lru_cache<size_t,size_t,return_size_t> coarse_grained_locked_cache; + + size_t operations =0; + if (!use_coarse_grained_locked_cache){ + operations = throughput<tbb_cache>(p)(); + }else{ + operations = throughput<coarse_grained_locked_cache>(p)(); + } + std::cout<<"operations: "<<operations<<std::endl; + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_sandbox.h b/deal.II/bundled/tbb41_20130401oss/src/perf/time_sandbox.h new file mode 100644 index 0000000000..3760f7e387 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_sandbox.h @@ -0,0 +1,179 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TIME_FRAMEWORK_H__ +#error time_framework.h must be included +#endif + +#define INJECT_TBB namespace tbb { using namespace ::tbb; namespace internal { using namespace ::tbb::internal; } } +#define INJECT_TBB5 namespace tbb { namespace interface5 { using namespace ::tbb::interface5; namespace internal { using namespace ::tbb::interface5::internal; } } } + +#ifndef INJECT_BOX_NAMES +#if defined(__TBB_task_H) || defined(__TBB_concurrent_unordered_internal_H) || defined(__TBB_reader_writer_lock_H) || defined(__TBB__concurrent_unordered_impl_H) +#define INJECT_BOX_NAMES INJECT_TBB INJECT_TBB5 +#else +#define INJECT_BOX_NAMES INJECT_TBB +#endif +#endif + +#ifdef BOX1 +namespace sandbox1 { + INJECT_BOX_NAMES +# ifdef BOX1HEADER +# include BOX1HEADER +# endif + typedef ::BOX1TEST testbox; +} +#endif +#ifdef BOX2 +namespace sandbox2 { + INJECT_BOX_NAMES +# ifdef BOX2HEADER +# include BOX2HEADER +# endif + typedef ::BOX2TEST testbox; +} +#endif +#ifdef BOX3 +namespace sandbox3 { + INJECT_BOX_NAMES +# ifdef BOX3HEADER +# include BOX3HEADER +# endif + typedef ::BOX3TEST testbox; +} +#endif +#ifdef BOX4 +namespace sandbox4 { + INJECT_BOX_NAMES +# ifdef BOX4HEADER +# include BOX4HEADER +# endif + typedef ::BOX4TEST testbox; +} +#endif +#ifdef BOX5 +namespace sandbox5 { + INJECT_BOX_NAMES +# ifdef BOX5HEADER +# include BOX5HEADER +# endif + typedef ::BOX5TEST testbox; +} +#endif +#ifdef BOX6 +namespace sandbox6 { + INJECT_BOX_NAMES +# ifdef BOX6HEADER +# include BOX6HEADER +# endif + typedef ::BOX6TEST testbox; +} +#endif +#ifdef BOX7 +namespace sandbox7 { + INJECT_BOX_NAMES +# ifdef BOX7HEADER +# include BOX7HEADER +# endif + typedef ::BOX7TEST testbox; +} +#endif +#ifdef BOX8 +namespace sandbox8 { + INJECT_BOX_NAMES +# ifdef BOX8HEADER +# include BOX8HEADER +# endif + typedef ::BOX8TEST testbox; +} +#endif +#ifdef BOX9 +namespace sandbox9 { + INJECT_BOX_NAMES +# ifdef BOX9HEADER +# include BOX9HEADER +# endif + typedef ::BOX9TEST testbox; +} +#endif + +//if harness.h included +#if defined(ASSERT) && !HARNESS_NO_PARSE_COMMAND_LINE +#ifndef TEST_PREFIX +#define TEST_PREFIX if(Verbose) printf("Processing with %d threads: %ld...\n", threads, long(value)); +#endif +#endif//harness included + +#ifndef TEST_PROCESSOR_NAME +#define TEST_PROCESSOR_NAME test_sandbox +#endif + +class TEST_PROCESSOR_NAME : public TestProcessor { +public: + TEST_PROCESSOR_NAME(const char *name, StatisticsCollector::Sorting sort_by = StatisticsCollector::ByAlg) + : TestProcessor(name, sort_by) {} + void factory(arg_t value, int threads) { +#ifdef TEST_PREFIX + TEST_PREFIX +#endif + process( value, threads, +#define RUNBOX(n) run(#n"."BOX##n, new sandbox##n::testbox() ) +#ifdef BOX1 + RUNBOX(1), +#endif +#ifdef BOX2 + RUNBOX(2), +#endif +#ifdef BOX3 + RUNBOX(3), +#endif +#ifdef BOX4 + RUNBOX(4), +#endif +#ifdef BOX5 + RUNBOX(5), +#endif +#ifdef BOX6 + RUNBOX(6), +#endif +#ifdef BOX7 + RUNBOX(7), +#endif +#ifdef BOX8 + RUNBOX(8), +#endif +#ifdef BOX9 + RUNBOX(9), +#endif + end ); +#ifdef TEST_POSTFIX + TEST_POSTFIX +#endif + } +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/perf/time_vector.cpp b/deal.II/bundled/tbb41_20130401oss/src/perf/time_vector.cpp new file mode 100644 index 0000000000..b6445bb922 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/perf/time_vector.cpp @@ -0,0 +1,257 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +//#define DO_SCALABLEALLOC + +#include <cstdlib> +#include <cmath> +#include <vector> +#include <algorithm> +#include <functional> +#include <numeric> +#include "tbb/tbb_stddef.h" +#include "tbb/spin_mutex.h" +#ifdef DO_SCALABLEALLOC +#include "tbb/scalable_allocator.h" +#endif +#include "tbb/concurrent_vector.h" +#include "tbb/tbb_allocator.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/tick_count.h" +#include "tbb/blocked_range.h" +#define HARNESS_CUSTOM_MAIN 1 +#include "../test/harness.h" +//#include "harness_barrier.h" +#include "../test/harness_allocator.h" +#define STATISTICS_INLINE +#include "statistics.h" + +using namespace tbb; +bool ExtraVerbose = false; + +class Timer { + tbb::tick_count tick; +public: + Timer() { tick = tbb::tick_count::now(); } + double get_time() { return (tbb::tick_count::now() - tick).seconds(); } + double diff_time(const Timer &newer) { return (newer.tick - tick).seconds(); } + double mark_time() { tick_count t1(tbb::tick_count::now()), t2(tick); tick = t1; return (t1 - t2).seconds(); } + double mark_time(const Timer &newer) { tick_count t(tick); tick = newer.tick; return (tick - t).seconds(); } +}; + +/************************************************************************/ +/* TEST1 */ +/************************************************************************/ +#define mk_vector_test1(v, a) vector_test1<v<Timer, static_counting_allocator<a<Timer> > >, v<double, static_counting_allocator<a<double> > > > +template<class timers_vector_t, class values_vector_t> +class vector_test1 { + const char *mode; + StatisticsCollector &stat; + StatisticsCollector::TestCase key[16]; + +public: + vector_test1(const char *m, StatisticsCollector &s) : mode(m), stat(s) {} + + vector_test1 &operator()(size_t len) { + if(Verbose) printf("test1<%s>(%u): collecting timing statistics\n", mode, unsigned(len)); + __TBB_ASSERT(sizeof(Timer) == sizeof(double), NULL); + static const char *test_names[] = { + "b)creation wholly", + "a)creation by push", + "c)operation time per item", + 0 }; + for(int i = 0; test_names[i]; ++i) key[i] = stat.SetTestCase(test_names[i], mode, len); + + Timer timer0; timers_vector_t::allocator_type::init_counters(); + timers_vector_t tv(len); + Timer timer1; values_vector_t::allocator_type::init_counters(); + values_vector_t dv; + for (size_t i = 0; i < len; ++i) + dv.push_back( i ); + Timer timer2; + for (size_t i = 0; i < len; ++i) + { + dv[len-i-1] = timer0.diff_time(tv[i]); + tv[i].mark_time(); + } + stat.AddStatisticValue( key[2], "1total, ms", "%.3f", timer2.get_time()*1000.0 ); + stat.AddStatisticValue( key[1], "1total, ms", "%.3f", timer1.diff_time(timer2)*1000.0 ); + stat.AddStatisticValue( key[0], "1total, ms", "%.3f", timer0.diff_time(timer1)*1000.0 ); + //allocator statistics + stat.AddStatisticValue( key[0], "2total allocations", "%d", int(timers_vector_t::allocator_type::allocations) ); + stat.AddStatisticValue( key[1], "2total allocations", "%d", int(values_vector_t::allocator_type::allocations) ); + stat.AddStatisticValue( key[2], "2total allocations", "%d", 0); + stat.AddStatisticValue( key[0], "3total alloc#items", "%d", int(timers_vector_t::allocator_type::items_allocated) ); + stat.AddStatisticValue( key[1], "3total alloc#items", "%d", int(values_vector_t::allocator_type::items_allocated) ); + stat.AddStatisticValue( key[2], "3total alloc#items", "%d", 0); + //remarks + stat.AddStatisticValue( key[0], "9note", "segment creation time, ns:"); + stat.AddStatisticValue( key[2], "9note", "average op-time per item, ns:"); + Timer last_timer(timer2); double last_value = 0; + for (size_t j = 0, i = 2; i < len; i *= 2, j++) { + stat.AddRoundResult( key[0], (dv[len-i-1]-last_value)*1000000.0 ); + last_value = dv[len-i-1]; + stat.AddRoundResult( key[2], last_timer.diff_time(tv[i])/double(i)*1000000.0 ); + last_timer = tv[i]; + stat.SetRoundTitle(j, i); + } + tv.clear(); dv.clear(); + //__TBB_ASSERT(timers_vector_t::allocator_type::items_allocated == timers_vector_t::allocator_type::items_freed, NULL); + //__TBB_ASSERT(values_vector_t::allocator_type::items_allocated == values_vector_t::allocator_type::items_freed, NULL); + return *this; + } +}; + +/************************************************************************/ +/* TEST2 */ +/************************************************************************/ +#define mk_vector_test2(v, a) vector_test2<v<size_t, a<size_t> > > +template<class vector_t> +class vector_test2 { + const char *mode; + static const int ntrial = 10; + StatisticsCollector &stat; + +public: + vector_test2(const char *m, StatisticsCollector &s) : mode(m), stat(s) {} + + vector_test2 &operator()(size_t len) { + if(Verbose) printf("test2<%s>(%u): performing standard transformation sequence on vector\n", mode, unsigned(len)); + StatisticsCollector::TestCase init_key = stat.SetTestCase("allocate", mode, len); + StatisticsCollector::TestCase fill_key = stat.SetTestCase("fill", mode, len); + StatisticsCollector::TestCase proc_key = stat.SetTestCase("process", mode, len); + StatisticsCollector::TestCase full_key = stat.SetTestCase("total time", mode, len); + for (int i = 0; i < ntrial; i++) { + Timer timer0; + vector_t v1(len); + vector_t v2(len); + Timer timer1; + std::generate(v1.begin(), v1.end(), values(0)); + std::generate(v2.begin(), v2.end(), values(size_t(-len))); + Timer timer2; + std::reverse(v1.rbegin(), v1.rend()); + std::inner_product(v1.begin(), v1.end(), v2.rbegin(), 1); + std::sort(v1.rbegin(), v1.rend()); + std::sort(v2.rbegin(), v2.rend()); + std::set_intersection(v1.begin(), v1.end(), v2.rbegin(), v2.rend(), v1.begin()); + Timer timer3; + stat.AddRoundResult( proc_key, timer2.diff_time(timer3)*1000.0 ); + stat.AddRoundResult( fill_key, timer1.diff_time(timer2)*1000.0 ); + stat.AddRoundResult( init_key, timer0.diff_time(timer1)*1000.0 ); + stat.AddRoundResult( full_key, timer0.diff_time(timer3)*1000.0 ); + } + stat.SetStatisticFormula("1Average", "=AVERAGE(ROUNDS)"); + stat.SetStatisticFormula("2+/-", "=(MAX(ROUNDS)-MIN(ROUNDS))/2"); + return *this; + } + + class values + { + size_t value; + public: + values(size_t i) : value(i) {} + size_t operator()() { + return value++%(1|(value^55)); + } + }; +}; + +/************************************************************************/ +/* TEST3 */ +/************************************************************************/ +#define mk_vector_test3(v, a) vector_test3<v<char, local_counting_allocator<a<char>, size_t > > > +template<class vector_t> +class vector_test3 { + const char *mode; + StatisticsCollector &stat; + +public: + vector_test3(const char *m, StatisticsCollector &s) : mode(m), stat(s) {} + + vector_test3 &operator()(size_t len) { + if(Verbose) printf("test3<%s>(%u): collecting allocator statistics\n", mode, unsigned(len)); + static const size_t sz = 1024; + vector_t V[sz]; + StatisticsCollector::TestCase vinst_key = stat.SetTestCase("instances number", mode, len); + StatisticsCollector::TestCase count_key = stat.SetTestCase("allocations count", mode, len); + StatisticsCollector::TestCase items_key = stat.SetTestCase("allocated items", mode, len); + //stat.ReserveRounds(sz-1); + for (size_t c = 0, i = 0, s = sz/2; s >= 1 && i < sz; s /= 2, c++) + { + const size_t count = c? 1<<(c-1) : 0; + for (size_t e = i+s; i < e; i++) { + //if(count >= 16) V[i].reserve(count); + for (size_t j = 0; j < count; j++) + V[i].push_back(j); + } + stat.SetRoundTitle ( c, count ); + stat.AddRoundResult( vinst_key, s ); + stat.AddRoundResult( count_key, V[i-1].get_allocator().allocations ); + stat.AddRoundResult( items_key, V[i-1].get_allocator().items_allocated ); + } + return *this; + } +}; + +/************************************************************************/ +/* TYPES SET FOR TESTS */ +/************************************************************************/ +#define types_set(n, title, op) { StatisticsCollector Collector("time_vector"#n); Collector.SetTitle title; \ + {mk_vector_test##n(tbb::concurrent_vector, tbb::cache_aligned_allocator) ("TBB:NFS", Collector)op;} \ + {mk_vector_test##n(tbb::concurrent_vector, tbb::tbb_allocator) ("TBB:TBB", Collector)op;} \ + {mk_vector_test##n(tbb::concurrent_vector, std::allocator) ("TBB:STD", Collector)op;} \ + {mk_vector_test##n(std::vector, tbb::cache_aligned_allocator) ("STL:NFS", Collector)op;} \ + {mk_vector_test##n(std::vector, tbb::tbb_allocator) ("STL:TBB", Collector)op;} \ + {mk_vector_test##n(std::vector, std::allocator) ("STL:STD", Collector)op;} \ + Collector.Print(StatisticsCollector::Stdout|StatisticsCollector::HTMLFile|StatisticsCollector::ExcelXML); } + + +/************************************************************************/ +/* MAIN DRIVER */ +/************************************************************************/ +int main(int argc, char* argv[]) { + if(argc>1) Verbose = true; + if(argc>2) ExtraVerbose = true; + MinThread = 0; MaxThread = 500000; // use in another meaning - test#:problem size + ParseCommandLine( argc, argv ); + + ASSERT(tbb_allocator<int>::allocator_type() == tbb_allocator<int>::scalable, "expecting scalable allocator library to be loaded"); + + if(!MinThread || MinThread == 1) + types_set(1, ("Vectors performance test #1 for %d", MaxThread), (MaxThread) ) + if(!MinThread || MinThread == 2) + types_set(2, ("Vectors performance test #2 for %d", MaxThread), (MaxThread) ) + if(!MinThread || MinThread == 3) + types_set(3, ("Vectors performance test #3 for %d", MaxThread), (MaxThread) ) + + if(!Verbose) printf("done\n"); + return 0; +} + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/index.html b/deal.II/bundled/tbb41_20130401oss/src/rml/client/index.html new file mode 100644 index 0000000000..7fb8c26858 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/index.html @@ -0,0 +1,42 @@ +<HTML> +<BODY> +<H2>Overview</H2> + +This directory has source code that must be statically linked into an RML client. + +<H2>Files</H2> + +<DL> +<DT><P><A HREF="rml_factory.h">rml_factory.h</A> +<DD>Text shared by <A HREF="rml_omp.cpp">rml_omp.cpp</A> and <A HREF="rml_tbb.cpp">rml_tbb.cpp</A>. + This is not an ordinary include file, so it does not have an #ifndef guard.</P> +</DL> + +<H3> Specific to client=OpenMP</H3> +<DL> +<DT><P><A HREF="rml_omp.cpp">rml_omp.cpp</A> +<DD>Source file for OpenMP client.</P> +<DT><P><A HREF="omp_dynamic_link.h">omp_dynamic_link.h</A> +<DT><A HREF="omp_dynamic_link.cpp">omp_dynamic_link.cpp</A> +<DD>Source files for dynamic linking support. + The code is the code from the TBB source directory, but adjusted so that it + appears in namespace <TT>__kmp</TT> instead of namespace <TT>tbb::internal</TT>. +</DL> +<H3> Specific to client=TBB</H3> +<DL> +<DT><P><A HREF="rml_tbb.cpp">rml_tbb.cpp</A> +<DD>Source file for TBB client. It uses the dynamic linking support from the TBB source directory. +</DL> + +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/library_assert.h b/deal.II/bundled/tbb41_20130401oss/src/rml/client/library_assert.h new file mode 100644 index 0000000000..92b5aebd8d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/library_assert.h @@ -0,0 +1,42 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef LIBRARY_ASSERT_H +#define LIBRARY_ASSERT_H + +#ifndef LIBRARY_ASSERT +#ifdef KMP_ASSERT2 +#define LIBRARY_ASSERT(x,y) KMP_ASSERT2((x),(y)) +#else +#include <assert.h> +#define LIBRARY_ASSERT(x,y) assert(x) +#define __TBB_DYNAMIC_LOAD_ENABLED 1 +#endif +#endif /* LIBRARY_ASSERT */ + +#endif /* LIBRARY_ASSERT_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.cpp new file mode 100644 index 0000000000..2ce9063d5f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.cpp @@ -0,0 +1,32 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "omp_dynamic_link.h" +#include "library_assert.h" +#include "tbb/dynamic_link.cpp" // Refers to src/tbb, not include/tbb + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.h b/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.h new file mode 100644 index 0000000000..a670eb6d9b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/omp_dynamic_link.h @@ -0,0 +1,38 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __KMP_omp_dynamic_link_H +#define __KMP_omp_dynamic_link_H + +#define OPEN_INTERNAL_NAMESPACE namespace __kmp { +#define CLOSE_INTERNAL_NAMESPACE } + +#include "library_assert.h" +#include "tbb/dynamic_link.h" // Refers to src/tbb, not include/tbb + +#endif /* __KMP_omp_dynamic_link_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_factory.h b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_factory.h new file mode 100644 index 0000000000..1447bd34f8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_factory.h @@ -0,0 +1,102 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// No ifndef guard because this file is not a normal include file. + +#if TBB_USE_DEBUG +#define DEBUG_SUFFIX "_debug" +#else +#define DEBUG_SUFFIX +#endif /* TBB_USE_DEBUG */ + +// RML_SERVER_NAME is the name of the RML server library. +#if _WIN32||_WIN64 +#define RML_SERVER_NAME "irml" DEBUG_SUFFIX ".dll" +#elif __APPLE__ +#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".dylib" +#elif __linux__ +#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1" +#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX +#define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so" +#else +#error Unknown OS +#endif + +const ::rml::versioned_object::version_type CLIENT_VERSION = 2; + +#if __TBB_WEAK_SYMBOLS_PRESENT + #pragma weak __RML_open_factory + #pragma weak __RML_close_factory + extern "C" { + ::rml::factory::status_type __RML_open_factory ( ::rml::factory&, ::rml::versioned_object::version_type&, ::rml::versioned_object::version_type ); + void __RML_close_factory( ::rml::factory& f ); + } +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + +::rml::factory::status_type FACTORY::open() { + // Failure of following assertion indicates that factory is already open, or not zero-inited. + LIBRARY_ASSERT( !library_handle, NULL ); + status_type (*open_factory_routine)( factory&, version_type&, version_type ); + dynamic_link_descriptor server_link_table[4] = { + DLD(__RML_open_factory,open_factory_routine), + MAKE_SERVER(my_make_server_routine), + DLD(__RML_close_factory,my_wait_to_close_routine), + GET_INFO(my_call_with_server_info_routine), + }; + status_type result; + if( dynamic_link( RML_SERVER_NAME, server_link_table, 4, &library_handle ) ) { + version_type server_version; + result = (*open_factory_routine)( *this, server_version, CLIENT_VERSION ); + // server_version can be checked here for incompatibility if necessary. + } else { + library_handle = NULL; + result = st_not_found; + } + return result; +} + +void FACTORY::close() { + if( library_handle ) + (*my_wait_to_close_routine)(*this); + if( (size_t)library_handle>FACTORY::c_dont_unload ) { + dynamic_unlink(library_handle); + library_handle = NULL; + } +} + +::rml::factory::status_type FACTORY::make_server( SERVER*& s, CLIENT& c) { + // Failure of following assertion means that factory was not successfully opened. + LIBRARY_ASSERT( my_make_server_routine, NULL ); + return (*my_make_server_routine)(*this,s,c); +} + +void FACTORY::call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const { + // Failure of following assertion means that factory was not successfully opened. + LIBRARY_ASSERT( my_call_with_server_info_routine, NULL ); + (*my_call_with_server_info_routine)( cb, arg ); +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_omp.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_omp.cpp new file mode 100644 index 0000000000..89757912c4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_omp.cpp @@ -0,0 +1,54 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "rml_omp.h" +#include "omp_dynamic_link.h" +#include <assert.h> + +namespace __kmp { +namespace rml { + +#define MAKE_SERVER(x) DLD(__KMP_make_rml_server,x) +#define GET_INFO(x) DLD(__KMP_call_with_my_server_info,x) +#define SERVER omp_server +#define CLIENT omp_client +#define FACTORY omp_factory + +#if __TBB_WEAK_SYMBOLS_PRESENT + #pragma weak __KMP_make_rml_server + #pragma weak __KMP_call_with_my_server_info + extern "C" { + omp_factory::status_type __KMP_make_rml_server( omp_factory& f, omp_server*& server, omp_client& client ); + void __KMP_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ); + } +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + +#include "rml_factory.h" + +} // rml +} // __kmp diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_tbb.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_tbb.cpp new file mode 100644 index 0000000000..d2aa1cf0cd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/client/rml_tbb.cpp @@ -0,0 +1,56 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "../include/rml_tbb.h" +#include "tbb/dynamic_link.h" +#include <assert.h> + +namespace tbb { +namespace internal { +namespace rml { + +#define MAKE_SERVER(x) DLD(__TBB_make_rml_server,x) +#define GET_INFO(x) DLD(__TBB_call_with_my_server_info,x) +#define SERVER tbb_server +#define CLIENT tbb_client +#define FACTORY tbb_factory + +#if __TBB_WEAK_SYMBOLS_PRESENT + #pragma weak __TBB_make_rml_server + #pragma weak __TBB_call_with_my_server_info + extern "C" { + ::rml::factory::status_type __TBB_make_rml_server( tbb::internal::rml::tbb_factory& f, tbb::internal::rml::tbb_server*& server, tbb::internal::rml::tbb_client& client ); + void __TBB_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ); + } +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + +#include "rml_factory.h" + +} // rml +} // internal +} // tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/include/index.html b/deal.II/bundled/tbb41_20130401oss/src/rml/include/index.html new file mode 100644 index 0000000000..e6e001622c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/include/index.html @@ -0,0 +1,29 @@ +<HTML> +<BODY> +<H2>Overview</H2> + +This directory has the include files for the Resource Management Layer (RML). + +<H2>Files</H2> + +<DL> +<DT><P><A HREF="rml_base.h">rml_base.h</A> +<DD>Interfaces shared by TBB and OpenMP.</P> +<DT><P><A HREF="rml_omp.h">rml_omp.h</A> +<DD>Interface exclusive to OpenMP.</P> +<DT><P><A HREF="rml_tbb.h">rml_tbb.h</A> +<DD>Interface exclusive to TBB.</P> +</DL> + +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_base.h b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_base.h new file mode 100644 index 0000000000..9db72c9623 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_base.h @@ -0,0 +1,196 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Header guard and namespace names follow rml conventions. + +#ifndef __RML_rml_base_H +#define __RML_rml_base_H + +#include <cstddef> + +#if _WIN32||_WIN64 +#include <windows.h> +#endif /* _WIN32||_WIN64 */ + +#ifdef RML_PURE_VIRTUAL_HANDLER +#define RML_PURE(T) {RML_PURE_VIRTUAL_HANDLER(); return (T)0;} +#else +#define RML_PURE(T) = 0; +#endif + +namespace rml { + +//! Base class for denying assignment and copy constructor. +class no_copy { + void operator=( no_copy& ); + no_copy( no_copy& ); +public: + no_copy() {} +}; + +class server; + +class versioned_object { +public: + //! A version number + typedef unsigned version_type; + + //! Get version of this object + /** The version number is incremented when a incompatible change is introduced. + The version number is invariant for the lifetime of the object. */ + virtual version_type version() const RML_PURE(version_type) +}; + +//! Represents a client's job for an execution context. +/** A job object is constructed by the client. + Not derived from versioned_object because version is same as for client. */ +class job { + friend class server; + + //! Word for use by server + /** Typically the server uses it to speed up internal lookup. + Clients must not modify the word. */ + void* scratch_ptr; +}; + +//! Information that client provides to server when asking for a server. +/** The instance must endure at least until acknowledge_close_connection is called. */ +class client: public versioned_object { +public: + //! Typedef for convenience of derived classes in other namespaces. + typedef ::rml::job job; + + //! Index of a job in a job pool + typedef unsigned size_type; + + //! Maximum number of threads that client can exploit profitably if nothing else is running on the machine. + /** The returned value should remain invariant for the lifetime of the connection. [idempotent] */ + virtual size_type max_job_count() const RML_PURE(size_type) + + //! Minimum stack size for each job. 0 means to use default stack size. [idempotent] + virtual std::size_t min_stack_size() const RML_PURE(std::size_t) + + //! Server calls this routine when it needs client to create a job object. + virtual job* create_one_job() RML_PURE(job*) + + //! Acknowledge that all jobs have been cleaned up. + /** Called by server in response to request_close_connection + after cleanup(job) has been called for each job. */ + virtual void acknowledge_close_connection() RML_PURE(void) + + enum policy_type {turnaround,throughput}; + + //! Inform server of desired policy. [idempotent] + virtual policy_type policy() const RML_PURE(policy_type) + + //! Inform client that server is done with *this. + /** Client should destroy the job. + Not necessarily called by execution context represented by *this. + Never called while any other thread is working on the job. */ + virtual void cleanup( job& ) RML_PURE(void) + + // In general, we should not add new virtual methods, because that would + // break derived classes. Think about reserving some vtable slots. +}; + +// Information that server provides to client. +// Virtual functions are routines provided by the server for the client to call. +class server: public versioned_object { +public: + //! Typedef for convenience of derived classes. + typedef ::rml::job job; + +#if _WIN32||_WIN64 + typedef void* execution_resource_t; +#endif + + //! Request that connection to server be closed. + /** Causes each job associated with the client to have its cleanup method called, + possibly by a thread different than the thread that created the job. + This method can return before all cleanup methods return. + Actions that have to wait after all cleanup methods return should be part of + client::acknowledge_close_connection. + Pass true as exiting if request_close_connection() is called because exit() is + called. In that case, it is the client's responsibility to make sure all threads + are terminated. In all other cases, pass false. */ + virtual void request_close_connection( bool exiting = false ) = 0; + + //! Called by client thread when it reaches a point where it cannot make progress until other threads do. + virtual void yield() = 0; + + //! Called by client to indicate a change in the number of non-RML threads that are running. + /** This is a performance hint to the RML to adjust how many threads it should let run + concurrently. The delta is the change in the number of non-RML threads that are running. + For example, a value of 1 means the client has started running another thread, and a value + of -1 indicates that the client has blocked or terminated one of its threads. */ + virtual void independent_thread_number_changed( int delta ) = 0; + + //! Default level of concurrency for which RML strives when there are no non-RML threads running. + /** Normally, the value is the hardware concurrency minus one. + The "minus one" accounts for the thread created by main(). */ + virtual unsigned default_concurrency() const = 0; + +protected: + static void*& scratch_ptr( job& j ) {return j.scratch_ptr;} +}; + +class factory { +public: + //! status results + enum status_type { + st_success=0, + st_connection_exists, + st_not_found, + st_incompatible + }; + + //! Scratch pointer for use by RML. + void* scratch_ptr; + +protected: + //! Pointer to routine that waits for server to indicate when client can close itself. + status_type (*my_wait_to_close_routine)( factory& ); + +public: + //! Library handle for use by RML. +#if _WIN32||_WIN64 + HMODULE library_handle; +#else + void* library_handle; +#endif /* _WIN32||_WIN64 */ + + //! Special marker to keep dll from being unloaded prematurely + static const std::size_t c_dont_unload = 1; +}; + +//! Typedef for callback functions to print server info +typedef void (*server_info_callback_t)( void* arg, const char* server_info ); + +} // namespace rml + +#endif /* __RML_rml_base_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_omp.h b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_omp.h new file mode 100644 index 0000000000..1524802530 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_omp.h @@ -0,0 +1,138 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Header guard and namespace names follow OpenMP runtime conventions. + +#ifndef KMP_RML_OMP_H +#define KMP_RML_OMP_H + +#include "rml_base.h" + +namespace __kmp { +namespace rml { + +class omp_client; + +//------------------------------------------------------------------------ +// Classes instantiated by the server +//------------------------------------------------------------------------ + +//! Represents a set of omp worker threads provided by the server. +class omp_server: public ::rml::server { +public: + //! A number of coins (i.e., threads) + typedef unsigned size_type; + + //! Return the number of coins in the bank. (negative if machine is oversubscribed). + virtual int current_balance() const = 0; + + //! Request n coins. Returns number of coins granted. Oversubscription amount if negative. + /** Always granted if is_strict is true. + - Positive or zero result indicates that the number of coins was taken from the bank. + - Negative result indicates that no coins were taken, and that the bank has deficit + by that amount and the caller (if being a good citizen) should return that many coins. + */ + virtual int try_increase_load( size_type /*n*/, bool /*strict*/ ) = 0; + + //! Return n coins into the bank. + virtual void decrease_load( size_type /*n*/ ) = 0; + + //! Convert n coins into n threads. + /** When a thread returns, it is converted back into a coin and the coin is returned to the bank. */ + virtual void get_threads( size_type /*m*/, void* /*cookie*/, job* /*array*/[] ) = 0; + + /** Putting a thread to sleep - convert a thread into a coin + Waking up a thread - convert a coin into a thread + + Note: conversion between a coin and a thread does not affect the accounting. + */ +#if _WIN32||_WIN64 + //! Inform server of a tbb master thread. + virtual void register_master( execution_resource_t& /*v*/ ) = 0; + + //! Inform server that the tbb master thread is done with its work. + virtual void unregister_master( execution_resource_t /*v*/ ) = 0; + + //! deactivate + /** give control to ConcRT RM */ + virtual void deactivate( job* ) = 0; + + //! reactivate + virtual void reactivate( job* ) = 0; +#endif /* _WIN32||_WIN64 */ +}; + + +//------------------------------------------------------------------------ +// Classes (or base classes thereof) instantiated by the client +//------------------------------------------------------------------------ + +class omp_client: public ::rml::client { +public: + //! Called by server thread when it delivers a thread to client + /** The index argument is a 0-origin index of the job for this thread within the array + returned by method get_threads. Server decreases the load by 1 (i.e., returning the coin + back to the bank) after this method returns. */ + virtual void process( job&, void* /*cookie*/, size_type /*index*/ ) RML_PURE(void) +}; + +/** Client must ensure that instance is zero-inited, typically by being a file-scope object. */ +class omp_factory: public ::rml::factory { + + //! Pointer to routine that creates an RML server. + status_type (*my_make_server_routine)( omp_factory&, omp_server*&, omp_client& ); + + //! Pointer to routine that calls callback function with server version info. + void (*my_call_with_server_info_routine)( ::rml::server_info_callback_t cb, void* arg ); + +public: + typedef ::rml::versioned_object::version_type version_type; + typedef omp_client client_type; + typedef omp_server server_type; + + //! Open factory. + /** Dynamically links against RML library. + Returns st_success, st_incompatible, or st_not_found. */ + status_type open(); + + //! Factory method to be called by client to create a server object. + /** Factory must be open. + Returns st_success or st_incompatible . */ + status_type make_server( server_type*&, client_type& ); + + //! Close factory. + void close(); + + //! Call the callback with the server build info. + void call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const; +}; + +} // namespace rml +} // namespace __kmp + +#endif /* KMP_RML_OMP_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_tbb.h b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_tbb.h new file mode 100644 index 0000000000..e4bcc91b8f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/include/rml_tbb.h @@ -0,0 +1,109 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Header guard and namespace names follow TBB conventions. + +#ifndef __TBB_rml_tbb_H +#define __TBB_rml_tbb_H + +#include "tbb/tbb_config.h" +#include "rml_base.h" + +namespace tbb { +namespace internal { +namespace rml { + +class tbb_client; + +//------------------------------------------------------------------------ +// Classes instantiated by the server +//------------------------------------------------------------------------ + +//! Represents a set of tbb worker threads provided by the server. +class tbb_server: public ::rml::server { +public: + //! Inform server of adjustments in the number of workers that the client can profitably use. + virtual void adjust_job_count_estimate( int delta ) = 0; + +#if _WIN32||_WIN64 + //! Inform server of a tbb master thread. + virtual void register_master( execution_resource_t& v ) = 0; + + //! Inform server that the tbb master thread is done with its work. + virtual void unregister_master( execution_resource_t v ) = 0; +#endif /* _WIN32||_WIN64 */ +}; + +//------------------------------------------------------------------------ +// Classes instantiated by the client +//------------------------------------------------------------------------ + +class tbb_client: public ::rml::client { +public: + //! Defined by TBB to steal a task and execute it. + /** Called by server when it wants an execution context to do some TBB work. + The method should return when it is okay for the thread to yield indefinitely. */ + virtual void process( job& ) RML_PURE(void) +}; + +/** Client must ensure that instance is zero-inited, typically by being a file-scope object. */ +class tbb_factory: public ::rml::factory { + + //! Pointer to routine that creates an RML server. + status_type (*my_make_server_routine)( tbb_factory&, tbb_server*&, tbb_client& ); + + //! Pointer to routine that calls callback function with server version info. + void (*my_call_with_server_info_routine)( ::rml::server_info_callback_t cb, void* arg ); + +public: + typedef ::rml::versioned_object::version_type version_type; + typedef tbb_client client_type; + typedef tbb_server server_type; + + //! Open factory. + /** Dynamically links against RML library. + Returns st_success, st_incompatible, or st_not_found. */ + status_type open(); + + //! Factory method to be called by client to create a server object. + /** Factory must be open. + Returns st_success, or st_incompatible . */ + status_type make_server( server_type*&, client_type& ); + + //! Close factory + void close(); + + //! Call the callback with the server build info + void call_with_server_info( ::rml::server_info_callback_t cb, void* arg ) const; +}; + +} // namespace rml +} // namespace internal +} // namespace tbb + +#endif /*__TBB_rml_tbb_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/index.html b/deal.II/bundled/tbb41_20130401oss/src/rml/index.html new file mode 100644 index 0000000000..52e4a7e33b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/index.html @@ -0,0 +1,31 @@ +<HTML> +<BODY> +<H2>Overview</H2> + +The subdirectories pertain to the Resource Management Layer (RML). + +<H2>Directories</H2> + +<DL> +<DT><P><A HREF="include/index.html">include/</A> +<DD>Include files used by clients of RML.</P> +<DT><P><A HREF="client/index.html">client/</A> +<DD>Source files for code that must be statically linked with a client.</P> +<DT><P><A HREF="server/index.html">server/</A> +<DD>Source files for the RML server.</P> +<DT><P><A HREF="test">test/</A> +<DD>Unit tests for RML server and its components.</P> +</DL> + +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_nested.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_nested.cpp new file mode 100644 index 0000000000..ff8e8922c3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_nested.cpp @@ -0,0 +1,152 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <cstddef> +#include <cstdlib> +#include <cstdio> +#include <float.h> +#include <math.h> +#include <time.h> + +#include <omp.h> +#include <assert.h> + +#include "thread_level.h" + +#if _WIN32||_WIN64 +#include <Windows.h> /* Need Sleep */ +#else +#include <unistd.h> /* Need usleep */ +#endif + +void MilliSleep( unsigned milliseconds ) { +#if _WIN32||_WIN64 + Sleep( milliseconds ); +#else + usleep( milliseconds*1000 ); +#endif /* _WIN32||_WIN64 */ +} + +// Algorithm parameters +const int Max_OMP_Outer_Threads = 8; + +// Global variables +int max_outer_threads = Max_OMP_Outer_Threads; + +// Print help on command-line arguments +void help_message(char *prog_name) { + fprintf(stderr, "\n%s usage:\n", prog_name); + fprintf(stderr, + " Parameters:\n" + " -o<num> : max # of threads OMP should use at outer level\n" + "\n Help:\n" + " -h : print this help message\n"); +} + +// Process command-line arguments +void process_args(int argc, char *argv[], int *max_outer_t) { + (*max_outer_t) = omp_get_max_threads(); + for (int i=1; i<argc; ++i) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 'o': // set max_outer_threads + if (sscanf(&argv[i][2], "%d", max_outer_t) != 1 || *max_outer_t < 1) { + fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'h': // print help message + help_message(argv[0]); + exit(0); + break; + default: + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + break; + } + } else { + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + } + } +} + +int main(int argc, char *argv[]) { + process_args(argc, argv, &max_outer_threads); +#ifdef LOG_THREADS + TotalThreadLevel.init(); +#endif + + double start, end; + start = omp_get_wtime( ); + +#pragma omp parallel num_threads(max_outer_threads) + { + int omp_thread = omp_get_thread_num(); +#ifdef LOG_THREADS + if (omp_thread == 0) + TotalThreadLevel.change_level(omp_get_num_threads(), omp_outer); +#endif + if (omp_thread == 0) { + MilliSleep(3000); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, omp_outer); +#endif +#pragma omp parallel + { + int my_omp_thread = omp_get_thread_num(); +#ifdef LOG_THREADS + if (my_omp_thread == 0) + TotalThreadLevel.change_level(omp_get_num_threads(), omp_inner); +#endif + printf("Inner thread %d nested inside outer thread %d\n", my_omp_thread, omp_thread); +#ifdef LOG_THREADS + if (my_omp_thread == 0) + TotalThreadLevel.change_level(-omp_get_num_threads(), omp_inner); +#endif + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, omp_outer); +#endif + } + else { + MilliSleep(6000); + } +#ifdef LOG_THREADS + if (omp_thread == 0) + TotalThreadLevel.change_level(-omp_get_num_threads(), omp_outer); +#endif + } + end = omp_get_wtime( ); + printf("Simple test of nested OMP (%d outer threads max) took: %6.6f\n", + max_outer_threads, end-start); +#ifdef LOG_THREADS + TotalThreadLevel.dump(); +#endif + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_simple.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_simple.cpp new file mode 100644 index 0000000000..d6948ce213 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/omp_simple.cpp @@ -0,0 +1,168 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <cstddef> +#include <cstdlib> +#include <cstdio> +#include <float.h> +#include <math.h> +#include <time.h> + +#include <omp.h> +#include <assert.h> + +#include "thread_level.h" + +#include "tbb/task.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/parallel_for.h" +#include "tbb/blocked_range.h" + +#if _WIN32||_WIN64 +#include <Windows.h> /* Need Sleep */ +#else +#include <unistd.h> /* Need usleep */ +#endif + +void MilliSleep( unsigned milliseconds ) { +#if _WIN32||_WIN64 + Sleep( milliseconds ); +#else + usleep( milliseconds*1000 ); +#endif /* _WIN32||_WIN64 */ +} + +using namespace std; +using namespace tbb; + +// Algorithm parameters +const int Max_TBB_Threads = 16; +const int Max_OMP_Threads = 16; + +// Global variables +int max_tbb_threads = Max_TBB_Threads; +int max_omp_threads = Max_OMP_Threads; + +// Print help on command-line arguments +void help_message(char *prog_name) { + fprintf(stderr, "\n%s usage:\n", prog_name); + fprintf(stderr, + " Parameters:\n" + " -t<num> : max # of threads TBB should use\n" + " -o<num> : max # of threads OMP should use\n" + "\n Help:\n" + " -h : print this help message\n"); +} + +// Process command-line arguments +void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) { + for (int i=1; i<argc; ++i) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 't': // set max_tbb_threads + if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) { + fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'o': // set max_omp_threads + if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) { + fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'h': // print help message + help_message(argv[0]); + exit(0); + break; + default: + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + break; + } + } else { + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + } + } +} + +int main(int argc, char *argv[]) { + process_args(argc, argv, &max_tbb_threads, &max_omp_threads); + TotalThreadLevel.init(); + + double start, end; + start = omp_get_wtime(); + +#pragma omp parallel num_threads(max_omp_threads) + { + int omp_thread = omp_get_thread_num(); +#ifdef LOG_THREADS + if (omp_thread == 0) + TotalThreadLevel.change_level(omp_get_num_threads(), omp_outer); +#endif + task_scheduler_init phase(max_tbb_threads); + if (omp_thread == 0) { + MilliSleep(3000); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, omp_outer); +#endif + parallel_for(blocked_range<size_t>(0, 1000), + [=](const blocked_range<size_t>& range) { +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_inner); +#endif +#pragma ivdep + for (size_t i=range.begin(); i!=range.end(); ++i) { + if (i==range.begin()) + printf("TBB range starting at %d on OMP thread %d\n", (int)i, omp_thread); + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_inner); +#endif + }, auto_partitioner()); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, omp_outer); +#endif + } + else { + MilliSleep(6000); + } +#ifdef LOG_THREADS + if (omp_thread == 0) + TotalThreadLevel.change_level(-omp_get_num_threads(), omp_outer); +#endif + } + end = omp_get_wtime(); + printf("Simple test of OMP (%d threads max) with TBB (%d threads max) inside took: %6.6f\n", + max_omp_threads, max_tbb_threads, end-start); +#ifdef LOG_THREADS + TotalThreadLevel.dump(); +#endif + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_multi_omp.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_multi_omp.cpp new file mode 100644 index 0000000000..1fd3b57798 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_multi_omp.cpp @@ -0,0 +1,194 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <cstddef> +#include <cstdlib> +#include <cstdio> +#include <float.h> +#include <math.h> +#include <time.h> + +#include <omp.h> +#include <assert.h> + +#include "thread_level.h" + +#include "tbb/task.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" +#include "tbb/scalable_allocator.h" + +#if _WIN32||_WIN64 +#include <Windows.h> /* Need Sleep */ +#else +#include <unistd.h> /* Need usleep */ +#endif + +void MilliSleep( unsigned milliseconds ) { +#if _WIN32||_WIN64 + Sleep( milliseconds ); +#else + usleep( milliseconds*1000 ); +#endif /* _WIN32||_WIN64 */ +} + +using namespace std; +using namespace tbb; + +// Algorithm parameters +const int Max_TBB_Threads = 16; +const int Max_OMP_Threads = 16; + +// Global variables +int max_tbb_threads = Max_TBB_Threads; +int max_omp_threads = Max_OMP_Threads; + +// Print help on command-line arguments +void help_message(char *prog_name) { + fprintf(stderr, "\n%s usage:\n", prog_name); + fprintf(stderr, + " Parameters:\n" + " -t<num> : max # of threads TBB should use\n" + " -o<num> : max # of threads OMP should use\n" + "\n Help:\n" + " -h : print this help message\n"); +} + +// Process command-line arguments +void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) { + for (int i=1; i<argc; ++i) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 't': // set max_tbb_threads + if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) { + fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'o': // set max_omp_threads + if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) { + fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'h': // print help message + help_message(argv[0]); + exit(0); + break; + default: + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + break; + } + } else { + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + } + } +} + +class SimpleTask : public task { + bool isLeaf; + int myId; +public: + SimpleTask(bool isLeaf_, int myId_) : isLeaf(isLeaf_), myId(myId_) {} + task* execute() { +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + omp_set_num_threads(max_omp_threads); + if (!isLeaf) { + set_ref_count(65); + for (int i=0; i<64; ++i) { + SimpleTask& st = *new(allocate_child()) SimpleTask(true, i); + spawn(st); + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + wait_for_all(); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + } + else { + if (myId%2 == 0) { + MilliSleep(3000); +#pragma omp parallel + { +#ifdef LOG_THREADS + if (omp_get_thread_num() == 0) + TotalThreadLevel.change_level(omp_get_num_threads()-1, omp_inner); +#endif + //printf("In OMP parallel region on TBB task with myId=0: thread %d of %d\n", omp_get_thread_num(), omp_get_num_threads()); +#ifdef LOG_THREADS + if (omp_get_thread_num() == 0) + TotalThreadLevel.change_level(-(omp_get_num_threads()-1), omp_inner); +#endif + } + } + else { + MilliSleep(6000); + } + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + return NULL; + } +}; + + +int main(int argc, char *argv[]) { +#ifdef LOG_THREADS + TotalThreadLevel.init(); + TotalThreadLevel.change_level(1, tbb_outer); +#endif + process_args(argc, argv, &max_tbb_threads, &max_omp_threads); + + task_scheduler_init phase(max_tbb_threads); + tick_count start, end; + start = tick_count::now(); + SimpleTask& st = *new(task::allocate_root()) SimpleTask(false, -1); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + task::spawn_root_and_wait(st); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + end = tick_count::now(); + printf("Simple Test of TBB (%d threads max) with OMP (%d threads max) inside took: %6.6f\n", + max_tbb_threads, max_omp_threads, (end-start).seconds()); + +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); + TotalThreadLevel.dump(); +#endif + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_simple.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_simple.cpp new file mode 100644 index 0000000000..1457fff74b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/tbb_simple.cpp @@ -0,0 +1,199 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <cstddef> +#include <cstdlib> +#include <cstdio> +#include <float.h> +#include <math.h> +#include <time.h> + +#include <omp.h> +#include <assert.h> + +#include "thread_level.h" + +#include "tbb/task.h" +#include "tbb/tick_count.h" +#include "tbb/task_scheduler_init.h" + +#if _WIN32||_WIN64 +#include <Windows.h> /* Need Sleep */ +#else +#include <unistd.h> /* Need usleep */ +#endif + +void MilliSleep( unsigned milliseconds ) { +#if _WIN32||_WIN64 + Sleep( milliseconds ); +#else + usleep( milliseconds*1000 ); +#endif /* _WIN32||_WIN64 */ +} + +using namespace std; +using namespace tbb; + +// Algorithm parameters +const int Max_TBB_Threads = 16; +const int Max_OMP_Threads = 16; + +// Global variables +int max_tbb_threads = Max_TBB_Threads; +int max_omp_threads = Max_OMP_Threads; + +// Print help on command-line arguments +void help_message(char *prog_name) { + fprintf(stderr, "\n%s usage:\n", prog_name); + fprintf(stderr, + " Parameters:\n" + " -t<num> : max # of threads TBB should use\n" + " -o<num> : max # of threads OMP should use\n" + "\n Help:\n" + " -h : print this help message\n"); +} + +// Process command-line arguments +void process_args(int argc, char *argv[], int *max_tbb_t, int *max_omp_t) { + for (int i=1; i<argc; ++i) { + if (argv[i][0] == '-') { + switch (argv[i][1]) { + case 't': // set max_tbb_threads + if (sscanf(&argv[i][2], "%d", max_tbb_t) != 1 || *max_tbb_t < 1) { + fprintf(stderr, "%s Warning: argument of -t option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'o': // set max_omp_threads + if (sscanf(&argv[i][2], "%d", max_omp_t) != 1 || *max_omp_t < 1) { + fprintf(stderr, "%s Warning: argument of -o option unacceptable: %s\n", argv[0], &argv[i][2]); + help_message(argv[0]); + } + break; + case 'h': // print help message + help_message(argv[0]); + exit(0); + break; + default: + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + break; + } + } else { + fprintf(stderr, "%s: Warning: command-line option ignored: %s\n", argv[0], argv[i]); + help_message(argv[0]); + } + } +} + +class SimpleTask : public task { + bool isLeaf; + int myId; +public: + SimpleTask(bool isLeaf_, int myId_) : isLeaf(isLeaf_), myId(myId_) {} + task* execute() { +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + omp_set_num_threads(max_omp_threads); + if (!isLeaf) { + set_ref_count(17); + for (int i=0; i<16; ++i) { + SimpleTask& st = *new(allocate_child()) SimpleTask(true, i); + spawn(st); + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + wait_for_all(); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + } + else { + if (myId == 0) { + MilliSleep(3000); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif +#pragma omp parallel + { +#ifdef LOG_THREADS + if (omp_get_thread_num() == 0) + TotalThreadLevel.change_level(omp_get_num_threads(), omp_inner); +#endif + printf("In OMP parallel region on TBB task with myId=0: thread %d of %d\n", + omp_get_thread_num(), omp_get_num_threads()); +#ifdef LOG_THREADS + if (omp_get_thread_num() == 0) + TotalThreadLevel.change_level(-omp_get_num_threads(), omp_inner); +#endif + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + } + else { + MilliSleep(6000); + } + } +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + return NULL; + } +}; + + +int main(int argc, char *argv[]) { +#ifdef LOG_THREADS + TotalThreadLevel.init(); + TotalThreadLevel.change_level(1, tbb_outer); +#endif + process_args(argc, argv, &max_tbb_threads, &max_omp_threads); + + task_scheduler_init phase(max_tbb_threads); + tick_count start, end; + start = tick_count::now(); + SimpleTask& st = *new(task::allocate_root()) SimpleTask(false, -1); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); +#endif + task::spawn_root_and_wait(st); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(1, tbb_outer); +#endif + end = tick_count::now(); + printf("Simple Test of TBB (%d threads max) with OMP (%d threads max) inside took: %6.6f\n", + max_tbb_threads, max_omp_threads, (end-start).seconds()); +#ifdef LOG_THREADS + TotalThreadLevel.change_level(-1, tbb_outer); + TotalThreadLevel.dump(); +#endif + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/thread_level.h b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/thread_level.h new file mode 100644 index 0000000000..9fc3cc731f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/perfor/thread_level.h @@ -0,0 +1,142 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Thread level recorder +#ifndef __THREAD_LEVEL_H +#define __THREAD_LEVEL_H +#include <cstdio> +#include <omp.h> +#include <assert.h> +#include "tbb/atomic.h" +#include "tbb/tick_count.h" + +//#define LOG_THREADS // use this to ifdef out calls to this class +//#define NO_BAIL_OUT // continue execution after detecting oversubscription + +using namespace tbb; + +typedef enum {tbb_outer, tbb_inner, omp_outer, omp_inner} client_t; + +class ThreadLevelRecorder { + tbb::atomic<int> tbb_outer_level; + tbb::atomic<int> tbb_inner_level; + tbb::atomic<int> omp_outer_level; + tbb::atomic<int> omp_inner_level; + struct record { + tbb::tick_count time; + int n_tbb_outer_thread; + int n_tbb_inner_thread; + int n_omp_outer_thread; + int n_omp_inner_thread; + }; + tbb::atomic<unsigned> next; + /** Must be power of two */ + static const unsigned max_record_count = 1<<20; + record array[max_record_count]; + int max_threads; + bool fail; + public: + void change_level(int delta, client_t whichClient); + void dump(); + void init(); +}; + +void ThreadLevelRecorder::change_level(int delta, client_t whichClient) { + int tox=tbb_outer_level, tix=tbb_inner_level, oox=omp_outer_level, oix=omp_inner_level; + if (whichClient == tbb_outer) { + tox = tbb_outer_level+=delta; + } else if (whichClient == tbb_inner) { + tix = tbb_inner_level+=delta; + } else if (whichClient == omp_outer) { + oox = omp_outer_level+=delta; + } else if (whichClient == omp_inner) { + oix = omp_inner_level+=delta; + } else { + printf("WARNING: Bad client type; ignoring.\n"); + return; + } + // log non-negative entries + tbb::tick_count t = tbb::tick_count::now(); + unsigned k = next++; + if (k<max_record_count) { + record& r = array[k]; + r.time = t; + r.n_tbb_outer_thread = tox>=0?tox:0; + r.n_omp_outer_thread = oox>=0?oox:0; + r.n_tbb_inner_thread = tix>=0?tix:0; + r.n_omp_inner_thread = oix>=0?oix:0; + } + char errStr[100]; + int tot_threads; + tot_threads = tox+tix+oox+oix; + sprintf(errStr, "ERROR: Number of threads (%d+%d+%d+%d=%d) in use exceeds maximum (%d).\n", + tox, tix, oox, oix, tot_threads, max_threads); + if (tot_threads > max_threads) { +#ifdef NO_BAIL_OUT + if (!fail) { + printf("%sContinuing...\n", errStr); + fail = true; + } +#else + dump(); + printf("%s\n", errStr); + assert(tot_threads <= max_threads); +#endif + } +} + +void ThreadLevelRecorder::dump() { + FILE* f = fopen("time.txt","w"); + if (!f) { + perror("fopen(time.txt)\n"); + exit(1); + } + unsigned limit = next; + if (limit>max_record_count) { // Clip + limit = max_record_count; + } + for (unsigned i=0; i<limit; ++i) { + fprintf(f,"%f\t%d\t%d\t%d\t%d\n",(array[i].time-array[0].time).seconds(), array[i].n_tbb_outer_thread, + array[i].n_tbb_inner_thread, array[i].n_omp_outer_thread, array[i].n_omp_inner_thread); + } + fclose(f); + int tox=tbb_outer_level, tix=tbb_inner_level, oox=omp_outer_level, oix=omp_inner_level; + int tot_threads; + tot_threads = tox+tix+oox+oix; + if (!fail) printf("INFO: Passed.\n"); + else printf("INFO: Failed.\n"); +} + +void ThreadLevelRecorder::init() { + fail = false; + max_threads = omp_get_max_threads(); + printf("INFO: Getting maximum hardware threads... %d.\n", max_threads); +} + +ThreadLevelRecorder TotalThreadLevel; +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/index.html b/deal.II/bundled/tbb41_20130401oss/src/rml/server/index.html new file mode 100644 index 0000000000..045fd61f82 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/index.html @@ -0,0 +1,18 @@ +<HTML> +<BODY> +<H2>Overview</H2> + +This directory has source code internal to the server. + +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/irml.rc b/deal.II/bundled/tbb41_20130401oss/src/rml/server/irml.rc new file mode 100644 index 0000000000..6b1974a0de --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/irml.rc @@ -0,0 +1,126 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include <winresrc.h> +#define ENDL "\r\n" +#include "tbb/tbb_version.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// manifest integration +#ifdef TBB_MANIFEST +#include "winuser.h" +2 RT_MANIFEST tbbmanifest.exe.manifest +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION TBB_VERNUMBERS + PRODUCTVERSION TBB_VERNUMBERS + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "Intel Corporation\0" + VALUE "FileDescription", "Threading Building Blocks resource manager library\0" + VALUE "FileVersion", TBB_VERSION "\0" +//what is it? VALUE "InternalName", "irml\0" + VALUE "LegalCopyright", "Copyright 2005-2013 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalTrademarks", "\0" +#ifndef TBB_USE_DEBUG + VALUE "OriginalFilename", "irml.dll\0" +#else + VALUE "OriginalFilename", "irml_debug.dll\0" +#endif + VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0" + VALUE "ProductVersion", TBB_VERSION "\0" + VALUE "Comments", TBB_VERSION_STRINGS "\0" + VALUE "PrivateBuild", "\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/job_automaton.h b/deal.II/bundled/tbb41_20130401oss/src/rml/server/job_automaton.h new file mode 100644 index 0000000000..7d6dd96e32 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/job_automaton.h @@ -0,0 +1,153 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __RML_job_automaton_H +#define __RML_job_automaton_H + +#include "rml_base.h" +#include "tbb/atomic.h" + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (push) + #pragma warning (disable: 4244) +#endif + +namespace rml { + +namespace internal { + +//! Finite state machine. +/** /--------------\ + / V + 0 --> 1--> ptr --> -1 + ^ + | + | + V + ptr|1 + +"owner" = corresponding server_thread. +Odd states (except -1) indicate that someone is executing code on the job. +Most transitions driven only by owner. +Transition 0-->-1 is driven by non-owner. +Transition ptr->-1 is driven by owner or non-owner. +*/ +class job_automaton: no_copy { +private: + tbb::atomic<intptr_t> my_job; +public: + /** Created by non-owner */ + job_automaton() { + my_job = 0; + } + + ~job_automaton() { + __TBB_ASSERT( my_job==-1, "must plug before destroying" ); + } + + //! Try to transition 0-->1 or ptr-->ptr|1. + /** Should only be called by owner. */ + bool try_acquire() { + intptr_t snapshot = my_job; + if( snapshot==-1 ) { + return false; + } else { + __TBB_ASSERT( (snapshot&1)==0, "already marked that way" ); + intptr_t old = my_job.compare_and_swap( snapshot|1, snapshot ); + __TBB_ASSERT( old==snapshot || old==-1, "unexpected interference" ); + return old==snapshot; + } + } + //! Transition ptr|1-->ptr + /** Should only be called by owner. */ + void release() { + intptr_t snapshot = my_job; + __TBB_ASSERT( snapshot&1, NULL ); + // Atomic store suffices here. + my_job = snapshot&~1; + } + + //! Transition 1-->ptr + /** Should only be called by owner. */ + void set_and_release( rml::job& job ) { + intptr_t value = reinterpret_cast<intptr_t>(&job); + __TBB_ASSERT( (value&1)==0, "job misaligned" ); + __TBB_ASSERT( value!=0, "null job" ); + __TBB_ASSERT( my_job==1, "already set, or not marked busy?" ); + // Atomic store suffices here. + my_job = value; + } + + //! Transition 0-->-1 + /** If successful, return true. called by non-owner (for TBB and the likes) */ + bool try_plug_null() { + return my_job.compare_and_swap( -1, 0 )==0; + } + + //! Try to transition to -1. If successful, set j to contents and return true. + /** Called by owner or non-owner. (for OpenMP and the likes) */ + bool try_plug( rml::job*&j ) { + for(;;) { + intptr_t snapshot = my_job; + if( snapshot&1 ) { + j = NULL; + return false; + } + // Not busy + if( my_job.compare_and_swap( -1, snapshot )==snapshot ) { + j = reinterpret_cast<rml::job*>(snapshot); + return true; + } + // Need to retry, because current thread may be non-owner that read a 0, and owner might have + // caused transition 0->1->ptr after we took our snapshot. + } + } + + /** Called by non-owner to wait for transition to ptr. */ + rml::job& wait_for_job() const { + intptr_t snapshot; + for(;;) { + snapshot = my_job; + if( snapshot&~1 ) break; + __TBB_Yield(); + } + __TBB_ASSERT( snapshot!=-1, "wait on plugged job_automaton" ); + return *reinterpret_cast<rml::job*>(snapshot&~1); + } +}; + +} // namespace internal +} // namespace rml + + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + #pragma warning (pop) +#endif // warning 4244 are back + +#endif /* __RML_job_automaton_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/lin-rml-export.def b/deal.II/bundled/tbb41_20130401oss/src/rml/server/lin-rml-export.def new file mode 100644 index 0000000000..290bd3dace --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/lin-rml-export.def @@ -0,0 +1,38 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +__RML_open_factory; +__RML_close_factory; +__TBB_make_rml_server; +__KMP_make_rml_server; +__TBB_call_with_my_server_info; +__KMP_call_with_my_server_info; +local:*; +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/rml_server.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/server/rml_server.cpp new file mode 100644 index 0000000000..b8dc62c530 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/rml_server.cpp @@ -0,0 +1,3327 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "rml_tbb.h" +#define private public /* Sleazy trick to avoid publishing internal names in public header. */ +#include "rml_omp.h" +#undef private + +#include "tbb/tbb_allocator.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/aligned_space.h" +#include "tbb/atomic.h" +#include "tbb/spin_mutex.h" +#include "tbb/tbb_misc.h" // Get AvailableHwConcurrency() from here. +#if _MSC_VER==1500 && !defined(__INTEL_COMPILER) +// VS2008/VC9 seems to have an issue; +#pragma warning( push ) +#pragma warning( disable: 4985 ) +#endif +#include "tbb/concurrent_vector.h" +#if _MSC_VER==1500 && !defined(__INTEL_COMPILER) +#pragma warning( pop ) +#endif +#if _MSC_VER && defined(_Wp64) +// Workaround for overzealous compiler warnings +#pragma warning (push) +#pragma warning (disable: 4244) +#endif + +#include "job_automaton.h" +#include "wait_counter.h" +#include "thread_monitor.h" + +#if RML_USE_WCRM +#include <concrt.h> +#include <concrtrm.h> +using namespace Concurrency; +#include <vector> +#include <hash_map> +#define __RML_REMOVE_VIRTUAL_PROCESSORS_DISABLED 0 +#endif /* RML_USE_WCRM */ + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) + +namespace rml { +namespace internal { + +using tbb::internal::rml::tbb_client; +using tbb::internal::rml::tbb_server; + +using __kmp::rml::omp_client; +using __kmp::rml::omp_server; + +typedef versioned_object::version_type version_type; + +#define SERVER_VERSION 2 +#define EARLIEST_COMPATIBLE_CLIENT_VERSION 2 + +static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize; + +template<typename Server, typename Client> class generic_connection; +class tbb_connection_v2; +class omp_connection_v2; + +#if RML_USE_WCRM +//! State of a server_thread +/** Below are diagrams of legal state transitions. + + ts_busy + ^ ^ + / \ + / V + ts_done <----- ts_asleep <------> ts_idle +*/ + +enum thread_state_t { + ts_idle, + ts_asleep, + ts_busy, + ts_done +}; + +//! Extra state of an omp server thread +enum thread_extra_state_t { + ts_none, + ts_removed, + ts_lent +}; + +//! Results from try_grab_for() +enum thread_grab_t { + wk_failed, + wk_from_asleep, + wk_from_idle +}; + +#else /* !RML_USE_WCRM */ + +//! State of a server_thread +/** Below are diagrams of legal state transitions. + + OMP + ts_omp_busy + ^ ^ + / \ + / V + ts_asleep <-----------> ts_idle + + + ts_deactivated + ^ ^ + / \ + V \ + ts_none <--------------> ts_reactivated + + TBB + ts_tbb_busy + ^ ^ + / \ + / V + ts_asleep <-----------> ts_idle --> ts_done + + For TBB only. Extra state transition. + + ts_created -> ts_started -> ts_visited + */ +enum thread_state_t { + //! Thread not doing anything useful, but running and looking for work. + ts_idle, + //! Thread not doing anything useful and is asleep */ + ts_asleep, + //! Thread is enlisted into OpenMP team + ts_omp_busy, + //! Thread is busy doing TBB work. + ts_tbb_busy, + //! For tbb threads only + ts_done, + ts_created, + ts_started, + ts_visited, + //! For omp threads only + ts_none, + ts_deactivated, + ts_reactivated +}; +#endif /* RML_USE_WCRM */ + +#if TBB_USE_ASSERT +#define PRODUCE_ARG(x) ,x +#else +#define PRODUCE_ARG(x) +#endif /* TBB_USE_ASSERT */ + +//! Synchronizes dispatch of OpenMP work. +class omp_dispatch_type { + typedef ::rml::job job_type; + omp_client* client; + void* cookie; + omp_client::size_type index; + tbb::atomic<job_type*> job; +#if TBB_USE_ASSERT + omp_connection_v2* server; +#endif /* TBB_USE_ASSERT */ +public: + omp_dispatch_type() {job=NULL;} + void consume(); + void produce( omp_client& c, job_type& j, void* cookie_, omp_client::size_type index_ PRODUCE_ARG( omp_connection_v2& s )) { + __TBB_ASSERT( &j, NULL ); + __TBB_ASSERT( !job, "job already set" ); + client = &c; +#if TBB_USE_ASSERT + server = &s; +#endif /* TBB_USE_ASSERT */ + cookie = cookie_; + index = index_; + // Must be last + job = &j; + } +}; + +//! A reference count. +/** No default constructor, because users of ref_count must be very careful about whether the + initial reference count is 0 or 1. */ +class ref_count: no_copy { + friend class thread_map; + tbb::atomic<int> my_ref_count; +public: + ref_count(int k ) {my_ref_count=k;} + ~ref_count() {__TBB_ASSERT( !my_ref_count, "premature destruction of refcounted object" );} + //! Add one and return new value. + int add_ref() { + int k = ++my_ref_count; + __TBB_ASSERT(k>=1,"reference count underflowed before add_ref"); + return k; + } + //! Subtract one and return new value. + int remove_ref() { + int k = --my_ref_count; + __TBB_ASSERT(k>=0,"reference count underflow"); + return k; + } +}; + +#if RML_USE_WCRM + +#if USE_UMS_THREAD +#define RML_THREAD_KIND UmsThreadDefault +#define RML_THREAD_KIND_STRING "UmsThread" +#else +#define RML_THREAD_KIND ThreadScheduler +#define RML_THREAD_KIND_STRING "WinThread" +#endif + +// Forward declaration +class thread_map; + +static const IExecutionResource* c_remove_prepare = (IExecutionResource*)0; +static const IExecutionResource* c_remove_returned = (IExecutionResource*)1; + +//! Server thread representation +class server_thread_rep : no_copy { + friend class thread_map; + friend class omp_connection_v2; + friend class server_thread; + friend class tbb_server_thread; + friend class omp_server_thread; + template<typename Connection> friend void make_job( Connection& c, typename Connection::server_thread_type& t ); + typedef int thread_state_rep_t; +public: + //! Ctor + server_thread_rep( bool assigned, IScheduler* s, IExecutionResource* r, thread_map& map, rml::client& cl ) : + uid( GetExecutionContextId() ), my_scheduler(s), my_proxy(NULL), + my_thread_map(map), my_client(cl), my_job(NULL) + { + my_state = assigned ? ts_busy : ts_idle; + my_extra_state = ts_none; + terminate = false; + my_execution_resource = r; + } + //! Dtor + ~server_thread_rep() {} + + //! Synchronization routine + inline rml::job* wait_for_job() { + if( !my_job ) my_job = &my_job_automaton.wait_for_job(); + return my_job; + } + + // Getters and setters + inline thread_state_t read_state() const { thread_state_rep_t s = my_state; return static_cast<thread_state_t>(s); } + inline void set_state( thread_state_t to ) {my_state = to;} + inline void set_removed() { __TBB_ASSERT( my_extra_state==ts_none, NULL ); my_extra_state = ts_removed; } + inline bool is_removed() const { return my_extra_state==ts_removed; } + inline bool is_lent() const {return my_extra_state==ts_lent;} + inline void set_lent() { my_extra_state=ts_lent; } + inline void set_returned() { my_extra_state=ts_none; } + inline IExecutionResource* get_execution_resource() { return my_execution_resource; } + inline IVirtualProcessorRoot* get_virtual_processor() { return (IVirtualProcessorRoot*)get_execution_resource(); } + + //! Enlist the thread for work + inline bool wakeup( thread_state_t to, thread_state_t from ) { + __TBB_ASSERT( from==ts_asleep && (to==ts_idle||to==ts_busy||to==ts_done), NULL ); + return my_state.compare_and_swap( to, from )==from; + } + + //! Enlist the thread for. + thread_grab_t try_grab_for(); + + //! Destroy the client job associated with the thread + template<typename Connection> bool destroy_job( Connection* c ); + + //! Try to re-use the thread + void revive( IScheduler* s, IExecutionResource* r, rml::client& c ) { + // the variables may not have been set before a thread was told to quit + __TBB_ASSERT( my_scheduler==s, "my_scheduler has been altered?\n" ); + my_scheduler = s; + __TBB_ASSERT( &my_client==&c, "my_client has been altered?\n" ); + if( r ) my_execution_resource = r; + my_client = c; + my_state = ts_idle; + __TBB_ASSERT( my_extra_state==ts_removed, NULL ); + my_extra_state = ts_none; + } + +protected: + const int uid; + IScheduler* my_scheduler; + IThreadProxy* my_proxy; + tbb::atomic<IExecutionResource*> my_execution_resource; /* for non-masters, it is IVirtualProcessorRoot */ + thread_map& my_thread_map; + rml::client& my_client; + job* my_job; + job_automaton my_job_automaton; + tbb::atomic<bool> terminate; + tbb::atomic<thread_state_rep_t> my_state; + tbb::atomic<thread_extra_state_t> my_extra_state; +}; + +//! Class that implements IExecutionContext +class server_thread : public IExecutionContext, public server_thread_rep { + friend class tbb_connection_v2; + friend class omp_connection_v2; + friend class tbb_server_thread; + friend class omp_server_thread; + friend class thread_map; + template<typename Connection> friend void make_job( Connection& c, typename Connection::server_thread_type& t ); +protected: + server_thread( bool is_tbb, bool assigned, IScheduler* s, IExecutionResource* r, thread_map& map, rml::client& cl ) : server_thread_rep(assigned,s,r,map,cl), tbb_thread(is_tbb) {} + ~server_thread() {} + /*override*/ unsigned int GetId() const { return uid; } + /*override*/ IScheduler* GetScheduler() { return my_scheduler; } + /*override*/ IThreadProxy* GetProxy() { return my_proxy; } + /*override*/ void SetProxy( IThreadProxy* thr_proxy ) { my_proxy = thr_proxy; } + +private: + bool tbb_thread; +}; + +// Forward declaration +class tbb_connection_v2; +class omp_connection_v2; + +//! TBB server thread +class tbb_server_thread : public server_thread { + friend class tbb_connection_v2; +public: + tbb_server_thread( bool assigned, IScheduler* s, IExecutionResource* r, tbb_connection_v2* con, thread_map& map, rml::client& cl ) : server_thread(true,assigned,s,r,map,cl), my_conn(con) { + activation_count = 0; + } + ~tbb_server_thread() {} + /*override*/ void Dispatch( DispatchState* ); + inline bool initiate_termination(); + bool sleep_perhaps(); + //! Switch out this thread + bool switch_out(); +private: + tbb_connection_v2* my_conn; +public: + tbb::atomic<int> activation_count; +}; + +//! OMP server thread +class omp_server_thread : public server_thread { + friend class omp_connection_v2; +public: + omp_server_thread( bool assigned, IScheduler* s, IExecutionResource* r, omp_connection_v2* con, thread_map& map, rml::client& cl ) : + server_thread(false,assigned,s,r,map,cl), my_conn(con), my_cookie(NULL), my_index(UINT_MAX) {} + ~omp_server_thread() {} + /*override*/ void Dispatch( DispatchState* ); + inline void* get_cookie() {return my_cookie;} + inline ::__kmp::rml::omp_client::size_type get_index() {return my_index;} + + inline IExecutionResource* get_execution_resource() { return get_execution_resource(); } + inline bool initiate_termination() { return destroy_job( (omp_connection_v2*) my_conn ); } + void sleep_perhaps(); +private: + omp_connection_v2* my_conn; + void* my_cookie; + ::__kmp::rml::omp_client::size_type my_index; + omp_dispatch_type omp_data; +}; + +//! Class that implements IScheduler +template<typename Connection> +class scheduler : no_copy, public IScheduler { +public: + /*override*/ unsigned int GetId() const {return uid;} + /*override*/ void Statistics( unsigned int* /*pTaskCompletionRate*/, unsigned int* /*pTaskArrivalRate*/, unsigned int* /*pNumberOfTaskEnqueued*/) {} + /*override*/ SchedulerPolicy GetPolicy() const { __TBB_ASSERT(my_policy,NULL); return *my_policy; } + /*override*/ void AddVirtualProcessors( IVirtualProcessorRoot** vproots, unsigned int count ) { if( !my_conn.is_closing() ) my_conn.add_virtual_processors( vproots, count); } + /*override*/ void RemoveVirtualProcessors( IVirtualProcessorRoot** vproots, unsigned int count ); + /*override*/ void NotifyResourcesExternallyIdle( IVirtualProcessorRoot** vproots, unsigned int count ) { __TBB_ASSERT( false, "This call is not allowed for TBB" ); } + /*override*/ void NotifyResourcesExternallyBusy( IVirtualProcessorRoot** vproots, unsigned int count ) { __TBB_ASSERT( false, "This call is not allowed for TBB" ); } +protected: + scheduler( Connection& conn ); + virtual ~scheduler() { __TBB_ASSERT( my_policy, NULL ); delete my_policy; } + +public: + static scheduler* create( Connection& conn ) {return new scheduler( conn );} + +private: + const int uid; + Connection& my_conn; + SchedulerPolicy* my_policy; +}; + + +/* + * --> ts_busy --> ts_done + */ +class thread_scavenger_thread : public IExecutionContext, no_copy { +public: + thread_scavenger_thread( IScheduler* s, IVirtualProcessorRoot* r, thread_map& map ) : + uid( GetExecutionContextId() ), my_scheduler(s), my_virtual_processor_root(r), my_proxy(NULL), my_thread_map(map) + { + my_state = ts_busy; +#if TBB_USE_ASSERT + activation_count = 0; +#endif + } + ~thread_scavenger_thread() {} + /*override*/ unsigned int GetId() const { return uid; } + /*override*/ IScheduler* GetScheduler() { return my_scheduler; } + /*override*/ IThreadProxy* GetProxy() { return my_proxy; } + /*override*/ void SetProxy( IThreadProxy* thr_proxy ) { my_proxy = thr_proxy; } + /*override*/ void Dispatch( DispatchState* ); + inline thread_state_t read_state() { return my_state; } + inline void set_state( thread_state_t s ) { my_state = s; } + inline IVirtualProcessorRoot* get_virtual_processor() { return my_virtual_processor_root; } +private: + const int uid; + IScheduler* my_scheduler; + IVirtualProcessorRoot* my_virtual_processor_root; + IThreadProxy* my_proxy; + thread_map& my_thread_map; + tbb::atomic<thread_state_t> my_state; +#if TBB_USE_ASSERT +public: + tbb::atomic<int> activation_count; +#endif +}; + +static const thread_scavenger_thread* c_claimed = reinterpret_cast<thread_scavenger_thread*>(1); + +struct garbage_connection_queue { + tbb::atomic<uintptr_t> head; + tbb::atomic<uintptr_t> tail; + static const uintptr_t empty = 0; // connection scavenger thread empty list + static const uintptr_t plugged = 1; // end of use of the list + static const uintptr_t plugged_acked = 2; // connection scavenger saw the plugged flag, and it freed all connections +}; + +//! Connection scavenger +/** It collects closed connection objects, wait for worker threads belonging to the connection to return to ConcRT RM + * then return the object to the memory manager. + */ +class connection_scavenger_thread { + friend void assist_cleanup_connections(); + /* + * connection_scavenger_thread's state + * ts_busy <----> ts_asleep <-- + */ + tbb::atomic<thread_state_t> state; + + /* We steal two bits from a connection pointer to encode + * whether the connection is for TBB or for OMP. + * + * ---------------------------------- + * | | | | + * ---------------------------------- + * ^ ^ + * / | + * 1 : tbb, 0 : omp | + * if set, terminate + */ + // FIXME: pad these? + thread_monitor monitor; + HANDLE thr_handle; +#if TBB_USE_ASSERT + tbb::atomic<int> n_scavenger_threads; +#endif + +public: + connection_scavenger_thread() : thr_handle(NULL) { + state = ts_asleep; +#if TBB_USE_ASSERT + n_scavenger_threads = 0; +#endif + } + + ~connection_scavenger_thread() {} + + void wakeup() { + if( state.compare_and_swap( ts_busy, ts_asleep )==ts_asleep ) + monitor.notify(); + } + + void sleep_perhaps(); + + void process_requests( uintptr_t conn_ex ); + + static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg ); + + void launch() { + thread_monitor::launch( connection_scavenger_thread::thread_routine, this, NULL ); + } + + template<typename Server, typename Client> + void add_request( generic_connection<Server,Client>* conn_to_close ); + + template<typename Server, typename Client> + uintptr_t grab_and_prepend( generic_connection<Server,Client>* last_conn_to_close ); +}; + +void free_all_connections( uintptr_t ); + +#endif /* RML_USE_WCRM */ + +#if !RML_USE_WCRM +class server_thread; + +//! thread_map_base; we need to make the iterator type available to server_thread +struct thread_map_base { + //! A value in the map + class value_type { + public: + server_thread& thread() { + __TBB_ASSERT( my_thread, "thread_map::value_type::thread() called when !my_thread" ); + return *my_thread; + } + rml::job& job() { + __TBB_ASSERT( my_job, "thread_map::value_type::job() called when !my_job" ); + return *my_job; + } + value_type() : my_thread(NULL), my_job(NULL) {} + server_thread& wait_for_thread() const { + for(;;) { + server_thread* ptr=const_cast<server_thread*volatile&>(my_thread); + if( ptr ) + return *ptr; + __TBB_Yield(); + } + } + /** Shortly after when a connection is established, it is possible for the server + to grab a server_thread that has not yet created a job object for that server. */ + rml::job& wait_for_job() const { + if( !my_job ) { + my_job = &my_automaton.wait_for_job(); + } + return *my_job; + } + private: + server_thread* my_thread; + /** Marked mutable because though it is physically modified, conceptually it is a duplicate of + the job held by job_automaton. */ + mutable rml::job* my_job; + job_automaton my_automaton; + // FIXME - pad out to cache line, because my_automaton is hit hard by thread() + friend class thread_map; + }; + typedef tbb::concurrent_vector<value_type,tbb::zero_allocator<value_type,tbb::cache_aligned_allocator> > array_type; +}; +#endif /* !RML_USE_WCRM */ + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress overzealous compiler warnings about uninstantiatble class + #pragma warning(push) + #pragma warning(disable:4510 4610) +#endif + +template<typename T> +class padded: public T { + char pad[cache_line_size - sizeof(T)%cache_line_size]; +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning(pop) +#endif + +// FIXME - should we pad out memory to avoid false sharing of our global variables? +static unsigned the_default_concurrency; +static tbb::atomic<int> the_balance; +static tbb::atomic<tbb::internal::do_once_state> rml_module_state; + +#if !RML_USE_WCRM +//! Per thread information +/** ref_count holds number of clients that are using this, + plus 1 if a host thread owns this instance. */ +class server_thread: public ref_count { + friend class thread_map; + template<typename Server, typename Client> friend class generic_connection; + friend class tbb_connection_v2; + friend class omp_connection_v2; + //! Integral type that can hold a thread_state_t + typedef int thread_state_rep_t; + tbb::atomic<thread_state_rep_t> state; +public: + thread_monitor monitor; +private: + bool is_omp_thread; + tbb::atomic<thread_state_rep_t> my_extra_state; + server_thread* link; + thread_map_base::array_type::iterator my_map_pos; + rml::server *my_conn; + rml::job* my_job; + job_automaton* my_ja; + size_t my_index; + tbb::atomic<bool> terminate; + omp_dispatch_type omp_dispatch; + +#if TBB_USE_ASSERT + //! Flag used to check if thread is still using *this. + bool has_active_thread; +#endif /* TBB_USE_ASSERT */ + + //! Volunteer to sleep. + void sleep_perhaps( thread_state_t asleep ); + + //! Destroy job corresponding to given client + /** Return true if thread must quit. */ + template<typename Connection> + bool destroy_job( Connection& c ); + + //! Do terminate the thread + /** Return true if thread must quit. */ + bool do_termination(); + + void loop(); + static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg ); + +public: + server_thread(); + + ~server_thread(); + + //! Read the thread state + thread_state_t read_state() const { + thread_state_rep_t s = state; + __TBB_ASSERT( unsigned(s)<=unsigned(ts_done), "corrupted server thread?" ); + return thread_state_t(s); + } + + //! Read the tbb-specific extra thread state + thread_state_t read_extra_state() const { + thread_state_rep_t s = my_extra_state; + return thread_state_t(s); + } + + //! Launch a thread that is bound to *this. + void launch( size_t stack_size ); + + //! Attempt to wakeup a thread + /** The value "to" is the new state for the thread, if it was woken up. + Returns true if thread was woken up, false otherwise. */ + bool wakeup( thread_state_t to, thread_state_t from ); + + //! Attempt to enslave a thread for OpenMP/TBB. + /** Returns true if state is successfully changed. 's' takes either ts_omp_busy or ts_tbb_busy */ + bool try_grab_for( thread_state_t s ); + +#if _WIN32||_WIN64 + //! Send the worker thread to sleep temporarily + void deactivate(); + + //! Wake the worker thread up + void reactivate(); +#endif /* _WIN32||_WIN64 */ +}; + +//! Bag of threads that are private to a client. +class private_thread_bag { + struct list_thread: server_thread { + list_thread* next; + }; + //! Root of atomic linked list of list_thread + /** ABA problem is avoided because items are only atomically pushed, never popped. */ + tbb::atomic<list_thread*> my_root; + tbb::cache_aligned_allocator<padded<list_thread> > my_allocator; +public: + //! Construct empty bag + private_thread_bag() {my_root=NULL;} + + //! Create a fresh server_thread object. + server_thread& add_one_thread() { + list_thread* t = my_allocator.allocate(1); + new( t ) list_thread; + // Atomically add to list + list_thread* old_root; + do { + old_root = my_root; + t->next = old_root; + } while( my_root.compare_and_swap( t, old_root )!=old_root ); + return *t; + } + + //! Destroy the bag and threads in it. + ~private_thread_bag() { + while( my_root ) { + // Unlink thread from list. + list_thread* t = my_root; + my_root = t->next; + // Destroy and deallocate the thread. + t->~list_thread(); + my_allocator.deallocate(static_cast<padded<list_thread>*>(t),1); + } + } +}; + +//! Forward declaration +void wakeup_some_tbb_threads(); + +//! Type-independent part of class generic_connection. +/** One to one map from server threads to jobs, and associated reference counting. */ +class thread_map : public thread_map_base { +public: + typedef rml::client::size_type size_type; + //! ctor + thread_map( wait_counter& fc, ::rml::client& client ) : + all_visited_at_least_once(false), my_min_stack_size(0), my_server_ref_count(1), + my_client_ref_count(1), my_client(client), my_factory_counter(fc) + { my_unrealized_threads = 0; } + //! dtor + ~thread_map() {} + typedef array_type::iterator iterator; + iterator begin() {return my_array.begin();} + iterator end() {return my_array.end();} + void bind(); + void unbind(); + void assist_cleanup( bool assist_null_only ); + + /** Returns number of unrealized threads to create. */ + size_type wakeup_tbb_threads( size_type n ); + bool wakeup_next_thread( iterator i, tbb_connection_v2& conn ); + void release_tbb_threads( server_thread* t ); + void adjust_balance( int delta ); + + //! Add a server_thread object to the map, but do not bind it. + /** Return NULL if out of unrealized threads. */ + value_type* add_one_thread( bool is_omp_thread_ ); + + void bind_one_thread( rml::server& server, value_type& x ); + + void remove_client_ref(); + int add_server_ref() {return my_server_ref_count.add_ref();} + int remove_server_ref() {return my_server_ref_count.remove_ref();} + + ::rml::client& client() const {return my_client;} + + size_type get_unrealized_threads() { return my_unrealized_threads; } + +private: + private_thread_bag my_private_threads; + bool all_visited_at_least_once; + array_type my_array; + size_t my_min_stack_size; + tbb::atomic<size_type> my_unrealized_threads; + + //! Number of threads referencing *this, plus one extra. + /** When it becomes zero, the containing server object can be safely deleted. */ + ref_count my_server_ref_count; + + //! Number of jobs that need cleanup, plus one extra. + /** When it becomes zero, acknowledge_close_connection is called. */ + ref_count my_client_ref_count; + + ::rml::client& my_client; + //! Counter owned by factory that produced this thread_map. + wait_counter& my_factory_counter; +}; + +void thread_map::bind_one_thread( rml::server& server, value_type& x ) { + // Add one to account for the thread referencing this map hereforth. + server_thread& t = x.thread(); + my_server_ref_count.add_ref(); + my_client_ref_count.add_ref(); +#if TBB_USE_ASSERT + __TBB_ASSERT( t.add_ref()==1, NULL ); +#else + t.add_ref(); +#endif + // Have responsibility to start the thread. + t.my_conn = &server; + t.my_ja = &x.my_automaton; + t.launch( my_min_stack_size ); + /* Must wake thread up so it can fill in its "my_job" field in *this. + Otherwise deadlock can occur where wait_for_job spins on thread that is sleeping. */ + __TBB_ASSERT( t.state!=ts_tbb_busy, NULL ); + t.wakeup( ts_idle, ts_asleep ); +} + +thread_map::value_type* thread_map::add_one_thread( bool is_omp_thread_ ) { + size_type u; + do { + u = my_unrealized_threads; + if( !u ) return NULL; + } while( my_unrealized_threads.compare_and_swap(u-1,u)!=u ); + server_thread& t = my_private_threads.add_one_thread(); + t.is_omp_thread = is_omp_thread_; + __TBB_ASSERT( u>=1, NULL ); + t.my_index = u - 1; + __TBB_ASSERT( t.state!=ts_tbb_busy, NULL ); + t.my_extra_state = t.is_omp_thread ? ts_none : ts_created; + + iterator i = t.my_map_pos = my_array.grow_by(1); + value_type& v = *i; + v.my_thread = &t; + return &v; +} + +void thread_map::bind() { + ++my_factory_counter; + my_min_stack_size = my_client.min_stack_size(); + __TBB_ASSERT( my_unrealized_threads==0, "already called bind?" ); + my_unrealized_threads = my_client.max_job_count(); +} + +void thread_map::unbind() { + // Ask each server_thread to cleanup its job for this server. + for( iterator i=begin(); i!=end(); ++i ) { + server_thread& t = i->thread(); + t.terminate = true; + t.wakeup( ts_idle, ts_asleep ); + } + // Remove extra ref to client. + remove_client_ref(); +} + +void thread_map::assist_cleanup( bool assist_null_only ) { + // To avoid deadlock, the current thread *must* help out with cleanups that have not started, + // because the thread that created the job may be busy for a long time. + for( iterator i = begin(); i!=end(); ++i ) { + rml::job* j=0; + job_automaton& ja = i->my_automaton; + if( assist_null_only ? ja.try_plug_null() : ja.try_plug(j) ) { + if( j ) { + my_client.cleanup(*j); + } else { + // server thread did not get a chance to create a job. + } + remove_client_ref(); + } + } +} + +thread_map::size_type thread_map::wakeup_tbb_threads( size_type n ) { + __TBB_ASSERT(n>0,"must specify positive number of threads to wake up"); + iterator e = end(); + for( iterator k=begin(); k!=e; ++k ) { + // If another thread added *k, there is a tiny timing window where thread() is invalid. + server_thread& t = k->wait_for_thread(); + thread_state_t thr_s = t.read_state(); + if( t.read_extra_state()==ts_created || thr_s==ts_tbb_busy || thr_s==ts_done ) + continue; + if( --the_balance>=0 ) { // try to withdraw a coin from the deposit + while( !t.try_grab_for( ts_tbb_busy ) ) { + thr_s = t.read_state(); + if( thr_s==ts_tbb_busy || thr_s==ts_done ) { + // we lost; move on to the next. + ++the_balance; + goto skip; + } + } + if( --n==0 ) + return 0; + } else { + // overdraft. + ++the_balance; + break; + } +skip: + ; + } + return n<my_unrealized_threads ? n : my_unrealized_threads; +} +#else /* RML_USE_WCRM */ + +class thread_map : no_copy { + friend class omp_connection_v2; + typedef ::std::hash_map<uintptr_t,server_thread*> hash_map_type; + size_t my_min_stack_size; + size_t my_unrealized_threads; + ::rml::client& my_client; + //! Counter owned by factory that produced this thread_map. + wait_counter& my_factory_counter; + //! Ref counters + ref_count my_server_ref_count; + ref_count my_client_ref_count; + // FIXME: pad this? + hash_map_type my_map; + bool shutdown_in_progress; + std::vector<IExecutionResource*> original_exec_resources; + tbb::cache_aligned_allocator<padded<tbb_server_thread> > my_tbb_allocator; + tbb::cache_aligned_allocator<padded<omp_server_thread> > my_omp_allocator; + tbb::cache_aligned_allocator<padded<thread_scavenger_thread> > my_scavenger_allocator; + IResourceManager* my_concrt_resource_manager; + IScheduler* my_scheduler; + ISchedulerProxy* my_scheduler_proxy; + tbb::atomic<thread_scavenger_thread*> my_thread_scavenger_thread; +#if TBB_USE_ASSERT + tbb::atomic<int> n_add_vp_requests; + tbb::atomic<int> n_thread_scavengers_created; +#endif +public: + thread_map( wait_counter& fc, ::rml::client& client ) : + my_min_stack_size(0), my_client(client), my_factory_counter(fc), + my_server_ref_count(1), my_client_ref_count(1), shutdown_in_progress(false), + my_concrt_resource_manager(NULL), my_scheduler(NULL), my_scheduler_proxy(NULL) + { + my_thread_scavenger_thread = NULL; +#if TBB_USE_ASSERT + n_add_vp_requests = 0; + n_thread_scavengers_created; +#endif + } + + ~thread_map() { + __TBB_ASSERT( n_thread_scavengers_created<=1, "too many scavenger thread created" ); + // if thread_scavenger_thread is launched, wait for it to complete + if( my_thread_scavenger_thread ) { + __TBB_ASSERT( my_thread_scavenger_thread!=c_claimed, NULL ); + while( my_thread_scavenger_thread->read_state()==ts_busy ) + __TBB_Yield(); + thread_scavenger_thread* tst = my_thread_scavenger_thread; + my_scavenger_allocator.deallocate(static_cast<padded<thread_scavenger_thread>*>(tst),1); + } + // deallocate thread contexts + for( hash_map_type::const_iterator hi=my_map.begin(); hi!=my_map.end(); ++hi ) { + server_thread* thr = hi->second; + if( thr->tbb_thread ) { + while( ((tbb_server_thread*)thr)->activation_count>1 ) + __TBB_Yield(); + ((tbb_server_thread*)thr)->~tbb_server_thread(); + my_tbb_allocator.deallocate(static_cast<padded<tbb_server_thread>*>(thr),1); + } else { + ((omp_server_thread*)thr)->~omp_server_thread(); + my_omp_allocator.deallocate(static_cast<padded<omp_server_thread>*>(thr),1); + } + } + if( my_scheduler_proxy ) { + my_scheduler_proxy->Shutdown(); + my_concrt_resource_manager->Release(); + __TBB_ASSERT( my_scheduler, NULL ); + delete my_scheduler; + } else { + __TBB_ASSERT( !my_scheduler, NULL ); + } + } + typedef hash_map_type::key_type key_type; + typedef hash_map_type::value_type value_type; + typedef hash_map_type::iterator iterator; + iterator begin() {return my_map.begin();} + iterator end() {return my_map.end();} + iterator find( key_type k ) {return my_map.find( k );} + iterator insert( key_type k, server_thread* v ) { + std::pair<iterator,bool> res = my_map.insert( value_type(k,v) ); + return res.first; + } + void bind( IScheduler* s ) { + ++my_factory_counter; + if( s ) { + my_unrealized_threads = s->GetPolicy().GetPolicyValue( MaxConcurrency ); + __TBB_ASSERT( my_unrealized_threads>0, NULL ); + my_scheduler = s; + my_concrt_resource_manager = CreateResourceManager(); // reference count==3 when first created. + my_scheduler_proxy = my_concrt_resource_manager->RegisterScheduler( s, CONCRT_RM_VERSION_1 ); + my_scheduler_proxy->RequestInitialVirtualProcessors( false ); + } + } + bool is_closing() { return shutdown_in_progress; } + void unbind( rml::server& server, ::tbb::spin_mutex& mtx ); + void add_client_ref() { my_server_ref_count.add_ref(); } + void remove_client_ref(); + void add_server_ref() {my_server_ref_count.add_ref();} + int remove_server_ref() {return my_server_ref_count.remove_ref();} + int get_server_ref_count() { int k = my_server_ref_count.my_ref_count; return k; } + void assist_cleanup( bool assist_null_only ); + void adjust_balance( int delta ); + int current_balance() const {int k = the_balance; return k;} + ::rml::client& client() const {return my_client;} + void register_as_master( server::execution_resource_t& v ) const { (IExecutionResource*&)v = my_scheduler_proxy ? my_scheduler_proxy->SubscribeCurrentThread() : NULL; } + // Rremove() should be called from the same thread that subscribed the current h/w thread (i.e., the one that + // called register_as_master() ). + void unregister( server::execution_resource_t v ) const {if( v ) ((IExecutionResource*)v)->Remove( my_scheduler );} + void add_virtual_processors( IVirtualProcessorRoot** vprocs, unsigned int count, tbb_connection_v2& conn, ::tbb::spin_mutex& mtx ); + void add_virtual_processors( IVirtualProcessorRoot** vprocs, unsigned int count, omp_connection_v2& conn, ::tbb::spin_mutex& mtx ); + void remove_virtual_processors( IVirtualProcessorRoot** vproots, unsigned count, ::tbb::spin_mutex& mtx ); + void mark_virtual_processors_as_lent( IVirtualProcessorRoot** vproots, unsigned count, ::tbb::spin_mutex& mtx ); + void create_oversubscribers( unsigned n, std::vector<server_thread*>& thr_vec, omp_connection_v2& conn, ::tbb::spin_mutex& mtx ); + void wakeup_tbb_threads( int c, ::tbb::spin_mutex& mtx ); + void mark_virtual_processors_as_returned( IVirtualProcessorRoot** vprocs, unsigned int count, tbb::spin_mutex& mtx ); + inline void addto_original_exec_resources( IExecutionResource* r, ::tbb::spin_mutex& mtx ) { + ::tbb::spin_mutex::scoped_lock lck(mtx); + __TBB_ASSERT( !is_closing(), "try to regster master while connection is being shutdown?" ); + original_exec_resources.push_back( r ); + } +#if !__RML_REMOVE_VIRTUAL_PROCESSORS_DISABLED + void allocate_thread_scavenger( IExecutionResource* v ); +#endif + inline thread_scavenger_thread* get_thread_scavenger() { return my_thread_scavenger_thread; } +}; + +garbage_connection_queue connections_to_reclaim; +connection_scavenger_thread connection_scavenger; + +#endif /* !RML_USE_WCRM */ + +//------------------------------------------------------------------------ +// generic_connection +//------------------------------------------------------------------------ + +template<typename Server, typename Client> +struct connection_traits {}; + +// head of the active tbb connections +static tbb::atomic<uintptr_t> active_tbb_connections; +static tbb::atomic<int> current_tbb_conn_readers; +static size_t current_tbb_conn_reader_epoch; +static tbb::atomic<size_t> close_tbb_connection_event_count; + +#if RML_USE_WCRM +template<typename Connection> +void make_job( Connection& c, server_thread& t ); +#endif + +template<typename Server, typename Client> +class generic_connection: public Server, no_copy { + /*override*/ version_type version() const {return SERVER_VERSION;} + /*override*/ void yield() {thread_monitor::yield();} + /*override*/ void independent_thread_number_changed( int delta ) { my_thread_map.adjust_balance( -delta ); } + /*override*/ unsigned default_concurrency() const { return the_default_concurrency; } + friend void wakeup_some_tbb_threads(); + friend class connection_scavenger_thread; + +protected: + thread_map my_thread_map; + generic_connection* next_conn; + size_t my_ec; +#if RML_USE_WCRM + // FIXME: pad it? + tbb::spin_mutex map_mtx; + IScheduler* my_scheduler; + void do_open( IScheduler* s ) { + my_scheduler = s; + my_thread_map.bind( s ); + } + bool is_closing() { return my_thread_map.is_closing(); } + void request_close_connection( bool existing ); +#else + void do_open() {my_thread_map.bind();} + void request_close_connection( bool ); +#endif /* RML_USE_WCRM */ + //! Make destructor virtual + virtual ~generic_connection() {} +#if !RML_USE_WCRM + generic_connection( wait_counter& fc, Client& c ) : my_thread_map(fc,c), next_conn(NULL), my_ec(0) {} +#else + generic_connection( wait_counter& fc, Client& c ) : + my_thread_map(fc,c), next_conn(NULL), my_ec(0), map_mtx(), my_scheduler(NULL) {} + void add_virtual_processors( IVirtualProcessorRoot** vprocs, unsigned int count ); + void remove_virtual_processors( IVirtualProcessorRoot** vprocs, unsigned int count ); + void notify_resources_externally_busy( IVirtualProcessorRoot** vprocs, unsigned int count ) { my_thread_map.mark_virtual_processors_as_lent( vprocs, count, map_mtx ); } + void notify_resources_externally_idle( IVirtualProcessorRoot** vprocs, unsigned int count ) { + my_thread_map.mark_virtual_processors_as_returned( vprocs, count, map_mtx ); + } +#endif /* !RML_USE_WCRM */ + +public: + typedef Server server_type; + typedef Client client_type; + Client& client() const {return static_cast<Client&>(my_thread_map.client());} + void set_scratch_ptr( job& j, void* ptr ) { ::rml::server::scratch_ptr(j) = ptr; } +#if RML_USE_WCRM + template<typename Connection> + friend void make_job( Connection& c, server_thread& t ); + void add_server_ref () {my_thread_map.add_server_ref();} + void remove_server_ref() {if( my_thread_map.remove_server_ref()==0 ) delete this;} + void add_client_ref () {my_thread_map.add_client_ref();} + void remove_client_ref() {my_thread_map.remove_client_ref();} +#else /* !RML_USE_WCRM */ + int add_server_ref () {return my_thread_map.add_server_ref();} + void remove_server_ref() {if( my_thread_map.remove_server_ref()==0 ) delete this;} + void remove_client_ref() {my_thread_map.remove_client_ref();} + void make_job( server_thread& t, job_automaton& ja ); +#endif /* RML_USE_WCRM */ + static generic_connection* get_addr( uintptr_t addr_ex ) { + return reinterpret_cast<generic_connection*>( addr_ex&~(uintptr_t)3 ); + } +}; + +//------------------------------------------------------------------------ +// TBB server +//------------------------------------------------------------------------ + +template<> +struct connection_traits<tbb_server,tbb_client> { + static const bool assist_null_only = true; + static const bool is_tbb = true; +}; + +//! Represents a server/client binding. +/** The internal representation uses inheritance for the server part and a pointer for the client part. */ +class tbb_connection_v2: public generic_connection<tbb_server,tbb_client> { + /*override*/ void adjust_job_count_estimate( int delta ); +#if !RML_USE_WCRM +#if _WIN32||_WIN64 + /*override*/ void register_master ( rml::server::execution_resource_t& /*v*/ ) {} + /*override*/ void unregister_master ( rml::server::execution_resource_t /*v*/ ) {} +#endif +#else + /*override*/ void register_master ( rml::server::execution_resource_t& v ) { + my_thread_map.register_as_master(v); + if( v ) ++nesting; + } + /*override*/ void unregister_master ( rml::server::execution_resource_t v ) { + if( v ) { + __TBB_ASSERT( nesting>0, NULL ); + if( --nesting==0 ) { +#if !__RML_REMOVE_VIRTUAL_PROCESSORS_DISABLED + my_thread_map.allocate_thread_scavenger( (IExecutionResource*)v ); +#endif + } + } + my_thread_map.unregister(v); + } + IScheduler* create_scheduler() {return( scheduler<tbb_connection_v2>::create( *this ) );} + friend void free_all_connections( uintptr_t ); + friend class scheduler<tbb_connection_v2>; + friend class execution_context; + friend class connection_scavenger_thread; +#endif /* RML_USE_WCRM */ + friend void wakeup_some_tbb_threads(); + //! Estimate on number of jobs without threads working on them. + tbb::atomic<int> my_slack; + friend class dummy_class_to_shut_up_gratuitous_warning_from_gcc_3_2_3; +#if TBB_USE_ASSERT + tbb::atomic<int> my_job_count_estimate; +#endif /* TBB_USE_ASSERT */ + + tbb::atomic<int> n_adjust_job_count_requests; +#if RML_USE_WCRM + tbb::atomic<int> nesting; +#endif + + // dtor + ~tbb_connection_v2(); + +public: +#if RML_USE_WCRM + typedef tbb_server_thread server_thread_type; +#endif + //! True if there is slack that try_process can use. + bool has_slack() const {return my_slack>0;} + +#if RML_USE_WCRM + bool try_process( job& job ) +#else + bool try_process( server_thread& t, job& job ) +#endif + { + bool visited = false; + // No check for my_slack>0 here because caller is expected to do that check. + int k = --my_slack; + if( k>=0 ) { +#if !RML_USE_WCRM + t.my_extra_state = ts_visited; // remember the thread paid a trip to process() at least once +#endif + client().process(job); + visited = true; + } + ++my_slack; + return visited; + } + + tbb_connection_v2( wait_counter& fc, tbb_client& client ) : generic_connection<tbb_server,tbb_client>(fc,client) + { + my_slack = 0; +#if RML_USE_WCRM + nesting = 0; +#endif +#if TBB_USE_ASSERT + my_job_count_estimate = 0; +#endif /* TBB_USE_ASSERT */ + __TBB_ASSERT( !my_slack, NULL ); + +#if RML_USE_WCRM + do_open( client.max_job_count()>0 ? create_scheduler() : NULL ); +#else + do_open(); +#endif /* !RML_USE_WCRM */ + n_adjust_job_count_requests = 0; + + // Acquire head of active_tbb_connections & push the connection into the list + uintptr_t conn; + do { + for( ; (conn=active_tbb_connections)&1; ) + __TBB_Yield(); + } while( active_tbb_connections.compare_and_swap( conn|1, conn )!=conn ); + + this->next_conn = generic_connection<tbb_server,tbb_client>::get_addr(conn); + // Update and release head of active_tbb_connections + active_tbb_connections = (uintptr_t) this; // set and release + } + inline void wakeup_tbb_threads( unsigned n ) { + my_thread_map.wakeup_tbb_threads( n +#if RML_USE_WCRM + , map_mtx +#endif + ); + } +#if RML_USE_WCRM + inline int get_nesting_level() { return nesting; } +#else + inline bool wakeup_next_thread( thread_map::iterator i ) {return my_thread_map.wakeup_next_thread( i, *this );} + inline thread_map::size_type get_unrealized_threads () {return my_thread_map.get_unrealized_threads();} +#endif /* !RML_USE_WCRM */ +}; + +//------------------------------------------------------------------------ +// OpenMP server +//------------------------------------------------------------------------ + +template<> +struct connection_traits<omp_server,omp_client> { + static const bool assist_null_only = false; + static const bool is_tbb = false; +}; + +class omp_connection_v2: public generic_connection<omp_server,omp_client> { +#if !RML_USE_WCRM + /*override*/ int current_balance() const {return the_balance;} +#else + friend void free_all_connections( uintptr_t ); + friend class scheduler<omp_connection_v2>; + /*override*/ int current_balance() const {return my_thread_map.current_balance();} +#endif /* !RML_USE_WCRM */ + /*override*/ int try_increase_load( size_type n, bool strict ); + /*override*/ void decrease_load( size_type n ); + /*override*/ void get_threads( size_type request_size, void* cookie, job* array[] ); +#if !RML_USE_WCRM +#if _WIN32||_WIN64 + /*override*/ void register_master ( rml::server::execution_resource_t& /*v*/ ) {} + /*override*/ void unregister_master ( rml::server::execution_resource_t /*v*/ ) {} +#endif +#else + /*override*/ void register_master ( rml::server::execution_resource_t& v ) { + my_thread_map.register_as_master( v ); + my_thread_map.addto_original_exec_resources( (IExecutionResource*)v, map_mtx ); + } + /*override*/ void unregister_master ( rml::server::execution_resource_t v ) { my_thread_map.unregister(v); } +#endif /* !RML_USE_WCRM */ +#if _WIN32||_WIN64 + /*override*/ void deactivate( rml::job* j ); + /*override*/ void reactivate( rml::job* j ); +#endif /* _WIN32||_WIN64 */ +#if RML_USE_WCRM +public: + typedef omp_server_thread server_thread_type; +private: + IScheduler* create_scheduler() {return( scheduler<omp_connection_v2>::create( *this ) );} +#endif /* RML_USE_WCRM */ +public: +#if TBB_USE_ASSERT + //! Net change in delta caused by this connection. + /** Should be zero when connection is broken */ + tbb::atomic<int> net_delta; +#endif /* TBB_USE_ASSERT */ + + omp_connection_v2( wait_counter& fc, omp_client& client ) : generic_connection<omp_server,omp_client>(fc,client) { +#if TBB_USE_ASSERT + net_delta = 0; +#endif /* TBB_USE_ASSERT */ +#if RML_USE_WCRM + do_open( create_scheduler() ); +#else + do_open(); +#endif /* RML_USE_WCRM */ + } + ~omp_connection_v2() {__TBB_ASSERT( net_delta==0, "net increase/decrease of load is nonzero" );} +}; + +#if !RML_USE_WCRM +/* to deal with cases where the machine is oversubscribed; we want each thread to trip to try_process() at least once */ +/* this should not involve computing the_balance */ +bool thread_map::wakeup_next_thread( thread_map::iterator this_thr, tbb_connection_v2& conn ) { + if( all_visited_at_least_once ) + return false; + + iterator e = end(); +retry: + bool exist = false; + iterator k=this_thr; + for( ++k; k!=e; ++k ) { + // If another thread added *k, there is a tiny timing window where thread() is invalid. + server_thread& t = k->wait_for_thread(); + if( t.my_extra_state!=ts_visited ) + exist = true; + if( t.read_state()!=ts_tbb_busy && t.my_extra_state==ts_started ) + if( t.try_grab_for( ts_tbb_busy ) ) + return true; + } + for( k=begin(); k!=this_thr; ++k ) { + server_thread& t = k->wait_for_thread(); + if( t.my_extra_state!=ts_visited ) + exist = true; + if( t.read_state()!=ts_tbb_busy && t.my_extra_state==ts_started ) + if( t.try_grab_for( ts_tbb_busy ) ) + return true; + } + + if( exist ) + if( conn.has_slack() ) + goto retry; + else + all_visited_at_least_once = true; + return false; +} + +void thread_map::release_tbb_threads( server_thread* t ) { + for( ; t; t = t->link ) { + while( t->read_state()!=ts_asleep ) + __TBB_Yield(); + t->my_extra_state = ts_started; + } +} +#endif /* !RML_USE_WCRM */ + +void thread_map::adjust_balance( int delta ) { + int new_balance = the_balance += delta; + if( new_balance>0 && 0>=new_balance-delta /*== old the_balance*/ ) + wakeup_some_tbb_threads(); +} + +void thread_map::remove_client_ref() { + int k = my_client_ref_count.remove_ref(); + if( k==0 ) { + // Notify factory that thread has crossed back into RML. + --my_factory_counter; + // Notify client that RML is done with the client object. + my_client.acknowledge_close_connection(); + } +} + +#if RML_USE_WCRM +/** Not a member of generic_connection because we need Connection to be the derived class. */ +template<typename Connection> +void make_job( Connection& c, typename Connection::server_thread_type& t ) { + if( t.my_job_automaton.try_acquire() ) { + rml::job& j = *t.my_client.create_one_job(); + __TBB_ASSERT( &j!=NULL, "client:::create_one_job returned NULL" ); + __TBB_ASSERT( (intptr_t(&j)&1)==0, "client::create_one_job returned misaligned job" ); + t.my_job_automaton.set_and_release( j ); + c.set_scratch_ptr( j, (void*) &t ); + } +} +#endif /* RML_USE_WCRM */ + +#if _MSC_VER && !defined(__INTEL_COMPILER) +// Suppress "conditional expression is constant" warning. +#pragma warning( push ) +#pragma warning( disable: 4127 ) +#endif +#if RML_USE_WCRM +template<typename Server, typename Client> +void generic_connection<Server,Client>::request_close_connection( bool exiting ) { + // for TBB connections, exiting should always be false + if( connection_traits<Server,Client>::is_tbb ) + __TBB_ASSERT( !exiting, NULL); +#if TBB_USE_ASSERT + else if( exiting ) + reinterpret_cast<omp_connection_v2*>(this)->net_delta = 0; +#endif + if( exiting ) { + uintptr_t tail = connections_to_reclaim.tail; + while( connections_to_reclaim.tail.compare_and_swap( garbage_connection_queue::plugged, tail )!=tail ) + __TBB_Yield(); + my_thread_map.unbind( *this, map_mtx ); + my_thread_map.assist_cleanup( connection_traits<Server,Client>::assist_null_only ); + // It is assumed that the client waits for all other threads to terminate before + // calling request_close_connection with true. Thus, it is safe to return all + // outstanding connection objects that are reachable. It is possible that there may + // be some unreachable connection objects lying somewhere. + free_all_connections( connection_scavenger.grab_and_prepend( this ) ); + return; + } +#else /* !RML_USE_WCRM */ +template<typename Server, typename Client> +void generic_connection<Server,Client>::request_close_connection( bool ) { +#endif /* RML_USE_WCRM */ + if( connection_traits<Server,Client>::is_tbb ) { + // acquire the head of active tbb connections + uintptr_t conn; + do { + for( ; (conn=active_tbb_connections)&1; ) + __TBB_Yield(); + } while( active_tbb_connections.compare_and_swap( conn|1, conn )!=conn ); + + // Locate the current connection + generic_connection* pred_conn = NULL; + generic_connection* curr_conn = (generic_connection*) conn; + for( ; curr_conn && curr_conn!=this; curr_conn=curr_conn->next_conn ) + pred_conn = curr_conn; + __TBB_ASSERT( curr_conn==this, "the current connection is not in the list?" ); + + // Remove this from the list + if( pred_conn ) { + pred_conn->next_conn = curr_conn->next_conn; + active_tbb_connections = reinterpret_cast<uintptr_t>(generic_connection<tbb_server,tbb_client>::get_addr(active_tbb_connections)); // release it + } else + active_tbb_connections = (uintptr_t) curr_conn->next_conn; // update & release it + curr_conn->next_conn = NULL; + // Increment the tbb connection close event count + my_ec = ++close_tbb_connection_event_count; + // Wait happens in tbb_connection_v2::~tbb_connection_v2() + } +#if RML_USE_WCRM + my_thread_map.unbind( *this, map_mtx ); + my_thread_map.assist_cleanup( connection_traits<Server,Client>::assist_null_only ); + connection_scavenger.add_request( this ); +#else + my_thread_map.unbind(); + my_thread_map.assist_cleanup( connection_traits<Server,Client>::assist_null_only ); + // Remove extra reference + remove_server_ref(); +#endif +} +#if _MSC_VER && !defined(__INTEL_COMPILER) +#pragma warning( pop ) +#endif + +#if RML_USE_WCRM + +template<typename Server, typename Client> +void generic_connection<Server,Client>::add_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count ) +{} + +template<> +void generic_connection<tbb_server,tbb_client>::add_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count ) +{ + my_thread_map.add_virtual_processors( vproots, count, (tbb_connection_v2&)*this, map_mtx ); +} +template<> +void generic_connection<omp_server,omp_client>::add_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count ) +{ + // For OMP, since it uses ScheudlerPolicy of MinThreads==MaxThreads, this is called once when + // RequestInitialVirtualProcessors() is called. + my_thread_map.add_virtual_processors( vproots, count, (omp_connection_v2&)*this, map_mtx ); +} + +template<typename Server, typename Client> +void generic_connection<Server,Client>::remove_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count ) +{ + __TBB_ASSERT( false, "should not be called" ); +} +/* For OMP, RemoveVirtualProcessors() will never be called. */ + +template<> +void generic_connection<tbb_server,tbb_client>::remove_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count ) +{ + my_thread_map.remove_virtual_processors( vproots, count, map_mtx ); +} + +void tbb_connection_v2::adjust_job_count_estimate( int delta ) { +#if TBB_USE_ASSERT + my_job_count_estimate += delta; +#endif /* TBB_USE_ASSERT */ + // Atomically update slack. + int c = my_slack+=delta; + if( c>0 ) { + ++n_adjust_job_count_requests; + my_thread_map.wakeup_tbb_threads( c, map_mtx ); + --n_adjust_job_count_requests; + } +} +#endif /* RML_USE_WCRM */ + +tbb_connection_v2::~tbb_connection_v2() { +#if TBB_USE_ASSERT + if( my_job_count_estimate!=0 ) { + fprintf(stderr, "TBB client tried to disconnect with non-zero net job count estimate of %d\n", int(my_job_count_estimate )); + abort(); + } + __TBB_ASSERT( !my_slack, "attempt to destroy tbb_server with nonzero slack" ); + __TBB_ASSERT( this!=static_cast<tbb_connection_v2*>(generic_connection<tbb_server,tbb_client >::get_addr(active_tbb_connections)), "request_close_connection() must be called" ); +#endif /* TBB_USE_ASSERT */ +#if !RML_USE_WCRM + // If there are other threads ready for work, give them coins + if( the_balance>0 ) + wakeup_some_tbb_threads(); +#endif + // Someone might be accessing my data members + while( current_tbb_conn_readers>0 && (ptrdiff_t)(my_ec-current_tbb_conn_reader_epoch)>0 ) + __TBB_Yield(); +} + +#if !RML_USE_WCRM +template<typename Server, typename Client> +void generic_connection<Server,Client>::make_job( server_thread& t, job_automaton& ja ) { + if( ja.try_acquire() ) { + rml::job& j = *client().create_one_job(); + __TBB_ASSERT( &j!=NULL, "client:::create_one_job returned NULL" ); + __TBB_ASSERT( (intptr_t(&j)&1)==0, "client::create_one_job returned misaligned job" ); + ja.set_and_release( j ); + __TBB_ASSERT( t.my_conn && t.my_ja && t.my_job==NULL, NULL ); + t.my_job = &j; + set_scratch_ptr( j, (void*) &t ); + } +} + +void tbb_connection_v2::adjust_job_count_estimate( int delta ) { +#if TBB_USE_ASSERT + my_job_count_estimate += delta; +#endif /* TBB_USE_ASSERT */ + // Atomically update slack. + int c = my_slack+=delta; + if( c>0 ) { + ++n_adjust_job_count_requests; + // The client has work to do and there are threads available + thread_map::size_type n = my_thread_map.wakeup_tbb_threads(c); + + server_thread* new_threads_anchor = NULL; + thread_map::size_type i; + { + tbb::internal::affinity_helper fpa; + for( i=0; i<n; ++i ) { + // Obtain unrealized threads + thread_map::value_type* k = my_thread_map.add_one_thread( false ); + if( !k ) + // No unrealized threads left. + break; + // Eagerly start the thread off. + fpa.protect_affinity_mask(); + my_thread_map.bind_one_thread( *this, *k ); + server_thread& t = k->thread(); + __TBB_ASSERT( !t.link, NULL ); + t.link = new_threads_anchor; + new_threads_anchor = &t; + } + // Implicit destruction of fpa resets original affinity mask. + } + + thread_map::size_type j=0; + for( ; the_balance>0 && j<i; ++j ) { + if( --the_balance>=0 ) { + // Withdraw a coin from the bank + __TBB_ASSERT( new_threads_anchor, NULL ); + + server_thread* t = new_threads_anchor; + new_threads_anchor = t->link; + while( !t->try_grab_for( ts_tbb_busy ) ) + __TBB_Yield(); + t->my_extra_state = ts_started; + } else { + // Overdraft. return it to the bank + ++the_balance; + break; + } + } + __TBB_ASSERT( i-j!=0||new_threads_anchor==NULL, NULL ); + // Mark the ones that did not get started as eligible for being snatched. + if( new_threads_anchor ) + my_thread_map.release_tbb_threads( new_threads_anchor ); + + --n_adjust_job_count_requests; + } +} +#endif /* RML_USE_WCRM */ + +#if RML_USE_WCRM +int omp_connection_v2::try_increase_load( size_type n, bool strict ) { + __TBB_ASSERT(int(n)>=0,NULL); + if( strict ) { + the_balance -= int(n); + } else { + int avail, old; + do { + avail = the_balance; + if( avail<=0 ) { + // No atomic read-write-modify operation necessary. + return avail; + } + // Don't read the_system_balance; if it changes, compare_and_swap will fail anyway. + old = the_balance.compare_and_swap( int(n)<avail ? avail-n : 0, avail ); + } while( old!=avail ); + if( int(n)>avail ) + n=avail; + } +#if TBB_USE_ASSERT + net_delta += n; +#endif /* TBB_USE_ASSERT */ + return n; +} + +void omp_connection_v2::decrease_load( size_type /*n*/ ) {} + +void omp_connection_v2::get_threads( size_type request_size, void* cookie, job* array[] ) { + unsigned index = 0; + std::vector<omp_server_thread*> enlisted(request_size); + std::vector<thread_grab_t> to_activate(request_size); + + if( request_size==0 ) return; + + { + tbb::spin_mutex::scoped_lock lock(map_mtx); + + __TBB_ASSERT( !is_closing(), "try to get threads while connection is being shutdown?" ); + + for( int scan=0; scan<2; ++scan ) { + for( thread_map::iterator i=my_thread_map.begin(); i!=my_thread_map.end(); ++i ) { + omp_server_thread* thr = (omp_server_thread*) (*i).second; + // in the first scan, skip VPs that are lent + if( scan==0 && thr->is_lent() ) continue; + thread_grab_t res = thr->try_grab_for(); + if( res!=wk_failed ) {// && if is not busy by some other scheduler + to_activate[index] = res; + enlisted[index] = thr; + if( ++index==request_size ) + goto activate_threads; + } + } + } + } + +activate_threads: + + for( unsigned i=0; i<index; ++i ) { + omp_server_thread* thr = enlisted[i]; + if( to_activate[i]==wk_from_asleep ) + thr->get_virtual_processor()->Activate( thr ); + job* j = thr->wait_for_job(); + array[i] = j; + thr->omp_data.produce( client(), *j, cookie, i PRODUCE_ARG(*this) ); + } + + if( index==request_size ) + return; + + // If we come to this point, it must be becuase dynamic==false + // Create Oversubscribers.. + + // Note that our policy is such that MinConcurrency==MaxConcurrency. + // RM will deliver MaxConcurrency of VirtualProcessors and no more. + __TBB_ASSERT( request_size>index, NULL ); + unsigned n = request_size - index; + std::vector<server_thread*> thr_vec(n); + typedef std::vector<server_thread*>::iterator iterator_thr; + my_thread_map.create_oversubscribers( n, thr_vec, *this, map_mtx ); + for( iterator_thr ti=thr_vec.begin(); ti!=thr_vec.end(); ++ti ) { + omp_server_thread* thr = (omp_server_thread*) *ti; + __TBB_ASSERT( thr, "thread not created?" ); + // Thread is already grabbed; since it is nrewly created, we need to activate it. + thr->get_virtual_processor()->Activate( thr ); + job* j = thr->wait_for_job(); + array[index] = j; + thr->omp_data.produce( client(), *j, cookie, index PRODUCE_ARG(*this) ); + ++index; + } +} + +#if _WIN32||_WIN64 +void omp_connection_v2::deactivate( rml::job* j ) +{ + my_thread_map.adjust_balance(1); +#if TBB_USE_ASSERT + net_delta -= 1; +#endif + omp_server_thread* thr = (omp_server_thread*) scratch_ptr( *j ); + (thr->get_virtual_processor())->Deactivate( thr ); +} + +void omp_connection_v2::reactivate( rml::job* j ) +{ + // Should not adjust the_balance because OMP client is supposed to + // do try_increase_load() to reserve the threads to use. + omp_server_thread* thr = (omp_server_thread*) scratch_ptr( *j ); + (thr->get_virtual_processor())->Activate( thr ); +} +#endif /* !_WIN32||_WIN64 */ + +#endif /* RML_USE_WCRM */ + +//! Wake up some available tbb threads +void wakeup_some_tbb_threads() +{ + /* First, atomically grab the connection, then increase the server ref count to keep + it from being released prematurely. Second, check if the balance is available for TBB + and the tbb conneciton has slack to exploit. If the answer is true, go ahead and + try to wake some up. */ + if( generic_connection<tbb_server,tbb_client >::get_addr(active_tbb_connections)==0 ) + // the next connection will see the change; return. + return; + +start_it_over: + int n_curr_readers = ++current_tbb_conn_readers; + if( n_curr_readers>1 ) // I lost + return; + // if n_curr_readers==1, i am the first one, so I will take responsibility for waking tbb threads up. + + // update the current epoch + current_tbb_conn_reader_epoch = close_tbb_connection_event_count; + + // read and clear + // Newly added connection will not invalidate the pointer, and it will + // compete with the current one to claim coins. + // One that is about to close the connection increments the event count + // after it removes the connection from the list. But it will keep around + // the connection until all readers including this one catch up. So, reading + // the head and clearing the lock bit should be o.k. + generic_connection<tbb_server,tbb_client>* next_conn_wake_up = generic_connection<tbb_server,tbb_client>::get_addr( active_tbb_connections ); + + for( ; next_conn_wake_up; ) { + /* some threads are creating tbb server threads; they may not see my changes made to the_balance */ + /* When a thread is in adjust_job_count_estimate() to increase the slack + RML tries to activate worker threads on behalf of the requesting thread + by repeatedly drawing a coin from the bank optimistically and grabbing a + thread. If it finds the bank overdrafted, it returns the coin back to + the bank and returns the control to the thread (return from the method). + There lies a tiny timing hole. + + When the overdraft occurs (note that multiple masters may be in + adjust_job_count_estimate() so the_balance can be any negative value) and + a worker returns from the TBB work at that moment, its returning the coin + does not bump up the_balance over 0, so it happily returns from + wakeup_some_tbb_threads() without attempting to give coins to worker threads + that are ready. + */ + while( ((tbb_connection_v2*)next_conn_wake_up)->n_adjust_job_count_requests>0 ) + __TBB_Yield(); + + int bal = the_balance; + n_curr_readers = current_tbb_conn_readers; // get the snapshot + if( bal<=0 ) break; + // if the connection is deleted, the following will immediately return because its slack would be 0 or less. + + tbb_connection_v2* tbb_conn = (tbb_connection_v2*)next_conn_wake_up; + int my_slack = tbb_conn->my_slack; + if( my_slack>0 ) tbb_conn->wakeup_tbb_threads( my_slack ); + next_conn_wake_up = next_conn_wake_up->next_conn; + } + + int delta = current_tbb_conn_readers -= n_curr_readers; + //if delta>0, more threads entered the routine since this one took the snapshot + if( delta>0 ) { + current_tbb_conn_readers = 0; + if( the_balance>0 && generic_connection<tbb_server,tbb_client >::get_addr(active_tbb_connections)!=0 ) + goto start_it_over; + } + + // Signal any connection that is waiting for me to complete my access that I am done. + current_tbb_conn_reader_epoch = close_tbb_connection_event_count; +} + +#if !RML_USE_WCRM +int omp_connection_v2::try_increase_load( size_type n, bool strict ) { + __TBB_ASSERT(int(n)>=0,NULL); + if( strict ) { + the_balance -= int(n); + } else { + int avail, old; + do { + avail = the_balance; + if( avail<=0 ) { + // No atomic read-write-modify operation necessary. + return avail; + } + // don't read the_balance; if it changes, compare_and_swap will fail anyway. + old = the_balance.compare_and_swap( int(n)<avail ? avail-n : 0, avail ); + } while( old!=avail ); + if( int(n)>avail ) + n=avail; + } +#if TBB_USE_ASSERT + net_delta += n; +#endif /* TBB_USE_ASSERT */ + return n; +} + +void omp_connection_v2::decrease_load( size_type n ) { + __TBB_ASSERT(int(n)>=0,NULL); + my_thread_map.adjust_balance(int(n)); +#if TBB_USE_ASSERT + net_delta -= n; +#endif /* TBB_USE_ASSERT */ +} + +void omp_connection_v2::get_threads( size_type request_size, void* cookie, job* array[] ) { + + if( !request_size ) + return; + + unsigned index = 0; + for(;;) { // don't return until all request_size threads are grabbed. + // Need to grab some threads + thread_map::iterator k_end=my_thread_map.end(); + for( thread_map::iterator k=my_thread_map.begin(); k!=k_end; ++k ) { + // If another thread added *k, there is a tiny timing window where thread() is invalid. + server_thread& t = k->wait_for_thread(); + if( t.try_grab_for( ts_omp_busy ) ) { + // The preincrement instead of post-increment of index is deliberate. + job& j = k->wait_for_job(); + array[index] = &j; + t.omp_dispatch.produce( client(), j, cookie, index PRODUCE_ARG(*this) ); + if( ++index==request_size ) + return; + } + } + // Need to allocate more threads + for( unsigned i=index; i<request_size; ++i ) { + __TBB_ASSERT( index<request_size, NULL ); + thread_map::value_type* k = my_thread_map.add_one_thread( true ); +#if TBB_USE_ASSERT + if( !k ) { + // Client erred + __TBB_ASSERT(false, "server::get_threads: exceeded job_count\n"); + } +#endif + my_thread_map.bind_one_thread( *this, *k ); + server_thread& t = k->thread(); + if( t.try_grab_for( ts_omp_busy ) ) { + job& j = k->wait_for_job(); + array[index] = &j; + // The preincrement instead of post-increment of index is deliberate. + t.omp_dispatch.produce( client(), j, cookie, index PRODUCE_ARG(*this) ); + if( ++index==request_size ) + return; + } // else someone else snatched it. + } + } +} +#endif /* !RML_USE_WCRM */ + +//------------------------------------------------------------------------ +// Methods of omp_dispatch_type +//------------------------------------------------------------------------ +void omp_dispatch_type::consume() { + // Wait for short window between when master sets state of this thread to ts_omp_busy + // and master thread calls produce. + job_type* j = job; + if( !j ) { + tbb::internal::atomic_backoff bo; + do { + bo.pause(); + j = job; + } while( !j ); + } + job = static_cast<job_type*>(NULL); + client->process(*j,cookie,index); +#if TBB_USE_ASSERT + // Return of method process implies "decrease_load" from client's viewpoint, even though + // the actual adjustment of the_balance only happens when this thread really goes to sleep. + --server->net_delta; +#endif /* TBB_USE_ASSERT */ +} + +#if !RML_USE_WCRM +#if _WIN32||_WIN64 +void omp_connection_v2::deactivate( rml::job* j ) +{ +#if TBB_USE_ASSERT + net_delta -= 1; +#endif + __TBB_ASSERT( j, NULL ); + server_thread* thr = (server_thread*) scratch_ptr( *j ); + thr->deactivate(); +} + +void omp_connection_v2::reactivate( rml::job* j ) +{ + // Should not adjust the_balance because OMP client is supposed to + // do try_increase_load() to reserve the threads to use. + __TBB_ASSERT( j, NULL ); + server_thread* thr = (server_thread*) scratch_ptr( *j ); + thr->reactivate(); +} +#endif /* _WIN32||_WIN64 */ + +//------------------------------------------------------------------------ +// Methods of server_thread +//------------------------------------------------------------------------ + +server_thread::server_thread() : + ref_count(0), + link(NULL), + my_map_pos(), + my_conn(NULL), my_job(NULL), my_ja(NULL) +{ + state = ts_idle; + terminate = false; +#if TBB_USE_ASSERT + has_active_thread = false; +#endif /* TBB_USE_ASSERT */ +} + +server_thread::~server_thread() { + __TBB_ASSERT( !has_active_thread, NULL ); +} + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced + #pragma warning(push) + #pragma warning(disable:4189) +#endif +__RML_DECL_THREAD_ROUTINE server_thread::thread_routine( void* arg ) { + server_thread* self = static_cast<server_thread*>(arg); + AVOID_64K_ALIASING( self->my_index ); +#if TBB_USE_ASSERT + __TBB_ASSERT( !self->has_active_thread, NULL ); + self->has_active_thread = true; +#endif /* TBB_USE_ASSERT */ + self->loop(); + return 0; +} +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning(pop) +#endif + +void server_thread::launch( size_t stack_size ) { +#if USE_WINTHREAD + thread_monitor::launch( thread_routine, this, stack_size, &this->my_index ); +#else + thread_monitor::launch( thread_routine, this, stack_size ); +#endif /* USE_PTHREAD */ +} + +void server_thread::sleep_perhaps( thread_state_t asleep ) { + if( terminate ) return; + __TBB_ASSERT( asleep==ts_asleep, NULL ); + thread_monitor::cookie c; + monitor.prepare_wait(c); + if( state.compare_and_swap( asleep, ts_idle )==ts_idle ) { + if( !terminate ) { + monitor.commit_wait(c); + // Someone else woke me up. The compare_and_swap further below deals with spurious wakeups. + } else { + monitor.cancel_wait(); + } + thread_state_t s = read_state(); + if( s==ts_asleep ) { + state.compare_and_swap( ts_idle, ts_asleep ); + // I woke myself up, either because I cancelled the wait or suffered a spurious wakeup. + } else { + // Someone else woke me up; there the_balance is decremented by 1. -- tbb only + if( !is_omp_thread ) { + __TBB_ASSERT( s==ts_tbb_busy||s==ts_idle, NULL ); + } + } + } else { + // someone else made it busy ; see try_grab_for when state==ts_idle. + __TBB_ASSERT( state==ts_omp_busy||state==ts_tbb_busy, NULL ); + monitor.cancel_wait(); + } + __TBB_ASSERT( read_state()!=asleep, "a thread can only put itself to sleep" ); +} + +bool server_thread::wakeup( thread_state_t to, thread_state_t from ) { + bool success = false; + __TBB_ASSERT( from==ts_asleep && (to==ts_idle||to==ts_omp_busy||to==ts_tbb_busy), NULL ); + if( state.compare_and_swap( to, from )==from ) { + if( !is_omp_thread ) __TBB_ASSERT( to==ts_idle||to==ts_tbb_busy, NULL ); + // There is a small timing window that permits balance to become negative, + // but such occurrences are probably rare enough to not worry about, since + // at worst the result is slight temporary oversubscription. + monitor.notify(); + success = true; + } + return success; +} + +//! Attempt to change a thread's state to ts_omp_busy, and waking it up if necessary. +bool server_thread::try_grab_for( thread_state_t target_state ) { + bool success = false; + switch( read_state() ) { + case ts_asleep: + success = wakeup( target_state, ts_asleep ); + break; + case ts_idle: + success = state.compare_and_swap( target_state, ts_idle )==ts_idle; + break; + default: + // Thread is not available to be part of an OpenMP thread team. + break; + } + return success; +} + +#if _WIN32||_WIN64 +void server_thread::deactivate() { + thread_state_t es = (thread_state_t) my_extra_state.fetch_and_store( ts_deactivated ); + __TBB_ASSERT( my_extra_state==ts_deactivated, "someone else tampered with my_extra_state?" ); + if( es==ts_none ) + state = ts_idle; + else + __TBB_ASSERT( es==ts_reactivated, "Cannot call deactivate() while in ts_deactivated" ); + // only the thread can transition itself from ts_deactivted to ts_none + __TBB_ASSERT( my_extra_state==ts_deactivated, "someone else tampered with my_extra_state?" ); + my_extra_state = ts_none; // release the critical section + int bal = ++the_balance; + if( bal>0 ) + wakeup_some_tbb_threads(); + if( es==ts_none ) + sleep_perhaps( ts_asleep ); +} + +void server_thread::reactivate() { + thread_state_t es; + do { + while( (es=read_extra_state())==ts_deactivated ) + __TBB_Yield(); + if( es==ts_reactivated ) { + __TBB_ASSERT( false, "two Reactivate() calls in a row. Should not happen" ); + return; + } + __TBB_ASSERT( es==ts_none, NULL ); + } while( (thread_state_t)my_extra_state.compare_and_swap( ts_reactivated, ts_none )!=ts_none ); + if( state!=ts_omp_busy ) { + my_extra_state = ts_none; + while( !try_grab_for( ts_omp_busy ) ) + __TBB_Yield(); + } +} +#endif /* _WIN32||_WIN64 */ + + +template<typename Connection> +bool server_thread::destroy_job( Connection& c ) { + __TBB_ASSERT( !is_omp_thread||(state==ts_idle||state==ts_omp_busy), NULL ); + __TBB_ASSERT( is_omp_thread||(state==ts_idle||state==ts_tbb_busy), NULL ); + if( !is_omp_thread ) { + __TBB_ASSERT( state==ts_idle||state==ts_tbb_busy, NULL ); + if( state==ts_idle ) + state.compare_and_swap( ts_done, ts_idle ); + // 'state' may be set to ts_tbb_busy by another thread. + + if( state==ts_tbb_busy ) { // return the coin to the deposit + // need to deposit first to let the next connection see the change + ++the_balance; + state = ts_done; // no other thread changes the state when it is ts_*_busy + } + } + if( job_automaton* ja = my_ja ) { + rml::job* j; + if( ja->try_plug(j) ) { + __TBB_ASSERT( j, NULL ); + c.client().cleanup(*j); + c.remove_client_ref(); + } else { + // Some other thread took responsibility for cleaning up the job. + } + } + // Must do remove client reference first, because execution of + // c.remove_ref() can cause *this to be destroyed. + int k = remove_ref(); + __TBB_ASSERT_EX( k==0, "more than one references?" ); +#if TBB_USE_ASSERT + has_active_thread = false; +#endif /* TBB_USE_ASSERT */ + c.remove_server_ref(); + return true; +} + +bool server_thread::do_termination() { + if( is_omp_thread ) + return destroy_job( *static_cast<omp_connection_v2*>(my_conn) ); + else + return destroy_job( *static_cast<tbb_connection_v2*>(my_conn) ); +} + +//! Loop that each thread executes +void server_thread::loop() { + if( is_omp_thread ) + static_cast<omp_connection_v2*>(my_conn)->make_job( *this, *my_ja ); + else + static_cast<tbb_connection_v2*>(my_conn)->make_job( *this, *my_ja ); + for(;;) { + __TBB_Yield(); + if( state==ts_idle ) + sleep_perhaps( ts_asleep ); + + // Check whether I should quit. + if( terminate ) + if( do_termination() ) + return; + + // read the state + thread_state_t s = read_state(); + __TBB_ASSERT( s==ts_idle||s==ts_omp_busy||s==ts_tbb_busy, NULL ); + + if( s==ts_omp_busy ) { + // Enslaved by OpenMP team. + omp_dispatch.consume(); + /* here wake tbb threads up if feasible */ + if( ++the_balance>0 ) + wakeup_some_tbb_threads(); + state = ts_idle; + } else if( s==ts_tbb_busy ) { + // do some TBB work. + __TBB_ASSERT( my_conn && my_job, NULL ); + tbb_connection_v2& conn = *static_cast<tbb_connection_v2*>(my_conn); + // give openmp higher priority + bool has_coin = true; + if( conn.has_slack() ) { + // it has the coin, it should trip to the scheduler at least once as long as its slack is positive + do { + if( conn.try_process( *this, *my_job ) ) + if( conn.has_slack() && the_balance>=0 ) + has_coin = !conn.wakeup_next_thread( my_map_pos ); + } while( has_coin && conn.has_slack() && the_balance>=0 ); + } + state = ts_idle; + if( has_coin ) { + ++the_balance; // return the coin back to the deposit + if( conn.has_slack() ) { // a new adjust_job_request_estimate() is in progress + // it may have missed my changes to state and/or the_balance + if( --the_balance>=0 ) { // try to grab the coin back + // I got the coin + if( state.compare_and_swap( ts_tbb_busy, ts_idle )!=ts_idle ) + ++the_balance; // someone else enlisted me. + } else { + // overdraft. return the coin + ++the_balance; + } + } // else the new request will see my changes to state & the_balance. + } + /* here wake tbb threads up if feasible */ + if( the_balance>0 ) + wakeup_some_tbb_threads(); + } + } +} +#endif /* !RML_USE_WCRM */ + +#if RML_USE_WCRM + +class tbb_connection_v2; +class omp_connection_v2; + +#define CREATE_SCHEDULER_POLICY(policy,min_thrs,max_thrs,stack_size) \ + try { \ + policy = new SchedulerPolicy (7, \ + SchedulerKind, RML_THREAD_KIND, /*defined in _rml_serer_msrt.h*/ \ + MinConcurrency, min_thrs, \ + MaxConcurrency, max_thrs, \ + TargetOversubscriptionFactor, 1, \ + ContextStackSize, stack_size/1000, /*ConcRT:kB, iRML:bytes*/ \ + ContextPriority, THREAD_PRIORITY_NORMAL, \ + DynamicProgressFeedback, ProgressFeedbackDisabled ); \ + } catch ( invalid_scheduler_policy_key & ) { \ + __TBB_ASSERT( false, "invalid scheduler policy key exception caught" );\ + } catch ( invalid_scheduler_policy_value & ) { \ + __TBB_ASSERT( false, "invalid scheduler policy value exception caught" );\ + } + +static unsigned int core_count; +static tbb::atomic<int> core_count_inited; + + +static unsigned int get_processor_count() +{ + if( core_count_inited!=2 ) { + if( core_count_inited.compare_and_swap( 1, 0 )==0 ) { + core_count = GetProcessorCount(); + core_count_inited = 2; + } else { + tbb::internal::spin_wait_until_eq( core_count_inited, 2 ); + } + } + return core_count; +} + +template<typename Connection> +scheduler<Connection>::scheduler( Connection& conn ) : uid(GetSchedulerId()), my_conn(conn) {} + +template<> +scheduler<tbb_connection_v2>::scheduler( tbb_connection_v2& conn ) : uid(GetSchedulerId()), my_conn(conn) +{ + rml::client& cl = my_conn.client(); + unsigned max_job_count = cl.max_job_count(); + unsigned count = get_processor_count(); + __TBB_ASSERT( max_job_count>0, "max job count must be positive" ); + __TBB_ASSERT( count>1, "The processor count must be greater than 1" ); + if( max_job_count>count-1) max_job_count = count-1; + CREATE_SCHEDULER_POLICY( my_policy, 0, max_job_count, cl.min_stack_size() ); +} + +#if __RML_REMOVE_VIRTUAL_PROCESSORS_DISABLED +template<> +void scheduler<tbb_connection_v2>::RemoveVirtualProcessors( IVirtualProcessorRoot**, unsigned int) +{ +} +#else +template<> +void scheduler<tbb_connection_v2>::RemoveVirtualProcessors( IVirtualProcessorRoot** vproots, unsigned int count ) +{ + if( !my_conn.is_closing() ) + my_conn.remove_virtual_processors( vproots, count ); +} +#endif + +template<> +void scheduler<tbb_connection_v2>::NotifyResourcesExternallyIdle( IVirtualProcessorRoot** /*vproots*/, unsigned int /*count*/) +{ + __TBB_ASSERT( false, "NotifyResourcesExternallyIdle() is not allowed for TBB" ); +} + +template<> +void scheduler<tbb_connection_v2>::NotifyResourcesExternallyBusy( IVirtualProcessorRoot** /*vproots*/, unsigned int /*count*/ ) +{ + __TBB_ASSERT( false, "NotifyResourcesExternallyBusy() is not allowed for TBB" ); +} + +template<> +scheduler<omp_connection_v2>::scheduler( omp_connection_v2& conn ) : uid(GetSchedulerId()), my_conn(conn) +{ + unsigned count = get_processor_count(); + rml::client& cl = my_conn.client(); + __TBB_ASSERT( count>1, "The processor count must be greater than 1" ); + CREATE_SCHEDULER_POLICY( my_policy, count-1, count-1, cl.min_stack_size() ); +} + +template<> +void scheduler<omp_connection_v2>::RemoveVirtualProcessors( IVirtualProcessorRoot** /*vproots*/, unsigned int /*count*/ ) { + __TBB_ASSERT( false, "RemoveVirtualProcessors() is not allowed for OMP" ); +} + +template<> +void scheduler<omp_connection_v2>::NotifyResourcesExternallyIdle( IVirtualProcessorRoot** vproots, unsigned int count ){ + if( !my_conn.is_closing() ) + my_conn.notify_resources_externally_idle( vproots, count ); +} + +template<> +void scheduler<omp_connection_v2>::NotifyResourcesExternallyBusy( IVirtualProcessorRoot** vproots, unsigned int count ){ + if( !my_conn.is_closing() ) + my_conn.notify_resources_externally_busy( vproots, count ); +} + +/* ts_idle, ts_asleep, ts_busy */ +void tbb_server_thread::Dispatch( DispatchState* ) { + // Activate() will resume a thread right after Deactivate() as if it returns from the call + tbb_connection_v2* tbb_conn = static_cast<tbb_connection_v2*>(my_conn); + make_job( *tbb_conn, *this ); + + for( ;; ) { + // Try to wake some tbb threads if the balance is positive. + // When a thread is added by ConcRT and enter here for the first time, + // the thread may wake itself up (i.e., atomically change its state to ts_busy. + if( the_balance>0 ) + wakeup_some_tbb_threads(); + if( read_state()!=ts_busy ) + if( sleep_perhaps() ) + return; + if( terminate ) + if( initiate_termination() ) + return; + if( read_state()==ts_busy ) { + // this thread has a coin (i.e., state=ts_busy; it should trip to the scheduler at least once + if ( tbb_conn->has_slack() ) { + do { + tbb_conn->try_process( *wait_for_job() ); + } while( tbb_conn->has_slack() && the_balance>=0 && !is_removed() ); + } + __TBB_ASSERT( read_state()==ts_busy, "thread is not in busy state after returning from process()" ); + // see remove_virtual_processors() + if( my_state.compare_and_swap( ts_idle, ts_busy )==ts_busy ) { + int bal = ++the_balance; + if( tbb_conn->has_slack() ) { + // slack is positive, volunteer to help + bal = --the_balance; // try to grab the coin back + if( bal>=0 ) { // got the coin back + if( my_state.compare_and_swap( ts_busy, ts_idle )!=ts_idle ) + ++the_balance; // someone else enlisted me. + // else my_state is ts_busy, I will come back to tbb_conn->try_process(). + } else { + // overdraft. return the coin + ++the_balance; + } + } // else the new request will see my changes to state & the_balance. + } else { + __TBB_ASSERT( false, "someone tampered with my state" ); + } + } // someone else might set the state to somthing other than ts_idle + } +} + +void omp_server_thread::Dispatch( DispatchState* ) { + // Activate() will resume a thread right after Deactivate() as if it returns from the call + make_job( *static_cast<omp_connection_v2*>(my_conn), *this ); + + for( ;; ) { + if( read_state()!=ts_busy ) + sleep_perhaps(); + if( terminate ) { + if( initiate_termination() ) + return; + } + if( read_state()==ts_busy ) { + omp_data.consume(); + __TBB_ASSERT( read_state()==ts_busy, "thread is not in busy state after returning from process()" ); + my_thread_map.adjust_balance( 1 ); + set_state( ts_idle ); + } + // someone else might set the state to somthing other than ts_idle + } +} + +//! Attempt to change a thread's state to ts_omp_busy, and waking it up if necessary. +thread_grab_t server_thread_rep::try_grab_for() { + thread_grab_t res = wk_failed; + thread_state_t s = read_state(); + switch( s ) { + case ts_asleep: + if( wakeup( ts_busy, ts_asleep ) ) + res = wk_from_asleep; + __TBB_ASSERT( res==wk_failed||read_state()==ts_busy, NULL ); + break; + case ts_idle: + if( my_state.compare_and_swap( ts_busy, ts_idle )==ts_idle ) + res = wk_from_idle; + // At this point a thread is grabbed (i.e., its state has changed to ts_busy. + // It is possible that the thread 1) processes the job, returns from process() and + // sets its state ts_idle again. In some cases, it even sets its state to ts_asleep. + break; + default: + break; + } + return res; +} + +bool tbb_server_thread::switch_out() { + thread_state_t s = read_state(); + __TBB_ASSERT( s==ts_asleep||s==ts_busy, NULL ); + // This thread comes back from the TBB scheduler, and changed its state to ts_asleep successfully. + // The master enlisted it and woke it up by Activate()'ing it; now it is emerging from Deactivated(). + // ConcRT requested for removal of the vp associated with the thread, and RML marks it removed. + // Now, it has ts_busy, and removed. -- we should remove it. + IExecutionResource* old_vp = my_execution_resource; + if( s==ts_busy ) { + ++the_balance; + my_state = ts_asleep; + } + IThreadProxy* proxy = my_proxy; + __TBB_ASSERT( proxy, NULL ); + my_execution_resource = (IExecutionResource*) c_remove_prepare; + old_vp->Remove( my_scheduler ); + my_execution_resource = (IExecutionResource*) c_remove_returned; + int cnt = --activation_count; + __TBB_ASSERT_EX( cnt==0||cnt==1, "too many activations?" ); + proxy->SwitchOut(); + if( terminate ) { + bool activated = activation_count==1; +#if TBB_USE_ASSERT + /* In a rare sequence of events, a thread comes out of SwitchOut with activation_count==1. + * 1) The thread is SwitchOut'ed. + * 2) AddVirtualProcessors() arrived and the thread is Activated. + * 3) The thread is coming out of SwitchOut(). + * 4) request_close_connection arrives and inform the thread that it is time to terminate. + * 5) The thread hits the check and falls into the path with 'activated==true'. + * In that case, do the clean-up but do not switch to the thread scavenger; rather simply return to RM. + */ + if( activated ) { + // thread is 'revived' in add_virtual_processors after being Activated(). + // so, if the thread extra state is still marked 'removed', it will shortly change to 'none' + // i.e., !is_remove(). The thread state is changed to ts_idle before the extra state, so + // the thread's state should be either ts_idle or ts_done. + while( is_removed() ) + __TBB_Yield(); + thread_state_t s = read_state(); + __TBB_ASSERT( s==ts_idle || s==ts_done, NULL ); + } +#endif + __TBB_ASSERT( my_state==ts_asleep||my_state==ts_idle, NULL ); + // it is possible that in make_job() the thread may not have a chance to create a job. + // my_job may not be set if the thread did not get a chance to process client's job (i.e., call try_process()) + rml::job* j; + if( my_job_automaton.try_plug(j) ) { + __TBB_ASSERT( j, NULL ); + my_client.cleanup(*j); + my_conn->remove_client_ref(); + } + // Must do remove client reference first, because execution of + // c.remove_ref() can cause *this to be destroyed. + if( !activated ) + proxy->SwitchTo( my_thread_map.get_thread_scavenger(), Idle ); + my_conn->remove_server_ref(); + return true; + } + // We revive a thread in add_virtual_processors() after we Activate the thread on a new virtual processor. + // So briefly wait until the thread's my_execution_resource gets set. + while( get_virtual_processor()==c_remove_returned ) + __TBB_Yield(); + return false; +} + +bool tbb_server_thread::sleep_perhaps () { + if( terminate ) return false; + thread_state_t s = read_state(); + if( s==ts_idle ) { + if( my_state.compare_and_swap( ts_asleep, ts_idle )==ts_idle ) { + // If a thread is between read_state() and compare_and_swap(), and the master tries to terminate, + // the master's compare_and_swap() will fail because the thread's state is ts_idle. + // We need to check if terminate is true or not before letting the thread go to sleep oetherwise + // we will miss the terminate signal. + if( !terminate ) { + if( !is_removed() ) { + --activation_count; + get_virtual_processor()->Deactivate( this ); + } + if( is_removed() ) { + if( switch_out() ) + return true; + __TBB_ASSERT( my_execution_resource>c_remove_returned, NULL ); + } + // in add_virtual_processors(), when we revive a thread, we change its state after Activate the thread + // in that case the state may be ts_asleep for a short period + while( read_state()==ts_asleep ) + __TBB_Yield(); + } else { + if( my_state.compare_and_swap( ts_done, ts_asleep )!=ts_asleep ) { + --activation_count; + // unbind() changed my state. It will call Activate(). So issue a matching Deactivate() + get_virtual_processor()->Deactivate( this ); + } + } + } + } else { + __TBB_ASSERT( s==ts_busy, NULL ); + } + return false; +} + +void omp_server_thread::sleep_perhaps () { + if( terminate ) return; + thread_state_t s = read_state(); + if( s==ts_idle ) { + if( my_state.compare_and_swap( ts_asleep, ts_idle )==ts_idle ) { + // If a thread is between read_state() and compare_and_swap(), and the master tries to terminate, + // the master's compare_and_swap() will fail because the thread's state is ts_idle. + // We need to check if terminate is true or not before letting the thread go to sleep oetherwise + // we will miss the terminate signal. + if( !terminate ) { + get_virtual_processor()->Deactivate( this ); + __TBB_ASSERT( !is_removed(), "OMP threads should not be deprived of a virtual processor" ); + __TBB_ASSERT( read_state()!=ts_asleep, NULL ); + } else { + if( my_state.compare_and_swap( ts_done, ts_asleep )!=ts_asleep ) + // unbind() changed my state. It will call Activate(). So issue a matching Deactivate() + get_virtual_processor()->Deactivate( this ); + } + } + } else { + __TBB_ASSERT( s==ts_busy, NULL ); + } +} + +bool tbb_server_thread::initiate_termination() { + if( read_state()==ts_busy ) { + int bal = ++the_balance; + if( bal>0 ) wakeup_some_tbb_threads(); + } + return destroy_job( (tbb_connection_v2*) my_conn ); +} + +template<typename Connection> +bool server_thread_rep::destroy_job( Connection* c ) { + __TBB_ASSERT( my_state!=ts_asleep, NULL ); + rml::job* j; + if( my_job_automaton.try_plug(j) ) { + __TBB_ASSERT( j, NULL ); + my_client.cleanup(*j); + c->remove_client_ref(); + } + // Must do remove client reference first, because execution of + // c.remove_ref() can cause *this to be destroyed. + c->remove_server_ref(); + return true; +} + +void thread_map::assist_cleanup( bool assist_null_only ) { + // To avoid deadlock, the current thread *must* help out with cleanups that have not started, + // becausd the thread that created the job may be busy for a long time. + for( iterator i = begin(); i!=end(); ++i ) { + rml::job* j=0; + server_thread* thr = (*i).second; + job_automaton& ja = thr->my_job_automaton; + if( assist_null_only ? ja.try_plug_null() : ja.try_plug(j) ) { + if( j ) { + my_client.cleanup(*j); + } else { + // server thread did not get a chance to create a job. + } + remove_client_ref(); + } + } +} + +void thread_map::add_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count, tbb_connection_v2& conn, ::tbb::spin_mutex& mtx ) +{ +#if TBB_USE_ASSERT + int req_cnt = ++n_add_vp_requests; + __TBB_ASSERT( req_cnt==1, NULL ); +#endif + std::vector<thread_map::iterator> vec(count); + std::vector<tbb_server_thread*> tvec(count); + iterator end; + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + __TBB_ASSERT( my_map.size()==0||count==1, NULL ); + end = my_map.end(); //remember 'end' at the time of 'find' + // find entries in the map for those VPs that were previosly added and then removed. + for( size_t i=0; i<count; ++i ) { + vec[i] = my_map.find( (key_type) vproots[i] ); +#if TBB_USE_DEBUG + if( vec[i]!=end ) { + tbb_server_thread* t = (tbb_server_thread*) (*vec[i]).second; + IVirtualProcessorRoot* v = t->get_virtual_processor(); + __TBB_ASSERT( v==c_remove_prepare||v==c_remove_returned, NULL ); + } +#endif + } + + iterator nxt = my_map.begin(); + for( size_t i=0; i<count; ++i ) { + if( vec[i]!=end ) { +#if TBB_USE_ASSERT + tbb_server_thread* t = (tbb_server_thread*) (*vec[i]).second; + __TBB_ASSERT( t->read_state()==ts_asleep, NULL ); + IVirtualProcessorRoot* r = t->get_virtual_processor(); + __TBB_ASSERT( r==c_remove_prepare||r==c_remove_returned, NULL ); +#endif + continue; + } + + if( my_unrealized_threads>0 ) { + --my_unrealized_threads; + } else { + __TBB_ASSERT( nxt!=end, "nxt should not be thread_map::iterator::end" ); + // find a removed thread context for i + for( ; nxt!=end; ++nxt ) { + tbb_server_thread* t = (tbb_server_thread*) (*nxt).second; + if( t->is_removed() && t->read_state()==ts_asleep && t->get_virtual_processor()==c_remove_returned ) { + vec[i] = nxt++; + break; + } + } + // break target + if( vec[i]==end ) // ignore excessive VP. + vproots[i] = NULL; + } + } + } + + for( size_t i=0; i<count; ++i ) { + __TBB_ASSERT( !tvec[i], NULL ); + if( vec[i]==end ) { + if( vproots[i] ) { + tvec[i] = my_tbb_allocator.allocate(1); + new ( tvec[i] ) tbb_server_thread( false, my_scheduler, (IExecutionResource*)vproots[i], &conn, *this, my_client ); + } +#if TBB_USE_ASSERT + } else { + tbb_server_thread* t = (tbb_server_thread*) (*vec[i]).second; + __TBB_ASSERT( t->GetProxy(), "Proxy is cleared?" ); +#endif + } + } + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + + bool closing = is_closing(); + + for( size_t i=0; i<count; ++i ) { + if( vec[i]==end ) { + if( vproots[i] ) { + thread_map::key_type key = (thread_map::key_type) vproots[i]; + vec[i] = insert( key, (server_thread*) tvec[i] ); + my_client_ref_count.add_ref(); + my_server_ref_count.add_ref(); + } + } else if( !closing ) { + tbb_server_thread* t = (tbb_server_thread*) (*vec[i]).second; + + if( (*vec[i]).first!=(thread_map::key_type)vproots[i] ) { + my_map.erase( vec[i] ); + thread_map::key_type key = (thread_map::key_type) vproots[i]; + __TBB_ASSERT( key, NULL ); + vec[i] = insert( key, t ); + } + __TBB_ASSERT( t->read_state()==ts_asleep, NULL ); + // We did not decrement server/client ref count when a thread is removed. + // So, don't increment server/client ref count here. + } + } + + // we could check is_closing() earlier. That requires marking the newly allocated server_thread objects + // that are not inserted into the thread_map, and deallocate them. Doing so seems more cumbersome + // than simply adding these to the thread_map and let thread_map's destructor take care of reclamation. + __TBB_ASSERT( closing==is_closing(), NULL ); + if( closing ) return; + } + + for( size_t i=0; i<count; ++i ) { + if( vproots[i] ) { + tbb_server_thread* t = (tbb_server_thread*) (*vec[i]).second; + __TBB_ASSERT( tvec[i]!=NULL||t->GetProxy(), "Proxy is cleared?" ); + if( t->is_removed() ) + __TBB_ASSERT( t->get_virtual_processor()==c_remove_returned, NULL ); + int cnt = ++t->activation_count; + __TBB_ASSERT_EX( cnt==0||cnt==1, NULL ); + vproots[i]->Activate( t ); + if( t->is_removed() ) + t->revive( my_scheduler, vproots[i], my_client ); + } + } +#if TBB_USE_ASSERT + req_cnt = --n_add_vp_requests; + __TBB_ASSERT( req_cnt==0, NULL ); +#endif +} + +void thread_map::remove_virtual_processors( IVirtualProcessorRoot** vproots, unsigned count, ::tbb::spin_mutex& mtx ) { + if( my_map.size()==0 ) + return; + tbb::spin_mutex::scoped_lock lck( mtx ); + + if( is_closing() ) return; + + for( unsigned int c=0; c<count; ++c ) { + iterator i = my_map.find( (key_type) vproots[c] ); + if( i==my_map.end() ) { + thread_scavenger_thread* tst = my_thread_scavenger_thread; + if( !tst ) { + // Remove unknown vp from my scheduler; + vproots[c]->Remove( my_scheduler ); + } else { + while( (tst=my_thread_scavenger_thread)==c_claimed ) + __TBB_Yield(); + if( vproots[c]!=tst->get_virtual_processor() ) + vproots[c]->Remove( my_scheduler ); + } + continue; + } + tbb_server_thread* thr = (tbb_server_thread*) (*i).second; + __TBB_ASSERT( thr->tbb_thread, "incorrect type of server_thread" ); + thr->set_removed(); + if( thr->read_state()==ts_asleep ) { + while( thr->activation_count>0 ) { + if( thr->get_virtual_processor()<=c_remove_returned ) + break; + __TBB_Yield(); + } + if( thr->get_virtual_processor()>c_remove_returned ) { + // the thread is in Deactivated state + ++thr->activation_count; + // wake the thread up so that it Switches Out itself. + thr->get_virtual_processor()->Activate( thr ); + } // else, it is Switched Out + } // else the thread will see that it is removed and proceed to switch itself out without Deactivation + } +} + +void thread_map::add_virtual_processors( IVirtualProcessorRoot** vproots, unsigned int count, omp_connection_v2& conn, ::tbb::spin_mutex& mtx ) +{ + std::vector<thread_map::iterator> vec(count); + std::vector<server_thread*> tvec(count); + iterator end; + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + // read the map + end = my_map.end(); //remember 'end' at the time of 'find' + for( size_t i=0; i<count; ++i ) + vec[i] = my_map.find( (key_type) vproots[i] ); + } + + for( size_t i=0; i<count; ++i ) { + __TBB_ASSERT( !tvec[i], NULL ); + if( vec[i]==end ) { + tvec[i] = my_omp_allocator.allocate(1); + new ( tvec[i] ) omp_server_thread( false, my_scheduler, (IExecutionResource*)vproots[i], &conn, *this, my_client ); + } + } + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + + for( size_t i=0; i<count; ++i ) { + if( vec[i]==my_map.end() ) { + thread_map::key_type key = (thread_map::key_type) vproots[i]; + vec[i] = insert( key, tvec[i] ); + my_client_ref_count.add_ref(); + my_server_ref_count.add_ref(); + } + } + + // we could check is_closing() earlier. That requires marking the newly allocated server_thread objects + // that are not inserted into the thread_map, and deallocate them. Doing so seems more cumbersome + // than simply adding these to the thread_map and let thread_map's destructor take care of reclamation. + if( is_closing() ) return; + } + + for( size_t i=0; i<count; ++i ) + vproots[i]->Activate( (*vec[i]).second ); + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + for( size_t i=0; i<count; ++i ) + original_exec_resources.push_back( vproots[i] ); + } +} + +void thread_map::mark_virtual_processors_as_lent( IVirtualProcessorRoot** vproots, unsigned count, ::tbb::spin_mutex& mtx ) { + tbb::spin_mutex::scoped_lock lck( mtx ); + + if( is_closing() ) return; + + iterator end = my_map.end(); + for( unsigned int c=0; c<count; ++c ) { + iterator i = my_map.find( (key_type) vproots[c] ); + if( i==end ) { + // The vproc has not been added to the map in create_oversubscribers() + my_map.insert( hash_map_type::value_type( (key_type) vproots[c], (server_thread*)1 ) ); + } else { + server_thread* thr = (*i).second; + if( ((uintptr_t)thr)&~(uintptr_t)1 ) { + __TBB_ASSERT( !thr->is_removed(), "incorrectly removed" ); + ((omp_server_thread*)thr)->set_lent(); + } + } + } +} + +void thread_map::create_oversubscribers( unsigned n, std::vector<server_thread*>& thr_vec, omp_connection_v2& conn, ::tbb::spin_mutex& mtx ) { + std::vector<IExecutionResource*> curr_exec_rsc; + { + tbb::spin_mutex::scoped_lock lck( mtx ); + curr_exec_rsc = original_exec_resources; // copy construct + } + typedef std::vector<IExecutionResource*>::iterator iterator_er; + typedef ::std::vector<std::pair<hash_map_type::key_type, hash_map_type::mapped_type> > hash_val_vector_t; + hash_val_vector_t v_vec(n); + iterator_er begin = curr_exec_rsc.begin(); + iterator_er end = curr_exec_rsc.end(); + iterator_er i = begin; + for( unsigned c=0; c<n; ++c ) { + IVirtualProcessorRoot* vpr = my_scheduler_proxy->CreateOversubscriber( *i ); + omp_server_thread* t = new ( my_omp_allocator.allocate(1) ) omp_server_thread( true, my_scheduler, (IExecutionResource*)vpr, &conn, *this, my_client ); + thr_vec[c] = t; + v_vec[c] = hash_map_type::value_type( (key_type) vpr, t ); + if( ++i==end ) i = begin; + } + + { + tbb::spin_mutex::scoped_lock lck( mtx ); + + if( is_closing() ) return; + + iterator end = my_map.end(); + unsigned c = 0; + for( hash_val_vector_t::iterator vi=v_vec.begin(); vi!=v_vec.end(); ++vi, ++c ) { + iterator i = my_map.find( (key_type) (*vi).first ); + if( i==end ) { + my_map.insert( *vi ); + } else { + // the vproc has not been added to the map in mark_virtual_processors_as_returned(); + unsigned lent = (unsigned) (*i).second; + __TBB_ASSERT( lent<=1, "vproc map entry added incorrectly?"); + (*i).second = thr_vec[c]; + if( lent ) + ((omp_server_thread*)thr_vec[c])->set_lent(); + else + ((omp_server_thread*)thr_vec[c])->set_returned(); + } + my_client_ref_count.add_ref(); + my_server_ref_count.add_ref(); + } + } +} + +void thread_map::wakeup_tbb_threads( int c, ::tbb::spin_mutex& mtx ) { + std::vector<tbb_server_thread*> vec(c); + + size_t idx = 0; + { + tbb::spin_mutex::scoped_lock lck( mtx ); + + if( is_closing() ) return; + // only one RML thread is in here to wake worker threads up. + + int bal = the_balance; + int cnt = c<bal ? c : bal; + + if( cnt<=0 ) { return; } + + for( iterator i=begin(); i!=end(); ++i ) { + tbb_server_thread* thr = (tbb_server_thread*) (*i).second; + // ConcRT RM should take threads away from TBB scheduler instead of lending them to another scheduler + if( thr->is_removed() ) + continue; + + if( --the_balance>=0 ) { + thread_grab_t res; + while( (res=thr->try_grab_for())!=wk_from_idle ) { + if( res==wk_from_asleep ) { + vec[idx++] = thr; + break; + } else { + thread_state_t s = thr->read_state(); + if( s==ts_busy ) {// failed because already assigned. move on. + ++the_balance; + goto skip; + } + } + } + thread_state_t s = thr->read_state(); + __TBB_ASSERT_EX( s==ts_busy, "should have set the state to ts_busy" ); + if( --cnt==0 ) + break; + } else { + // overdraft + ++the_balance; + break; + } +skip: + ; + } + } + + for( size_t i=0; i<idx; ++i ) { + tbb_server_thread* thr = vec[i]; + __TBB_ASSERT( thr, NULL ); + thread_state_t s = thr->read_state(); + __TBB_ASSERT_EX( s==ts_busy, "should have set the state to ts_busy" ); + ++thr->activation_count; + thr->get_virtual_processor()->Activate( thr ); + } + +} + +void thread_map::mark_virtual_processors_as_returned( IVirtualProcessorRoot** vprocs, unsigned int count, tbb::spin_mutex& mtx ) { + { + tbb::spin_mutex::scoped_lock lck( mtx ); + + if( is_closing() ) return; + + iterator end = my_map.end(); + for(unsigned c=0; c<count; ++c ) { + iterator i = my_map.find( (key_type) vprocs[c] ); + if( i==end ) { + // the vproc has not been added to the map in create_oversubscribers() + my_map.insert( hash_map_type::value_type( (key_type) vprocs[c], static_cast<server_thread*>(0) ) ); + } else { + omp_server_thread* thr = (omp_server_thread*) (*i).second; + if( ((uintptr_t)thr)&~(uintptr_t)1 ) { + __TBB_ASSERT( !thr->is_removed(), "incorrectly removed" ); + // we shoud not make any assumption on the initial state of an added vproc. + thr->set_returned(); + } + } + } + } +} + + +void thread_map::unbind( rml::server& /*server*/, tbb::spin_mutex& mtx ) { + { + tbb::spin_mutex::scoped_lock lck( mtx ); + shutdown_in_progress = true; // ignore any callbacks from ConcRT RM + + // Ask each server_thread to cleanup its job for this server. + for( iterator i = begin(); i!=end(); ++i ) { + server_thread* t = (*i).second; + t->terminate = true; + if( t->is_removed() ) { + // This is for TBB only as ConcRT RM does not request OMP schedulers to remove virtual processors + if( t->read_state()==ts_asleep ) { + __TBB_ASSERT( my_thread_scavenger_thread, "this is TBB connection; thread_scavenger_thread must be allocated" ); + // thread is on its way to switch_out; see remove_virtual_processors() where + // the thread is Activated() to bring it back from 'Deactivated' in sleep_perhaps() + // now assume that the thread will go to SwitchOut() +#if TBB_USE_ASSERT + while( t->get_virtual_processor()>c_remove_returned ) + __TBB_Yield(); +#endif + // A removed thread is supposed to proceed to SwithcOut. + // There, we remove client&server references. + } + } else { + if( t->wakeup( ts_done, ts_asleep ) ) { + if( t->tbb_thread ) + ++((tbb_server_thread*)t)->activation_count; + t->get_virtual_processor()->Activate( t ); + // We mark in the thread_map such that when termination sequence started, we ignore + // all notification from ConcRT RM. + } + } + } + } + // Remove extra ref to client. + remove_client_ref(); + + if( my_thread_scavenger_thread ) { + thread_scavenger_thread* tst; + while( (tst=my_thread_scavenger_thread)==c_claimed ) + __TBB_Yield(); +#if TBB_USE_ASSERT + ++my_thread_scavenger_thread->activation_count; +#endif + tst->get_virtual_processor()->Activate( tst ); + } +} + +#if !__RML_REMOVE_VIRTUAL_PROCESSORS_DISABLED +void thread_map::allocate_thread_scavenger( IExecutionResource* v ) +{ + if( my_thread_scavenger_thread>c_claimed ) return; + thread_scavenger_thread* c = my_thread_scavenger_thread.fetch_and_store((thread_scavenger_thread*)c_claimed); + if( c==NULL ) { // successfully claimed + add_server_ref(); +#if TBB_USE_ASSERT + ++n_thread_scavengers_created; +#endif + __TBB_ASSERT( v, NULL ); + IVirtualProcessorRoot* vpr = my_scheduler_proxy->CreateOversubscriber( v ); + my_thread_scavenger_thread = c = new ( my_scavenger_allocator.allocate(1) ) thread_scavenger_thread( my_scheduler, vpr, *this ); +#if TBB_USE_ASSERT + ++c->activation_count; +#endif + vpr->Activate( c ); + } else if( c>c_claimed ) { + my_thread_scavenger_thread = c; + } +} +#endif + +void thread_scavenger_thread::Dispatch( DispatchState* ) +{ + __TBB_ASSERT( my_proxy, NULL ); +#if TBB_USE_ASSERT + --activation_count; +#endif + get_virtual_processor()->Deactivate( this ); + for( thread_map::iterator i=my_thread_map.begin(); i!=my_thread_map.end(); ++i ) { + tbb_server_thread* t = (tbb_server_thread*) (*i).second; + if( t->read_state()==ts_asleep && t->is_removed() ) { + while( t->get_execution_resource()!=c_remove_returned ) + __TBB_Yield(); + my_proxy->SwitchTo( t, Blocking ); + } + } + get_virtual_processor()->Remove( my_scheduler ); + my_thread_map.remove_server_ref(); + // signal to the connection scavenger that i am done with the map. + __TBB_ASSERT( activation_count==1, NULL ); + set_state( ts_done ); +} + +//! Windows "DllMain" that handles startup and shutdown of dynamic library. +extern "C" bool WINAPI DllMain( HINSTANCE /*hinstDLL*/, DWORD fwdReason, LPVOID lpvReserved ) { + void assist_cleanup_connections(); + if( fwdReason==DLL_PROCESS_DETACH ) { + // dll is being unloaded + if( !lpvReserved ) // if FreeLibrary has been called + assist_cleanup_connections(); + } + return true; +} + +void free_all_connections( uintptr_t conn_ex ) { + while( conn_ex ) { + bool is_tbb = (conn_ex&2)>0; + //clear extra bits + uintptr_t curr_conn = conn_ex & ~(uintptr_t)3; + __TBB_ASSERT( curr_conn, NULL ); + + // Wait for worker threads to return + if( is_tbb ) { + tbb_connection_v2* tbb_conn = reinterpret_cast<tbb_connection_v2*>(curr_conn); + conn_ex = reinterpret_cast<uintptr_t>(tbb_conn->next_conn); + while( tbb_conn->my_thread_map.remove_server_ref()>0 ) + __TBB_Yield(); + delete tbb_conn; + } else { + omp_connection_v2* omp_conn = reinterpret_cast<omp_connection_v2*>(curr_conn); + conn_ex = reinterpret_cast<uintptr_t>(omp_conn->next_conn); + while( omp_conn->my_thread_map.remove_server_ref()>0 ) + __TBB_Yield(); + delete omp_conn; + } + } +} + +void assist_cleanup_connections() +{ + //signal to connection_scavenger_thread to terminate + uintptr_t tail = connections_to_reclaim.tail; + while( connections_to_reclaim.tail.compare_and_swap( garbage_connection_queue::plugged, tail )!=tail ) { + __TBB_Yield(); + tail = connections_to_reclaim.tail; + } + + __TBB_ASSERT( connection_scavenger.state==ts_busy || connection_scavenger.state==ts_asleep, NULL ); + // Scavenger thread may be busy freeing connections + DWORD thr_exit_code = STILL_ACTIVE; + while( connection_scavenger.state==ts_busy ) { + if( GetExitCodeThread( connection_scavenger.thr_handle, &thr_exit_code )>0 ) + if( thr_exit_code!=STILL_ACTIVE ) + break; + __TBB_Yield(); + thr_exit_code = STILL_ACTIVE; + } + if( connection_scavenger.state==ts_asleep && thr_exit_code==STILL_ACTIVE ) + connection_scavenger.wakeup(); // wake the connection scavenger thread up + + // it is possible that the connection scavenger thread already exited. Take over its responsibility. + if( tail && connections_to_reclaim.tail!=garbage_connection_queue::plugged_acked ) { + // atomically claim the head of the list. + uintptr_t head = connections_to_reclaim.head.fetch_and_store( garbage_connection_queue::empty ); + if( head==garbage_connection_queue::empty ) + head = tail; + connection_scavenger.process_requests( head ); + } + __TBB_ASSERT( connections_to_reclaim.tail==garbage_connection_queue::plugged||connections_to_reclaim.tail==garbage_connection_queue::plugged_acked, "someone else added a request after termination has initiated" ); + __TBB_ASSERT( (unsigned)the_balance==the_default_concurrency, NULL ); +} + +void connection_scavenger_thread::sleep_perhaps() { + uintptr_t tail = connections_to_reclaim.tail; + // connections_to_reclaim.tail==garbage_connection_queue::plugged --> terminate, + // connections_to_reclaim.tail>garbage_connection_queue::plugged : we got work to do + if( tail>=garbage_connection_queue::plugged ) return; + __TBB_ASSERT( !tail, NULL ); + thread_monitor::cookie c; + monitor.prepare_wait(c); + if( state.compare_and_swap( ts_asleep, ts_busy )==ts_busy ) { + if( connections_to_reclaim.tail!=garbage_connection_queue::plugged ) { + monitor.commit_wait(c); + // Someone else woke me up. The compare_and_swap further below deals with spurious wakeups. + } else { + monitor.cancel_wait(); + } + thread_state_t s = state; + if( s==ts_asleep ) // if spurious wakeup. + state.compare_and_swap( ts_busy, ts_asleep ); + // I woke myself up, either because I cancelled the wait or suffered a spurious wakeup. + } else { + __TBB_ASSERT( false, "someone else tampered with my state" ); + } + __TBB_ASSERT( state==ts_busy, "a thread can only put itself to sleep" ); +} + +void connection_scavenger_thread::process_requests( uintptr_t conn_ex ) +{ + __TBB_ASSERT( conn_ex>1, NULL ); + __TBB_ASSERT( n_scavenger_threads==1||connections_to_reclaim.tail==garbage_connection_queue::plugged, "more than one connection_scavenger_thread being active?" ); + + bool done = false; + while( !done ) { + bool is_tbb = (conn_ex&2)>0; + //clear extra bits + uintptr_t curr_conn = conn_ex & ~(uintptr_t)3; + + // no contention. there is only one connection_scavenger_thread!! + uintptr_t next_conn; + tbb_connection_v2* tbb_conn = NULL; + omp_connection_v2* omp_conn = NULL; + // Wait for worker threads to return + if( is_tbb ) { + tbb_conn = reinterpret_cast<tbb_connection_v2*>(curr_conn); + next_conn = reinterpret_cast<uintptr_t>(tbb_conn->next_conn); + while( tbb_conn->my_thread_map.get_server_ref_count()>1 ) + __TBB_Yield(); + } else { + omp_conn = reinterpret_cast<omp_connection_v2*>(curr_conn); + next_conn = reinterpret_cast<uintptr_t>(omp_conn->next_conn); + while( omp_conn->my_thread_map.get_server_ref_count()>1 ) + __TBB_Yield(); + } + + //someone else may try to write into this connection object. + //So access next_conn field first before remove the extra server ref count. + + if( next_conn==0 ) { + uintptr_t tail = connections_to_reclaim.tail; + if( tail==garbage_connection_queue::plugged ) { + tail = garbage_connection_queue::plugged_acked; // connection scavenger saw the flag, and it freed all connections. + done = true; + } else if( tail==conn_ex ) { + if( connections_to_reclaim.tail.compare_and_swap( garbage_connection_queue::empty, tail )==tail ) { + __TBB_ASSERT( !connections_to_reclaim.head, NULL ); + done = true; + } + } + + if( !done ) { + // A new connection to close is added to connections_to_reclaim.tail; + // Wait for curr_conn->next_conn to be set. + if( is_tbb ) { + while( !tbb_conn->next_conn ) + __TBB_Yield(); + conn_ex = reinterpret_cast<uintptr_t>(tbb_conn->next_conn); + } else { + while( !omp_conn->next_conn ) + __TBB_Yield(); + conn_ex = reinterpret_cast<uintptr_t>(omp_conn->next_conn); + } + } + } else { + conn_ex = next_conn; + } + __TBB_ASSERT( conn_ex, NULL ); + if( is_tbb ) + // remove extra srever ref count; this will trigger Shutdown/Release of ConcRT RM + tbb_conn->remove_server_ref(); + else + // remove extra srever ref count; this will trigger Shutdown/Release of ConcRT RM + omp_conn->remove_server_ref(); + } +} + +__RML_DECL_THREAD_ROUTINE connection_scavenger_thread::thread_routine( void* arg ) { + connection_scavenger_thread* thr = (connection_scavenger_thread*) arg; + thr->state = ts_busy; + thr->thr_handle = GetCurrentThread(); +#if TBB_USE_ASSERT + ++thr->n_scavenger_threads; +#endif + for(;;) { + __TBB_Yield(); + thr->sleep_perhaps(); + if( connections_to_reclaim.tail==garbage_connection_queue::plugged || connections_to_reclaim.tail==garbage_connection_queue::plugged_acked ) { + thr->state = ts_asleep; + return 0; + } + + __TBB_ASSERT( connections_to_reclaim.tail!=garbage_connection_queue::plugged_acked, NULL ); + __TBB_ASSERT( connections_to_reclaim.tail>garbage_connection_queue::plugged && (connections_to_reclaim.tail&garbage_connection_queue::plugged)==0 , NULL ); + while( connections_to_reclaim.head==garbage_connection_queue::empty ) + __TBB_Yield(); + uintptr_t head = connections_to_reclaim.head.fetch_and_store( garbage_connection_queue::empty ); + thr->process_requests( head ); + wakeup_some_tbb_threads(); + } +} + +template<typename Server, typename Client> +void connection_scavenger_thread::add_request( generic_connection<Server,Client>* conn_to_close ) +{ + uintptr_t conn_ex = (uintptr_t)conn_to_close | (connection_traits<Server,Client>::is_tbb<<1); + __TBB_ASSERT( !conn_to_close->next_conn, NULL ); + uintptr_t old_tail_ex = connections_to_reclaim.tail; + __TBB_ASSERT( old_tail_ex==0||old_tail_ex>garbage_connection_queue::plugged_acked, "Unloading DLL called while this connection is being closed?" ); + tbb::internal::atomic_backoff backoff; + while( connections_to_reclaim.tail.compare_and_swap( conn_ex, old_tail_ex )!=old_tail_ex ) { + backoff.pause(); + old_tail_ex = connections_to_reclaim.tail; + } + + if( old_tail_ex==garbage_connection_queue::empty ) + connections_to_reclaim.head = conn_ex; + else { + bool is_tbb = (old_tail_ex&2)>0; + uintptr_t old_tail = old_tail_ex & ~(uintptr_t)3; + if( is_tbb ) + reinterpret_cast<tbb_connection_v2*>(old_tail)->next_conn = reinterpret_cast<tbb_connection_v2*>(conn_ex); + else + reinterpret_cast<omp_connection_v2*>(old_tail)->next_conn = reinterpret_cast<omp_connection_v2*>(conn_ex); + } + + if( state==ts_asleep ) + wakeup(); +} + +template<> +uintptr_t connection_scavenger_thread::grab_and_prepend( generic_connection<tbb_server,tbb_client>* /*last_conn_to_close*/ ) { return 0;} + +template<> +uintptr_t connection_scavenger_thread::grab_and_prepend( generic_connection<omp_server,omp_client>* last_conn_to_close ) +{ + uintptr_t conn_ex = (uintptr_t)last_conn_to_close; + uintptr_t head = connections_to_reclaim.head.fetch_and_store( garbage_connection_queue::empty ); + reinterpret_cast<omp_connection_v2*>(last_conn_to_close)->next_conn = reinterpret_cast<omp_connection_v2*>(head); + return conn_ex; +} + +extern "C" ULONGLONG NTAPI VerSetConditionMask( ULONGLONG, DWORD, BYTE); + +bool is_windows7_or_later () +{ + try { + return GetOSVersion()>=IResourceManager::Win7OrLater; + } catch( ... ) { + return false; + } +} + +#endif /* RML_USE_WCRM */ + +template<typename Connection, typename Server, typename Client> +static factory::status_type connect( factory& f, Server*& server, Client& client ) { + server = new Connection(*static_cast<wait_counter*>(f.scratch_ptr),client); + return factory::st_success; +} + +void init_rml_module () { + the_balance = the_default_concurrency = tbb::internal::AvailableHwConcurrency() - 1; +#if RML_USE_WCRM + connection_scavenger.launch(); +#endif +} + +extern "C" factory::status_type __RML_open_factory( factory& f, version_type& server_version, version_type client_version ) { + // Hack to keep this library from being closed by causing the first client's dlopen to not have a corresponding dlclose. + // This code will be removed once we figure out how to do shutdown of the RML perfectly. + static tbb::atomic<bool> one_time_flag; + if( one_time_flag.compare_and_swap(true,false)==false) { + __TBB_ASSERT( (size_t)f.library_handle!=factory::c_dont_unload, NULL ); +#if _WIN32||_WIN64 + f.library_handle = reinterpret_cast<HMODULE>(factory::c_dont_unload); +#else + f.library_handle = reinterpret_cast<void*>(factory::c_dont_unload); +#endif + } + // End of hack + + // Initialize the_balance only once + tbb::internal::atomic_do_once ( &init_rml_module, rml_module_state ); + + server_version = SERVER_VERSION; + f.scratch_ptr = 0; + if( client_version==0 ) { + return factory::st_incompatible; +#if RML_USE_WCRM + } else if ( !is_windows7_or_later() ) { +#if TBB_USE_DEBUG + fprintf(stderr, "This version of the RML library requires Windows 7 to run on.\nConnection request denied.\n"); +#endif + return factory::st_incompatible; +#endif + } else { +#if TBB_USE_DEBUG + if( client_version<EARLIEST_COMPATIBLE_CLIENT_VERSION ) + fprintf(stderr, "This client library is too old for the current RML server.\nThe connection request is granted but oversubscription/undersubscription may occur.\n"); +#endif + f.scratch_ptr = new wait_counter; + return factory::st_success; + } +} + +extern "C" void __RML_close_factory( factory& f ) { + if( wait_counter* fc = static_cast<wait_counter*>(f.scratch_ptr) ) { + f.scratch_ptr = 0; + fc->wait(); + size_t bal = the_balance; + f.scratch_ptr = (void*)bal; + delete fc; + } +} + +void call_with_build_date_str( ::rml::server_info_callback_t cb, void* arg ); + +}} // rml::internal + +namespace tbb { +namespace internal { +namespace rml { + +extern "C" tbb_factory::status_type __TBB_make_rml_server( tbb_factory& f, tbb_server*& server, tbb_client& client ) { + return ::rml::internal::connect< ::rml::internal::tbb_connection_v2>(f,server,client); +} + +extern "C" void __TBB_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ) { + return ::rml::internal::call_with_build_date_str( cb, arg ); +} + +}}} + +namespace __kmp { +namespace rml { + +extern "C" omp_factory::status_type __KMP_make_rml_server( omp_factory& f, omp_server*& server, omp_client& client ) { + return ::rml::internal::connect< ::rml::internal::omp_connection_v2>(f,server,client); +} + +extern "C" void __KMP_call_with_my_server_info( ::rml::server_info_callback_t cb, void* arg ) { + return ::rml::internal::call_with_build_date_str( cb, arg ); +} + +}} + +/* + * RML server info + */ +#include "version_string.ver" + +#ifndef __TBB_VERSION_STRINGS +#pragma message("Warning: version_string.ver isn't generated properly by version_info.sh script!") +#endif + +// We use the build time as the RML server info. TBB is required to build RML, so we make it the same as the TBB build time. +#ifndef __TBB_DATETIME +#define __TBB_DATETIME __DATE__ " " __TIME__ +#endif + +#if !RML_USE_WCRM +#define RML_SERVER_BUILD_TIME "Intel(R) RML library built: " __TBB_DATETIME +#define RML_SERVER_VERSION_ST "Intel(R) RML library version: v" TOSTRING(SERVER_VERSION) +#else +#define RML_SERVER_BUILD_TIME "Intel(R) RML library built: " __TBB_DATETIME +#define RML_SERVER_VERSION_ST "Intel(R) RML library version: v" TOSTRING(SERVER_VERSION) " on ConcRT RM with " RML_THREAD_KIND_STRING +#endif + +namespace rml { +namespace internal { + +void call_with_build_date_str( ::rml::server_info_callback_t cb, void* arg ) +{ + (*cb)( arg, RML_SERVER_BUILD_TIME ); + (*cb)( arg, RML_SERVER_VERSION_ST ); +} +}} // rml::internal diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/thread_monitor.h b/deal.II/bundled/tbb41_20130401oss/src/rml/server/thread_monitor.h new file mode 100644 index 0000000000..2f161d7d76 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/thread_monitor.h @@ -0,0 +1,277 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// All platform-specific threading support is encapsulated here. */ + +#ifndef __RML_thread_monitor_H +#define __RML_thread_monitor_H + +#if USE_WINTHREAD +#include <windows.h> +#include <process.h> +#include <malloc.h> //_alloca +#include "tbb/tbb_misc.h" // NumberOfProcessorGroups, MoveThreadIntoProcessorGroup, FindProcessorGroupIndex +#elif USE_PTHREAD +#include <pthread.h> +#include <string.h> +#include <stdlib.h> +#else +#error Unsupported platform +#endif +#include <stdio.h> +#include "tbb/itt_notify.h" +#include "tbb/atomic.h" +#include "tbb/semaphore.h" +#if __TBB_WIN8UI_SUPPORT +#include <thread> +#endif + +// All platform-specific threading support is in this header. + +#if (_WIN32||_WIN64)&&!__TBB_ipf +// Deal with 64K aliasing. The formula for "offset" is a Fibonacci hash function, +// which has the desirable feature of spreading out the offsets fairly evenly +// without knowing the total number of offsets, and furthermore unlikely to +// accidentally cancel out other 64K aliasing schemes that Microsoft might implement later. +// See Knuth Vol 3. "Theorem S" for details on Fibonacci hashing. +// The second statement is really does need "volatile", otherwise the compiler might remove the _alloca. +#define AVOID_64K_ALIASING(idx) \ + size_t offset = (idx+1) * 40503U % (1U<<16); \ + void* volatile sink_for_alloca = _alloca(offset); \ + __TBB_ASSERT_EX(sink_for_alloca, "_alloca failed"); +#else +// Linux thread allocators avoid 64K aliasing. +#define AVOID_64K_ALIASING(idx) +#endif /* _WIN32||_WIN64 */ + +namespace rml { + +namespace internal { + +#if DO_ITT_NOTIFY +static const ::tbb::tchar *SyncType_RML = _T("%Constant"); +static const ::tbb::tchar *SyncObj_ThreadMonitor = _T("RML Thr Monitor"); +#endif /* DO_ITT_NOTIFY */ + +//! Monitor with limited two-phase commit form of wait. +/** At most one thread should wait on an instance at a time. */ +class thread_monitor { +public: + class cookie { + friend class thread_monitor; + tbb::atomic<size_t> my_epoch; + }; + thread_monitor() : spurious(false) { + my_cookie.my_epoch = 0; + ITT_SYNC_CREATE(&my_sema, SyncType_RML, SyncObj_ThreadMonitor); + in_wait = false; + } + ~thread_monitor() {} + + //! If a thread is waiting or started a two-phase wait, notify it. + /** Can be called by any thread. */ + void notify(); + + //! Begin two-phase wait. + /** Should only be called by thread that owns the monitor. + The caller must either complete the wait or cancel it. */ + void prepare_wait( cookie& c ); + + //! Complete a two-phase wait and wait until notification occurs after the earlier prepare_wait. + void commit_wait( cookie& c ); + + //! Cancel a two-phase wait. + void cancel_wait(); + +#if USE_WINTHREAD + typedef HANDLE handle_type; + + #define __RML_DECL_THREAD_ROUTINE unsigned WINAPI + typedef unsigned (WINAPI *thread_routine_type)(void*); + + //! Launch a thread + static handle_type launch( thread_routine_type thread_routine, void* arg, size_t stack_size, const size_t* worker_index = NULL ); + +#elif USE_PTHREAD + typedef pthread_t handle_type; + + #define __RML_DECL_THREAD_ROUTINE void* + typedef void*(*thread_routine_type)(void*); + + //! Launch a thread + static handle_type launch( thread_routine_type thread_routine, void* arg, size_t stack_size ); +#endif /* USE_PTHREAD */ + + //! Yield control to OS + /** Affects the calling thread. **/ + static void yield(); + + //! Join thread + static void join(handle_type handle); + + //! Detach thread + static void detach_thread(handle_type handle); +private: + cookie my_cookie; + tbb::atomic<bool> in_wait; + bool spurious; + tbb::internal::binary_semaphore my_sema; +#if USE_PTHREAD + static void check( int error_code, const char* routine ); +#endif +}; + +#if USE_WINTHREAD + +#ifndef STACK_SIZE_PARAM_IS_A_RESERVATION +#define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 +#endif + +#if __TBB_WIN8UI_SUPPORT +inline thread_monitor::handle_type thread_monitor::launch( thread_routine_type thread_function, void* arg, size_t, const size_t*) { +//TODO: check that exception thrown from std::thread is not swallowed silently + std::thread* thread_tmp=new std::thread(thread_function, arg); + return thread_tmp->native_handle(); +} +#else //__TBB_WIN8UI_SUPPORT +inline thread_monitor::handle_type thread_monitor::launch( thread_routine_type thread_routine, void* arg, size_t stack_size, const size_t* worker_index ) { + unsigned thread_id; + int number_of_processor_groups = ( worker_index ) ? tbb::internal::NumberOfProcessorGroups() : 0; + unsigned create_flags = ( number_of_processor_groups > 1 ) ? CREATE_SUSPENDED : 0; + HANDLE h = (HANDLE)_beginthreadex( NULL, unsigned(stack_size), thread_routine, arg, STACK_SIZE_PARAM_IS_A_RESERVATION | create_flags, &thread_id ); + if( !h ) { + fprintf(stderr,"thread_monitor::launch: _beginthreadex failed\n"); + exit(1); + } + if ( number_of_processor_groups > 1 ) { + tbb::internal::MoveThreadIntoProcessorGroup( h, + tbb::internal::FindProcessorGroupIndex( static_cast<int>(*worker_index) ) ); + ResumeThread( h ); + } + return h; +} +#endif //__TBB_WIN8UI_SUPPORT + +void thread_monitor::join(handle_type handle) { +#if TBB_USE_ASSERT + DWORD res = +#endif + WaitForSingleObjectEx(handle, INFINITE, FALSE); + __TBB_ASSERT( res==WAIT_OBJECT_0, NULL ); +#if TBB_USE_ASSERT + BOOL val = +#endif + CloseHandle(handle); + __TBB_ASSERT( val, NULL ); +} + +void thread_monitor::detach_thread(handle_type handle) { +#if TBB_USE_ASSERT + BOOL val = +#endif + CloseHandle(handle); + __TBB_ASSERT( val, NULL ); +} + +inline void thread_monitor::yield() { +// TODO: consider unification via __TBB_Yield or tbb::this_tbb_thread::yield +#if !__TBB_WIN8UI_SUPPORT + SwitchToThread(); +#else + std::this_thread::yield(); +#endif +} +#endif /* USE_WINTHREAD */ + +#if USE_PTHREAD +// TODO: can we throw exceptions instead of termination? +inline void thread_monitor::check( int error_code, const char* routine ) { + if( error_code ) { + fprintf(stderr,"thread_monitor %s in %s\n", strerror(error_code), routine ); + exit(1); + } +} + +inline thread_monitor::handle_type thread_monitor::launch( void* (*thread_routine)(void*), void* arg, size_t stack_size ) { + // FIXME - consider more graceful recovery than just exiting if a thread cannot be launched. + // Note that there are some tricky situations to deal with, such that the thread is already + // grabbed as part of an OpenMP team. + pthread_attr_t s; + check(pthread_attr_init( &s ), "pthread_attr_init"); + if( stack_size>0 ) + check(pthread_attr_setstacksize( &s, stack_size ), "pthread_attr_setstack_size" ); + pthread_t handle; + check( pthread_create( &handle, &s, thread_routine, arg ), "pthread_create" ); + return handle; +} + +void thread_monitor::join(handle_type handle) { + check(pthread_join(handle, NULL), "pthread_join"); +} + +void thread_monitor::detach_thread(handle_type handle) { + check(pthread_detach(handle), "pthread_detach"); +} + +inline void thread_monitor::yield() { + sched_yield(); +} +#endif /* USE_PTHREAD */ + +inline void thread_monitor::notify() { + my_cookie.my_epoch = my_cookie.my_epoch + 1; + bool do_signal = in_wait.fetch_and_store( false ); + if( do_signal ) + my_sema.V(); +} + +inline void thread_monitor::prepare_wait( cookie& c ) { + if( spurious ) { + spurious = false; + // consumes a spurious posted signal. don't wait on my_sema. + my_sema.P(); + } + c = my_cookie; + in_wait = true; + __TBB_full_memory_fence(); +} + +inline void thread_monitor::commit_wait( cookie& c ) { + bool do_it = ( c.my_epoch == my_cookie.my_epoch); + if( do_it ) my_sema.P(); + else cancel_wait(); +} + +inline void thread_monitor::cancel_wait() { + spurious = ! in_wait.fetch_and_store( false ); +} + +} // namespace internal +} // namespace rml + +#endif /* __RML_thread_monitor_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/wait_counter.h b/deal.II/bundled/tbb41_20130401oss/src/rml/server/wait_counter.h new file mode 100644 index 0000000000..034302dc9e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/wait_counter.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __RML_wait_counter_H +#define __RML_wait_counter_H + +#include "thread_monitor.h" +#include "tbb/atomic.h" + +namespace rml { +namespace internal { + +class wait_counter { + thread_monitor my_monitor; + tbb::atomic<int> my_count; + tbb::atomic<int> n_transients; +public: + wait_counter() { + // The "1" here is subtracted by the call to "wait". + my_count=1; + n_transients=0; + } + + //! Wait for number of operator-- invocations to match number of operator++ invocations. + /** Exactly one thread should call this method. */ + void wait() { + int k = --my_count; + __TBB_ASSERT( k>=0, "counter underflow" ); + if( k>0 ) { + thread_monitor::cookie c; + my_monitor.prepare_wait(c); + if( my_count ) + my_monitor.commit_wait(c); + else + my_monitor.cancel_wait(); + } + while( n_transients>0 ) + __TBB_Yield(); + } + void operator++() { + ++my_count; + } + void operator--() { + ++n_transients; + int k = --my_count; + __TBB_ASSERT( k>=0, "counter underflow" ); + if( k==0 ) + my_monitor.notify(); + --n_transients; + } +}; + +} // namespace internal +} // namespace rml + +#endif /* __RML_wait_counter_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/win32-rml-export.def b/deal.II/bundled/tbb41_20130401oss/src/rml/server/win32-rml-export.def new file mode 100644 index 0000000000..4102813d58 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/win32-rml-export.def @@ -0,0 +1,35 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +__RML_open_factory +__RML_close_factory +__TBB_make_rml_server +__KMP_make_rml_server +__TBB_call_with_my_server_info +__KMP_call_with_my_server_info + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/server/win64-rml-export.def b/deal.II/bundled/tbb41_20130401oss/src/rml/server/win64-rml-export.def new file mode 100644 index 0000000000..4102813d58 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/server/win64-rml-export.def @@ -0,0 +1,35 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +__RML_open_factory +__RML_close_factory +__TBB_make_rml_server +__KMP_make_rml_server +__TBB_call_with_my_server_info +__KMP_call_with_my_server_info + diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/rml_omp_stub.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/rml_omp_stub.cpp new file mode 100644 index 0000000000..1cf6f9d264 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/rml_omp_stub.cpp @@ -0,0 +1,78 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// This file is compiled with C++, but linked with a program written in C. +// The intent is to find dependencies on the C++ run-time. + +#include <stdlib.h> +#define RML_PURE_VIRTUAL_HANDLER abort + +#if _MSC_VER==1500 && !defined(__INTEL_COMPILER) +// VS2008/VC9 seems to have an issue; +#pragma warning( push ) +#pragma warning( disable: 4100 ) +#elif _MSC_VER==1700 && !defined(__INTEL_COMPILER) +// VS2012 issues "warning C4702: unreachable code" for the code which really +// shouldn't be reached according to the test logic: rml::client has the +// implementation for the "pure" virtual methods to be aborted if they are +// called. +#pragma warning( push ) +#pragma warning( disable: 4702 ) +#endif +#include "rml_omp.h" +#if ( _MSC_VER==1500 || _MSC_VER==1700 ) && !defined(__INTEL_COMPILER) +#pragma warning( pop ) +#endif + +rml::versioned_object::version_type Version; + +class MyClient: public __kmp::rml::omp_client { +public: + /*override*/rml::versioned_object::version_type version() const {return 0;} + /*override*/size_type max_job_count() const {return 1024;} + /*override*/size_t min_stack_size() const {return 1<<20;} + /*override*/rml::job* create_one_job() {return NULL;} + /*override*/void acknowledge_close_connection() {} + /*override*/void cleanup(job&) {} + /*override*/policy_type policy() const {return throughput;} + /*override*/void process( job&, void*, __kmp::rml::omp_client::size_type ) {} + +}; + +//! Never actually set, because point of test is to find linkage issues. +__kmp::rml::omp_server* MyServerPtr; + +#define HARNESS_NO_PARSE_COMMAND_LINE 1 +#define HARNESS_CUSTOM_MAIN 1 +#include "harness.h" + +extern "C" void Cplusplus() { + MyClient client; + Version = client.version(); + REPORT("done\n"); +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_job_automaton.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_job_automaton.cpp new file mode 100644 index 0000000000..884fa30c56 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_job_automaton.cpp @@ -0,0 +1,160 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "harness.h" +#if __TBB_MIC_OFFLOAD +int TestMain () { + return Harness::Skipped; +} +#else +#include "job_automaton.h" +#define HARNESS_NO_PARSE_COMMAND_LINE 1 +#include "harness_barrier.h" + +class State { + Harness::SpinBarrier barrier; + rml::internal::job_automaton ja; + rml::job job; + tbb::atomic<int> job_created; + tbb::atomic<int> job_destroyed; + tbb::atomic<bool> job_received; +public: + State() : barrier(2) { + job_created = 0; + job_destroyed = 0; + job_received = false; + } + void exercise( bool is_owner ); + ~State() { + ASSERT( job_created==job_destroyed, "accounting error" ); + ASSERT( job_destroyed<=1, "destroyed job twice" ); + } +}; + +int DelayMask; +const int N = 14; +tbb::atomic<int> Coverage[N]; + +//! Mark kth interval as covered and insert delay if kth bit of DelayMask is set. +/** An interval is the code between two operations on the job_automaton that we are testing. */ +void Cover( int k ) { + ASSERT( k<N, NULL ); + ++Coverage[k]; + if( DelayMask>>k&1 ) { + // Introduce delay (and possibly a thread context switch) + __TBB_Yield(); + } +} + +void State::exercise( bool is_owner ) { + barrier.wait(); + if( is_owner ) { + Cover(0); + if( ja.try_acquire() ) { + Cover(1); + ++job_created; + ja.set_and_release(job); + Cover(2); + if( ja.try_acquire() ) { + Cover(3); + ja.release(); + Cover(4); + if( ja.try_acquire() ) { + Cover(5); + ja.release(); + } + } + Cover(6); + } else { + Cover(7); + } + if( DelayMask&1<<N ) { + while( !job_received ) + __TBB_Yield(); + } + } else { + // Using extra bit of DelayMask for choosing whether to run wait_for_job or not. + if( DelayMask&1<<N ) { + rml::job* j= &ja.wait_for_job(); + if( j!=&job ) REPORT("%p\n",j); + ASSERT( j==&job, NULL ); + job_received = true; + } + Cover(8); + } + rml::job* j; + if( ja.try_plug(j) ) { + ASSERT( j==&job || !j, NULL ); + if( j ) { + Cover(9+is_owner); + ++job_destroyed; + } else { + __TBB_ASSERT( !is_owner, "owner failed to create job but plugged self" ); + Cover(11); + } + } else { + Cover(12+is_owner); + } +} + +class Loop: NoAssign { + State& s; +public: + Loop(State& s_) : s(s_) {} + void operator()( int i ) const {s.exercise(i==0);} +}; + +/** Return true if coverage is acceptable. + If report==true, issue message if it is unacceptable. */ +bool CheckCoverage( bool report ) { + bool okay = true; + for( int i=0; i<N; ++i ) { + const int min_coverage = 4; + if( Coverage[i]<min_coverage ) { + okay = false; + if( report ) + REPORT("Warning: Coverage[%d]=%d is less than acceptable minimum of %d\n", i, int(Coverage[i]),min_coverage); + } + } + return okay; +} + +int TestMain () { + for( DelayMask=0; DelayMask<8<<N; ++DelayMask ) { + State s; + NativeParallelFor( 2, Loop(s) ); + if( CheckCoverage(false) ) { + // Reached acceptable code coverage level + break; + } + } + CheckCoverage(true); + return Harness::Done; +} + +#endif /* __TBB_MIC_OFFLOAD */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_mixed.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_mixed.cpp new file mode 100644 index 0000000000..c231eedf0c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_mixed.cpp @@ -0,0 +1,324 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <tbb/tbb_config.h> +#if __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD +#include "harness.h" +int TestMain () { + return Harness::Skipped; +} +#else +#include "rml_tbb.h" +#include "rml_omp.h" +#include "tbb/atomic.h" +#include "tbb/tick_count.h" + +#define HARNESS_DEFAULT_MIN_THREADS 4 +#include "harness.h" + +// dynamic_link initializes its data structures in a static constructor. But +// the initialization order of static constructors in different modules is +// non-deterministic. Thus dynamic_link fails on some systems when when the +// applicaton changes its current directory after the library (TBB/OpenMP/...) +// is loaded but before the static constructors in the library are executed. +#define CHDIR_SUPPORT_BROKEN ( __GNUC__ == 4 && __GNUC_MINOR__ >=6 && __GNUC_MINOR__ <=7 ) + +const int OMP_ParallelRegionSize = 16; +int TBB_MaxThread = 4; // Includes master +int OMP_MaxThread = int(~0u>>1); // Includes master + +template<typename Client> +class ClientBase: public Client { +protected: + typedef typename Client::version_type version_type; + typedef typename Client::job job; + typedef typename Client::policy_type policy_type; + +private: + /*override*/version_type version() const { + return 0; + } + /*override*/size_t min_stack_size() const { + return 1<<20; + } + /*override*/job* create_one_job() { + return new rml::job; + } + /*override*/policy_type policy() const { + return Client::turnaround; + } + /*override*/void acknowledge_close_connection() { + delete this; + } + /*override*/void cleanup( job& j ) {delete &j;} + +public: + virtual ~ClientBase() {} +}; + +#if _WIN32 +#include <direct.h> +#define PATH_LEN MAX_PATH+1 +#define SLASH '\\' +#define ROOT_DIR "\\" +// ROOT_DIR_REST means how many symbols before first slash in the path +#define ROOT_DIR_REST 2 +#else +#include <unistd.h> +#include <limits.h> +#define PATH_LEN PATH_MAX+1 +#define SLASH '/' +#define ROOT_DIR "/" +// ROOT_DIR_REST means how many symbols before first slash in the path +#define ROOT_DIR_REST 0 +#define _getcwd getcwd +#define _chdir chdir +#endif + +#if !CHDIR_SUPPORT_BROKEN +class ChangeCurrentDir { + char dir[PATH_LEN+1]; + char *last_slash; +public: + ChangeCurrentDir() { + if ( !_getcwd( dir, PATH_LEN ) ) { + REPORT_FATAL_ERROR("ERROR: Couldn't get current working directory\n"); + } + + last_slash = strrchr( dir, SLASH ); + ASSERT( last_slash, "The current directory doesn't contain slashes" ); + *last_slash = 0; + + if ( _chdir( last_slash-dir == ROOT_DIR_REST ? ROOT_DIR : dir ) ) { + REPORT_FATAL_ERROR("ERROR: Couldn't change current working directory (%s)\n", dir ); + } + } + + // Restore current dir + ~ChangeCurrentDir() { + *last_slash = SLASH; + if ( _chdir(dir) ) { + REPORT_FATAL_ERROR("ERROR: Couldn't change current working directory\n"); + } + } +}; +#endif + +//! Represents a TBB or OpenMP run-time that uses RML. +template<typename Factory, typename Client> +class RunTime { +public: + //! Factory that run-time uses to make servers. + Factory factory; + Client* client; + typename Factory::server_type* server; +#if _WIN32||_WIN64 + ::rml::server::execution_resource_t me; +#endif + RunTime() { + factory.open(); + } + ~RunTime() { + factory.close(); + } + //! Create server for this run-time + void create_connection(); + + //! Destroy server for this run-time + void destroy_connection(); +}; + +class ThreadLevelRecorder { + tbb::atomic<int> level; + struct record { + tbb::tick_count time; + int nthread; + }; + tbb::atomic<unsigned> next; + /** Must be power of two */ + static const unsigned max_record_count = 1<<20; + record array[max_record_count]; +public: + void change_level( int delta ); + void dump(); +}; + +void ThreadLevelRecorder::change_level( int delta ) { + int x = level+=delta; + tbb::tick_count t = tbb::tick_count::now(); + unsigned k = next++; + if( k<max_record_count ) { + record& r = array[k]; + r.time = t; + r.nthread = x; + } +} + +void ThreadLevelRecorder::dump() { + FILE* f = fopen("time.txt","w"); + if( !f ) { + perror("fopen(time.txt)\n"); + exit(1); + } + unsigned limit = next; + if( limit>max_record_count ) { + // Clip + limit = next; + } + for( unsigned i=0; i<limit; ++i ) { + fprintf(f,"%f\t%d\n",(array[i].time-array[0].time).seconds(),array[i].nthread); + } + fclose(f); +} + +ThreadLevelRecorder TotalThreadLevel; + +class TBB_Client: public ClientBase<tbb::internal::rml::tbb_client> { + /*override*/void process( job& j ); + /*override*/size_type max_job_count() const { + return TBB_MaxThread-1; + } +}; + +class OMP_Client: public ClientBase<__kmp::rml::omp_client> { + /*override*/void process( job&, void* cookie, omp_client::size_type ); + /*override*/size_type max_job_count() const { + return OMP_MaxThread-1; + } +}; + +#if !CHDIR_SUPPORT_BROKEN +// A global instance of ChangeCurrentDir should be declared before TBB_RunTime and OMP_RunTime +// since we want to change current directory before opening factory +ChangeCurrentDir Changer; +#endif +RunTime<tbb::internal::rml::tbb_factory, TBB_Client> TBB_RunTime; +RunTime<__kmp::rml::omp_factory, OMP_Client> OMP_RunTime; + +template<typename Factory, typename Client> +void RunTime<Factory,Client>::create_connection() { + client = new Client; + typename Factory::status_type status = factory.make_server( server, *client ); + ASSERT( status==Factory::st_success, NULL ); +#if _WIN32||_WIN64 + server->register_master( me ); +#endif /* _WIN32||_WIN64 */ +} + +template<typename Factory, typename Client> +void RunTime<Factory,Client>::destroy_connection() { +#if _WIN32||_WIN64 + server->unregister_master( me ); +#endif /* _WIN32||_WIN64 */ + server->request_close_connection(); + server = NULL; +} + +class OMP_Team { +public: + OMP_Team( __kmp::rml::omp_server& ) {} + tbb::atomic<unsigned> barrier; +}; + +tbb::atomic<int> AvailWork; +tbb::atomic<int> CompletionCount; + +void OMPWork() { + tbb::atomic<int> x; + for( x=0; x<2000000; ++x ) { + continue; + } +} + +void TBBWork() { + if( AvailWork>=0 ) { + int k = --AvailWork; + if( k==-1 ) { + TBB_RunTime.server->adjust_job_count_estimate(-(TBB_MaxThread-1)); + ++CompletionCount; + } else if( k>=0 ) { + for( int k=0; k<4; ++k ) { + OMP_Team team( *OMP_RunTime.server ); + int n = OMP_RunTime.server->try_increase_load( OMP_ParallelRegionSize-1, /*strict=*/false ); + team.barrier = 0; + ::rml::job* array[OMP_ParallelRegionSize-1]; + if( n>0) + OMP_RunTime.server->get_threads( n, &team, array ); + // Master does work inside parallel region too. + OMPWork(); + // Master waits for workers to finish + if( n>0 ) + while( team.barrier!=unsigned(n) ) { + __TBB_Yield(); + } + } + ++CompletionCount; + } + } +} + +/*override*/void TBB_Client::process( job& ) { + TotalThreadLevel.change_level(1); + TBBWork(); + TotalThreadLevel.change_level(-1); +} + +/*override*/void OMP_Client::process( job& /* j */, void* cookie, omp_client::size_type ) { + TotalThreadLevel.change_level(1); + ASSERT( OMP_RunTime.server, NULL ); + OMPWork(); + ASSERT( OMP_RunTime.server, NULL ); + static_cast<OMP_Team*>(cookie)->barrier+=1; + TotalThreadLevel.change_level(-1); +} + +void TBBOutSideOpenMPInside() { + TotalThreadLevel.change_level(1); + CompletionCount = 0; + int tbbtasks = 32; + AvailWork = tbbtasks; + TBB_RunTime.server->adjust_job_count_estimate(TBB_MaxThread-1); + while( CompletionCount!=tbbtasks+1 ) { + TBBWork(); + } + TotalThreadLevel.change_level(-1); +} + +int TestMain () { + for( int TBB_MaxThread=MinThread; TBB_MaxThread<=MaxThread; ++TBB_MaxThread ) { + REMARK("Testing with TBB_MaxThread=%d\n", TBB_MaxThread); + TBB_RunTime.create_connection(); + OMP_RunTime.create_connection(); + TBBOutSideOpenMPInside(); + OMP_RunTime.destroy_connection(); + TBB_RunTime.destroy_connection(); + } + TotalThreadLevel.dump(); + return Harness::Done; +} +#endif /* __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp.cpp new file mode 100644 index 0000000000..4f370247d2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp.cpp @@ -0,0 +1,204 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <tbb/tbb_config.h> +#if __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD +#include "harness.h" +int TestMain () { + return Harness::Skipped; +} +#else +#include "rml_omp.h" + +typedef __kmp::rml::omp_server MyServer; +typedef __kmp::rml::omp_factory MyFactory; + +// Forward declaration for the function used in test_server.h +void DoClientSpecificVerification( MyServer& , int ); + +#define HARNESS_DEFAULT_MIN_THREADS 0 +#include "test_server.h" +#include "tbb/tbb_misc.h" + +static bool StrictTeam; + +class MyTeam { + MyTeam& operator=( const MyTeam& ) ; +public: + struct info_type { + rml::job* job; + bool ran; + info_type() : job(NULL), ran(false) {} + }; + MyTeam( MyServer& /* server */, size_t max_thread_ ) : + max_thread(max_thread_) + { + self_ptr = this; + info = new info_type[max_thread]; + } + ~MyTeam() { + delete[] info; + } + const size_t max_thread; + size_t n_thread; + tbb::atomic<int> barrier; + /** Indexed with 1-origin index */ + info_type* info; + int iteration; + MyTeam* self_ptr; +}; + +class MyClient: public ClientBase<__kmp::rml::omp_client> { +public: + MyServer* server; + /*override*/void process( job& j, void* cookie, size_type index ) { + MyTeam& t = *static_cast<MyTeam*>(cookie); + ASSERT( t.self_ptr==&t, "trashed cookie" ); + ASSERT( index<t.max_thread, NULL ); + ASSERT( !t.info[index].ran, "duplicate index?" ); + t.info[index].job = &j; + t.info[index].ran = true; + do_process(j); + if( index==1 && nesting.level<nesting.limit ) { + DoOneConnection<MyFactory,MyClient> doc(MaxThread,Nesting(nesting.level+1,nesting.limit),0,false); + doc(0); + } +#if _WIN32||_WIN64 + // test activate/deactivate + if( t.n_thread>1 && t.n_thread%2==0 ) { + if( nesting.level==0 ) { + if( index&1 ) { + size_type target = index-1; + ASSERT( target<t.max_thread, NULL ); + // wait until t.info[target].job is defined + tbb::internal::spin_wait_until_eq( t.info[target].ran, true ); + server->try_increase_load( 1, true ); + server->reactivate( t.info[target].job ); + } else { + server->deactivate( &j ); + } + } + } +#endif /* _WIN32||_WIN64 */ + ++t.barrier; + } + static const bool is_omp = true; + bool is_strict() const {return StrictTeam;} +}; + +void FireUpJobs( MyServer& server, MyClient& client, int max_thread, int n_extra, Checker* checker ) { + ASSERT( max_thread>=0, NULL ); +#if _WIN32||_WIN64 + ::rml::server::execution_resource_t me; + server.register_master( me ); +#endif /* _WIN32||_WIN64 */ + client.server = &server; + MyTeam team(server,size_t(max_thread)); + MyServer::size_type n_thread = 0; + for( int iteration=0; iteration<4; ++iteration ) { + for( size_t i=0; i<team.max_thread; ++i ) + team.info[i].ran = false; + switch( iteration ) { + default: + n_thread = int(max_thread); + break; + case 1: + // No change in number of threads + break; + case 2: + // Decrease number of threads. + n_thread = int(max_thread)/2; + break; + // Case 3 is same code as the default, but has effect of increasing the number of threads. + } + team.barrier = 0; + REMARK("client %d: server.run with n_thread=%d\n", client.client_id(), int(n_thread) ); + server.independent_thread_number_changed( n_extra ); + if( checker ) { + // Give RML time to respond to change in number of threads. + Harness::Sleep(1); + } + int n_delivered = server.try_increase_load( n_thread, StrictTeam ); + ASSERT( !StrictTeam || n_delivered==int(n_thread), "server failed to satisfy strict request" ); + if( n_delivered<0 ) { + REMARK( "client %d: oversubscription occurred (by %d)\n", client.client_id(), -n_delivered ); + server.independent_thread_number_changed( -n_extra ); + n_delivered = 0; + } else { + team.n_thread = n_delivered; + ::rml::job* job_array[JobArraySize]; + job_array[n_delivered] = (::rml::job*)intptr_t(-1); + server.get_threads( n_delivered, &team, job_array ); + __TBB_ASSERT( job_array[n_delivered]== (::rml::job*)intptr_t(-1), NULL ); + for( int i=0; i<n_delivered; ++i ) { + MyJob* j = static_cast<MyJob*>(job_array[i]); + int s = j->state; + ASSERT( s==MyJob::idle||s==MyJob::busy, NULL ); + } + server.independent_thread_number_changed( -n_extra ); + REMARK("client %d: team size is %d\n", client.client_id(), n_delivered); + if( checker ) { + checker->check_number_of_threads_delivered( n_delivered, n_thread, n_extra ); + } + // Protocol requires that master wait until workers have called "done_processing" + while( team.barrier!=n_delivered ) { + ASSERT( team.barrier>=0, NULL ); + ASSERT( team.barrier<=n_delivered, NULL ); + __TBB_Yield(); + } + REMARK("client %d: team completed\n", client.client_id() ); + for( int i=0; i<n_delivered; ++i ) { + ASSERT( team.info[i].ran, "thread on team allegedly delivered, but did not run?" ); + } + } + for( MyServer::size_type i=n_delivered; i<MyServer::size_type(max_thread); ++i ) { + ASSERT( !team.info[i].ran, "thread on team ran with illegal index" ); + } + } +#if _WIN32||_WIN64 + server.unregister_master( me ); +#endif +} + +void DoClientSpecificVerification( MyServer& server, int /*n_thread*/ ) +{ + ASSERT( server.current_balance()==int(tbb::internal::AvailableHwConcurrency())-1, NULL ); +} + +int TestMain () { + StrictTeam = true; + VerifyInitialization<MyFactory,MyClient>( MaxThread ); + SimpleTest<MyFactory,MyClient>(); + + StrictTeam = false; + VerifyInitialization<MyFactory,MyClient>( MaxThread ); + SimpleTest<MyFactory,MyClient>(); + + return Harness::Done; +} +#endif /* __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp_c_linkage.c b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp_c_linkage.c new file mode 100644 index 0000000000..88318cde4a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_omp_c_linkage.c @@ -0,0 +1,34 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +void Cplusplus(); + +int main() { + Cplusplus(); + return 0; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_tbb.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_tbb.cpp new file mode 100644 index 0000000000..22c1ac354b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_rml_tbb.cpp @@ -0,0 +1,213 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <tbb/tbb_config.h> +#if __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD +#include "harness.h" +int TestMain () { + return Harness::Skipped; +} +#else +#include "rml_tbb.h" + +typedef tbb::internal::rml::tbb_server MyServer; +typedef tbb::internal::rml::tbb_factory MyFactory; + +// Forward declaration of the function used in test_server.h +void DoClientSpecificVerification( MyServer&, int ); + +#define HARNESS_DEFAULT_MIN_THREADS 0 +#include "test_server.h" + +tbb::atomic<int> n_available_hw_threads; + +class MyClient: public ClientBase<tbb::internal::rml::tbb_client> { + tbb::atomic<int> counter; + tbb::atomic<int> gate; + /*override*/void process( job& j ) { + do_process(j); + //wait until the gate is open. + while( gate==0 ) + Harness::Sleep(1); + + __TBB_ASSERT( nesting.limit<=2, NULL ); + if( nesting.level>=nesting.limit ) + return; + + size_type max_outstanding_connections = max_job_count(); // if nesting.level==0 + if( nesting.level==1 ) + max_outstanding_connections *= (1+max_outstanding_connections); + + if( default_concurrency()<=max_outstanding_connections+2 ) + // i.e., if it is not guaranteed that at least two connections may be made without depleting the_balance + return; + + // at this point, ( nesting.level<nesting.limit ) && ( my_server->default_concurrency()-max_outstanding_connections>2 ) + for( ;; ) { + while( n_available_hw_threads<=1 ) + Harness::Sleep(1); + + int n = --n_available_hw_threads; + if( n>0 ) break; + // else I lost + ++n_available_hw_threads; + } + + DoOneConnection<MyFactory,MyClient> doc(max_job_count(),Nesting(nesting.level+1,nesting.limit),0,false); + doc(0); + + ++n_available_hw_threads; + } +public: + MyClient() {counter=1;} + static const bool is_omp = false; + bool is_strict() const {return false;} + void open_the_gate() { gate = 1; } + void close_the_gate() { gate = 0; } +}; + +void FireUpJobs( MyServer& server, MyClient& client, int n_thread, int n_extra, Checker* checker ) { + REMARK("client %d: calling adjust_job_count_estimate(%d)\n", client.client_id(),n_thread); + // Exercise independent_thread_number_changed, even for zero values. + server.independent_thread_number_changed( n_extra ); +#if _WIN32||_WIN64 + ::rml::server::execution_resource_t me; + server.register_master( me ); +#endif /* _WIN32||_WIN64 */ + // Experiments indicate that when oversubscribing, the main thread should wait a little + // while for the RML worker threads to do some work. + if( checker ) { + // Give RML time to respond to change in number of threads. + Harness::Sleep(1); + for( int k=0; k<n_thread; ++k ) + client.job_array[k].processing_count = 0; + } + //close the gate to keep worker threads from returning to RML until a snapshot is taken + client.close_the_gate(); + server.adjust_job_count_estimate( n_thread ); + int n_used = 0; + if( checker ) { + Harness::Sleep(100); + for( int k=0; k<n_thread; ++k ) + if( client.job_array[k].processing_count ) + ++n_used; + } + // open the gate + client.open_the_gate(); + // Logic further below presumes that jobs never starve, so undo previous call + // to independent_thread_number_changed before waiting on those jobs. + server.independent_thread_number_changed( -n_extra ); + REMARK("client %d: wait for each job to be processed at least once\n",client.client_id()); + // Calculate the number of jobs that are expected to get threads. + int expected = n_thread; + // Wait for expected number of jobs to be processed. +#if RML_USE_WCRM + int default_concurrency = server.default_concurrency(); + if( N_TestConnections>0 ) { + if( default_concurrency+1>=8 && n_thread<=3 && N_TestConnections<=3 && (default_concurrency/int(N_TestConnections)-1)>=n_thread ) { +#endif /* RML_USE_WCRM */ + for(;;) { + int n = 0; + for( int k=0; k<n_thread; ++k ) + if( client.job_array[k].processing_count!=0 ) + ++n; + if( n>=expected ) break; + server.yield(); + } +#if RML_USE_WCRM + } else if( n_thread>0 ) { + for( int m=0; m<20; ++m ) { + int n = 0; + for( int k=0; k<n_thread; ++k ) + if( client.job_array[k].processing_count!=0 ) + ++n; + if( n>=expected ) break; + Harness::Sleep(1); + } + } + } +#endif /* RML_USE_WCRM */ + server.adjust_job_count_estimate(-n_thread); +#if _WIN32||_WIN64 + server.unregister_master( me ); +#endif + // Give RML some time to respond + if( checker ) { + Harness::Sleep(1); + checker->check_number_of_threads_delivered( n_used, n_thread, n_extra ); + } +} + +void DoClientSpecificVerification( MyServer&, int n_thread ) +{ + MyClient* client = new MyClient; + client->initialize( n_thread, Nesting(), ClientStackSize[0] ); + MyFactory factory; + memset( &factory, 0, sizeof(factory) ); + MyFactory::status_type status = factory.open(); + ASSERT( status!=MyFactory::st_not_found, "could not find RML library" ); + ASSERT( status!=MyFactory::st_incompatible, NULL ); + ASSERT( status==MyFactory::st_success, NULL ); + MyFactory::server_type* server; + status = factory.make_server( server, *client ); + ASSERT( status==MyFactory::st_success, NULL ); + client->set_server( server ); + client->expect_close_connection = true; + server->request_close_connection(); + // Client deletes itself when it sees call to acknowledge_close_connection from server. + factory.close(); +} + +void Initialize() +{ + MyClient* client = new MyClient; + client->initialize( 1, Nesting(), ClientStackSize[0] ); + MyFactory factory; + memset( &factory, 0, sizeof(factory) ); + factory.open(); + MyFactory::server_type* server; + factory.make_server( server, *client ); + client->set_server( server ); + n_available_hw_threads = server->default_concurrency(); + client->expect_close_connection = true; + server->request_close_connection(); + // Client deletes itself when it sees call to acknowledge_close_connection from server. + factory.close(); +} + +int TestMain () { + VerifyInitialization<MyFactory,MyClient>( MaxThread ); + if ( default_concurrency<1 ) { + REPORT("The test is not intended to run on 1 thread\n"); + return Harness::Skipped; + } + Initialize(); + SimpleTest<MyFactory,MyClient>(); + return Harness::Done; +} +#endif /* __TBB_WIN8UI_SUPPORT || __TBB_MIC_OFFLOAD */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_server.h b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_server.h new file mode 100644 index 0000000000..51570d65b9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_server.h @@ -0,0 +1,441 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* This header contains code shared by test_omp_server.cpp and test_tbb_server.cpp + There is no ifndef guard - test is supposed to include this file exactly once. + The test is also exected to have #include of rml_omp.h or rml_tbb.h before + including this header. + + This header should not use any parts of TBB that require linking in the TBB run-time. + It uses a few instances of tbb::atomic<T>, all of which are completely inlined. */ + +#include "tbb/atomic.h" +#include "tbb/tbb_thread.h" +#include "harness.h" +#include "harness_memory.h" +#include "harness_concurrency_tracker.h" + +//! Define TRIVIAL as 1 to test only a single client, no nesting, no extra threads. +#define TRIVIAL 0 + +//! Maximum number of clients +#if TRIVIAL +const size_t MaxClient = 1; +#else +const size_t MaxClient = 4; +#endif + +const size_t ClientStackSize[MaxClient] = { + 1000000 +#if !TRIVIAL + ,2000000 + ,1000000 + ,4000000 +#endif /* TRIVIAL */ +}; + +const size_t OverheadStackSize = 500000; + +const size_t JobArraySize = 1000; + +static bool TestSingleConnection; + +static size_t N_TestConnections; + +static int default_concurrency; + +class MyJob: public ::rml::job { +public: + //! Enumeration for tracking states of a job. + enum state_t { + //! Job has not yet been allocated. + unallocated, + //! Is idle. + idle, + //! Has a thread working on it. + busy, + //! After call to client::cleanup + clean + }; + tbb::atomic<int> state; + tbb::atomic<int> processing_count; + void update( state_t new_state, state_t old_state ) { + int o = state.compare_and_swap(new_state,old_state); + ASSERT( o==old_state, "illegal transition" ); + } + void update_from_either( state_t new_state, state_t old_state1, state_t old_state2 ) { + int snapshot; + do { + snapshot = state; + ASSERT( snapshot==old_state1||snapshot==old_state2, "illegal transition" ); + } while( state.compare_and_swap(new_state,snapshot)!=snapshot ); + } + MyJob() { + state=unallocated; + processing_count=0; + } + ~MyJob() { + // Overwrite so that accidental use after destruction can be detected. + memset(this,-1,sizeof(*this)); + } +}; + +static tbb::atomic<int> ClientConstructions; +static tbb::atomic<int> ClientDestructions; + +struct Nesting { + int level; + int limit; + Nesting() : level(0), limit(0) {} + Nesting( int level_, int limit_ ) : level(level_), limit(limit_) {} +}; + +template<typename Client> +class ClientBase: public Client { +protected: + typedef typename Client::size_type size_type; + typedef typename Client::version_type version_type; + typedef typename Client::policy_type policy_type; + typedef typename Client::job job; +private: + size_type my_max_job_count; + size_t my_stack_size; + tbb::atomic<size_t> next_job_index; + int my_client_id; + rml::server* my_server; + +public: + enum state_t { + //! Treat *this as constructed. + live=0x1, + //! Treat *this as destroyed. + destroyed=0xDEAD + }; + + tbb::atomic<int> state; + void update( state_t new_state, state_t old_state ) { + int o = state.compare_and_swap(new_state,old_state); + ASSERT( o==old_state, NULL ); + } + + tbb::atomic<bool> expect_close_connection; + + MyJob *job_array; + + /*override*/version_type version() const { + ASSERT( state==live, NULL ); + return 1; + } + + /*override*/size_type max_job_count() const { + ASSERT( state==live, NULL ); + return my_max_job_count; + } + + /*override*/size_t min_stack_size() const { + ASSERT( state==live, NULL ); + return my_stack_size; + } + + /*override*/policy_type policy() const {return Client::throughput;} + + /*override*/void acknowledge_close_connection() { + ASSERT( expect_close_connection, NULL ); + for( size_t k=next_job_index; k>0; ) { + --k; + ASSERT( job_array[k].state==MyJob::clean, NULL ); + } + delete[] job_array; + job_array = NULL; + ASSERT( my_server, NULL ); + update( destroyed, live ); + delete this; + } + + /*override*/void cleanup( job& j_ ) { + REMARK("client %d: cleanup(%p) called\n",client_id(),&j_); + ASSERT( state==live, NULL ); + MyJob& j = static_cast<MyJob&>(j_); + while( j.state==MyJob::busy ) + my_server->yield(); + j.update(MyJob::clean,MyJob::idle); + REMARK("client %d: cleanup(%p) returns\n",client_id(),&j_); + } + + job* create_one_job(); + +protected: + void do_process( job& j_ ) { + ASSERT( state==live, NULL ); + MyJob& j = static_cast<MyJob&>(j_); + ASSERT( &j, NULL ); + j.update(MyJob::busy,MyJob::idle); + // use of the plain addition (not the atomic increment) is intentonial + j.processing_count = j.processing_count + 1; + ASSERT( my_stack_size>OverheadStackSize, NULL ); +#ifdef __ia64__ + // Half of the stack is reserved for RSE, so test only remaining half. + UseStackSpace( (my_stack_size-OverheadStackSize)/2 ); +#else + UseStackSpace( my_stack_size-OverheadStackSize ); +#endif + j.update(MyJob::idle,MyJob::busy); + my_server->yield(); + } +public: + ClientBase() : my_server(NULL) { + my_client_id = ClientConstructions++; + next_job_index = 0; + } + int client_id() const {return my_client_id;} + + Nesting nesting; + + void initialize( size_type max_job_count, Nesting nesting_, size_t stack_size ) { + ASSERT( stack_size>0, NULL ); + my_max_job_count = max_job_count; + nesting = nesting_; + my_stack_size = stack_size; + job_array = new MyJob[JobArraySize]; + expect_close_connection = false; + state = live; + } + + void set_server( rml::server* s ) {my_server=s;} + + unsigned default_concurrency() const { ASSERT( my_server, NULL); return my_server->default_concurrency(); } + + virtual ~ClientBase() { + ASSERT( state==destroyed, NULL ); + ++ClientDestructions; + } +}; + +template<typename Client> +typename Client::job* ClientBase<Client>::create_one_job() { + REMARK("client %d: create_one_job() called\n",client_id()); + size_t k = next_job_index++; + ASSERT( state==live, NULL ); + // Following assertion depends on assumption that implementation does not destroy jobs until + // the connection is closed. If the implementation is changed to destroy jobs sooner, the + // test logic in this header will have to be reworked. + ASSERT( k<my_max_job_count, "RML allocated more than max_job_count jobs simultaneously" ); + ASSERT( k<JobArraySize, "JobArraySize not big enough (problem is in test, not RML)" ); + MyJob& j = job_array[k]; + j.update(MyJob::idle,MyJob::unallocated); + REMARK("client %d: create_one_job() for k=%d returns %p\n",client_id(),int(k),&j); + return &j; +} + +struct warning_tracker { + tbb::atomic<int> n_more_than_available; + tbb::atomic<int> n_too_many_threads; + tbb::atomic<int> n_system_overload; + warning_tracker() { + n_more_than_available = 0; + n_too_many_threads = 0; + n_system_overload = 0; + } + bool all_set() { return n_more_than_available>0 && n_too_many_threads>0 && n_system_overload>0; } +} tracker; + +class Checker { +public: + int default_concurrency; + void check_number_of_threads_delivered( int n_delivered, int n_requested, int n_extra ) const; + Checker( rml::server& server ) : default_concurrency(int(server.default_concurrency())) {} +}; + +void Checker::check_number_of_threads_delivered( int n_delivered, int n_requested, int n_extra ) const { + ASSERT( default_concurrency>=0, NULL ); + if( tracker.all_set() ) return; + // Check that number of threads delivered is reasonable. + int n_avail = default_concurrency; + if( n_extra>0 ) + n_avail-=n_extra; + if( n_avail<0 ) + n_avail=0; + if( n_requested>default_concurrency ) + n_avail += n_requested-default_concurrency; + int n_expected = n_requested; + if( n_expected>n_avail ) + n_expected=n_avail; + const char* msg = NULL; + if( n_delivered>n_avail ) { + if( ++tracker.n_more_than_available>1 ) + return; + msg = "server delivered more threads than were theoretically available"; + } else if( n_delivered>n_expected ) { + if( ++tracker.n_too_many_threads>1 ) + return; + msg = "server delivered more threads than expected"; + } else if( n_delivered<n_expected ) { + if( ++tracker.n_system_overload>1 ) + return; + msg = "server delivered fewer threads than ideal; or, the system is overloaded?"; + } + if( msg ) { + REPORT("Warning: %s (n_delivered=%d n_avail=%d n_requested=%d n_extra=%d default_concurrency=%d)\n", + msg, n_delivered, n_avail, n_requested, n_extra, default_concurrency ); + } +} + +template<typename Factory,typename Client> +class DoOneConnection: NoAssign { + //! Number of threads to request + const int n_thread; + //! Nesting + const Nesting nesting; + //! Number of extra threads to pretend having outside the RML + const int n_extra; + //! If true, check number of threads actually delivered. + const bool check_delivered; +public: + DoOneConnection( int n_thread_, Nesting nesting_, int n_extra_, bool check_delivered_ ) : + n_thread(n_thread_), + nesting(nesting_), + n_extra(n_extra_), + check_delivered(check_delivered_) + { + } + + //! Test ith connection + void operator()( size_t i ) const; +}; + +template<typename Factory,typename Client> +void DoOneConnection<Factory,Client>::operator()( size_t i ) const { + ASSERT( i<MaxClient, NULL ); + Client* client = new Client; + client->initialize( Client::is_omp ? JobArraySize : n_thread, nesting, ClientStackSize[i] ); + Factory factory; + memset( &factory, 0, sizeof(factory) ); + typename Factory::status_type status = factory.open(); + ASSERT( status==Factory::st_success, NULL ); + + typename Factory::server_type* server; + status = factory.make_server( server, *client ); + ASSERT( status==Factory::st_success, NULL ); + Harness::ConcurrencyTracker ct; + REMARK("client %d: opened server n_thread=%d nesting=(%d,%d)\n", + client->client_id(), n_thread, nesting.level, nesting.limit); + client->set_server( server ); + Checker checker( *server ); + + FireUpJobs( *server, *client, n_thread, n_extra, check_delivered && !client->is_strict() ? &checker : NULL ); + + // Close the connection + client->expect_close_connection = true; + REMARK("client %d: calling request_close_connection\n", client->client_id()); +#if !RML_USE_WCRM + int default_concurrency = server->default_concurrency(); +#endif + server->request_close_connection(); + // Client deletes itself when it sees call to acknowledge_close_connection from server. + factory.close(); +#if !RML_USE_WCRM + if( TestSingleConnection ) + __TBB_ASSERT_EX( uintptr_t(factory.scratch_ptr)==uintptr_t(default_concurrency), "under/over subscription?" ); +#endif +} + +//! Test with n_threads threads and n_client clients. +template<typename Factory, typename Client> +void SimpleTest() { + Harness::ConcurrencyTracker::Reset(); + TestSingleConnection = true; + N_TestConnections = 1; + for( int n_thread=MinThread; n_thread<=MaxThread; ++n_thread ) { + // Test a single connection, no nesting, no extra threads + DoOneConnection<Factory,Client> doc(n_thread,Nesting(0,0),0,false); + doc(0); + } +#if !TRIVIAL + TestSingleConnection = false; + for( int n_thread=MinThread; n_thread<=MaxThread; ++n_thread ) { + // Test parallel connections + for( int n_client=1; n_client<=int(MaxClient); ++n_client ) { + N_TestConnections = n_client; + REMARK("SimpleTest: n_thread=%d n_client=%d\n",n_thread,n_client); + NativeParallelFor( n_client, DoOneConnection<Factory,Client>(n_thread,Nesting(0,0),0,false) ); + } + // Test server::independent_thread_number_changed + N_TestConnections = 1; + for( int n_extra=-4; n_extra<=32; n_extra=n_extra+1+n_extra/5 ) { + DoOneConnection<Factory,Client> doc(n_thread,Nesting(0,0),n_extra,true); + doc(0); + } +#if !RML_USE_WCRM + // Test nested connections + DoOneConnection<Factory,Client> doc(n_thread,Nesting(0,2),0,false); + doc(0); +#endif + } + ASSERT( Harness::ConcurrencyTracker::PeakParallelism()>1 || default_concurrency==0, "No multiple connections exercised?" ); +#endif /* !TRIVIAL */ + // Let RML catch up. + while( ClientConstructions!=ClientDestructions ) + Harness::Sleep(1); +} + +static void check_server_info( void* arg, const char* server_info ) +{ + ASSERT( strstr(server_info, (char*)arg), NULL ); +} + +template<typename Factory, typename Client> +void VerifyInitialization( int n_thread ) { + Client* client = new Client; + client->initialize( Client::is_omp ? JobArraySize : n_thread, Nesting(), ClientStackSize[0] ); + Factory factory; + memset( &factory, 0, sizeof(factory) ); + typename Factory::status_type status = factory.open(); + ASSERT( status!=Factory::st_not_found, "could not find RML library" ); + ASSERT( status!=Factory::st_incompatible, NULL ); + ASSERT( status==Factory::st_success, NULL ); + factory.call_with_server_info( check_server_info, (void*)"Intel(R) RML library" ); + typename Factory::server_type* server; + status = factory.make_server( server, *client ); + ASSERT( status!=Factory::st_incompatible, NULL ); + ASSERT( status!=Factory::st_not_found, NULL ); + ASSERT( status==Factory::st_success, NULL ); + REMARK("client %d: opened server n_thread=%d nesting=(%d,%d)\n", + client->client_id(), n_thread, 0, 0); + ASSERT( server, NULL ); + client->set_server( server ); + default_concurrency = server->default_concurrency(); + + DoClientSpecificVerification( *server, n_thread ); + + // Close the connection + client->expect_close_connection = true; + REMARK("client %d: calling request_close_connection\n", client->client_id()); + server->request_close_connection(); + // Client deletes itself when it sees call to acknowledge_close_connection from server. + factory.close(); +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_thread_monitor.cpp b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_thread_monitor.cpp new file mode 100644 index 0000000000..42be091089 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/rml/test/test_thread_monitor.cpp @@ -0,0 +1,125 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "harness.h" +#if __TBB_MIC_OFFLOAD +int TestMain () { + return Harness::Skipped; +} +#else +#include "thread_monitor.h" +#include "harness_memory.h" +#include "tbb/semaphore.cpp" + +class ThreadState { + void loop(); +public: + static __RML_DECL_THREAD_ROUTINE routine( void* arg ) { + static_cast<ThreadState*>(arg)->loop(); + return 0; + } + typedef rml::internal::thread_monitor thread_monitor; + thread_monitor monitor; + volatile int request; + volatile int ack; + volatile unsigned clock; + volatile unsigned stamp; + ThreadState() : request(-1), ack(-1), clock(0) {} +}; + +void ThreadState::loop() { + for(;;) { + ++clock; + if( ack==request ) { + thread_monitor::cookie c; + monitor.prepare_wait(c); + if( ack==request ) { + REMARK("%p: request=%d ack=%d\n", this, request, ack ); + monitor.commit_wait(c); + } else + monitor.cancel_wait(); + } else { + // Throw in delay occasionally + switch( request%8 ) { + case 0: + case 1: + case 5: + rml::internal::thread_monitor::yield(); + } + int r = request; + ack = request; + if( !r ) return; + } + } +} + +// Linux on IA-64 seems to require at least 1<<18 bytes per stack. +const size_t MinStackSize = 1<<18; +const size_t MaxStackSize = 1<<22; + +int TestMain () { + for( int p=MinThread; p<=MaxThread; ++p ) { + ThreadState* t = new ThreadState[p]; + for( size_t stack_size = MinStackSize; stack_size<=MaxStackSize; stack_size*=2 ) { + REMARK("launching %d threads\n",p); + for( int i=0; i<p; ++i ) + rml::internal::thread_monitor::launch( ThreadState::routine, t+i, stack_size ); + for( int k=1000; k>=0; --k ) { + if( k%8==0 ) { + // Wait for threads to wait. + for( int i=0; i<p; ++i ) { + unsigned count = 0; + do { + t[i].stamp = t[i].clock; + rml::internal::thread_monitor::yield(); + if( ++count>=1000 ) { + REPORT("Warning: thread %d not waiting\n",i); + break; + } + } while( t[i].stamp!=t[i].clock ); + } + } + REMARK("notifying threads\n"); + for( int i=0; i<p; ++i ) { + // Change state visible to launched thread + t[i].request = k; + t[i].monitor.notify(); + } + REMARK("waiting for threads to respond\n"); + for( int i=0; i<p; ++i ) + // Wait for thread to respond + while( t[i].ack!=k ) + rml::internal::thread_monitor::yield(); + } + } + delete[] t; + } + + return Harness::Done; +} +#endif /* __TBB_MIC_OFFLOAD */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.cpp new file mode 100644 index 0000000000..52a5433717 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.cpp @@ -0,0 +1,759 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "arena.h" +#include "governor.h" +#include "scheduler.h" +#include "itt_notify.h" +#include "semaphore.h" + +#if !__TBB_CPU_CTL_ENV_PRESENT +inline void __TBB_get_cpu_ctl_env ( __TBB_cpu_ctl_env_t* ctl ) { fegetenv(ctl); } +inline void __TBB_set_cpu_ctl_env ( const __TBB_cpu_ctl_env_t* ctl ) { fesetenv(ctl); } +#endif /* !__TBB_CPU_CTL_ENV_PRESENT */ + +#include <functional> + +#if __TBB_STATISTICS_STDOUT +#include <cstdio> +#endif + +namespace tbb { +namespace internal { + +void arena::process( generic_scheduler& s ) { + __TBB_ASSERT( is_alive(my_guard), NULL ); + __TBB_ASSERT( governor::is_set(&s), NULL ); + __TBB_ASSERT( !s.my_innermost_running_task, NULL ); + __TBB_ASSERT( !s.my_dispatching_task, NULL ); + + __TBB_ASSERT( my_num_slots != 1, NULL ); + // Start search for an empty slot from the one we occupied the last time + unsigned index = s.my_arena_index < my_num_slots ? s.my_arena_index : s.my_random.get() % (my_num_slots - 1) + 1, + end = index; + __TBB_ASSERT( index != 0, "A worker cannot occupy slot 0" ); + __TBB_ASSERT( index < my_num_slots, NULL ); + + // Find a vacant slot + for ( ;; ) { + if ( !my_slots[index].my_scheduler && __TBB_CompareAndSwapW( &my_slots[index].my_scheduler, (intptr_t)&s, 0 ) == 0 ) + break; + if ( ++index == my_num_slots ) + index = 1; + if ( index == end ) { + // Likely this arena is already saturated + goto quit; + } + } + ITT_NOTIFY(sync_acquired, my_slots + index); + s.my_arena = this; + s.my_arena_index = index; + s.my_arena_slot = my_slots + index; +#if __TBB_TASK_PRIORITY + s.my_local_reload_epoch = my_reload_epoch; + __TBB_ASSERT( !s.my_offloaded_tasks, NULL ); +#endif /* __TBB_TASK_PRIORITY */ + s.attach_mailbox( affinity_id(index+1) ); + + s.hint_for_push = index ^ s.my_random.get(); // randomizer seed + s.my_arena_slot->hint_for_pop = index; // initial value for round-robin + + __TBB_set_cpu_ctl_env(&my_cpu_ctl_env); + +#if __TBB_SCHEDULER_OBSERVER + __TBB_ASSERT( !s.my_last_local_observer, "There cannot be notified local observers when entering arena" ); + my_observers.notify_entry_observers( s.my_last_local_observer, /*worker=*/true ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + + atomic_update( my_limit, index + 1, std::less<unsigned>() ); + + for ( ;; ) { + // Try to steal a task. + // Passing reference count is technically unnecessary in this context, + // but omitting it here would add checks inside the function. + __TBB_ASSERT( is_alive(my_guard), NULL ); + task* t = s.receive_or_steal_task( s.my_dummy_task->prefix().ref_count, /*return_if_no_work=*/true ); + if (t) { + // A side effect of receive_or_steal_task is that my_innermost_running_task can be set. + // But for the outermost dispatch loop of a worker it has to be NULL. + s.my_innermost_running_task = NULL; + __TBB_ASSERT( !s.my_dispatching_task, NULL ); + s.local_wait_for_all(*s.my_dummy_task,t); + } + __TBB_ASSERT ( __TBB_load_relaxed(s.my_arena_slot->head) == __TBB_load_relaxed(s.my_arena_slot->tail), + "Worker cannot leave arena while its task pool is not empty" ); + __TBB_ASSERT( s.my_arena_slot->task_pool == EmptyTaskPool, "Empty task pool is not marked appropriately" ); + // This check prevents relinquishing more than necessary workers because + // of the non-atomicity of the decision making procedure + unsigned allotted = my_num_workers_allotted; + if (((num_workers_active() > allotted) +#if __TBB_SCHEDULER_OBSERVER && __TBB_TASK_ARENA + && allotted > 0) || (allotted == 0 && my_observers.ask_permission_to_leave() + // TODO: my_num_workers_allotted > 0 makes bug 1967 even worse, rework with accounting of demand by other arenas + // TODO: add monitoring of my_pool_state when not allowed to leave +#endif /* __TBB_SCHEDULER_OBSERVER && __TBB_TASK_ARENA */ + )) break; + } +#if __TBB_SCHEDULER_OBSERVER + my_observers.notify_exit_observers( s.my_last_local_observer, /*worker=*/true ); + s.my_last_local_observer = NULL; +#endif /* __TBB_SCHEDULER_OBSERVER */ +#if __TBB_TASK_PRIORITY + if ( s.my_offloaded_tasks ) { + GATHER_STATISTIC( ++s.my_counters.prio_orphanings ); + ++my_abandonment_epoch; + __TBB_ASSERT( s.my_offloaded_task_list_tail_link && !*s.my_offloaded_task_list_tail_link, NULL ); + task* orphans; + do { + orphans = const_cast<task*>(my_orphaned_tasks); + *s.my_offloaded_task_list_tail_link = orphans; + } while ( __TBB_CompareAndSwapW(&my_orphaned_tasks, (ptrdiff_t)s.my_offloaded_tasks, (ptrdiff_t)orphans) != (ptrdiff_t)orphans ); + s.my_offloaded_tasks = NULL; +#if TBB_USE_ASSERT + s.my_offloaded_task_list_tail_link = NULL; +#endif /* TBB_USE_ASSERT */ + } +#endif /* __TBB_TASK_PRIORITY */ +#if __TBB_STATISTICS + ++s.my_counters.arena_roundtrips; + *my_slots[index].my_counters += s.my_counters; + s.my_counters.reset(); +#endif /* __TBB_STATISTICS */ + __TBB_store_with_release( my_slots[index].my_scheduler, (generic_scheduler*)NULL ); + s.my_arena_slot = 0; // detached from slot + s.my_inbox.detach(); + __TBB_ASSERT( s.my_inbox.is_idle_state(true), NULL ); + __TBB_ASSERT( !s.my_innermost_running_task, NULL ); + __TBB_ASSERT( !s.my_dispatching_task, NULL ); + __TBB_ASSERT( is_alive(my_guard), NULL ); +quit: + // In contrast to earlier versions of TBB (before 3.0 U5) now it is possible + // that arena may be temporarily left unpopulated by threads. See comments in + // arena::on_thread_leaving() for more details. +#if !__TBB_TRACK_PRIORITY_LEVEL_SATURATION + on_thread_leaving</*is_master*/false>(); +#endif /* !__TBB_TRACK_PRIORITY_LEVEL_SATURATION */ +} + +arena::arena ( market& m, unsigned max_num_workers ) { + __TBB_ASSERT( !my_guard, "improperly allocated arena?" ); + __TBB_ASSERT( sizeof(my_slots[0]) % NFS_GetLineSize()==0, "arena::slot size not multiple of cache line size" ); + __TBB_ASSERT( (uintptr_t)this % NFS_GetLineSize()==0, "arena misaligned" ); +#if __TBB_TASK_PRIORITY + __TBB_ASSERT( !my_reload_epoch && !my_orphaned_tasks && !my_skipped_fifo_priority, "New arena object is not zeroed" ); +#endif /* __TBB_TASK_PRIORITY */ + my_market = &m; + my_limit = 1; + // Two slots are mandatory: for the master, and for 1 worker (required to support starvation resistant tasks). + my_num_slots = num_slots_to_reserve(max_num_workers); + my_max_num_workers = max_num_workers; + my_references = 1; // accounts for the master + __TBB_get_cpu_ctl_env(&my_cpu_ctl_env); +#if __TBB_TASK_PRIORITY + my_bottom_priority = my_top_priority = normalized_normal_priority; +#endif /* __TBB_TASK_PRIORITY */ + my_aba_epoch = m.my_arenas_aba_epoch; +#if __TBB_SCHEDULER_OBSERVER + my_observers.my_arena = this; +#endif /* __TBB_SCHEDULER_OBSERVER */ + __TBB_ASSERT ( my_max_num_workers < my_num_slots, NULL ); + // Construct slots. Mark internal synchronization elements for the tools. + for( unsigned i = 0; i < my_num_slots; ++i ) { + __TBB_ASSERT( !my_slots[i].my_scheduler && !my_slots[i].task_pool, NULL ); + __TBB_ASSERT( !my_slots[i].task_pool_ptr, NULL ); + __TBB_ASSERT( !my_slots[i].my_task_pool_size, NULL ); + ITT_SYNC_CREATE(my_slots + i, SyncType_Scheduler, SyncObj_WorkerTaskPool); + mailbox(i+1).construct(); + ITT_SYNC_CREATE(&mailbox(i+1), SyncType_Scheduler, SyncObj_Mailbox); + my_slots[i].hint_for_pop = i; +#if __TBB_STATISTICS + my_slots[i].my_counters = new ( NFS_Allocate(sizeof(statistics_counters), 1, NULL) ) statistics_counters; +#endif /* __TBB_STATISTICS */ + } +#if __TBB_TASK_PRIORITY + for ( intptr_t i = 0; i < num_priority_levels; ++i ) { + my_task_stream[i].initialize(my_num_slots); + ITT_SYNC_CREATE(my_task_stream + i, SyncType_Scheduler, SyncObj_TaskStream); + } +#else /* !__TBB_TASK_PRIORITY */ + my_task_stream.initialize(my_num_slots); + ITT_SYNC_CREATE(&my_task_stream, SyncType_Scheduler, SyncObj_TaskStream); +#endif /* !__TBB_TASK_PRIORITY */ + my_mandatory_concurrency = false; +#if __TBB_TASK_GROUP_CONTEXT + // Context to be used by root tasks by default (if the user has not specified one). + my_default_ctx = + new ( NFS_Allocate(sizeof(task_group_context), 1, NULL) ) task_group_context(task_group_context::isolated); +#endif /* __TBB_TASK_GROUP_CONTEXT */ +} + +arena& arena::allocate_arena( market& m, unsigned max_num_workers ) { + __TBB_ASSERT( sizeof(base_type) + sizeof(arena_slot) == sizeof(arena), "All arena data fields must go to arena_base" ); + __TBB_ASSERT( sizeof(base_type) % NFS_GetLineSize() == 0, "arena slots area misaligned: wrong padding" ); + __TBB_ASSERT( sizeof(mail_outbox) == NFS_MaxLineSize, "Mailbox padding is wrong" ); + size_t n = allocation_size(max_num_workers); + unsigned char* storage = (unsigned char*)NFS_Allocate( n, 1, NULL ); + // Zero all slots to indicate that they are empty + memset( storage, 0, n ); + return *new( storage + num_slots_to_reserve(max_num_workers) * sizeof(mail_outbox) ) arena(m, max_num_workers); +} + +void arena::free_arena () { + __TBB_ASSERT( is_alive(my_guard), NULL ); + __TBB_ASSERT( !my_references, "There are threads in the dying arena" ); + __TBB_ASSERT( !my_num_workers_requested && !my_num_workers_allotted, "Dying arena requests workers" ); + __TBB_ASSERT( my_pool_state == SNAPSHOT_EMPTY || !my_max_num_workers, "Inconsistent state of a dying arena" ); +#if !__TBB_STATISTICS_EARLY_DUMP + GATHER_STATISTIC( dump_arena_statistics() ); +#endif + poison_value( my_guard ); + intptr_t drained = 0; + for ( unsigned i = 0; i < my_num_slots; ++i ) { + __TBB_ASSERT( !my_slots[i].my_scheduler, "arena slot is not empty" ); +#if !__TBB_TASK_ARENA + __TBB_ASSERT( my_slots[i].task_pool == EmptyTaskPool, NULL ); +#else + //TODO: understand the assertion and modify +#endif + __TBB_ASSERT( my_slots[i].head == my_slots[i].tail, NULL ); // TODO: replace by is_quiescent_local_task_pool_empty + my_slots[i].free_task_pool(); +#if __TBB_STATISTICS + NFS_Free( my_slots[i].my_counters ); +#endif /* __TBB_STATISTICS */ + drained += mailbox(i+1).drain(); + } +#if __TBB_TASK_PRIORITY && TBB_USE_ASSERT + for ( intptr_t i = 0; i < num_priority_levels; ++i ) + __TBB_ASSERT(my_task_stream[i].empty() && my_task_stream[i].drain()==0, "Not all enqueued tasks were executed"); +#elif !__TBB_TASK_PRIORITY + __TBB_ASSERT(my_task_stream.empty() && my_task_stream.drain()==0, "Not all enqueued tasks were executed"); +#endif /* !__TBB_TASK_PRIORITY */ +#if __TBB_COUNT_TASK_NODES + my_market->update_task_node_count( -drained ); +#endif /* __TBB_COUNT_TASK_NODES */ + my_market->release(); +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( my_default_ctx, "Master thread never entered the arena?" ); + my_default_ctx->~task_group_context(); + NFS_Free(my_default_ctx); +#endif /* __TBB_TASK_GROUP_CONTEXT */ +#if __TBB_SCHEDULER_OBSERVER + if ( !my_observers.empty() ) + my_observers.clear(); +#endif /* __TBB_SCHEDULER_OBSERVER */ + void* storage = &mailbox(my_num_slots); + __TBB_ASSERT( my_references == 0, NULL ); + __TBB_ASSERT( my_pool_state == SNAPSHOT_EMPTY || !my_max_num_workers, NULL ); + this->~arena(); +#if TBB_USE_ASSERT > 1 + memset( storage, 0, allocation_size(my_max_num_workers) ); +#endif /* TBB_USE_ASSERT */ + NFS_Free( storage ); +} + +#if __TBB_STATISTICS +void arena::dump_arena_statistics () { + statistics_counters total; + for( unsigned i = 0; i < my_num_slots; ++i ) { +#if __TBB_STATISTICS_EARLY_DUMP + generic_scheduler* s = my_slots[i].my_scheduler; + if ( s ) + *my_slots[i].my_counters += s->my_counters; +#else + __TBB_ASSERT( !my_slots[i].my_scheduler, NULL ); +#endif + if ( i != 0 ) { + total += *my_slots[i].my_counters; + dump_statistics( *my_slots[i].my_counters, i ); + } + } + dump_statistics( *my_slots[0].my_counters, 0 ); +#if __TBB_STATISTICS_STDOUT +#if !__TBB_STATISTICS_TOTALS_ONLY + printf( "----------------------------------------------\n" ); +#endif + dump_statistics( total, workers_counters_total ); + total += *my_slots[0].my_counters; + dump_statistics( total, arena_counters_total ); +#if !__TBB_STATISTICS_TOTALS_ONLY + printf( "==============================================\n" ); +#endif +#endif /* __TBB_STATISTICS_STDOUT */ +} +#endif /* __TBB_STATISTICS */ + +#if __TBB_TASK_PRIORITY +// TODO: This function seems deserving refactoring, e.g. get rid of 's' +inline bool arena::may_have_tasks ( generic_scheduler* s, arena_slot& slot, bool& tasks_present, bool& dequeuing_possible ) { + suppress_unused_warning(slot); + if ( !s ) { + // This slot is vacant + __TBB_ASSERT( slot.task_pool == EmptyTaskPool, NULL ); + __TBB_ASSERT( slot.tail == slot.head, "Someone is tinkering with a vacant arena slot" ); + return false; + } + dequeuing_possible |= s->worker_outermost_level(); + if ( s->my_pool_reshuffling_pending ) { + // This primary task pool is nonempty and may contain tasks at the current + // priority level. Its owner is winnowing lower priority tasks at the moment. + tasks_present = true; + return true; + } + if ( s->my_offloaded_tasks ) { + tasks_present = true; + if ( s->my_local_reload_epoch < *s->my_ref_reload_epoch ) { + // This scheduler's offload area is nonempty and may contain tasks at the + // current priority level. + return true; + } + } + return false; +} +#endif /* __TBB_TASK_PRIORITY */ + +bool arena::is_out_of_work() { + // TODO: rework it to return at least a hint about where a task was found; better if the task itself. + for(;;) { + pool_state_t snapshot = my_pool_state; + switch( snapshot ) { + case SNAPSHOT_EMPTY: + return true; + case SNAPSHOT_FULL: { + // Use unique id for "busy" in order to avoid ABA problems. + const pool_state_t busy = pool_state_t(&busy); + // Request permission to take snapshot + if( my_pool_state.compare_and_swap( busy, SNAPSHOT_FULL )==SNAPSHOT_FULL ) { + // Got permission. Take the snapshot. + // NOTE: This is not a lock, as the state can be set to FULL at + // any moment by a thread that spawns/enqueues new task. + size_t n = my_limit; + // Make local copies of volatile parameters. Their change during + // snapshot taking procedure invalidates the attempt, and returns + // this thread into the dispatch loop. +#if __TBB_TASK_PRIORITY + intptr_t top_priority = my_top_priority; + uintptr_t reload_epoch = my_reload_epoch; + // Inspect primary task pools first +#endif /* __TBB_TASK_PRIORITY */ + size_t k; + for( k=0; k<n; ++k ) { + if( my_slots[k].task_pool != EmptyTaskPool && + __TBB_load_relaxed(my_slots[k].head) < __TBB_load_relaxed(my_slots[k].tail) ) + { + // k-th primary task pool is nonempty and does contain tasks. + break; + } + } + __TBB_ASSERT( k <= n, NULL ); + bool work_absent = k == n; +#if __TBB_TASK_PRIORITY + // Variable tasks_present indicates presence of tasks at any priority + // level, while work_absent refers only to the current priority. + bool tasks_present = !work_absent || my_orphaned_tasks; + bool dequeuing_possible = false; + if ( work_absent ) { + // Check for the possibility that recent priority changes + // brought some tasks to the current priority level + + uintptr_t abandonment_epoch = my_abandonment_epoch; + // Master thread's scheduler needs special handling as it + // may be destroyed at any moment (workers' schedulers are + // guaranteed to be alive while at least one thread is in arena). + // Have to exclude concurrency with task group state change propagation too. + // TODO: check whether it is still necessary since some pools belong to slots now + my_market->my_arenas_list_mutex.lock(); + generic_scheduler *s = my_slots[0].my_scheduler; + if ( s && __TBB_CompareAndSwapW(&my_slots[0].my_scheduler, (intptr_t)LockedMaster, (intptr_t)s) == (intptr_t)s ) { //TODO: remove need to lock + __TBB_ASSERT( my_slots[0].my_scheduler == LockedMaster && s != LockedMaster, NULL ); + work_absent = !may_have_tasks( s, my_slots[0], tasks_present, dequeuing_possible ); + __TBB_store_with_release( my_slots[0].my_scheduler, s ); + } + my_market->my_arenas_list_mutex.unlock(); + // The following loop is subject to data races. While k-th slot's + // scheduler is being examined, corresponding worker can either + // leave to RML or migrate to another arena. + // But the races are not prevented because all of them are benign. + // First, the code relies on the fact that worker thread's scheduler + // object persists until the whole library is deinitialized. + // Second, in the worst case the races can only cause another + // round of stealing attempts to be undertaken. Introducing complex + // synchronization into this coldest part of the scheduler's control + // flow does not seem to make sense because it both is unlikely to + // ever have any observable performance effect, and will require + // additional synchronization code on the hotter paths. + for( k = 1; work_absent && k < n; ++k ) + work_absent = !may_have_tasks( my_slots[k].my_scheduler, my_slots[k], tasks_present, dequeuing_possible ); + // Preclude premature switching arena off because of a race in the previous loop. + work_absent = work_absent + && !__TBB_load_with_acquire(my_orphaned_tasks) + && abandonment_epoch == my_abandonment_epoch; + } +#endif /* __TBB_TASK_PRIORITY */ + // Test and test-and-set. + if( my_pool_state==busy ) { +#if __TBB_TASK_PRIORITY + bool no_fifo_tasks = my_task_stream[top_priority].empty(); + work_absent = work_absent && (!dequeuing_possible || no_fifo_tasks) + && top_priority == my_top_priority && reload_epoch == my_reload_epoch; +#else + bool no_fifo_tasks = my_task_stream.empty(); + work_absent = work_absent && no_fifo_tasks; +#endif /* __TBB_TASK_PRIORITY */ + if( work_absent ) { +#if __TBB_TASK_PRIORITY + if ( top_priority > my_bottom_priority ) { + if ( my_market->lower_arena_priority(*this, top_priority - 1, top_priority) + && !my_task_stream[top_priority].empty() ) + { + atomic_update( my_skipped_fifo_priority, top_priority, std::less<intptr_t>()); + } + } + else if ( !tasks_present && !my_orphaned_tasks && no_fifo_tasks ) { +#endif /* __TBB_TASK_PRIORITY */ + // save current demand value before setting SNAPSHOT_EMPTY, + // to avoid race with advertise_new_work. + int current_demand = (int)my_max_num_workers; + if( my_pool_state.compare_and_swap( SNAPSHOT_EMPTY, busy )==busy ) { + // This thread transitioned pool to empty state, and thus is + // responsible for telling RML that there is no other work to do. + my_market->adjust_demand( *this, -current_demand ); +#if __TBB_TASK_PRIORITY + // Check for the presence of enqueued tasks "lost" on some of + // priority levels because updating arena priority and switching + // arena into "populated" (FULL) state happen non-atomically. + // Imposing atomicity would require task::enqueue() to use a lock, + // which is unacceptable. + bool switch_back = false; + for ( int p = 0; p < num_priority_levels; ++p ) { + if ( !my_task_stream[p].empty() ) { + switch_back = true; + if ( p < my_bottom_priority || p > my_top_priority ) + my_market->update_arena_priority(*this, p); + } + } + if ( switch_back ) + advertise_new_work</*Spawned*/false>(); +#endif /* __TBB_TASK_PRIORITY */ + return true; + } + return false; +#if __TBB_TASK_PRIORITY + } +#endif /* __TBB_TASK_PRIORITY */ + } + // Undo previous transition SNAPSHOT_FULL-->busy, unless another thread undid it. + my_pool_state.compare_and_swap( SNAPSHOT_FULL, busy ); + } + } + return false; + } + default: + // Another thread is taking a snapshot. + return false; + } + } +} + +#if __TBB_COUNT_TASK_NODES +intptr_t arena::workers_task_node_count() { + intptr_t result = 0; + for( unsigned i = 1; i < my_num_slots; ++i ) { + generic_scheduler* s = my_slots[i].my_scheduler; + if( s ) + result += s->my_task_node_count; + } + return result; +} +#endif /* __TBB_COUNT_TASK_NODES */ + +void arena::enqueue_task( task& t, intptr_t prio, unsigned &hint_for_push ) +{ +#if __TBB_RECYCLE_TO_ENQUEUE + __TBB_ASSERT( t.state()==task::allocated || t.state()==task::to_enqueue, "attempt to enqueue task with inappropriate state" ); +#else + __TBB_ASSERT( t.state()==task::allocated, "attempt to enqueue task that is not in 'allocated' state" ); +#endif + t.prefix().state = task::ready; + t.prefix().extra_state |= es_task_enqueued; // enqueued task marker + +#if TBB_USE_ASSERT + if( task* parent = t.parent() ) { + internal::reference_count ref_count = parent->prefix().ref_count; + __TBB_ASSERT( ref_count!=0, "attempt to enqueue task whose parent has a ref_count==0 (forgot to set_ref_count?)" ); + __TBB_ASSERT( ref_count>0, "attempt to enqueue task whose parent has a ref_count<0" ); + parent->prefix().extra_state |= es_ref_count_active; + } + __TBB_ASSERT(t.prefix().affinity==affinity_id(0), "affinity is ignored for enqueued tasks"); +#endif /* TBB_USE_ASSERT */ + +#if __TBB_TASK_PRIORITY + intptr_t p = prio ? normalize_priority(priority_t(prio)) : normalized_normal_priority; + assert_priority_valid(p); + task_stream &ts = my_task_stream[p]; +#else /* !__TBB_TASK_PRIORITY */ + __TBB_ASSERT_EX(prio == 0, "the library is not configured to respect the task priority"); + task_stream &ts = my_task_stream; +#endif /* !__TBB_TASK_PRIORITY */ + ITT_NOTIFY(sync_releasing, &ts); + ts.push( &t, hint_for_push ); +#if __TBB_TASK_PRIORITY + if ( p != my_top_priority ) + my_market->update_arena_priority( *this, p ); +#endif /* __TBB_TASK_PRIORITY */ + advertise_new_work< /*Spawned=*/ false >(); +#if __TBB_TASK_PRIORITY + if ( p != my_top_priority ) + my_market->update_arena_priority( *this, p ); +#endif /* __TBB_TASK_PRIORITY */ +} + +#if __TBB_TASK_ARENA +template<typename Body> +void generic_scheduler::nested_arena_execute(arena* arena, task* t, bool needs_adjusting, Body &b) { + // TODO: is it safe to assign slot to a scheduler which is not yet switched + // save current arena settings + scheduler_state state = *this; + // overwrite arena settings + my_arena = arena; + my_arena_index = 0; + my_arena_slot = my_arena->my_slots + my_arena_index; + my_inbox.detach(); // TODO: mailboxes were not designed for switching, add copy constructor? + attach_mailbox( affinity_id(my_arena_index+1) ); + my_innermost_running_task = my_dispatching_task = t; + +#if __TBB_SCHEDULER_OBSERVER + my_last_local_observer = 0; + my_arena->my_observers.notify_entry_observers( my_last_local_observer, /*worker=*/false ); +#endif + // TODO: it requires market to have P workers (not P-1) + // TODO: it still allows temporary oversubscription by 1 worker (due to my_max_num_workers) + // TODO: a preempted worker should be excluded from assignment to other arenas e.g. my_slack-- + if( needs_adjusting ) my_arena->my_market->adjust_demand(*my_arena, -1); + b(); + if( needs_adjusting ) my_arena->my_market->adjust_demand(*my_arena, 1); +#if __TBB_SCHEDULER_OBSERVER + my_arena->my_observers.notify_exit_observers( my_last_local_observer, /*worker=*/false ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + + // Free the master slot. TODO: support multiple masters +#if __TBB_TASK_PRIORITY + while ( __TBB_CompareAndSwapW(&my_arena->my_slots[0].my_scheduler, 0, (intptr_t)this) != (intptr_t)this ) + __TBB_Yield(); // task priority can use master slot for locking while accessing the scheduler +#else + __TBB_store_with_release(my_arena->my_slots[0].my_scheduler, (generic_scheduler*)NULL); +#endif + my_arena->my_exit_monitors.notify_one_relaxed(); + // restore arena settings + *(scheduler_state*)this = state; +} +#endif /* __TBB_TASK_ARENA */ + +} // namespace internal +} // namespace tbb + +#if __TBB_TASK_ARENA +#include "scheduler_utility.h" + +namespace tbb { +namespace interface6 { +using namespace tbb::internal; + +void task_arena::internal_initialize( ) { + __TBB_ASSERT(!my_initialized, NULL); + __TBB_ASSERT(!my_arena, NULL); + __TBB_ASSERT( my_master_slots <= 1, "Number of slots reserved for master can be only [0,1]"); + if( my_master_slots > 1 ) my_master_slots = 1; // TODO: make more masters + if( my_max_concurrency < 1 ) + my_max_concurrency = (int)governor::default_num_threads(); + // TODO: reimplement in an efficient way. We need a scheduler instance in this thread + // but the scheduler is only required for task allocation and fifo random seeds until + // master wants to join the arena. (Idea - to create a restricted specialization) + // It is excessive to create an implicit arena for master here anyway. But scheduler + // instance implies master thread to be always connected with arena. + // browse recursively into init_scheduler and arena::process for details + if( !governor::local_scheduler_if_initialized() ) + governor::init_scheduler( (unsigned)my_max_concurrency - my_master_slots + 1/*TODO: address in market instead*/, 0, true ); + // TODO: we will need to introduce a mechanism for global settings, including stack size, used by all arenas + my_arena = &market::create_arena( my_max_concurrency - my_master_slots/*it's +1 slot for num_masters=0*/, ThreadStackSize ); +} + +void task_arena::internal_terminate( ) { + if( my_arena ) {// task_arena was initialized + my_arena->on_thread_leaving</*is_master*/true>(); + my_arena = 0; + } +} + +void task_arena::internal_enqueue( task& t, intptr_t prio ) const { + __TBB_ASSERT(my_arena, NULL); + generic_scheduler* s = governor::local_scheduler_if_initialized(); + __TBB_ASSERT(s, "Scheduler is not initialized"); // we allocated a task so can expect the scheduler +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT(s->my_innermost_running_task->prefix().context == t.prefix().context, "using non-default context? consider reimplement code below"); + t.prefix().context = my_arena->my_default_ctx; +#endif + my_arena->enqueue_task( t, prio, s->hint_for_push ); +} + +class delegated_task : public task { + internal::delegate_base & my_delegate; + concurrent_monitor & my_monitor; + task * my_root; + /*override*/ task* execute() { + generic_scheduler& s = *(generic_scheduler*)prefix().owner; + __TBB_ASSERT(s.worker_outermost_level() || s.master_outermost_level(), "expected to be enqueued and received on the outermost level"); + // but this task can mimics outermost level, detect it + if( s.master_outermost_level() && s.my_dummy_task->state() == task::executing ) { +#if TBB_USE_EXCEPTIONS + // RTTI is available, check whether the cast is valid + __TBB_ASSERT(dynamic_cast<delegated_task*>(s.my_dummy_task), 0); +#endif + set_ref_count(1); // required by the semantics of recycle_to_enqueue() + recycle_to_enqueue(); + return NULL; + } + task * old_dummy = s.my_dummy_task; + s.my_dummy_task = this; // mimics outermost master + __TBB_ASSERT(s.my_innermost_running_task == this, 0); + my_delegate(); + s.my_dummy_task = old_dummy; + __TBB_ASSERT(my_root->ref_count()==2, NULL); + __TBB_store_with_release(my_root->prefix().ref_count, 1); // must precede the wakeup + my_monitor.notify_relaxed(*this); + return NULL; + } +public: + delegated_task ( internal::delegate_base & d, concurrent_monitor & s, task * t ) + : my_delegate(d), my_monitor(s), my_root(t) {} + bool operator()(uintptr_t ctx) const { return (void*)ctx == (void*)&my_delegate; } +}; + +struct arena_join_body : internal::delegate_base { + generic_scheduler *my_scheduler; + task * my_root; + arena_join_body(generic_scheduler *s, task * t) : my_scheduler(s), my_root(t) {} + /*override*/ void operator()() const { + my_scheduler->local_wait_for_all(*my_root, NULL); + } +}; +// TODO: consider replacing of delegate_base by scoped_task +void task_arena::internal_execute( internal::delegate_base& d) const { + __TBB_ASSERT(my_arena, NULL); + generic_scheduler* s = governor::local_scheduler(); + __TBB_ASSERT(s, "Scheduler is not initialized"); + if( s->my_arena == my_arena ) + d(); + else if( !__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) // TODO TEMP: one master, make more masters + && __TBB_CompareAndSwapW( &my_arena->my_slots[0].my_scheduler, (intptr_t)s, 0 ) == 0 ) { + s->nested_arena_execute<const internal::delegate_base>(my_arena, s->my_dummy_task, !my_master_slots, d); + } else { + concurrent_monitor::thread_context waiter; + auto_empty_task root(__TBB_CONTEXT_ARG(s, s->my_dummy_task->prefix().context)); + root.prefix().ref_count = 2; + internal_enqueue( *new( task::allocate_root() ) delegated_task(d, my_arena->my_exit_monitors, &root), 0 ); // TODO: priority? + do { + my_arena->my_exit_monitors.prepare_wait(waiter, (uintptr_t)&d); + if( __TBB_load_with_acquire(root.prefix().ref_count) < 2 ) { + my_arena->my_exit_monitors.cancel_wait(waiter); + break; + } + else if( !__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) // TODO: refactor into a function? + && __TBB_CompareAndSwapW( &my_arena->my_slots[0].my_scheduler, (intptr_t)s, 0 ) == 0 ) { + my_arena->my_exit_monitors.cancel_wait(waiter); + s->nested_arena_execute<const internal::delegate_base>(my_arena, s->my_dummy_task, !my_master_slots, arena_join_body(s, &root)); + __TBB_ASSERT( root.prefix().ref_count == 0, NULL ); + } else { + my_arena->my_exit_monitors.commit_wait(waiter); + } + } while( __TBB_load_with_acquire(root.prefix().ref_count) == 2 ); + } +} + +// this wait task is a temporary approach to wait for arena emptiness for masters without slots +// TODO: it will be rather reworked for one source of notification from is_out_of_work +class wait_task : public task { + binary_semaphore & my_signal; + /*override*/ task* execute() { + generic_scheduler& s = *governor::local_scheduler_if_initialized(); + if( s.my_arena_index && s.worker_outermost_level() ) // on outermost level of workers only + s.local_wait_for_all( *s.my_dummy_task, NULL ); // run remaining tasks + else s.my_arena->is_out_of_work(); // avoids starvation of internal_wait: issuing this task makes arena full + my_signal.V(); + return NULL; + } +public: + wait_task ( binary_semaphore & s ) : my_signal(s) {} +}; + +struct wait_body : internal::delegate_base { + generic_scheduler *my_scheduler; + wait_body(generic_scheduler *s) : my_scheduler(s) {} + /*override*/ void operator()() const { + my_scheduler->my_dummy_task->prefix().ref_count++; // force stealing + while( my_scheduler->my_arena->my_pool_state != arena::SNAPSHOT_EMPTY ) + my_scheduler->local_wait_for_all(*my_scheduler->my_dummy_task, NULL); + my_scheduler->my_dummy_task->prefix().ref_count--; + } +}; + +// todo: merge with internal_execute() +void task_arena::internal_wait() const { + __TBB_ASSERT(my_arena, NULL); + generic_scheduler* s = governor::local_scheduler(); + __TBB_ASSERT(s, "Scheduler is not initialized"); + __TBB_ASSERT(s->my_arena != my_arena || s->my_arena_index == 0, "task_arena::wait_until_empty() is not supported within a worker context" ); + for(;;) { + while( my_arena->my_pool_state != arena::SNAPSHOT_EMPTY ) { + if( s->my_arena == my_arena ) + while( my_arena->my_pool_state != arena::SNAPSHOT_EMPTY ) + s->local_wait_for_all( *s->my_dummy_task, NULL ); //TODO: check dummy_task logic inside + else if( !__TBB_load_with_acquire(my_arena->my_slots[0].my_scheduler) // TODO TEMP: one master, make more masters + && __TBB_CompareAndSwapW( &my_arena->my_slots[0].my_scheduler, (intptr_t)s, 0 ) == 0 ) { + s->nested_arena_execute<const internal::delegate_base>(my_arena, NULL, !my_master_slots, wait_body(s)); + } else { + binary_semaphore waiter; // TODO: replace by a single event notification from is_out_of_work + internal_enqueue( *new( task::allocate_root() ) wait_task(waiter), 0 ); // TODO: priority? + waiter.P(); // TODO: concurrent_monitor + } + } + if( (!my_arena->num_workers_active() && !my_arena->my_slots[0].my_scheduler) // no activity + || (s->my_arena == my_arena && s->my_arena_index ) ) // or improper worker context + break; // spin until workers active but avoid spinning in a worker + __TBB_Yield(); // wait until workers and master leave + } +} + +/*static*/ int task_arena::current_slot() { + generic_scheduler* s = governor::local_scheduler(); // TODO: return a special value if the thread has no slot + return s->my_arena_index; +} + + +} // tbb::interfaceX +} // tbb +#endif /* __TBB_TASK_ARENA */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.h new file mode 100644 index 0000000000..6bf7822aef --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/arena.h @@ -0,0 +1,419 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_arena_H +#define _TBB_arena_H + +#include "tbb/tbb_stddef.h" +#include "tbb/atomic.h" + +#include "tbb/tbb_machine.h" + +#if !__TBB_CPU_CTL_ENV_PRESENT + #include <fenv.h> + typedef fenv_t __TBB_cpu_ctl_env_t; +#endif /* !__TBB_CPU_CTL_ENV_PRESENT */ + +#include "scheduler_common.h" +#include "intrusive_list.h" +#include "task_stream.h" +#include "../rml/include/rml_tbb.h" +#include "mailbox.h" +#include "observer_proxy.h" +#if __TBB_TASK_ARENA +#include "concurrent_monitor.h" +#endif + +namespace tbb { + +namespace interface6 { +class task_arena; +} +class task_group_context; +class allocate_root_with_context_proxy; + +namespace internal { + +class task_scheduler_observer_v3; +class governor; +class arena; +template<typename SchedulerTraits> class custom_scheduler; + +class market; + +//! arena data except the array of slots +/** Separated in order to simplify padding. + Intrusive list node base class is used by market to form a list of arenas. **/ +struct arena_base : intrusive_list_node { + //! Market owning this arena + market* my_market; + + //! Maximal currently busy slot. + atomic<unsigned> my_limit; + + //! Number of slots in the arena + unsigned my_num_slots; + + //! Number of workers requested by the master thread owning the arena + unsigned my_max_num_workers; + + //! Number of workers that are currently requested from the resource manager + int my_num_workers_requested; + + //! Number of workers that have been marked out by the resource manager to service the arena + unsigned my_num_workers_allotted; + + //! References of the arena + /** Counts workers and master references separately. Bit 0 indicates reference from implicit + master or explicit task_arena; the next bits contain number of workers servicing the arena.*/ + atomic<unsigned> my_references; + + //! ABA prevention marker + uintptr_t my_aba_epoch; + + //! FPU control settings of arena's master thread captured at the moment of arena instantiation. + __TBB_cpu_ctl_env_t my_cpu_ctl_env; + +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + int my_num_workers_present; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + + //! Current task pool state and estimate of available tasks amount. + /** The estimate is either 0 (SNAPSHOT_EMPTY) or infinity (SNAPSHOT_FULL). + Special state is "busy" (any other unsigned value). + Note that the implementation of arena::is_busy_or_empty() requires + my_pool_state to be unsigned. */ + tbb::atomic<uintptr_t> my_pool_state; + +#if __TBB_TASK_GROUP_CONTEXT + //! Default task group context. + /** Used by root tasks allocated directly by the master thread (not from inside + a TBB task) without explicit context specification. **/ + task_group_context* my_default_ctx; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#if __TBB_TASK_PRIORITY + //! Highest priority of recently spawned or enqueued tasks. + volatile intptr_t my_top_priority; + + //! Lowest normalized priority of available spawned or enqueued tasks. + intptr_t my_bottom_priority; + + //! Tracks events that may bring tasks in offload areas to the top priority level. + /** Incremented when arena top priority changes or a task group priority + is elevated to the current arena's top level. **/ + uintptr_t my_reload_epoch; + + //! List of offloaded tasks abandoned by workers revoked by the market + task* my_orphaned_tasks; + + //! Counter used to track the occurrence of recent orphaning and re-sharing operations. + tbb::atomic<uintptr_t> my_abandonment_epoch; + + //! Task pool for the tasks scheduled via task::enqueue() method + /** Such scheduling guarantees eventual execution even if + - new tasks are constantly coming (by extracting scheduled tasks in + relaxed FIFO order); + - the enqueuing thread does not call any of wait_for_all methods. **/ + task_stream my_task_stream[num_priority_levels]; + + //! Highest priority level containing enqueued tasks + /** It being greater than 0 means that high priority enqueued tasks had to be + bypassed because all workers were blocked in nested dispatch loops and + were unable to progress at then current priority level. **/ + tbb::atomic<intptr_t> my_skipped_fifo_priority; +#else /* !__TBB_TASK_PRIORITY */ + + //! Task pool for the tasks scheduled via task::enqueue() method + /** Such scheduling guarantees eventual execution even if + - new tasks are constantly coming (by extracting scheduled tasks in + relaxed FIFO order); + - the enqueuing thread does not call any of wait_for_all methods. **/ + task_stream my_task_stream; +#endif /* !__TBB_TASK_PRIORITY */ + +#if __TBB_SCHEDULER_OBSERVER + //! List of local observers attached to this arena. + observer_list my_observers; +#endif /* __TBB_SCHEDULER_OBSERVER */ + + //! Indicates if there is an oversubscribing worker created to service enqueued tasks. + bool my_mandatory_concurrency; + +#if __TBB_TASK_ARENA + //! exit notifications after arena slot is released + concurrent_monitor my_exit_monitors; +#endif + +#if TBB_USE_ASSERT + //! Used to trap accesses to the object after its destruction. + uintptr_t my_guard; +#endif /* TBB_USE_ASSERT */ +}; // struct arena_base + +class arena +#if (__GNUC__<4 || __GNUC__==4 && __GNUC_MINOR__==0) && !__INTEL_COMPILER + : public padded<arena_base> +#else + : private padded<arena_base> +#endif +{ +private: + friend class generic_scheduler; + template<typename SchedulerTraits> friend class custom_scheduler; + friend class governor; + friend class task_scheduler_observer_v3; + friend class market; + friend class tbb::task_group_context; + friend class allocate_root_with_context_proxy; + friend class intrusive_list<arena>; +#if __TBB_TASK_ARENA + friend class tbb::interface6::task_arena; // included through in scheduler_common.h + friend class interface6::delegated_task; + friend class interface6::wait_task; + friend struct interface6::wait_body; +#endif //__TBB_TASK_ARENA + + typedef padded<arena_base> base_type; + + //! Constructor + arena ( market&, unsigned max_num_workers ); + + //! Allocate an instance of arena. + static arena& allocate_arena( market&, unsigned max_num_workers ); + + static int unsigned num_slots_to_reserve ( unsigned max_num_workers ) { + return max(2u, max_num_workers + 1); + } + + static int allocation_size ( unsigned max_num_workers ) { + return sizeof(base_type) + num_slots_to_reserve(max_num_workers) * (sizeof(mail_outbox) + sizeof(arena_slot)); + } + +#if __TBB_TASK_GROUP_CONTEXT + //! Finds all contexts affected by the state change and propagates the new state to them. + /** The propagation is relayed to the market because tasks created by one + master thread can be passed to and executed by other masters. This means + that context trees can span several arenas at once and thus state change + propagation cannot be generally localized to one arena only. **/ + template <typename T> + bool propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + //! Get reference to mailbox corresponding to given affinity_id. + mail_outbox& mailbox( affinity_id id ) { + __TBB_ASSERT( 0<id, "affinity id must be positive integer" ); + __TBB_ASSERT( id <= my_num_slots, "affinity id out of bounds" ); + + return ((mail_outbox*)this)[-(int)id]; + } + + //! Completes arena shutdown, destructs and deallocates it. + void free_arena (); + + typedef uintptr_t pool_state_t; + + //! No tasks to steal since last snapshot was taken + static const pool_state_t SNAPSHOT_EMPTY = 0; + + //! At least one task has been offered for stealing since the last snapshot started + static const pool_state_t SNAPSHOT_FULL = pool_state_t(-1); + + //! No tasks to steal or snapshot is being taken. + static bool is_busy_or_empty( pool_state_t s ) { return s < SNAPSHOT_FULL; } + + //! The number of workers active in the arena. + unsigned num_workers_active( ) { + return my_references >> 1; + } + + //! If necessary, raise a flag that there is new job in arena. + template<bool Spawned> void advertise_new_work(); + + //! Check if there is job anywhere in arena. + /** Return true if no job or if arena is being cleaned up. */ + bool is_out_of_work(); + + //! enqueue a task into starvation-resistance queue + void enqueue_task( task&, intptr_t, unsigned & ); + + //! Registers the worker with the arena and enters TBB scheduler dispatch loop + void process( generic_scheduler& ); + + //! Notification that worker or master leaves its arena + template<bool is_master> + inline void on_thread_leaving ( ); + +#if __TBB_STATISTICS + //! Outputs internal statistics accumulated by the arena + void dump_arena_statistics (); +#endif /* __TBB_STATISTICS */ + +#if __TBB_TASK_PRIORITY + //! Check if recent priority changes may bring some tasks to the current priority level soon + /** /param tasks_present indicates presence of tasks at any priority level. **/ + inline bool may_have_tasks ( generic_scheduler*, arena_slot&, bool& tasks_present, bool& dequeuing_possible ); +#endif /* __TBB_TASK_PRIORITY */ + +#if __TBB_COUNT_TASK_NODES + //! Returns the number of task objects "living" in worker threads + intptr_t workers_task_node_count(); +#endif + + /** Must be the last data field */ + arena_slot my_slots[1]; +}; // class arena + +} // namespace internal +} // namespace tbb + +#include "market.h" +#include "scheduler_common.h" +#include "governor.h" + +namespace tbb { +namespace internal { + +template<bool is_master> +inline void arena::on_thread_leaving ( ) { + // + // Implementation of arena destruction synchronization logic contained various + // bugs/flaws at the different stages of its evolution, so below is a detailed + // description of the issues taken into consideration in the framework of the + // current design. + // + // In case of using fire-and-forget tasks (scheduled via task::enqueue()) + // master thread is allowed to leave its arena before all its work is executed, + // and market may temporarily revoke all workers from this arena. Since revoked + // workers never attempt to reset arena state to EMPTY and cancel its request + // to RML for threads, the arena object is destroyed only when both the last + // thread is leaving it and arena's state is EMPTY (that is its master thread + // left and it does not contain any work). + // + // A worker that checks for work presence and transitions arena to the EMPTY + // state (in snapshot taking procedure arena::is_out_of_work()) updates + // arena::my_pool_state first and only then arena::my_num_workers_requested. + // So the check for work absence must be done against the latter field. + // + // In a time window between decrementing the active threads count and checking + // if there is an outstanding request for workers. New worker thread may arrive, + // finish remaining work, set arena state to empty, and leave decrementing its + // refcount and destroying. Then the current thread will destroy the arena + // the second time. To preclude it a local copy of the outstanding request + // value can be stored before decrementing active threads count. + // + // But this technique may cause two other problem. When the stored request is + // zero, it is possible that arena still has threads and they can generate new + // tasks and thus re-establish non-zero requests. Then all the threads can be + // revoked (as described above) leaving this thread the last one, and causing + // it to destroy non-empty arena. + // + // The other problem takes place when the stored request is non-zero. Another + // thread may complete the work, set arena state to empty, and leave without + // arena destruction before this thread decrements the refcount. This thread + // cannot destroy the arena either. Thus the arena may be "orphaned". + // + // In both cases we cannot dereference arena pointer after the refcount is + // decremented, as our arena may already be destroyed. + // + // If this is the master thread, market can be concurrently destroyed. + // In case of workers market's liveness is ensured by the RML connection + // rundown protocol, according to which the client (i.e. the market) lives + // until RML server notifies it about connection termination, and this + // notification is fired only after all workers return into RML. + // + // Thus if we decremented refcount to zero we ask the market to check arena + // state (including the fact if it is alive) under the lock. + // + uintptr_t aba_epoch = my_aba_epoch; + market* m = my_market; + __TBB_ASSERT(my_references > int(!is_master), "broken arena reference counter"); + if ( (my_references -= is_master? 1:2 ) == 0 ) // worker's counter starts from bit 1 + market::try_destroy_arena( m, this, aba_epoch, is_master ); +} + +template<bool Spawned> void arena::advertise_new_work() { + if( !Spawned ) { // i.e. the work was enqueued + if( my_max_num_workers==0 ) { + my_max_num_workers = 1; + __TBB_ASSERT(!my_mandatory_concurrency, ""); + my_mandatory_concurrency = true; + __TBB_ASSERT(!num_workers_active(), ""); + my_pool_state = SNAPSHOT_FULL; + my_market->adjust_demand( *this, 1 ); + return; + } + // Local memory fence is required to avoid missed wakeups; see the comment below. + // Starvation resistant tasks require mandatory concurrency, so missed wakeups are unacceptable. + atomic_fence(); + } + // Double-check idiom that, in case of spawning, is deliberately sloppy about memory fences. + // Technically, to avoid missed wakeups, there should be a full memory fence between the point we + // released the task pool (i.e. spawned task) and read the arena's state. However, adding such a + // fence might hurt overall performance more than it helps, because the fence would be executed + // on every task pool release, even when stealing does not occur. Since TBB allows parallelism, + // but never promises parallelism, the missed wakeup is not a correctness problem. + pool_state_t snapshot = my_pool_state; + if( is_busy_or_empty(snapshot) ) { + // Attempt to mark as full. The compare_and_swap below is a little unusual because the + // result is compared to a value that can be different than the comparand argument. + if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, snapshot )==SNAPSHOT_EMPTY ) { + if( snapshot!=SNAPSHOT_EMPTY ) { + // This thread read "busy" into snapshot, and then another thread transitioned + // my_pool_state to "empty" in the meantime, which caused the compare_and_swap above + // to fail. Attempt to transition my_pool_state from "empty" to "full". + if( my_pool_state.compare_and_swap( SNAPSHOT_FULL, SNAPSHOT_EMPTY )!=SNAPSHOT_EMPTY ) { + // Some other thread transitioned my_pool_state from "empty", and hence became + // responsible for waking up workers. + return; + } + } + // This thread transitioned pool from empty to full state, and thus is responsible for + // telling RML that there is work to do. + if( Spawned ) { + if( my_mandatory_concurrency ) { + __TBB_ASSERT(my_max_num_workers==1, ""); + __TBB_ASSERT(!governor::local_scheduler()->is_worker(), ""); + // There was deliberate oversubscription on 1 core for sake of starvation-resistant tasks. + // Now a single active thread (must be the master) supposedly starts a new parallel region + // with relaxed sequential semantics, and oversubscription should be avoided. + // Demand for workers has been decreased to 0 during SNAPSHOT_EMPTY, so just keep it. + my_max_num_workers = 0; + my_mandatory_concurrency = false; + return; + } + } + my_market->adjust_demand( *this, my_max_num_workers ); + } + } +} + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_arena_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/cache_aligned_allocator.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/cache_aligned_allocator.cpp new file mode 100644 index 0000000000..11a1e4f2a6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/cache_aligned_allocator.cpp @@ -0,0 +1,264 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/tbb_allocator.h" +#include "tbb/tbb_exception.h" +#include "tbb_misc.h" +#include "dynamic_link.h" +#include <cstdlib> + +#if _WIN32||_WIN64 +#include "tbb/machine/windows_api.h" +#else +#include <dlfcn.h> +#endif /* _WIN32||_WIN64 */ + +using namespace std; + +#if __TBB_WEAK_SYMBOLS_PRESENT + +#pragma weak scalable_malloc +#pragma weak scalable_free +#pragma weak scalable_aligned_malloc +#pragma weak scalable_aligned_free + +extern "C" { + void* scalable_malloc( size_t ); + void scalable_free( void* ); + void* scalable_aligned_malloc( size_t, size_t ); + void scalable_aligned_free( void* ); +} + +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + +namespace tbb { + +namespace internal { + +//! Dummy routine used for first indirect call via MallocHandler. +static void* DummyMalloc( size_t size ); + +//! Dummy routine used for first indirect call via FreeHandler. +static void DummyFree( void * ptr ); + +//! Handler for memory allocation +static void* (*MallocHandler)( size_t size ) = &DummyMalloc; + +//! Handler for memory deallocation +static void (*FreeHandler)( void* pointer ) = &DummyFree; + +//! Dummy routine used for first indirect call via padded_allocate_handler. +static void* dummy_padded_allocate( size_t bytes, size_t alignment ); + +//! Dummy routine used for first indirect call via padded_free_handler. +static void dummy_padded_free( void * ptr ); + +// ! Allocates memory using standard malloc. It is used when scalable_allocator is not available +static void* padded_allocate( size_t bytes, size_t alignment ); + +// ! Allocates memory using standard free. It is used when scalable_allocator is not available +static void padded_free( void* p ); + +//! Handler for padded memory allocation +static void* (*padded_allocate_handler)( size_t bytes, size_t alignment ) = &dummy_padded_allocate; + +//! Handler for padded memory deallocation +static void (*padded_free_handler)( void* p ) = &dummy_padded_free; + +//! Table describing how to link the handlers. +static const dynamic_link_descriptor MallocLinkTable[] = { + DLD(scalable_malloc, MallocHandler), + DLD(scalable_free, FreeHandler), + DLD(scalable_aligned_malloc, padded_allocate_handler), + DLD(scalable_aligned_free, padded_free_handler), +}; + + +#if TBB_USE_DEBUG +#define DEBUG_SUFFIX "_debug" +#else +#define DEBUG_SUFFIX +#endif /* TBB_USE_DEBUG */ + +// MALLOCLIB_NAME is the name of the TBB memory allocator library. +#if _WIN32||_WIN64 +#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" +#elif __APPLE__ +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib" +#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" +#elif __linux__ // Note that order of these #elif's is important! +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) +#else +#error Unknown OS +#endif + +//! Initialize the allocation/free handler pointers. +/** Caller is responsible for ensuring this routine is called exactly once. + The routine attempts to dynamically link with the TBB memory allocator. + If that allocator is not found, it links to malloc and free. */ +void initialize_handler_pointers() { + __TBB_ASSERT( MallocHandler==&DummyMalloc, NULL ); + bool success = dynamic_link( MALLOCLIB_NAME, MallocLinkTable, 4 ); + if( !success ) { + // If unsuccessful, set the handlers to the default routines. + // This must be done now, and not before FillDynamicLinks runs, because if other + // threads call the handlers, we want them to go through the DoOneTimeInitializations logic, + // which forces them to wait. + FreeHandler = &free; + MallocHandler = &malloc; + padded_allocate_handler = &padded_allocate; + padded_free_handler = &padded_free; + } +#if !__TBB_RML_STATIC + PrintExtraVersionInfo( "ALLOCATOR", success?"scalable_malloc":"malloc" ); +#endif +} + +static tbb::atomic<do_once_state> initialization_state; +void initialize_cache_aligned_allocator() { + atomic_do_once( &initialize_handler_pointers, initialization_state ); +} + +//! Executed on very first call through MallocHandler +static void* DummyMalloc( size_t size ) { + initialize_cache_aligned_allocator(); + __TBB_ASSERT( MallocHandler!=&DummyMalloc, NULL ); + return (*MallocHandler)( size ); +} + +//! Executed on very first call throught FreeHandler +static void DummyFree( void * ptr ) { + initialize_cache_aligned_allocator(); + __TBB_ASSERT( FreeHandler!=&DummyFree, NULL ); + (*FreeHandler)( ptr ); +} + +//! Executed on very first call through padded_allocate_handler +static void* dummy_padded_allocate( size_t bytes, size_t alignment ) { + initialize_cache_aligned_allocator(); + __TBB_ASSERT( padded_allocate_handler!=&dummy_padded_allocate, NULL ); + return (*padded_allocate_handler)(bytes, alignment); +} + +//! Executed on very first call throught padded_free_handler +static void dummy_padded_free( void * ptr ) { + initialize_cache_aligned_allocator(); + __TBB_ASSERT( padded_free_handler!=&dummy_padded_free, NULL ); + (*padded_free_handler)( ptr ); +} + +static size_t NFS_LineSize = 128; + +size_t NFS_GetLineSize() { + return NFS_LineSize; +} + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // unary minus operator applied to unsigned type, result still unsigned + #pragma warning( disable: 4146 4706 ) +#endif + +void* NFS_Allocate( size_t n, size_t element_size, void* /*hint*/ ) { + size_t m = NFS_LineSize; + __TBB_ASSERT( m<=NFS_MaxLineSize, "illegal value for NFS_LineSize" ); + __TBB_ASSERT( (m & (m-1))==0, "must be power of two" ); + size_t bytes = n*element_size; + + if (bytes<n || bytes+m<bytes) { + // Overflow + throw_exception(eid_bad_alloc); + } + // scalable_aligned_malloc considers zero size request an error, and returns NULL + if (bytes==0) bytes = 1; + + void* result = (*padded_allocate_handler)( bytes, m ); + if (!result) + throw_exception(eid_bad_alloc); + + __TBB_ASSERT( ((size_t)result&(m-1)) == 0, "The address returned isn't aligned to cache line size" ); + return result; +} + +void NFS_Free( void* p ) { + (*padded_free_handler)( p ); +} + +static void* padded_allocate( size_t bytes, size_t alignment ) { + unsigned char* result = NULL; + unsigned char* base = (unsigned char*)malloc(alignment+bytes); + if( base ) { + // Round up to the next line + result = (unsigned char*)((uintptr_t)(base+alignment)&-alignment); + // Record where block actually starts. + ((uintptr_t*)result)[-1] = uintptr_t(base); + } + return result; +} + +static void padded_free( void* p ) { + if( p ) { + __TBB_ASSERT( (uintptr_t)p>=0x4096, "attempt to free block not obtained from cache_aligned_allocator" ); + // Recover where block actually starts + unsigned char* base = ((unsigned char**)p)[-1]; + __TBB_ASSERT( (void*)((uintptr_t)(base+NFS_LineSize)&-NFS_LineSize)==p, "not allocated by NFS_Allocate?" ); + free(base); + } +} + +void* __TBB_EXPORTED_FUNC allocate_via_handler_v3( size_t n ) { + void* result = (*MallocHandler) (n); + if (!result) { + throw_exception(eid_bad_alloc); + } + return result; +} + +void __TBB_EXPORTED_FUNC deallocate_via_handler_v3( void *p ) { + if( p ) { + (*FreeHandler)( p ); + } +} + +bool __TBB_EXPORTED_FUNC is_malloc_used_v3() { + if (MallocHandler == &DummyMalloc) { + void* void_ptr = (*MallocHandler)(1); + (*FreeHandler)(void_ptr); + } + __TBB_ASSERT( MallocHandler!=&DummyMalloc && FreeHandler!=&DummyFree, NULL ); + // Cast to void avoids type mismatch errors on some compilers (e.g. __IBMCPP__) + __TBB_ASSERT( !(((void*)MallocHandler==(void*)&malloc) ^ ((void*)FreeHandler==(void*)&free)), + "Both shim pointers must refer to routines from the same package (either TBB or CRT)" ); + return (void*)MallocHandler == (void*)&malloc; +} + +} // namespace internal + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/cilk-tbb-interop.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/cilk-tbb-interop.h new file mode 100644 index 0000000000..9cd1a21087 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/cilk-tbb-interop.h @@ -0,0 +1,122 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/* The API to enable interoperability between Intel(R) Cilk(tm) Plus and TBB. */ + +#ifndef CILK_TBB_INTEROP_H +#define CILK_TBB_INTEROP_H + +#ifndef _WIN32 +#ifdef IN_CILK_RUNTIME +#define CILK_EXPORT __attribute__((visibility("protected"))) +#else +#define CILK_EXPORT /* nothing */ +#endif +#else +#ifdef IN_CILK_RUNTIME +#define CILK_EXPORT __declspec(dllexport) +#else +#define CILK_EXPORT __declspec(dllimport) +#endif // IN_CILK_RUNTIME +#endif // _WIN32 + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* A return code. 0 indicates success */ +typedef int __cilk_tbb_retcode; + +enum __cilk_tbb_stack_op { + CILK_TBB_STACK_ORPHAN, // disconnecting stack from a thread + CILK_TBB_STACK_ADOPT, // reconnecting orphaned stack to a trhead + CILK_TBB_STACK_RELEASE // releasing stack +}; + +typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_stack_op)(enum __cilk_tbb_stack_op, void* data); + +typedef __cilk_tbb_retcode (*__cilk_tbb_pfn_unwatch_stacks)(void *data); + +/* Each thunk structure has two pointers: "routine" and "data". + The caller of the thunk invokes *routine, passing "data" as the void* parameter. */ + +/* Thunk invoked by Intel Cilk Plus runtime (cilkrts) when it changes the relationship + between a stack and a thread. It does not matter what stack the thunk runs on. + The thread (not fiber) on which the thunk runs is important. + + CILK_TBB_STACK_ORPHAN + The thunk must be invoked on the thread disconnecting itself from the stack. + Must "happen before" the stack is adopted elsewhere. + CILK_TBB_STACK_ADOPT + The thunk must be invoked on the thread adopting the stack. + CILK_TBB_STACK_RELEASE + The thunk must be invoked on the thread doing the releasing, + Must "happen before" the stack is used elsewhere. + + When a non-empty stack is transfered between threads, the first thread must orphan it + and the second thread must adopt it. + + An empty stack can be transfered similarly, or simply released by the first thread. + + Here is a summary of the actions as transitions on a state machine. + + watch ORPHAN + -->--> -->-- + / \ / \ + (freed empty stack) (TBB sees stack running on thread) (stack in limbo) + | \ / \ / | + | --<-- --<-- | + ^ RELEASE or ADOPT V + \ unwatch / + \ / + --------------------------<--------------------------- + RELEASE +*/ +struct __cilk_tbb_stack_op_thunk { + __cilk_tbb_pfn_stack_op routine; + void* data; /* Set by TBB */ +}; + +/* Thunk invoked by TBB when it is no longer interested in watching the stack bound to the current thread. */ +struct __cilk_tbb_unwatch_thunk { + __cilk_tbb_pfn_unwatch_stacks routine; + void* data; +}; + +/* Defined by cilkrts, called by TBB. + Requests that cilkrts invoke __cilk_tbb_stack_op_thunk when it orphans a stack. + cilkrts sets *u to a thunk that TBB should call when it is no longer interested in watching the stack. */ +CILK_EXPORT +__cilk_tbb_retcode __cilkrts_watch_stack(struct __cilk_tbb_unwatch_thunk* u, + struct __cilk_tbb_stack_op_thunk o); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif // CILK_TBB_INTEROP_H diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_hash_map.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_hash_map.cpp new file mode 100644 index 0000000000..9431afd9ed --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_hash_map.cpp @@ -0,0 +1,66 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/concurrent_hash_map.h" + +namespace tbb { + +namespace internal { +#if !TBB_NO_LEGACY +struct hash_map_segment_base { + typedef spin_rw_mutex segment_mutex_t; + //! Type of a hash code. + typedef size_t hashcode_t; + //! Log2 of n_segment + static const size_t n_segment_bits = 6; + //! Maximum size of array of chains + static const size_t max_physical_size = size_t(1)<<(8*sizeof(hashcode_t)-n_segment_bits); + //! Mutex that protects this segment + segment_mutex_t my_mutex; + // Number of nodes + atomic<size_t> my_logical_size; + // Size of chains + /** Always zero or a power of two */ + size_t my_physical_size; + //! True if my_logical_size>=my_physical_size. + /** Used to support Intel(R) Thread Checker. */ + bool __TBB_EXPORTED_METHOD internal_grow_predicate() const; +}; + +bool hash_map_segment_base::internal_grow_predicate() const { + // Intel(R) Thread Checker considers the following reads to be races, so we hide them in the + // library so that Intel(R) Thread Checker will ignore them. The reads are used in a double-check + // context, so the program is nonetheless correct despite the race. + return my_logical_size >= my_physical_size && my_physical_size < max_physical_size; +} +#endif//!TBB_NO_LEGACY + +} // namespace internal + +} // namespace tbb + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.cpp new file mode 100644 index 0000000000..89648818ef --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.cpp @@ -0,0 +1,145 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "concurrent_monitor.h" + +namespace tbb { +namespace internal { + +void concurrent_monitor::thread_context::init() { + new (sema.begin()) binary_semaphore; + ready = true; +} + +concurrent_monitor::~concurrent_monitor() { + abort_all(); + __TBB_ASSERT( waitset_ec.empty(), "waitset not empty?" ); +} + +void concurrent_monitor::prepare_wait( thread_context& thr, uintptr_t ctx ) { + if( !thr.ready ) + thr.init(); + // this is good place to pump previous spurious wakeup + else if( thr.spurious ) { + thr.spurious = false; + thr.semaphore().P(); + } + thr.context = ctx; + thr.in_waitset = true; + { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + __TBB_store_relaxed( thr.epoch, __TBB_load_relaxed(epoch) ); + waitset_ec.add( (waitset_t::node_t*)&thr ); + } + atomic_fence(); +} + +void concurrent_monitor::cancel_wait( thread_context& thr ) { + // spurious wakeup will be pumped in the following prepare_wait() + thr.spurious = true; + // try to remove node from waitset + bool th_in_waitset = thr.in_waitset; + if( th_in_waitset ) { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + if (thr.in_waitset) { + // successfully removed from waitset, + // so there will be no spurious wakeup + thr.in_waitset = false; + thr.spurious = false; + waitset_ec.remove( (waitset_t::node_t&)thr ); + } + } +} + +void concurrent_monitor::notify_one_relaxed() { + if( waitset_ec.empty() ) + return; + waitset_node_t* n; + const waitset_node_t* end = waitset_ec.end(); + { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); + n = waitset_ec.front(); + if( n!=end ) { + waitset_ec.remove( *n ); + to_thread_context(n)->in_waitset = false; + } + } + if( n!=end ) + to_thread_context(n)->semaphore().V(); +} + +void concurrent_monitor::notify_all_relaxed() { + if( waitset_ec.empty() ) + return; + dllist_t temp; + const waitset_node_t* end; + { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); + waitset_ec.flush_to( temp ); + end = temp.end(); + for( waitset_node_t* n=temp.front(); n!=end; n=n->next ) + to_thread_context(n)->in_waitset = false; + } + waitset_node_t* nxt; + for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { + nxt = n->next; + to_thread_context(n)->semaphore().V(); + } +#if TBB_USE_ASSERT + temp.clear(); +#endif +} + +void concurrent_monitor::abort_all_relaxed() { + if( waitset_ec.empty() ) + return; + dllist_t temp; + const waitset_node_t* end; + { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + __TBB_store_relaxed( epoch, __TBB_load_relaxed(epoch) + 1 ); + waitset_ec.flush_to( temp ); + end = temp.end(); + for( waitset_node_t* n=temp.front(); n!=end; n=n->next ) + to_thread_context(n)->in_waitset = false; + } + waitset_node_t* nxt; + for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { + nxt = n->next; + to_thread_context(n)->aborted = true; + to_thread_context(n)->semaphore().V(); + } +#if TBB_USE_ASSERT + temp.clear(); +#endif +} + +} // namespace internal +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.h new file mode 100644 index 0000000000..3d0ac55656 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_monitor.h @@ -0,0 +1,249 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_concurrent_monitor_H +#define __TBB_concurrent_monitor_H + +#include "tbb/tbb_stddef.h" +#include "tbb/atomic.h" +#include "tbb/spin_mutex.h" +#include "tbb/tbb_exception.h" +#include "tbb/aligned_space.h" + +#include "semaphore.h" + +namespace tbb { +namespace internal { + +//! Circular doubly-linked list with sentinel +/** head.next points to the front and head.prev points to the back */ +class circular_doubly_linked_list_with_sentinel : no_copy { +public: + struct node_t { + node_t* next; + node_t* prev; + explicit node_t() : next((node_t*)(uintptr_t)0xcdcdcdcd), prev((node_t*)(uintptr_t)0xcdcdcdcd) {} + }; + + // ctor + circular_doubly_linked_list_with_sentinel() {clear();} + // dtor + ~circular_doubly_linked_list_with_sentinel() {__TBB_ASSERT( head.next==&head && head.prev==&head, "the list is not empty" );} + + inline size_t size() const {return count;} + inline bool empty() const {return size()==0;} + inline node_t* front() const {return head.next;} + inline node_t* last() const {return head.prev;} + inline node_t* begin() const {return front();} + inline const node_t* end() const {return &head;} + + //! add to the back of the list + inline void add( node_t* n ) { + __TBB_store_relaxed(count, __TBB_load_relaxed(count) + 1); + n->prev = head.prev; + n->next = &head; + head.prev->next = n; + head.prev = n; + } + + //! remove node 'n' + inline void remove( node_t& n ) { + __TBB_store_relaxed(count, __TBB_load_relaxed(count) - 1); + n.prev->next = n.next; + n.next->prev = n.prev; + } + + //! move all elements to 'lst' and initialize the 'this' list + inline void flush_to( circular_doubly_linked_list_with_sentinel& lst ) { + if( const size_t l_count = __TBB_load_relaxed(count) ) { + __TBB_store_relaxed(lst.count, l_count); + lst.head.next = head.next; + lst.head.prev = head.prev; + head.next->prev = &lst.head; + head.prev->next = &lst.head; + clear(); + } + } + + void clear() {head.next = head.prev = &head; __TBB_store_relaxed(count, 0);} +private: + __TBB_atomic size_t count; + node_t head; +}; + +typedef circular_doubly_linked_list_with_sentinel waitset_t; +typedef circular_doubly_linked_list_with_sentinel dllist_t; +typedef circular_doubly_linked_list_with_sentinel::node_t waitset_node_t; + +//! concurrent_monitor +/** fine-grained concurrent_monitor implementation */ +class concurrent_monitor : no_copy { +public: + /** per-thread descriptor for concurrent_monitor */ + class thread_context : waitset_node_t, no_copy { + friend class concurrent_monitor; + public: + thread_context() : spurious(false), aborted(false), ready(false), context(0) { + epoch = 0; + in_waitset = false; + } + ~thread_context() { + if (ready) { + if( spurious ) semaphore().P(); + semaphore().~binary_semaphore(); + } + } + binary_semaphore& semaphore() { return *sema.begin(); } + private: + //! The method for lazy initialization of the thread_context's semaphore. + // Inlining of the method is undesirable, due to extra instructions for + // exception support added at caller side. + __TBB_NOINLINE( void init() ); + tbb::aligned_space<binary_semaphore, 1> sema; + __TBB_atomic unsigned epoch; + tbb::atomic<bool> in_waitset; + bool spurious; + bool aborted; + bool ready; + uintptr_t context; + }; + + //! ctor + concurrent_monitor() {__TBB_store_relaxed(epoch, 0);} + + //! dtor + ~concurrent_monitor() ; + + //! prepare wait by inserting 'thr' into the wailt queue + void prepare_wait( thread_context& thr, uintptr_t ctx = 0 ); + + //! Commit wait if event count has not changed; otherwise, cancel wait. + /** Returns true if committed, false if canceled. */ + inline bool commit_wait( thread_context& thr ) { + const bool do_it = thr.epoch == __TBB_load_relaxed(epoch); + // this check is just an optimization + if( do_it ) { + __TBB_ASSERT( thr.ready, "use of commit_wait() without prior prepare_wait()"); + thr.semaphore().P(); + __TBB_ASSERT( !thr.in_waitset, "still in the queue?" ); + if( thr.aborted ) + throw_exception( eid_user_abort ); + } else { + cancel_wait( thr ); + } + return do_it; + } + //! Cancel the wait. Removes the thread from the wait queue if not removed yet. + void cancel_wait( thread_context& thr ); + + //! Wait for a condition to be satisfied with waiting-on context + template<typename WaitUntil, typename Context> + void wait( WaitUntil until, Context on ); + + //! Notify one thread about the event + void notify_one() {atomic_fence(); notify_one_relaxed();} + + //! Notify one thread about the event. Relaxed version. + void notify_one_relaxed(); + + //! Notify all waiting threads of the event + void notify_all() {atomic_fence(); notify_all_relaxed();} + + //! Notify all waiting threads of the event; Relaxed version + void notify_all_relaxed(); + + //! Notify waiting threads of the event that satisfies the given predicate + template<typename P> void notify( const P& predicate ) {atomic_fence(); notify_relaxed( predicate );} + + //! Notify waiting threads of the event that satisfies the given predicate; Relaxed version + template<typename P> void notify_relaxed( const P& predicate ); + + //! Abort any sleeping threads at the time of the call + void abort_all() {atomic_fence(); abort_all_relaxed(); } + + //! Abort any sleeping threads at the time of the call; Relaxed version + void abort_all_relaxed(); + +private: + tbb::spin_mutex mutex_ec; + waitset_t waitset_ec; + __TBB_atomic unsigned epoch; + thread_context* to_thread_context( waitset_node_t* n ) { return static_cast<thread_context*>(n); } +}; + +template<typename WaitUntil, typename Context> +void concurrent_monitor::wait( WaitUntil until, Context on ) +{ + bool slept = false; + thread_context thr_ctx; + prepare_wait( thr_ctx, on() ); + while( !until() ) { + if( (slept = commit_wait( thr_ctx ) )==true ) + if( until() ) break; + slept = false; + prepare_wait( thr_ctx, on() ); + } + if( !slept ) + cancel_wait( thr_ctx ); +} + +template<typename P> +void concurrent_monitor::notify_relaxed( const P& predicate ) { + if( waitset_ec.empty() ) + return; + dllist_t temp; + waitset_node_t* nxt; + const waitset_node_t* end = waitset_ec.end(); + { + tbb::spin_mutex::scoped_lock l( mutex_ec ); + __TBB_store_relaxed(epoch, __TBB_load_relaxed(epoch) + 1); + for( waitset_node_t* n=waitset_ec.last(); n!=end; n=nxt ) { + nxt = n->prev; + thread_context* thr = to_thread_context( n ); + if( predicate( thr->context ) ) { + waitset_ec.remove( *n ); + thr->in_waitset = false; + temp.add( n ); + } + } + } + + end = temp.end(); + for( waitset_node_t* n=temp.front(); n!=end; n=nxt ) { + nxt = n->next; + to_thread_context(n)->semaphore().V(); + } +#if TBB_USE_ASSERT + temp.clear(); +#endif +} + +} // namespace internal +} // namespace tbb + +#endif /* __TBB_concurrent_monitor_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_queue.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_queue.cpp new file mode 100644 index 0000000000..6c7750b57a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_queue.cpp @@ -0,0 +1,639 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_stddef.h" +#include "tbb/tbb_machine.h" +#include "tbb/tbb_exception.h" +// Define required to satisfy test in internal file. +#define __TBB_concurrent_queue_H +#include "tbb/internal/_concurrent_queue_impl.h" +#include "concurrent_monitor.h" +#include "itt_notify.h" +#include <new> + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include <cstring> // for memset() + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +using namespace std; + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4267) +#endif + +#define RECORD_EVENTS 0 + + +namespace tbb { + +namespace internal { + +typedef concurrent_queue_base_v3 concurrent_queue_base; + +typedef size_t ticket; + +//! A queue using simple locking. +/** For efficiency, this class has no constructor. + The caller is expected to zero-initialize it. */ +struct micro_queue { + typedef concurrent_queue_base::page page; + + friend class micro_queue_pop_finalizer; + + atomic<page*> head_page; + atomic<ticket> head_counter; + + atomic<page*> tail_page; + atomic<ticket> tail_counter; + + spin_mutex page_mutex; + + void push( const void* item, ticket k, concurrent_queue_base& base ); + void abort_push( ticket k, concurrent_queue_base& base ); + + bool pop( void* dst, ticket k, concurrent_queue_base& base ); + + micro_queue& assign( const micro_queue& src, concurrent_queue_base& base ); + + page* make_copy ( concurrent_queue_base& base, const page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) ; + + void make_invalid( ticket k ); +}; + +// we need to yank it out of micro_queue because of concurrent_queue_base::deallocate_page being virtual. +class micro_queue_pop_finalizer: no_copy { + typedef concurrent_queue_base::page page; + ticket my_ticket; + micro_queue& my_queue; + page* my_page; + concurrent_queue_base &base; +public: + micro_queue_pop_finalizer( micro_queue& queue, concurrent_queue_base& b, ticket k, page* p ) : + my_ticket(k), my_queue(queue), my_page(p), base(b) + {} + ~micro_queue_pop_finalizer() { + page* p = my_page; + if( p ) { + spin_mutex::scoped_lock lock( my_queue.page_mutex ); + page* q = p->next; + my_queue.head_page = q; + if( !q ) { + my_queue.tail_page = NULL; + } + } + my_queue.head_counter = my_ticket; + if( p ) + base.deallocate_page( p ); + } +}; + +struct predicate_leq { + ticket t; + predicate_leq( ticket t_ ) : t(t_) {} + bool operator() ( uintptr_t p ) const {return (ticket)p<=t;} +}; + +//! Internal representation of a ConcurrentQueue. +/** For efficiency, this class has no constructor. + The caller is expected to zero-initialize it. */ +class concurrent_queue_rep { +public: +private: + friend struct micro_queue; + + //! Approximately n_queue/golden ratio + static const size_t phi = 3; + +public: + //! Must be power of 2 + static const size_t n_queue = 8; + + //! Map ticket to an array index + static size_t index( ticket k ) { + return k*phi%n_queue; + } + + atomic<ticket> head_counter; + concurrent_monitor items_avail; + atomic<size_t> n_invalid_entries; + char pad1[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(concurrent_monitor)+sizeof(atomic<size_t>))&(NFS_MaxLineSize-1))]; + + atomic<ticket> tail_counter; + concurrent_monitor slots_avail; + char pad2[NFS_MaxLineSize-((sizeof(atomic<ticket>)+sizeof(concurrent_monitor))&(NFS_MaxLineSize-1))]; + micro_queue array[n_queue]; + + micro_queue& choose( ticket k ) { + // The formula here approximates LRU in a cache-oblivious way. + return array[index(k)]; + } + + //! Value for effective_capacity that denotes unbounded queue. + static const ptrdiff_t infinite_capacity = ptrdiff_t(~size_t(0)/2); +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // unary minus operator applied to unsigned type, result still unsigned + #pragma warning( push ) + #pragma warning( disable: 4146 ) +#endif + +static void* invalid_page; + +//------------------------------------------------------------------------ +// micro_queue +//------------------------------------------------------------------------ +void micro_queue::push( const void* item, ticket k, concurrent_queue_base& base ) { + k &= -concurrent_queue_rep::n_queue; + page* p = NULL; + // find index on page where we would put the data + size_t index = modulo_power_of_two( k/concurrent_queue_rep::n_queue, base.items_per_page ); + if( !index ) { // make a new page + __TBB_TRY { + p = base.allocate_page(); + } __TBB_CATCH(...) { + ++base.my_rep->n_invalid_entries; + make_invalid( k ); + } + p->mask = 0; + p->next = NULL; + } + + // wait for my turn + if( tail_counter!=k ) { + atomic_backoff backoff; + do { + backoff.pause(); + // no memory. throws an exception; assumes concurrent_queue_rep::n_queue>1 + if( tail_counter&0x1 ) { + ++base.my_rep->n_invalid_entries; + throw_exception( eid_bad_last_alloc ); + } + } while( tail_counter!=k ) ; + } + + if( p ) { // page is newly allocated; insert in micro_queue + spin_mutex::scoped_lock lock( page_mutex ); + if( page* q = tail_page ) + q->next = p; + else + head_page = p; + tail_page = p; + } + + if (item) { + p = tail_page; + ITT_NOTIFY( sync_acquired, p ); + __TBB_TRY { + base.copy_item( *p, index, item ); + } __TBB_CATCH(...) { + ++base.my_rep->n_invalid_entries; + tail_counter += concurrent_queue_rep::n_queue; + __TBB_RETHROW(); + } + ITT_NOTIFY( sync_releasing, p ); + // If no exception was thrown, mark item as present. + p->mask |= uintptr_t(1)<<index; + } + else // no item; this was called from abort_push + ++base.my_rep->n_invalid_entries; + + tail_counter += concurrent_queue_rep::n_queue; +} + + +void micro_queue::abort_push( ticket k, concurrent_queue_base& base ) { + push(NULL, k, base); +} + +bool micro_queue::pop( void* dst, ticket k, concurrent_queue_base& base ) { + k &= -concurrent_queue_rep::n_queue; + spin_wait_until_eq( head_counter, k ); + spin_wait_while_eq( tail_counter, k ); + page& p = *head_page; + __TBB_ASSERT( &p, NULL ); + size_t index = modulo_power_of_two( k/concurrent_queue_rep::n_queue, base.items_per_page ); + bool success = false; + { + micro_queue_pop_finalizer finalizer( *this, base, k+concurrent_queue_rep::n_queue, index==base.items_per_page-1 ? &p : NULL ); + if( p.mask & uintptr_t(1)<<index ) { + success = true; + ITT_NOTIFY( sync_acquired, dst ); + ITT_NOTIFY( sync_acquired, head_page ); + base.assign_and_destroy_item( dst, p, index ); + ITT_NOTIFY( sync_releasing, head_page ); + } else { + --base.my_rep->n_invalid_entries; + } + } + return success; +} + +micro_queue& micro_queue::assign( const micro_queue& src, concurrent_queue_base& base ) +{ + head_counter = src.head_counter; + tail_counter = src.tail_counter; + page_mutex = src.page_mutex; + + const page* srcp = src.head_page; + if( srcp ) { + ticket g_index = head_counter; + __TBB_TRY { + size_t n_items = (tail_counter-head_counter)/concurrent_queue_rep::n_queue; + size_t index = modulo_power_of_two( head_counter/concurrent_queue_rep::n_queue, base.items_per_page ); + size_t end_in_first_page = (index+n_items<base.items_per_page)?(index+n_items):base.items_per_page; + + head_page = make_copy( base, srcp, index, end_in_first_page, g_index ); + page* cur_page = head_page; + + if( srcp != src.tail_page ) { + for( srcp = srcp->next; srcp!=src.tail_page; srcp=srcp->next ) { + cur_page->next = make_copy( base, srcp, 0, base.items_per_page, g_index ); + cur_page = cur_page->next; + } + + __TBB_ASSERT( srcp==src.tail_page, NULL ); + + size_t last_index = modulo_power_of_two( tail_counter/concurrent_queue_rep::n_queue, base.items_per_page ); + if( last_index==0 ) last_index = base.items_per_page; + + cur_page->next = make_copy( base, srcp, 0, last_index, g_index ); + cur_page = cur_page->next; + } + tail_page = cur_page; + } __TBB_CATCH(...) { + make_invalid( g_index ); + } + } else { + head_page = tail_page = NULL; + } + return *this; +} + +concurrent_queue_base::page* micro_queue::make_copy( concurrent_queue_base& base, const concurrent_queue_base::page* src_page, size_t begin_in_page, size_t end_in_page, ticket& g_index ) +{ + page* new_page = base.allocate_page(); + new_page->next = NULL; + new_page->mask = src_page->mask; + for( ; begin_in_page!=end_in_page; ++begin_in_page, ++g_index ) + if( new_page->mask & uintptr_t(1)<<begin_in_page ) + base.copy_page_item( *new_page, begin_in_page, *src_page, begin_in_page ); + return new_page; +} + +void micro_queue::make_invalid( ticket k ) +{ + static concurrent_queue_base::page dummy = {static_cast<page*>((void*)1), 0}; + // mark it so that no more pushes are allowed. + invalid_page = &dummy; + { + spin_mutex::scoped_lock lock( page_mutex ); + tail_counter = k+concurrent_queue_rep::n_queue+1; + if( page* q = tail_page ) + q->next = static_cast<page*>(invalid_page); + else + head_page = static_cast<page*>(invalid_page); + tail_page = static_cast<page*>(invalid_page); + } + __TBB_RETHROW(); +} + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning( pop ) +#endif // warning 4146 is back + +//------------------------------------------------------------------------ +// concurrent_queue_base +//------------------------------------------------------------------------ +concurrent_queue_base_v3::concurrent_queue_base_v3( size_t item_sz ) { + items_per_page = item_sz<= 8 ? 32 : + item_sz<= 16 ? 16 : + item_sz<= 32 ? 8 : + item_sz<= 64 ? 4 : + item_sz<=128 ? 2 : + 1; + my_capacity = size_t(-1)/(item_sz>1 ? item_sz : 2); + my_rep = cache_aligned_allocator<concurrent_queue_rep>().allocate(1); + __TBB_ASSERT( (size_t)my_rep % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->head_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->tail_counter % NFS_GetLineSize()==0, "alignment error" ); + __TBB_ASSERT( (size_t)&my_rep->array % NFS_GetLineSize()==0, "alignment error" ); + memset(my_rep,0,sizeof(concurrent_queue_rep)); + new ( &my_rep->items_avail ) concurrent_monitor(); + new ( &my_rep->slots_avail ) concurrent_monitor(); + this->item_size = item_sz; +} + +concurrent_queue_base_v3::~concurrent_queue_base_v3() { + size_t nq = my_rep->n_queue; + for( size_t i=0; i<nq; i++ ) + __TBB_ASSERT( my_rep->array[i].tail_page==NULL, "pages were not freed properly" ); + cache_aligned_allocator<concurrent_queue_rep>().deallocate(my_rep,1); +} + +void concurrent_queue_base_v3::internal_push( const void* src ) { + concurrent_queue_rep& r = *my_rep; + ticket k = r.tail_counter++; + ptrdiff_t e = my_capacity; +#if DO_ITT_NOTIFY + bool sync_prepare_done = false; +#endif + if( (ptrdiff_t)(k-r.head_counter)>=e ) { // queue is full +#if DO_ITT_NOTIFY + if( !sync_prepare_done ) { + ITT_NOTIFY( sync_prepare, &sync_prepare_done ); + sync_prepare_done = true; + } +#endif + bool slept = false; + concurrent_monitor::thread_context thr_ctx; + r.slots_avail.prepare_wait( thr_ctx, ((ptrdiff_t)(k-e)) ); + while( (ptrdiff_t)(k-r.head_counter)>=const_cast<volatile ptrdiff_t&>(e = my_capacity) ) { + __TBB_TRY { + slept = r.slots_avail.commit_wait( thr_ctx ); + } __TBB_CATCH( tbb::user_abort& ) { + r.choose(k).abort_push(k, *this); + __TBB_RETHROW(); + } __TBB_CATCH(...) { + __TBB_RETHROW(); + } + if (slept == true) break; + r.slots_avail.prepare_wait( thr_ctx, ((ptrdiff_t)(k-e)) ); + } + if( !slept ) + r.slots_avail.cancel_wait( thr_ctx ); + } + ITT_NOTIFY( sync_acquired, &sync_prepare_done ); + __TBB_ASSERT( (ptrdiff_t)(k-r.head_counter)<my_capacity, NULL); + r.choose( k ).push( src, k, *this ); + r.items_avail.notify( predicate_leq(k) ); +} + +void concurrent_queue_base_v3::internal_pop( void* dst ) { + concurrent_queue_rep& r = *my_rep; + ticket k; +#if DO_ITT_NOTIFY + bool sync_prepare_done = false; +#endif + do { + k=r.head_counter++; + if ( (ptrdiff_t)(r.tail_counter-k)<=0 ) { // queue is empty +#if DO_ITT_NOTIFY + if( !sync_prepare_done ) { + ITT_NOTIFY( sync_prepare, dst ); + sync_prepare_done = true; + } +#endif + bool slept = false; + concurrent_monitor::thread_context thr_ctx; + r.items_avail.prepare_wait( thr_ctx, k ); + while( (ptrdiff_t)(r.tail_counter-k)<=0 ) { + __TBB_TRY { + slept = r.items_avail.commit_wait( thr_ctx ); + } __TBB_CATCH( tbb::user_abort& ) { + r.head_counter--; + __TBB_RETHROW(); + } __TBB_CATCH(...) { + __TBB_RETHROW(); + } + if (slept == true) break; + r.items_avail.prepare_wait( thr_ctx, k ); + } + if( !slept ) + r.items_avail.cancel_wait( thr_ctx ); + } + __TBB_ASSERT((ptrdiff_t)(r.tail_counter-k)>0, NULL); + } while( !r.choose(k).pop(dst,k,*this) ); + + // wake up a producer.. + r.slots_avail.notify( predicate_leq(k) ); +} + +void concurrent_queue_base_v3::internal_abort() { + concurrent_queue_rep& r = *my_rep; + r.items_avail.abort_all(); + r.slots_avail.abort_all(); +} + +bool concurrent_queue_base_v3::internal_pop_if_present( void* dst ) { + concurrent_queue_rep& r = *my_rep; + ticket k; + do { + k = r.head_counter; + for(;;) { + if( (ptrdiff_t)(r.tail_counter-k)<=0 ) { + // Queue is empty + return false; + } + // Queue had item with ticket k when we looked. Attempt to get that item. + ticket tk=k; + k = r.head_counter.compare_and_swap( tk+1, tk ); + if( k==tk ) + break; + // Another thread snatched the item, retry. + } + } while( !r.choose( k ).pop( dst, k, *this ) ); + + r.slots_avail.notify( predicate_leq(k) ); + + return true; +} + +bool concurrent_queue_base_v3::internal_push_if_not_full( const void* src ) { + concurrent_queue_rep& r = *my_rep; + ticket k = r.tail_counter; + for(;;) { + if( (ptrdiff_t)(k-r.head_counter)>=my_capacity ) { + // Queue is full + return false; + } + // Queue had empty slot with ticket k when we looked. Attempt to claim that slot. + ticket tk=k; + k = r.tail_counter.compare_and_swap( tk+1, tk ); + if( k==tk ) + break; + // Another thread claimed the slot, so retry. + } + r.choose(k).push(src,k,*this); + + r.items_avail.notify( predicate_leq(k) ); + return true; +} + +ptrdiff_t concurrent_queue_base_v3::internal_size() const { + __TBB_ASSERT( sizeof(ptrdiff_t)<=sizeof(size_t), NULL ); + return ptrdiff_t(my_rep->tail_counter-my_rep->head_counter-my_rep->n_invalid_entries); +} + +bool concurrent_queue_base_v3::internal_empty() const { + ticket tc = my_rep->tail_counter; + ticket hc = my_rep->head_counter; + // if tc!=r.tail_counter, the queue was not empty at some point between the two reads. + return ( tc==my_rep->tail_counter && ptrdiff_t(tc-hc-my_rep->n_invalid_entries)<=0 ); +} + +void concurrent_queue_base_v3::internal_set_capacity( ptrdiff_t capacity, size_t /*item_sz*/ ) { + my_capacity = capacity<0 ? concurrent_queue_rep::infinite_capacity : capacity; +} + +void concurrent_queue_base_v3::internal_finish_clear() { + size_t nq = my_rep->n_queue; + for( size_t i=0; i<nq; ++i ) { + page* tp = my_rep->array[i].tail_page; + __TBB_ASSERT( my_rep->array[i].head_page==tp, "at most one page should remain" ); + if( tp!=NULL) { + if( tp!=invalid_page ) deallocate_page( tp ); + my_rep->array[i].tail_page = NULL; + } + } +} + +void concurrent_queue_base_v3::internal_throw_exception() const { + throw_exception( eid_bad_alloc ); +} + +void concurrent_queue_base_v3::assign( const concurrent_queue_base& src ) { + items_per_page = src.items_per_page; + my_capacity = src.my_capacity; + + // copy concurrent_queue_rep. + my_rep->head_counter = src.my_rep->head_counter; + my_rep->tail_counter = src.my_rep->tail_counter; + my_rep->n_invalid_entries = src.my_rep->n_invalid_entries; + + // copy micro_queues + for( size_t i = 0; i<my_rep->n_queue; ++i ) + my_rep->array[i].assign( src.my_rep->array[i], *this); + + __TBB_ASSERT( my_rep->head_counter==src.my_rep->head_counter && my_rep->tail_counter==src.my_rep->tail_counter, + "the source concurrent queue should not be concurrently modified." ); +} + +//------------------------------------------------------------------------ +// concurrent_queue_iterator_rep +//------------------------------------------------------------------------ +class concurrent_queue_iterator_rep: no_assign { +public: + ticket head_counter; + const concurrent_queue_base& my_queue; + const size_t offset_of_last; + concurrent_queue_base::page* array[concurrent_queue_rep::n_queue]; + concurrent_queue_iterator_rep( const concurrent_queue_base& queue, size_t offset_of_last_ ) : + head_counter(queue.my_rep->head_counter), + my_queue(queue), + offset_of_last(offset_of_last_) + { + const concurrent_queue_rep& rep = *queue.my_rep; + for( size_t k=0; k<concurrent_queue_rep::n_queue; ++k ) + array[k] = rep.array[k].head_page; + } + //! Set item to point to kth element. Return true if at end of queue or item is marked valid; false otherwise. + bool get_item( void*& item, size_t k ) { + if( k==my_queue.my_rep->tail_counter ) { + item = NULL; + return true; + } else { + concurrent_queue_base::page* p = array[concurrent_queue_rep::index(k)]; + __TBB_ASSERT(p,NULL); + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, my_queue.items_per_page ); + item = static_cast<unsigned char*>(static_cast<void*>(p)) + offset_of_last + my_queue.item_size*i; + return (p->mask & uintptr_t(1)<<i)!=0; + } + } +}; + +//------------------------------------------------------------------------ +// concurrent_queue_iterator_base +//------------------------------------------------------------------------ + +void concurrent_queue_iterator_base_v3::initialize( const concurrent_queue_base& queue, size_t offset_of_last ) { + my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep>().allocate(1); + new( my_rep ) concurrent_queue_iterator_rep(queue,offset_of_last); + size_t k = my_rep->head_counter; + if( !my_rep->get_item(my_item, k) ) advance(); +} + +concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue ) { + initialize(queue,0); +} + +concurrent_queue_iterator_base_v3::concurrent_queue_iterator_base_v3( const concurrent_queue_base& queue, size_t offset_of_last ) { + initialize(queue,offset_of_last); +} + +void concurrent_queue_iterator_base_v3::assign( const concurrent_queue_iterator_base& other ) { + if( my_rep!=other.my_rep ) { + if( my_rep ) { + cache_aligned_allocator<concurrent_queue_iterator_rep>().deallocate(my_rep, 1); + my_rep = NULL; + } + if( other.my_rep ) { + my_rep = cache_aligned_allocator<concurrent_queue_iterator_rep>().allocate(1); + new( my_rep ) concurrent_queue_iterator_rep( *other.my_rep ); + } + } + my_item = other.my_item; +} + +void concurrent_queue_iterator_base_v3::advance() { + __TBB_ASSERT( my_item, "attempt to increment iterator past end of queue" ); + size_t k = my_rep->head_counter; + const concurrent_queue_base& queue = my_rep->my_queue; +#if TBB_USE_ASSERT + void* tmp; + my_rep->get_item(tmp,k); + __TBB_ASSERT( my_item==tmp, NULL ); +#endif /* TBB_USE_ASSERT */ + size_t i = modulo_power_of_two( k/concurrent_queue_rep::n_queue, queue.items_per_page ); + if( i==queue.items_per_page-1 ) { + concurrent_queue_base::page*& root = my_rep->array[concurrent_queue_rep::index(k)]; + root = root->next; + } + // advance k + my_rep->head_counter = ++k; + if( !my_rep->get_item(my_item, k) ) advance(); +} + +concurrent_queue_iterator_base_v3::~concurrent_queue_iterator_base_v3() { + //delete my_rep; + cache_aligned_allocator<concurrent_queue_iterator_rep>().deallocate(my_rep, 1); + my_rep = NULL; +} + +} // namespace internal + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_vector.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_vector.cpp new file mode 100644 index 0000000000..4a4dea3172 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/concurrent_vector.cpp @@ -0,0 +1,605 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +//this is the change +#include "tbb/concurrent_vector.h" +#include "tbb/cache_aligned_allocator.h" +#include "tbb/tbb_exception.h" +#include "tbb_misc.h" +#include "itt_notify.h" + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include <cstring> + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4267) +#endif + +using namespace std; + +namespace tbb { + +namespace internal { + class concurrent_vector_base_v3::helper :no_assign { +public: + //! memory page size + static const size_type page_size = 4096; + + inline static bool incompact_predicate(size_type size) { // assert size != 0, see source/test/test_vector_layout.cpp + return size < page_size || ((size-1)%page_size < page_size/2 && size < page_size * 128); // for more details + } + + inline static size_type find_segment_end(const concurrent_vector_base_v3 &v) { + segment_t *s = v.my_segment; + segment_index_t u = s==v.my_storage? pointers_per_short_table : pointers_per_long_table; + segment_index_t k = 0; + while( k < u && s[k].array > internal::vector_allocation_error_flag ) + ++k; + return k; + } + + // TODO: optimize accesses to my_first_block + //! assign first segment size. k - is index of last segment to be allocated, not a count of segments + inline static void assign_first_segment_if_neccessary(concurrent_vector_base_v3 &v, segment_index_t k) { + if( !v.my_first_block ) { + /* There was a suggestion to set first segment according to incompact_predicate: + while( k && !helper::incompact_predicate(segment_size( k ) * element_size) ) + --k; // while previous vector size is compact, decrement + // reasons to not do it: + // * constructor(n) is not ready to accept fragmented segments + // * backward compatibility due to that constructor + // * current version gives additional guarantee and faster init. + // * two calls to reserve() will give the same effect. + */ + v.my_first_block.compare_and_swap(k+1, 0); // store number of segments + } + } + + inline static void *allocate_segment(concurrent_vector_base_v3 &v, size_type n) { + void *ptr = v.vector_allocator_ptr(v, n); + if(!ptr) throw_exception(eid_bad_alloc); // check for bad allocation, throw exception + return ptr; + } + + //! Publish segment so other threads can see it. + inline static void publish_segment( segment_t& s, void* rhs ) { + // see also itt_store_pointer_with_release_v3() + ITT_NOTIFY( sync_releasing, &s.array ); + __TBB_store_with_release( s.array, rhs ); + } + + static size_type enable_segment(concurrent_vector_base_v3 &v, size_type k, size_type element_size); + + // TODO: rename as get_segments_table() and return segment pointer + inline static void extend_table_if_necessary(concurrent_vector_base_v3 &v, size_type k, size_type start ) { + if(k >= pointers_per_short_table && v.my_segment == v.my_storage) + extend_segment_table(v, start ); + } + + static void extend_segment_table(concurrent_vector_base_v3 &v, size_type start); + + inline static segment_t &acquire_segment(concurrent_vector_base_v3 &v, size_type index, size_type element_size, bool owner) { + segment_t &s = v.my_segment[index]; // TODO: pass v.my_segment as argument + if( !__TBB_load_with_acquire(s.array) ) { // do not check for internal::vector_allocation_error_flag + if( owner ) { + enable_segment( v, index, element_size ); + } else { + ITT_NOTIFY(sync_prepare, &s.array); + spin_wait_while_eq( s.array, (void*)0 ); + ITT_NOTIFY(sync_acquired, &s.array); + } + } else { + ITT_NOTIFY(sync_acquired, &s.array); + } + if( s.array <= internal::vector_allocation_error_flag ) // check for internal::vector_allocation_error_flag + throw_exception(eid_bad_last_alloc); // throw custom exception, because it's hard to recover after internal::vector_allocation_error_flag correctly + return s; + } + + ///// non-static fields of helper for exception-safe iteration across segments + segment_t *table;// TODO: review all segment_index_t as just short type + size_type first_block, k, sz, start, finish, element_size; + helper(segment_t *segments, size_type fb, size_type esize, size_type index, size_type s, size_type f) throw() + : table(segments), first_block(fb), k(index), sz(0), start(s), finish(f), element_size(esize) {} + inline void first_segment() throw() { + __TBB_ASSERT( start <= finish, NULL ); + __TBB_ASSERT( first_block || !finish, NULL ); + if( k < first_block ) k = 0; // process solid segment at a time + size_type base = segment_base( k ); + __TBB_ASSERT( base <= start, NULL ); + finish -= base; start -= base; // rebase as offsets from segment k + sz = k ? base : segment_size( first_block ); // sz==base for k>0 + } + inline void next_segment() throw() { + finish -= sz; start = 0; // offsets from next segment + if( !k ) k = first_block; + else { ++k; sz <<= 1; } + } + template<typename F> + inline size_type apply(const F &func) { + first_segment(); + while( sz < finish ) { // work for more than one segment + func( table[k], static_cast<char*>(table[k].array)+element_size*start, sz-start ); + next_segment(); + } + func( table[k], static_cast<char*>(table[k].array)+element_size*start, finish-start ); + return k; + } + inline void *get_segment_ptr(size_type index, bool wait) { + segment_t &s = table[index]; + if( !__TBB_load_with_acquire(s.array) && wait ) { + ITT_NOTIFY(sync_prepare, &s.array); + spin_wait_while_eq( s.array, (void*)0 ); + ITT_NOTIFY(sync_acquired, &s.array); + } + return s.array; + } + ~helper() { + if( sz >= finish ) return; // the work is done correctly + cleanup(); + } + + //! Out of line code to assists destructor in infrequent cases. + void cleanup(); + + /// TODO: turn into lambda functions when available + struct init_body { + internal_array_op2 func; + const void *arg; + init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {} + void operator()(segment_t &, void *begin, size_type n) const { + func( begin, arg, n ); + } + }; + struct safe_init_body { + internal_array_op2 func; + const void *arg; + safe_init_body(internal_array_op2 init, const void *src) : func(init), arg(src) {} + void operator()(segment_t &s, void *begin, size_type n) const { + if( s.array <= internal::vector_allocation_error_flag ) + throw_exception(eid_bad_last_alloc); // throw custom exception + func( begin, arg, n ); + } + }; + struct destroy_body { + internal_array_op1 func; + destroy_body(internal_array_op1 destroy) : func(destroy) {} + void operator()(segment_t &s, void *begin, size_type n) const { + if( s.array > internal::vector_allocation_error_flag ) + func( begin, n ); + } + }; +}; + +void concurrent_vector_base_v3::helper::extend_segment_table(concurrent_vector_base_v3 &v, concurrent_vector_base_v3::size_type start) { + if( start > segment_size(pointers_per_short_table) ) start = segment_size(pointers_per_short_table); + // If other threads are trying to set pointers in the short segment, wait for them to finish their + // assignments before we copy the short segment to the long segment. Note: grow_to_at_least depends on it + for( segment_index_t i = 0; segment_base(i) < start && v.my_segment == v.my_storage; i++ ){ + if(!v.my_storage[i].array) { + ITT_NOTIFY(sync_prepare, &v.my_storage[i].array); + atomic_backoff backoff; + do backoff.pause(); while( v.my_segment == v.my_storage && !v.my_storage[i].array ); + ITT_NOTIFY(sync_acquired, &v.my_storage[i].array); + } + } + if( v.my_segment != v.my_storage ) return; + + segment_t* s = (segment_t*)NFS_Allocate( pointers_per_long_table, sizeof(segment_t), NULL ); + // No need to check !s here, because NFS_Allocate throws exception if it cannot allocate the requested storage. + std::memset( s, 0, pointers_per_long_table*sizeof(segment_t) ); + for( segment_index_t i = 0; i < pointers_per_short_table; i++) + s[i] = v.my_storage[i]; + if( v.my_segment.compare_and_swap( s, v.my_storage ) != v.my_storage ) + NFS_Free( s ); + // else TODO: add ITT_NOTIFY signals for v.my_segment? +} + +concurrent_vector_base_v3::size_type concurrent_vector_base_v3::helper::enable_segment(concurrent_vector_base_v3 &v, concurrent_vector_base_v3::size_type k, concurrent_vector_base_v3::size_type element_size) { + segment_t* s = v.my_segment; // TODO: optimize out as argument? Optimize accesses to my_first_block + __TBB_ASSERT( s[k].array <= internal::vector_allocation_error_flag, "concurrent operation during growth?" ); + if( !k ) { + assign_first_segment_if_neccessary(v, default_initial_segments-1); + __TBB_TRY { + publish_segment(s[0], allocate_segment(v, segment_size(v.my_first_block) ) ); + } __TBB_CATCH(...) { // intercept exception here, assign internal::vector_allocation_error_flag value, re-throw exception + publish_segment(s[0], internal::vector_allocation_error_flag); + __TBB_RETHROW(); + } + return 2; + } + size_type m = segment_size(k); + if( !v.my_first_block ) // push_back only + spin_wait_while_eq( v.my_first_block, segment_index_t(0) ); + if( k < v.my_first_block ) { + // s[0].array is changed only once ( 0 -> !0 ) and points to uninitialized memory + void *array0 = __TBB_load_with_acquire(s[0].array); + if( !array0 ) { + // sync_prepare called only if there is a wait + ITT_NOTIFY(sync_prepare, &s[0].array ); + spin_wait_while_eq( s[0].array, (void*)0 ); + array0 = __TBB_load_with_acquire(s[0].array); + } + ITT_NOTIFY(sync_acquired, &s[0].array); + if( array0 <= internal::vector_allocation_error_flag ) { // check for internal::vector_allocation_error_flag of initial segment + publish_segment(s[k], internal::vector_allocation_error_flag); // and assign internal::vector_allocation_error_flag here + throw_exception(eid_bad_last_alloc); // throw custom exception + } + publish_segment( s[k], + static_cast<void*>( static_cast<char*>(array0) + segment_base(k)*element_size ) + ); + } else { + __TBB_TRY { + publish_segment(s[k], allocate_segment(v, m)); + } __TBB_CATCH(...) { // intercept exception here, assign internal::vector_allocation_error_flag value, re-throw exception + publish_segment(s[k], internal::vector_allocation_error_flag); + __TBB_RETHROW(); + } + } + return m; +} + +void concurrent_vector_base_v3::helper::cleanup() { + if( !sz ) { // allocation failed, restore the table + segment_index_t k_start = k, k_end = segment_index_of(finish-1); + if( segment_base( k_start ) < start ) + get_segment_ptr(k_start++, true); // wait + if( k_start < first_block ) { + void *array0 = get_segment_ptr(0, start>0); // wait if necessary + if( array0 && !k_start ) ++k_start; + if( array0 <= internal::vector_allocation_error_flag ) + for(; k_start < first_block && k_start <= k_end; ++k_start ) + publish_segment(table[k_start], internal::vector_allocation_error_flag); + else for(; k_start < first_block && k_start <= k_end; ++k_start ) + publish_segment(table[k_start], static_cast<void*>( + static_cast<char*>(array0) + segment_base(k_start)*element_size) ); + } + for(; k_start <= k_end; ++k_start ) // not in first block + if( !__TBB_load_with_acquire(table[k_start].array) ) + publish_segment(table[k_start], internal::vector_allocation_error_flag); + // fill allocated items + first_segment(); + goto recover; + } + while( sz <= finish ) { // there is still work for at least one segment + next_segment(); +recover: + void *array = table[k].array; + if( array > internal::vector_allocation_error_flag ) + std::memset( static_cast<char*>(array)+element_size*start, 0, ((sz<finish?sz:finish) - start)*element_size ); + else __TBB_ASSERT( array == internal::vector_allocation_error_flag, NULL ); + } +} + +concurrent_vector_base_v3::~concurrent_vector_base_v3() { + segment_t* s = my_segment; + if( s != my_storage ) { + // Clear short segment. + for( segment_index_t i = 0; i < pointers_per_short_table; i++) + my_storage[i].array = NULL; +#if TBB_USE_DEBUG + for( segment_index_t i = 0; i < pointers_per_long_table; i++) + __TBB_ASSERT( my_segment[i].array <= internal::vector_allocation_error_flag, "Segment should have been freed. Please recompile with new TBB before using exceptions."); +#endif + my_segment = my_storage; + NFS_Free( s ); + } +} + +concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_capacity() const { + return segment_base( helper::find_segment_end(*this) ); +} + +void concurrent_vector_base_v3::internal_throw_exception(size_type t) const { + switch(t) { + case 0: throw_exception(eid_out_of_range); + case 1: throw_exception(eid_segment_range_error); + case 2: throw_exception(eid_index_range_error); + } +} + +void concurrent_vector_base_v3::internal_reserve( size_type n, size_type element_size, size_type max_size ) { + if( n>max_size ) + throw_exception(eid_reservation_length_error); + __TBB_ASSERT( n, NULL ); + helper::assign_first_segment_if_neccessary(*this, segment_index_of(n-1)); + segment_index_t k = helper::find_segment_end(*this); + __TBB_TRY { + for( ; segment_base(k)<n; ++k ) { + helper::extend_table_if_necessary(*this, k, 0); + if(my_segment[k].array <= internal::vector_allocation_error_flag) + helper::enable_segment(*this, k, element_size); + } + } __TBB_CATCH(...) { + my_segment[k].array = NULL; + __TBB_RETHROW(); // repair and rethrow + } +} + +void concurrent_vector_base_v3::internal_copy( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op2 copy ) { + size_type n = src.my_early_size; + __TBB_ASSERT( my_segment == my_storage, NULL); + if( n ) { + helper::assign_first_segment_if_neccessary(*this, segment_index_of(n-1)); + size_type b; + for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) { + if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table) + || src.my_segment[k].array <= internal::vector_allocation_error_flag ) { + my_early_size = b; break; + } + helper::extend_table_if_necessary(*this, k, 0); + size_type m = helper::enable_segment(*this, k, element_size); + if( m > n-b ) m = n-b; + my_early_size = b+m; + copy( my_segment[k].array, src.my_segment[k].array, m ); + } + } +} + +void concurrent_vector_base_v3::internal_assign( const concurrent_vector_base_v3& src, size_type element_size, internal_array_op1 destroy, internal_array_op2 assign, internal_array_op2 copy ) { + size_type n = src.my_early_size; + while( my_early_size>n ) { // TODO: improve + segment_index_t k = segment_index_of( my_early_size-1 ); + size_type b=segment_base(k); + size_type new_end = b>=n ? b : n; + __TBB_ASSERT( my_early_size>new_end, NULL ); + if( my_segment[k].array <= internal::vector_allocation_error_flag) // check vector was broken before + throw_exception(eid_bad_last_alloc); // throw custom exception + // destructors are supposed to not throw any exceptions + destroy( (char*)my_segment[k].array+element_size*(new_end-b), my_early_size-new_end ); + my_early_size = new_end; + } + size_type dst_initialized_size = my_early_size; + my_early_size = n; + helper::assign_first_segment_if_neccessary(*this, segment_index_of(n)); + size_type b; + for( segment_index_t k=0; (b=segment_base(k))<n; ++k ) { + if( (src.my_segment == (segment_t*)src.my_storage && k >= pointers_per_short_table) + || src.my_segment[k].array <= internal::vector_allocation_error_flag ) { // if source is damaged + my_early_size = b; break; // TODO: it may cause undestructed items + } + helper::extend_table_if_necessary(*this, k, 0); + if( !my_segment[k].array ) + helper::enable_segment(*this, k, element_size); + else if( my_segment[k].array <= internal::vector_allocation_error_flag ) + throw_exception(eid_bad_last_alloc); // throw custom exception + size_type m = k? segment_size(k) : 2; + if( m > n-b ) m = n-b; + size_type a = 0; + if( dst_initialized_size>b ) { + a = dst_initialized_size-b; + if( a>m ) a = m; + assign( my_segment[k].array, src.my_segment[k].array, a ); + m -= a; + a *= element_size; + } + if( m>0 ) + copy( (char*)my_segment[k].array+a, (char*)src.my_segment[k].array+a, m ); + } + __TBB_ASSERT( src.my_early_size==n, "detected use of concurrent_vector::operator= with right side that was concurrently modified" ); +} + +void* concurrent_vector_base_v3::internal_push_back( size_type element_size, size_type& index ) { + __TBB_ASSERT( sizeof(my_early_size)==sizeof(uintptr_t), NULL ); + size_type tmp = __TBB_FetchAndIncrementWacquire(&my_early_size); + index = tmp; + segment_index_t k_old = segment_index_of( tmp ); + size_type base = segment_base(k_old); + helper::extend_table_if_necessary(*this, k_old, tmp); + segment_t& s = helper::acquire_segment(*this, k_old, element_size, base==tmp); + size_type j_begin = tmp-base; + return (void*)((char*)s.array+element_size*j_begin); +} + +void concurrent_vector_base_v3::internal_grow_to_at_least( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) { + internal_grow_to_at_least_with_result( new_size, element_size, init, src ); +} + +concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_to_at_least_with_result( size_type new_size, size_type element_size, internal_array_op2 init, const void *src ) { + size_type e = my_early_size; + while( e<new_size ) { + size_type f = my_early_size.compare_and_swap(new_size,e); + if( f==e ) { + internal_grow( e, new_size, element_size, init, src ); + break; + } + e = f; + } + // Check/wait for segments allocation completes + segment_index_t i, k_old = segment_index_of( new_size-1 ); + if( k_old >= pointers_per_short_table && my_segment == my_storage ) { + spin_wait_while_eq( my_segment, my_storage ); + } + for( i = 0; i <= k_old; ++i ) { + segment_t &s = my_segment[i]; + if(!s.array) { + ITT_NOTIFY(sync_prepare, &s.array); + atomic_backoff backoff; + do backoff.pause(); + while( !__TBB_load_with_acquire(my_segment[i].array) ); // my_segment may change concurrently + ITT_NOTIFY(sync_acquired, &s.array); + } + if( my_segment[i].array <= internal::vector_allocation_error_flag ) + throw_exception(eid_bad_last_alloc); + } +#if TBB_USE_DEBUG + size_type capacity = internal_capacity(); + __TBB_ASSERT( capacity >= new_size, NULL); +#endif + return e; +} + +concurrent_vector_base_v3::size_type concurrent_vector_base_v3::internal_grow_by( size_type delta, size_type element_size, internal_array_op2 init, const void *src ) { + size_type result = my_early_size.fetch_and_add(delta); + internal_grow( result, result+delta, element_size, init, src ); + return result; +} + +void concurrent_vector_base_v3::internal_grow( const size_type start, size_type finish, size_type element_size, internal_array_op2 init, const void *src ) { + __TBB_ASSERT( start<finish, "start must be less than finish" ); + segment_index_t k_start = segment_index_of(start), k_end = segment_index_of(finish-1); + helper::assign_first_segment_if_neccessary(*this, k_end); + helper::extend_table_if_necessary(*this, k_end, start); + helper range(my_segment, my_first_block, element_size, k_start, start, finish); + for(; k_end > k_start && k_end >= range.first_block; --k_end ) // allocate segments in reverse order + helper::acquire_segment(*this, k_end, element_size, true/*for k_end>k_start*/); + for(; k_start <= k_end; ++k_start ) // but allocate first block in straight order + helper::acquire_segment(*this, k_start, element_size, segment_base( k_start ) >= start ); + range.apply( helper::init_body(init, src) ); +} + +void concurrent_vector_base_v3::internal_resize( size_type n, size_type element_size, size_type max_size, const void *src, + internal_array_op1 destroy, internal_array_op2 init ) { + size_type j = my_early_size; + if( n > j ) { // construct items + internal_reserve(n, element_size, max_size); + my_early_size = n; + helper for_each(my_segment, my_first_block, element_size, segment_index_of(j), j, n); + for_each.apply( helper::safe_init_body(init, src) ); + } else { + my_early_size = n; + helper for_each(my_segment, my_first_block, element_size, segment_index_of(n), n, j); + for_each.apply( helper::destroy_body(destroy) ); + } +} + +concurrent_vector_base_v3::segment_index_t concurrent_vector_base_v3::internal_clear( internal_array_op1 destroy ) { + __TBB_ASSERT( my_segment, NULL ); + size_type j = my_early_size; + my_early_size = 0; + helper for_each(my_segment, my_first_block, 0, 0, 0, j); // element_size is safe to be zero if 'start' is zero + j = for_each.apply( helper::destroy_body(destroy) ); + size_type i = helper::find_segment_end(*this); + return j < i? i : j+1; +} + +void *concurrent_vector_base_v3::internal_compact( size_type element_size, void *table, internal_array_op1 destroy, internal_array_op2 copy ) +{ + const size_type my_size = my_early_size; + const segment_index_t k_end = helper::find_segment_end(*this); // allocated segments + const segment_index_t k_stop = my_size? segment_index_of(my_size-1) + 1 : 0; // number of segments to store existing items: 0=>0; 1,2=>1; 3,4=>2; [5-8]=>3;.. + const segment_index_t first_block = my_first_block; // number of merged segments, getting values from atomics + + segment_index_t k = first_block; + if(k_stop < first_block) + k = k_stop; + else + while (k < k_stop && helper::incompact_predicate(segment_size( k ) * element_size) ) k++; + if(k_stop == k_end && k == first_block) + return NULL; + + segment_t *const segment_table = my_segment; + internal_segments_table &old = *static_cast<internal_segments_table*>( table ); + std::memset(&old, 0, sizeof(old)); + + if ( k != first_block && k ) // first segment optimization + { + // exception can occur here + void *seg = old.table[0] = helper::allocate_segment( *this, segment_size(k) ); + old.first_block = k; // fill info for freeing new segment if exception occurs + // copy items to the new segment + size_type my_segment_size = segment_size( first_block ); + for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) { + __TBB_ASSERT( segment_table[i].array > internal::vector_allocation_error_flag, NULL); + void *s = static_cast<void*>( + static_cast<char*>(seg) + segment_base(i)*element_size ); + if(j + my_segment_size >= my_size) my_segment_size = my_size - j; + __TBB_TRY { // exception can occur here + copy( s, segment_table[i].array, my_segment_size ); + } __TBB_CATCH(...) { // destroy all the already copied items + helper for_each(reinterpret_cast<segment_t*>(&old.table[0]), old.first_block, element_size, + 0, 0, segment_base(i)+my_segment_size); + for_each.apply( helper::destroy_body(destroy) ); + __TBB_RETHROW(); + } + my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block ); + } + // commit the changes + memcpy(old.table, segment_table, k * sizeof(segment_t)); + for (segment_index_t i = 0; i < k; i++) { + segment_table[i].array = static_cast<void*>( + static_cast<char*>(seg) + segment_base(i)*element_size ); + } + old.first_block = first_block; my_first_block = k; // now, first_block != my_first_block + // destroy original copies + my_segment_size = segment_size( first_block ); // old.first_block actually + for (segment_index_t i = 0, j = 0; i < k && j < my_size; j = my_segment_size) { + if(j + my_segment_size >= my_size) my_segment_size = my_size - j; + // destructors are supposed to not throw any exceptions + destroy( old.table[i], my_segment_size ); + my_segment_size = i? segment_size( ++i ) : segment_size( i = first_block ); + } + } + // free unnecessary segments allocated by reserve() call + if ( k_stop < k_end ) { + old.first_block = first_block; + memcpy(old.table+k_stop, segment_table+k_stop, (k_end-k_stop) * sizeof(segment_t)); + std::memset(segment_table+k_stop, 0, (k_end-k_stop) * sizeof(segment_t)); + if( !k ) my_first_block = 0; + } + return table; +} + +void concurrent_vector_base_v3::internal_swap(concurrent_vector_base_v3& v) +{ + size_type my_sz = my_early_size, v_sz = v.my_early_size; + if(!my_sz && !v_sz) return; + size_type tmp = my_first_block; my_first_block = v.my_first_block; v.my_first_block = tmp; + bool my_short = (my_segment == my_storage), v_short = (v.my_segment == v.my_storage); + if ( my_short && v_short ) { // swap both tables + char tbl[pointers_per_short_table * sizeof(segment_t)]; + memcpy(tbl, my_storage, pointers_per_short_table * sizeof(segment_t)); + memcpy(my_storage, v.my_storage, pointers_per_short_table * sizeof(segment_t)); + memcpy(v.my_storage, tbl, pointers_per_short_table * sizeof(segment_t)); + } + else if ( my_short ) { // my -> v + memcpy(v.my_storage, my_storage, pointers_per_short_table * sizeof(segment_t)); + my_segment = v.my_segment; v.my_segment = v.my_storage; + } + else if ( v_short ) { // v -> my + memcpy(my_storage, v.my_storage, pointers_per_short_table * sizeof(segment_t)); + v.my_segment = my_segment; my_segment = my_storage; + } else { + segment_t *ptr = my_segment; my_segment = v.my_segment; v.my_segment = ptr; + } + my_early_size = v_sz; v.my_early_size = my_sz; +} + +} // namespace internal + +} // tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/condition_variable.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/condition_variable.cpp new file mode 100644 index 0000000000..b660e25857 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/condition_variable.cpp @@ -0,0 +1,207 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" +#include "tbb/compat/condition_variable" +#include "tbb/atomic.h" +#include "tbb_misc.h" +#include "dynamic_link.h" +#include "itt_notify.h" + +namespace tbb { + +namespace internal { + +//condition_variable +#if _WIN32||_WIN64 +using tbb::interface5::internal::condition_variable_using_event; + +static atomic<do_once_state> condvar_api_state; + +void WINAPI init_condvar_using_event( condition_variable_using_event* cv_event ) +{ + // TODO: For Metro port, we can always use the API for condition variables, without dynamic_link etc. + cv_event->event = CreateEventEx(NULL, NULL, 0x1 /*CREATE_EVENT_MANUAL_RESET*/, EVENT_ALL_ACCESS ); + InitializeCriticalSectionEx( &cv_event->mutex, 4000, 0 ); + cv_event->n_waiters = 0; + cv_event->release_count = 0; + cv_event->epoch = 0; +} + +BOOL WINAPI sleep_condition_variable_cs_using_event( condition_variable_using_event* cv_event, LPCRITICAL_SECTION cs, DWORD dwMilliseconds ) +{ + EnterCriticalSection( &cv_event->mutex ); + ++cv_event->n_waiters; + unsigned my_generation = cv_event->epoch; + LeaveCriticalSection( &cv_event->mutex ); + LeaveCriticalSection( cs ); + for (;;) { + // should come here at least once + DWORD rc = WaitForSingleObjectEx( cv_event->event, dwMilliseconds, FALSE ); + EnterCriticalSection( &cv_event->mutex ); + if( rc!=WAIT_OBJECT_0 ) { + --cv_event->n_waiters; + LeaveCriticalSection( &cv_event->mutex ); + if( rc==WAIT_TIMEOUT ) { + SetLastError( WAIT_TIMEOUT ); + EnterCriticalSection( cs ); + } + return false; + } + __TBB_ASSERT( rc==WAIT_OBJECT_0, NULL ); + if( cv_event->release_count>0 && cv_event->epoch!=my_generation ) + break; + LeaveCriticalSection( &cv_event->mutex ); + } + + // still in the critical section + --cv_event->n_waiters; + int count = --cv_event->release_count; + LeaveCriticalSection( &cv_event->mutex ); + + if( count==0 ) { + __TBB_ASSERT( cv_event->event, "Premature destruction of condition variable?" ); + ResetEvent( cv_event->event ); + } + EnterCriticalSection( cs ); + return true; +} + +void WINAPI wake_condition_variable_using_event( condition_variable_using_event* cv_event ) +{ + EnterCriticalSection( &cv_event->mutex ); + if( cv_event->n_waiters>cv_event->release_count ) { + SetEvent( cv_event->event ); // Signal the manual-reset event. + ++cv_event->release_count; + ++cv_event->epoch; + } + LeaveCriticalSection( &cv_event->mutex ); +} + +void WINAPI wake_all_condition_variable_using_event( condition_variable_using_event* cv_event ) +{ + EnterCriticalSection( &cv_event->mutex ); + if( cv_event->n_waiters>0 ) { + SetEvent( cv_event->event ); + cv_event->release_count = cv_event->n_waiters; + ++cv_event->epoch; + } + LeaveCriticalSection( &cv_event->mutex ); +} + +void WINAPI destroy_condvar_using_event( condition_variable_using_event* cv_event ) +{ + HANDLE my_event = cv_event->event; + EnterCriticalSection( &cv_event->mutex ); + // NULL is an invalid HANDLE value + cv_event->event = NULL; + if( cv_event->n_waiters>0 ) { + LeaveCriticalSection( &cv_event->mutex ); + spin_wait_until_eq( cv_event->n_waiters, 0 ); + // make sure the last thread completes its access to cv + EnterCriticalSection( &cv_event->mutex ); + } + LeaveCriticalSection( &cv_event->mutex ); + CloseHandle( my_event ); +} + +void WINAPI destroy_condvar_noop( CONDITION_VARIABLE* /*cv*/ ) { /*no op*/ } + +static void (WINAPI *__TBB_init_condvar)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&init_condvar_using_event; +static BOOL (WINAPI *__TBB_condvar_wait)( PCONDITION_VARIABLE, LPCRITICAL_SECTION, DWORD ) = (BOOL (WINAPI *)(PCONDITION_VARIABLE,LPCRITICAL_SECTION, DWORD))&sleep_condition_variable_cs_using_event; +static void (WINAPI *__TBB_condvar_notify_one)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&wake_condition_variable_using_event; +static void (WINAPI *__TBB_condvar_notify_all)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&wake_all_condition_variable_using_event; +static void (WINAPI *__TBB_destroy_condvar)( PCONDITION_VARIABLE ) = (void (WINAPI *)(PCONDITION_VARIABLE))&destroy_condvar_using_event; + +//! Table describing how to link the handlers. +static const dynamic_link_descriptor CondVarLinkTable[] = { + DLD(InitializeConditionVariable, __TBB_init_condvar), + DLD(SleepConditionVariableCS, __TBB_condvar_wait), + DLD(WakeConditionVariable, __TBB_condvar_notify_one), + DLD(WakeAllConditionVariable, __TBB_condvar_notify_all) +}; + +void init_condvar_module() +{ + __TBB_ASSERT( (uintptr_t)__TBB_init_condvar==(uintptr_t)&init_condvar_using_event, NULL ); + if( dynamic_link( "Kernel32.dll", CondVarLinkTable, 4 ) ) + __TBB_destroy_condvar = (void (WINAPI *)(PCONDITION_VARIABLE))&destroy_condvar_noop; +} +#endif /* _WIN32||_WIN64 */ + +} // namespace internal + +#if _WIN32||_WIN64 + +namespace interface5 { +namespace internal { + +using tbb::internal::condvar_api_state; +using tbb::internal::__TBB_init_condvar; +using tbb::internal::__TBB_condvar_wait; +using tbb::internal::__TBB_condvar_notify_one; +using tbb::internal::__TBB_condvar_notify_all; +using tbb::internal::__TBB_destroy_condvar; +using tbb::internal::init_condvar_module; + +void internal_initialize_condition_variable( condvar_impl_t& cv ) +{ + atomic_do_once( &init_condvar_module, condvar_api_state ); + __TBB_init_condvar( &cv.cv_native ); +} + +void internal_destroy_condition_variable( condvar_impl_t& cv ) +{ + __TBB_destroy_condvar( &cv.cv_native ); +} + +void internal_condition_variable_notify_one( condvar_impl_t& cv ) +{ + __TBB_condvar_notify_one ( &cv.cv_native ); +} + +void internal_condition_variable_notify_all( condvar_impl_t& cv ) +{ + __TBB_condvar_notify_all( &cv.cv_native ); +} + +bool internal_condition_variable_wait( condvar_impl_t& cv, mutex* mtx, const tick_count::interval_t* i ) +{ + DWORD duration = i ? DWORD((i->seconds()*1000)) : INFINITE; + mtx->set_state( mutex::INITIALIZED ); + BOOL res = __TBB_condvar_wait( &cv.cv_native, mtx->native_handle(), duration ); + mtx->set_state( mutex::HELD ); + return res?true:false; +} + +} // namespace internal +} // nameespace interface5 + +#endif /* _WIN32||_WIN64 */ + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/critical_section.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/critical_section.cpp new file mode 100644 index 0000000000..4a8964f6e0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/critical_section.cpp @@ -0,0 +1,39 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/critical_section.h" +#include "itt_notify.h" + +namespace tbb { + namespace internal { + +void critical_section_v4::internal_construct() { + ITT_SYNC_CREATE(&my_impl, _T("ppl::critical_section"), _T("")); +} +} // namespace internal +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/custom_scheduler.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/custom_scheduler.h new file mode 100644 index 0000000000..e56d26fcfa --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/custom_scheduler.h @@ -0,0 +1,645 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_custom_scheduler_H +#define _TBB_custom_scheduler_H + +#include "scheduler.h" +#include "observer_proxy.h" +#include "itt_notify.h" + +namespace tbb { +namespace internal { + +//! Amount of time to pause between steals. +/** The default values below were found to be best empirically for K-Means + on the 32-way Altix and 4-way (*2 for HT) fxqlin04. */ +#ifdef __TBB_STEALING_PAUSE +static const long PauseTime = __TBB_STEALING_PAUSE; +#elif __TBB_ipf +static const long PauseTime = 1500; +#else +static const long PauseTime = 80; +#endif + +//------------------------------------------------------------------------ +//! Traits classes for scheduler +//------------------------------------------------------------------------ + +struct DefaultSchedulerTraits { + static const bool itt_possible = true; + static const bool has_slow_atomic = false; +}; + +struct IntelSchedulerTraits { + static const bool itt_possible = false; +#if __TBB_x86_32||__TBB_x86_64 + static const bool has_slow_atomic = true; +#else + static const bool has_slow_atomic = false; +#endif /* __TBB_x86_32||__TBB_x86_64 */ +}; + +//------------------------------------------------------------------------ +// custom_scheduler +//------------------------------------------------------------------------ + +//! A scheduler with a customized evaluation loop. +/** The customization can use SchedulerTraits to make decisions without needing a run-time check. */ +template<typename SchedulerTraits> +class custom_scheduler: private generic_scheduler { + typedef custom_scheduler<SchedulerTraits> scheduler_type; + + //! Scheduler loop that dispatches tasks. + /** If child is non-NULL, it is dispatched first. + Then, until "parent" has a reference count of 1, other task are dispatched or stolen. */ + /*override*/ + void local_wait_for_all( task& parent, task* child ); + + //! Entry point from client code to the scheduler loop that dispatches tasks. + /** The method is virtual, but the *this object is used only for sake of dispatching on the correct vtable, + not necessarily the correct *this object. The correct *this object is looked up in TLS. */ + /*override*/ + void wait_for_all( task& parent, task* child ) { + static_cast<custom_scheduler*>(governor::local_scheduler())->scheduler_type::local_wait_for_all( parent, child ); + } + + //! Construct a custom_scheduler + custom_scheduler( arena* a, size_t index ) : generic_scheduler(a, index) {} + + //! Decrements ref_count of a predecessor. + /** If it achieves 0, the predecessor is scheduled for execution. + When changing, remember that this is a hot path function. */ + void tally_completion_of_predecessor( task& s, task*& bypass_slot ) { + task_prefix& p = s.prefix(); + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_releasing, &p.ref_count); + if( SchedulerTraits::has_slow_atomic && p.ref_count==1 ) + p.ref_count=0; + else if( __TBB_FetchAndDecrementWrelease(&p.ref_count) > 1 ) // more references exist + return; + + // Ordering on p.ref_count (superfluous if SchedulerTraits::has_slow_atomic) + __TBB_control_consistency_helper(); + __TBB_ASSERT(p.ref_count==0, "completion of task caused predecessor's reference count to underflow"); + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_acquired, &p.ref_count); +#if TBB_USE_ASSERT + p.extra_state &= ~es_ref_count_active; +#endif /* TBB_USE_ASSERT */ + +#if __TBB_RECYCLE_TO_ENQUEUE + if (p.state==task::to_enqueue) { + // related to __TBB_TASK_ARENA TODO: try keep priority of the task + // e.g. rework task_prefix to remember priority of received task and use here + my_arena->enqueue_task(s, 0, hint_for_push ); + } else +#endif /*__TBB_RECYCLE_TO_ENQUEUE*/ + if( bypass_slot==NULL ) + bypass_slot = &s; + else + local_spawn( s, s.prefix().next ); + } + +public: + static generic_scheduler* allocate_scheduler( arena* a, size_t index ) { + scheduler_type* s = (scheduler_type*)NFS_Allocate(sizeof(scheduler_type),1,NULL); + new( s ) scheduler_type( a, index ); + s->assert_task_pool_valid(); + ITT_SYNC_CREATE(s, SyncType_Scheduler, SyncObj_TaskPoolSpinning); + return s; + } + + //! Try getting a task from the mailbox or stealing from another scheduler. + /** Returns the stolen task or NULL if all attempts fail. */ + /* override */ task* receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, bool return_if_no_work ); + +}; // class custom_scheduler<> + +//------------------------------------------------------------------------ +// custom_scheduler methods +//------------------------------------------------------------------------ + +template<typename SchedulerTraits> +task* custom_scheduler<SchedulerTraits>::receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, + bool return_if_no_work ) { + task* t = NULL; + bool outermost_dispatch_level = return_if_no_work || master_outermost_level(); + my_inbox.set_is_idle( true ); +#if __TBB_TASK_PRIORITY + if ( return_if_no_work && my_arena->my_skipped_fifo_priority ) { + // This thread can dequeue FIFO tasks, and some priority levels of + // FIFO tasks have been bypassed (to prevent deadlock caused by + // dynamic priority changes in nested task group hierarchy). + intptr_t skipped_priority = my_arena->my_skipped_fifo_priority; + if ( my_arena->my_skipped_fifo_priority.compare_and_swap(0, skipped_priority) == skipped_priority && + skipped_priority > my_arena->my_top_priority ) + { + my_market->update_arena_priority( *my_arena, skipped_priority ); + } + } +#endif /* __TBB_TASK_PRIORITY */ + int yield_count = 0; + // The state "failure_count==-1" is used only when itt_possible is true, + // and denotes that a sync_prepare has not yet been issued. + for( int failure_count = -static_cast<int>(SchedulerTraits::itt_possible);; ++failure_count) { + if( completion_ref_count==1 ) { + if( SchedulerTraits::itt_possible ) { + if( failure_count!=-1 ) { + ITT_NOTIFY(sync_prepare, &completion_ref_count); + // Notify Intel(R) Thread Profiler that thread has stopped spinning. + ITT_NOTIFY(sync_acquired, this); + } + ITT_NOTIFY(sync_acquired, &completion_ref_count); + } + __TBB_ASSERT( !t, NULL ); + __TBB_control_consistency_helper(); // on ref_count + break; // exit stealing loop and return; + } + __TBB_ASSERT( my_arena->my_limit > 0, NULL ); + size_t n = my_arena->my_limit; + __TBB_ASSERT( my_arena_index < n, NULL ); + // Check if the resource manager requires our arena to relinquish some threads + if ( return_if_no_work && my_arena->my_num_workers_allotted < my_arena->num_workers_active() ) { +#if !__TBB_TASK_ARENA + __TBB_ASSERT( is_worker(), NULL ); +#endif + if( SchedulerTraits::itt_possible && failure_count != -1 ) + ITT_NOTIFY(sync_cancel, this); + return NULL; + } + // Check if there are tasks mailed to this thread via task-to-thread affinity mechanism. + __TBB_ASSERT(my_affinity_id, NULL); + if ( n > 1 && (t=get_mailbox_task()) ) { + GATHER_STATISTIC( ++my_counters.mails_received ); + } + // Check if there are tasks in starvation-resistant stream. + // Only allowed for workers with empty stack, which is identified by return_if_no_work. + else if ( outermost_dispatch_level && (t = dequeue_task()) ) { + // just proceed with the obtained task + } +#if __TBB_TASK_PRIORITY + // Check if any earlier offloaded non-top priority tasks become returned to the top level + else if ( my_offloaded_tasks && (t=reload_tasks()) ) { + // just proceed with the obtained task + } +#endif /* __TBB_TASK_PRIORITY */ + else if ( can_steal() && n > 1 ) { + // Try to steal a task from a random victim. + size_t k = my_random.get() % (n - 1); + arena_slot* victim = &my_arena->my_slots[k]; + // The following condition excludes the master that might have + // already taken our previous place in the arena from the list . + // of potential victims. But since such a situation can take + // place only in case of significant oversubscription, keeping + // the checks simple seems to be preferable to complicating the code. + if( k >= my_arena_index ) + ++victim; // Adjusts random distribution to exclude self + t = steal_task( *victim ); + if( !t ) goto fail; + if( is_proxy(*t) ) { + task_proxy &tp = *(task_proxy*)t; + t = tp.extract_task<task_proxy::pool_bit>(); + if ( !t ) { + // Proxy was empty, so it's our responsibility to free it + free_task<small_task>(tp); + goto fail; + } + GATHER_STATISTIC( ++my_counters.proxies_stolen ); + } + t->prefix().extra_state |= es_task_is_stolen; + if( is_version_3_task(*t) ) { + my_innermost_running_task = t; + t->prefix().owner = this; + t->note_affinity( my_affinity_id ); + } + GATHER_STATISTIC( ++my_counters.steals_committed ); + } // end of stealing branch + else + goto fail; + // A task was successfully obtained somewhere + __TBB_ASSERT(t,NULL); +#if __TBB_SCHEDULER_OBSERVER + my_arena->my_observers.notify_entry_observers( my_last_local_observer, is_worker() ); + the_global_observer_list.notify_entry_observers( my_last_global_observer, is_worker() ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + if ( SchedulerTraits::itt_possible && failure_count != -1 ) { + // FIXME - might be victim, or might be selected from a mailbox + // Notify Intel(R) Thread Profiler that thread has stopped spinning. + ITT_NOTIFY(sync_acquired, this); + } + break; // exit stealing loop and return +fail: + GATHER_STATISTIC( ++my_counters.steals_failed ); + if( SchedulerTraits::itt_possible && failure_count==-1 ) { + // The first attempt to steal work failed, so notify Intel(R) Thread Profiler that + // the thread has started spinning. Ideally, we would do this notification + // *before* the first failed attempt to steal, but at that point we do not + // know that the steal will fail. + ITT_NOTIFY(sync_prepare, this); + failure_count = 0; + } + // Pause, even if we are going to yield, because the yield might return immediately. + __TBB_Pause(PauseTime); + const int failure_threshold = 2*int(n); + if( failure_count>=failure_threshold ) { +#if __TBB_YIELD2P + failure_count = 0; +#else + failure_count = failure_threshold; +#endif + __TBB_Yield(); +#if __TBB_TASK_PRIORITY + // Check if there are tasks abandoned by other workers + if ( my_arena->my_orphaned_tasks ) { + // Epoch must be advanced before seizing the list pointer + ++my_arena->my_abandonment_epoch; + task* orphans = (task*)__TBB_FetchAndStoreW( &my_arena->my_orphaned_tasks, 0 ); + if ( orphans ) { + task** link = NULL; + // Get local counter out of the way (we've just brought in external tasks) + my_local_reload_epoch = 0; + t = reload_tasks( orphans, link, effective_reference_priority() ); + if ( orphans ) { + *link = my_offloaded_tasks; + if ( !my_offloaded_tasks ) + my_offloaded_task_list_tail_link = link; + my_offloaded_tasks = orphans; + } + __TBB_ASSERT( !my_offloaded_tasks == !my_offloaded_task_list_tail_link, NULL ); + if ( t ) { + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_cancel, this); + break; // exit stealing loop and return + } + } + } +#endif /* __TBB_TASK_PRIORITY */ + const int yield_threshold = 100; + if( yield_count++ >= yield_threshold ) { + // When a worker thread has nothing to do, return it to RML. + // For purposes of affinity support, the thread is considered idle while in RML. +#if __TBB_TASK_PRIORITY + if( return_if_no_work || my_arena->my_top_priority > my_arena->my_bottom_priority ) { + if ( my_arena->is_out_of_work() && return_if_no_work ) { +#else /* !__TBB_TASK_PRIORITY */ + if ( return_if_no_work && my_arena->is_out_of_work() ) { +#endif /* !__TBB_TASK_PRIORITY */ + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_cancel, this); + return NULL; + } +#if __TBB_TASK_PRIORITY + } + if ( my_offloaded_tasks ) { + // Safeguard against any sloppiness in managing reload epoch + // counter (e.g. on the hot path bacause of performance reasons). + my_local_reload_epoch = 0; + // Break the deadlock caused by a higher priority dispatch loop + // stealing and offloading a lower priority task. Priority check + // at the stealing moment cannot completely preclude such cases + // because priorities can changes dynamically. + if ( !return_if_no_work && *my_ref_top_priority > my_arena->my_top_priority ) { + GATHER_STATISTIC( ++my_counters.prio_ref_fixups ); + my_ref_top_priority = &my_arena->my_top_priority; + my_ref_reload_epoch = &my_arena->my_reload_epoch; + } + } +#endif /* __TBB_TASK_PRIORITY */ + } // end of arena snapshot branch + } // end of yielding branch + } // end of nonlocal task retrieval loop + my_inbox.set_is_idle( false ); + return t; +} + +template<typename SchedulerTraits> +void custom_scheduler<SchedulerTraits>::local_wait_for_all( task& parent, task* child ) { + __TBB_ASSERT( governor::is_set(this), NULL ); + __TBB_ASSERT( parent.ref_count() >= (child && child->parent() == &parent ? 2 : 1), "ref_count is too small" ); + assert_task_pool_valid(); + // Using parent's refcount in sync_prepare (in the stealing loop below) is + // a workaround for TP. We need to name it here to display correctly in Ampl. + if( SchedulerTraits::itt_possible ) + ITT_SYNC_CREATE(&parent.prefix().ref_count, SyncType_Scheduler, SyncObj_TaskStealingLoop); +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( parent.prefix().context || (is_worker() && &parent == my_dummy_task), "parent task does not have context" ); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + task* t = child; + // Constant all_local_work_done is an unreacheable refcount value that prevents + // early quitting the dispatch loop. It is defined to be in the middle of the range + // of negative values representable by the reference_count type. + static const reference_count + // For normal dispatch loops + parents_work_done = 1, + // For termination dispatch loops in masters + all_local_work_done = (reference_count)3 << (sizeof(reference_count) * 8 - 2); + reference_count quit_point; +#if __TBB_TASK_PRIORITY + __TBB_ASSERT( (uintptr_t)*my_ref_top_priority < (uintptr_t)num_priority_levels, NULL ); + volatile intptr_t *old_ref_top_priority = my_ref_top_priority; + // When entering nested parallelism level market level counter + // must be replaced with the one local to this arena. + volatile uintptr_t *old_ref_reload_epoch = my_ref_reload_epoch; +#endif /* __TBB_TASK_PRIORITY */ + task* old_dispatching_task = my_dispatching_task; + my_dispatching_task = my_innermost_running_task; + if( master_outermost_level() ) { + // We are in the outermost task dispatch loop of a master thread or a worker which mimics master + __TBB_ASSERT( !is_worker() || my_dispatching_task != old_dispatching_task, NULL ); + quit_point = &parent == my_dummy_task ? all_local_work_done : parents_work_done; + } else { + quit_point = parents_work_done; +#if __TBB_TASK_PRIORITY + if ( &parent != my_dummy_task ) { + // We are in a nested dispatch loop. + // Market or arena priority must not prevent child tasks from being + // executed so that dynamic priority changes did not cause deadlock. + my_ref_top_priority = &parent.prefix().context->my_priority; + my_ref_reload_epoch = &my_arena->my_reload_epoch; + } +#endif /* __TBB_TASK_PRIORITY */ + } +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + // Infinite safeguard EH loop + for (;;) { + try { +#endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ + // Outer loop receives tasks from global environment (via mailbox, FIFO queue(s), + // and by stealing from other threads' task pools). + // All exit points from the dispatch loop are located in its immediate scope. + for(;;) { + // Middle loop retrieves tasks from the local task pool. + do { + // Inner loop evaluates tasks coming from nesting loops and those returned + // by just executed tasks (bypassing spawn or enqueue calls). + while(t) { + __TBB_ASSERT( my_inbox.is_idle_state(false), NULL ); + __TBB_ASSERT(!is_proxy(*t),"unexpected proxy"); + __TBB_ASSERT( t->prefix().owner, NULL ); + assert_task_valid(*t); +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_ASSERT + if ( !t->prefix().context->my_cancellation_requested ) +#endif + __TBB_ASSERT( 1L<<t->state() & (1L<<task::allocated|1L<<task::ready|1L<<task::reexecute), NULL ); + assert_task_pool_valid(); +#if __TBB_TASK_PRIORITY + intptr_t p = priority(*t); + if ( p != *my_ref_top_priority && (t->prefix().extra_state & es_task_enqueued) == 0) { + assert_priority_valid(p); + if ( p != my_arena->my_top_priority ) { + my_market->update_arena_priority( *my_arena, p ); + } + if ( p < effective_reference_priority() ) { + if ( !my_offloaded_tasks ) { + my_offloaded_task_list_tail_link = &t->prefix().next_offloaded; + // Erase possible reference to the owner scheduler (next_offloaded is a union member) + *my_offloaded_task_list_tail_link = NULL; + } + offload_task( *t, p ); + if ( in_arena() ) { + t = winnow_task_pool(); + if ( t ) + continue; + } + else { + // Mark arena as full to unlock arena priority level adjustment + // by arena::is_out_of_work(), and ensure worker's presence. + my_arena->advertise_new_work<false>(); + } + goto stealing_ground; + } + } +#endif /* __TBB_TASK_PRIORITY */ + task* t_next = NULL; + my_innermost_running_task = t; + t->prefix().owner = this; + t->prefix().state = task::executing; +#if __TBB_TASK_GROUP_CONTEXT + if ( !t->prefix().context->my_cancellation_requested ) +#endif + { + GATHER_STATISTIC( ++my_counters.tasks_executed ); + GATHER_STATISTIC( my_counters.avg_arena_concurrency += my_arena->num_workers_active() ); + GATHER_STATISTIC( my_counters.avg_assigned_workers += my_arena->my_num_workers_allotted ); +#if __TBB_TASK_PRIORITY + GATHER_STATISTIC( my_counters.avg_arena_prio += p ); + GATHER_STATISTIC( my_counters.avg_market_prio += my_market->my_global_top_priority ); +#endif /* __TBB_TASK_PRIORITY */ + ITT_STACK(SchedulerTraits::itt_possible, callee_enter, t->prefix().context->itt_caller); + t_next = t->execute(); + ITT_STACK(SchedulerTraits::itt_possible, callee_leave, t->prefix().context->itt_caller); + if (t_next) { + __TBB_ASSERT( t_next->state()==task::allocated, + "if task::execute() returns task, it must be marked as allocated" ); + reset_extra_state(t_next); +#if TBB_USE_ASSERT + affinity_id next_affinity=t_next->prefix().affinity; + if (next_affinity != 0 && next_affinity != my_affinity_id) + GATHER_STATISTIC( ++my_counters.affinity_ignored ); +#endif + } + } + assert_task_pool_valid(); + switch( t->state() ) { + case task::executing: { + task* s = t->parent(); + __TBB_ASSERT( my_innermost_running_task==t, NULL ); + __TBB_ASSERT( t->prefix().ref_count==0, "Task still has children after it has been executed" ); + t->~task(); + if( s ) + tally_completion_of_predecessor(*s, t_next); + free_task<no_hint>( *t ); + assert_task_pool_valid(); + break; + } + + case task::recycle: // set by recycle_as_safe_continuation() + t->prefix().state = task::allocated; +#if __TBB_RECYCLE_TO_ENQUEUE + case task::to_enqueue: // set by recycle_to_enqueue() +#endif + __TBB_ASSERT( t_next != t, "a task returned from method execute() can not be recycled in another way" ); + reset_extra_state(t); + // for safe continuation, need atomically decrement ref_count; + tally_completion_of_predecessor(*t, t_next); + assert_task_pool_valid(); + break; + + case task::reexecute: // set by recycle_to_reexecute() + __TBB_ASSERT( t_next, "reexecution requires that method execute() return another task" ); + __TBB_ASSERT( t_next != t, "a task returned from method execute() can not be recycled in another way" ); + t->prefix().state = task::allocated; + reset_extra_state(t); + local_spawn( *t, t->prefix().next ); + assert_task_pool_valid(); + break; + case task::allocated: + reset_extra_state(t); + break; +#if TBB_USE_ASSERT + case task::ready: + __TBB_ASSERT( false, "task is in READY state upon return from method execute()" ); + break; + default: + __TBB_ASSERT( false, "illegal state" ); +#else + default: // just to shut up some compilation warnings + break; +#endif /* TBB_USE_ASSERT */ + } + GATHER_STATISTIC( t_next ? ++my_counters.spawns_bypassed : 0 ); + t = t_next; + } // end of scheduler bypass loop + + assert_task_pool_valid(); + if ( parent.prefix().ref_count == quit_point ) { + __TBB_ASSERT( quit_point != all_local_work_done, NULL ); + __TBB_control_consistency_helper(); // on ref_count + ITT_NOTIFY(sync_acquired, &parent.prefix().ref_count); + goto done; + } + if ( in_arena() ) { + t = get_task(); + } + else { + __TBB_ASSERT( is_quiescent_local_task_pool_reset(), NULL ); + break; + } + __TBB_ASSERT(!t || !is_proxy(*t),"unexpected proxy"); + assert_task_pool_valid(); + } while( t ); // end of local task pool retrieval loop + +#if __TBB_TASK_PRIORITY +stealing_ground: +#endif /* __TBB_TASK_PRIORITY */ +#if __TBB_HOARD_NONLOCAL_TASKS + // before stealing, previously stolen task objects are returned + for (; my_nonlocal_free_list; my_nonlocal_free_list = t ) { + t = my_nonlocal_free_list->prefix().next; + free_nonlocal_small_task( *my_nonlocal_free_list ); + } +#endif + if ( quit_point == all_local_work_done ) { + __TBB_ASSERT( !in_arena() && is_quiescent_local_task_pool_reset(), NULL ); + my_innermost_running_task = my_dispatching_task; + my_dispatching_task = old_dispatching_task; +#if __TBB_TASK_PRIORITY + my_ref_top_priority = old_ref_top_priority; + my_ref_reload_epoch = old_ref_reload_epoch; +#endif /* __TBB_TASK_PRIORITY */ + return; + } + // The following assertion may be falsely triggered in the presence of enqueued tasks + //__TBB_ASSERT( my_arena->my_max_num_workers > 0 || my_market->my_ref_count > 1 + // || parent.prefix().ref_count == 1, "deadlock detected" ); + + // Dispatching task pointer is NULL *iff* this is a worker thread in its outermost + // dispatch loop (i.e. its execution stack is empty). In this case it should exit it + // either when there is no more work in the current arena, or when revoked by the market. + t = receive_or_steal_task( parent.prefix().ref_count, worker_outermost_level() ); + if ( !t ) + goto done; + __TBB_ASSERT(!is_proxy(*t),"unexpected proxy"); + } // end of infinite stealing loop +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + __TBB_ASSERT( false, "Must never get here" ); + } // end of try-block + TbbCatchAll( t->prefix().context ); + // Complete post-processing ... + if( t->state() == task::recycle +#if __TBB_RECYCLE_TO_ENQUEUE + // TODO: the enqueue semantics gets lost below, consider reimplementing + || t->state() == task::to_enqueue +#endif + ) { + // ... for recycled tasks to atomically decrement ref_count + t->prefix().state = task::allocated; + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_releasing, &t->prefix().ref_count); + if( __TBB_FetchAndDecrementWrelease(&t->prefix().ref_count)==1 ) { + if( SchedulerTraits::itt_possible ) + ITT_NOTIFY(sync_acquired, &t->prefix().ref_count); + }else{ + t = NULL; + } + } + } // end of infinite EH loop + __TBB_ASSERT( false, "Must never get here too" ); +#endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ +done: + my_innermost_running_task = my_dispatching_task; + my_dispatching_task = old_dispatching_task; +#if __TBB_TASK_PRIORITY + my_ref_top_priority = old_ref_top_priority; + my_ref_reload_epoch = old_ref_reload_epoch; +#endif /* __TBB_TASK_PRIORITY */ + if ( !ConcurrentWaitsEnabled(parent) ) { + if ( parent.prefix().ref_count != parents_work_done ) { + // This is a worker that was revoked by the market. +#if __TBB_TASK_ARENA + __TBB_ASSERT( worker_outermost_level(), + "Worker thread exits nested dispatch loop prematurely" ); +#else + __TBB_ASSERT( is_worker() && worker_outermost_level(), + "Worker thread exits nested dispatch loop prematurely" ); +#endif + return; + } + parent.prefix().ref_count = 0; + } +#if TBB_USE_ASSERT + parent.prefix().extra_state &= ~es_ref_count_active; +#endif /* TBB_USE_ASSERT */ +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT(parent.prefix().context && default_context(), NULL); + task_group_context* parent_ctx = parent.prefix().context; + if ( parent_ctx->my_cancellation_requested ) { + task_group_context::exception_container_type *pe = parent_ctx->my_exception; + if ( master_outermost_level() && parent_ctx == default_context() ) { + // We are in the outermost task dispatch loop of a master thread, and + // the whole task tree has been collapsed. So we may clear cancellation data. + parent_ctx->my_cancellation_requested = 0; + // TODO: Add assertion that master's dummy task context does not have children + parent_ctx->my_state &= ~(uintptr_t)task_group_context::may_have_children; + } + if ( pe ) + pe->throw_self(); + } + __TBB_ASSERT(!is_worker() || !CancellationInfoPresent(*my_dummy_task), + "Worker's dummy task context modified"); + __TBB_ASSERT(!master_outermost_level() || !CancellationInfoPresent(*my_dummy_task), + "Unexpected exception or cancellation data in the master's dummy task"); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + assert_task_pool_valid(); +} + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_custom_scheduler_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.cpp new file mode 100644 index 0000000000..32e9243922 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.cpp @@ -0,0 +1,517 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "dynamic_link.h" +#include "tbb/tbb_config.h" + +/* + This file is used by both TBB and OpenMP RTL. Do not use __TBB_ASSERT() macro + and runtime_warning() function because they are not available in OpenMP. Use + LIBRARY_ASSERT and DYNAMIC_LINK_WARNING instead. +*/ + +#include <cstdarg> // va_list etc. +#if _WIN32 + #include <malloc.h> + + // Unify system calls + #define dlopen( name, flags ) LoadLibrary( name ) + #define dlsym( handle, name ) GetProcAddress( handle, name ) + #define dlclose( handle ) ( ! FreeLibrary( handle ) ) + #define dlerror() GetLastError() +#ifndef PATH_MAX + #define PATH_MAX MAX_PATH +#endif +#else /* _WIN32 */ + #include <dlfcn.h> + #include <string.h> + #include <unistd.h> + #include <limits.h> + #include <stdlib.h> +#endif /* _WIN32 */ + +#if __TBB_WEAK_SYMBOLS_PRESENT + //TODO: use function attribute for weak symbols instead of the pragma. + #pragma weak dlopen + #pragma weak dlsym + #pragma weak dlclose + #pragma weak dlerror + #pragma weak dladdr +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + +#include "tbb/tbb_misc.h" + +#define __USE_TBB_ATOMICS ( !(__linux__&&__ia64__) || __TBB_BUILD ) + +#if !__USE_TBB_ATOMICS +#include <pthread.h> +#endif + +OPEN_INTERNAL_NAMESPACE + +#if __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED + +#if !defined(DYNAMIC_LINK_WARNING) + // Report runtime errors and continue. + #define DYNAMIC_LINK_WARNING dynamic_link_warning + static void dynamic_link_warning( dynamic_link_error_t code, ... ) { + (void) code; + } // library_warning +#endif /* DYNAMIC_LINK_WARNING */ + static bool resolve_symbols( dynamic_link_handle module, const dynamic_link_descriptor descriptors[], size_t required ) + { + LIBRARY_ASSERT( module != NULL, "Module handle is NULL" ); + if ( module == NULL ) + return false; + + #if __TBB_WEAK_SYMBOLS_PRESENT + if ( !dlsym ) return false; + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + + const size_t n_desc=20; // Usually we don't have more than 20 descriptors per library + LIBRARY_ASSERT( required <= n_desc, "Too many descriptors is required" ); + if ( required > n_desc ) return false; + pointer_to_handler h[n_desc]; + + for ( size_t k = 0; k < required; ++k ) { + dynamic_link_descriptor const & desc = descriptors[k]; + pointer_to_handler addr = (pointer_to_handler)dlsym( module, desc.name ); + if ( !addr ) { + DYNAMIC_LINK_WARNING( dl_sym_not_found, desc.name, dlerror() ); + return false; + } + h[k] = addr; + } + + // Commit the entry points. + // Cannot use memset here, because the writes must be atomic. + for( size_t k = 0; k < required; ++k ) + *descriptors[k].handler = h[k]; + return true; + } + +#if __TBB_WIN8UI_SUPPORT + bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required, dynamic_link_handle*, int flags ) { + dynamic_link_handle tmp_handle = NULL; + TCHAR wlibrary[256]; + if ( MultiByteToWideChar(CP_UTF8, 0, library, -1, wlibrary, 255) == 0 ) return false; + if ( flags & DYNAMIC_LINK_LOAD ) + tmp_handle = LoadPackagedLibrary( wlibrary, 0 ); + if (tmp_handle != NULL){ + return resolve_symbols(tmp_handle, descriptors, required); + }else{ + return false; + } + } + void dynamic_unlink( dynamic_link_handle ) { + } + void dynamic_unlink_all() { + } +#else +/* + There is a security issue on Windows: LoadLibrary() may load and execute malicious code. + See http://www.microsoft.com/technet/security/advisory/2269637.mspx for details. + To avoid the issue, we have to pass full path (not just library name) to LoadLibrary. This + function constructs full path to the specified library (it is assumed the library located + side-by-side with the tbb.dll. + + The function constructs absolute path for given relative path. Important: Base directory is not + current one, it is the directory tbb.dll loaded from. + + Example: + Let us assume "tbb.dll" is located in "c:\program files\common\intel\" directory, e. g. + absolute path of tbb library is "c:\program files\common\intel\tbb.dll". Absolute path for + "tbbmalloc.dll" would be "c:\program files\common\intel\tbbmalloc.dll". Absolute path for + "malloc\tbbmalloc.dll" would be "c:\program files\common\intel\malloc\tbbmalloc.dll". +*/ + + // Struct handle_storage is used by dynamic_link routine to store handles of + // all loaded or pinned dynamic libraries. When TBB is shut down, it calls + // dynamic_unlink_all() that unloads modules referenced by handle_storage. + // This struct should not have any constructors since it may be used before + // the constructor is called. + #define MAX_LOADED_MODULES 8 // The number of maximum possible modules which can be loaded + + struct handle_storage { + #if __USE_TBB_ATOMICS + ::tbb::atomic<size_t> my_size; + #else + size_t my_size; + pthread_spinlock_t my_lock; + #endif + dynamic_link_handle my_handles[MAX_LOADED_MODULES]; + + void add_handle(const dynamic_link_handle &handle) { + #if !__USE_TBB_ATOMICS + int res = pthread_spin_lock( &my_lock ); + LIBRARY_ASSERT( res==0, "pthread_spin_lock failed" ); + #endif + const size_t ind = my_size++; + #if !__USE_TBB_ATOMICS + res = pthread_spin_unlock( &my_lock ); + LIBRARY_ASSERT( res==0, "pthread_spin_unlock failed" ); + #endif + LIBRARY_ASSERT( ind < MAX_LOADED_MODULES, "Too many modules are loaded" ); + my_handles[ind] = handle; + } + + void free_handles() { + const size_t size = my_size; + for (size_t i=0; i<size; ++i) + dynamic_unlink( my_handles[i] ); + } + }; + + handle_storage handles; + +#if __USE_TBB_ATOMICS + static void atomic_once ( void (*func) (void), tbb::atomic< tbb::internal::do_once_state > &once_state ) { + tbb::internal::atomic_do_once( func, once_state ); + } +#define ATOMIC_ONCE_DECL( var ) tbb::atomic< tbb::internal::do_once_state > var +#else + static void atomic_once ( void (*func) (), pthread_once_t &once_state ) { + pthread_once( &once_state, func ); + } +#define ATOMIC_ONCE_DECL( var ) pthread_once_t var = PTHREAD_ONCE_INIT +#endif + + ATOMIC_ONCE_DECL( init_dl_data_state ); + + static struct _ap_data { + char _path[PATH_MAX+1]; + size_t _len; + } ap_data; + + static void init_ap_data() { + #if _WIN32 + // Get handle of our DLL first. + HMODULE handle; + BOOL brc = GetModuleHandleEx( + GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, + (LPCSTR)( & dynamic_link ), // any function inside the library can be used for the address + & handle + ); + if ( !brc ) { // Error occurred. + int err = GetLastError(); + DYNAMIC_LINK_WARNING( dl_sys_fail, "GetModuleHandleEx", err ); + return; + } + // Now get path to our DLL. + DWORD drc = GetModuleFileName( handle, ap_data._path, static_cast< DWORD >( PATH_MAX ) ); + if ( drc == 0 ) { // Error occurred. + int err = GetLastError(); + DYNAMIC_LINK_WARNING( dl_sys_fail, "GetModuleFileName", err ); + return; + } + if ( drc >= PATH_MAX ) { // Buffer too short. + DYNAMIC_LINK_WARNING( dl_buff_too_small ); + return; + } + // Find the position of the last backslash. + char *backslash = strrchr( ap_data._path, '\\' ); + + if ( !backslash ) { // Backslash not found. + LIBRARY_ASSERT( backslash!=NULL, "Unbelievable."); + return; + } + LIBRARY_ASSERT( backslash >= ap_data._path, "Unbelievable."); + ap_data._len = (size_t)(backslash - ap_data._path) + 1; + *(backslash+1) = 0; + #else + // Get the library path + #if __TBB_WEAK_SYMBOLS_PRESENT + if ( !dladdr || !dlerror ) return; + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + Dl_info dlinfo; + int res = dladdr( (void*)&dynamic_link, &dlinfo ); // any function inside the library can be used for the address + if ( !res ) { + char const * err = dlerror(); + DYNAMIC_LINK_WARNING( dl_sys_fail, "dladdr", err ); + return; + } else { + LIBRARY_ASSERT( dlinfo.dli_fname!=NULL, "Unbelievable." ); + } + + char const *slash = strrchr( dlinfo.dli_fname, '/' ); + size_t fname_len=0; + if ( slash ) { + LIBRARY_ASSERT( slash >= dlinfo.dli_fname, "Unbelievable."); + fname_len = (size_t)(slash - dlinfo.dli_fname) + 1; + } + + size_t rc; + if ( dlinfo.dli_fname[0]=='/' ) { + // The library path is absolute + rc = 0; + ap_data._len = 0; + } else { + // The library path is relative so get the current working directory + if ( !getcwd( ap_data._path, sizeof(ap_data._path)/sizeof(ap_data._path[0]) ) ) { + DYNAMIC_LINK_WARNING( dl_buff_too_small ); + return; + } + ap_data._len = strlen( ap_data._path ); + ap_data._path[ap_data._len++]='/'; + rc = ap_data._len; + } + + if ( fname_len>0 ) { + if ( ap_data._len>PATH_MAX ) { + DYNAMIC_LINK_WARNING( dl_buff_too_small ); + ap_data._len=0; + return; + } + strncpy( ap_data._path+rc, dlinfo.dli_fname, fname_len ); + ap_data._len += fname_len; + ap_data._path[ap_data._len]=0; + } + #endif /* _WIN32 */ + } + + static void init_dl_data() { + init_ap_data(); + #if !__USE_TBB_ATOMICS + int res; + res = pthread_spin_init( &handles.my_lock, PTHREAD_PROCESS_SHARED ); + LIBRARY_ASSERT( res==0, "pthread_spin_init failed" ); + #endif + } + + // ap_data structure is initialized with current directory on Linux. + // So it should be initialized as soon as possible since the current directory may be changed. + // static_init_ap_data object provides this initialization during library loading. + static class _static_init_dl_data { + public: + _static_init_dl_data() { + atomic_once( &init_dl_data, init_dl_data_state ); + } + #if !__USE_TBB_ATOMICS + ~_static_init_dl_data() { + int res; + res = pthread_spin_destroy( &handles.my_lock ); + LIBRARY_ASSERT( res==0, "pthread_spin_destroy failed" ); + } + #endif + } static_init_dl_data; + + /* + The function constructs absolute path for given relative path. Important: Base directory is not + current one, it is the directory libtbb.so loaded from. + + Arguments: + in name -- Name of a file (may be with relative path; it must not be an absolute one). + out path -- Buffer to save result (absolute path) to. + in len -- Size of buffer. + ret -- 0 -- Error occurred. + > len -- Buffer too short, required size returned. + otherwise -- Ok, number of characters (not counting terminating null) written to + buffer. + */ + #if __TBB_DYNAMIC_LOAD_ENABLED + static size_t abs_path( char const * name, char * path, size_t len ) { + atomic_once( &init_dl_data, init_dl_data_state ); + + if ( !ap_data._len ) + return 0; + + size_t name_len = strlen( name ); + size_t full_len = name_len+ap_data._len; + if ( full_len < len ) { + strncpy( path, ap_data._path, ap_data._len ); + strncpy( path+ap_data._len, name, name_len ); + path[full_len] = 0; + } + return full_len; + } + #endif // __TBB_DYNAMIC_LOAD_ENABLED + + #if __TBB_WEAK_SYMBOLS_PRESENT + static bool weak_symbol_link( const dynamic_link_descriptor descriptors[], size_t required ) + { + // Check if the required entries are present in what was loaded into our process. + for ( size_t k = 0; k < required; ++k ) + if ( !descriptors[k].ptr ) + return false; + // Commit the entry points. + for ( size_t k = 0; k < required; ++k ) + *descriptors[k].handler = (pointer_to_handler) descriptors[k].ptr; + return true; + } + #else + static bool weak_symbol_link( const dynamic_link_descriptor[], size_t ) { + return false; + } + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + + void dynamic_unlink( dynamic_link_handle handle ) { + if ( handle ) { + #if __TBB_WEAK_SYMBOLS_PRESENT + LIBRARY_ASSERT( dlclose != NULL, "dlopen is present but dlclose is NOT present!?" ); + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + #if __TBB_DYNAMIC_LOAD_ENABLED + dlclose( handle ); + #endif /* __TBB_DYNAMIC_LOAD_ENABLED */ + } + } + + void dynamic_unlink_all() { + handles.free_handles(); + } + + #if !_WIN32 + // It is supposed that all symbols are from the only one library + static dynamic_link_handle pin_symbols( dynamic_link_descriptor desc, const dynamic_link_descriptor descriptors[], size_t required ) { + // The library has been loaded by another module and contains at least one requested symbol. + // But after we obtained the symbol the library can be unloaded by another thread + // invalidating our symbol. Therefore we need to pin the library in memory. + dynamic_link_handle library_handle; + Dl_info info; + // Get library's name from earlier found symbol + if ( dladdr( (void*)*desc.handler, &info ) ) { + // Pin the library + library_handle = dlopen( info.dli_fname, RTLD_LAZY ); + if ( library_handle ) { + // If original library was unloaded before we pinned it + // and then another module loaded in its place, the earlier + // found symbol would become invalid. So revalidate them. + if ( !resolve_symbols( library_handle, descriptors, required ) ) { + // Wrong library. + dynamic_unlink(library_handle); + library_handle = 0; + } + } else { + char const * err = dlerror(); + DYNAMIC_LINK_WARNING( dl_lib_not_found, info.dli_fname, err ); + } + } + else { + // The library have been unloaded by another thread + library_handle = 0; + } + return library_handle; + } + #endif /* _WIN32 */ + + static dynamic_link_handle global_symbols_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required ) { + #if _WIN32 + dynamic_link_handle library_handle; + if ( GetModuleHandleEx( 0, library, &library_handle ) ) { + if ( resolve_symbols( library_handle, descriptors, required ) ) + return library_handle; + else + FreeLibrary( library_handle ); + } + #else /* _WIN32 */ + #if __TBB_WEAK_SYMBOLS_PRESENT + if ( !dlopen ) return 0; + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + dynamic_link_handle library_handle = dlopen( NULL, RTLD_LAZY ); + // Check existence of only the first symbol, then use it to find the library and load all necessary symbols + dynamic_link_descriptor desc = descriptors[0]; + if ( resolve_symbols( library_handle, &desc, 1 ) ) + return pin_symbols( desc, descriptors, required ); + #endif /* _WIN32 */ + return 0; + } + + static void save_library_handle( dynamic_link_handle src, dynamic_link_handle *dst ) { + if ( dst ) + *dst = src; + else + handles.add_handle( src ); + } + + dynamic_link_handle dynamic_load( const char* library, const dynamic_link_descriptor descriptors[], size_t required ) { + #if __TBB_DYNAMIC_LOAD_ENABLED + #if _XBOX + return LoadLibrary (library); + #else /* _XBOX */ + size_t const len = PATH_MAX + 1; + char path[ len ]; + size_t rc = abs_path( library, path, len ); + if ( 0 < rc && rc < len ) { + #if _WIN32 + // Prevent Windows from displaying silly message boxes if it fails to load library + // (e.g. because of MS runtime problems - one of those crazy manifest related ones) + UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS); + #endif /* _WIN32 */ + #if __TBB_WEAK_SYMBOLS_PRESENT + if ( !dlopen ) return 0; + #endif /* __TBB_WEAK_SYMBOLS_PRESENT */ + dynamic_link_handle library_handle = dlopen( path, RTLD_LAZY ); + #if _WIN32 + SetErrorMode (prev_mode); + #endif /* _WIN32 */ + if( library_handle ) { + if( !resolve_symbols( library_handle, descriptors, required ) ) { + // The loaded library does not contain all the expected entry points + dynamic_unlink( library_handle ); + library_handle = NULL; + } + } else + DYNAMIC_LINK_WARNING( dl_lib_not_found, path, dlerror() ); + return library_handle; + } else if ( rc>=len ) + DYNAMIC_LINK_WARNING( dl_buff_too_small ); + // rc == 0 means failing of init_ap_data so the warning has already been issued. + #endif /* _XBOX */ + #endif /* __TBB_DYNAMIC_LOAD_ENABLED */ + return 0; + } + + bool dynamic_link( const char* library, const dynamic_link_descriptor descriptors[], size_t required, dynamic_link_handle *handle, int flags ) { + // TODO: May global_symbols_link find weak symbols? + dynamic_link_handle library_handle = ( flags & DYNAMIC_LINK_GLOBAL ) ? global_symbols_link( library, descriptors, required ) : 0; + + if ( !library_handle && ( flags & DYNAMIC_LINK_LOAD ) ) + library_handle = dynamic_load( library, descriptors, required ); + + if ( !library_handle && ( flags & DYNAMIC_LINK_WEAK ) ) + return weak_symbol_link( descriptors, required ); + + save_library_handle( library_handle, handle ); + return true; + } + +#endif /*__TBB_WIN8UI_SUPPORT*/ +#else /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */ + bool dynamic_link( const char*, const dynamic_link_descriptor*, size_t, dynamic_link_handle *handle, int ) { + if ( handle ) + *handle=0; + return false; + } + + void dynamic_unlink( dynamic_link_handle ) { + } + + void dynamic_unlink_all() { + } +#endif /* __TBB_WEAK_SYMBOLS_PRESENT || __TBB_DYNAMIC_LOAD_ENABLED */ + +CLOSE_INTERNAL_NAMESPACE diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.h new file mode 100644 index 0000000000..21ac95a406 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/dynamic_link.h @@ -0,0 +1,121 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_dynamic_link +#define __TBB_dynamic_link + +// Support for dynamic loading entry points from other shared libraries. + +#include "tbb/tbb_stddef.h" + +#ifndef LIBRARY_ASSERT + #define LIBRARY_ASSERT(x,y) __TBB_ASSERT(x,y) +#endif /* !LIBRARY_ASSERT */ + +/** By default, symbols declared and defined here go into namespace tbb::internal. + To put them in other namespace, define macros OPEN_INTERNAL_NAMESPACE + and CLOSE_INTERNAL_NAMESPACE to override the following default definitions. **/ +#ifndef OPEN_INTERNAL_NAMESPACE +#define OPEN_INTERNAL_NAMESPACE namespace tbb { namespace internal { +#define CLOSE_INTERNAL_NAMESPACE }} +#endif /* OPEN_INTERNAL_NAMESPACE */ + +#include <stddef.h> +#if _WIN32 +#include "tbb/machine/windows_api.h" +#endif /* _WIN32 */ + +OPEN_INTERNAL_NAMESPACE + +//! Type definition for a pointer to a void somefunc(void) +typedef void (*pointer_to_handler)(); + +//! The helper to construct dynamic_link_descriptor structure +// Double cast through the void* in DLD macro is necessary to +// prevent warnings from some compilers (g++ 4.1) +#if __TBB_WEAK_SYMBOLS_PRESENT +#define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h), (pointer_to_handler)&s} +#else +#define DLD(s,h) {#s, (pointer_to_handler*)(void*)(&h)} +#endif /* __TBB_WEAK_SYMBOLS_PRESENT */ +//! Association between a handler name and location of pointer to it. +struct dynamic_link_descriptor { + //! Name of the handler + const char* name; + //! Pointer to the handler + pointer_to_handler* handler; +#if __TBB_WEAK_SYMBOLS_PRESENT + //! Weak symbol + pointer_to_handler ptr; +#endif +}; + +#if _WIN32 +typedef HMODULE dynamic_link_handle; +#else +typedef void* dynamic_link_handle; +#endif /* _WIN32 */ + +const int DYNAMIC_LINK_GLOBAL = 0x01; +const int DYNAMIC_LINK_LOAD = 0x02; +const int DYNAMIC_LINK_WEAK = 0x04; +const int DYNAMIC_LINK_ALL = DYNAMIC_LINK_GLOBAL | DYNAMIC_LINK_LOAD | DYNAMIC_LINK_WEAK; + +//! Fill in dynamically linked handlers. +/** 'required' is the number of the initial entries in the array descriptors[] + that have to be found in order for the call to succeed. If the library and + all the required handlers are found, then the corresponding handler pointers + are set, and the return value is true. Otherwise the original array of + descriptors is left untouched and the return value is false. 'required' is + limited by 20 (exceeding of this value will result in failure to load the + symbols and the return value will be false). + 'dl_allowed' flag allows dynamic library loading if the global symbols + searching mechanism has failed. +**/ +bool dynamic_link( const char* library, + const dynamic_link_descriptor descriptors[], + size_t required, + dynamic_link_handle* handle = 0, + int flags = DYNAMIC_LINK_ALL ); + +void dynamic_unlink( dynamic_link_handle handle ); + +void dynamic_unlink_all(); + +enum dynamic_link_error_t { + dl_success = 0, + dl_lib_not_found, // char const * lib, dlerr_t err + dl_sym_not_found, // char const * sym, dlerr_t err + // Note: dlerr_t depends on OS: it is char const * on Linux and Mac, int on Windows. + dl_sys_fail, // char const * func, int err + dl_buff_too_small // none +}; // dynamic_link_error_t + +CLOSE_INTERNAL_NAMESPACE + +#endif /* __TBB_dynamic_link */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.cpp new file mode 100644 index 0000000000..0f2b469a97 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.cpp @@ -0,0 +1,353 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <stdio.h> +#include <stdlib.h> +#include "governor.h" +#include "tbb_main.h" +#include "scheduler.h" +#include "market.h" +#include "arena.h" + +#include "tbb/task_scheduler_init.h" + +#include "dynamic_link.h" + +namespace tbb { +namespace internal { + +//------------------------------------------------------------------------ +// governor +//------------------------------------------------------------------------ + +#if __TBB_SURVIVE_THREAD_SWITCH +// Support for interoperability with Intel(R) Cilk(tm) Plus. + +#if _WIN32 +#define CILKLIB_NAME "cilkrts20.dll" +#else +#define CILKLIB_NAME "libcilkrts.so" +#endif + +//! Handler for interoperation with cilkrts library. +static __cilk_tbb_retcode (*watch_stack_handler)(struct __cilk_tbb_unwatch_thunk* u, + struct __cilk_tbb_stack_op_thunk o); + +//! Table describing how to link the handlers. +static const dynamic_link_descriptor CilkLinkTable[] = { + { "__cilkrts_watch_stack", (pointer_to_handler*)(void*)(&watch_stack_handler) } +}; + +static atomic<do_once_state> cilkrts_load_state; + +bool initialize_cilk_interop() { + // Pinning can fail. This is a normal situation, and means that the current + // thread does not use cilkrts and consequently does not need interop. + return dynamic_link( CILKLIB_NAME, CilkLinkTable, 1, /*handle=*/0, DYNAMIC_LINK_GLOBAL ); +} +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +namespace rml { + tbb_server* make_private_server( tbb_client& client ); +} + +void governor::acquire_resources () { +#if USE_PTHREAD + int status = theTLS.create(auto_terminate); +#else + int status = theTLS.create(); +#endif + if( status ) + handle_perror(status, "TBB failed to initialize task scheduler TLS\n"); +} + +void governor::release_resources () { + theRMLServerFactory.close(); +#if TBB_USE_ASSERT + if( __TBB_InitOnce::initialization_done() && theTLS.get() ) + runtime_warning( "TBB is unloaded while tbb::task_scheduler_init object is alive?" ); +#endif + int status = theTLS.destroy(); + if( status ) + handle_perror(status, "TBB failed to destroy task scheduler TLS"); + dynamic_unlink_all(); +} + +rml::tbb_server* governor::create_rml_server ( rml::tbb_client& client ) { + rml::tbb_server* server = NULL; + if( !UsePrivateRML ) { + ::rml::factory::status_type status = theRMLServerFactory.make_server( server, client ); + if( status != ::rml::factory::st_success ) { + UsePrivateRML = true; + runtime_warning( "rml::tbb_factory::make_server failed with status %x, falling back on private rml", status ); + } + } + if ( !server ) { + __TBB_ASSERT( UsePrivateRML, NULL ); + server = rml::make_private_server( client ); + } + __TBB_ASSERT( server, "Failed to create RML server" ); + return server; +} + +void governor::sign_on(generic_scheduler* s) { + __TBB_ASSERT( !theTLS.get(), NULL ); + theTLS.set(s); +#if __TBB_SURVIVE_THREAD_SWITCH + if( watch_stack_handler ) { + __cilk_tbb_stack_op_thunk o; + o.routine = &stack_op_handler; + o.data = s; + if( (*watch_stack_handler)(&s->my_cilk_unwatch_thunk, o) ) { + // Failed to register with cilkrts, make sure we are clean + s->my_cilk_unwatch_thunk.routine = NULL; + } +#if TBB_USE_ASSERT + else + s->my_cilk_state = generic_scheduler::cs_running; +#endif /* TBB_USE_ASSERT */ + } +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ +} + +void governor::sign_off(generic_scheduler* s) { + suppress_unused_warning(s); + __TBB_ASSERT( theTLS.get()==s, "attempt to unregister a wrong scheduler instance" ); + theTLS.set(NULL); +#if __TBB_SURVIVE_THREAD_SWITCH + __cilk_tbb_unwatch_thunk &ut = s->my_cilk_unwatch_thunk; + if ( ut.routine ) + (*ut.routine)(ut.data); +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ +} + +void governor::setBlockingTerminate(const task_scheduler_init *tsi) { + __TBB_ASSERT(!IsBlockingTermiantionInProgress, "It's impossible to create task_scheduler_init while blocking termination is in progress."); + if (BlockingTSI) + throw_exception(eid_blocking_sch_init); + BlockingTSI = tsi; +} + +generic_scheduler* governor::init_scheduler( unsigned num_threads, stack_size_type stack_size, bool auto_init ) { + if( !__TBB_InitOnce::initialization_done() ) + DoOneTimeInitializations(); + generic_scheduler* s = theTLS.get(); + if( s ) { + s->my_ref_count += 1; + return s; + } +#if __TBB_SURVIVE_THREAD_SWITCH + atomic_do_once( &initialize_cilk_interop, cilkrts_load_state ); +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + if( (int)num_threads == task_scheduler_init::automatic ) + num_threads = default_num_threads(); + s = generic_scheduler::create_master( + market::create_arena( num_threads - 1, stack_size ? stack_size : ThreadStackSize ) ); + __TBB_ASSERT(s, "Somehow a local scheduler creation for a master thread failed"); + s->my_auto_initialized = auto_init; + return s; +} + +void governor::terminate_scheduler( generic_scheduler* s, const task_scheduler_init* tsi_ptr ) { + __TBB_ASSERT( s == theTLS.get(), "Attempt to terminate non-local scheduler instance" ); + if (--(s->my_ref_count)) { + if (BlockingTSI && BlockingTSI==tsi_ptr) { + // can't throw exception, because this is on dtor's call chain + fprintf(stderr, "Attempt to terminate nested scheduler in blocking mode\n"); + exit(1); + } + } else { +#if TBB_USE_ASSERT + if (BlockingTSI) { + __TBB_ASSERT( BlockingTSI == tsi_ptr, "For blocking termiantion last terminate_scheduler must be blocking." ); + IsBlockingTermiantionInProgress = true; + } +#endif + s->cleanup_master(); + BlockingTSI = NULL; +#if TBB_USE_ASSERT + IsBlockingTermiantionInProgress = false; +#endif + } +} + +void governor::auto_terminate(void* arg){ + generic_scheduler* s = static_cast<generic_scheduler*>(arg); + if( s && s->my_auto_initialized ) { + if( !--(s->my_ref_count) ) { + __TBB_ASSERT( !BlockingTSI, "Blocking auto-termiante is not supported." ); + // If the TLS slot is already cleared by OS or underlying concurrency + // runtime, restore its value. + if ( !theTLS.get() ) + theTLS.set(s); + else __TBB_ASSERT( s == theTLS.get(), NULL ); + s->cleanup_master(); + __TBB_ASSERT( !theTLS.get(), "cleanup_master has not cleared its TLS slot" ); + } + } +} + +void governor::print_version_info () { + if ( UsePrivateRML ) + PrintExtraVersionInfo( "RML", "private" ); + else { + PrintExtraVersionInfo( "RML", "shared" ); + theRMLServerFactory.call_with_server_info( PrintRMLVersionInfo, (void*)"" ); + } +#if __TBB_SURVIVE_THREAD_SWITCH + if( watch_stack_handler ) + PrintExtraVersionInfo( "CILK", CILKLIB_NAME ); +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ +} + +void governor::initialize_rml_factory () { + ::rml::factory::status_type res = theRMLServerFactory.open(); + UsePrivateRML = res != ::rml::factory::st_success; +} + +#if __TBB_SURVIVE_THREAD_SWITCH +__cilk_tbb_retcode governor::stack_op_handler( __cilk_tbb_stack_op op, void* data ) { + __TBB_ASSERT(data,NULL); + generic_scheduler* s = static_cast<generic_scheduler*>(data); +#if TBB_USE_ASSERT + void* current = theTLS.get(); +#if _WIN32||_WIN64 + uintptr_t thread_id = GetCurrentThreadId(); +#else + uintptr_t thread_id = uintptr_t(pthread_self()); +#endif + +#endif /* TBB_USE_ASSERT */ + switch( op ) { + default: + __TBB_ASSERT( 0, "invalid op" ); + case CILK_TBB_STACK_ADOPT: { + __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || + current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid adoption" ); +#if TBB_USE_ASSERT + if( current==s ) + runtime_warning( "redundant adoption of %p by thread %p\n", s, (void*)thread_id ); + s->my_cilk_state = generic_scheduler::cs_running; +#endif /* TBB_USE_ASSERT */ + theTLS.set(s); + break; + } + case CILK_TBB_STACK_ORPHAN: { + __TBB_ASSERT( current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid orphaning" ); +#if TBB_USE_ASSERT + s->my_cilk_state = generic_scheduler::cs_limbo; +#endif /* TBB_USE_ASSERT */ + theTLS.set(NULL); + break; + } + case CILK_TBB_STACK_RELEASE: { + __TBB_ASSERT( !current && s->my_cilk_state==generic_scheduler::cs_limbo || + current==s && s->my_cilk_state==generic_scheduler::cs_running, "invalid release" ); +#if TBB_USE_ASSERT + s->my_cilk_state = generic_scheduler::cs_freed; +#endif /* TBB_USE_ASSERT */ + s->my_cilk_unwatch_thunk.routine = NULL; + auto_terminate( s ); + } + } + return 0; +} +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +} // namespace internal + +//------------------------------------------------------------------------ +// task_scheduler_init +//------------------------------------------------------------------------ + +using namespace internal; + +/** Left out-of-line for the sake of the backward binary compatibility **/ +void task_scheduler_init::initialize( int number_of_threads ) { + initialize( number_of_threads, 0 ); +} + +void task_scheduler_init::initialize( int number_of_threads, stack_size_type thread_stack_size ) { +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + uintptr_t new_mode = thread_stack_size & propagation_mode_mask; +#endif + thread_stack_size &= ~(stack_size_type)propagation_mode_mask; + if( number_of_threads!=deferred ) { + bool blocking_terminate = false; + if (my_scheduler == (scheduler*)wait_workers_in_terminate_flag) { + blocking_terminate = true; + my_scheduler = NULL; + } + __TBB_ASSERT( !my_scheduler, "task_scheduler_init already initialized" ); + __TBB_ASSERT( number_of_threads==-1 || number_of_threads>=1, + "number_of_threads for task_scheduler_init must be -1 or positive" ); + if (blocking_terminate) + governor::setBlockingTerminate(this); + internal::generic_scheduler *s = governor::init_scheduler( number_of_threads, thread_stack_size, /*auto_init=*/false ); +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + if ( s->master_outermost_level() ) { + uintptr_t &vt = s->default_context()->my_version_and_traits; + uintptr_t prev_mode = vt & task_group_context::exact_exception ? propagation_mode_exact : 0; + vt = new_mode & propagation_mode_exact ? vt | task_group_context::exact_exception + : new_mode & propagation_mode_captured ? vt & ~task_group_context::exact_exception : vt; + // Use least significant bit of the scheduler pointer to store previous mode. + // This is necessary when components compiled with different compilers and/or + // TBB versions initialize the + my_scheduler = static_cast<scheduler*>((generic_scheduler*)((uintptr_t)s | prev_mode)); + } + else +#endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ + my_scheduler = s; + } else { + __TBB_ASSERT( !thread_stack_size, "deferred initialization ignores stack size setting" ); + } +} + +void task_scheduler_init::terminate() { +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + uintptr_t prev_mode = (uintptr_t)my_scheduler & propagation_mode_exact; + my_scheduler = (scheduler*)((uintptr_t)my_scheduler & ~(uintptr_t)propagation_mode_exact); +#endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ + generic_scheduler* s = static_cast<generic_scheduler*>(my_scheduler); + my_scheduler = NULL; + __TBB_ASSERT( s, "task_scheduler_init::terminate without corresponding task_scheduler_init::initialize()"); +#if __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS + if ( s->master_outermost_level() ) { + uintptr_t &vt = s->default_context()->my_version_and_traits; + vt = prev_mode & propagation_mode_exact ? vt | task_group_context::exact_exception + : vt & ~task_group_context::exact_exception; + } +#endif /* __TBB_TASK_GROUP_CONTEXT && TBB_USE_EXCEPTIONS */ + governor::terminate_scheduler(s, this); +} + +int task_scheduler_init::default_num_threads() { + return governor::default_num_threads(); +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.h new file mode 100644 index 0000000000..13ef43a945 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/governor.h @@ -0,0 +1,159 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_governor_H +#define _TBB_governor_H + +#include "tbb/task_scheduler_init.h" +#include "../rml/include/rml_tbb.h" + +#include "tbb_misc.h" // for AvailableHwConcurrency and ThreadStackSize +#include "tls.h" + +#if __TBB_SURVIVE_THREAD_SWITCH +#include "cilk-tbb-interop.h" +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +namespace tbb { +namespace internal { + +class market; +class generic_scheduler; +class __TBB_InitOnce; + +//------------------------------------------------------------------------ +// Class governor +//------------------------------------------------------------------------ + +//! The class handles access to the single instance of market, and to TLS to keep scheduler instances. +/** It also supports automatic on-demand initialization of the TBB scheduler. + The class contains only static data members and methods.*/ +class governor { + friend class __TBB_InitOnce; + friend class market; + + //! TLS for scheduler instances associated with individual threads + static basic_tls<generic_scheduler*> theTLS; + + //! Caches the maximal level of paralellism supported by the hardware + static unsigned DefaultNumberOfThreads; + + static rml::tbb_factory theRMLServerFactory; + + static bool UsePrivateRML; + + //! Instance of task_scheduler_init that requested blocking termination. + static const task_scheduler_init *BlockingTSI; + +#if TBB_USE_ASSERT + static bool IsBlockingTermiantionInProgress; +#endif + + //! Create key for thread-local storage and initialize RML. + static void acquire_resources (); + + //! Destroy the thread-local storage key and deinitialize RML. + static void release_resources (); + + static rml::tbb_server* create_rml_server ( rml::tbb_client& ); + + //! The internal routine to undo automatic initialization. + /** The signature is written with void* so that the routine + can be the destructor argument to pthread_key_create. */ + static void auto_terminate(void* scheduler); + +public: + static unsigned default_num_threads () { + // No memory fence required, because at worst each invoking thread calls AvailableHwConcurrency once. + return DefaultNumberOfThreads ? DefaultNumberOfThreads : + DefaultNumberOfThreads = AvailableHwConcurrency(); + } + //! Processes scheduler initialization request (possibly nested) in a master thread + /** If necessary creates new instance of arena and/or local scheduler. + The auto_init argument specifies if the call is due to automatic initialization. **/ + static generic_scheduler* init_scheduler( unsigned num_threads, stack_size_type stack_size, bool auto_init = false ); + + //! Processes scheduler termination request (possibly nested) in a master thread + static void terminate_scheduler( generic_scheduler* s, const task_scheduler_init *tsi_ptr ); + + //! Returns number of worker threads in the currently active arena. + inline static unsigned max_number_of_workers (); + + //! Register TBB scheduler instance in thread-local storage. + static void sign_on(generic_scheduler* s); + + //! Unregister TBB scheduler instance from thread-local storage. + static void sign_off(generic_scheduler* s); + + //! Used to check validity of the local scheduler TLS contents. + static bool is_set ( generic_scheduler* s ) { return theTLS.get() == s; } + + //! Temporarily set TLS slot to the given scheduler + static void assume_scheduler( generic_scheduler* s ) { theTLS.set( s ); } + + //! Obtain the thread-local instance of the TBB scheduler. + /** If the scheduler has not been initialized yet, initialization is done automatically. + Note that auto-initialized scheduler instance is destroyed only when its thread terminates. **/ + static generic_scheduler* local_scheduler () { + generic_scheduler* s = theTLS.get(); + return s ? s : init_scheduler( (unsigned)task_scheduler_init::automatic, 0, true ); + } + + static generic_scheduler* local_scheduler_if_initialized () { + return theTLS.get(); + } + + //! Undo automatic initialization if necessary; call when a thread exits. + static void terminate_auto_initialized_scheduler() { + auto_terminate( theTLS.get() ); + } + + static void print_version_info (); + + static void initialize_rml_factory (); + + static bool needsWaitWorkers () { return BlockingTSI!=NULL; } + + //! Must be called before init_scheduler + static void setBlockingTerminate(const task_scheduler_init *tsi); + +#if __TBB_SURVIVE_THREAD_SWITCH + static __cilk_tbb_retcode stack_op_handler( __cilk_tbb_stack_op op, void* ); +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ +}; // class governor + +} // namespace internal +} // namespace tbb + +#include "scheduler.h" + +inline unsigned tbb::internal::governor::max_number_of_workers () { + return local_scheduler()->number_of_workers_in_my_arena(); +} + +#endif /* _TBB_governor_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/atomic_support.asm b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/atomic_support.asm new file mode 100644 index 0000000000..a9fadf5385 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/atomic_support.asm @@ -0,0 +1,196 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +.686 +.model flat,c +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchadd1 +__TBB_machine_fetchadd1: + mov edx,4[esp] + mov eax,8[esp] + lock xadd [edx],al + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchstore1 +__TBB_machine_fetchstore1: + mov edx,4[esp] + mov eax,8[esp] + lock xchg [edx],al + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_cmpswp1 +__TBB_machine_cmpswp1: + mov edx,4[esp] + mov ecx,8[esp] + mov eax,12[esp] + lock cmpxchg [edx],cl + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchadd2 +__TBB_machine_fetchadd2: + mov edx,4[esp] + mov eax,8[esp] + lock xadd [edx],ax + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchstore2 +__TBB_machine_fetchstore2: + mov edx,4[esp] + mov eax,8[esp] + lock xchg [edx],ax + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_cmpswp2 +__TBB_machine_cmpswp2: + mov edx,4[esp] + mov ecx,8[esp] + mov eax,12[esp] + lock cmpxchg [edx],cx + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchadd4 +__TBB_machine_fetchadd4: + mov edx,4[esp] + mov eax,8[esp] + lock xadd [edx],eax + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchstore4 +__TBB_machine_fetchstore4: + mov edx,4[esp] + mov eax,8[esp] + lock xchg [edx],eax + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_cmpswp4 +__TBB_machine_cmpswp4: + mov edx,4[esp] + mov ecx,8[esp] + mov eax,12[esp] + lock cmpxchg [edx],ecx + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchadd8 +__TBB_machine_fetchadd8: + push ebx + push edi + mov edi,12[esp] + mov eax,[edi] + mov edx,4[edi] +__TBB_machine_fetchadd8_loop: + mov ebx,16[esp] + mov ecx,20[esp] + add ebx,eax + adc ecx,edx + lock cmpxchg8b qword ptr [edi] + jnz __TBB_machine_fetchadd8_loop + pop edi + pop ebx + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_fetchstore8 +__TBB_machine_fetchstore8: + push ebx + push edi + mov edi,12[esp] + mov ebx,16[esp] + mov ecx,20[esp] + mov eax,[edi] + mov edx,4[edi] +__TBB_machine_fetchstore8_loop: + lock cmpxchg8b qword ptr [edi] + jnz __TBB_machine_fetchstore8_loop + pop edi + pop ebx + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_cmpswp8 +__TBB_machine_cmpswp8: + push ebx + push edi + mov edi,12[esp] + mov ebx,16[esp] + mov ecx,20[esp] + mov eax,24[esp] + mov edx,28[esp] + lock cmpxchg8b qword ptr [edi] + pop edi + pop ebx + ret +.code + ALIGN 4 + PUBLIC c __TBB_machine_load8 +__TBB_machine_Load8: + ; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check. + mov ecx,4[esp] + test ecx,7 + jne load_slow + ; Load within a cache line + sub esp,12 + fild qword ptr [ecx] + fistp qword ptr [esp] + mov eax,[esp] + mov edx,4[esp] + add esp,12 + ret +load_slow: + ; Load is misaligned. Use cmpxchg8b. + push ebx + push edi + mov edi,ecx + xor eax,eax + xor ebx,ebx + xor ecx,ecx + xor edx,edx + lock cmpxchg8b qword ptr [edi] + pop edi + pop ebx + ret +EXTRN __TBB_machine_store8_slow:PROC +.code + ALIGN 4 + PUBLIC c __TBB_machine_store8 +__TBB_machine_Store8: + ; If location is on stack, compiler may have failed to align it correctly, so we do dynamic check. + mov ecx,4[esp] + test ecx,7 + jne __TBB_machine_store8_slow ;; tail call to tbb_misc.cpp + fild qword ptr 8[esp] + fistp qword ptr [ecx] + ret +end diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/lock_byte.asm b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/lock_byte.asm new file mode 100644 index 0000000000..67e834ec5e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia32-masm/lock_byte.asm @@ -0,0 +1,46 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE +.686 +.model flat,c +.code + ALIGN 4 + PUBLIC c __TBB_machine_trylockbyte +__TBB_machine_trylockbyte: + mov edx,4[esp] + mov al,[edx] + mov cl,1 + test al,1 + jnz __TBB_machine_trylockbyte_contended + lock cmpxchg [edx],cl + jne __TBB_machine_trylockbyte_contended + mov eax,1 + ret +__TBB_machine_trylockbyte_contended: + xor eax,eax + ret +end diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/atomic_support.s b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/atomic_support.s new file mode 100644 index 0000000000..cf49dce750 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/atomic_support.s @@ -0,0 +1,678 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 + + + .proc __TBB_machine_fetchadd1__TBB_full_fence# + .global __TBB_machine_fetchadd1__TBB_full_fence# +__TBB_machine_fetchadd1__TBB_full_fence: +{ + mf + br __TBB_machine_fetchadd1acquire +} + .endp __TBB_machine_fetchadd1__TBB_full_fence# + + .proc __TBB_machine_fetchadd1acquire# + .global __TBB_machine_fetchadd1acquire# +__TBB_machine_fetchadd1acquire: + + + + + + + + ld1 r9=[r32] +;; +Retry_1acquire: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg1.acq r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_1acquire + br.ret.sptk.many b0 +# 49 "<stdin>" + .endp __TBB_machine_fetchadd1acquire# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore1__TBB_full_fence# + .global __TBB_machine_fetchstore1__TBB_full_fence# +__TBB_machine_fetchstore1__TBB_full_fence: + mf +;; + xchg1 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore1__TBB_full_fence# + + + .proc __TBB_machine_fetchstore1acquire# + .global __TBB_machine_fetchstore1acquire# +__TBB_machine_fetchstore1acquire: + xchg1 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore1acquire# +# 88 "<stdin>" + .section .text + .align 16 + + + .proc __TBB_machine_cmpswp1__TBB_full_fence# + .global __TBB_machine_cmpswp1__TBB_full_fence# +__TBB_machine_cmpswp1__TBB_full_fence: +{ + mf + br __TBB_machine_cmpswp1acquire +} + .endp __TBB_machine_cmpswp1__TBB_full_fence# + + .proc __TBB_machine_cmpswp1acquire# + .global __TBB_machine_cmpswp1acquire# +__TBB_machine_cmpswp1acquire: + + zxt1 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg1.acq r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp1acquire# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 + + + .proc __TBB_machine_fetchadd2__TBB_full_fence# + .global __TBB_machine_fetchadd2__TBB_full_fence# +__TBB_machine_fetchadd2__TBB_full_fence: +{ + mf + br __TBB_machine_fetchadd2acquire +} + .endp __TBB_machine_fetchadd2__TBB_full_fence# + + .proc __TBB_machine_fetchadd2acquire# + .global __TBB_machine_fetchadd2acquire# +__TBB_machine_fetchadd2acquire: + + + + + + + + ld2 r9=[r32] +;; +Retry_2acquire: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg2.acq r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_2acquire + br.ret.sptk.many b0 +# 49 "<stdin>" + .endp __TBB_machine_fetchadd2acquire# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore2__TBB_full_fence# + .global __TBB_machine_fetchstore2__TBB_full_fence# +__TBB_machine_fetchstore2__TBB_full_fence: + mf +;; + xchg2 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore2__TBB_full_fence# + + + .proc __TBB_machine_fetchstore2acquire# + .global __TBB_machine_fetchstore2acquire# +__TBB_machine_fetchstore2acquire: + xchg2 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore2acquire# +# 88 "<stdin>" + .section .text + .align 16 + + + .proc __TBB_machine_cmpswp2__TBB_full_fence# + .global __TBB_machine_cmpswp2__TBB_full_fence# +__TBB_machine_cmpswp2__TBB_full_fence: +{ + mf + br __TBB_machine_cmpswp2acquire +} + .endp __TBB_machine_cmpswp2__TBB_full_fence# + + .proc __TBB_machine_cmpswp2acquire# + .global __TBB_machine_cmpswp2acquire# +__TBB_machine_cmpswp2acquire: + + zxt2 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg2.acq r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp2acquire# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 + + + .proc __TBB_machine_fetchadd4__TBB_full_fence# + .global __TBB_machine_fetchadd4__TBB_full_fence# +__TBB_machine_fetchadd4__TBB_full_fence: +{ + mf + br __TBB_machine_fetchadd4acquire +} + .endp __TBB_machine_fetchadd4__TBB_full_fence# + + .proc __TBB_machine_fetchadd4acquire# + .global __TBB_machine_fetchadd4acquire# +__TBB_machine_fetchadd4acquire: + + cmp.eq p6,p0=1,r33 + cmp.eq p8,p0=-1,r33 + (p6) br.cond.dptk Inc_4acquire + (p8) br.cond.dpnt Dec_4acquire +;; + + ld4 r9=[r32] +;; +Retry_4acquire: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg4.acq r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_4acquire + br.ret.sptk.many b0 + +Inc_4acquire: + fetchadd4.acq r8=[r32],1 + br.ret.sptk.many b0 +Dec_4acquire: + fetchadd4.acq r8=[r32],-1 + br.ret.sptk.many b0 + + .endp __TBB_machine_fetchadd4acquire# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore4__TBB_full_fence# + .global __TBB_machine_fetchstore4__TBB_full_fence# +__TBB_machine_fetchstore4__TBB_full_fence: + mf +;; + xchg4 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore4__TBB_full_fence# + + + .proc __TBB_machine_fetchstore4acquire# + .global __TBB_machine_fetchstore4acquire# +__TBB_machine_fetchstore4acquire: + xchg4 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore4acquire# +# 88 "<stdin>" + .section .text + .align 16 + + + .proc __TBB_machine_cmpswp4__TBB_full_fence# + .global __TBB_machine_cmpswp4__TBB_full_fence# +__TBB_machine_cmpswp4__TBB_full_fence: +{ + mf + br __TBB_machine_cmpswp4acquire +} + .endp __TBB_machine_cmpswp4__TBB_full_fence# + + .proc __TBB_machine_cmpswp4acquire# + .global __TBB_machine_cmpswp4acquire# +__TBB_machine_cmpswp4acquire: + + zxt4 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg4.acq r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp4acquire# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 + + + .proc __TBB_machine_fetchadd8__TBB_full_fence# + .global __TBB_machine_fetchadd8__TBB_full_fence# +__TBB_machine_fetchadd8__TBB_full_fence: +{ + mf + br __TBB_machine_fetchadd8acquire +} + .endp __TBB_machine_fetchadd8__TBB_full_fence# + + .proc __TBB_machine_fetchadd8acquire# + .global __TBB_machine_fetchadd8acquire# +__TBB_machine_fetchadd8acquire: + + cmp.eq p6,p0=1,r33 + cmp.eq p8,p0=-1,r33 + (p6) br.cond.dptk Inc_8acquire + (p8) br.cond.dpnt Dec_8acquire +;; + + ld8 r9=[r32] +;; +Retry_8acquire: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg8.acq r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_8acquire + br.ret.sptk.many b0 + +Inc_8acquire: + fetchadd8.acq r8=[r32],1 + br.ret.sptk.many b0 +Dec_8acquire: + fetchadd8.acq r8=[r32],-1 + br.ret.sptk.many b0 + + .endp __TBB_machine_fetchadd8acquire# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore8__TBB_full_fence# + .global __TBB_machine_fetchstore8__TBB_full_fence# +__TBB_machine_fetchstore8__TBB_full_fence: + mf +;; + xchg8 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore8__TBB_full_fence# + + + .proc __TBB_machine_fetchstore8acquire# + .global __TBB_machine_fetchstore8acquire# +__TBB_machine_fetchstore8acquire: + xchg8 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore8acquire# +# 88 "<stdin>" + .section .text + .align 16 + + + .proc __TBB_machine_cmpswp8__TBB_full_fence# + .global __TBB_machine_cmpswp8__TBB_full_fence# +__TBB_machine_cmpswp8__TBB_full_fence: +{ + mf + br __TBB_machine_cmpswp8acquire +} + .endp __TBB_machine_cmpswp8__TBB_full_fence# + + .proc __TBB_machine_cmpswp8acquire# + .global __TBB_machine_cmpswp8acquire# +__TBB_machine_cmpswp8acquire: + + + + + mov ar.ccv=r34 +;; + cmpxchg8.acq r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp8acquire# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 +# 19 "<stdin>" + .proc __TBB_machine_fetchadd1release# + .global __TBB_machine_fetchadd1release# +__TBB_machine_fetchadd1release: + + + + + + + + ld1 r9=[r32] +;; +Retry_1release: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg1.rel r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_1release + br.ret.sptk.many b0 +# 49 "<stdin>" + .endp __TBB_machine_fetchadd1release# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore1release# + .global __TBB_machine_fetchstore1release# +__TBB_machine_fetchstore1release: + mf +;; + xchg1 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore1release# +# 88 "<stdin>" + .section .text + .align 16 +# 101 "<stdin>" + .proc __TBB_machine_cmpswp1release# + .global __TBB_machine_cmpswp1release# +__TBB_machine_cmpswp1release: + + zxt1 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg1.rel r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp1release# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 +# 19 "<stdin>" + .proc __TBB_machine_fetchadd2release# + .global __TBB_machine_fetchadd2release# +__TBB_machine_fetchadd2release: + + + + + + + + ld2 r9=[r32] +;; +Retry_2release: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg2.rel r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_2release + br.ret.sptk.many b0 +# 49 "<stdin>" + .endp __TBB_machine_fetchadd2release# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore2release# + .global __TBB_machine_fetchstore2release# +__TBB_machine_fetchstore2release: + mf +;; + xchg2 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore2release# +# 88 "<stdin>" + .section .text + .align 16 +# 101 "<stdin>" + .proc __TBB_machine_cmpswp2release# + .global __TBB_machine_cmpswp2release# +__TBB_machine_cmpswp2release: + + zxt2 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg2.rel r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp2release# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 +# 19 "<stdin>" + .proc __TBB_machine_fetchadd4release# + .global __TBB_machine_fetchadd4release# +__TBB_machine_fetchadd4release: + + cmp.eq p6,p0=1,r33 + cmp.eq p8,p0=-1,r33 + (p6) br.cond.dptk Inc_4release + (p8) br.cond.dpnt Dec_4release +;; + + ld4 r9=[r32] +;; +Retry_4release: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg4.rel r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_4release + br.ret.sptk.many b0 + +Inc_4release: + fetchadd4.rel r8=[r32],1 + br.ret.sptk.many b0 +Dec_4release: + fetchadd4.rel r8=[r32],-1 + br.ret.sptk.many b0 + + .endp __TBB_machine_fetchadd4release# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore4release# + .global __TBB_machine_fetchstore4release# +__TBB_machine_fetchstore4release: + mf +;; + xchg4 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore4release# +# 88 "<stdin>" + .section .text + .align 16 +# 101 "<stdin>" + .proc __TBB_machine_cmpswp4release# + .global __TBB_machine_cmpswp4release# +__TBB_machine_cmpswp4release: + + zxt4 r34=r34 +;; + + mov ar.ccv=r34 +;; + cmpxchg4.rel r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp4release# +// DO NOT EDIT - AUTOMATICALLY GENERATED FROM tools/generate_atomic/ipf_generate.sh +# 1 "<stdin>" +# 1 "<built-in>" +# 1 "<command line>" +# 1 "<stdin>" + + + + + + .section .text + .align 16 +# 19 "<stdin>" + .proc __TBB_machine_fetchadd8release# + .global __TBB_machine_fetchadd8release# +__TBB_machine_fetchadd8release: + + cmp.eq p6,p0=1,r33 + cmp.eq p8,p0=-1,r33 + (p6) br.cond.dptk Inc_8release + (p8) br.cond.dpnt Dec_8release +;; + + ld8 r9=[r32] +;; +Retry_8release: + mov ar.ccv=r9 + mov r8=r9; + add r10=r9,r33 +;; + cmpxchg8.rel r9=[r32],r10,ar.ccv +;; + cmp.ne p7,p0=r8,r9 + (p7) br.cond.dpnt Retry_8release + br.ret.sptk.many b0 + +Inc_8release: + fetchadd8.rel r8=[r32],1 + br.ret.sptk.many b0 +Dec_8release: + fetchadd8.rel r8=[r32],-1 + br.ret.sptk.many b0 + + .endp __TBB_machine_fetchadd8release# +# 62 "<stdin>" + .section .text + .align 16 + .proc __TBB_machine_fetchstore8release# + .global __TBB_machine_fetchstore8release# +__TBB_machine_fetchstore8release: + mf +;; + xchg8 r8=[r32],r33 + br.ret.sptk.many b0 + .endp __TBB_machine_fetchstore8release# +# 88 "<stdin>" + .section .text + .align 16 +# 101 "<stdin>" + .proc __TBB_machine_cmpswp8release# + .global __TBB_machine_cmpswp8release# +__TBB_machine_cmpswp8release: + + + + + mov ar.ccv=r34 +;; + cmpxchg8.rel r8=[r32],r33,ar.ccv + br.ret.sptk.many b0 + .endp __TBB_machine_cmpswp8release# diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/ia64_misc.s b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/ia64_misc.s new file mode 100644 index 0000000000..e36938dd86 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/ia64_misc.s @@ -0,0 +1,107 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + // RSE backing store pointer retrieval + .section .text + .align 16 + .proc __TBB_get_bsp# + .global __TBB_get_bsp# +__TBB_get_bsp: + mov r8=ar.bsp + br.ret.sptk.many b0 + .endp __TBB_get_bsp# + + .section .text + .align 16 + .proc __TBB_machine_load8_relaxed# + .global __TBB_machine_load8_relaxed# +__TBB_machine_load8_relaxed: + ld8 r8=[r32] + br.ret.sptk.many b0 + .endp __TBB_machine_load8_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_store8_relaxed# + .global __TBB_machine_store8_relaxed# +__TBB_machine_store8_relaxed: + st8 [r32]=r33 + br.ret.sptk.many b0 + .endp __TBB_machine_store8_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_load4_relaxed# + .global __TBB_machine_load4_relaxed# +__TBB_machine_load4_relaxed: + ld4 r8=[r32] + br.ret.sptk.many b0 + .endp __TBB_machine_load4_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_store4_relaxed# + .global __TBB_machine_store4_relaxed# +__TBB_machine_store4_relaxed: + st4 [r32]=r33 + br.ret.sptk.many b0 + .endp __TBB_machine_store4_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_load2_relaxed# + .global __TBB_machine_load2_relaxed# +__TBB_machine_load2_relaxed: + ld2 r8=[r32] + br.ret.sptk.many b0 + .endp __TBB_machine_load2_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_store2_relaxed# + .global __TBB_machine_store2_relaxed# +__TBB_machine_store2_relaxed: + st2 [r32]=r33 + br.ret.sptk.many b0 + .endp __TBB_machine_store2_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_load1_relaxed# + .global __TBB_machine_load1_relaxed# +__TBB_machine_load1_relaxed: + ld1 r8=[r32] + br.ret.sptk.many b0 + .endp __TBB_machine_load1_relaxed# + + .section .text + .align 16 + .proc __TBB_machine_store1_relaxed# + .global __TBB_machine_store1_relaxed# +__TBB_machine_store1_relaxed: + st1 [r32]=r33 + br.ret.sptk.many b0 + .endp __TBB_machine_store1_relaxed# diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/lock_byte.s b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/lock_byte.s new file mode 100644 index 0000000000..7629532153 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/lock_byte.s @@ -0,0 +1,54 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + // Support for class TinyLock + .section .text + .align 16 + // unsigned int __TBB_machine_trylockbyte( byte& flag ); + // r32 = address of flag + .proc __TBB_machine_trylockbyte# + .global __TBB_machine_trylockbyte# +ADDRESS_OF_FLAG=r32 +RETCODE=r8 +FLAG=r9 +BUSY=r10 +SCRATCH=r11 +__TBB_machine_trylockbyte: + ld1.acq FLAG=[ADDRESS_OF_FLAG] + mov BUSY=1 + mov RETCODE=0 +;; + cmp.ne p6,p0=0,FLAG + mov ar.ccv=r0 +(p6) br.ret.sptk.many b0 +;; + cmpxchg1.acq SCRATCH=[ADDRESS_OF_FLAG],BUSY,ar.ccv // Try to acquire lock +;; + cmp.eq p6,p0=0,SCRATCH +;; +(p6) mov RETCODE=1 + br.ret.sptk.many b0 + .endp __TBB_machine_trylockbyte# diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/log2.s b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/log2.s new file mode 100644 index 0000000000..433229fb29 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/log2.s @@ -0,0 +1,66 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + .section .text + .align 16 + // unsigned long __TBB_machine_lg( unsigned long x ); + // r32 = x + .proc __TBB_machine_lg# + .global __TBB_machine_lg# +__TBB_machine_lg: + shr r16=r32,1 // .x +;; + shr r17=r32,2 // ..x + or r32=r32,r16 // xx +;; + shr r16=r32,3 // ...xx + or r32=r32,r17 // xxx +;; + shr r17=r32,5 // .....xxx + or r32=r32,r16 // xxxxx +;; + shr r16=r32,8 // ........xxxxx + or r32=r32,r17 // xxxxxxxx +;; + shr r17=r32,13 + or r32=r32,r16 // 13x +;; + shr r16=r32,21 + or r32=r32,r17 // 21x +;; + shr r17=r32,34 + or r32=r32,r16 // 34x +;; + shr r16=r32,55 + or r32=r32,r17 // 55x +;; + or r32=r32,r16 // 64x +;; + popcnt r8=r32 +;; + add r8=-1,r8 + br.ret.sptk.many b0 + .endp __TBB_machine_lg# diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/pause.s b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/pause.s new file mode 100644 index 0000000000..7f10947a09 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ia64-gas/pause.s @@ -0,0 +1,41 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + + .section .text + .align 16 + // void __TBB_machine_pause( long count ); + // r32 = count + .proc __TBB_machine_pause# + .global __TBB_machine_pause# +count = r32 +__TBB_machine_pause: + hint.m 0 + add count=-1,count +;; + cmp.eq p6,p7=0,count +(p7) br.cond.dpnt __TBB_machine_pause +(p6) br.ret.sptk.many b0 + .endp __TBB_machine_pause# diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/ibm_aix51/atomic_support.c b/deal.II/bundled/tbb41_20130401oss/src/tbb/ibm_aix51/atomic_support.c new file mode 100644 index 0000000000..e680580a6a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/ibm_aix51/atomic_support.c @@ -0,0 +1,63 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <stdint.h> +#include <sys/atomic_op.h> + +/* This file must be compiled with gcc. The IBM compiler doesn't seem to + support inline assembly statements (October 2007). */ + +#ifdef __GNUC__ + +int32_t __TBB_machine_cas_32 (volatile void* ptr, int32_t value, int32_t comparand) { + __asm__ __volatile__ ("sync\n"); /* memory release operation */ + compare_and_swap ((atomic_p) ptr, &comparand, value); + __asm__ __volatile__ ("isync\n"); /* memory acquire operation */ + return comparand; +} + +int64_t __TBB_machine_cas_64 (volatile void* ptr, int64_t value, int64_t comparand) { + __asm__ __volatile__ ("sync\n"); /* memory release operation */ + compare_and_swaplp ((atomic_l) ptr, &comparand, value); + __asm__ __volatile__ ("isync\n"); /* memory acquire operation */ + return comparand; +} + +void __TBB_machine_flush () { + __asm__ __volatile__ ("sync\n"); +} + +void __TBB_machine_lwsync () { + __asm__ __volatile__ ("lwsync\n"); +} + +void __TBB_machine_isync () { + __asm__ __volatile__ ("isync\n"); +} + +#endif /* __GNUC__ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/index.html b/deal.II/bundled/tbb41_20130401oss/src/tbb/index.html new file mode 100644 index 0000000000..d1bf5a7061 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/index.html @@ -0,0 +1,31 @@ +<HTML> +<BODY> + +<H2>Overview</H2> +This directory contains the source code of the TBB core components. + +<H2>Directories</H2> +<DL> +<DT><A HREF="tools_api">tools_api</A> +<DD>Source code of the interface components provided by the Intel® Parallel Studio tools. +<DT><A HREF="intel64-masm">intel64-masm</A> +<DD>Assembly code for the Intel® 64 architecture. +<DT><A HREF="ia32-masm">ia32-masm</A> +<DD>Assembly code for IA32 architecture. +<DT><A HREF="ia64-gas">ia64-gas</A> +<DD>Assembly code for IA64 architecture. +<DT><A HREF="ibm_aix51">ibm_aix51</A> +<DD>Assembly code for AIX 5.1 port. +</DL> + +<HR> +<A HREF="../index.html">Up to parent directory</A> +<p></p> +Copyright © 2005-2013 Intel Corporation. All Rights Reserved. +<P></P> +Intel is a registered trademark or trademark of Intel Corporation +or its subsidiaries in the United States and other countries. +<p></p> +* Other names and brands may be claimed as the property of others. +</BODY> +</HTML> diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/atomic_support.asm b/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/atomic_support.asm new file mode 100644 index 0000000000..1488d6821e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/atomic_support.asm @@ -0,0 +1,80 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +; DO NOT EDIT - AUTOMATICALLY GENERATED FROM .s FILE +.code + ALIGN 8 + PUBLIC __TBB_machine_fetchadd1 +__TBB_machine_fetchadd1: + mov rax,rdx + lock xadd [rcx],al + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_fetchstore1 +__TBB_machine_fetchstore1: + mov rax,rdx + lock xchg [rcx],al + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_cmpswp1 +__TBB_machine_cmpswp1: + mov rax,r8 + lock cmpxchg [rcx],dl + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_fetchadd2 +__TBB_machine_fetchadd2: + mov rax,rdx + lock xadd [rcx],ax + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_fetchstore2 +__TBB_machine_fetchstore2: + mov rax,rdx + lock xchg [rcx],ax + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_cmpswp2 +__TBB_machine_cmpswp2: + mov rax,r8 + lock cmpxchg [rcx],dx + ret +.code + ALIGN 8 + PUBLIC __TBB_machine_pause +__TBB_machine_pause: +L1: + dw 090f3H; pause + add ecx,-1 + jne L1 + ret +end + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/intel64_misc.asm b/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/intel64_misc.asm new file mode 100644 index 0000000000..171a0d7baf --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/intel64-masm/intel64_misc.asm @@ -0,0 +1,41 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +.code + ALIGN 8 + PUBLIC __TBB_get_cpu_ctl_env +__TBB_get_cpu_ctl_env: + stmxcsr [rcx] + fstcw [rcx+4] + ret +.code + ALIGN 8 + PUBLIC __TBB_set_cpu_ctl_env +__TBB_set_cpu_ctl_env: + ldmxcsr [rcx] + fldcw [rcx+4] + ret +end diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/intrusive_list.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/intrusive_list.h new file mode 100644 index 0000000000..ebaecbde97 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/intrusive_list.h @@ -0,0 +1,248 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_intrusive_list_H +#define _TBB_intrusive_list_H + +#include "tbb/tbb_stddef.h" + +namespace tbb { +namespace internal { + +//! Data structure to be inherited by the types that can form intrusive lists. +/** Intrusive list is formed by means of the member_intrusive_list<T> template class. + Note that type T must derive from intrusive_list_node either publicly or + declare instantiation member_intrusive_list<T> as a friend. + This class implements a limited subset of std::list interface. **/ +struct intrusive_list_node { + intrusive_list_node *my_prev_node, + *my_next_node; +#if TBB_USE_ASSERT + intrusive_list_node () { my_prev_node = my_next_node = this; } +#endif /* TBB_USE_ASSERT */ +}; + +//! List of element of type T, where T is derived from intrusive_list_node +/** The class is not thread safe. **/ +template <class List, class T> +class intrusive_list_base { + //! Pointer to the head node + intrusive_list_node my_head; + + //! Number of list elements + size_t my_size; + + static intrusive_list_node& node ( T& item ) { return List::node(item); } + + static T& item ( intrusive_list_node* node ) { return List::item(node); } + + template<class Iterator> + class iterator_impl { + Iterator& self () { return *static_cast<Iterator*>(this); } + + //! Node the iterator points to at the moment + intrusive_list_node *my_pos; + + protected: + iterator_impl (intrusive_list_node* pos ) + : my_pos(pos) + {} + + T& item () const { + return intrusive_list_base::item(my_pos); + } + + public: + iterator_impl () : my_pos(NULL) {} + + bool operator == ( const Iterator& it ) const { + return my_pos == it.my_pos; + } + + bool operator != ( const Iterator& it ) const { + return my_pos != it.my_pos; + } + + Iterator& operator++ () { + my_pos = my_pos->my_next_node; + return self(); + } + + Iterator& operator-- () { + my_pos = my_pos->my_prev_node; + return self(); + } + + Iterator operator++ ( int ) { + Iterator result = self(); + ++(*this); + return result; + } + + Iterator operator-- ( int ) { + Iterator result = self(); + --(*this); + return result; + } + }; // intrusive_list_base::iterator_impl + + void assert_ok () const { + __TBB_ASSERT( (my_head.my_prev_node == &my_head && !my_size) || + (my_head.my_next_node != &my_head && my_size >0), "intrusive_list_base corrupted" ); +#if TBB_USE_ASSERT >= 2 + size_t i = 0; + for ( intrusive_list_node *n = my_head.my_next_node; n != &my_head; n = n->my_next_node ) + ++i; + __TBB_ASSERT( my_size == i, "Wrong size" ); +#endif /* TBB_USE_ASSERT >= 2 */ + } + +public: + class iterator : public iterator_impl<iterator> { + template <class U, class V> friend class intrusive_list_base; + + iterator (intrusive_list_node* pos ) + : iterator_impl<iterator>(pos ) + {} + public: + iterator () {} + + T* operator-> () const { return &this->item(); } + + T& operator* () const { return this->item(); } + }; // class iterator + + class const_iterator : public iterator_impl<const_iterator> { + template <class U, class V> friend class intrusive_list_base; + + const_iterator (const intrusive_list_node* pos ) + : iterator_impl<const_iterator>(const_cast<intrusive_list_node*>(pos) ) + {} + public: + const_iterator () {} + + const T* operator-> () const { return &this->item(); } + + const T& operator* () const { return this->item(); } + }; // class iterator + + intrusive_list_base () : my_size(0) { + my_head.my_prev_node = &my_head; + my_head.my_next_node = &my_head; + } + + bool empty () const { return my_head.my_next_node == &my_head; } + + size_t size () const { return my_size; } + + iterator begin () { return iterator(my_head.my_next_node); } + + iterator end () { return iterator(&my_head); } + + const_iterator begin () const { return const_iterator(my_head.my_next_node); } + + const_iterator end () const { return const_iterator(&my_head); } + + void push_front ( T& val ) { + __TBB_ASSERT( node(val).my_prev_node == &node(val) && node(val).my_next_node == &node(val), + "Object with intrusive list node can be part of only one intrusive list simultaneously" ); + // An object can be part of only one intrusive list at the given moment via the given node member + node(val).my_prev_node = &my_head; + node(val).my_next_node = my_head.my_next_node; + my_head.my_next_node->my_prev_node = &node(val); + my_head.my_next_node = &node(val); + ++my_size; + assert_ok(); + } + + void remove( T& val ) { + __TBB_ASSERT( node(val).my_prev_node != &node(val) && node(val).my_next_node != &node(val), "Element to remove is not in the list" ); + __TBB_ASSERT( node(val).my_prev_node->my_next_node == &node(val) && node(val).my_next_node->my_prev_node == &node(val), "Element to remove is not in the list" ); + --my_size; + node(val).my_next_node->my_prev_node = node(val).my_prev_node; + node(val).my_prev_node->my_next_node = node(val).my_next_node; +#if TBB_USE_ASSERT + node(val).my_prev_node = node(val).my_next_node = &node(val); +#endif + assert_ok(); + } + + iterator erase ( iterator it ) { + T& val = *it; + ++it; + remove( val ); + return it; + } + +}; // intrusive_list_base + + +//! Double linked list of items of type T containing a member of type intrusive_list_node. +/** NodePtr is a member pointer to the node data field. Class U is either T or + a base class of T containing the node member. Default values exist for the sake + of a partial specialization working with inheritance case. + + The list does not have ownership of its items. Its purpose is to avoid dynamic + memory allocation when forming lists of existing objects. + + The class is not thread safe. **/ +template <class T, class U, intrusive_list_node U::*NodePtr> +class memptr_intrusive_list : public intrusive_list_base<memptr_intrusive_list<T, U, NodePtr>, T> +{ + friend class intrusive_list_base<memptr_intrusive_list<T, U, NodePtr>, T>; + + static intrusive_list_node& node ( T& val ) { return val.*NodePtr; } + + static T& item ( intrusive_list_node* node ) { + // Cannot use __TBB_offestof (and consequently __TBB_get_object_ref) macro + // with *NodePtr argument because gcc refuses to interpret pasted "->" and "*" + // as member pointer dereferencing operator, and explicit usage of ## in + // __TBB_offestof implementation breaks operations with normal member names. + return *reinterpret_cast<T*>((char*)node - ((ptrdiff_t)&(reinterpret_cast<T*>(0x1000)->*NodePtr) - 0x1000)); + } +}; // intrusive_list<T, U, NodePtr> + +//! Double linked list of items of type T that is derived from intrusive_list_node class. +/** The list does not have ownership of its items. Its purpose is to avoid dynamic + memory allocation when forming lists of existing objects. + + The class is not thread safe. **/ +template <class T> +class intrusive_list : public intrusive_list_base<intrusive_list<T>, T> +{ + friend class intrusive_list_base<intrusive_list<T>, T>; + + static intrusive_list_node& node ( T& val ) { return val; } + + static T& item ( intrusive_list_node* node ) { return *static_cast<T*>(node); } +}; // intrusive_list<T> + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_intrusive_list_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.cpp new file mode 100644 index 0000000000..55f8fe25bd --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.cpp @@ -0,0 +1,97 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if DO_ITT_NOTIFY + +#if _WIN32||_WIN64 + #ifndef UNICODE + #define UNICODE + #endif +#else + #pragma weak dlopen + #pragma weak dlsym + #pragma weak dlerror +#endif /* WIN */ + +#if __TBB_BUILD + +extern "C" void ITT_DoOneTimeInitialization(); +#define __itt_init_ittlib_name(x,y) (ITT_DoOneTimeInitialization(), true) + +#elif __TBBMALLOC_BUILD + +extern "C" void MallocInitializeITT(); +#define __itt_init_ittlib_name(x,y) (MallocInitializeITT(), true) + +#else +#error This file is expected to be used for either TBB or TBB allocator build. +#endif // __TBB_BUILD + +#include "tools_api/ittnotify_static.c" + +namespace tbb { +namespace internal { +int __TBB_load_ittnotify() { + return __itt_init_ittlib(NULL, // groups for: + (__itt_group_id)(__itt_group_sync // prepare/cancel/acquired/releasing + | __itt_group_thread // name threads + | __itt_group_stitch // stack stitching + )); +} + +}} // namespaces + +#endif /* DO_ITT_NOTIFY */ + +#define __TBB_NO_IMPLICIT_LINKAGE 1 +#include "itt_notify.h" + +namespace tbb { + +#if DO_ITT_NOTIFY + const tchar + *SyncType_GlobalLock = _T("TbbGlobalLock"), + *SyncType_Scheduler = _T("%Constant") + ; + const tchar + *SyncObj_SchedulerInitialization = _T("TbbSchedulerInitialization"), + *SyncObj_SchedulersList = _T("TbbSchedulersList"), + *SyncObj_WorkerLifeCycleMgmt = _T("TBB Scheduler"), + *SyncObj_TaskStealingLoop = _T("TBB Scheduler"), + *SyncObj_WorkerTaskPool = _T("TBB Scheduler"), + *SyncObj_MasterTaskPool = _T("TBB Scheduler"), + *SyncObj_TaskPoolSpinning = _T("TBB Scheduler"), + *SyncObj_Mailbox = _T("TBB Scheduler"), + *SyncObj_TaskReturnList = _T("TBB Scheduler"), + *SyncObj_TaskStream = _T("TBB Scheduler"), + *SyncObj_ContextsList = _T("TBB Scheduler") + ; +#endif /* DO_ITT_NOTIFY */ + +} // namespace tbb + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.h new file mode 100644 index 0000000000..455bf20763 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/itt_notify.h @@ -0,0 +1,133 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_ITT_NOTIFY +#define _TBB_ITT_NOTIFY + +#include "tbb/tbb_stddef.h" + +#if DO_ITT_NOTIFY + +#if _WIN32||_WIN64 + #ifndef UNICODE + #define UNICODE + #endif +#endif /* WIN */ + +#ifndef INTEL_ITTNOTIFY_API_PRIVATE +#define INTEL_ITTNOTIFY_API_PRIVATE +#endif + +#include "tools_api/ittnotify.h" +#include "tools_api/legacy/ittnotify.h" + +#if _WIN32||_WIN64 + #undef _T + #undef __itt_event_create + #define __itt_event_create __itt_event_createA +#endif /* WIN */ + + +#endif /* DO_ITT_NOTIFY */ + +#if !ITT_CALLER_NULL +#define ITT_CALLER_NULL ((__itt_caller)0) +#endif + +namespace tbb { +//! Unicode support +#if (_WIN32||_WIN64) && !__MINGW32__ + //! Unicode character type. Always wchar_t on Windows. + /** We do not use typedefs from Windows TCHAR family to keep consistence of TBB coding style. **/ + typedef wchar_t tchar; + //! Standard Windows macro to markup the string literals. + #define _T(string_literal) L ## string_literal +#else /* !WIN */ + typedef char tchar; + //! Standard Windows style macro to markup the string literals. + #define _T(string_literal) string_literal +#endif /* !WIN */ +} // namespace tbb + +#if DO_ITT_NOTIFY +namespace tbb { + //! Display names of internal synchronization types + extern const tchar + *SyncType_GlobalLock, + *SyncType_Scheduler; + //! Display names of internal synchronization components/scenarios + extern const tchar + *SyncObj_SchedulerInitialization, + *SyncObj_SchedulersList, + *SyncObj_WorkerLifeCycleMgmt, + *SyncObj_TaskStealingLoop, + *SyncObj_WorkerTaskPool, + *SyncObj_MasterTaskPool, + *SyncObj_TaskPoolSpinning, + *SyncObj_Mailbox, + *SyncObj_TaskReturnList, + *SyncObj_TaskStream, + *SyncObj_ContextsList + ; + + namespace internal { + void __TBB_EXPORTED_FUNC itt_set_sync_name_v3( void* obj, const tchar* name); + + } // namespace internal + +} // namespace tbb + +// const_cast<void*>() is necessary to cast off volatility +#define ITT_NOTIFY(name,obj) __itt_notify_##name(const_cast<void*>(static_cast<volatile void*>(obj))) +#define ITT_THREAD_SET_NAME(name) __itt_thread_set_name(name) +#define ITT_SYNC_CREATE(obj, type, name) __itt_sync_create((void*)(obj), type, name, 2) +#define ITT_SYNC_RENAME(obj, name) __itt_sync_rename(obj, name) +#define ITT_STACK_CREATE(obj) obj = __itt_stack_caller_create() +#if __TBB_TASK_GROUP_CONTEXT +#define ITT_STACK(precond, name, obj) (precond) ? __itt_stack_##name(obj) : ((void)0); +#else +#define ITT_STACK(precond, name, obj) ((void)0) +#endif /* !__TBB_TASK_GROUP_CONTEXT */ + +#else /* !DO_ITT_NOTIFY */ + +#define ITT_NOTIFY(name,obj) ((void)0) +#define ITT_THREAD_SET_NAME(name) ((void)0) +#define ITT_SYNC_CREATE(obj, type, name) ((void)0) +#define ITT_SYNC_RENAME(obj, name) ((void)0) +#define ITT_STACK_CREATE(obj) ((void)0) +#define ITT_STACK(precond, name, obj) ((void)0) + +#endif /* !DO_ITT_NOTIFY */ + +namespace tbb { +namespace internal { +int __TBB_load_ittnotify(); +}} + +#endif /* _TBB_ITT_NOTIFY */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.def new file mode 100644 index 0000000000..9835ad4c83 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.def @@ -0,0 +1,57 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +#define __TBB_SYMBOL( sym ) sym; +#include "lin32-tbb-export.lst" + +local: + +/* TBB symbols */ +*3tbb*; +*__TBB*; + +/* ITT symbols */ +__itt_*; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_memcpy_largest_cachelinesize; +get_memcpy_largest_cache_size; +get_mem_ops_method; +init_mem_ops_method; +irc__get_msg; +irc__print; +override_mem_ops_method; +set_memcpy_largest_cachelinesize; +set_memcpy_largest_cache_size; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.lst new file mode 100644 index 0000000000..2538c92646 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin32-tbb-export.lst @@ -0,0 +1,379 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* cache_aligned_allocator.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEjjPv ) +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Ej ) +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +/* task.cpp v3 */ +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEj ) +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEj ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEj ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEj ) +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEij ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEi ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +/* task_v2.cpp */ +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif /* !TBB_NO_LEGACY */ + +/* Exception handling in task scheduler */ +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEj ) +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/* Symbols for exceptions thrown from TBB */ +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) + +/* tbb_misc.cpp */ +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +#if __TBB_x86_32 +__TBB_SYMBOL( __TBB_machine_store8_slow_perf_warning ) +__TBB_SYMBOL( __TBB_machine_store8_slow ) +#endif +__TBB_SYMBOL( TBB_runtime_interface_version ) + +/* tbb_main.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) + +/* pipeline.cpp */ +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEj ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEjRNS_18task_group_contextE ) +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +/* queuing_rw_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) + +/* reader_writer_lock.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +/* spin_rw_mutex.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +/* spin_rw_mutex v3 */ +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) + +/* spin_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) + +/* mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +/* recursive_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +/* QueuingMutex.cpp */ +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) + +/* critical_section.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +/* concurrent_hash_map */ +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +/* concurrent_queue.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEij ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Ej ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +/* concurrent_queue v3 */ +/* constructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Ej ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Ej ) +/* destructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +/* typeinfo */ +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +/* vtable */ +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +/* methods */ +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEij ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +/* concurrent_vector.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_jPFvPvPKvjE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvjEb ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEjjPFvPvjE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEjjj ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEjRj ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEjjPFvPvjE ) +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +/* concurrent_vector v3 */ +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_jPFvPvPKvjE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvjE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_jPFvPvjEPFvS4_PKvjESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEjjPFvPvPKvjES4_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEjjj ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEjRj ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEjjPFvPvPKvjES4_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEjPvPFvS2_jEPFvS2_PKvjE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEj ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEjjjPKvPFvPvjEPFvS4_S3_jE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEjjPFvPvPKvjES4_ ) + +/* tbb_thread */ +#if __MINGW32__ +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFjPvES2_ ) +#else +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) +#endif +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Ej ) +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) + +#if __MINGW32__ +/* condition_variable */ +__TBB_SYMBOL( _ZN3tbb10interface58internal32internal_condition_variable_waitERNS1_14condvar_impl_tEPNS_5mutexEPKNS_10tick_count10interval_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal35internal_destroy_condition_variableERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_allERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_oneERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_initialize_condition_variableERNS1_14condvar_impl_tE ) +#endif + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.def new file mode 100644 index 0000000000..13cc7a7059 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.def @@ -0,0 +1,54 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +#define __TBB_SYMBOL( sym ) sym; +#include "lin64-tbb-export.lst" + +local: + +/* TBB symbols */ +*3tbb*; +*__TBB*; + +/* ITT symbols */ +__itt_*; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_msg_buf; +get_text_buf; +message_catalog; +print_buf; +irc__get_msg; +irc__print; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.lst new file mode 100644 index 0000000000..e7324f54a3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64-tbb-export.lst @@ -0,0 +1,361 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* cache_aligned_allocator.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +/* task.cpp v3 */ +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEl ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +/* task_v2.cpp */ +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif /* !TBB_NO_LEGACY */ + +/* Exception handling in task scheduler */ +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/* Symbols for exceptions thrown from TBB */ +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) +/* tbb_misc.cpp */ +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +/* tbb_main.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) + +/* pipeline.cpp */ +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +/* queuing_rw_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) + +/* reader_writer_lock.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +/* spin_rw_mutex.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +/* spin_rw_mutex v3 */ +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) + +/* spin_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) + +/* mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +/* recursive_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +/* QueuingMutex.cpp */ +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) + +/* critical_section.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +/* concurrent_hash_map */ +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +/* concurrent_queue.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +/* concurrent_queue v3 */ +/* constructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) +/* destructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +/* typeinfo */ +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +/* vtable */ +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +/* methods */ +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +/* concurrent_vector.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +/* concurrent_vector v3 */ +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) + +/* tbb_thread */ +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.def new file mode 100644 index 0000000000..586953906a --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.def @@ -0,0 +1,56 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +#define __TBB_SYMBOL( sym ) sym; +#include "lin64ipf-tbb-export.lst" + +local: + +/* TBB symbols */ +*3tbb*; +*__TBB*; + +/* ITT symbols */ +__itt_*; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +?0_memcopyA; +?0_memcopyDu; +?0_memcpyD; +?1__memcpy; +?1__memmove; +?1__serial_memmove; +memcpy; +memset; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.lst new file mode 100644 index 0000000000..05debd224e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/lin64ipf-tbb-export.lst @@ -0,0 +1,412 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* cache_aligned_allocator.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +/* task.cpp v3 */ +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEl ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +/* task_v2.cpp */ +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif /* !TBB_NO_LEGACY */ + +/* Exception handling in task scheduler */ +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/* Symbols for exceptions thrown from TBB */ +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) + +/* tbb_misc.cpp */ +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +/* tbb_main.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) + +/* pipeline.cpp */ +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +/* queuing_rw_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) + +/* reader_writer_lock.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +/* spin_rw_mutex.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +/* spin_rw_mutex v3 */ +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) + +/* spin_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) + +/* mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +/* recursive_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +/* QueuingMutex.cpp */ +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) + +/* critical_section.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +/* concurrent_hash_map */ +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +/* concurrent_queue.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +/* concurrent_queue v3 */ +/* constructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) +/* destructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +/* typeinfo */ +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +/* vtable */ +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +/* methods */ +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +/* concurrent_vector.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +/* concurrent_vector v3 */ +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) + +/* tbb_thread */ +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) + +/* asm functions */ +__TBB_SYMBOL( __TBB_machine_fetchadd1__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchadd2__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchadd4__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchadd8__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchstore1__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchstore2__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchstore4__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchstore8__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_fetchadd1acquire ) +__TBB_SYMBOL( __TBB_machine_fetchadd1release ) +__TBB_SYMBOL( __TBB_machine_fetchadd2acquire ) +__TBB_SYMBOL( __TBB_machine_fetchadd2release ) +__TBB_SYMBOL( __TBB_machine_fetchadd4acquire ) +__TBB_SYMBOL( __TBB_machine_fetchadd4release ) +__TBB_SYMBOL( __TBB_machine_fetchadd8acquire ) +__TBB_SYMBOL( __TBB_machine_fetchadd8release ) +__TBB_SYMBOL( __TBB_machine_fetchstore1acquire ) +__TBB_SYMBOL( __TBB_machine_fetchstore1release ) +__TBB_SYMBOL( __TBB_machine_fetchstore2acquire ) +__TBB_SYMBOL( __TBB_machine_fetchstore2release ) +__TBB_SYMBOL( __TBB_machine_fetchstore4acquire ) +__TBB_SYMBOL( __TBB_machine_fetchstore4release ) +__TBB_SYMBOL( __TBB_machine_fetchstore8acquire ) +__TBB_SYMBOL( __TBB_machine_fetchstore8release ) +__TBB_SYMBOL( __TBB_machine_cmpswp1acquire ) +__TBB_SYMBOL( __TBB_machine_cmpswp1release ) +__TBB_SYMBOL( __TBB_machine_cmpswp1__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_cmpswp2acquire ) +__TBB_SYMBOL( __TBB_machine_cmpswp2release ) +__TBB_SYMBOL( __TBB_machine_cmpswp2__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_cmpswp4acquire ) +__TBB_SYMBOL( __TBB_machine_cmpswp4release ) +__TBB_SYMBOL( __TBB_machine_cmpswp4__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_cmpswp8acquire ) +__TBB_SYMBOL( __TBB_machine_cmpswp8release ) +__TBB_SYMBOL( __TBB_machine_cmpswp8__TBB_full_fence ) +__TBB_SYMBOL( __TBB_machine_lg ) +__TBB_SYMBOL( __TBB_machine_lockbyte ) +__TBB_SYMBOL( __TBB_machine_pause ) +__TBB_SYMBOL( __TBB_machine_trylockbyte ) +__TBB_SYMBOL( __TBB_machine_load8_relaxed ) +__TBB_SYMBOL( __TBB_machine_store8_relaxed ) +__TBB_SYMBOL( __TBB_machine_load4_relaxed ) +__TBB_SYMBOL( __TBB_machine_store4_relaxed ) +__TBB_SYMBOL( __TBB_machine_load2_relaxed ) +__TBB_SYMBOL( __TBB_machine_store2_relaxed ) +__TBB_SYMBOL( __TBB_machine_load1_relaxed ) +__TBB_SYMBOL( __TBB_machine_store1_relaxed ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.def new file mode 100644 index 0000000000..b9371ed330 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.def @@ -0,0 +1,31 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define __TBB_SYMBOL( sym ) _##sym +#include "mac32-tbb-export.lst" + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.lst new file mode 100644 index 0000000000..d5b2aa38a6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac32-tbb-export.lst @@ -0,0 +1,387 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* + Sometimes Mac OS X requires leading underscore (e. g. in export list file), but sometimes not + (e. g. when searching symbol in a dynamic library via dlsym()). Symbols in this file SHOULD + be listed WITHOUT one leading underscore. __TBB_SYMBOL macro should add underscore when + necessary, depending on the indended usage. +*/ + +// cache_aligned_allocator.cpp +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +// task.cpp v3 +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEl ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +// task_v2.cpp +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif + +// Exception handling in task scheduler +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// Symbols for exceptions thrown from TBB +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZNSt13runtime_errorD1Ev ) +__TBB_SYMBOL( _ZTISt13runtime_error ) +__TBB_SYMBOL( _ZTSSt13runtime_error ) +__TBB_SYMBOL( _ZNSt16invalid_argumentD1Ev ) +__TBB_SYMBOL( _ZTISt16invalid_argument ) +__TBB_SYMBOL( _ZTSSt16invalid_argument ) +__TBB_SYMBOL( _ZNSt11range_errorD1Ev ) +__TBB_SYMBOL( _ZTISt11range_error ) +__TBB_SYMBOL( _ZTSSt11range_error ) +__TBB_SYMBOL( _ZNSt12length_errorD1Ev ) +__TBB_SYMBOL( _ZTISt12length_error ) +__TBB_SYMBOL( _ZTSSt12length_error ) +__TBB_SYMBOL( _ZNSt12out_of_rangeD1Ev ) +__TBB_SYMBOL( _ZTISt12out_of_range ) +__TBB_SYMBOL( _ZTSSt12out_of_range ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) + +// tbb_misc.cpp +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +#if __TBB_x86_32 +__TBB_SYMBOL( __TBB_machine_store8_slow_perf_warning ) +__TBB_SYMBOL( __TBB_machine_store8_slow ) +#endif +__TBB_SYMBOL( TBB_runtime_interface_version ) + +// tbb_main.cpp +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) + +// pipeline.cpp +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +// queuing_rw_mutex.cpp +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) + +// reader_writer_lock.cpp +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +// spin_rw_mutex.cpp v2 +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +// spin_rw_mutex v3 +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) + +// spin_mutex.cpp +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) + +// mutex.cpp +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +// recursive_mutex.cpp +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +// queuing_mutex.cpp +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) + +// critical_section.cpp +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +// concurrent_hash_map +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +// concurrent_queue.cpp v2 +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityEim ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +// concurrent_queue v3 +// constructors +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) +// destructors +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +// typeinfo +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +// vtable +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +// methods +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityEim ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +// concurrent_vector.cpp v2 +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +// concurrent_vector v3 +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) + +// tbb_thread +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.def new file mode 100644 index 0000000000..a9b618848e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.def @@ -0,0 +1,31 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define __TBB_SYMBOL( sym ) _##sym +#include "mac64-tbb-export.lst" + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.lst new file mode 100644 index 0000000000..27237a72e2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mac64-tbb-export.lst @@ -0,0 +1,384 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* + Sometimes Mac OS X requires leading underscore (e. g. in export list file), but sometimes not + (e. g. when searching symbol in a dynamic library via dlsym()). Symbols in this file SHOULD + be listed WITHOUT one leading underscore. __TBB_SYMBOL macro should add underscore when + necessary, depending on the indended usage. +*/ + +// cache_aligned_allocator.cpp +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEmmPv ) +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +// task.cpp v3 +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEm ) +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEm ) +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEim ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEl ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +// task_v2.cpp +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif + +// Exception handling in task scheduler +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEm ) +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// Symbols for exceptions thrown from TBB +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZNSt13runtime_errorD1Ev ) +__TBB_SYMBOL( _ZTISt13runtime_error ) +__TBB_SYMBOL( _ZTSSt13runtime_error ) +__TBB_SYMBOL( _ZNSt16invalid_argumentD1Ev ) +__TBB_SYMBOL( _ZTISt16invalid_argument ) +__TBB_SYMBOL( _ZTSSt16invalid_argument ) +__TBB_SYMBOL( _ZNSt11range_errorD1Ev ) +__TBB_SYMBOL( _ZTISt11range_error ) +__TBB_SYMBOL( _ZTSSt11range_error ) +__TBB_SYMBOL( _ZNSt12length_errorD1Ev ) +__TBB_SYMBOL( _ZTISt12length_error ) +__TBB_SYMBOL( _ZTSSt12length_error ) +__TBB_SYMBOL( _ZNSt12out_of_rangeD1Ev ) +__TBB_SYMBOL( _ZTISt12out_of_range ) +__TBB_SYMBOL( _ZTSSt12out_of_range ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) + + +// tbb_misc.cpp +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +// tbb_main.cpp +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) + +// pipeline.cpp +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEm ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEmRNS_18task_group_contextE ) +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +// queuing_rw_mutex.cpp +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) + +// reader_writer_lock.cpp +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +// spin_rw_mutex.cpp v2 +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +// spin_rw_mutex v3 +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) + +// spin_mutex.cpp +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) + +// mutex.cpp +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +// recursive_mutex.cpp +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +// queuing_mutex.cpp +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) + +// critical_section.cpp +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +// concurrent_hash_map +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +// concurrent_queue.cpp v2 +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityElm ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Em ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +// concurrent_queue v3 +// constructors +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Em ) +// destructors +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +// typeinfo +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +// vtable +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +// methods +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityElm ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +// concurrent_vector.cpp v2 +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvmEb ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEmmPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEmmPFvPvmE ) +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +// concurrent_vector v3 +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_mPFvPvPKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_mPFvPvmEPFvS4_PKvmESA_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEmmm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEmRm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEmmPFvPvPKvmES4_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEmPvPFvS2_mEPFvS2_PKvmE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEm ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEmmmPKvPFvPvmEPFvS4_S3_mE ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEmmPFvPvPKvmES4_ ) + +// tbb_thread +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFPvS2_ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Em ) +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mailbox.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/mailbox.h new file mode 100644 index 0000000000..e5dc92d84c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mailbox.h @@ -0,0 +1,229 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_mailbox_H +#define _TBB_mailbox_H + +#include "tbb/tbb_stddef.h" +#include "tbb/cache_aligned_allocator.h" + +#include "scheduler_common.h" + +namespace tbb { +namespace internal { + +class generic_scheduler; +class mail_outbox; + +struct task_proxy : public task { + static const intptr_t pool_bit = 1<<0; + static const intptr_t mailbox_bit = 1<<1; + static const intptr_t location_mask = pool_bit | mailbox_bit; + /* All but two low-order bits represent a (task*). + Two low-order bits mean: + 1 = proxy is/was/will be in task pool + 2 = proxy is/was/will be in mailbox */ + intptr_t task_and_tag; + + //! Pointer to next task_proxy in a mailbox + task_proxy *__TBB_atomic next_in_mailbox; + + //! Mailbox to which this was mailed. + mail_outbox* outbox; + + //! True if the proxy is stored both in its sender's pool and in the destination mailbox. + static bool is_shared ( intptr_t tat ) { + return (tat & location_mask) == location_mask; + } + + //! Returns a pointer to the encapsulated task or NULL. + static task* task_ptr ( intptr_t tat ) { + return (task*)(tat & ~location_mask); + } + + //! Returns a pointer to the encapsulated task or NULL, and frees proxy if necessary. + template<intptr_t from_bit> + inline task* extract_task () { + __TBB_ASSERT( prefix().extra_state == es_task_proxy, "Normal task misinterpreted as a proxy?" ); + intptr_t tat = __TBB_load_with_acquire(task_and_tag); + __TBB_ASSERT( tat == from_bit || (is_shared(tat) && task_ptr(tat)), + "Proxy's tag cannot specify both locations if the proxy " + "was retrieved from one of its original locations" ); + if ( tat != from_bit ) { + const intptr_t cleaner_bit = location_mask & ~from_bit; + // Attempt to transition the proxy to the "empty" state with + // cleaner_bit specifying entity responsible for its eventual freeing. + // Explicit cast to void* is to work around a seeming ICC 11.1 bug. + if ( __TBB_CompareAndSwapW( (void*)&task_and_tag, cleaner_bit, tat ) == tat ) { + // Successfully grabbed the task, and left new owner with the job of freeing the proxy + return task_ptr(tat); + } + } + // Proxied task has already been claimed from another proxy location. + __TBB_ASSERT( task_and_tag == from_bit, "Empty proxy cannot contain non-zero task pointer" ); + poison_pointer(outbox); + poison_pointer(next_in_mailbox); + poison_value(task_and_tag); + return NULL; + } +}; // struct task_proxy + +//! Internal representation of mail_outbox, without padding. +class unpadded_mail_outbox { +protected: + typedef task_proxy*__TBB_atomic proxy_ptr; + + //! Pointer to first task_proxy in mailbox, or NULL if box is empty. + proxy_ptr my_first; + + //! Pointer to pointer that will point to next item in the queue. Never NULL. + proxy_ptr* __TBB_atomic my_last; + + //! Owner of mailbox is not executing a task, and has drained its own task pool. + bool my_is_idle; +}; + +//! Class representing where mail is put. +/** Padded to occupy a cache line. */ +class mail_outbox : unpadded_mail_outbox { + char pad[NFS_MaxLineSize-sizeof(unpadded_mail_outbox)]; + + task_proxy* internal_pop() { + task_proxy* const first = __TBB_load_relaxed(my_first); + if( !first ) + return NULL; + __TBB_control_consistency_helper(); // on my_first + // There is a first item in the mailbox. See if there is a second. + if( task_proxy* second = first->next_in_mailbox ) { + // There are at least two items, so first item can be popped easily. + my_first = second; + } else { + // There is only one item. Some care is required to pop it. + my_first = NULL; + if( (proxy_ptr*)__TBB_CompareAndSwapW(&my_last, (intptr_t)&my_first, + (intptr_t)&first->next_in_mailbox) == &first->next_in_mailbox ) + { + // Successfully transitioned mailbox from having one item to having none. + __TBB_ASSERT(!first->next_in_mailbox,NULL); + } else { + // Some other thread updated my_last but has not filled in first->next_in_mailbox + // Wait until first item points to second item. + for( atomic_backoff backoff; !(second = first->next_in_mailbox); backoff.pause() ) {} + my_first = second; + } + } + return first; + } +public: + friend class mail_inbox; + + //! Push task_proxy onto the mailbox queue of another thread. + /** Implementation is wait-free. */ + void push( task_proxy& t ) { + __TBB_ASSERT(&t, NULL); + t.next_in_mailbox = NULL; + proxy_ptr * const link = (proxy_ptr *)__TBB_FetchAndStoreW(&my_last,(intptr_t)&t.next_in_mailbox); + // No release fence required for the next store, because there are no memory operations + // between the previous fully fenced atomic operation and the store. + __TBB_store_relaxed(*link, &t); + } + + //! Construct *this as a mailbox from zeroed memory. + /** Raise assertion if *this is not previously zeroed, or sizeof(this) is wrong. + This method is provided instead of a full constructor since we know the object + will be constructed in zeroed memory. */ + void construct() { + __TBB_ASSERT( sizeof(*this)==NFS_MaxLineSize, NULL ); + __TBB_ASSERT( !my_first, NULL ); + __TBB_ASSERT( !my_last, NULL ); + __TBB_ASSERT( !my_is_idle, NULL ); + my_last=&my_first; + } + + //! Drain the mailbox + intptr_t drain() { + intptr_t k = 0; + // No fences here because other threads have already quit. + for( ; task_proxy* t = my_first; ++k ) { + my_first = t->next_in_mailbox; + NFS_Free((char*)t - task_prefix_reservation_size); + } + return k; + } + + //! True if thread that owns this mailbox is looking for work. + bool recipient_is_idle() { + return my_is_idle; + } +}; // class mail_outbox + +//! Class representing source of mail. +class mail_inbox { + //! Corresponding sink where mail that we receive will be put. + mail_outbox* my_putter; +public: + //! Construct unattached inbox + mail_inbox() : my_putter(NULL) {} + + //! Attach inbox to a corresponding outbox. + void attach( mail_outbox& putter ) { + __TBB_ASSERT(!my_putter,"already attached"); + my_putter = &putter; + } + //! Detach inbox from its outbox + void detach() { + __TBB_ASSERT(my_putter,"not attached"); + my_putter = NULL; + } + //! Get next piece of mail, or NULL if mailbox is empty. + task_proxy* pop() { + return my_putter->internal_pop(); + } + //! Indicate whether thread that reads this mailbox is idle. + /** Raises assertion failure if mailbox is redundantly marked as not idle. */ + void set_is_idle( bool value ) { + if( my_putter ) { + __TBB_ASSERT( my_putter->my_is_idle || value, "attempt to redundantly mark mailbox as not idle" ); + my_putter->my_is_idle = value; + } + } + //! Indicate whether thread that reads this mailbox is idle. + bool is_idle_state ( bool value ) const { + return !my_putter || my_putter->my_is_idle == value; + } + +#if DO_ITT_NOTIFY + //! Get pointer to corresponding outbox used for ITT_NOTIFY calls. + void* outbox() const {return my_putter;} +#endif /* DO_ITT_NOTIFY */ +}; // class mail_inbox + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_mailbox_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/market.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/market.cpp new file mode 100644 index 0000000000..f1d22629b4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/market.cpp @@ -0,0 +1,624 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_stddef.h" + +#include "market.h" +#include "tbb_main.h" +#include "governor.h" +#include "scheduler.h" +#include "itt_notify.h" + +namespace tbb { +namespace internal { + +void market::insert_arena_into_list ( arena& a ) { +#if __TBB_TASK_PRIORITY + arena_list_type &arenas = my_priority_levels[a.my_top_priority].arenas; + arena_list_type::iterator &next = my_priority_levels[a.my_top_priority].next_arena; +#else /* !__TBB_TASK_PRIORITY */ + arena_list_type &arenas = my_arenas; + arena_list_type::iterator &next = my_next_arena; +#endif /* !__TBB_TASK_PRIORITY */ + arenas.push_front( a ); + if ( arenas.size() == 1 ) + next = arenas.begin(); +} + +void market::remove_arena_from_list ( arena& a ) { +#if __TBB_TASK_PRIORITY + arena_list_type &arenas = my_priority_levels[a.my_top_priority].arenas; + arena_list_type::iterator &next = my_priority_levels[a.my_top_priority].next_arena; +#else /* !__TBB_TASK_PRIORITY */ + arena_list_type &arenas = my_arenas; + arena_list_type::iterator &next = my_next_arena; +#endif /* !__TBB_TASK_PRIORITY */ + __TBB_ASSERT( next != arenas.end(), NULL ); + if ( &*next == &a ) + if ( ++next == arenas.end() && arenas.size() > 1 ) + next = arenas.begin(); + arenas.remove( a ); +} + +//------------------------------------------------------------------------ +// market +//------------------------------------------------------------------------ + +market::market ( unsigned max_num_workers, size_t stack_size ) + : my_ref_count(1) + , my_stack_size(stack_size) + , my_max_num_workers(max_num_workers) +#if __TBB_TASK_PRIORITY + , my_global_top_priority(normalized_normal_priority) + , my_global_bottom_priority(normalized_normal_priority) +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + , my_lowest_populated_level(normalized_normal_priority) +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ +#endif /* __TBB_TASK_PRIORITY */ +{ +#if __TBB_TASK_PRIORITY + __TBB_ASSERT( my_global_reload_epoch == 0, NULL ); + my_priority_levels[normalized_normal_priority].workers_available = max_num_workers; +#endif /* __TBB_TASK_PRIORITY */ + + // Once created RML server will start initializing workers that will need + // global market instance to get worker stack size + my_server = governor::create_rml_server( *this ); + __TBB_ASSERT( my_server, "Failed to create RML server" ); +} + + +market& market::global_market ( unsigned max_num_workers, size_t stack_size ) { + global_market_mutex_type::scoped_lock lock( theMarketMutex ); + market *m = theMarket; + if ( m ) { + ++m->my_ref_count; + if ( m->my_stack_size < stack_size ) + runtime_warning( "Newer master request for larger stack cannot be satisfied\n" ); + } + else { + max_num_workers = max( governor::default_num_threads() - 1, max_num_workers ); + // at least 1 worker is required to support starvation resistant tasks + if( max_num_workers==0 ) max_num_workers = 1; + // Create the global market instance + size_t size = sizeof(market); +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( __TBB_offsetof(market, my_workers) + sizeof(generic_scheduler*) == sizeof(market), + "my_workers must be the last data field of the market class"); + size += sizeof(generic_scheduler*) * (max_num_workers - 1); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + __TBB_InitOnce::add_ref(); + void* storage = NFS_Allocate(size, 1, NULL); + memset( storage, 0, size ); + // Initialize and publish global market + m = new (storage) market( max_num_workers, stack_size ); + theMarket = m; + } + return *m; +} + +void market::destroy () { +#if __TBB_COUNT_TASK_NODES + if ( my_task_node_count ) + runtime_warning( "Leaked %ld task objects\n", (long)my_task_node_count ); +#endif /* __TBB_COUNT_TASK_NODES */ + this->~market(); + NFS_Free( this ); + __TBB_InitOnce::remove_ref(); +} + +void market::release () { + __TBB_ASSERT( theMarket == this, "Global market instance was destroyed prematurely?" ); + bool do_release = false; + { + global_market_mutex_type::scoped_lock lock(theMarketMutex); + if ( --my_ref_count == 0 ) { + do_release = true; + theMarket = NULL; + } + } + if( do_release ) + my_server->request_close_connection(); +} + +void market::wait_workers () { + // usable for this kind of scheduler only + __TBB_ASSERT(governor::needsWaitWorkers(), NULL); + // wait till terminating last worker decresed my_ref_count + while (__TBB_load_with_acquire(my_ref_count) > 1) + __TBB_Yield(); + __TBB_ASSERT(1 == my_ref_count, NULL); + release(); +} + +arena& market::create_arena ( unsigned max_num_workers, size_t stack_size ) { + market &m = global_market( max_num_workers, stack_size ); // increases market's ref count +#if __TBB_TASK_ARENA + // Prevent cutting an extra slot for task_arena(p,0) with default market (p-1 worketrs). + // This is a temporary workaround for 1968 until (TODO:) master slot reservation is reworked + arena& a = arena::allocate_arena( m, min(max_num_workers, m.my_max_num_workers+1) ); +#else + arena& a = arena::allocate_arena( m, min(max_num_workers, m.my_max_num_workers) ); +#endif + // Add newly created arena into the existing market's list. + arenas_list_mutex_type::scoped_lock lock(m.my_arenas_list_mutex); + m.insert_arena_into_list(a); + return a; +} + +/** This method must be invoked under my_arenas_list_mutex. **/ +void market::detach_arena ( arena& a ) { + __TBB_ASSERT( theMarket == this, "Global market instance was destroyed prematurely?" ); +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + __TBB_ASSERT( !a.my_num_workers_present, NULL ); +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + __TBB_ASSERT( !a.my_slots[0].my_scheduler, NULL ); + remove_arena_from_list(a); + if ( a.my_aba_epoch == my_arenas_aba_epoch ) + ++my_arenas_aba_epoch; +} + +void market::try_destroy_arena ( arena* a, uintptr_t aba_epoch ) { + __TBB_ASSERT ( a, NULL ); + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + assert_market_valid(); +#if __TBB_TASK_PRIORITY + for ( int p = my_global_top_priority; p >= my_global_bottom_priority; --p ) { + priority_level_info &pl = my_priority_levels[p]; + arena_list_type &my_arenas = pl.arenas; +#endif /* __TBB_TASK_PRIORITY */ + arena_list_type::iterator it = my_arenas.begin(); + for ( ; it != my_arenas.end(); ++it ) { + if ( a == &*it ) { + if ( it->my_aba_epoch == aba_epoch ) { + // Arena is alive + if ( !a->my_num_workers_requested && !a->my_references ) { + __TBB_ASSERT( !a->my_num_workers_allotted && (a->my_pool_state == arena::SNAPSHOT_EMPTY || !a->my_max_num_workers), "Inconsistent arena state" ); + // Arena is abandoned. Destroy it. + detach_arena( *a ); + lock.release(); + a->free_arena(); + } + } + return; + } + } +#if __TBB_TASK_PRIORITY + } +#endif /* __TBB_TASK_PRIORITY */ +} + +void market::try_destroy_arena ( market* m, arena* a, uintptr_t aba_epoch, bool master ) { + // Arena may have been orphaned. Or it may have been destroyed. + // Thus we cannot dereference the pointer to it until its liveness is verified. + // Arena is alive if it is found in the market's list. + + if ( m != theMarket ) { + // The market has already been emptied. + return; + } + else if ( master ) { + // If this is a master thread, market can be destroyed at any moment. + // So protect it with an extra refcount. + global_market_mutex_type::scoped_lock lock(theMarketMutex); + if ( m != theMarket ) + return; + ++m->my_ref_count; + } + m->try_destroy_arena( a, aba_epoch ); + if ( master ) + m->release(); +} + +/** This method must be invoked under my_arenas_list_mutex. **/ +arena* market::arena_in_need ( arena_list_type &arenas, arena_list_type::iterator& next ) { + if ( arenas.empty() ) + return NULL; + __TBB_ASSERT( next != arenas.end(), NULL ); + arena_list_type::iterator it = next; + do { + arena& a = *it; + if ( ++it == arenas.end() ) + it = arenas.begin(); + if ( a.num_workers_active() < a.my_num_workers_allotted ) { + a.my_references+=2; // add a worker +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + ++a.my_num_workers_present; + ++my_priority_levels[a.my_top_priority].workers_present; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + next = it; + return &a; + } + } while ( it != next ); + return NULL; +} + +void market::update_allotment ( arena_list_type& arenas, int workers_demand, int max_workers ) { + __TBB_ASSERT( workers_demand, NULL ); + max_workers = min(workers_demand, max_workers); + int carry = 0; +#if TBB_USE_ASSERT + int assigned = 0; +#endif /* TBB_USE_ASSERT */ + arena_list_type::iterator it = arenas.begin(); + for ( ; it != arenas.end(); ++it ) { + arena& a = *it; + if ( a.my_num_workers_requested <= 0 ) { + __TBB_ASSERT( !a.my_num_workers_allotted, NULL ); + continue; + } + int tmp = a.my_num_workers_requested * max_workers + carry; + int allotted = tmp / workers_demand; + carry = tmp % workers_demand; + // a.my_num_workers_requested may temporarily exceed a.my_max_num_workers + a.my_num_workers_allotted = min( allotted, (int)a.my_max_num_workers ); +#if TBB_USE_ASSERT + assigned += a.my_num_workers_allotted; +#endif /* TBB_USE_ASSERT */ + } + __TBB_ASSERT( assigned <= workers_demand, NULL ); +} + +#if __TBB_TASK_PRIORITY +inline void market::update_global_top_priority ( intptr_t newPriority ) { + GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.market_prio_switches ); + my_global_top_priority = newPriority; + my_priority_levels[newPriority].workers_available = my_max_num_workers; + advance_global_reload_epoch(); +} + +inline void market::reset_global_priority () { + my_global_bottom_priority = normalized_normal_priority; + update_global_top_priority(normalized_normal_priority); +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + my_lowest_populated_level = normalized_normal_priority; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ +} + +arena* market::arena_in_need ( +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + arena* prev_arena +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + ) +{ + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + assert_market_valid(); +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + if ( prev_arena ) { + priority_level_info &pl = my_priority_levels[prev_arena->my_top_priority]; + --prev_arena->my_num_workers_present; + --pl.workers_present; + if ( !--prev_arena->my_references && !prev_arena->my_num_workers_requested ) { + detach_arena( *a ); + lock.release(); + a->free_arena(); + lock.acquire(); + } + } +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + int p = my_global_top_priority; + arena *a = NULL; + do { + priority_level_info &pl = my_priority_levels[p]; +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + __TBB_ASSERT( p >= my_lowest_populated_level, NULL ); + if ( pl.workers_present >= pl.workers_requested ) + continue; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + a = arena_in_need( pl.arenas, pl.next_arena ); + } while ( !a && --p >= my_global_bottom_priority ); + return a; +} + +void market::update_allotment ( intptr_t highest_affected_priority ) { + intptr_t i = highest_affected_priority; + int available = my_priority_levels[i].workers_available; +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + my_lowest_populated_level = my_global_bottom_priority; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + for ( ; i >= my_global_bottom_priority; --i ) { + priority_level_info &pl = my_priority_levels[i]; + pl.workers_available = available; + if ( pl.workers_requested ) { + update_allotment( pl.arenas, pl.workers_requested, available ); + available -= pl.workers_requested; + if ( available < 0 ) { + available = 0; +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + my_lowest_populated_level = i; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + break; + } + } + } + __TBB_ASSERT( i <= my_global_bottom_priority || !available, NULL ); + for ( --i; i >= my_global_bottom_priority; --i ) { + priority_level_info &pl = my_priority_levels[i]; + pl.workers_available = 0; + arena_list_type::iterator it = pl.arenas.begin(); + for ( ; it != pl.arenas.end(); ++it ) { + __TBB_ASSERT( it->my_num_workers_requested || !it->my_num_workers_allotted, NULL ); + it->my_num_workers_allotted = 0; + } + } +} +#endif /* __TBB_TASK_PRIORITY */ + +void market::adjust_demand ( arena& a, int delta ) { + __TBB_ASSERT( theMarket, "market instance was destroyed prematurely?" ); + if ( !delta ) + return; + my_arenas_list_mutex.lock(); + int prev_req = a.my_num_workers_requested; + a.my_num_workers_requested += delta; + if ( a.my_num_workers_requested <= 0 ) { + a.my_num_workers_allotted = 0; + if ( prev_req <= 0 ) { + my_arenas_list_mutex.unlock(); + return; + } + delta = -prev_req; + } +#if __TBB_TASK_ARENA + else if ( prev_req < 0 ) { + delta = a.my_num_workers_requested; + } +#else /* __TBB_TASK_ARENA */ + __TBB_ASSERT( prev_req >= 0, "Part-size request to RML?" ); +#endif /* __TBB_TASK_ARENA */ +#if __TBB_TASK_PRIORITY + intptr_t p = a.my_top_priority; + priority_level_info &pl = my_priority_levels[p]; + pl.workers_requested += delta; + __TBB_ASSERT( pl.workers_requested >= 0, NULL ); +#if !__TBB_TASK_ARENA + __TBB_ASSERT( a.my_num_workers_requested >= 0, NULL ); +#else + //TODO: understand the assertion and modify +#endif + if ( a.my_num_workers_requested <= 0 ) { + if ( a.my_top_priority != normalized_normal_priority ) { + GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.arena_prio_resets ); + update_arena_top_priority( a, normalized_normal_priority ); + } + a.my_bottom_priority = normalized_normal_priority; + } + if ( p == my_global_top_priority ) { + if ( !pl.workers_requested ) { + while ( --p >= my_global_bottom_priority && !my_priority_levels[p].workers_requested ) + continue; + if ( p < my_global_bottom_priority ) + reset_global_priority(); + else + update_global_top_priority(p); + } + update_allotment( my_global_top_priority ); + } + else if ( p > my_global_top_priority ) { +#if !__TBB_TASK_ARENA + __TBB_ASSERT( pl.workers_requested > 0, NULL ); +#else + //TODO: understand the assertion and modify +#endif + update_global_top_priority(p); + a.my_num_workers_allotted = min( (int)my_max_num_workers, a.my_num_workers_requested ); + my_priority_levels[p - 1].workers_available = my_max_num_workers - a.my_num_workers_allotted; + update_allotment( p - 1 ); + } + else if ( p == my_global_bottom_priority ) { + if ( !pl.workers_requested ) { + while ( ++p <= my_global_top_priority && !my_priority_levels[p].workers_requested ) + continue; + if ( p > my_global_top_priority ) + reset_global_priority(); + else { + my_global_bottom_priority = p; +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + my_lowest_populated_level = max( my_lowest_populated_level, p ); +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + } + } + else + update_allotment( p ); + } + else if ( p < my_global_bottom_priority ) { + __TBB_ASSERT( a.my_num_workers_requested > 0, NULL ); + int prev_bottom = my_global_bottom_priority; + my_global_bottom_priority = p; + update_allotment( prev_bottom ); + } + else { + __TBB_ASSERT( my_global_bottom_priority < p && p < my_global_top_priority, NULL ); + update_allotment( p ); + } + assert_market_valid(); +#else /* !__TBB_TASK_PRIORITY */ + my_total_demand += delta; + update_allotment(); +#endif /* !__TBB_TASK_PRIORITY */ + my_arenas_list_mutex.unlock(); + // Must be called outside of any locks + my_server->adjust_job_count_estimate( delta ); + GATHER_STATISTIC( governor::local_scheduler_if_initialized() ? ++governor::local_scheduler_if_initialized()->my_counters.gate_switches : 0 ); +} + +void market::process( job& j ) { + generic_scheduler& s = static_cast<generic_scheduler&>(j); + __TBB_ASSERT( governor::is_set(&s), NULL ); +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + arena *a = NULL; + while ( (a = arena_in_need(a)) ) +#else + while ( arena *a = arena_in_need() ) +#endif + a->process(s); + GATHER_STATISTIC( ++s.my_counters.market_roundtrips ); +} + +void market::cleanup( job& j ) { + __TBB_ASSERT( theMarket != this, NULL ); + generic_scheduler& s = static_cast<generic_scheduler&>(j); + generic_scheduler* mine = governor::local_scheduler_if_initialized(); + __TBB_ASSERT( !mine || mine->my_arena_index!=0, NULL ); + if( mine!=&s ) { + governor::assume_scheduler( &s ); + generic_scheduler::cleanup_worker( &s, mine!=NULL ); + governor::assume_scheduler( mine ); + } else { + generic_scheduler::cleanup_worker( &s, true ); + } +} + +void market::acknowledge_close_connection() { + destroy(); +} + +::rml::job* market::create_one_job() { + unsigned index = ++my_num_workers; + __TBB_ASSERT( index > 0, NULL ); + ITT_THREAD_SET_NAME(_T("TBB Worker Thread")); + // index serves as a hint decreasing conflicts between workers when they migrate between arenas + generic_scheduler* s = generic_scheduler::create_worker( *this, index ); +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( !my_workers[index - 1], NULL ); + my_workers[index - 1] = s; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + governor::sign_on(s); + return s; +} + +#if __TBB_TASK_PRIORITY +void market::update_arena_top_priority ( arena& a, intptr_t new_priority ) { + GATHER_STATISTIC( ++governor::local_scheduler_if_initialized()->my_counters.arena_prio_switches ); + __TBB_ASSERT( a.my_top_priority != new_priority, NULL ); + priority_level_info &prev_level = my_priority_levels[a.my_top_priority], + &new_level = my_priority_levels[new_priority]; + remove_arena_from_list(a); + a.my_top_priority = new_priority; + insert_arena_into_list(a); + ++a.my_reload_epoch; +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + // Arena's my_num_workers_present may remain positive for some time after its + // my_num_workers_requested becomes zero. Thus the following two lines are + // executed unconditionally. + prev_level.workers_present -= a.my_num_workers_present; + new_level.workers_present += a.my_num_workers_present; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + prev_level.workers_requested -= a.my_num_workers_requested; + new_level.workers_requested += a.my_num_workers_requested; + __TBB_ASSERT( prev_level.workers_requested >= 0 && new_level.workers_requested >= 0, NULL ); +} + +bool market::lower_arena_priority ( arena& a, intptr_t new_priority, intptr_t old_priority ) { + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + if ( a.my_top_priority != old_priority ) { + assert_market_valid(); + return false; + } + __TBB_ASSERT( a.my_top_priority > new_priority, NULL ); + __TBB_ASSERT( my_global_top_priority >= a.my_top_priority, NULL ); + intptr_t p = a.my_top_priority; + update_arena_top_priority( a, new_priority ); + if ( a.my_num_workers_requested > 0 ) { + if ( my_global_bottom_priority > new_priority ) { + my_global_bottom_priority = new_priority; + } + if ( p == my_global_top_priority && !my_priority_levels[p].workers_requested ) { + // Global top level became empty + for ( --p; !my_priority_levels[p].workers_requested; --p ) continue; + __TBB_ASSERT( p >= my_global_bottom_priority, NULL ); + update_global_top_priority(p); + } + update_allotment( p ); + } + assert_market_valid(); + return true; +} + +bool market::update_arena_priority ( arena& a, intptr_t new_priority ) { + arenas_list_mutex_type::scoped_lock lock(my_arenas_list_mutex); + if ( a.my_top_priority == new_priority ) { + assert_market_valid(); + return false; + } + else if ( a.my_top_priority > new_priority ) { + if ( a.my_bottom_priority > new_priority ) + a.my_bottom_priority = new_priority; + assert_market_valid(); + return false; + } + intptr_t p = a.my_top_priority; + intptr_t highest_affected_level = max(p, new_priority); + update_arena_top_priority( a, new_priority ); + if ( a.my_num_workers_requested > 0 ) { + if ( my_global_top_priority < new_priority ) { + update_global_top_priority(new_priority); + } + else if ( my_global_top_priority == new_priority ) { + advance_global_reload_epoch(); + } + else { + __TBB_ASSERT( new_priority < my_global_top_priority, NULL ); + __TBB_ASSERT( new_priority > my_global_bottom_priority, NULL ); + if ( p == my_global_top_priority && !my_priority_levels[p].workers_requested ) { + // Global top level became empty + __TBB_ASSERT( my_global_bottom_priority < p, NULL ); + for ( --p; !my_priority_levels[p].workers_requested; --p ) continue; + __TBB_ASSERT( p >= new_priority, NULL ); + update_global_top_priority(p); + highest_affected_level = p; + } + } + if ( p == my_global_bottom_priority ) { + // Arena priority was increased from the global bottom level. + __TBB_ASSERT( p < new_priority, NULL ); // n + __TBB_ASSERT( new_priority <= my_global_top_priority, NULL ); + while ( !my_priority_levels[my_global_bottom_priority].workers_requested ) + ++my_global_bottom_priority; + __TBB_ASSERT( my_global_bottom_priority <= new_priority, NULL ); + __TBB_ASSERT( my_priority_levels[my_global_bottom_priority].workers_requested > 0, NULL ); + } + update_allotment( highest_affected_level ); + } + assert_market_valid(); + return true; +} +#endif /* __TBB_TASK_PRIORITY */ + +#if __TBB_COUNT_TASK_NODES +intptr_t market::workers_task_node_count() { + intptr_t result = 0; + ForEachArena(a) { + result += a.workers_task_node_count(); + } EndForEach(); + return result; +} +#endif /* __TBB_COUNT_TASK_NODES */ + +} // namespace internal +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/market.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/market.h new file mode 100644 index 0000000000..6f51715ed4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/market.h @@ -0,0 +1,375 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_market_H +#define _TBB_market_H + +#include "tbb/tbb_stddef.h" + +#include "scheduler_common.h" +#include "tbb/atomic.h" +#include "tbb/spin_mutex.h" +#include "../rml/include/rml_tbb.h" + +#include "intrusive_list.h" + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (push) + #pragma warning (disable: 4244) +#endif + +namespace tbb { + +class task_group_context; + +namespace internal { + +class arena; +class generic_scheduler; +template<typename SchedulerTraits> class custom_scheduler; + +//------------------------------------------------------------------------ +// Class market +//------------------------------------------------------------------------ + +class market : no_copy, rml::tbb_client { + friend class generic_scheduler; + friend class arena; + template<typename SchedulerTraits> friend class custom_scheduler; + friend class tbb::task_group_context; +private: + friend void ITT_DoUnsafeOneTimeInitialization (); + + typedef intrusive_list<arena> arena_list_type; + + //! Currently active global market + static market* theMarket; + + typedef scheduler_mutex_type global_market_mutex_type; + + //! Mutex guarding creation/destruction of theMarket, insertions/deletions in my_arenas, and cancellation propagation + static global_market_mutex_type theMarketMutex; + + //! Reference count controlling market object lifetime + intptr_t my_ref_count; + + //! Lightweight mutex guarding accounting operations with arenas list + typedef scheduler_mutex_type arenas_list_mutex_type; + arenas_list_mutex_type my_arenas_list_mutex; + + //! Pointer to the RML server object that services this TBB instance. + rml::tbb_server* my_server; + + //! Stack size of worker threads + size_t my_stack_size; + + //! Number of workers requested from the underlying resource manager + unsigned my_max_num_workers; + + //! Number of workers that have been delivered by RML + /** Used to assign indices to the new workers coming from RML, and busy part + of my_workers array. **/ + atomic<unsigned> my_num_workers; + +#if __TBB_TASK_PRIORITY + //! Highest priority among active arenas in the market. + /** Arena priority level is its tasks highest priority (specified by arena's + my_top_priority member). + Arena is active when it has outstanding request for workers. Note that + inactive arena may have workers lingering there for some time. **/ + intptr_t my_global_top_priority; + + //! Lowest priority among active arenas in the market. + /** See also my_global_top_priority **/ + intptr_t my_global_bottom_priority; + + //! Tracks events that may bring tasks in offload areas to the top priority level. + /** Incremented when global top priority is decremented or a task group priority + is elevated to the current top level. **/ + uintptr_t my_global_reload_epoch; + + //! Information about arenas at a particular priority level + struct priority_level_info { + //! List of arenas at this priority level + arena_list_type arenas; + + //! The first arena to be checked when idle worker seeks for an arena to enter + /** The check happens in round-robin fashion. **/ + arena_list_type::iterator next_arena; + + //! Total amount of workers requested by arenas at this priority level. + int workers_requested; + + //! Maximal amount of workers the market can tell off to this priority level. + int workers_available; + +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + //! Total amount of workers that are in arenas at this priority level. + int workers_present; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + }; // struct priority_level_info + + //! Information about arenas at different priority levels + priority_level_info my_priority_levels[num_priority_levels]; + +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + //! Lowest priority level having workers available. + intptr_t my_lowest_populated_level; +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + +#else /* !__TBB_TASK_PRIORITY */ + + //! List of registered arenas + arena_list_type my_arenas; + + //! The first arena to be checked when idle worker seeks for an arena to enter + /** The check happens in round-robin fashion. **/ + arena_list_type::iterator my_next_arena; + + //! Number of workers that were requested by all arenas + int my_total_demand; +#endif /* !__TBB_TASK_PRIORITY */ + + //! ABA prevention marker to assign to newly created arenas + uintptr_t my_arenas_aba_epoch; + +#if __TBB_COUNT_TASK_NODES + //! Net number of nodes that have been allocated from heap. + /** Updated each time a scheduler or arena is destroyed. */ + atomic<intptr_t> my_task_node_count; +#endif /* __TBB_COUNT_TASK_NODES */ + + //! Constructor + market ( unsigned max_num_workers, size_t stack_size ); + + //! Factory method creating new market object + static market& global_market ( unsigned max_num_workers, size_t stack_size ); + + //! Destroys and deallocates market object created by market::create() + void destroy (); + + void try_destroy_arena ( arena*, uintptr_t aba_epoch ); + +#if __TBB_TASK_PRIORITY + //! Returns next arena that needs more workers, or NULL. + arena* arena_in_need ( +#if __TBB_TRACK_PRIORITY_LEVEL_SATURATION + arena* prev_arena +#endif /* __TBB_TRACK_PRIORITY_LEVEL_SATURATION */ + ); + + //! Recalculates the number of workers assigned to each arena at and below the specified priority. + /** The actual number of workers servicing a particular arena may temporarily + deviate from the calculated value. **/ + void update_allotment ( intptr_t highest_affected_priority ); + + //! Changes arena's top priority and updates affected priority levels info in the market. + void update_arena_top_priority ( arena& a, intptr_t newPriority ); + + //! Changes market's global top priority and related settings. + inline void update_global_top_priority ( intptr_t newPriority ); + + //! Resets empty market's global top and bottom priority to the normal level. + inline void reset_global_priority (); + + inline void advance_global_reload_epoch () { + __TBB_store_with_release( my_global_reload_epoch, my_global_reload_epoch + 1 ); + } + + void assert_market_valid () const { + __TBB_ASSERT( (my_priority_levels[my_global_top_priority].workers_requested > 0 + && !my_priority_levels[my_global_top_priority].arenas.empty()) + || (my_global_top_priority == my_global_bottom_priority && + my_global_top_priority == normalized_normal_priority), NULL ); + } + +#else /* !__TBB_TASK_PRIORITY */ + + //! Recalculates the number of workers assigned to each arena in the list. + /** The actual number of workers servicing a particular arena may temporarily + deviate from the calculated value. **/ + void update_allotment () { + if ( my_total_demand ) + update_allotment( my_arenas, my_total_demand, (int)my_max_num_workers ); + } + + //! Returns next arena that needs more workers, or NULL. + arena* arena_in_need () { + spin_mutex::scoped_lock lock(my_arenas_list_mutex); + return arena_in_need(my_arenas, my_next_arena); + } + void assert_market_valid () const {} +#endif /* !__TBB_TASK_PRIORITY */ + + //! Returns number of masters doing computational (CPU-intensive) work + int num_active_masters () { return 1; } // APM TODO: replace with a real mechanism + + + //////////////////////////////////////////////////////////////////////////////// + // Helpers to unify code branches dependent on priority feature presence + + void insert_arena_into_list ( arena& a ); + + void remove_arena_from_list ( arena& a ); + + arena* arena_in_need ( arena_list_type &arenas, arena_list_type::iterator& next ); + + static void update_allotment ( arena_list_type& arenas, int total_demand, int max_workers ); + + + //////////////////////////////////////////////////////////////////////////////// + // Implementation of rml::tbb_client interface methods + + /*override*/ version_type version () const { return 0; } + + /*override*/ unsigned max_job_count () const { return my_max_num_workers; } + + /*override*/ size_t min_stack_size () const { return worker_stack_size(); } + + /*override*/ policy_type policy () const { return throughput; } + + /*override*/ job* create_one_job (); + + /*override*/ void cleanup( job& j ); + + /*override*/ void acknowledge_close_connection (); + + /*override*/ void process( job& j ); + +public: + //! Creates an arena object + /** If necessary, also creates global market instance, and boosts its ref count. + Each call to create_arena() must be matched by the call to arena::free_arena(). **/ + static arena& create_arena ( unsigned max_num_workers, size_t stack_size ); + + //! Removes the arena from the market's list + static void try_destroy_arena ( market*, arena*, uintptr_t aba_epoch, bool master ); + + //! Removes the arena from the market's list + void detach_arena ( arena& ); + + //! Decrements market's refcount and destroys it in the end + void release (); + + //! Request that arena's need in workers should be adjusted. + /** Concurrent invocations are possible only on behalf of different arenas. **/ + void adjust_demand ( arena&, int delta ); + + //! Guarantee that request_close_connection() is called by master, not some worker + /** Must be called before arena::on_thread_leaving() **/ + void prepare_wait_workers() { ++my_ref_count; } + + //! Wait workers termiantion + void wait_workers (); + + //! Returns the requested stack size of worker threads. + size_t worker_stack_size () const { return my_stack_size; } + +#if _WIN32||_WIN64 + //! register master with the resource manager + void register_master( ::rml::server::execution_resource_t& rsc_handle ) { + __TBB_ASSERT( my_server, "RML server not defined?" ); + // the server may ignore registration and set master_exec_resource to NULL. + my_server->register_master( rsc_handle ); + } + + //! unregister master with the resource manager + void unregister_master( ::rml::server::execution_resource_t& rsc_handle ) const { + my_server->unregister_master( rsc_handle ); + } +#endif /* WIN */ + +#if __TBB_TASK_GROUP_CONTEXT + //! Finds all contexts affected by the state change and propagates the new state to them. + template <typename T> + bool propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#if __TBB_TASK_PRIORITY + //! Lowers arena's priority is not higher than newPriority + /** Returns true if arena priority was actually elevated. **/ + bool lower_arena_priority ( arena& a, intptr_t new_priority, intptr_t old_priority ); + + //! Makes sure arena's priority is not lower than newPriority + /** Returns true if arena priority was elevated. Also updates arena's bottom + priority boundary if necessary. + + This method is called whenever a user changes priority, because whether + it was hiked or sunk can be determined for sure only under the lock used + by this function. **/ + bool update_arena_priority ( arena& a, intptr_t new_priority ); +#endif /* __TBB_TASK_PRIORITY */ + +#if __TBB_COUNT_TASK_NODES + //! Returns the number of task objects "living" in worker threads + intptr_t workers_task_node_count(); + + //! Net number of nodes that have been allocated from heap. + /** Updated each time a scheduler or arena is destroyed. */ + void update_task_node_count( intptr_t delta ) { my_task_node_count += delta; } +#endif /* __TBB_COUNT_TASK_NODES */ + +#if __TBB_TASK_GROUP_CONTEXT + //! Array of pointers to the registered workers + /** Used by cancellation propagation mechanism. + Must be the last data member of the class market. **/ + generic_scheduler* my_workers[1]; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +}; // class market + +#if __TBB_TASK_PRIORITY + #define BeginForEachArena(a) \ + arenas_list_mutex_type::scoped_lock arena_list_lock(my_arenas_list_mutex); \ + for ( intptr_t i = my_global_top_priority; i >= my_global_bottom_priority; --i ) { \ + /*arenas_list_mutex_type::scoped_lock arena_list_lock(my_priority_levels[i].my_arenas_list_mutex);*/ \ + arena_list_type &arenas = my_priority_levels[i].arenas; +#else /* !__TBB_TASK_PRIORITY */ + #define BeginForEachArena(a) \ + arena_list_type &arenas = my_arenas; { +#endif /* !__TBB_TASK_PRIORITY */ + +#define ForEachArena(a) \ + BeginForEachArena(a) \ + arena_list_type::iterator it = arenas.begin(); \ + for ( ; it != arenas.end(); ++it ) { \ + arena &a = *it; + +#define EndForEach() }} + + +} // namespace internal +} // namespace tbb + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (pop) +#endif // warning 4244 is back + +#endif /* _TBB_market_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/mutex.cpp new file mode 100644 index 0000000000..7e97a0c769 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/mutex.cpp @@ -0,0 +1,148 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/mutex.h" +#include "itt_notify.h" + +namespace tbb { + void mutex::scoped_lock::internal_acquire( mutex& m ) { + +#if _WIN32||_WIN64 + switch( m.state ) { + case INITIALIZED: + case HELD: + EnterCriticalSection( &m.impl ); + // If a thread comes here, and another thread holds the lock, it will block + // in EnterCriticalSection. When it returns from EnterCriticalSection, + // m.state must be set to INITIALIZED. If the same thread tries to acquire a lock it + // aleady holds, the the lock is in HELD state, thus will cause the assertion to fail. + __TBB_ASSERT(m.state!=HELD, "mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex"); + m.state = HELD; + break; + case DESTROYED: + __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); + break; + } +#else + int error_code = pthread_mutex_lock(&m.impl); + __TBB_ASSERT_EX(!error_code,"mutex::scoped_lock: pthread_mutex_lock failed"); +#endif /* _WIN32||_WIN64 */ + my_mutex = &m; + } + +void mutex::scoped_lock::internal_release() { + __TBB_ASSERT( my_mutex, "mutex::scoped_lock: not holding a mutex" ); +#if _WIN32||_WIN64 + switch( my_mutex->state ) { + case INITIALIZED: + __TBB_ASSERT(false,"mutex::scoped_lock: try to release the lock without acquisition"); + break; + case HELD: + my_mutex->state = INITIALIZED; + LeaveCriticalSection(&my_mutex->impl); + break; + case DESTROYED: + __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); + break; + } +#else + int error_code = pthread_mutex_unlock(&my_mutex->impl); + __TBB_ASSERT_EX(!error_code, "mutex::scoped_lock: pthread_mutex_unlock failed"); +#endif /* _WIN32||_WIN64 */ + my_mutex = NULL; +} + +bool mutex::scoped_lock::internal_try_acquire( mutex& m ) { +#if _WIN32||_WIN64 + switch( m.state ) { + case INITIALIZED: + case HELD: + break; + case DESTROYED: + __TBB_ASSERT(false,"mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"mutex::scoped_lock: illegal mutex state"); + break; + } +#endif /* _WIN32||_WIN64 */ + + bool result; +#if _WIN32||_WIN64 + result = TryEnterCriticalSection(&m.impl)!=0; + if( result ) { + __TBB_ASSERT(m.state!=HELD, "mutex::scoped_lock: deadlock caused by attempt to reacquire held mutex"); + m.state = HELD; + } +#else + result = pthread_mutex_trylock(&m.impl)==0; +#endif /* _WIN32||_WIN64 */ + if( result ) + my_mutex = &m; + return result; +} + +void mutex::internal_construct() { +#if _WIN32||_WIN64 + InitializeCriticalSectionEx(&impl, 4000, 0); + state = INITIALIZED; +#else + int error_code = pthread_mutex_init(&impl,NULL); + if( error_code ) + tbb::internal::handle_perror(error_code,"mutex: pthread_mutex_init failed"); +#endif /* _WIN32||_WIN64*/ + ITT_SYNC_CREATE(&impl, _T("tbb::mutex"), _T("")); +} + +void mutex::internal_destroy() { +#if _WIN32||_WIN64 + switch( state ) { + case INITIALIZED: + DeleteCriticalSection(&impl); + break; + case DESTROYED: + __TBB_ASSERT(false,"mutex: already destroyed"); + break; + default: + __TBB_ASSERT(false,"mutex: illegal state for destruction"); + break; + } + state = DESTROYED; +#else + int error_code = pthread_mutex_destroy(&impl); + __TBB_ASSERT_EX(!error_code,"mutex: pthread_mutex_destroy failed"); +#endif /* _WIN32||_WIN64 */ +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.cpp new file mode 100644 index 0000000000..19287bb514 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.cpp @@ -0,0 +1,422 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" +#if !TBB_PREVIEW_LOCAL_OBSERVER + #error TBB_PREVIEW_LOCAL_OBSERVER must be defined +#endif + +#if __TBB_SCHEDULER_OBSERVER + +#include "observer_proxy.h" +#include "tbb_main.h" +#include "governor.h" +#include "scheduler.h" +#include "arena.h" + +namespace tbb { +namespace internal { + +observer_list the_global_observer_list; + +#if TBB_USE_ASSERT +static atomic<int> observer_proxy_count; + +struct check_observer_proxy_count { + ~check_observer_proxy_count() { + if( observer_proxy_count!=0 ) { + runtime_warning( "Leaked %ld observer_proxy objects\n", long(observer_proxy_count) ); + } + } +}; + +static check_observer_proxy_count the_check_observer_proxy_count; +#endif /* TBB_USE_ASSERT */ + +interface6::task_scheduler_observer* observer_proxy::get_v6_observer() { + __TBB_ASSERT(my_version == 6, NULL); + return static_cast<interface6::task_scheduler_observer*>(my_observer); +} + +bool observer_proxy::is_global() { + return my_version < 6 || get_v6_observer()->my_context_tag == interface6::task_scheduler_observer::global_tag; +} + +observer_proxy::observer_proxy( task_scheduler_observer_v3& tso ) + : my_list(NULL), my_next(NULL), my_prev(NULL), my_observer(&tso) +{ +#if TBB_USE_ASSERT + ++observer_proxy_count; +#endif /* TBB_USE_ASSERT */ + // 1 for observer + my_ref_count = 1; + my_version = load<relaxed>(my_observer->my_busy_count) + == interface6::task_scheduler_observer::v6_trait ? 6 : 0; + __TBB_ASSERT( my_version >= 6 || !load<relaxed>(my_observer->my_busy_count), NULL ); +} + +#if TBB_USE_ASSERT +observer_proxy::~observer_proxy () { + __TBB_ASSERT( !my_ref_count, "Attempt to destroy proxy still in use" ); + poison_value(my_ref_count); + poison_pointer(my_prev); + poison_pointer(my_next); + --observer_proxy_count; +} +#endif /* TBB_USE_ASSERT */ + +template<memory_semantics M, class T, class V> +T atomic_fetch_and_store ( T* addr, const V& val ) { + return (T)atomic_traits<sizeof(T), M>::fetch_and_store( addr, (T)val ); +} + +void observer_list::clear () { + __TBB_ASSERT( this != &the_global_observer_list, "Method clear() cannot be used on the list of global observers" ); + // Though the method will work fine for the empty list, we require the caller + // to check for the list emptiness before invoking it to avoid extra overhead. + __TBB_ASSERT( !empty(), NULL ); + { + scoped_lock lock(mutex(), /*is_writer=*/true); + observer_proxy *next = my_head; + while ( observer_proxy *p = next ) { + __TBB_ASSERT( p->my_version >= 6, NULL ); + next = p->my_next; + // Both proxy p and observer p->my_observer (if non-null) are guaranteed + // to be alive while the list is locked. + task_scheduler_observer_v3 *obs = p->my_observer; + // Make sure that possible concurrent observer destruction does not + // conflict with the proxy list cleanup. + if ( !obs || !(p = (observer_proxy*)__TBB_FetchAndStoreW(&obs->my_proxy, 0)) ) + continue; + __TBB_ASSERT( !next || p == next->my_prev, NULL ); + __TBB_ASSERT( is_alive(p->my_ref_count), "Observer's proxy died prematurely" ); + __TBB_ASSERT( p->my_ref_count == 1, "Reference for observer is missing" ); + __TBB_ASSERT( !obs->my_busy_count, "Local observer in an empty arena cannot be marked as busy" ); + store<relaxed>( obs->my_busy_count, interface6::task_scheduler_observer::v6_trait ); +#if TBB_USE_ASSERT + p->my_observer = NULL; + p->my_ref_count = 0; +#endif /* TBB_USE_ASSERT */ + remove(p); + delete p; + } + } + while( my_head ) + __TBB_Yield(); +} + +void observer_list::insert ( observer_proxy* p ) { + scoped_lock lock(mutex(), /*is_writer=*/true); + if ( my_head ) { + p->my_prev = my_tail; + my_tail->my_next = p; + } + else + my_head = p; + my_tail = p; +} + +void observer_list::remove ( observer_proxy* p ) { + __TBB_ASSERT( my_head, "Attempt to remove an item from an empty list" ); + __TBB_ASSERT( !my_tail->my_next, "Last item's my_next must be NULL" ); + if( p == my_tail ) { + __TBB_ASSERT( !p->my_next, NULL ); + my_tail = p->my_prev; + } + else { + __TBB_ASSERT( p->my_next, NULL ); + p->my_next->my_prev = p->my_prev; + } + if ( p == my_head ) { + __TBB_ASSERT( !p->my_prev, NULL ); + my_head = p->my_next; + } + else { + __TBB_ASSERT( p->my_prev, NULL ); + p->my_prev->my_next = p->my_next; + } + __TBB_ASSERT( (my_head && my_tail) || (!my_head && !my_tail), NULL ); +} + +void observer_list::remove_ref( observer_proxy* p ) { + int r = p->my_ref_count; + __TBB_ASSERT( is_alive(r), NULL ); + while(r>1) { + __TBB_ASSERT( r!=0, NULL ); + int r_old = p->my_ref_count.compare_and_swap(r-1,r); + if( r_old==r ) { + // Successfully decremented count. + return; + } + r = r_old; + } + __TBB_ASSERT( r==1, NULL ); + // Reference count might go to zero + { + // Use lock to avoid resurrection by a thread concurrently walking the list + observer_list::scoped_lock lock(mutex(), /*is_writer=*/true); + r = --p->my_ref_count; + if( !r ) + remove(p); + } + if( !r ) + delete p; +} + +void observer_list::do_notify_entry_observers( observer_proxy*& last, bool worker ) { + // Pointer p marches though the list from last (exclusively) to the end. + observer_proxy *p = last, *prev = p; + for(;;) { + task_scheduler_observer_v3* tso=NULL; + // Hold lock on list only long enough to advance to the next proxy in the list. + { + scoped_lock lock(mutex(), /*is_writer=*/false); + do { + if( p ) { + // We were already processing the list. + if( observer_proxy* q = p->my_next ) { + if( p == prev ) + remove_ref_fast(prev); // sets prev to NULL if successful + p = q; + } + else { + // Reached the end of the list. + if( p == prev ) { + // Keep the reference as we store the 'last' pointer in scheduler + } else { + // The last few proxies were empty + ++p->my_ref_count; + if( prev ) { + lock.release(); + remove_ref(prev); + } + } + last = p; + return; + } + } else { + // Starting pass through the list + p = my_head; + if( !p ) + return; + } + tso = p->my_observer; + } while( !tso ); + ++p->my_ref_count; + ++tso->my_busy_count; + } + __TBB_ASSERT( !prev || p!=prev, NULL ); + // Release the proxy pinned before p + if( prev ) + remove_ref(prev); + // Do not hold any locks on the list while calling user's code. + // Do not intercept any exceptions that may escape the callback so that + // they are either handled by the TBB scheduler or passed to the debugger. + tso->on_scheduler_entry(worker); + intptr_t bc = --tso->my_busy_count; + __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); + prev = p; + } +} + +void observer_list::do_notify_exit_observers( observer_proxy* last, bool worker ) { + // Pointer p marches though the list from the beginning to last (inclusively). + observer_proxy *p = NULL, *prev = NULL; + for(;;) { + task_scheduler_observer_v3* tso=NULL; + // Hold lock on list only long enough to advance to the next proxy in the list. + { + scoped_lock lock(mutex(), /*is_writer=*/false); + do { + if( p ) { + // We were already processing the list. + if( p != last ) { + __TBB_ASSERT( p->my_next, "List items before 'prev' must have valid my_next pointer" ); + if( p == prev ) + remove_ref_fast(prev); // sets prev to NULL if successful + p = p->my_next; + } else { + // remove the reference from the last item + remove_ref_fast(p); + if( p ) { + lock.release(); + remove_ref(p); + } + return; + } + } else { + // Starting pass through the list + p = my_head; + __TBB_ASSERT( p, "Nonzero 'last' must guarantee that the global list is non-empty" ); + } + tso = p->my_observer; + } while( !tso ); + // The item is already refcounted + if ( p != last ) // the last is already referenced since entry notification + ++p->my_ref_count; + ++tso->my_busy_count; + } + __TBB_ASSERT( !prev || p!=prev, NULL ); + if( prev ) + remove_ref(prev); + // Do not hold any locks on the list while calling user's code. + // Do not intercept any exceptions that may escape the callback so that + // they are either handled by the TBB scheduler or passed to the debugger. + tso->on_scheduler_exit(worker); + intptr_t bc = --tso->my_busy_count; + __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); + prev = p; + } +} + +#if __TBB_TASK_ARENA +// TODO: merge with do_notify_.. methods +bool observer_list::ask_permission_to_leave() { + __TBB_ASSERT( this != &the_global_observer_list, "This method cannot be used on the list of global observers" ); + if( !my_head ) return true; + // Pointer p marches though the list + observer_proxy *p = NULL, *prev = NULL; + bool result = true; + while( result ) { + task_scheduler_observer* tso = NULL; + // Hold lock on list only long enough to advance to the next proxy in the list. + { + scoped_lock lock(mutex(), /*is_writer=*/false); + do { + if( p ) { + // We were already processing the list. + observer_proxy* q = p->my_next; + // read next, remove the previous reference + if( p == prev ) + remove_ref_fast(prev); // sets prev to NULL if successful + if( q ) p = q; + else { + // Reached the end of the list. + if( prev ) { + lock.release(); + remove_ref(p); + } + return result; + } + } else { + // Starting pass through the list + p = my_head; + if( !p ) + return result; + } + tso = p->get_v6_observer(); // all local observers are v6 + } while( !tso ); + ++p->my_ref_count; + ++tso->my_busy_count; + } + __TBB_ASSERT( !prev || p!=prev, NULL ); + // Release the proxy pinned before p + if( prev ) + remove_ref(prev); + // Do not hold any locks on the list while calling user's code. + // Do not intercept any exceptions that may escape the callback so that + // they are either handled by the TBB scheduler or passed to the debugger. + result = tso->on_scheduler_leaving(); + intptr_t bc = --tso->my_busy_count; + __TBB_ASSERT_EX( bc>=0, "my_busy_count underflowed" ); + prev = p; + } + if( prev ) + remove_ref(prev); + return result; +} +#endif //__TBB_TASK_ARENA + +void task_scheduler_observer_v3::observe( bool enable ) { + if( enable ) { + if( !my_proxy ) { + my_proxy = new observer_proxy( *this ); + if ( !my_proxy->is_global() ) { + // Local observer activation + generic_scheduler* s = governor::local_scheduler_if_initialized(); +#if __TBB_TASK_ARENA + intptr_t tag = my_proxy->get_v6_observer()->my_context_tag; + if( tag != interface6::task_scheduler_observer::implicit_tag ) { // explicit arena + task_arena *a = reinterpret_cast<task_arena*>(tag); + a->initialize(); + my_proxy->my_list = &a->my_arena->my_observers; + } else +#endif + { + if( !s ) s = governor::init_scheduler( (unsigned)task_scheduler_init::automatic, 0, true ); + __TBB_ASSERT( __TBB_InitOnce::initialization_done(), NULL ); + __TBB_ASSERT( s && s->my_arena, NULL ); + my_proxy->my_list = &s->my_arena->my_observers; + } + my_proxy->my_list->insert(my_proxy); + my_busy_count = 0; + // Notify newly activated observer and other pending ones if it belongs to current arena + if(s && &s->my_arena->my_observers == my_proxy->my_list ) + my_proxy->my_list->notify_entry_observers( s->my_last_local_observer, s->is_worker() ); + } else { + // Obsolete. Global observer activation + if( !__TBB_InitOnce::initialization_done() ) + DoOneTimeInitializations(); + my_busy_count = 0; + my_proxy->my_list = &the_global_observer_list; + my_proxy->my_list->insert(my_proxy); + if( generic_scheduler* s = governor::local_scheduler_if_initialized() ) { + // Notify newly created observer of its own thread. + // Any other pending observers are notified too. + the_global_observer_list.notify_entry_observers( s->my_last_global_observer, s->is_worker() ); + } + } + } + } else { + // Make sure that possible concurrent proxy list cleanup does not conflict + // with the observer destruction here. + if ( observer_proxy* proxy = (observer_proxy*)__TBB_FetchAndStoreW(&my_proxy, 0) ) { + // List destruction should not touch this proxy after we've won the above interlocked exchange. + __TBB_ASSERT( proxy->my_observer == this, NULL ); + __TBB_ASSERT( is_alive(proxy->my_ref_count), "Observer's proxy died prematurely" ); + __TBB_ASSERT( proxy->my_ref_count >= 1, "reference for observer missing" ); + observer_list &list = *proxy->my_list; + { + // Ensure that none of the list walkers relies on observer pointer validity + observer_list::scoped_lock lock(list.mutex(), /*is_writer=*/true); + proxy->my_observer = NULL; + } + intptr_t trait = proxy->my_version == 6 ? interface6::task_scheduler_observer::v6_trait : 0; + // Proxy may still be held by other threads (to track the last notified observer) + list.remove_ref(proxy); + while( my_busy_count ) + __TBB_Yield(); + store<relaxed>( my_busy_count, trait ); + } + } +} + +} // namespace internal +} // namespace tbb + +#endif /* __TBB_SCHEDULER_OBSERVER */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.h new file mode 100644 index 0000000000..522c003af8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/observer_proxy.h @@ -0,0 +1,181 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_observer_proxy_H +#define _TBB_observer_proxy_H + +#if __TBB_SCHEDULER_OBSERVER + +#include "scheduler_common.h" // to include task.h +#include "tbb/task_scheduler_observer.h" +#include "tbb/spin_rw_mutex.h" +#include "tbb/aligned_space.h" + +namespace tbb { +namespace internal { + +class arena; +class observer_proxy; + +class observer_list { + friend class arena; + + // Mutex is wrapped with aligned_space to shut up warnings when its destructor + // is called while threads are still using it. + typedef aligned_space<spin_rw_mutex,1> my_mutex_type; + + //! Pointer to the head of this list. + observer_proxy* my_head; + + //! Pointer to the tail of this list. + observer_proxy* my_tail; + + //! Mutex protecting this list. + my_mutex_type my_mutex; + + //! Back-pointer to the arena this list belongs to. + arena* my_arena; + + //! Decrement refcount of the proxy p if there are other outstanding references. + /** In case of success sets p to NULL. Must be invoked from under the list lock. **/ + inline static void remove_ref_fast( observer_proxy*& p ); + + //! Implements notify_entry_observers functionality. + void do_notify_entry_observers( observer_proxy*& last, bool worker ); + + //! Implements notify_exit_observers functionality. + void do_notify_exit_observers( observer_proxy* last, bool worker ); + +public: + observer_list () : my_head(NULL), my_tail(NULL) {} + + //! Removes and destroys all observer proxies from the list. + /** Cannot be used concurrently with other methods. **/ + void clear (); + + //! Add observer proxy to the tail of the list. + void insert ( observer_proxy* p ); + + //! Remove observer proxy from the list. + void remove ( observer_proxy* p ); + + //! Decrement refcount of the proxy and destroy it if necessary. + /** When refcount reaches zero removes the proxy from the list and destructs it. **/ + void remove_ref( observer_proxy* p ); + + //! Type of the scoped lock for the reader-writer mutex associated with the list. + typedef spin_rw_mutex::scoped_lock scoped_lock; + + //! Accessor to the reader-writer mutex associated with the list. + spin_rw_mutex& mutex () { return my_mutex.begin()[0]; } + + bool empty () const { return my_head == NULL; } + + //! Call entry notifications on observers added after last was notified. + /** Updates last to become the last notified observer proxy (in the global list) + or leaves it to be NULL. The proxy has its refcount incremented. **/ + inline void notify_entry_observers( observer_proxy*& last, bool worker ); + + //! Call exit notifications on last and observers added before it. + inline void notify_exit_observers( observer_proxy* last, bool worker ); + + //! Call on_scheduler_leaving callbacks to ask for permission for a worker thread to leave an arena + bool ask_permission_to_leave(); +}; // class observer_list + +//! Wrapper for an observer object +/** To maintain shared lists of observers the scheduler first wraps each observer + object into a proxy so that a list item remained valid even after the corresponding + proxy object is destroyed by the user code. **/ +class observer_proxy { + friend class task_scheduler_observer_v3; + friend class observer_list; + //! Reference count used for garbage collection. + /** 1 for reference from my task_scheduler_observer. + 1 for each task dispatcher's last observer pointer. + No accounting for neighbors in the shared list. */ + atomic<int> my_ref_count; + //! Reference to the list this observer belongs to. + observer_list* my_list; + //! Pointer to next observer in the list specified by my_head. + /** NULL for the last item in the list. **/ + observer_proxy* my_next; + //! Pointer to the previous observer in the list specified by my_head. + /** For the head of the list points to the last item. **/ + observer_proxy* my_prev; + //! Associated observer + task_scheduler_observer_v3* my_observer; + //! Version + char my_version; + + interface6::task_scheduler_observer* get_v6_observer(); + bool is_global(); //TODO: move them back inline when un-CPF'ing + + //! Constructs proxy for the given observer and adds it to the specified list. + observer_proxy( task_scheduler_observer_v3& ); + +#if TBB_USE_ASSERT + ~observer_proxy(); +#endif /* TBB_USE_ASSERT */ + + //! Shut up the warning + observer_proxy& operator = ( const observer_proxy& ); +}; // class observer_proxy + +inline void observer_list::remove_ref_fast( observer_proxy*& p ) { + if( p->my_observer ) { + // 2 = 1 for observer and 1 for last + __TBB_ASSERT( p->my_ref_count>=2, NULL ); + // Can decrement refcount quickly, as it cannot drop to zero while under the lock. + --p->my_ref_count; + p = NULL; + } else { + // Use slow form of refcount decrementing, after the lock is released. + } +} + +inline void observer_list::notify_entry_observers( observer_proxy*& last, bool worker ) { + if ( last == my_tail ) + return; + do_notify_entry_observers( last, worker ); +} + +inline void observer_list::notify_exit_observers( observer_proxy* last, bool worker ) { + if ( !last ) + return; + do_notify_exit_observers( last, worker ); +} + +extern observer_list the_global_observer_list; + +} // namespace internal +} // namespace tbb + +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#endif /* _TBB_observer_proxy_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/pipeline.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/pipeline.cpp new file mode 100644 index 0000000000..77893886a1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/pipeline.cpp @@ -0,0 +1,791 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/pipeline.h" +#include "tbb/spin_mutex.h" +#include "tbb/cache_aligned_allocator.h" +#include "itt_notify.h" +#include "semaphore.h" +#include "tls.h" // for parallel filters that do not use NULL as end_of_input + + +namespace tbb { + +namespace internal { + +//! This structure is used to store task information in a input buffer +struct task_info { + void* my_object; + //! Invalid unless a task went through an ordered stage. + Token my_token; + //! False until my_token is set. + bool my_token_ready; + //! True if my_object is valid. + bool is_valid; + //! Set to initial state (no object, no token) + void reset() { + my_object = NULL; + my_token = 0; + my_token_ready = false; + is_valid = false; + } +}; +//! A buffer of input items for a filter. +/** Each item is a task_info, inserted into a position in the buffer corresponding to a Token. */ +class input_buffer : no_copy { + friend class tbb::internal::pipeline_root_task; + friend class tbb::filter; + friend class tbb::thread_bound_filter; + friend class tbb::internal::stage_task; + friend class tbb::pipeline; + + typedef Token size_type; + + //! Array of deferred tasks that cannot yet start executing. + task_info* array; + + //! for thread-bound filter, semaphore for waiting, NULL otherwise. + semaphore* my_sem; + + //! Size of array + /** Always 0 or a power of 2 */ + size_type array_size; + + //! Lowest token that can start executing. + /** All prior Token have already been seen. */ + Token low_token; + + //! Serializes updates. + spin_mutex array_mutex; + + //! Resize "array". + /** Caller is responsible to acquiring a lock on "array_mutex". */ + void grow( size_type minimum_size ); + + //! Initial size for "array" + /** Must be a power of 2 */ + static const size_type initial_buffer_size = 4; + + //! Used for out of order buffer, and for assigning my_token if is_ordered and my_token not already assigned + Token high_token; + + //! True for ordered filter, false otherwise. + bool is_ordered; + + //! True for thread-bound filter, false otherwise. + bool is_bound; + + //! for parallel filters that accepts NULLs, thread-local flag for reaching end_of_input + typedef basic_tls<intptr_t> end_of_input_tls_t; + end_of_input_tls_t end_of_input_tls; + bool end_of_input_tls_allocated; // no way to test pthread creation of TLS + + void create_sema(size_t initial_tokens) { __TBB_ASSERT(!my_sem,NULL); my_sem = new internal::semaphore(initial_tokens); } + void free_sema() { __TBB_ASSERT(my_sem,NULL); delete my_sem; } + void sema_P() { __TBB_ASSERT(my_sem,NULL); my_sem->P(); } + void sema_V() { __TBB_ASSERT(my_sem,NULL); my_sem->V(); } + +public: + //! Construct empty buffer. + input_buffer( bool is_ordered_, bool is_bound_ ) : + array(NULL), my_sem(NULL), array_size(0), + low_token(0), high_token(0), + is_ordered(is_ordered_), is_bound(is_bound_), + end_of_input_tls_allocated(false) { + grow(initial_buffer_size); + __TBB_ASSERT( array, NULL ); + if(is_bound) create_sema(0); + } + + //! Destroy the buffer. + ~input_buffer() { + __TBB_ASSERT( array, NULL ); + cache_aligned_allocator<task_info>().deallocate(array,array_size); + poison_pointer( array ); + if(my_sem) { + free_sema(); + } + if(end_of_input_tls_allocated) { + destroy_my_tls(); + } + } + + //! Put a token into the buffer. + /** If task information was placed into buffer, returns true; + otherwise returns false, informing the caller to create and spawn a task. + If input buffer owned by thread-bound filter and the item at + low_token was not valid, issue a V() + If the input_buffer is owned by a successor to a thread-bound filter, + the force_put parameter should be true to ensure the token is inserted + in the buffer. + */ + bool put_token( task_info& info_, bool force_put = false ) { + { + info_.is_valid = true; + spin_mutex::scoped_lock lock( array_mutex ); + Token token; + bool was_empty = !array[low_token&(array_size-1)].is_valid; + if( is_ordered ) { + if( !info_.my_token_ready ) { + info_.my_token = high_token++; + info_.my_token_ready = true; + } + token = info_.my_token; + } else + token = high_token++; + __TBB_ASSERT( (tokendiff_t)(token-low_token)>=0, NULL ); + if( token!=low_token || is_bound || force_put ) { + // Trying to put token that is beyond low_token. + // Need to wait until low_token catches up before dispatching. + if( token-low_token>=array_size ) + grow( token-low_token+1 ); + ITT_NOTIFY( sync_releasing, this ); + array[token&(array_size-1)] = info_; + if(was_empty && is_bound) { + sema_V(); + } + return true; + } + } + return false; + } + + //! Note that processing of a token is finished. + /** Fires up processing of the next token, if processing was deferred. */ + // Using template to avoid explicit dependency on stage_task + // this is only called for serial filters, and is the reason for the + // advance parameter in return_item (we're incrementing low_token here.) + // Non-TBF serial stages don't advance the token at the start because the presence + // of the current token in the buffer keeps another stage from being spawned. + template<typename StageTask> + void note_done( Token token, StageTask& spawner ) { + task_info wakee; + wakee.reset(); + { + spin_mutex::scoped_lock lock( array_mutex ); + if( !is_ordered || token==low_token ) { + // Wake the next task + task_info& item = array[++low_token & (array_size-1)]; + ITT_NOTIFY( sync_acquired, this ); + wakee = item; + item.is_valid = false; + } + } + if( wakee.is_valid ) + spawner.spawn_stage_task(wakee); + } + +#if __TBB_TASK_GROUP_CONTEXT + //! The method destroys all data in filters to prevent memory leaks + void clear( filter* my_filter ) { + long t=low_token; + for( size_type i=0; i<array_size; ++i, ++t ){ + task_info& temp = array[t&(array_size-1)]; + if (temp.is_valid ) { + my_filter->finalize(temp.my_object); + temp.is_valid = false; + } + } + } +#endif + + //! return an item, invalidate the queued item, but only advance if advance + // advance == true for parallel filters. If the filter is serial, leave the + // item in the buffer to keep another stage from being spawned. + bool return_item(task_info& info, bool advance) { + spin_mutex::scoped_lock lock( array_mutex ); + task_info& item = array[low_token&(array_size-1)]; + ITT_NOTIFY( sync_acquired, this ); + if( item.is_valid ) { + info = item; + item.is_valid = false; + if (advance) low_token++; + return true; + } + return false; + } + + //! true if the current low_token is valid. + bool has_item() { spin_mutex::scoped_lock lock(array_mutex); return array[low_token&(array_size -1)].is_valid; } + + // end_of_input signal for parallel_pipeline, parallel input filters with 0 tokens allowed. + void create_my_tls() { int status = end_of_input_tls.create(); if(status) handle_perror(status, "TLS not allocated for filter"); end_of_input_tls_allocated = true; } + void destroy_my_tls() { int status = end_of_input_tls.destroy(); if(status) handle_perror(status, "Failed to destroy filter TLS"); } + bool my_tls_end_of_input() { return end_of_input_tls.get() != 0; } + void set_my_tls_end_of_input() { end_of_input_tls.set(1); } +}; + +void input_buffer::grow( size_type minimum_size ) { + size_type old_size = array_size; + size_type new_size = old_size ? 2*old_size : initial_buffer_size; + while( new_size<minimum_size ) + new_size*=2; + task_info* new_array = cache_aligned_allocator<task_info>().allocate(new_size); + task_info* old_array = array; + for( size_type i=0; i<new_size; ++i ) + new_array[i].is_valid = false; + long t=low_token; + for( size_type i=0; i<old_size; ++i, ++t ) + new_array[t&(new_size-1)] = old_array[t&(old_size-1)]; + array = new_array; + array_size = new_size; + if( old_array ) + cache_aligned_allocator<task_info>().deallocate(old_array,old_size); +} + +class stage_task: public task, public task_info { +private: + friend class tbb::pipeline; + pipeline& my_pipeline; + filter* my_filter; + //! True if this task has not yet read the input. + bool my_at_start; + +public: + //! Construct stage_task for first stage in a pipeline. + /** Such a stage has not read any input yet. */ + stage_task( pipeline& pipeline ) : + my_pipeline(pipeline), + my_filter(pipeline.filter_list), + my_at_start(true) + { + task_info::reset(); + } + //! Construct stage_task for a subsequent stage in a pipeline. + stage_task( pipeline& pipeline, filter* filter_, const task_info& info ) : + task_info(info), + my_pipeline(pipeline), + my_filter(filter_), + my_at_start(false) + {} + //! Roughly equivalent to the constructor of input stage task + void reset() { + task_info::reset(); + my_filter = my_pipeline.filter_list; + my_at_start = true; + } + //! The virtual task execution method + /*override*/ task* execute(); +#if __TBB_TASK_GROUP_CONTEXT + ~stage_task() + { + if (my_filter && my_object && (my_filter->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4)) { + __TBB_ASSERT(is_cancelled(), "Trying to finalize the task that wasn't cancelled"); + my_filter->finalize(my_object); + my_object = NULL; + } + } +#endif // __TBB_TASK_GROUP_CONTEXT + //! Creates and spawns stage_task from task_info + void spawn_stage_task(const task_info& info) + { + stage_task* clone = new (allocate_additional_child_of(*parent())) + stage_task( my_pipeline, my_filter, info ); + spawn(*clone); + } +}; + +task* stage_task::execute() { + __TBB_ASSERT( !my_at_start || !my_object, NULL ); + __TBB_ASSERT( !my_filter->is_bound(), NULL ); + if( my_at_start ) { + if( my_filter->is_serial() ) { + my_object = (*my_filter)(my_object); + if( my_object || ( my_filter->object_may_be_null() && !my_pipeline.end_of_input) ) + { + if( my_filter->is_ordered() ) { + my_token = my_pipeline.token_counter++; // ideally, with relaxed semantics + my_token_ready = true; + } else if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { + if( my_pipeline.has_thread_bound_filters ) + my_pipeline.token_counter++; // ideally, with relaxed semantics + } + if( !my_filter->next_filter_in_pipeline ) { // we're only filter in pipeline + reset(); + goto process_another_stage; + } else { + ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens ); + if( --my_pipeline.input_tokens>0 ) + spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) ); + } + } else { + my_pipeline.end_of_input = true; + return NULL; + } + } else /*not is_serial*/ { + if( my_pipeline.end_of_input ) + return NULL; + if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { + if( my_pipeline.has_thread_bound_filters ) + my_pipeline.token_counter++; + } + ITT_NOTIFY( sync_releasing, &my_pipeline.input_tokens ); + if( --my_pipeline.input_tokens>0 ) + spawn( *new( allocate_additional_child_of(*parent()) ) stage_task( my_pipeline ) ); + my_object = (*my_filter)(my_object); + if( !my_object && (!my_filter->object_may_be_null() || my_filter->my_input_buffer->my_tls_end_of_input()) ) + { + my_pipeline.end_of_input = true; + if( (my_filter->my_filter_mode & my_filter->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { + if( my_pipeline.has_thread_bound_filters ) + my_pipeline.token_counter--; // fix token_counter + } + return NULL; + } + } + my_at_start = false; + } else { + my_object = (*my_filter)(my_object); + if( my_filter->is_serial() ) + my_filter->my_input_buffer->note_done(my_token, *this); + } + my_filter = my_filter->next_filter_in_pipeline; + if( my_filter ) { + // There is another filter to execute. + // Crank up priority a notch. + add_to_depth(1); + if( my_filter->is_serial() ) { + // The next filter must execute tokens in order + if( my_filter->my_input_buffer->put_token(*this) ){ + // Can't proceed with the same item + if( my_filter->is_bound() ) { + // Find the next non-thread-bound filter + do { + my_filter = my_filter->next_filter_in_pipeline; + } while( my_filter && my_filter->is_bound() ); + // Check if there is an item ready to process + if( my_filter && my_filter->my_input_buffer->return_item(*this, !my_filter->is_serial())) + goto process_another_stage; + } + my_filter = NULL; // To prevent deleting my_object twice if exception occurs + return NULL; + } + } + } else { + // Reached end of the pipe. + size_t ntokens_avail = ++my_pipeline.input_tokens; + if(my_pipeline.filter_list->is_bound() ) { + if(ntokens_avail == 1) { + my_pipeline.filter_list->my_input_buffer->sema_V(); + } + return NULL; + } + if( ntokens_avail>1 // Only recycle if there is one available token + || my_pipeline.end_of_input ) { + return NULL; // No need to recycle for new input + } + ITT_NOTIFY( sync_acquired, &my_pipeline.input_tokens ); + // Recycle as an input stage task. + reset(); + } +process_another_stage: + /* A semi-hackish way to reexecute the same task object immediately without spawning. + recycle_as_continuation marks the task for future execution, + and then 'this' pointer is returned to bypass spawning. */ + recycle_as_continuation(); + return this; +} + +class pipeline_root_task: public task { + pipeline& my_pipeline; + bool do_segment_scanning; + + /*override*/ task* execute() { + if( !my_pipeline.end_of_input ) + if( !my_pipeline.filter_list->is_bound() ) + if( my_pipeline.input_tokens > 0 ) { + recycle_as_continuation(); + set_ref_count(1); + return new( allocate_child() ) stage_task( my_pipeline ); + } + if( do_segment_scanning ) { + filter* current_filter = my_pipeline.filter_list->next_segment; + /* first non-thread-bound filter that follows thread-bound one + and may have valid items to process */ + filter* first_suitable_filter = current_filter; + while( current_filter ) { + __TBB_ASSERT( !current_filter->is_bound(), "filter is thread-bound?" ); + __TBB_ASSERT( current_filter->prev_filter_in_pipeline->is_bound(), "previous filter is not thread-bound?" ); + if( !my_pipeline.end_of_input || current_filter->has_more_work()) + { + task_info info; + info.reset(); + if( current_filter->my_input_buffer->return_item(info, !current_filter->is_serial()) ) { + set_ref_count(1); + recycle_as_continuation(); + return new( allocate_child() ) stage_task( my_pipeline, current_filter, info); + } + current_filter = current_filter->next_segment; + if( !current_filter ) { + if( !my_pipeline.end_of_input ) { + recycle_as_continuation(); + return this; + } + current_filter = first_suitable_filter; + __TBB_Yield(); + } + } else { + /* The preceding pipeline segment is empty. + Fast-forward to the next post-TBF segment. */ + first_suitable_filter = first_suitable_filter->next_segment; + current_filter = first_suitable_filter; + } + } /* while( current_filter ) */ + return NULL; + } else { + if( !my_pipeline.end_of_input ) { + recycle_as_continuation(); + return this; + } + return NULL; + } + } +public: + pipeline_root_task( pipeline& pipeline ): my_pipeline(pipeline), do_segment_scanning(false) + { + __TBB_ASSERT( my_pipeline.filter_list, NULL ); + filter* first = my_pipeline.filter_list; + if( (first->my_filter_mode & first->version_mask) >= __TBB_PIPELINE_VERSION(5) ) { + // Scanning the pipeline for segments + filter* head_of_previous_segment = first; + for( filter* subfilter=first->next_filter_in_pipeline; + subfilter!=NULL; + subfilter=subfilter->next_filter_in_pipeline ) + { + if( subfilter->prev_filter_in_pipeline->is_bound() && !subfilter->is_bound() ) { + do_segment_scanning = true; + head_of_previous_segment->next_segment = subfilter; + head_of_previous_segment = subfilter; + } + } + } + } +}; + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + // Suppress compiler warning about constant conditional expression + #pragma warning (disable: 4127) +#endif + +// The class destroys end_counter and clears all input buffers if pipeline was cancelled. +class pipeline_cleaner: internal::no_copy { + pipeline& my_pipeline; +public: + pipeline_cleaner(pipeline& _pipeline) : + my_pipeline(_pipeline) + {} + ~pipeline_cleaner(){ +#if __TBB_TASK_GROUP_CONTEXT + if (my_pipeline.end_counter->is_cancelled()) // Pipeline was cancelled + my_pipeline.clear_filters(); +#endif + my_pipeline.end_counter = NULL; + } +}; + +} // namespace internal + +void pipeline::inject_token( task& ) { + __TBB_ASSERT(0,"illegal call to inject_token"); +} + +#if __TBB_TASK_GROUP_CONTEXT +void pipeline::clear_filters() { + for( filter* f = filter_list; f; f = f->next_filter_in_pipeline ) { + if ((f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(4)) + if( internal::input_buffer* b = f->my_input_buffer ) + b->clear(f); + } +} +#endif + +pipeline::pipeline() : + filter_list(NULL), + filter_end(NULL), + end_counter(NULL), + end_of_input(false), + has_thread_bound_filters(false) +{ + token_counter = 0; + input_tokens = 0; +} + +pipeline::~pipeline() { + clear(); +} + +void pipeline::clear() { + filter* next; + for( filter* f = filter_list; f; f=next ) { + if( internal::input_buffer* b = f->my_input_buffer ) { + delete b; + f->my_input_buffer = NULL; + } + next=f->next_filter_in_pipeline; + f->next_filter_in_pipeline = filter::not_in_pipeline(); + if ( (f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) { + f->prev_filter_in_pipeline = filter::not_in_pipeline(); + f->my_pipeline = NULL; + } + if ( (f->my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) ) + f->next_segment = NULL; + } + filter_list = filter_end = NULL; +} + +void pipeline::add_filter( filter& filter_ ) { +#if TBB_USE_ASSERT + if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) + __TBB_ASSERT( filter_.prev_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" ); + __TBB_ASSERT( filter_.next_filter_in_pipeline==filter::not_in_pipeline(), "filter already part of pipeline?" ); + __TBB_ASSERT( !end_counter, "invocation of add_filter on running pipeline" ); +#endif + if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(3) ) { + filter_.my_pipeline = this; + filter_.prev_filter_in_pipeline = filter_end; + if ( filter_list == NULL) + filter_list = &filter_; + else + filter_end->next_filter_in_pipeline = &filter_; + filter_.next_filter_in_pipeline = NULL; + filter_end = &filter_; + } + else + { + if( !filter_end ) + filter_end = reinterpret_cast<filter*>(&filter_list); + + *reinterpret_cast<filter**>(filter_end) = &filter_; + filter_end = reinterpret_cast<filter*>(&filter_.next_filter_in_pipeline); + *reinterpret_cast<filter**>(filter_end) = NULL; + } + if( (filter_.my_filter_mode & filter_.version_mask) >= __TBB_PIPELINE_VERSION(5) ) { + if( filter_.is_serial() ) { + if( filter_.is_bound() ) + has_thread_bound_filters = true; + filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), filter_.is_bound() ); + } + else { + if(filter_.prev_filter_in_pipeline) { + if(filter_.prev_filter_in_pipeline->is_bound()) { + // successors to bound filters must have an input_buffer + filter_.my_input_buffer = new internal::input_buffer( /*is_ordered*/false, false ); + } + } + else { // input filter + if(filter_.object_may_be_null() ) { + //TODO: buffer only needed to hold TLS; could improve + filter_.my_input_buffer = new internal::input_buffer( /*is_ordered*/false, false ); + filter_.my_input_buffer->create_my_tls(); + } + } + } + } else { + if( filter_.is_serial() ) { + filter_.my_input_buffer = new internal::input_buffer( filter_.is_ordered(), false ); + } + } + +} + +void pipeline::remove_filter( filter& filter_ ) { + __TBB_ASSERT( filter_.prev_filter_in_pipeline!=filter::not_in_pipeline(), "filter not part of pipeline" ); + __TBB_ASSERT( filter_.next_filter_in_pipeline!=filter::not_in_pipeline(), "filter not part of pipeline" ); + __TBB_ASSERT( !end_counter, "invocation of remove_filter on running pipeline" ); + if (&filter_ == filter_list) + filter_list = filter_.next_filter_in_pipeline; + else { + __TBB_ASSERT( filter_.prev_filter_in_pipeline, "filter list broken?" ); + filter_.prev_filter_in_pipeline->next_filter_in_pipeline = filter_.next_filter_in_pipeline; + } + if (&filter_ == filter_end) + filter_end = filter_.prev_filter_in_pipeline; + else { + __TBB_ASSERT( filter_.next_filter_in_pipeline, "filter list broken?" ); + filter_.next_filter_in_pipeline->prev_filter_in_pipeline = filter_.prev_filter_in_pipeline; + } + if( internal::input_buffer* b = filter_.my_input_buffer ) { + delete b; + filter_.my_input_buffer = NULL; + } + filter_.next_filter_in_pipeline = filter_.prev_filter_in_pipeline = filter::not_in_pipeline(); + if ( (filter_.my_filter_mode & filter::version_mask) >= __TBB_PIPELINE_VERSION(5) ) + filter_.next_segment = NULL; + filter_.my_pipeline = NULL; +} + +void pipeline::run( size_t max_number_of_live_tokens +#if __TBB_TASK_GROUP_CONTEXT + , tbb::task_group_context& context +#endif + ) { + __TBB_ASSERT( max_number_of_live_tokens>0, "pipeline::run must have at least one token" ); + __TBB_ASSERT( !end_counter, "pipeline already running?" ); + if( filter_list ) { + internal::pipeline_cleaner my_pipeline_cleaner(*this); + end_of_input = false; + input_tokens = internal::Token(max_number_of_live_tokens); + if(has_thread_bound_filters) { + // release input filter if thread-bound + if(filter_list->is_bound()) { + filter_list->my_input_buffer->sema_V(); + } + } +#if __TBB_TASK_GROUP_CONTEXT + end_counter = new( task::allocate_root(context) ) internal::pipeline_root_task( *this ); +#else + end_counter = new( task::allocate_root() ) internal::pipeline_root_task( *this ); +#endif + // Start execution of tasks + task::spawn_root_and_wait( *end_counter ); + + if(has_thread_bound_filters) { + for(filter* f = filter_list->next_filter_in_pipeline; f; f=f->next_filter_in_pipeline) { + if(f->is_bound()) { + f->my_input_buffer->sema_V(); // wake to end + } + } + } + } +} + +#if __TBB_TASK_GROUP_CONTEXT +void pipeline::run( size_t max_number_of_live_tokens ) { + if( filter_list ) { + // Construct task group context with the exception propagation mode expected + // by the pipeline caller. + uintptr_t ctx_traits = filter_list->my_filter_mode & filter::exact_exception_propagation ? + task_group_context::default_traits : + task_group_context::default_traits & ~task_group_context::exact_exception; + task_group_context context(task_group_context::bound, ctx_traits); + run(max_number_of_live_tokens, context); + } +} +#endif // __TBB_TASK_GROUP_CONTEXT + +bool filter::has_more_work() { + __TBB_ASSERT(my_pipeline, NULL); + __TBB_ASSERT(my_input_buffer, "has_more_work() called for filter with no input buffer"); + return (internal::tokendiff_t)(my_pipeline->token_counter - my_input_buffer->low_token) != 0; +} + +filter::~filter() { + if ( (my_filter_mode & version_mask) >= __TBB_PIPELINE_VERSION(3) ) { + if ( next_filter_in_pipeline != filter::not_in_pipeline() ) + my_pipeline->remove_filter(*this); + else + __TBB_ASSERT( prev_filter_in_pipeline == filter::not_in_pipeline(), "probably filter list is broken" ); + } else { + __TBB_ASSERT( next_filter_in_pipeline==filter::not_in_pipeline(), "cannot destroy filter that is part of pipeline" ); + } +} + +void +filter::set_end_of_input() { + __TBB_ASSERT(my_input_buffer, NULL); + __TBB_ASSERT(object_may_be_null(), NULL); + if(is_serial()) { + my_pipeline->end_of_input = true; + } + else { + __TBB_ASSERT(my_input_buffer->end_of_input_tls_allocated, NULL); + my_input_buffer->set_my_tls_end_of_input(); + } +} + +thread_bound_filter::result_type thread_bound_filter::process_item() { + return internal_process_item(true); +} + +thread_bound_filter::result_type thread_bound_filter::try_process_item() { + return internal_process_item(false); +} + +thread_bound_filter::result_type thread_bound_filter::internal_process_item(bool is_blocking) { + __TBB_ASSERT(my_pipeline != NULL,"It's not supposed that process_item is called for a filter that is not in a pipeline."); + internal::task_info info; + info.reset(); + + if(my_pipeline && my_pipeline->end_of_input && !has_more_work()) + return end_of_stream; + + if( !prev_filter_in_pipeline ) { + if( my_pipeline->end_of_input ) + return end_of_stream; + while(my_pipeline->input_tokens == 0) { + if( !is_blocking ) + return item_not_available; + my_input_buffer->sema_P(); + } + info.my_object = (*this)(info.my_object); + if( info.my_object ) { + __TBB_ASSERT(my_pipeline->input_tokens > 0, "Token failed in thread-bound filter"); + my_pipeline->input_tokens--; + if( is_ordered() ) { + info.my_token = my_pipeline->token_counter; + info.my_token_ready = true; + } + my_pipeline->token_counter++; // ideally, with relaxed semantics + } else { + my_pipeline->end_of_input = true; + return end_of_stream; + } + } else { /* this is not an input filter */ + while(!my_input_buffer->has_item()) { + if(!is_blocking) { + return item_not_available; + } + my_input_buffer->sema_P(); + if( my_pipeline->end_of_input && !has_more_work()) { + return end_of_stream; + } + } + if(!my_input_buffer->return_item(info, /*advance*/true)) { + __TBB_ASSERT(0,"return_item failed"); + } + info.my_object = (*this)(info.my_object); + } + if( next_filter_in_pipeline ) { + if (!next_filter_in_pipeline->my_input_buffer->put_token(info,/*force_put=*/true) ) { + __TBB_ASSERT(0, "Couldn't put token after thread-bound buffer"); + } + } else { + size_t ntokens_avail = ++(my_pipeline->input_tokens); + if(my_pipeline->filter_list->is_bound()) { + if(ntokens_avail == 1) { + my_pipeline->filter_list->my_input_buffer->sema_V(); + } + } + } + + return success; +} + +} // tbb + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/private_server.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/private_server.cpp new file mode 100644 index 0000000000..ed1cf77ddc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/private_server.cpp @@ -0,0 +1,422 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "rml_tbb.h" +#include "../server/thread_monitor.h" +#include "tbb/atomic.h" +#include "tbb/cache_aligned_allocator.h" +#include "scheduler_common.h" +#include "governor.h" +#include "tbb_misc.h" + +using rml::internal::thread_monitor; + +namespace tbb { +namespace internal { +namespace rml { + +typedef thread_monitor::handle_type thread_handle; + +class private_server; + +class private_worker: no_copy { + //! State in finite-state machine that controls the worker. + /** State diagram: + init --------------------\ + | | + V V + starting --> normal --> quit + | + V + plugged + */ + enum state_t { + //! *this is initialized + st_init, + //! *this has associated thread that is starting up. + st_starting, + //! Associated thread is doing normal life sequence. + st_normal, + //! Associated thread has ended normal life sequence and promises to never touch *this again. + st_quit, + //! Associated thread should skip normal life sequence, because private_server is shutting down. + st_plugged + }; + atomic<state_t> my_state; + + //! Associated server + private_server& my_server; + + //! Associated client + tbb_client& my_client; + + //! index used for avoiding the 64K aliasing problem + const size_t my_index; + + //! Monitor for sleeping when there is no work to do. + /** The invariant that holds for sleeping workers is: + "my_slack<=0 && my_state==st_normal && I am on server's list of asleep threads" */ + thread_monitor my_thread_monitor; + + //! Handle of the OS thread associated with this worker + thread_handle my_handle; + + atomic<bool> my_handle_ready; // make atomic to add fences + + //! Link for list of workers that are sleeping or have no associated thread. + private_worker* my_next; + + friend class private_server; + + //! Actions executed by the associated thread + void run(); + + //! Wake up associated thread (or launch a thread if there is none) + void wake_or_launch(); + + //! Called by a thread (usually not the associated thread) to commence termination. + void start_shutdown(); + + static __RML_DECL_THREAD_ROUTINE thread_routine( void* arg ); + +protected: + private_worker( private_server& server, tbb_client& client, const size_t i ) : + my_server(server), + my_client(client), + my_index(i) + { + my_handle_ready = false; + my_state = st_init; + } +}; + +static const size_t cache_line_size = tbb::internal::NFS_MaxLineSize; + + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress overzealous compiler warnings about uninstantiatble class + #pragma warning(push) + #pragma warning(disable:4510 4610) +#endif +class padded_private_worker: public private_worker { + char pad[cache_line_size - sizeof(private_worker)%cache_line_size]; +public: + padded_private_worker( private_server& server, tbb_client& client, const size_t i ) : private_worker(server,client,i) {} +}; +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning(pop) +#endif + +class private_server: public tbb_server, no_copy { + tbb_client& my_client; + //! Maximum number of threads to be created. + /** Threads are created lazily, so maximum might not actually be reached. */ + const tbb_client::size_type my_n_thread; + + //! Stack size for each thread. */ + const size_t my_stack_size; + + //! Number of jobs that could use their associated thread minus number of active threads. + /** If negative, indicates oversubscription. + If positive, indicates that more threads should run. + Can be lowered asynchronously, but must be raised only while holding my_asleep_list_mutex, + because raising it impacts the invariant for sleeping threads. */ + atomic<int> my_slack; + + //! Counter used to determine when to delete this. + atomic<int> my_ref_count; + + padded_private_worker* my_thread_array; + + //! List of workers that are asleep or committed to sleeping until notified by another thread. + tbb::atomic<private_worker*> my_asleep_list_root; + + //! Protects my_asleep_list_root + typedef scheduler_mutex_type asleep_list_mutex_type; + asleep_list_mutex_type my_asleep_list_mutex; + +#if TBB_USE_ASSERT + atomic<int> my_net_slack_requests; +#endif /* TBB_USE_ASSERT */ + + //! Wake up to two sleeping workers, if there are any sleeping. + /** The call is used to propagate a chain reaction where each thread wakes up two threads, + which in turn each wake up two threads, etc. */ + void propagate_chain_reaction() { + // First test of a double-check idiom. Second test is inside wake_some(0). + if( my_asleep_list_root ) + wake_some(0); + } + + //! Try to add t to list of sleeping workers + bool try_insert_in_asleep_list( private_worker& t ); + + //! Equivalent of adding additional_slack to my_slack and waking up to 2 threads if my_slack permits. + void wake_some( int additional_slack ); + + virtual ~private_server(); + + void remove_server_ref() { + if( --my_ref_count==0 ) { + my_client.acknowledge_close_connection(); + this->~private_server(); + tbb::cache_aligned_allocator<private_server>().deallocate( this, 1 ); + } + } + + friend class private_worker; +public: + private_server( tbb_client& client ); + + /*override*/ version_type version() const { + return 0; + } + + /*override*/ void request_close_connection( bool /*exiting*/ ) { + for( size_t i=0; i<my_n_thread; ++i ) + my_thread_array[i].start_shutdown(); + remove_server_ref(); + } + + /*override*/ void yield() {__TBB_Yield();} + + /*override*/ void independent_thread_number_changed( int ) {__TBB_ASSERT(false,NULL);} + + /*override*/ unsigned default_concurrency() const { return governor::default_num_threads() - 1; } + + /*override*/ void adjust_job_count_estimate( int delta ); + +#if _WIN32||_WIN64 + /*override*/ void register_master ( ::rml::server::execution_resource_t& ) {} + /*override*/ void unregister_master ( ::rml::server::execution_resource_t ) {} +#endif /* _WIN32||_WIN64 */ +}; + +//------------------------------------------------------------------------ +// Methods of private_worker +//------------------------------------------------------------------------ +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress overzealous compiler warnings about an initialized variable 'sink_for_alloca' not referenced + #pragma warning(push) + #pragma warning(disable:4189) +#endif +#if __MINGW32__ && __GNUC__==4 &&__GNUC_MINOR__>=2 && !__MINGW64__ +// ensure that stack is properly aligned for TBB threads +__attribute__((force_align_arg_pointer)) +#endif +__RML_DECL_THREAD_ROUTINE private_worker::thread_routine( void* arg ) { + private_worker* self = static_cast<private_worker*>(arg); + AVOID_64K_ALIASING( self->my_index ); +#if _XBOX + int HWThreadIndex = __TBB_XBOX360_GetHardwareThreadIndex(i); + XSetThreadProcessor(GetCurrentThread(), HWThreadIndex); +#endif + self->run(); + return 0; +} +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning(pop) +#endif + +void private_worker::start_shutdown() { + state_t s; + // Transition from st_starting or st_normal to st_plugged or st_quit + do { + s = my_state; + __TBB_ASSERT( s==st_init||s==st_starting||s==st_normal, NULL ); + } while( my_state.compare_and_swap( s==st_starting? st_plugged : st_quit, s )!=s ); + if( s==st_normal ) { + // May have invalidated invariant for sleeping, so wake up the thread. + // Note that the notify() here occurs without maintaining invariants for my_slack. + // It does not matter, because my_state==st_quit overrides checking of my_slack. + my_thread_monitor.notify(); + } else if( s==st_init ) { + // Perform action that otherwise would be performed by associated thread when it quits. + my_server.remove_server_ref(); + } + // Do not need join for st_init state, + // because in this case the thread wasn't started yet. + if (s!=st_init) { + while (!my_handle_ready) + __TBB_Yield(); + // my_handle is valid at this point + if (governor::needsWaitWorkers()) + thread_monitor::join(my_handle); + else + thread_monitor::detach_thread(my_handle); + } +} + +void private_worker::run() { + my_server.propagate_chain_reaction(); + state_t s = my_state.compare_and_swap( st_normal, st_starting ); + if( s==st_starting ) { + ::rml::job& j = *my_client.create_one_job(); + while( my_state==st_normal ) { + if( my_server.my_slack>=0 ) { + my_client.process(j); + } else { + thread_monitor::cookie c; + // Prepare to wait + my_thread_monitor.prepare_wait(c); + // Check/set the invariant for sleeping + if( my_state==st_normal && my_server.try_insert_in_asleep_list(*this) ) { + my_thread_monitor.commit_wait(c); + my_server.propagate_chain_reaction(); + } else { + // Invariant broken + my_thread_monitor.cancel_wait(); + } + } + } + my_client.cleanup(j); + } else { + // Server is already shutting down. + __TBB_ASSERT( s==st_plugged, NULL ); + } + ++my_server.my_slack; + my_server.remove_server_ref(); +} + +inline void private_worker::wake_or_launch() { + if( my_state==st_init && my_state.compare_and_swap( st_starting, st_init )==st_init ) { +#if USE_WINTHREAD + my_handle = thread_monitor::launch( thread_routine, this, my_server.my_stack_size, &this->my_index ); +#elif USE_PTHREAD + { + affinity_helper fpa; + fpa.protect_affinity_mask(); + my_handle = thread_monitor::launch( thread_routine, this, my_server.my_stack_size ); + // Implicit destruction of fpa resets original affinity mask. + } +#endif /* USE_PTHREAD */ + my_handle_ready = true; + } + else + my_thread_monitor.notify(); +} + +//------------------------------------------------------------------------ +// Methods of private_server +//------------------------------------------------------------------------ +private_server::private_server( tbb_client& client ) : + my_client(client), + my_n_thread(client.max_job_count()), + my_stack_size(client.min_stack_size()), + my_thread_array(NULL) +{ + my_ref_count = my_n_thread+1; + my_slack = 0; +#if TBB_USE_ASSERT + my_net_slack_requests = 0; +#endif /* TBB_USE_ASSERT */ + my_asleep_list_root = NULL; + my_thread_array = tbb::cache_aligned_allocator<padded_private_worker>().allocate( my_n_thread ); + memset( my_thread_array, 0, sizeof(private_worker)*my_n_thread ); + for( size_t i=0; i<my_n_thread; ++i ) { + private_worker* t = new( &my_thread_array[i] ) padded_private_worker( *this, client, i ); + t->my_next = my_asleep_list_root; + my_asleep_list_root = t; + } +} + +private_server::~private_server() { + __TBB_ASSERT( my_net_slack_requests==0, NULL ); + for( size_t i=my_n_thread; i--; ) + my_thread_array[i].~padded_private_worker(); + tbb::cache_aligned_allocator<padded_private_worker>().deallocate( my_thread_array, my_n_thread ); + tbb::internal::poison_pointer( my_thread_array ); +} + +inline bool private_server::try_insert_in_asleep_list( private_worker& t ) { + asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex); + // Contribute to slack under lock so that if another takes that unit of slack, + // it sees us sleeping on the list and wakes us up. + int k = ++my_slack; + if( k<=0 ) { + t.my_next = my_asleep_list_root; + my_asleep_list_root = &t; + return true; + } else { + --my_slack; + return false; + } +} + +void private_server::wake_some( int additional_slack ) { + __TBB_ASSERT( additional_slack>=0, NULL ); + private_worker* wakee[2]; + private_worker**w = wakee; + { + asleep_list_mutex_type::scoped_lock lock(my_asleep_list_mutex); + while( my_asleep_list_root && w<wakee+2 ) { + if( additional_slack>0 ) { + if (additional_slack+my_slack<=0) // additional demand does not exceed surplus supply + break; + --additional_slack; + } else { + // Chain reaction; Try to claim unit of slack + int old; + do { + old = my_slack; + if( old<=0 ) goto done; + } while( my_slack.compare_and_swap(old-1,old)!=old ); + } + // Pop sleeping worker to combine with claimed unit of slack + my_asleep_list_root = (*w++ = my_asleep_list_root)->my_next; + } + if( additional_slack ) { + // Contribute our unused slack to my_slack. + my_slack += additional_slack; + } + } +done: + while( w>wakee ) + (*--w)->wake_or_launch(); +} + +void private_server::adjust_job_count_estimate( int delta ) { +#if TBB_USE_ASSERT + my_net_slack_requests+=delta; +#endif /* TBB_USE_ASSERT */ + if( delta<0 ) { + my_slack+=delta; + } else if( delta>0 ) { + wake_some( delta ); + } +} + +//! Factory method called from task.cpp to create a private_server. +tbb_server* make_private_server( tbb_client& client ) { + return new( tbb::cache_aligned_allocator<private_server>().allocate(1) ) private_server(client); +} + +} // namespace rml +} // namespace internal + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_mutex.cpp new file mode 100644 index 0000000000..5d102c040b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_mutex.cpp @@ -0,0 +1,117 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/queuing_mutex.h" +#include "tbb/tbb_machine.h" +#include "tbb/tbb_stddef.h" +#include "tbb_misc.h" +#include "itt_notify.h" + +namespace tbb { + +using namespace internal; + +//! A method to acquire queuing_mutex lock +void queuing_mutex::scoped_lock::acquire( queuing_mutex& m ) +{ + __TBB_ASSERT( !this->mutex, "scoped_lock is already holding a mutex"); + + // Must set all fields before the fetch_and_store, because once the + // fetch_and_store executes, *this becomes accessible to other threads. + mutex = &m; + next = NULL; + going = 0; + + // The fetch_and_store must have release semantics, because we are + // "sending" the fields initialized above to other processors. + scoped_lock* pred = m.q_tail.fetch_and_store<tbb::release>(this); + if( pred ) { + ITT_NOTIFY(sync_prepare, mutex); +#if TBB_USE_ASSERT + __TBB_control_consistency_helper(); // on "m.q_tail" + __TBB_ASSERT( !pred->next, "the predecessor has another successor!"); +#endif + pred->next = this; + spin_wait_while_eq( going, 0ul ); + } + ITT_NOTIFY(sync_acquired, mutex); + + // Force acquire so that user's critical section receives correct values + // from processor that was previously in the user's critical section. + __TBB_load_with_acquire(going); +} + +//! A method to acquire queuing_mutex if it is free +bool queuing_mutex::scoped_lock::try_acquire( queuing_mutex& m ) +{ + __TBB_ASSERT( !this->mutex, "scoped_lock is already holding a mutex"); + + // Must set all fields before the fetch_and_store, because once the + // fetch_and_store executes, *this becomes accessible to other threads. + next = NULL; + going = 0; + + // The CAS must have release semantics, because we are + // "sending" the fields initialized above to other processors. + if( m.q_tail.compare_and_swap<tbb::release>(this, NULL) ) + return false; + + // Force acquire so that user's critical section receives correct values + // from processor that was previously in the user's critical section. + // try_acquire should always have acquire semantic, even if failed. + __TBB_load_with_acquire(going); + mutex = &m; + ITT_NOTIFY(sync_acquired, mutex); + return true; +} + +//! A method to release queuing_mutex lock +void queuing_mutex::scoped_lock::release( ) +{ + __TBB_ASSERT(this->mutex!=NULL, "no lock acquired"); + + ITT_NOTIFY(sync_releasing, mutex); + if( !next ) { + if( this == mutex->q_tail.compare_and_swap<tbb::release>(NULL, this) ) { + // this was the only item in the queue, and the queue is now empty. + goto done; + } + // Someone in the queue + spin_wait_while_eq( next, (scoped_lock*)0 ); + } + __TBB_ASSERT(next,NULL); + __TBB_store_with_release(next->going, 1); +done: + initialize(); +} + +void queuing_mutex::internal_construct() { + ITT_SYNC_CREATE(this, _T("tbb::queuing_mutex"), _T("")); +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_rw_mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_rw_mutex.cpp new file mode 100644 index 0000000000..78a1c60cc6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/queuing_rw_mutex.cpp @@ -0,0 +1,505 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +/** Before making any changes in the implementation, please emulate algorithmic changes + with SPIN tool using <TBB directory>/tools/spin_models/ReaderWriterMutex.pml. + There could be some code looking as "can be restructured" but its structure does matter! */ + +#include "tbb/queuing_rw_mutex.h" +#include "tbb/tbb_machine.h" +#include "tbb/tbb_stddef.h" +#include "tbb/tbb_machine.h" +#include "itt_notify.h" + + +namespace tbb { + +using namespace internal; + +//! Flag bits in a state_t that specify information about a locking request. +enum state_t_flags { + STATE_NONE = 0, + STATE_WRITER = 1<<0, + STATE_READER = 1<<1, + STATE_READER_UNBLOCKNEXT = 1<<2, + STATE_ACTIVEREADER = 1<<3, + STATE_UPGRADE_REQUESTED = 1<<4, + STATE_UPGRADE_WAITING = 1<<5, + STATE_UPGRADE_LOSER = 1<<6, + STATE_COMBINED_WAITINGREADER = STATE_READER | STATE_READER_UNBLOCKNEXT, + STATE_COMBINED_READER = STATE_COMBINED_WAITINGREADER | STATE_ACTIVEREADER, + STATE_COMBINED_UPGRADING = STATE_UPGRADE_WAITING | STATE_UPGRADE_LOSER +}; + +const unsigned char RELEASED = 0; +const unsigned char ACQUIRED = 1; + +inline bool queuing_rw_mutex::scoped_lock::try_acquire_internal_lock() +{ + return as_atomic(my_internal_lock).compare_and_swap<tbb::acquire>(ACQUIRED,RELEASED) == RELEASED; +} + +inline void queuing_rw_mutex::scoped_lock::acquire_internal_lock() +{ + // Usually, we would use the test-test-and-set idiom here, with exponential backoff. + // But so far, experiments indicate there is no value in doing so here. + while( !try_acquire_internal_lock() ) { + __TBB_Pause(1); + } +} + +inline void queuing_rw_mutex::scoped_lock::release_internal_lock() +{ + __TBB_store_with_release(my_internal_lock,RELEASED); +} + +inline void queuing_rw_mutex::scoped_lock::wait_for_release_of_internal_lock() +{ + spin_wait_until_eq(my_internal_lock, RELEASED); +} + +inline void queuing_rw_mutex::scoped_lock::unblock_or_wait_on_internal_lock( uintptr_t flag ) { + if( flag ) + wait_for_release_of_internal_lock(); + else + release_internal_lock(); +} + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (push) + #pragma warning (disable: 4311 4312) +#endif + +//! A view of a T* with additional functionality for twiddling low-order bits. +template<typename T> +class tricky_atomic_pointer: no_copy { +public: + typedef typename atomic_selector<sizeof(T*)>::word word; + + template<memory_semantics M> + static T* fetch_and_add( T* volatile * location, word addend ) { + return reinterpret_cast<T*>( atomic_traits<sizeof(T*),M>::fetch_and_add(location, addend) ); + } + template<memory_semantics M> + static T* fetch_and_store( T* volatile * location, T* value ) { + return reinterpret_cast<T*>( atomic_traits<sizeof(T*),M>::fetch_and_store(location, reinterpret_cast<word>(value)) ); + } + template<memory_semantics M> + static T* compare_and_swap( T* volatile * location, T* value, T* comparand ) { + return reinterpret_cast<T*>( + atomic_traits<sizeof(T*),M>::compare_and_swap(location, reinterpret_cast<word>(value), + reinterpret_cast<word>(comparand)) + ); + } + + T* & ref; + tricky_atomic_pointer( T*& original ) : ref(original) {}; + tricky_atomic_pointer( T* volatile & original ) : ref(original) {}; + T* operator&( word operand2 ) const { + return reinterpret_cast<T*>( reinterpret_cast<word>(ref) & operand2 ); + } + T* operator|( word operand2 ) const { + return reinterpret_cast<T*>( reinterpret_cast<word>(ref) | operand2 ); + } +}; + +typedef tricky_atomic_pointer<queuing_rw_mutex::scoped_lock> tricky_pointer; + +#if defined(_MSC_VER) && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + #pragma warning (pop) +#endif + +//! Mask for low order bit of a pointer. +static const tricky_pointer::word FLAG = 0x1; + +inline +uintptr_t get_flag( queuing_rw_mutex::scoped_lock* ptr ) { + return uintptr_t(ptr) & FLAG; +} + +//------------------------------------------------------------------------ +// Methods of queuing_rw_mutex::scoped_lock +//------------------------------------------------------------------------ + +//! A method to acquire queuing_rw_mutex lock +void queuing_rw_mutex::scoped_lock::acquire( queuing_rw_mutex& m, bool write ) +{ + __TBB_ASSERT( !my_mutex, "scoped_lock is already holding a mutex"); + + // Must set all fields before the fetch_and_store, because once the + // fetch_and_store executes, *this becomes accessible to other threads. + my_mutex = &m; + __TBB_store_relaxed(my_prev , (scoped_lock*)0); + __TBB_store_relaxed(my_next , (scoped_lock*)0); + __TBB_store_relaxed(my_going, 0); + my_state = state_t(write ? STATE_WRITER : STATE_READER); + my_internal_lock = RELEASED; + + queuing_rw_mutex::scoped_lock* pred = m.q_tail.fetch_and_store<tbb::release>(this); + + if( write ) { // Acquiring for write + + if( pred ) { + ITT_NOTIFY(sync_prepare, my_mutex); + pred = tricky_pointer(pred) & ~FLAG; + __TBB_ASSERT( !( uintptr_t(pred) & FLAG ), "use of corrupted pointer!" ); +#if TBB_USE_ASSERT + __TBB_control_consistency_helper(); // on "m.q_tail" + __TBB_ASSERT( !__TBB_load_relaxed(pred->my_next), "the predecessor has another successor!"); +#endif + __TBB_store_with_release(pred->my_next,this); + spin_wait_until_eq(my_going, 1); + } + + } else { // Acquiring for read +#if DO_ITT_NOTIFY + bool sync_prepare_done = false; +#endif + if( pred ) { + unsigned short pred_state; + __TBB_ASSERT( !__TBB_load_relaxed(my_prev), "the predecessor is already set" ); + if( uintptr_t(pred) & FLAG ) { + /* this is only possible if pred is an upgrading reader and it signals us to wait */ + pred_state = STATE_UPGRADE_WAITING; + pred = tricky_pointer(pred) & ~FLAG; + } else { + // Load pred->my_state now, because once pred->my_next becomes + // non-NULL, we must assume that *pred might be destroyed. + pred_state = pred->my_state.compare_and_swap<tbb::acquire>(STATE_READER_UNBLOCKNEXT, STATE_READER); + } + __TBB_store_relaxed(my_prev, pred); + __TBB_ASSERT( !( uintptr_t(pred) & FLAG ), "use of corrupted pointer!" ); +#if TBB_USE_ASSERT + __TBB_control_consistency_helper(); // on "m.q_tail" + __TBB_ASSERT( !__TBB_load_relaxed(pred->my_next), "the predecessor has another successor!"); +#endif + __TBB_store_with_release(pred->my_next,this); + if( pred_state != STATE_ACTIVEREADER ) { +#if DO_ITT_NOTIFY + sync_prepare_done = true; + ITT_NOTIFY(sync_prepare, my_mutex); +#endif + spin_wait_until_eq(my_going, 1); + } + } + + // The protected state must have been acquired here before it can be further released to any other reader(s): + unsigned short old_state = my_state.compare_and_swap<tbb::acquire>(STATE_ACTIVEREADER, STATE_READER); + if( old_state!=STATE_READER ) { +#if DO_ITT_NOTIFY + if( !sync_prepare_done ) + ITT_NOTIFY(sync_prepare, my_mutex); +#endif + // Failed to become active reader -> need to unblock the next waiting reader first + __TBB_ASSERT( my_state==STATE_READER_UNBLOCKNEXT, "unexpected state" ); + spin_wait_while_eq(my_next, (scoped_lock*)NULL); + /* my_state should be changed before unblocking the next otherwise it might finish + and another thread can get our old state and left blocked */ + my_state = STATE_ACTIVEREADER; + __TBB_store_with_release(my_next->my_going,1); + } + } + + ITT_NOTIFY(sync_acquired, my_mutex); + + // Force acquire so that user's critical section receives correct values + // from processor that was previously in the user's critical section. + __TBB_load_with_acquire(my_going); +} + +//! A method to acquire queuing_rw_mutex if it is free +bool queuing_rw_mutex::scoped_lock::try_acquire( queuing_rw_mutex& m, bool write ) +{ + __TBB_ASSERT( !my_mutex, "scoped_lock is already holding a mutex"); + + if( load<relaxed>(m.q_tail) ) + return false; // Someone already took the lock + + // Must set all fields before the fetch_and_store, because once the + // fetch_and_store executes, *this becomes accessible to other threads. + __TBB_store_relaxed(my_prev, (scoped_lock*)0); + __TBB_store_relaxed(my_next, (scoped_lock*)0); + __TBB_store_relaxed(my_going, 0); // TODO: remove dead assignment? + my_state = state_t(write ? STATE_WRITER : STATE_ACTIVEREADER); + my_internal_lock = RELEASED; + + // The CAS must have release semantics, because we are + // "sending" the fields initialized above to other processors. + if( m.q_tail.compare_and_swap<tbb::release>(this, NULL) ) + return false; // Someone already took the lock + // Force acquire so that user's critical section receives correct values + // from processor that was previously in the user's critical section. + // try_acquire should always have acquire semantic, even if failed. + __TBB_load_with_acquire(my_going); + my_mutex = &m; + ITT_NOTIFY(sync_acquired, my_mutex); + return true; +} + +//! A method to release queuing_rw_mutex lock +void queuing_rw_mutex::scoped_lock::release( ) +{ + __TBB_ASSERT(my_mutex!=NULL, "no lock acquired"); + + ITT_NOTIFY(sync_releasing, my_mutex); + + if( my_state == STATE_WRITER ) { // Acquired for write + + // The logic below is the same as "writerUnlock", but elides + // "return" from the middle of the routine. + // In the statement below, acquire semantics of reading my_next is required + // so that following operations with fields of my_next are safe. + scoped_lock* n = __TBB_load_with_acquire(my_next); + if( !n ) { + if( this == my_mutex->q_tail.compare_and_swap<tbb::release>(NULL, this) ) { + // this was the only item in the queue, and the queue is now empty. + goto done; + } + spin_wait_while_eq( my_next, (scoped_lock*)NULL ); + n = __TBB_load_with_acquire(my_next); + } + __TBB_store_relaxed(n->my_going, 2); // protect next queue node from being destroyed too early + if( n->my_state==STATE_UPGRADE_WAITING ) { + // the next waiting for upgrade means this writer was upgraded before. + acquire_internal_lock(); + queuing_rw_mutex::scoped_lock* tmp = tricky_pointer::fetch_and_store<tbb::release>(&(n->my_prev), NULL); + n->my_state = STATE_UPGRADE_LOSER; + __TBB_store_with_release(n->my_going,1); + unblock_or_wait_on_internal_lock(get_flag(tmp)); + } else { + __TBB_ASSERT( my_state & (STATE_COMBINED_WAITINGREADER | STATE_WRITER), "unexpected state" ); + __TBB_ASSERT( !( uintptr_t(__TBB_load_relaxed(n->my_prev)) & FLAG ), "use of corrupted pointer!" ); + __TBB_store_relaxed(n->my_prev, (scoped_lock*)0); + __TBB_store_with_release(n->my_going,1); + } + + } else { // Acquired for read + + queuing_rw_mutex::scoped_lock *tmp = NULL; +retry: + // Addition to the original paper: Mark my_prev as in use + queuing_rw_mutex::scoped_lock *pred = tricky_pointer::fetch_and_add<tbb::acquire>(&my_prev, FLAG); + + if( pred ) { + if( !(pred->try_acquire_internal_lock()) ) + { + // Failed to acquire the lock on pred. The predecessor either unlinks or upgrades. + // In the second case, it could or could not know my "in use" flag - need to check + tmp = tricky_pointer::compare_and_swap<tbb::release>(&my_prev, pred, tricky_pointer(pred) | FLAG ); + if( !(uintptr_t(tmp) & FLAG) ) { + // Wait for the predecessor to change my_prev (e.g. during unlink) + spin_wait_while_eq( my_prev, tricky_pointer(pred)|FLAG ); + // Now owner of pred is waiting for _us_ to release its lock + pred->release_internal_lock(); + } + // else the "in use" flag is back -> the predecessor didn't get it and will release itself; nothing to do + + tmp = NULL; + goto retry; + } + __TBB_ASSERT(pred && pred->my_internal_lock==ACQUIRED, "predecessor's lock is not acquired"); + __TBB_store_relaxed(my_prev, pred); + acquire_internal_lock(); + + __TBB_store_with_release(pred->my_next,reinterpret_cast<scoped_lock *>(NULL)); + + if( !__TBB_load_relaxed(my_next) && this != my_mutex->q_tail.compare_and_swap<tbb::release>(pred, this) ) { + spin_wait_while_eq( my_next, (void*)NULL ); + } + __TBB_ASSERT( !get_flag(__TBB_load_relaxed(my_next)), "use of corrupted pointer" ); + + // ensure acquire semantics of reading 'my_next' + if( scoped_lock *const l_next = __TBB_load_with_acquire(my_next) ) { // I->next != nil, TODO: rename to n after clearing up and adapting the n in the comment two lines below + // Equivalent to I->next->prev = I->prev but protected against (prev[n]&FLAG)!=0 + tmp = tricky_pointer::fetch_and_store<tbb::release>(&(l_next->my_prev), pred); + // I->prev->next = I->next; + __TBB_ASSERT(__TBB_load_relaxed(my_prev)==pred, NULL); + __TBB_store_with_release(pred->my_next, my_next); + } + // Safe to release in the order opposite to acquiring which makes the code simplier + pred->release_internal_lock(); + + } else { // No predecessor when we looked + acquire_internal_lock(); // "exclusiveLock(&I->EL)" + scoped_lock* n = __TBB_load_with_acquire(my_next); + if( !n ) { + if( this != my_mutex->q_tail.compare_and_swap<tbb::release>(NULL, this) ) { + spin_wait_while_eq( my_next, (scoped_lock*)NULL ); + n = __TBB_load_relaxed(my_next); + } else { + goto unlock_self; + } + } + __TBB_store_relaxed(n->my_going, 2); // protect next queue node from being destroyed too early + tmp = tricky_pointer::fetch_and_store<tbb::release>(&(n->my_prev), NULL); + __TBB_store_with_release(n->my_going,1); + } +unlock_self: + unblock_or_wait_on_internal_lock(get_flag(tmp)); + } +done: + spin_wait_while_eq( my_going, 2 ); + + initialize(); +} + +bool queuing_rw_mutex::scoped_lock::downgrade_to_reader() +{ + __TBB_ASSERT( my_state==STATE_WRITER, "no sense to downgrade a reader" ); + + ITT_NOTIFY(sync_releasing, my_mutex); + + if( ! __TBB_load_with_acquire(my_next) ) { + my_state = STATE_READER; + if( this==my_mutex->q_tail ) { + unsigned short old_state = my_state.compare_and_swap<tbb::release>(STATE_ACTIVEREADER, STATE_READER); + if( old_state==STATE_READER ) { + // Downgrade completed + return true; + } + } + /* wait for the next to register */ + spin_wait_while_eq( my_next, (void*)NULL ); + } + scoped_lock *const n = __TBB_load_relaxed(my_next); + __TBB_ASSERT( n, "still no successor at this point!" ); + if( n->my_state & STATE_COMBINED_WAITINGREADER ) + __TBB_store_with_release(n->my_going,1); + else if( n->my_state==STATE_UPGRADE_WAITING ) + // the next waiting for upgrade means this writer was upgraded before. + n->my_state = STATE_UPGRADE_LOSER; + my_state = STATE_ACTIVEREADER; + return true; +} + +bool queuing_rw_mutex::scoped_lock::upgrade_to_writer() +{ + __TBB_ASSERT( my_state==STATE_ACTIVEREADER, "only active reader can be upgraded" ); + + queuing_rw_mutex::scoped_lock * tmp; + queuing_rw_mutex::scoped_lock * me = this; + + ITT_NOTIFY(sync_releasing, my_mutex); + my_state = STATE_UPGRADE_REQUESTED; +requested: + __TBB_ASSERT( !(uintptr_t(__TBB_load_relaxed(my_next)) & FLAG), "use of corrupted pointer!" ); + acquire_internal_lock(); + if( this != my_mutex->q_tail.compare_and_swap<tbb::release>(tricky_pointer(me)|FLAG, this) ) { + spin_wait_while_eq( my_next, (void*)NULL ); + queuing_rw_mutex::scoped_lock * n; + n = tricky_pointer::fetch_and_add<tbb::acquire>(&my_next, FLAG); + unsigned short n_state = n->my_state; + /* the next reader can be blocked by our state. the best thing to do is to unblock it */ + if( n_state & STATE_COMBINED_WAITINGREADER ) + __TBB_store_with_release(n->my_going,1); + tmp = tricky_pointer::fetch_and_store<tbb::release>(&(n->my_prev), this); + unblock_or_wait_on_internal_lock(get_flag(tmp)); + if( n_state & (STATE_COMBINED_READER | STATE_UPGRADE_REQUESTED) ) { + // save n|FLAG for simplicity of following comparisons + tmp = tricky_pointer(n)|FLAG; + atomic_backoff backoff; + while(__TBB_load_relaxed(my_next)==tmp) { + if( my_state & STATE_COMBINED_UPGRADING ) { + if( __TBB_load_with_acquire(my_next)==tmp ) + __TBB_store_relaxed(my_next, n); + goto waiting; + } + backoff.pause(); + } + __TBB_ASSERT(__TBB_load_relaxed(my_next) != (tricky_pointer(n)|FLAG), NULL); + goto requested; + } else { + __TBB_ASSERT( n_state & (STATE_WRITER | STATE_UPGRADE_WAITING), "unexpected state"); + __TBB_ASSERT( (tricky_pointer(n)|FLAG) == __TBB_load_relaxed(my_next), NULL); + __TBB_store_relaxed(my_next, n); + } + } else { + /* We are in the tail; whoever comes next is blocked by q_tail&FLAG */ + release_internal_lock(); + } // if( this != my_mutex->q_tail... ) + my_state.compare_and_swap<tbb::acquire>(STATE_UPGRADE_WAITING, STATE_UPGRADE_REQUESTED); + +waiting: + __TBB_ASSERT( !( intptr_t(__TBB_load_relaxed(my_next)) & FLAG ), "use of corrupted pointer!" ); + __TBB_ASSERT( my_state & STATE_COMBINED_UPGRADING, "wrong state at upgrade waiting_retry" ); + __TBB_ASSERT( me==this, NULL ); + ITT_NOTIFY(sync_prepare, my_mutex); + /* if no one was blocked by the "corrupted" q_tail, turn it back */ + my_mutex->q_tail.compare_and_swap<tbb::release>( this, tricky_pointer(me)|FLAG ); + queuing_rw_mutex::scoped_lock * pred; + pred = tricky_pointer::fetch_and_add<tbb::acquire>(&my_prev, FLAG); + if( pred ) { + bool success = pred->try_acquire_internal_lock(); + pred->my_state.compare_and_swap<tbb::release>(STATE_UPGRADE_WAITING, STATE_UPGRADE_REQUESTED); + if( !success ) { + tmp = tricky_pointer::compare_and_swap<tbb::release>(&my_prev, pred, tricky_pointer(pred)|FLAG ); + if( uintptr_t(tmp) & FLAG ) { + spin_wait_while_eq(my_prev, pred); + pred = __TBB_load_relaxed(my_prev); + } else { + spin_wait_while_eq( my_prev, tricky_pointer(pred)|FLAG ); + pred->release_internal_lock(); + } + } else { + __TBB_store_relaxed(my_prev, pred); + pred->release_internal_lock(); + spin_wait_while_eq(my_prev, pred); + pred = __TBB_load_relaxed(my_prev); + } + if( pred ) + goto waiting; + } else { + // restore the corrupted my_prev field for possible further use (e.g. if downgrade back to reader) + __TBB_store_relaxed(my_prev, pred); + } + __TBB_ASSERT( !pred && !__TBB_load_relaxed(my_prev), NULL ); + + // additional lifetime issue prevention checks + // wait for the successor to finish working with my fields + wait_for_release_of_internal_lock(); + // now wait for the predecessor to finish working with my fields + spin_wait_while_eq( my_going, 2 ); + + // Acquire critical section indirectly from previous owner or directly from predecessor (TODO: not clear). + __TBB_control_consistency_helper(); // on either "my_mutex->q_tail" or "my_going" (TODO: not clear) + + bool result = ( my_state != STATE_UPGRADE_LOSER ); + my_state = STATE_WRITER; + __TBB_store_relaxed(my_going, 1); + + ITT_NOTIFY(sync_acquired, my_mutex); + return result; +} + +void queuing_rw_mutex::internal_construct() { + ITT_SYNC_CREATE(this, _T("tbb::queuing_rw_mutex"), _T("")); +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/reader_writer_lock.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/reader_writer_lock.cpp new file mode 100644 index 0000000000..019dad01de --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/reader_writer_lock.cpp @@ -0,0 +1,355 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/reader_writer_lock.h" +#include "tbb/tbb_machine.h" +#include "tbb/tbb_exception.h" +#include "itt_notify.h" + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4244) +#endif + +namespace tbb { +namespace interface5 { + +const uintptr_t WFLAG1 = 0x1; // writer interested or active +const uintptr_t WFLAG2 = 0x2; // writers interested, no entering readers +const uintptr_t RFLAG = 0x4; // reader interested but not active +const uintptr_t RC_INCR = 0x8; // to adjust reader count + + +// Perform an atomic bitwise-OR on the operand, and return its previous value. +inline uintptr_t fetch_and_or(atomic<uintptr_t>& operand, uintptr_t value) { + for (tbb::internal::atomic_backoff b;;b.pause()) { + uintptr_t old = operand; + uintptr_t result = operand.compare_and_swap(old|value, old); + if (result==old) return result; + } +} + +// Perform an atomic bitwise-AND on the operand, and return its previous value. +inline uintptr_t fetch_and_and(atomic<uintptr_t>& operand, uintptr_t value) { + for (tbb::internal::atomic_backoff b;;b.pause()) { + uintptr_t old = operand; + uintptr_t result = operand.compare_and_swap(old&value, old); + if (result==old) return result; + } +} + +//! Spin WHILE the value at the location is greater than or equal to a given value +/** T and U should be comparable types. */ +template<typename T, typename U> +void spin_wait_while_geq( const volatile T& location, U value ) { + tbb::internal::atomic_backoff backoff; + while( location>=value ) backoff.pause(); +} + +//! Spin UNTIL (location & value) is true. +/** T and U should be comparable types. */ +template<typename T, typename U> +void spin_wait_until_and( const volatile T& location, U value ) { + tbb::internal::atomic_backoff backoff; + while( !(location & value) ) backoff.pause(); +} + + +void reader_writer_lock::internal_construct() { + reader_head = NULL; + writer_head = NULL; + writer_tail = NULL; + rdr_count_and_flags = 0; + my_current_writer = tbb_thread::id(); +#if TBB_USE_THREADING_TOOLS + ITT_SYNC_CREATE(this, _T("tbb::reader_writer_lock"), _T("")); +#endif /* TBB_USE_THREADING_TOOLS */ +} + +void reader_writer_lock::internal_destroy() { + __TBB_ASSERT(rdr_count_and_flags==0, "reader_writer_lock destroyed with pending readers/writers."); + __TBB_ASSERT(reader_head==NULL, "reader_writer_lock destroyed with pending readers."); + __TBB_ASSERT(writer_tail==NULL, "reader_writer_lock destroyed with pending writers."); + __TBB_ASSERT(writer_head==NULL, "reader_writer_lock destroyed with pending/active writers."); +} + +// Acquires the reader_writer_lock for write. If the lock is currently held in write +// mode by another context, the writer will block by spinning on a local variable. +// Throws exception improper_lock if the context tries to acquire a +// reader_writer_lock that it already has write ownership of. +void reader_writer_lock::lock() { + if (is_current_writer()) { // recursive lock attempt + // we don't support recursive writer locks; throw exception + tbb::internal::throw_exception(tbb::internal::eid_improper_lock); + } + else { + scoped_lock *a_writer_lock = new scoped_lock(); + (void) start_write(a_writer_lock); + } +} + +// Tries to acquire the reader_writer_lock for write. This function does not block. +// Return Value: True or false, depending on whether the lock is acquired or not. +// If the lock is already held by this acquiring context, try_lock() returns false. +bool reader_writer_lock::try_lock() { + if (is_current_writer()) { // recursive lock attempt + return false; + } + else { + scoped_lock *a_writer_lock = new scoped_lock(); + a_writer_lock->status = waiting_nonblocking; + return start_write(a_writer_lock); + } +} + +bool reader_writer_lock::start_write(scoped_lock *I) { + tbb_thread::id id = this_tbb_thread::get_id(); + scoped_lock *pred = NULL; + if (I->status == waiting_nonblocking) { + if ((pred = writer_tail.compare_and_swap(I, NULL)) != NULL) { + delete I; + return false; + } + } + else { + ITT_NOTIFY(sync_prepare, this); + pred = writer_tail.fetch_and_store(I); + } + if (pred) + pred->next = I; + else { + set_next_writer(I); + if (I->status == waiting_nonblocking) { + if (I->next) { // potentially more writers + set_next_writer(I->next); + } + else { // no more writers + writer_head.fetch_and_store(NULL); + if (I != writer_tail.compare_and_swap(NULL, I)) { // an incoming writer is in the process of being added + spin_wait_while_eq(I->next, (scoped_lock *)NULL); // wait for new writer to be added + __TBB_ASSERT(I->next, "There should be a node following the last writer."); + set_next_writer(I->next); + } + } + delete I; + return false; + } + } + spin_wait_while_eq(I->status, waiting); + ITT_NOTIFY(sync_acquired, this); + my_current_writer = id; + return true; +} + +void reader_writer_lock::set_next_writer(scoped_lock *W) { + writer_head = W; + if (W->status == waiting_nonblocking) { + if (rdr_count_and_flags.compare_and_swap(WFLAG1+WFLAG2, 0) == 0) { + W->status = active; + } + } + else { + if (fetch_and_or(rdr_count_and_flags, WFLAG1) & RFLAG) { // reader present + spin_wait_until_and(rdr_count_and_flags, WFLAG2); // block until readers set WFLAG2 + } + else { // no reader in timing window + __TBB_AtomicOR(&rdr_count_and_flags, WFLAG2); + } + spin_wait_while_geq(rdr_count_and_flags, RC_INCR); // block until readers finish + W->status = active; + } +} + +// Acquires the reader_writer_lock for read. If the lock is currently held by a writer, +// this reader will block and wait until the writers are done. +// Throws exception improper_lock when the context tries to acquire a reader_writer_lock +// that it already has write ownership of. +void reader_writer_lock::lock_read() { + if (is_current_writer()) { // recursive lock attempt + // we don't support writer->reader downgrade; throw exception + tbb::internal::throw_exception(tbb::internal::eid_improper_lock); + } + else { + scoped_lock_read a_reader_lock; + start_read(&a_reader_lock); + } +} + +// Tries to acquire the reader_writer_lock for read. This function does not block. +// Return Value: True or false, depending on whether the lock is acquired or not. +bool reader_writer_lock::try_lock_read() { + if (is_current_writer()) { // recursive lock attempt + return false; + } + else { + if (rdr_count_and_flags.fetch_and_add(RC_INCR) & (WFLAG1+WFLAG2)) { // writers present + rdr_count_and_flags -= RC_INCR; + return false; + } + else { // no writers + ITT_NOTIFY(sync_acquired, this); + return true; + } + } +} + +void reader_writer_lock::start_read(scoped_lock_read *I) { + ITT_NOTIFY(sync_prepare, this); + I->next = reader_head.fetch_and_store(I); + if (!I->next) { // first arriving reader in my group; set RFLAG, test writer flags + // unblock and/or update statuses of non-blocking readers + if (!(fetch_and_or(rdr_count_and_flags, RFLAG) & (WFLAG1+WFLAG2))) { // no writers + unblock_readers(); + } + } + __TBB_ASSERT(I->status == waiting || I->status == active, "Lock requests should be waiting or active before blocking."); + spin_wait_while_eq(I->status, waiting); // block + if (I->next) { + __TBB_ASSERT(I->next->status == waiting, NULL); + rdr_count_and_flags += RC_INCR; + I->next->status = active; // wake successor + } + ITT_NOTIFY(sync_acquired, this); +} + +void reader_writer_lock::unblock_readers() { + // clear rdr interest flag, increment rdr count + __TBB_ASSERT(rdr_count_and_flags&RFLAG, NULL); + rdr_count_and_flags += RC_INCR-RFLAG; + __TBB_ASSERT(rdr_count_and_flags >= RC_INCR, NULL); + // indicate clear of window + if (rdr_count_and_flags & WFLAG1 && !(rdr_count_and_flags & WFLAG2)) { + __TBB_AtomicOR(&rdr_count_and_flags, WFLAG2); + } + // unblock waiting readers + scoped_lock_read *head = reader_head.fetch_and_store(NULL); + __TBB_ASSERT(head, NULL); + __TBB_ASSERT(head->status == waiting, NULL); + head->status = active; +} + +// Releases the reader_writer_lock +void reader_writer_lock::unlock() { + if( my_current_writer!=tbb_thread::id() ) { + // A writer owns the lock + __TBB_ASSERT(is_current_writer(), "caller of reader_writer_lock::unlock() does not own the lock."); + __TBB_ASSERT(writer_head, NULL); + __TBB_ASSERT(writer_head->status==active, NULL); + scoped_lock *a_writer_lock = writer_head; + end_write(a_writer_lock); + __TBB_ASSERT(a_writer_lock != writer_head, "Internal error: About to turn writer_head into dangling reference."); + delete a_writer_lock; + } else { + end_read(); + } +} + +void reader_writer_lock::end_write(scoped_lock *I) { + __TBB_ASSERT(I==writer_head, "Internal error: can't unlock a thread that is not holding the lock."); + my_current_writer = tbb_thread::id(); + ITT_NOTIFY(sync_releasing, this); + if (I->next) { // potentially more writers + writer_head = I->next; + writer_head->status = active; + } + else { // No more writers; clear writer flag, test reader interest flag + __TBB_ASSERT(writer_head, NULL); + if (fetch_and_and(rdr_count_and_flags, ~(WFLAG1+WFLAG2)) & RFLAG) { + unblock_readers(); + } + writer_head.fetch_and_store(NULL); + if (I != writer_tail.compare_and_swap(NULL, I)) { // an incoming writer is in the process of being added + spin_wait_while_eq(I->next, (scoped_lock *)NULL); // wait for new writer to be added + __TBB_ASSERT(I->next, "There should be a node following the last writer."); + set_next_writer(I->next); + } + } +} + +void reader_writer_lock::end_read() { + ITT_NOTIFY(sync_releasing, this); + __TBB_ASSERT(rdr_count_and_flags >= RC_INCR, "unlock() called but no readers hold the lock."); + rdr_count_and_flags -= RC_INCR; +} + +inline bool reader_writer_lock::is_current_writer() { + return my_current_writer==this_tbb_thread::get_id(); +} + +// Construct with a blocking attempt to acquire a write lock on the passed reader_writer_lock +void reader_writer_lock::scoped_lock::internal_construct (reader_writer_lock& lock) { + mutex = &lock; + next = NULL; + status = waiting; + if (mutex->is_current_writer()) { // recursive lock attempt + // we don't support recursive writer locks; throw exception + tbb::internal::throw_exception(tbb::internal::eid_improper_lock); + } + else { // this thread holds no locks + (void) mutex->start_write(this); + } +} + +inline reader_writer_lock::scoped_lock::scoped_lock() : mutex(NULL), next(NULL) { + status = waiting; +} + +// Construct with a blocking attempt to acquire a write lock on the passed reader_writer_lock +void reader_writer_lock::scoped_lock_read::internal_construct (reader_writer_lock& lock) { + mutex = &lock; + next = NULL; + status = waiting; + if (mutex->is_current_writer()) { // recursive lock attempt + // we don't support writer->reader downgrade; throw exception + tbb::internal::throw_exception(tbb::internal::eid_improper_lock); + } + else { // this thread holds no locks + mutex->start_read(this); + } +} + +inline reader_writer_lock::scoped_lock_read::scoped_lock_read() : mutex(NULL), next(NULL) { + status = waiting; +} + +void reader_writer_lock::scoped_lock::internal_destroy() { + if (mutex) { + __TBB_ASSERT(mutex->is_current_writer(), "~scoped_lock() destroyed by thread different than thread that holds lock."); + mutex->end_write(this); + } + status = invalid; +} + +void reader_writer_lock::scoped_lock_read::internal_destroy() { + if (mutex) + mutex->end_read(); + status = invalid; +} + +} // namespace interface5 +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/recursive_mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/recursive_mutex.cpp new file mode 100644 index 0000000000..977ae50047 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/recursive_mutex.cpp @@ -0,0 +1,143 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/recursive_mutex.h" +#include "itt_notify.h" + +namespace tbb { + +void recursive_mutex::scoped_lock::internal_acquire( recursive_mutex& m ) { +#if _WIN32||_WIN64 + switch( m.state ) { + case INITIALIZED: + // since we cannot look into the internal of the CriticalSection object + // we won't know how many times the lock has been acquired, and thus + // we won't know when we may safely set the state back to INITIALIZED + // if we change the state to HELD as in mutex.cpp. thus, we won't change + // the state for recursive_mutex + EnterCriticalSection( &m.impl ); + break; + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); + break; + } +#else + int error_code = pthread_mutex_lock(&m.impl); + __TBB_ASSERT_EX(!error_code,"recursive_mutex::scoped_lock: pthread_mutex_lock failed"); +#endif /* _WIN32||_WIN64 */ + my_mutex = &m; +} + +void recursive_mutex::scoped_lock::internal_release() { + __TBB_ASSERT( my_mutex, "recursive_mutex::scoped_lock: not holding a mutex" ); +#if _WIN32||_WIN64 + switch( my_mutex->state ) { + case INITIALIZED: + LeaveCriticalSection( &my_mutex->impl ); + break; + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); + break; + } +#else + int error_code = pthread_mutex_unlock(&my_mutex->impl); + __TBB_ASSERT_EX(!error_code, "recursive_mutex::scoped_lock: pthread_mutex_unlock failed"); +#endif /* _WIN32||_WIN64 */ + my_mutex = NULL; +} + +bool recursive_mutex::scoped_lock::internal_try_acquire( recursive_mutex& m ) { +#if _WIN32||_WIN64 + switch( m.state ) { + case INITIALIZED: + break; + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: mutex already destroyed"); + break; + default: + __TBB_ASSERT(false,"recursive_mutex::scoped_lock: illegal mutex state"); + break; + } +#endif /* _WIN32||_WIN64 */ + bool result; +#if _WIN32||_WIN64 + result = TryEnterCriticalSection(&m.impl)!=0; +#else + result = pthread_mutex_trylock(&m.impl)==0; +#endif /* _WIN32||_WIN64 */ + if( result ) + my_mutex = &m; + return result; +} + +void recursive_mutex::internal_construct() { +#if _WIN32||_WIN64 + InitializeCriticalSectionEx(&impl, 4000, 0); + state = INITIALIZED; +#else + pthread_mutexattr_t mtx_attr; + int error_code = pthread_mutexattr_init( &mtx_attr ); + if( error_code ) + tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutexattr_init failed"); + + pthread_mutexattr_settype( &mtx_attr, PTHREAD_MUTEX_RECURSIVE ); + error_code = pthread_mutex_init( &impl, &mtx_attr ); + if( error_code ) + tbb::internal::handle_perror(error_code,"recursive_mutex: pthread_mutex_init failed"); + pthread_mutexattr_destroy( &mtx_attr ); +#endif /* _WIN32||_WIN64*/ + ITT_SYNC_CREATE(&impl, _T("tbb::recursive_mutex"), _T("")); +} + +void recursive_mutex::internal_destroy() { +#if _WIN32||_WIN64 + switch( state ) { + case INITIALIZED: + DeleteCriticalSection(&impl); + break; + case DESTROYED: + __TBB_ASSERT(false,"recursive_mutex: already destroyed"); + break; + default: + __TBB_ASSERT(false,"recursive_mutex: illegal state for destruction"); + break; + } + state = DESTROYED; +#else + int error_code = pthread_mutex_destroy(&impl); + __TBB_ASSERT_EX(!error_code,"recursive_mutex: pthread_mutex_destroy failed"); +#endif /* _WIN32||_WIN64 */ +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.cpp new file mode 100644 index 0000000000..aa9982af20 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.cpp @@ -0,0 +1,1252 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "custom_scheduler.h" +#include "scheduler_utility.h" +#include "governor.h" +#include "market.h" +#include "arena.h" +#include "mailbox.h" +#include "observer_proxy.h" +#include "tbb/tbb_machine.h" + +namespace tbb { +namespace internal { + +//------------------------------------------------------------------------ +// Library initialization +//------------------------------------------------------------------------ + +/** Defined in tbb_main.cpp **/ +extern generic_scheduler* (*AllocateSchedulerPtr)( arena*, size_t index ); + +inline generic_scheduler* allocate_scheduler ( arena* a, size_t index ) { + return AllocateSchedulerPtr(a, index); +} + +#if __TBB_TASK_GROUP_CONTEXT +context_state_propagation_mutex_type the_context_state_propagation_mutex; + +uintptr_t the_context_state_propagation_epoch = 0; + +//! Context to be associated with dummy tasks of worker threads schedulers. +/** It is never used for its direct purpose, and is introduced solely for the sake + of avoiding one extra conditional branch in the end of wait_for_all method. **/ +static task_group_context the_dummy_context(task_group_context::isolated); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +void Scheduler_OneTimeInitialization ( bool itt_present ) { + AllocateSchedulerPtr = itt_present ? &custom_scheduler<DefaultSchedulerTraits>::allocate_scheduler : + &custom_scheduler<IntelSchedulerTraits>::allocate_scheduler; +#if __TBB_TASK_GROUP_CONTEXT && __TBB_TASK_PRIORITY + // There are no tasks belonging to this fake task group. So it should never + // prevent tasks from being passed to execution. + the_dummy_context.my_priority = num_priority_levels - 1; +#endif /* __TBB_TASK_GROUP_CONTEXT && __TBB_TASK_PRIORITY */ +} + +//------------------------------------------------------------------------ +// scheduler interface +//------------------------------------------------------------------------ + +// A pure virtual destructor should still have a body +// so the one for tbb::internal::scheduler::~scheduler() is provided here +scheduler::~scheduler( ) {} + +//------------------------------------------------------------------------ +// generic_scheduler +//------------------------------------------------------------------------ + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Suppress overzealous compiler warning about using 'this' in base initializer list. + #pragma warning(push) + #pragma warning(disable:4355) +#endif + +generic_scheduler::generic_scheduler( arena* a, size_t index ) + : my_stealing_threshold(0) + , my_market(NULL) + , my_random( this ) + , my_free_list(NULL) +#if __TBB_HOARD_NONLOCAL_TASKS + , my_nonlocal_free_list(NULL) +#endif + , my_dummy_task(NULL) + , my_ref_count(1) + , my_auto_initialized(false) +#if __TBB_COUNT_TASK_NODES + , my_task_node_count(0) +#endif /* __TBB_COUNT_TASK_NODES */ + , my_small_task_count(1) // Extra 1 is a guard reference + , my_return_list(NULL) +#if __TBB_TASK_GROUP_CONTEXT + , my_local_ctx_list_update(make_atomic(uintptr_t(0))) +#endif /* __TBB_TASK_GROUP_CONTEXT */ +#if __TBB_TASK_PRIORITY + , my_ref_top_priority(NULL) + , my_offloaded_tasks(NULL) + , my_offloaded_task_list_tail_link(NULL) + , my_ref_reload_epoch(NULL) + , my_local_reload_epoch(0) + , my_pool_reshuffling_pending(false) +#endif /* __TBB_TASK_PRIORITY */ +#if __TBB_TASK_GROUP_CONTEXT + , my_nonlocal_ctx_list_update(make_atomic(uintptr_t(0))) +#endif /* __TBB_TASK_GROUP_CONTEXT */ +#if __TBB_SURVIVE_THREAD_SWITCH && TBB_USE_ASSERT + , my_cilk_state(cs_none) +#endif /* __TBB_SURVIVE_THREAD_SWITCH && TBB_USE_ASSERT */ +{ + my_arena_index = index; + my_arena_slot = 0; + my_arena = a; + my_innermost_running_task = NULL; + my_dispatching_task = NULL; + my_affinity_id = 0; +#if __TBB_SCHEDULER_OBSERVER + my_last_global_observer = NULL; + my_last_local_observer = NULL; +#endif /* __TBB_SCHEDULER_OBSERVER */ + + hint_for_push = index ^ my_random.get(); // randomizer seed + my_dummy_task = &allocate_task( sizeof(task), __TBB_CONTEXT_ARG(NULL, NULL) ); +#if __TBB_TASK_GROUP_CONTEXT + my_context_list_head.my_prev = &my_context_list_head; + my_context_list_head.my_next = &my_context_list_head; + ITT_SYNC_CREATE(&my_context_list_mutex, SyncType_Scheduler, SyncObj_ContextsList); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + my_dummy_task->prefix().ref_count = 2; + ITT_SYNC_CREATE(&my_dummy_task->prefix().ref_count, SyncType_Scheduler, SyncObj_WorkerLifeCycleMgmt); + ITT_SYNC_CREATE(&my_return_list, SyncType_Scheduler, SyncObj_TaskReturnList); + assert_task_pool_valid(); +#if __TBB_SURVIVE_THREAD_SWITCH + my_cilk_unwatch_thunk.routine = NULL; +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ +} + +#if _MSC_VER && !defined(__INTEL_COMPILER) + #pragma warning(pop) +#endif // warning 4355 is back + +#if TBB_USE_ASSERT > 1 +void generic_scheduler::assert_task_pool_valid() const { + acquire_task_pool(); + task** tp = my_arena_slot->task_pool_ptr; + __TBB_ASSERT( my_arena_slot->my_task_pool_size >= min_task_pool_size, NULL ); + const size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror + const size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror + __TBB_ASSERT( H <= T, NULL ); + for ( size_t i = 0; i < H; ++i ) + __TBB_ASSERT( tp[i] == poisoned_ptr, "Task pool corrupted" ); + for ( size_t i = H; i < T; ++i ) { + __TBB_ASSERT( (uintptr_t)tp[i] + 1 > 1u, "nil or invalid task pointer in the deque" ); + __TBB_ASSERT( tp[i]->prefix().state == task::ready || + tp[i]->prefix().extra_state == es_task_proxy, "task in the deque has invalid state" ); + } + for ( size_t i = T; i < my_arena_slot->my_task_pool_size; ++i ) + __TBB_ASSERT( tp[i] == poisoned_ptr, "Task pool corrupted" ); + release_task_pool(); +} +#endif /* TBB_USE_ASSERT > 1 */ + +void generic_scheduler::init_stack_info () { + // Stacks are growing top-down. Highest address is called "stack base", + // and the lowest is "stack limit". + __TBB_ASSERT( !my_stealing_threshold, "Stealing threshold has already been calculated" ); + size_t stack_size = my_market->worker_stack_size(); +#if USE_WINTHREAD +#if defined(_MSC_VER)&&_MSC_VER<1400 && !_WIN64 + NT_TIB *pteb = (NT_TIB*)__TBB_machine_get_current_teb(); +#else + NT_TIB *pteb = (NT_TIB*)NtCurrentTeb(); +#endif + __TBB_ASSERT( &pteb < pteb->StackBase && &pteb > pteb->StackLimit, "invalid stack info in TEB" ); + __TBB_ASSERT( stack_size >0, "stack_size not initialized?" ); + // When a thread is created with the attribute STACK_SIZE_PARAM_IS_A_RESERVATION, stack limit + // in the TIB points to the committed part of the stack only. This renders the expression + // "(uintptr_t)pteb->StackBase / 2 + (uintptr_t)pteb->StackLimit / 2" virtually useless. + // Thus for worker threads we use the explicit stack size we used while creating them. + // And for master threads we rely on the following fact and assumption: + // - the default stack size of a master thread on Windows is 1M; + // - if it was explicitly set by the application it is at least as large as the size of a worker stack. + if ( is_worker() || stack_size < MByte ) + my_stealing_threshold = (uintptr_t)pteb->StackBase - stack_size / 2; + else + my_stealing_threshold = (uintptr_t)pteb->StackBase - MByte / 2; +#else /* USE_PTHREAD */ + // There is no portable way to get stack base address in Posix, so we use + // non-portable method (on all modern Linux) or the simplified approach + // based on the common sense assumptions. The most important assumption + // is that the main thread's stack size is not less than that of other threads. + // See also comment 3 at the end of this file + void *stack_base = &stack_size; +#if __TBB_ipf + void *rsb_base = __TBB_get_bsp(); +#endif +#if __linux__ + size_t np_stack_size = 0; + void *stack_limit = NULL; + pthread_attr_t np_attr_stack; +#if __bgp__ + // Workaround pthread_attr_init() before pthread_getattr_np() prevents subsequent abort() in pthread_attr_destroy() when + // freeing an erroneously invalid pointer value for cpuset (refers to the implementation of opaque type pthread_attr_t). + if( 0 == pthread_attr_init(&np_attr_stack) ) +#endif + if( 0 == pthread_getattr_np(pthread_self(), &np_attr_stack) ) { + if ( 0 == pthread_attr_getstack(&np_attr_stack, &stack_limit, &np_stack_size) ) { +#if __TBB_ipf + pthread_attr_t attr_stack; + if ( 0 == pthread_attr_init(&attr_stack) ) { + if ( 0 == pthread_attr_getstacksize(&attr_stack, &stack_size) ) { + if ( np_stack_size < stack_size ) { + // We are in a secondary thread. Use reliable data. + // IA64 stack is split into RSE backup and memory parts + rsb_base = stack_limit; + stack_size = np_stack_size/2; + // Limit of the memory part of the stack + stack_limit = (char*)stack_limit + stack_size; + } + // We are either in the main thread or this thread stack + // is bigger that that of the main one. As we cannot discern + // these cases we fall back to the default (heuristic) values. + } + pthread_attr_destroy(&attr_stack); + } + // IA64 stack is split into RSE backup and memory parts + my_rsb_stealing_threshold = (uintptr_t)((char*)rsb_base + stack_size/2); +#endif /* __TBB_ipf */ + // Size of the stack free part + stack_size = size_t((char*)stack_base - (char*)stack_limit); + } + pthread_attr_destroy(&np_attr_stack); + } +#endif /* __linux__ */ + __TBB_ASSERT( stack_size>0, "stack size must be positive" ); + my_stealing_threshold = (uintptr_t)((char*)stack_base - stack_size/2); +#endif /* USE_PTHREAD */ +} + +#if __TBB_TASK_GROUP_CONTEXT +/** The function uses synchronization scheme similar to the one in the destructor + of task_group_context augmented with interlocked state change of each context + object. The purpose of this algo is to prevent threads doing nonlocal context + destruction from accessing destroyed owner-scheduler instance still pointed to + by the context object. **/ +void generic_scheduler::cleanup_local_context_list () { + // Detach contexts remaining in the local list + bool wait_for_concurrent_destroyers_to_leave = false; + uintptr_t local_count_snapshot = my_context_state_propagation_epoch; + my_local_ctx_list_update.store<relaxed>(1); + { + // This is just a definition. Actual lock is acquired only in case of conflict. + spin_mutex::scoped_lock lock; + // Full fence prevents reordering of store to my_local_ctx_list_update with + // load from my_nonlocal_ctx_list_update. + atomic_fence(); + // Check for the conflict with concurrent destroyer or cancellation propagator + if ( my_nonlocal_ctx_list_update.load<relaxed>() || local_count_snapshot != the_context_state_propagation_epoch ) + lock.acquire(my_context_list_mutex); + // No acquire fence is necessary for loading my_context_list_head.my_next, + // as the list can be updated by this thread only. + context_list_node_t *node = my_context_list_head.my_next; + while ( node != &my_context_list_head ) { + task_group_context &ctx = __TBB_get_object_ref(task_group_context, my_node, node); + __TBB_ASSERT( ctx.my_kind != task_group_context::binding_required, "Only a context bound to a root task can be detached" ); + node = node->my_next; + __TBB_ASSERT( is_alive(ctx.my_version_and_traits), "Walked into a destroyed context while detaching contexts from the local list" ); + // On 64-bit systems my_kind can be a 32-bit value padded with 32 uninitialized bits. + // So the cast below is necessary to throw off the higher bytes containing garbage + if ( (task_group_context::kind_type)(uintptr_t)__TBB_FetchAndStoreW(&ctx.my_kind, task_group_context::detached) == task_group_context::dying ) + wait_for_concurrent_destroyers_to_leave = true; + } + } + my_local_ctx_list_update.store<release>(0); + // Wait until other threads referencing this scheduler object finish with it + if ( wait_for_concurrent_destroyers_to_leave ) + spin_wait_until_eq( my_nonlocal_ctx_list_update, 0u ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +void generic_scheduler::free_scheduler() { + __TBB_ASSERT( !my_arena_slot, NULL ); +#if __TBB_TASK_GROUP_CONTEXT + cleanup_local_context_list(); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + free_task<small_local_task>( *my_dummy_task ); + +#if __TBB_HOARD_NONLOCAL_TASKS + while( task* t = my_nonlocal_free_list ) { + task_prefix& p = t->prefix(); + my_nonlocal_free_list = p.next; + __TBB_ASSERT( p.origin && p.origin!=this, NULL ); + free_nonlocal_small_task(*t); + } +#endif + // k accounts for a guard reference and each task that we deallocate. + intptr_t k = 1; + for(;;) { + while( task* t = my_free_list ) { + my_free_list = t->prefix().next; + deallocate_task(*t); + ++k; + } + if( my_return_list==plugged_return_list() ) + break; + my_free_list = (task*)__TBB_FetchAndStoreW( &my_return_list, (intptr_t)plugged_return_list() ); + } +#if __TBB_COUNT_TASK_NODES + my_market->update_task_node_count( my_task_node_count ); +#endif /* __TBB_COUNT_TASK_NODES */ + // Update my_small_task_count last. Doing so sooner might cause another thread to free *this. + __TBB_ASSERT( my_small_task_count>=k, "my_small_task_count corrupted" ); + governor::sign_off(this); + if( __TBB_FetchAndAddW( &my_small_task_count, -k )==k ) + NFS_Free( this ); +} + +task& generic_scheduler::allocate_task( size_t number_of_bytes, + __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ) { + GATHER_STATISTIC(++my_counters.active_tasks); + task *t; + if( number_of_bytes<=quick_task_size ) { +#if __TBB_HOARD_NONLOCAL_TASKS + if( (t = my_nonlocal_free_list) ) { + GATHER_STATISTIC(--my_counters.free_list_length); + __TBB_ASSERT( t->state()==task::freed, "free list of tasks is corrupted" ); + my_nonlocal_free_list = t->prefix().next; + } else +#endif + if( (t = my_free_list) ) { + GATHER_STATISTIC(--my_counters.free_list_length); + __TBB_ASSERT( t->state()==task::freed, "free list of tasks is corrupted" ); + my_free_list = t->prefix().next; + } else if( my_return_list ) { + // No fence required for read of my_return_list above, because __TBB_FetchAndStoreW has a fence. + t = (task*)__TBB_FetchAndStoreW( &my_return_list, 0 ); // with acquire + __TBB_ASSERT( t, "another thread emptied the my_return_list" ); + __TBB_ASSERT( t->prefix().origin==this, "task returned to wrong my_return_list" ); + ITT_NOTIFY( sync_acquired, &my_return_list ); + my_free_list = t->prefix().next; + } else { + t = (task*)((char*)NFS_Allocate( task_prefix_reservation_size+quick_task_size, 1, NULL ) + task_prefix_reservation_size ); +#if __TBB_COUNT_TASK_NODES + ++my_task_node_count; +#endif /* __TBB_COUNT_TASK_NODES */ + t->prefix().origin = this; + t->prefix().next = 0; + ++my_small_task_count; + } +#if __TBB_PREFETCHING + task *t_next = t->prefix().next; + if( !t_next ) { // the task was last in the list +#if __TBB_HOARD_NONLOCAL_TASKS + if( my_free_list ) + t_next = my_free_list; + else +#endif + if( my_return_list ) // enable prefetching, gives speedup + t_next = my_free_list = (task*)__TBB_FetchAndStoreW( &my_return_list, 0 ); + } + if( t_next ) { // gives speedup for both cache lines + __TBB_cl_prefetch(t_next); + __TBB_cl_prefetch(&t_next->prefix()); + } +#endif /* __TBB_PREFETCHING */ + } else { + GATHER_STATISTIC(++my_counters.big_tasks); + t = (task*)((char*)NFS_Allocate( task_prefix_reservation_size+number_of_bytes, 1, NULL ) + task_prefix_reservation_size ); +#if __TBB_COUNT_TASK_NODES + ++my_task_node_count; +#endif /* __TBB_COUNT_TASK_NODES */ + t->prefix().origin = NULL; + } + task_prefix& p = t->prefix(); +#if __TBB_TASK_GROUP_CONTEXT + p.context = context; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + // Obsolete. But still in use, so has to be assigned correct value here. + p.owner = this; + p.ref_count = 0; + // Obsolete. Assign some not outrageously out-of-place value for a while. + p.depth = 0; + p.parent = parent; + // In TBB 2.1 and later, the constructor for task sets extra_state to indicate the version of the tbb/task.h header. + // In TBB 2.0 and earlier, the constructor leaves extra_state as zero. + p.extra_state = 0; + p.affinity = 0; + p.state = task::allocated; + return *t; +} + +void generic_scheduler::free_nonlocal_small_task( task& t ) { + __TBB_ASSERT( t.state()==task::freed, NULL ); + generic_scheduler& s = *static_cast<generic_scheduler*>(t.prefix().origin); + __TBB_ASSERT( &s!=this, NULL ); + for(;;) { + task* old = s.my_return_list; + if( old==plugged_return_list() ) + break; + // Atomically insert t at head of s.my_return_list + t.prefix().next = old; + ITT_NOTIFY( sync_releasing, &s.my_return_list ); + if( __TBB_CompareAndSwapW( &s.my_return_list, (intptr_t)&t, (intptr_t)old )==(intptr_t)old ) { +#if __TBB_PREFETCHING + __TBB_cl_evict(&t.prefix()); + __TBB_cl_evict(&t); +#endif + return; + } + } + deallocate_task(t); + if( __TBB_FetchAndDecrementWrelease( &s.my_small_task_count )==1 ) { + // We freed the last task allocated by scheduler s, so it's our responsibility + // to free the scheduler. + NFS_Free( &s ); + } +} + +size_t generic_scheduler::prepare_task_pool ( size_t num_tasks ) { + size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror + if ( T + num_tasks <= my_arena_slot->my_task_pool_size ) + return T; + acquire_task_pool(); + size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror + T -= H; + size_t new_size = T + num_tasks; + __TBB_ASSERT(!my_arena_slot->my_task_pool_size || my_arena_slot->my_task_pool_size >= min_task_pool_size, NULL); + if( !my_arena_slot->my_task_pool_size ) { + __TBB_ASSERT( !in_arena() && !my_arena_slot->task_pool_ptr, NULL ); + if( new_size < min_task_pool_size ) new_size = min_task_pool_size; + my_arena_slot->allocate_task_pool( new_size ); + } + // If the free space at the beginning of the task pool is too short, we + // are likely facing a pathological single-producer-multiple-consumers + // scenario, and thus it's better to expand the task pool + else if ( new_size <= my_arena_slot->my_task_pool_size - min_task_pool_size/4 ) { + // Relocate the busy part to the beginning of the deque + memmove( my_arena_slot->task_pool_ptr, my_arena_slot->task_pool_ptr + H, T * sizeof(task*) ); + my_arena_slot->fill_with_canary_pattern( T, my_arena_slot->tail ); + commit_relocated_tasks(T); + } + else { + // Grow task pool. As this operation is rare, and its cost is asymptotically + // amortizable, we can tolerate new task pool allocation done under the lock. + if ( new_size < 2 * my_arena_slot->my_task_pool_size ) + new_size = 2 * my_arena_slot->my_task_pool_size; + task** old_pool = my_arena_slot->task_pool_ptr; + my_arena_slot->allocate_task_pool( new_size ); // updates my_task_pool_size + __TBB_ASSERT( T <= my_arena_slot->my_task_pool_size, "new task pool is too short" ); + memcpy( my_arena_slot->task_pool_ptr, old_pool + H, T * sizeof(task*) ); + commit_relocated_tasks(T); + __TBB_ASSERT( old_pool, "attempt to free NULL TaskPool" ); + NFS_Free( old_pool ); + } + assert_task_pool_valid(); + return T; +} + +/** ATTENTION: + This method is mostly the same as generic_scheduler::lock_task_pool(), with + a little different logic of slot state checks (slot is either locked or points + to our task pool). + Thus if either of them is changed, consider changing the counterpart as well. **/ +inline void generic_scheduler::acquire_task_pool() const { + if ( !in_arena() ) + return; // we are not in arena - nothing to lock + atomic_backoff backoff; + bool sync_prepare_done = false; + for(;;) { +#if TBB_USE_ASSERT + __TBB_ASSERT( my_arena_slot == my_arena->my_slots + my_arena_index, "invalid arena slot index" ); + // Local copy of the arena slot task pool pointer is necessary for the next + // assertion to work correctly to exclude asynchronous state transition effect. + task** tp = my_arena_slot->task_pool; + __TBB_ASSERT( tp == LockedTaskPool || tp == my_arena_slot->task_pool_ptr, "slot ownership corrupt?" ); +#endif + if( my_arena_slot->task_pool != LockedTaskPool && + __TBB_CompareAndSwapW( &my_arena_slot->task_pool, (intptr_t)LockedTaskPool, + (intptr_t)my_arena_slot->task_pool_ptr ) == (intptr_t)my_arena_slot->task_pool_ptr ) + { + // We acquired our own slot + ITT_NOTIFY(sync_acquired, my_arena_slot); + break; + } + else if( !sync_prepare_done ) { + // Start waiting + ITT_NOTIFY(sync_prepare, my_arena_slot); + sync_prepare_done = true; + } + // Someone else acquired a lock, so pause and do exponential backoff. + backoff.pause(); + } + __TBB_ASSERT( my_arena_slot->task_pool == LockedTaskPool, "not really acquired task pool" ); +} // generic_scheduler::acquire_task_pool + +inline void generic_scheduler::release_task_pool() const { + if ( !in_arena() ) + return; // we are not in arena - nothing to unlock + __TBB_ASSERT( my_arena_slot, "we are not in arena" ); + __TBB_ASSERT( my_arena_slot->task_pool == LockedTaskPool, "arena slot is not locked" ); + ITT_NOTIFY(sync_releasing, my_arena_slot); + __TBB_store_with_release( my_arena_slot->task_pool, my_arena_slot->task_pool_ptr ); +} + +/** ATTENTION: + This method is mostly the same as generic_scheduler::acquire_task_pool(), + with a little different logic of slot state checks (slot can be empty, locked + or point to any task pool other than ours, and asynchronous transitions between + all these states are possible). + Thus if any of them is changed, consider changing the counterpart as well **/ +inline task** generic_scheduler::lock_task_pool( arena_slot* victim_arena_slot ) const { + task** victim_task_pool; + atomic_backoff backoff; + bool sync_prepare_done = false; + for(;;) { + victim_task_pool = victim_arena_slot->task_pool; + // NOTE: Do not use comparison of head and tail indices to check for + // the presence of work in the victim's task pool, as they may give + // incorrect indication because of task pool relocations and resizes. + if ( victim_task_pool == EmptyTaskPool ) { + // The victim thread emptied its task pool - nothing to lock + if( sync_prepare_done ) + ITT_NOTIFY(sync_cancel, victim_arena_slot); + break; + } + if( victim_task_pool != LockedTaskPool && + __TBB_CompareAndSwapW( &victim_arena_slot->task_pool, + (intptr_t)LockedTaskPool, (intptr_t)victim_task_pool ) == (intptr_t)victim_task_pool ) + { + // We've locked victim's task pool + ITT_NOTIFY(sync_acquired, victim_arena_slot); + break; + } + else if( !sync_prepare_done ) { + // Start waiting + ITT_NOTIFY(sync_prepare, victim_arena_slot); + sync_prepare_done = true; + } + GATHER_STATISTIC( ++my_counters.thieves_conflicts ); + // Someone else acquired a lock, so pause and do exponential backoff. +#if __TBB_STEALING_ABORT_ON_CONTENTION + if(!backoff.bounded_pause()) { + // the 16 was acquired empirically and a theory behind it supposes + // that number of threads becomes much bigger than number of + // tasks which can be spawned by one thread causing excessive contention. + // TODO: However even small arenas can benefit from the abort on contention + // if preemption of a thief is a problem + if(my_arena->my_limit >= 16) + return EmptyTaskPool; + __TBB_Yield(); + } +#else + backoff.pause(); +#endif + } + __TBB_ASSERT( victim_task_pool == EmptyTaskPool || + (victim_arena_slot->task_pool == LockedTaskPool && victim_task_pool != LockedTaskPool), + "not really locked victim's task pool?" ); + return victim_task_pool; +} // generic_scheduler::lock_task_pool + +inline void generic_scheduler::unlock_task_pool( arena_slot* victim_arena_slot, + task** victim_task_pool ) const { + __TBB_ASSERT( victim_arena_slot, "empty victim arena slot pointer" ); + __TBB_ASSERT( victim_arena_slot->task_pool == LockedTaskPool, "victim arena slot is not locked" ); + ITT_NOTIFY(sync_releasing, victim_arena_slot); + __TBB_store_with_release( victim_arena_slot->task_pool, victim_task_pool ); +} + + +inline task* generic_scheduler::prepare_for_spawning( task* t ) { + __TBB_ASSERT( t->state()==task::allocated, "attempt to spawn task that is not in 'allocated' state" ); + t->prefix().state = task::ready; +#if TBB_USE_ASSERT + if( task* parent = t->parent() ) { + internal::reference_count ref_count = parent->prefix().ref_count; + __TBB_ASSERT( ref_count>=0, "attempt to spawn task whose parent has a ref_count<0" ); + __TBB_ASSERT( ref_count!=0, "attempt to spawn task whose parent has a ref_count==0 (forgot to set_ref_count?)" ); + parent->prefix().extra_state |= es_ref_count_active; + } +#endif /* TBB_USE_ASSERT */ + affinity_id dst_thread = t->prefix().affinity; + __TBB_ASSERT( dst_thread == 0 || is_version_3_task(*t), + "backwards compatibility to TBB 2.0 tasks is broken" ); + if( dst_thread != 0 && dst_thread != my_affinity_id ) { + task_proxy& proxy = (task_proxy&)allocate_task( sizeof(task_proxy), + __TBB_CONTEXT_ARG(NULL, NULL) ); + // Mark as a proxy + proxy.prefix().extra_state = es_task_proxy; + proxy.outbox = &my_arena->mailbox(dst_thread); + // Mark proxy as present in both locations (sender's task pool and destination mailbox) + proxy.task_and_tag = intptr_t(t) | task_proxy::location_mask; +#if __TBB_TASK_PRIORITY + proxy.prefix().context = t->prefix().context; +#endif /* __TBB_TASK_PRIORITY */ + ITT_NOTIFY( sync_releasing, proxy.outbox ); + // Mail the proxy - after this point t may be destroyed by another thread at any moment. + proxy.outbox->push(proxy); + return &proxy; + } + return t; +} + +/** Conceptually, this method should be a member of class scheduler. + But doing so would force us to publish class scheduler in the headers. */ +void generic_scheduler::local_spawn( task& first, task*& next ) { + __TBB_ASSERT( governor::is_set(this), NULL ); + if ( &first.prefix().next == &next ) { + // Single task is being spawned + size_t T = prepare_task_pool( 1 ); + my_arena_slot->task_pool_ptr[T] = prepare_for_spawning( &first ); + commit_spawned_tasks( T + 1 ); + } + else { + // Task list is being spawned + task *arr[min_task_pool_size]; + fast_reverse_vector<task*> tasks(arr, min_task_pool_size); + task *t_next = NULL; + for( task* t = &first; ; t = t_next ) { + // If t is affinitized to another thread, it may already be executed + // and destroyed by the time prepare_for_spawning returns. + // So milk it while it is alive. + bool end = &t->prefix().next == &next; + t_next = t->prefix().next; + tasks.push_back( prepare_for_spawning(t) ); + if( end ) + break; + } + size_t num_tasks = tasks.size(); + size_t T = prepare_task_pool( num_tasks ); + tasks.copy_memory( my_arena_slot->task_pool_ptr + T ); + commit_spawned_tasks( T + num_tasks ); + } + if ( !in_arena() ) + enter_arena(); + my_arena->advertise_new_work</*Spawned=*/true>(); + assert_task_pool_valid(); +} + +void generic_scheduler::local_spawn_root_and_wait( task& first, task*& next ) { + __TBB_ASSERT( governor::is_set(this), NULL ); + __TBB_ASSERT( &first, NULL ); + auto_empty_task dummy( __TBB_CONTEXT_ARG(this, first.prefix().context) ); + internal::reference_count n = 0; + for( task* t=&first; ; t=t->prefix().next ) { + ++n; + __TBB_ASSERT( !t->prefix().parent, "not a root task, or already running" ); + t->prefix().parent = &dummy; + if( &t->prefix().next==&next ) break; +#if __TBB_TASK_GROUP_CONTEXT + __TBB_ASSERT( t->prefix().context == t->prefix().next->prefix().context, + "all the root tasks in list must share the same context"); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + } + dummy.prefix().ref_count = n+1; + if( n>1 ) + local_spawn( *first.prefix().next, next ); + local_wait_for_all( dummy, &first ); +} + +void tbb::internal::generic_scheduler::spawn( task& first, task*& next ) { + governor::local_scheduler()->local_spawn( first, next ); +} + +void tbb::internal::generic_scheduler::spawn_root_and_wait( task& first, task*& next ) { + governor::local_scheduler()->local_spawn_root_and_wait( first, next ); +} + +void tbb::internal::generic_scheduler::enqueue( task& t, void* prio ) { + generic_scheduler *s = governor::local_scheduler(); + // these redirections are due to bw-compatibility, consider reworking some day + __TBB_ASSERT( s->my_arena, "thread is not in any arena" ); + s->my_arena->enqueue_task(t, (intptr_t)prio, s->hint_for_push ); +} + +inline task* generic_scheduler::dequeue_task() { + task* result = NULL; +#if __TBB_TASK_PRIORITY + task_stream &ts = my_arena->my_task_stream[my_arena->my_top_priority]; +#else /* !__TBB_TASK_PRIORITY */ + task_stream &ts = my_arena->my_task_stream; +#endif /* !__TBB_TASK_PRIORITY */ + ts.pop(result, my_arena_slot->hint_for_pop); + if (result) + ITT_NOTIFY(sync_acquired, &ts); + return result; +} + +#if __TBB_TASK_PRIORITY +class auto_indicator : no_copy { + volatile bool& my_indicator; +public: + auto_indicator ( volatile bool& indicator ) : my_indicator(indicator) { my_indicator = true ;} + ~auto_indicator () { my_indicator = false; } +}; + +task* generic_scheduler::winnow_task_pool () { + GATHER_STATISTIC( ++my_counters.prio_winnowings ); + __TBB_ASSERT( in_arena(), NULL ); + __TBB_ASSERT( my_offloaded_tasks, "At least one task is expected to be already offloaded" ); + // To eliminate possible sinking of the store to the indicator below the subsequent + // store to my_arena_slot->tail, the stores should've either been separated + // by full fence or both use release fences. And resetting indicator should've + // been done with release fence. But since this is just an optimization, and + // the corresponding checking sequence in arena::is_out_of_work() is not atomic + // anyway, fences aren't used, so that not to penalize warmer path. + auto_indicator indicator(my_pool_reshuffling_pending); + // The purpose of the synchronization algorithm here is for the owner thread + // to avoid locking task pool most of the time. + size_t T0 = __TBB_load_relaxed(my_arena_slot->tail); + __TBB_store_relaxed( my_arena_slot->tail, __TBB_load_relaxed(my_arena_slot->head) - 1 ); + atomic_fence(); + size_t H = __TBB_load_relaxed(my_arena_slot->head); + size_t T = __TBB_load_relaxed(my_arena_slot->tail); + __TBB_ASSERT( (intptr_t)T <= (intptr_t)T0, NULL); + __TBB_ASSERT( (intptr_t)H >= (intptr_t)T || (H == T0 && T == T0), NULL ); + bool acquired = false; + if ( H == T ) { + // Either no contention with thieves during arbitration protocol execution or ... + if ( H >= T0 ) { + // ... the task pool got empty + reset_deque_and_leave_arena( /*locked=*/false ); + return NULL; + } + } + else { + // Contention with thieves detected. Now without taking lock it is impossible + // to define the current head value because of its jitter caused by continuing + // stealing attempts (the pool is not locked so far). + acquired = true; + acquire_task_pool(); + H = __TBB_load_relaxed(my_arena_slot->head); + if ( H >= T0 ) { + reset_deque_and_leave_arena( /*locked=*/true ); + return NULL; + } + } + size_t src, + dst = T0; + // Find the first task to offload. + for ( src = H; src < T0; ++src ) { + task &t = *my_arena_slot->task_pool_ptr[src]; + intptr_t p = priority(t); + if ( p < *my_ref_top_priority ) { + // Position of the first offloaded task will be the starting point + // for relocation of subsequent tasks that survive winnowing. + dst = src; + offload_task( t, p ); + break; + } + } + for ( ++src; src < T0; ++src ) { + task &t = *my_arena_slot->task_pool_ptr[src]; + intptr_t p = priority(t); + if ( p < *my_ref_top_priority ) + offload_task( t, p ); + else + my_arena_slot->task_pool_ptr[dst++] = &t; + } + __TBB_ASSERT( T0 >= dst, NULL ); + task *t = H < dst ? my_arena_slot->task_pool_ptr[--dst] : NULL; + if ( H == dst ) { + // No tasks remain the primary pool + reset_deque_and_leave_arena( acquired ); + } + else if ( acquired ) { + __TBB_ASSERT( !is_poisoned(my_arena_slot->task_pool_ptr[H]), NULL ); + __TBB_store_relaxed( my_arena_slot->tail, dst ); + release_task_pool(); + } + else { + __TBB_ASSERT( !is_poisoned(my_arena_slot->task_pool_ptr[H]), NULL ); + // Release fence is necessary to make sure possibly relocated task pointers + // become visible to potential thieves + __TBB_store_with_release( my_arena_slot->tail, dst ); + } + my_arena_slot->fill_with_canary_pattern( dst, T0 ); + assert_task_pool_valid(); + return t; +} + +task* generic_scheduler::reload_tasks ( task*& offloaded_tasks, task**& offloaded_task_list_link, intptr_t top_priority ) { + GATHER_STATISTIC( ++my_counters.prio_reloads ); + __TBB_ASSERT( !in_arena(), NULL ); + task *arr[min_task_pool_size]; + fast_reverse_vector<task*> tasks(arr, min_task_pool_size); + task **link = &offloaded_tasks; + task *t; + while ( (t = *link) ) { + task** next_ptr = &t->prefix().next_offloaded; + if ( priority(*t) >= top_priority ) { + tasks.push_back( t ); + // Note that owner is an alias of next_offloaded. Thus the following + // assignment overwrites *next_ptr + task* next = *next_ptr; + t->prefix().owner = this; + __TBB_ASSERT( t->prefix().state == task::ready || t->prefix().extra_state == es_task_proxy, NULL ); + *link = next; + } + else { + link = next_ptr; + } + } + if ( link == &offloaded_tasks ) { + offloaded_tasks = NULL; +#if TBB_USE_ASSERT + offloaded_task_list_link = NULL; +#endif /* TBB_USE_ASSERT */ + } + else { + __TBB_ASSERT( link, NULL ); + // Mark end of list + *link = NULL; + offloaded_task_list_link = link; + } + __TBB_ASSERT( link, NULL ); + size_t num_tasks = tasks.size(); + if ( num_tasks ) { + GATHER_STATISTIC( ++my_counters.prio_tasks_reloaded ); + size_t T = prepare_task_pool( num_tasks ); + tasks.copy_memory( my_arena_slot->task_pool_ptr + T ); + if ( --num_tasks ) { + commit_spawned_tasks( T += num_tasks ); + enter_arena(); + my_arena->advertise_new_work</*Spawned=*/true>(); + } + __TBB_ASSERT( T == __TBB_load_relaxed(my_arena_slot->tail), NULL ); + __TBB_ASSERT( T < my_arena_slot->my_task_pool_size, NULL ); + t = my_arena_slot->task_pool_ptr[T]; + poison_pointer(my_arena_slot->task_pool_ptr[T]); + assert_task_pool_valid(); + } + return t; +} + +task* generic_scheduler::reload_tasks () { + uintptr_t reload_epoch = *my_ref_reload_epoch; + __TBB_ASSERT( my_offloaded_tasks, NULL ); + if ( my_local_reload_epoch == reload_epoch ) + return NULL; + __TBB_ASSERT( my_offloaded_tasks, NULL ); + intptr_t top_priority = effective_reference_priority(); + __TBB_ASSERT( (uintptr_t)top_priority < (uintptr_t)num_priority_levels, NULL ); + task *t = reload_tasks( my_offloaded_tasks, my_offloaded_task_list_tail_link, top_priority ); + if ( my_offloaded_tasks && (my_arena->my_bottom_priority >= top_priority || !my_arena->my_num_workers_requested) ) { + // Safeguard against deliberately relaxed synchronization while checking + // for the presence of work in arena (so that not to impact hot paths). + // Arena may be reset to empty state when offloaded low priority tasks + // are still present. This results in both bottom and top priority bounds + // becoming 'normal', which makes offloaded low priority tasks unreachable. + // Update arena's bottom priority to accommodate them. + + // First indicate the presence of lower-priority tasks + my_market->update_arena_priority( *my_arena, priority(*my_offloaded_tasks) ); + // Then mark arena as full to unlock arena priority level adjustment + // by arena::is_out_of_work(), and ensure worker's presence + my_arena->advertise_new_work</*Spawned=*/false>(); + } + my_local_reload_epoch = reload_epoch; + return t; +} +#endif /* __TBB_TASK_PRIORITY */ + +inline task* generic_scheduler::get_task() { + __TBB_ASSERT( in_arena(), NULL ); + task* result = NULL; + size_t T = __TBB_load_relaxed(my_arena_slot->tail); // mirror +retry: + __TBB_store_relaxed(my_arena_slot->tail, --T); + atomic_fence(); + if ( (intptr_t)__TBB_load_relaxed(my_arena_slot->head) > (intptr_t)T ) { + acquire_task_pool(); + size_t H = __TBB_load_relaxed(my_arena_slot->head); // mirror + if ( (intptr_t)H <= (intptr_t)T ) { + // The thief backed off - grab the task + result = my_arena_slot->task_pool_ptr[T]; + __TBB_ASSERT( !is_poisoned(result), NULL ); + poison_pointer( my_arena_slot->task_pool_ptr[T] ); + } + else { + __TBB_ASSERT ( H == __TBB_load_relaxed(my_arena_slot->head) + && T == __TBB_load_relaxed(my_arena_slot->tail) + && H == T + 1, "victim/thief arbitration algorithm failure" ); + } + if ( (intptr_t)H < (intptr_t)T ) + release_task_pool(); + else + reset_deque_and_leave_arena( /*locked=*/true ); + } + else { + __TBB_control_consistency_helper(); // on my_arena_slot->head + result = my_arena_slot->task_pool_ptr[T]; + __TBB_ASSERT( !is_poisoned(result), NULL ); + poison_pointer( my_arena_slot->task_pool_ptr[T] ); + } + if( result && is_proxy(*result) ) { + task_proxy &tp = *(task_proxy*)result; + result = tp.extract_task<task_proxy::pool_bit>(); + if( !result ) { + // Proxy was empty, so it's our responsibility to free it + free_task<small_task>(tp); + if ( in_arena() ) + goto retry; + __TBB_ASSERT( is_quiescent_local_task_pool_reset(), NULL ); + return NULL; + } + GATHER_STATISTIC( ++my_counters.proxies_executed ); + // Following assertion should be true because TBB 2.0 tasks never specify affinity, and hence are not proxied. + __TBB_ASSERT( is_version_3_task(*result), "backwards compatibility with TBB 2.0 broken" ); + // Task affinity has changed. + my_innermost_running_task = result; + result->note_affinity(my_affinity_id); + } + __TBB_ASSERT( result || is_quiescent_local_task_pool_reset(), NULL ); + return result; +} // generic_scheduler::get_task + +task* generic_scheduler::steal_task( arena_slot& victim_slot ) { + task** victim_pool = lock_task_pool( &victim_slot ); + if ( !victim_pool ) + return NULL; + task* result = NULL; + size_t H = __TBB_load_relaxed(victim_slot.head); // mirror + const size_t H0 = H; + int skip_and_bump = 0; // +1 for skipped task and +1 for bumped head&tail +retry: + __TBB_store_relaxed( victim_slot.head, ++H ); + atomic_fence(); + if ( (intptr_t)H > (intptr_t)__TBB_load_relaxed(victim_slot.tail) ) { + // Stealing attempt failed, deque contents has not been changed by us + GATHER_STATISTIC( ++my_counters.thief_backoffs ); + __TBB_store_relaxed( victim_slot.head, /*dead: H = */ H0 ); + skip_and_bump++; // trigger that we bumped head and tail + __TBB_ASSERT ( !result, NULL ); + } + else { + __TBB_control_consistency_helper(); // on victim_slot.tail + result = victim_pool[H-1]; + __TBB_ASSERT( !is_poisoned(result), NULL ); + if( is_proxy(*result) ) { + task_proxy& tp = *static_cast<task_proxy*>(result); + // If mailed task is likely to be grabbed by its destination thread, skip it. + if ( task_proxy::is_shared(tp.task_and_tag) && tp.outbox->recipient_is_idle() ) + { + GATHER_STATISTIC( ++my_counters.proxies_bypassed ); + result = NULL; + __TBB_ASSERT( skip_and_bump < 2, NULL ); + skip_and_bump = 1; // note we skipped a task + goto retry; + } + } + __TBB_ASSERT( result, NULL ); + // emit "task was consumed" signal + ITT_NOTIFY(sync_acquired, (void*)((uintptr_t)&victim_slot+sizeof(uintptr_t))); + const size_t H1 = H0 + 1; + if ( H1 < H ) { + // Some proxies in the task pool have been bypassed. Need to close + // the hole left by the stolen task. The following variant: + // victim_pool[H-1] = victim_pool[H0]; + // is of constant time, but creates a potential for degrading stealing + // mechanism efficiency and growing owner's stack size too much because + // of moving earlier split off (and thus larger) chunks closer to owner's + // end of the deque (tail). + // So we use linear time variant that is likely to be amortized to be + // near-constant time, though, and preserves stealing efficiency premises. + // These changes in the deque must be released to the owner. + memmove( victim_pool + H1, victim_pool + H0, (H - H1) * sizeof(task*) ); + __TBB_store_with_release( victim_slot.head, /*dead: H = */ H1 ); + if ( (intptr_t)H >= (intptr_t)__TBB_load_relaxed(victim_slot.tail) ) + skip_and_bump++; // trigger that we bumped head and tail + } + poison_pointer( victim_pool[H0] ); + } + + unlock_task_pool( &victim_slot, victim_pool ); + __TBB_ASSERT( skip_and_bump <= 2, NULL ); +#if __TBB_PREFETCHING + __TBB_cl_evict(&victim_slot.head); + __TBB_cl_evict(&victim_slot.tail); +#endif + if( --skip_and_bump > 0 ) { // if both: task skipped and head&tail bumped + // Synchronize with snapshot as we bumped head and tail which can falsely trigger EMPTY state + atomic_fence(); + my_arena->advertise_new_work</*Spawned=*/true>(); + } + return result; +} + +inline task* generic_scheduler::get_mailbox_task() { + __TBB_ASSERT( my_affinity_id>0, "not in arena" ); + while ( task_proxy* const tp = my_inbox.pop() ) { + if ( task* result = tp->extract_task<task_proxy::mailbox_bit>() ) { + ITT_NOTIFY( sync_acquired, my_inbox.outbox() ); + result->prefix().extra_state |= es_task_is_stolen; + return result; + } + // We have exclusive access to the proxy, and can destroy it. + free_task<small_task>(*tp); + } + return NULL; +} + +// TODO: Rename to publish_task_pool +void generic_scheduler::enter_arena() { + __TBB_ASSERT ( my_arena, "no arena: initialization not completed?" ); + __TBB_ASSERT ( my_arena_index < my_arena->my_num_slots, "arena slot index is out-of-bound" ); + __TBB_ASSERT ( my_arena_slot == &my_arena->my_slots[my_arena_index], NULL); + __TBB_ASSERT ( my_arena_slot->task_pool == EmptyTaskPool, "someone else grabbed my arena slot?" ); + __TBB_ASSERT ( __TBB_load_relaxed(my_arena_slot->head) < __TBB_load_relaxed(my_arena_slot->tail), + "entering arena without tasks to share" ); + // Release signal on behalf of previously spawned tasks (when this thread was not in arena yet) + ITT_NOTIFY(sync_releasing, my_arena_slot); + __TBB_store_with_release( my_arena_slot->task_pool, my_arena_slot->task_pool_ptr ); +} + +void generic_scheduler::leave_arena() { + __TBB_ASSERT( in_arena(), "Not in arena" ); + // Do not reset my_arena_index. It will be used to (attempt to) re-acquire the slot next time + __TBB_ASSERT( &my_arena->my_slots[my_arena_index] == my_arena_slot, "arena slot and slot index mismatch" ); + __TBB_ASSERT ( my_arena_slot->task_pool == LockedTaskPool, "Task pool must be locked when leaving arena" ); + __TBB_ASSERT ( is_quiescent_local_task_pool_empty(), "Cannot leave arena when the task pool is not empty" ); + ITT_NOTIFY(sync_releasing, &my_arena->my_slots[my_arena_index]); + // No release fence is necessary here as this assignment precludes external + // accesses to the local task pool when becomes visible. Thus it is harmless + // if it gets hoisted above preceding local bookkeeping manipulations. + __TBB_store_relaxed( my_arena_slot->task_pool, EmptyTaskPool ); +} + +generic_scheduler* generic_scheduler::create_worker( market& m, size_t index ) { + generic_scheduler* s = allocate_scheduler( NULL, index ); // index is not a real slot in arena +#if __TBB_TASK_GROUP_CONTEXT + s->my_dummy_task->prefix().context = &the_dummy_context; + // Sync up the local cancellation state with the global one. No need for fence here. + s->my_context_state_propagation_epoch = the_context_state_propagation_epoch; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + s->my_market = &m; + s->init_stack_info(); +#if __TBB_TASK_PRIORITY + s->my_ref_top_priority = &s->my_market->my_global_top_priority; + s->my_ref_reload_epoch = &s->my_market->my_global_reload_epoch; +#endif /* __TBB_TASK_PRIORITY */ + return s; +} + +// TODO: make it a member method +generic_scheduler* generic_scheduler::create_master( arena& a ) { + generic_scheduler* s = allocate_scheduler( &a, 0 /*Master thread always occupies the first slot*/ ); + task& t = *s->my_dummy_task; + s->my_innermost_running_task = &t; + s->my_dispatching_task = &t; + t.prefix().ref_count = 1; + governor::sign_on(s); + __TBB_ASSERT( &task::self()==&t, "governor::sign_on failed?" ); +#if __TBB_TASK_GROUP_CONTEXT + // Context to be used by root tasks by default (if the user has not specified one). + // Allocation is done by NFS allocator because we cannot reuse memory allocated + // for task objects since the free list is empty at the moment. + t.prefix().context = a.my_default_ctx; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + s->my_market = a.my_market; + __TBB_ASSERT( s->my_arena_index == 0, "Master thread must occupy the first slot in its arena" ); + s->attach_mailbox(1); + s->my_arena_slot = a.my_slots + 0; + s->my_arena_slot->my_scheduler = s; +#if _WIN32|_WIN64 + __TBB_ASSERT( s->my_market, NULL ); + s->my_market->register_master( s->master_exec_resource ); +#endif /* _WIN32|_WIN64 */ + s->init_stack_info(); +#if __TBB_TASK_GROUP_CONTEXT + // Sync up the local cancellation state with the global one. No need for fence here. + s->my_context_state_propagation_epoch = the_context_state_propagation_epoch; +#endif +#if __TBB_TASK_PRIORITY + // In the current implementation master threads continue processing even when + // there are other masters with higher priority. Only TBB worker threads are + // redistributed between arenas based on the latters' priority. Thus master + // threads use arena's top priority as a reference point (in contrast to workers + // that use my_market->my_global_top_priority). + s->my_ref_top_priority = &s->my_arena->my_top_priority; + s->my_ref_reload_epoch = &s->my_arena->my_reload_epoch; +#endif /* __TBB_TASK_PRIORITY */ +#if __TBB_SCHEDULER_OBSERVER + // Process any existing observers. + __TBB_ASSERT( a.my_observers.empty(), "Just created arena cannot have any observers associated with it" ); + the_global_observer_list.notify_entry_observers( s->my_last_global_observer, /*worker=*/false ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + return s; +} + +void generic_scheduler::cleanup_worker( void* arg, bool worker ) { + generic_scheduler& s = *(generic_scheduler*)arg; + __TBB_ASSERT( !s.my_arena_slot, "cleaning up attached worker" ); +#if __TBB_SCHEDULER_OBSERVER + if ( worker ) // can be called by master for worker, do not notify master twice + the_global_observer_list.notify_exit_observers( s.my_last_global_observer, /*worker=*/true ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + s.free_scheduler(); +} + +void generic_scheduler::cleanup_master() { + generic_scheduler& s = *this; // for similarity with cleanup_worker + __TBB_ASSERT( s.my_arena_slot, NULL); +#if __TBB_SCHEDULER_OBSERVER + s.my_arena->my_observers.notify_exit_observers( s.my_last_local_observer, /*worker=*/false ); + the_global_observer_list.notify_exit_observers( s.my_last_global_observer, /*worker=*/false ); +#endif /* __TBB_SCHEDULER_OBSERVER */ + if( in_arena() ) { + acquire_task_pool(); + if ( my_arena_slot->task_pool == EmptyTaskPool || + __TBB_load_relaxed(my_arena_slot->head) >= __TBB_load_relaxed(my_arena_slot->tail) ) + { + // Local task pool is empty + leave_arena(); + } + else { + // Master's local task pool may e.g. contain proxies of affinitized tasks. + release_task_pool(); + __TBB_ASSERT ( governor::is_set(this), "TLS slot is cleared before the task pool cleanup" ); + s.local_wait_for_all( *s.my_dummy_task, NULL ); + __TBB_ASSERT( !in_arena(), NULL ); + __TBB_ASSERT ( governor::is_set(this), "Other thread reused our TLS key during the task pool cleanup" ); + } + } + __TBB_ASSERT( s.my_market, NULL ); + market *my_market = s.my_market; +#if _WIN32|_WIN64 + s.my_market->unregister_master( s.master_exec_resource ); +#endif /* _WIN32|_WIN64 */ + arena* a = s.my_arena; + __TBB_ASSERT(a->my_slots+0 == my_arena_slot, NULL); +#if __TBB_STATISTICS + *my_arena_slot->my_counters += s.my_counters; +#endif /* __TBB_STATISTICS */ +#if __TBB_TASK_PRIORITY + __TBB_ASSERT( my_arena_slot->my_scheduler, NULL ); + // Master's scheduler may be locked by a worker taking arena snapshot or by + // a thread propagating task group state change across the context tree. + while ( __TBB_CompareAndSwapW(&my_arena_slot->my_scheduler, 0, (intptr_t)this) != (intptr_t)this ) + __TBB_Yield(); + __TBB_ASSERT( !my_arena_slot->my_scheduler, NULL ); +#else /* !__TBB_TASK_PRIORITY */ + __TBB_store_with_release(my_arena_slot->my_scheduler, (generic_scheduler*)NULL); +#endif /* __TBB_TASK_PRIORITY */ + my_arena_slot = NULL; // detached from slot + s.free_scheduler(); + // Resetting arena to EMPTY state (as earlier TBB versions did) should not be + // done here (or anywhere else in the master thread to that matter) because + // after introducing arena-per-master logic and fire-and-forget tasks doing + // so can result either in arena's premature destruction (at least without + // additional costly checks in workers) or in unnecessary arena state changes + // (and ensuing workers migration). +#if __TBB_STATISTICS_EARLY_DUMP + GATHER_STATISTIC( a->dump_arena_statistics() ); +#endif + if (governor::needsWaitWorkers()) + my_market->prepare_wait_workers(); + a->on_thread_leaving</*is_master*/true>(); + if (governor::needsWaitWorkers()) + my_market->wait_workers(); +} + +} // namespace internal +} // namespace tbb + +/* + Comments: + +1. The premise of the cancellation support implementation is that cancellations are + not part of the hot path of the program execution. Therefore all changes in its + implementation in order to reduce the overhead of the cancellation control flow + should be done only in ways that do not increase overhead of the normal execution. + + In general contexts are used by all threads and their descendants are created in + different threads as well. In order to minimize impact of the cross-thread tree + maintenance (first of all because of the synchronization), the tree of contexts + is split into pieces, each of which is handled by the only thread. Such pieces + are represented as lists of contexts, members of which are contexts that were + bound to their parents in the given thread. + + The context tree maintenance and cancellation propagation algorithms is designed + in such a manner that cross-thread access to a context list will take place only + when cancellation signal is sent (by user or when an exception happens), and + synchronization is necessary only then. Thus the normal execution flow (without + exceptions and cancellation) remains free from any synchronization done on + behalf of exception handling and cancellation support. + +2. Consider parallel cancellations at the different levels of the context tree: + + Ctx1 <- Cancelled by Thread1 |- Thread2 started processing + | | + Ctx2 |- Thread1 started processing + | T1 |- Thread2 finishes and syncs up local counters + Ctx3 <- Cancelled by Thread2 | + | |- Ctx5 is bound to Ctx2 + Ctx4 | + T2 |- Thread1 reaches Ctx2 + + Thread-propagator of each cancellation increments global counter. However the thread + propagating the cancellation from the outermost context (Thread1) may be the last + to finish. Which means that the local counters may be synchronized earlier (by Thread2, + at Time1) than it propagated cancellation into Ctx2 (at time Time2). If a new context + (Ctx5) is created and bound to Ctx2 between Time1 and Time2, checking its parent only + (Ctx2) may result in cancellation request being lost. + + This issue is solved by doing the whole propagation under the lock. + + If we need more concurrency while processing parallel cancellations, we could try + the following modification of the propagation algorithm: + + advance global counter and remember it + for each thread: + scan thread's list of contexts + for each thread: + sync up its local counter only if the global counter has not been changed + + However this version of the algorithm requires more analysis and verification. + +3. There is no portable way to get stack base address in Posix, however + the modern Linux versions provide pthread_attr_np API that can be used + to obtain thread's stack size and base address. Unfortunately even this + function does not provide enough information for the main thread on IA64 + (RSE spill area and memory stack are allocated as two separate discontinuous + chunks of memory), and there is no portable way to discern the main and + the secondary threads. + Thus for MacOS and IA64 Linux we use the TBB worker stack size for all + threads and use the current stack top as the stack base. This simplified + approach is based on the following assumptions: + 1) If the default stack size is insufficient for the user app needs, + the required amount will be explicitly specified by the user at + the point of the TBB scheduler initialization (as an argument to + tbb::task_scheduler_init constructor). + 2) When a master thread initializes the scheduler, it has enough space + on its stack. Here "enough" means "at least as much as worker threads + have". + 3) If the user app strives to conserve the memory by cutting stack size, + it should do this for TBB workers too (as in the #1). +*/ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.h new file mode 100644 index 0000000000..89f08e8618 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler.h @@ -0,0 +1,685 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_scheduler_H +#define _TBB_scheduler_H + +#include "scheduler_common.h" +#include "tbb/spin_mutex.h" +#include "mailbox.h" +#include "tbb_misc.h" // for FastRandom +#include "itt_notify.h" +#include "../rml/include/rml_tbb.h" + +#if __TBB_SURVIVE_THREAD_SWITCH +#include "cilk-tbb-interop.h" +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +namespace tbb { +namespace internal { + +template<typename SchedulerTraits> class custom_scheduler; + +//------------------------------------------------------------------------ +// generic_scheduler +//------------------------------------------------------------------------ + +#if __TBB_TASK_GROUP_CONTEXT +struct scheduler_list_node_t { + scheduler_list_node_t *my_prev, + *my_next; +}; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#define EmptyTaskPool ((task**)0) +#define LockedTaskPool ((task**)~(intptr_t)0) + +#define LockedMaster ((generic_scheduler*)~(intptr_t)0) + +class governor; +class market; +class arena; + +#if __TBB_SCHEDULER_OBSERVER +class task_scheduler_observer_v3; +class observer_proxy; +#endif /* __TBB_SCHEDULER_OBSERVER */ + +struct scheduler_state { + //! Index of the arena slot the scheduler occupies now, or occupied last time. + size_t my_arena_index; + + //! Pointer to the slot in the arena we own at the moment. + arena_slot* my_arena_slot; + + //! The arena that I own (if master) or am servicing at the moment (if worker) + arena* my_arena; + + //! Innermost task whose task::execute() is running. + task* my_innermost_running_task; + + //! Task, in the context of which the current TBB dispatch loop is running. + /** Outside of or in the outermost dispatch loop (not in a nested call to + wait_for_all) it is my_dummy_task for master threads, and NULL for workers. **/ + task* my_dispatching_task; + + mail_inbox my_inbox; + + //! The mailbox id assigned to this scheduler. + /** The id is assigned upon first entry into the arena. + TODO: how are id's being garbage collected? + TODO: master thread may enter arena and leave and then reenter. + We want to give it the same affinity_id upon reentry, if practical. + */ + affinity_id my_affinity_id; + +#if __TBB_SCHEDULER_OBSERVER + //! Last observer in the global observers list processed by this scheduler + observer_proxy* my_last_global_observer; + + //! Last observer in the local observers list processed by this scheduler + observer_proxy* my_last_local_observer; +#endif /* __TBB_SCHEDULER_OBSERVER */ +}; + +//! Work stealing task scheduler. +/** None of the fields here are ever read or written by threads other than + the thread that creates the instance. + + Class generic_scheduler is an abstract base class that contains most of the scheduler, + except for tweaks specific to processors and tools (e.g. VTune). + The derived template class custom_scheduler<SchedulerTraits> fills in the tweaks. */ +class generic_scheduler: public scheduler, public ::rml::job, private scheduler_state { + friend class tbb::task; + friend class market; + friend class arena; +#if __TBB_TASK_ARENA + friend class interface6::task_arena; + friend class interface6::delegated_task; + friend class interface6::wait_task; + friend struct interface6::wait_body; +#endif //__TBB_TASK_ARENA + friend class allocate_root_proxy; + friend class governor; +#if __TBB_TASK_GROUP_CONTEXT + friend class allocate_root_with_context_proxy; + friend class tbb::task_group_context; +#endif /* __TBB_TASK_GROUP_CONTEXT */ +#if __TBB_SCHEDULER_OBSERVER + friend class task_scheduler_observer_v3; +#endif /* __TBB_SCHEDULER_OBSERVER */ + friend class scheduler; + template<typename SchedulerTraits> friend class custom_scheduler; + + //! If sizeof(task) is <=quick_task_size, it is handled on a free list instead of malloc'd. + static const size_t quick_task_size = 256-task_prefix_reservation_size; + + static bool is_version_3_task( task& t ) { + return (t.prefix().extra_state & 0x0F)>=0x1; + } + + //! Position in the call stack specifying its maximal filling when stealing is still allowed + uintptr_t my_stealing_threshold; +#if __TBB_ipf + //! Position in the RSE backup area specifying its maximal filling when stealing is still allowed + uintptr_t my_rsb_stealing_threshold; +#endif + + static const size_t null_arena_index = ~size_t(0); + + // TODO: Rename into is_task_pool_published() + inline bool in_arena () const; + + inline bool is_local_task_pool_quiescent () const; + + inline bool is_quiescent_local_task_pool_empty () const; + + inline bool is_quiescent_local_task_pool_reset () const; + + //! The market I am in + market* my_market; + + //! Random number generator used for picking a random victim from which to steal. + FastRandom my_random; + + //! Hint provided for operations with the container of starvation-resistant tasks. + /** Modified by the owner thread (during these operations). **/ + unsigned hint_for_push; //TODO: Replace by my_random? + + //! Free list of small tasks that can be reused. + task* my_free_list; + +#if __TBB_HOARD_NONLOCAL_TASKS + //! Free list of small non-local tasks that should be returned or can be reused. + task* my_nonlocal_free_list; +#endif + //! Fake root task created by slave threads. + /** The task is used as the "parent" argument to method wait_for_all. */ + task* my_dummy_task; + + //! Reference count for scheduler + /** Number of task_scheduler_init objects that point to this scheduler */ + long my_ref_count; + + inline void attach_mailbox( affinity_id id ); + + /* A couple of bools can be located here because space is otherwise just padding after my_affinity_id. */ + + //! True if *this was created by automatic TBB initialization + bool my_auto_initialized; + +#if __TBB_COUNT_TASK_NODES + //! Net number of big task objects that have been allocated but not yet freed. + intptr_t my_task_node_count; +#endif /* __TBB_COUNT_TASK_NODES */ + + //! Sets up the data necessary for the stealing limiting heuristics + void init_stack_info (); + + //! Returns true if stealing is allowed + bool can_steal () { + int anchor; + // TODO IDEA: Add performance warning? +#if __TBB_ipf + return my_stealing_threshold < (uintptr_t)&anchor && (uintptr_t)__TBB_get_bsp() < my_rsb_stealing_threshold; +#else + return my_stealing_threshold < (uintptr_t)&anchor; +#endif + } + + //! Actions common to enter_arena and try_enter_arena + void do_enter_arena(); + + //! Used by workers to enter the arena + /** Does not lock the task pool in case if arena slot has been successfully grabbed. **/ + void enter_arena(); + + //! Leave the arena + /** Leaving arena automatically releases the task pool if it is locked. **/ + void leave_arena(); + + //! Resets head and tail indices to 0, and leaves arena + /** Argument specifies whether the task pool is currently locked by the owner + (via acquire_task_pool).**/ + inline void reset_deque_and_leave_arena ( bool locked ); + + //! Locks victim's task pool, and returns pointer to it. The pointer can be NULL. + /** Garbles victim_arena_slot->task_pool for the duration of the lock. **/ + task** lock_task_pool( arena_slot* victim_arena_slot ) const; + + //! Unlocks victim's task pool + /** Restores victim_arena_slot->task_pool munged by lock_task_pool. **/ + void unlock_task_pool( arena_slot* victim_arena_slot, task** victim_task_pool ) const; + + //! Locks the local task pool + /** Garbles my_arena_slot->task_pool for the duration of the lock. Requires + correctly set my_arena_slot->task_pool_ptr. **/ + void acquire_task_pool() const; + + //! Unlocks the local task pool + /** Restores my_arena_slot->task_pool munged by acquire_task_pool. Requires + correctly set my_arena_slot->task_pool_ptr. **/ + void release_task_pool() const; + + //! Checks if t is affinitized to another thread, and if so, bundles it as proxy. + /** Returns either t or proxy containing t. **/ + task* prepare_for_spawning( task* t ); + + //! Makes newly spawned tasks visible to thieves + inline void commit_spawned_tasks( size_t new_tail ); + + //! Makes relocated tasks visible to thieves and releases the local task pool. + /** Obviously, the task pool must be locked when calling this method. **/ + inline void commit_relocated_tasks( size_t new_tail ); + + //! Get a task from the local pool. + /** Called only by the pool owner. + Returns the pointer to the task or NULL if the pool is empty. + In the latter case compacts the pool. **/ + task* get_task(); + + //! Attempt to get a task from the mailbox. + /** Gets a task only if it has not been executed by its sender or a thief + that has stolen it from the sender's task pool. Otherwise returns NULL. + + This method is intended to be used only by the thread extracting the proxy + from its mailbox. (In contrast to local task pool, mailbox can be read only + by its owner). **/ + task* get_mailbox_task(); + + //! True if t is a task_proxy + static bool is_proxy( const task& t ) { + return t.prefix().extra_state==es_task_proxy; + } + + //! Get a task from the starvation-resistant task stream of the current arena. + /** Returns the pointer to the task, or NULL if the attempt was unsuccessful. + The latter case does not mean that the stream is drained, however. **/ + task* dequeue_task(); + + //! Steal task from another scheduler's ready pool. + task* steal_task( arena_slot& victim_arena_slot ); + + /** Initial size of the task deque sufficient to serve without reallocation + 4 nested parallel_for calls with iteration space of 65535 grains each. **/ + static const size_t min_task_pool_size = 64; + + //! Makes sure that the task pool can accommodate at least n more elements + /** If necessary relocates existing task pointers or grows the ready task deque. + Returns (possible updated) tail index (not accounting for n). **/ + size_t prepare_task_pool( size_t n ); + + //! Initialize a scheduler for a master thread. + static generic_scheduler* create_master( arena& a ); + + //! Perform necessary cleanup when a master thread stops using TBB. + void cleanup_master(); + + //! Initialize a scheduler for a worker thread. + static generic_scheduler* create_worker( market& m, size_t index ); + + //! Perform necessary cleanup when a worker thread finishes. + static void cleanup_worker( void* arg, bool worker ); + +protected: + generic_scheduler( arena*, size_t index ); + +#if TBB_USE_ASSERT > 1 + //! Check that internal data structures are in consistent state. + /** Raises __TBB_ASSERT failure if inconsistency is found. */ + void assert_task_pool_valid () const; +#else + void assert_task_pool_valid() const {} +#endif /* TBB_USE_ASSERT <= 1 */ + +public: +#if __TBB_TASK_ARENA + template<typename Body> + void nested_arena_execute(arena*, task*, bool, Body&); +#endif + + /*override*/ + void spawn( task& first, task*& next ); + + /*override*/ + void spawn_root_and_wait( task& first, task*& next ); + + /*override*/ + void enqueue( task&, void* reserved ); + + void local_spawn( task& first, task*& next ); + void local_spawn_root_and_wait( task& first, task*& next ); + virtual void local_wait_for_all( task& parent, task* child ) = 0; + + //! Destroy and deallocate this scheduler object + void free_scheduler(); + + //! Allocate task object, either from the heap or a free list. + /** Returns uninitialized task object with initialized prefix. */ + task& allocate_task( size_t number_of_bytes, + __TBB_CONTEXT_ARG(task* parent, task_group_context* context) ); + + //! Put task on free list. + /** Does not call destructor. */ + template<free_task_hint h> + void free_task( task& t ); + + //! Return task object to the memory allocator. + inline void deallocate_task( task& t ); + + //! True if running on a worker thread, false otherwise. + inline bool is_worker(); + + //! True if the scheduler is on the outermost dispatch level in a master thread. + /** Returns true when this scheduler instance is associated with an application + thread, and is not executing any TBB task. This includes being in a TBB + dispatch loop (one of wait_for_all methods) invoked directly from that thread. **/ + inline bool master_outermost_level () const; + + //! True if the scheduler is on the outermost dispatch level in a worker thread. + inline bool worker_outermost_level () const; + +#if __TBB_TASK_GROUP_CONTEXT + //! Returns task group context used by this scheduler instance. + /** This context is associated with root tasks created by a master thread + without explicitly specified context object outside of any running task. + + Note that the default context of a worker thread is never accessed by + user code (directly or indirectly). **/ + inline task_group_context* default_context (); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + + //! Returns number of worker threads in the arena this thread belongs to. + unsigned number_of_workers_in_my_arena(); + +#if __TBB_COUNT_TASK_NODES + intptr_t get_task_node_count( bool count_arena_workers = false ); +#endif /* __TBB_COUNT_TASK_NODES */ + + //! Special value used to mark my_return_list as not taking any more entries. + static task* plugged_return_list() {return (task*)(intptr_t)(-1);} + + //! Number of small tasks that have been allocated by this scheduler. + intptr_t my_small_task_count; + + //! List of small tasks that have been returned to this scheduler by other schedulers. + task* my_return_list; + + //! Try getting a task from other threads (via mailbox, stealing, FIFO queue, orphans adoption). + /** Returns obtained task or NULL if all attempts fail. */ + virtual task* receive_or_steal_task( __TBB_atomic reference_count& completion_ref_count, + bool return_if_no_work ) = 0; + + //! Free a small task t that that was allocated by a different scheduler + void free_nonlocal_small_task( task& t ); + +#if __TBB_TASK_GROUP_CONTEXT + //! Padding isolating thread-local members from members that can be written to by other threads. + char _padding1[NFS_MaxLineSize - sizeof(context_list_node_t)]; + + //! Head of the thread specific list of task group contexts. + context_list_node_t my_context_list_head; + + //! Mutex protecting access to the list of task group contexts. + // TODO: check whether it can be deadly preempted and replace by spinning/sleeping mutex + spin_mutex my_context_list_mutex; + + //! Last state propagation epoch known to this thread + /** Together with the_context_state_propagation_epoch constitute synchronization protocol + that keeps hot path of task group context construction destruction mostly + lock-free. + When local epoch equals the global one, the state of task group contexts + registered with this thread is consistent with that of the task group trees + they belong to. **/ + uintptr_t my_context_state_propagation_epoch; + + //! Flag indicating that a context is being destructed by its owner thread + /** Together with my_nonlocal_ctx_list_update constitute synchronization protocol + that keeps hot path of context destruction (by the owner thread) mostly + lock-free. **/ + tbb::atomic<uintptr_t> my_local_ctx_list_update; + +#if __TBB_TASK_PRIORITY + //! Returns reference priority used to decide whether a task should be offloaded. + inline intptr_t effective_reference_priority () const; + + //! Latest known highest priority of tasks in the market or arena. + /** Master threads currently tracks only tasks in their arenas, while workers + take into account global top priority (among all arenas in the market). **/ + volatile intptr_t *my_ref_top_priority; + + // TODO: move into slots and fix is_out_of_work + //! Task pool for offloading tasks with priorities lower than the current top priority. + task* my_offloaded_tasks; + + //! Points to the last offloaded task in the my_offloaded_tasks list. + task** my_offloaded_task_list_tail_link; + + //! Pointer to market's (for workers) or current arena's (for the master) reload epoch counter. + volatile uintptr_t *my_ref_reload_epoch; + + //! Indicator of how recently the offload area was checked for the presence of top priority tasks. + uintptr_t my_local_reload_epoch; + + //! Indicates that the pool is likely non-empty even if appears so from outside + volatile bool my_pool_reshuffling_pending; + + //! Searches offload area for top priority tasks and reloads found ones into primary task pool. + /** Returns one of the found tasks or NULL. **/ + task* reload_tasks (); + + task* reload_tasks ( task*& offloaded_tasks, task**& offloaded_task_list_link, intptr_t top_priority ); + + //! Moves tasks with priority below the top one from primary task pool into offload area. + /** Returns the next execution candidate task or NULL. **/ + task* winnow_task_pool (); + + //! Unconditionally moves the task into offload area. + inline void offload_task ( task& t, intptr_t task_priority ); +#endif /* __TBB_TASK_PRIORITY */ + + //! Detaches abandoned contexts + /** These contexts must be destroyed by other threads. **/ + void cleanup_local_context_list (); + + //! Finds all contexts registered by this scheduler affected by the state change + //! and propagates the new state to them. + template <typename T> + void propagate_task_group_state ( T task_group_context::*mptr_state, T new_state ); +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#if _WIN32||_WIN64 +private: + //! Handle returned by RML when registering a master with RML + ::rml::server::execution_resource_t master_exec_resource; +#endif /* _WIN32||_WIN64 */ + +#if __TBB_TASK_GROUP_CONTEXT + //! Flag indicating that a context is being destructed by non-owner thread. + /** See also my_local_ctx_list_update. **/ + tbb::atomic<uintptr_t> my_nonlocal_ctx_list_update; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +#if __TBB_SURVIVE_THREAD_SWITCH + __cilk_tbb_unwatch_thunk my_cilk_unwatch_thunk; +#if TBB_USE_ASSERT + //! State values used to check interface contract with cilkrts. + /** Names of cs_running...cs_freed derived from state machine diagram in cilk-tbb-interop.h */ + enum cilk_state_t { + cs_none=0xF000, // Start at nonzero value so that we can detect use of zeroed memory. + cs_running, + cs_limbo, + cs_freed + }; + cilk_state_t my_cilk_state; +#endif /* TBB_USE_ASSERT */ +#endif /* __TBB_SURVIVE_THREAD_SWITCH */ + +#if __TBB_STATISTICS + //! Set of counters to track internal statistics on per thread basis + /** Placed at the end of the class definition to minimize the disturbance of + the core logic memory operations. **/ + mutable statistics_counters my_counters; +#endif /* __TBB_STATISTICS */ + +}; // class generic_scheduler + + +} // namespace internal +} // namespace tbb + +#include "arena.h" +#include "governor.h" + +namespace tbb { +namespace internal { + +inline bool generic_scheduler::in_arena () const { + __TBB_ASSERT(my_arena_slot, 0); + return my_arena_slot->task_pool != EmptyTaskPool; +} + +inline bool generic_scheduler::is_local_task_pool_quiescent () const { + __TBB_ASSERT(my_arena_slot, 0); + task** tp = my_arena_slot->task_pool; + return tp == EmptyTaskPool || tp == LockedTaskPool; +} + +inline bool generic_scheduler::is_quiescent_local_task_pool_empty () const { + __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool is not quiescent" ); + return __TBB_load_relaxed(my_arena_slot->head) == __TBB_load_relaxed(my_arena_slot->tail); +} + +inline bool generic_scheduler::is_quiescent_local_task_pool_reset () const { + __TBB_ASSERT( is_local_task_pool_quiescent(), "Task pool is not quiescent" ); + return __TBB_load_relaxed(my_arena_slot->head) == 0 && __TBB_load_relaxed(my_arena_slot->tail) == 0; +} + +inline bool generic_scheduler::master_outermost_level () const { + return my_dispatching_task == my_dummy_task; +} + +inline bool generic_scheduler::worker_outermost_level () const { + return !my_dispatching_task; +} + +#if __TBB_TASK_GROUP_CONTEXT +inline task_group_context* generic_scheduler::default_context () { + return my_dummy_task->prefix().context; +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +inline void generic_scheduler::attach_mailbox( affinity_id id ) { + __TBB_ASSERT(id>0,NULL); + my_inbox.attach( my_arena->mailbox(id) ); + my_affinity_id = id; +} + +inline bool generic_scheduler::is_worker() { + return my_arena_index != 0; //TODO: rework for multiple master +} + +inline unsigned generic_scheduler::number_of_workers_in_my_arena() { + return my_arena->my_max_num_workers; +} + +//! Return task object to the memory allocator. +inline void generic_scheduler::deallocate_task( task& t ) { +#if TBB_USE_ASSERT + task_prefix& p = t.prefix(); + p.state = 0xFF; + p.extra_state = 0xFF; + poison_pointer(p.next); +#endif /* TBB_USE_ASSERT */ + NFS_Free((char*)&t-task_prefix_reservation_size); +#if __TBB_COUNT_TASK_NODES + --my_task_node_count; +#endif /* __TBB_COUNT_TASK_NODES */ +} + +#if __TBB_COUNT_TASK_NODES +inline intptr_t generic_scheduler::get_task_node_count( bool count_arena_workers ) { + return my_task_node_count + (count_arena_workers? my_arena->workers_task_node_count(): 0); +} +#endif /* __TBB_COUNT_TASK_NODES */ + +inline void generic_scheduler::reset_deque_and_leave_arena ( bool locked ) { + if ( !locked ) + acquire_task_pool(); + __TBB_store_relaxed( my_arena_slot->tail, 0 ); + __TBB_store_relaxed( my_arena_slot->head, 0 ); + leave_arena(); +} + +//TODO: move to arena_slot +inline void generic_scheduler::commit_spawned_tasks( size_t new_tail ) { + __TBB_ASSERT ( new_tail <= my_arena_slot->my_task_pool_size, "task deque end was overwritten" ); + // emit "task was released" signal + ITT_NOTIFY(sync_releasing, (void*)((uintptr_t)my_arena_slot+sizeof(uintptr_t))); + // Release fence is necessary to make sure that previously stored task pointers + // are visible to thieves. + __TBB_store_with_release( my_arena_slot->tail, new_tail ); +} + +void generic_scheduler::commit_relocated_tasks ( size_t new_tail ) { + __TBB_ASSERT( is_local_task_pool_quiescent(), + "Task pool must be locked when calling commit_relocated_tasks()" ); + __TBB_store_relaxed( my_arena_slot->head, 0 ); + // Tail is updated last to minimize probability of a thread making arena + // snapshot being misguided into thinking that this task pool is empty. + __TBB_store_relaxed( my_arena_slot->tail, new_tail ); + release_task_pool(); +} + +template<free_task_hint hint> +void generic_scheduler::free_task( task& t ) { +#if __TBB_HOARD_NONLOCAL_TASKS + // TODO: remove the whole free_task_hint stuff when enabled permanently + static const free_task_hint h = no_hint; +#else + static const free_task_hint h = hint; +#endif + GATHER_STATISTIC(--my_counters.active_tasks); + task_prefix& p = t.prefix(); + // Verify that optimization hints are correct. + __TBB_ASSERT( h!=small_local_task || p.origin==this, NULL ); + __TBB_ASSERT( !(h&small_task) || p.origin, NULL ); + poison_value(p.depth); + poison_value(p.ref_count); + poison_pointer(p.owner); + __TBB_ASSERT( 1L<<t.state() & (1L<<task::executing|1L<<task::allocated), NULL ); + p.state = task::freed; + if( h==small_local_task || p.origin==this ) { + GATHER_STATISTIC(++my_counters.free_list_length); + p.next = my_free_list; + my_free_list = &t; + } else if( p.origin && uintptr_t(p.origin) < uintptr_t(4096) ) { + // a special value reserved for future use, do nothing since + // origin is not pointing to a scheduler instance + } else if( !(h&local_task) && p.origin ) { + GATHER_STATISTIC(++my_counters.free_list_length); +#if __TBB_HOARD_NONLOCAL_TASKS + p.next = my_nonlocal_free_list; + my_nonlocal_free_list = &t; +#else + free_nonlocal_small_task(t); +#endif + } else { + GATHER_STATISTIC(--my_counters.big_tasks); + deallocate_task(t); + } +} + +#if __TBB_TASK_PRIORITY +inline intptr_t generic_scheduler::effective_reference_priority () const { + // Workers on the outermost dispatch level (i.e. with empty stack) use market's + // priority as a reference point (to speedup discovering process level priority + // changes). But when there are enough workers to service (even if only partially) + // a lower priority arena, they should use arena's priority as a reference, lest + // be trapped in a futile spinning (because market's priority would prohibit + // executing ANY tasks in this arena). + return !worker_outermost_level() || + my_arena->my_num_workers_allotted < my_arena->num_workers_active() + ? *my_ref_top_priority : my_arena->my_top_priority; +} + +inline void generic_scheduler::offload_task ( task& t, intptr_t /*priority*/ ) { + GATHER_STATISTIC( ++my_counters.prio_tasks_offloaded ); + __TBB_ASSERT( my_offloaded_task_list_tail_link && !*my_offloaded_task_list_tail_link, NULL ); +#if TBB_USE_ASSERT + t.prefix().state = task::ready; +#endif /* TBB_USE_ASSERT */ + t.prefix().next_offloaded = my_offloaded_tasks; + my_offloaded_tasks = &t; +} +#endif /* __TBB_TASK_PRIORITY */ + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_scheduler_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_common.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_common.h new file mode 100644 index 0000000000..65752bd3ac --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_common.h @@ -0,0 +1,347 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_scheduler_common_H +#define _TBB_scheduler_common_H + +#include "tbb/tbb_stddef.h" +#include "tbb/cache_aligned_allocator.h" + +#include <string.h> // for memset, memcpy, memmove + +#include "tbb_statistics.h" + +#if TBB_USE_ASSERT > 1 +#include <stdio.h> +#endif /* TBB_USE_ASSERT > 1 */ + +/* Temporarily change "private" to "public" while including "tbb/task.h". + This hack allows us to avoid publishing internal types and methods + in the public header files just for sake of friend declarations. */ +#ifndef private + #define private public + #define undef_private +#endif + +#include "tbb/task.h" +#include "tbb/tbb_exception.h" +#if __TBB_TASK_ARENA +#include "tbb/task_arena.h" // for sake of private friends club :( of class arena ): +#endif //__TBB_TASK_ARENA + +#ifdef undef_private + #undef private +#endif + +#ifndef __TBB_SCHEDULER_MUTEX_TYPE +#define __TBB_SCHEDULER_MUTEX_TYPE tbb::spin_mutex +#endif +// TODO: add conditional inclusion based on specified type +#include "tbb/spin_mutex.h" + +// This macro is an attempt to get rid of ugly ifdefs in the shared parts of the code. +// It drops the second argument depending on whether the controlling macro is defined. +// The first argument is just a convenience allowing to keep comma before the macro usage. +#if __TBB_TASK_GROUP_CONTEXT + #define __TBB_CONTEXT_ARG(arg1, context) arg1, context +#else /* !__TBB_TASK_GROUP_CONTEXT */ + #define __TBB_CONTEXT_ARG(arg1, context) arg1 +#endif /* !__TBB_TASK_GROUP_CONTEXT */ + +#if DO_TBB_TRACE +#include <cstdio> +#define TBB_TRACE(x) ((void)std::printf x) +#else +#define TBB_TRACE(x) ((void)(0)) +#endif /* DO_TBB_TRACE */ + +#if _MSC_VER && !defined(__INTEL_COMPILER) + // Workaround for overzealous compiler warnings + // These particular warnings are so ubiquitous that no attempt is made to narrow + // the scope of the warnings. + #pragma warning (disable: 4100 4127 4312 4244 4267 4706) +#endif + +namespace tbb { +#if __TBB_TASK_ARENA +namespace interface6 { +class delegated_task; +class wait_task; +struct wait_body; +} +#endif //__TBB_TASK_ARENA +namespace internal { + +class generic_scheduler; + +#if __TBB_TASK_PRIORITY +static const intptr_t num_priority_levels = 3; +static const intptr_t normalized_normal_priority = (num_priority_levels - 1) / 2; + +inline intptr_t normalize_priority ( priority_t p ) { + return intptr_t(p - priority_low) / priority_stride_v4; +} + +static const priority_t priority_from_normalized_rep[num_priority_levels] = { + priority_low, priority_normal, priority_high +}; + +inline void assert_priority_valid ( intptr_t& p ) { + __TBB_ASSERT_EX( p >= 0 && p < num_priority_levels, NULL ); +} + +inline intptr_t& priority ( task& t ) { + return t.prefix().context->my_priority; +} +#endif /* __TBB_TASK_PRIORITY */ + +//! Mutex type for global locks in the scheduler +typedef __TBB_SCHEDULER_MUTEX_TYPE scheduler_mutex_type; + +#if __TBB_TASK_GROUP_CONTEXT +//! Task group state change propagation global epoch +/** Together with generic_scheduler::my_context_state_propagation_epoch forms + cross-thread signaling mechanism that allows to avoid locking at the hot path + of normal execution flow. + + When a descendant task group context is registered or unregistered, the global + and local epochs are compared. If they differ, a state change is being propagated, + and thus registration/deregistration routines take slower branch that may block + (at most one thread of the pool can be blocked at any moment). Otherwise the + control path is lock-free and fast. **/ +extern uintptr_t the_context_state_propagation_epoch; + +//! Mutex guarding state change propagation across task groups forest. +/** Also protects modification of related data structures. **/ +typedef scheduler_mutex_type context_state_propagation_mutex_type; +extern context_state_propagation_mutex_type the_context_state_propagation_mutex; +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//! Alignment for a task object +const size_t task_alignment = 32; + +//! Number of bytes reserved for a task prefix +/** If not exactly sizeof(task_prefix), the extra bytes *precede* the task_prefix. */ +const size_t task_prefix_reservation_size = ((sizeof(internal::task_prefix)-1)/task_alignment+1)*task_alignment; + +//! Definitions for bits in task_prefix::extra_state +enum task_extra_state { + //! Tag for v1 tasks (i.e. tasks in TBB 1.0 and 2.0) + es_version_1_task = 0, + //! Tag for v3 tasks (i.e. tasks in TBB 2.1-2.2) + es_version_3_task = 1, + //! Tag for enqueued tasks + es_task_enqueued = 0x10, + //! Tag for v3 task_proxy. + es_task_proxy = 0x20, + //! Set if ref_count might be changed by another thread. Used for debugging. + es_ref_count_active = 0x40, + //! Set if the task has been stolen + es_task_is_stolen = 0x80 +}; + +inline void reset_extra_state ( task *t ) { + t->prefix().extra_state &= ~(es_task_is_stolen | es_task_enqueued); +} + +//! Optimization hint to free_task that enables it omit unnecessary tests and code. +enum free_task_hint { + //! No hint + no_hint=0, + //! Task is known to have been allocated by this scheduler + local_task=1, + //! Task is known to be a small task. + /** Task should be returned to the free list of *some* scheduler, possibly not this scheduler. */ + small_task=2, + //! Bitwise-OR of local_task and small_task. + /** Task should be returned to free list of this scheduler. */ + small_local_task=3 +}; + +//------------------------------------------------------------------------ +// Debugging support +//------------------------------------------------------------------------ + +#if TBB_USE_ASSERT + +static const uintptr_t venom = tbb::internal::select_size_t_constant<0xDEADBEEFU,0xDDEEAADDDEADBEEFULL>::value; + +template <typename T> +void poison_value ( T& val ) { val = * punned_cast<T*>(&venom); } + +/** Expected to be used in assertions only, thus no empty form is defined. **/ +inline bool is_alive( uintptr_t v ) { return v != venom; } + +/** Logically, this method should be a member of class task. + But we do not want to publish it, so it is here instead. */ +inline void assert_task_valid( const task& task ) { + __TBB_ASSERT( &task!=NULL, NULL ); + __TBB_ASSERT( !is_poisoned(&task), NULL ); + __TBB_ASSERT( (uintptr_t)&task % task_alignment == 0, "misaligned task" ); +#if __TBB_RECYCLE_TO_ENQUEUE + __TBB_ASSERT( (unsigned)task.state()<=(unsigned)task::to_enqueue, "corrupt task (invalid state)" ); +#else + __TBB_ASSERT( (unsigned)task.state()<=(unsigned)task::recycle, "corrupt task (invalid state)" ); +#endif +} + +#else /* !TBB_USE_ASSERT */ + +/** In contrast to debug version poison_value() is a macro here because + the variable used as its argument may be undefined in release builds. **/ +#define poison_value(g) ((void)0) + +inline void assert_task_valid( const task& ) {} + +#endif /* !TBB_USE_ASSERT */ + +//------------------------------------------------------------------------ +// Helpers +//------------------------------------------------------------------------ + +#if __TBB_TASK_GROUP_CONTEXT +inline bool ConcurrentWaitsEnabled ( task& t ) { + return (t.prefix().context->my_version_and_traits & task_group_context::concurrent_wait) != 0; +} + +inline bool CancellationInfoPresent ( task& t ) { + return t.prefix().context->my_cancellation_requested != 0; +} + +#if TBB_USE_CAPTURED_EXCEPTION + inline tbb_exception* TbbCurrentException( task_group_context*, tbb_exception* src) { return src->move(); } + inline tbb_exception* TbbCurrentException( task_group_context*, captured_exception* src) { return src; } +#else + // Using macro instead of an inline function here allows to avoid evaluation of the + // TbbCapturedException expression when exact propagation is enabled for the context. + #define TbbCurrentException(context, TbbCapturedException) \ + context->my_version_and_traits & task_group_context::exact_exception \ + ? tbb_exception_ptr::allocate() \ + : tbb_exception_ptr::allocate( *(TbbCapturedException) ); +#endif /* !TBB_USE_CAPTURED_EXCEPTION */ + +#define TbbRegisterCurrentException(context, TbbCapturedException) \ + if ( context->cancel_group_execution() ) { \ + /* We are the first to signal cancellation, so store the exception that caused it. */ \ + context->my_exception = TbbCurrentException( context, TbbCapturedException ); \ + } + +#define TbbCatchAll(context) \ + catch ( tbb_exception& exc ) { \ + TbbRegisterCurrentException( context, &exc ); \ + } catch ( std::exception& exc ) { \ + TbbRegisterCurrentException( context, captured_exception::allocate(typeid(exc).name(), exc.what()) ); \ + } catch ( ... ) { \ + TbbRegisterCurrentException( context, captured_exception::allocate("...", "Unidentified exception") );\ + } + +#else /* !__TBB_TASK_GROUP_CONTEXT */ + +inline bool ConcurrentWaitsEnabled ( task& t ) { return false; } + +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//------------------------------------------------------------------------ +// arena_slot +//------------------------------------------------------------------------ +struct arena_slot_line1 { + //! Scheduler of the thread attached to the slot + /** Marks the slot as busy, and is used to iterate through the schedulers belonging to this arena **/ + generic_scheduler* my_scheduler; + + // Synchronization of access to Task pool + /** Also is used to specify if the slot is empty or locked: + 0 - empty + -1 - locked **/ + task* *__TBB_atomic task_pool; + + //! Index of the first ready task in the deque. + /** Modified by thieves, and by the owner during compaction/reallocation **/ + __TBB_atomic size_t head; +}; + +struct arena_slot_line2 { + //! Hint provided for operations with the container of starvation-resistant tasks. + /** Modified by the owner thread (during these operations). **/ + unsigned hint_for_pop; + + //! Index of the element following the last ready task in the deque. + /** Modified by the owner thread. **/ + __TBB_atomic size_t tail; + + //! Capacity of the primary task pool (number of elements - pointers to task). + size_t my_task_pool_size; + + // Task pool of the scheduler that owns this slot + task* *__TBB_atomic task_pool_ptr; + +#if __TBB_STATISTICS + //! Set of counters to accumulate internal statistics related to this arena + statistics_counters *my_counters; +#endif /* __TBB_STATISTICS */ +}; + +struct arena_slot : padded<arena_slot_line1>, padded<arena_slot_line2> { +#if TBB_USE_ASSERT + void fill_with_canary_pattern ( size_t first, size_t last ) { + for ( size_t i = first; i < last; ++i ) + poison_pointer(task_pool_ptr[i]); + } +#else + void fill_with_canary_pattern ( size_t, size_t ) {} +#endif /* TBB_USE_ASSERT */ + + void allocate_task_pool( size_t n ) { + size_t byte_size = ((n * sizeof(task*) + NFS_MaxLineSize - 1) / NFS_MaxLineSize) * NFS_MaxLineSize; + my_task_pool_size = byte_size / sizeof(task*); + task_pool_ptr = (task**)NFS_Allocate( byte_size, 1, NULL ); + // No need to clear the fresh deque since valid items are designated by the head and tail members. + // But fill it with a canary pattern in the high vigilance debug mode. + fill_with_canary_pattern( 0, my_task_pool_size ); + } + + //! Deallocate task pool that was allocated by means of allocate_task_pool. + void free_task_pool( ) { +#if !__TBB_TASK_ARENA + __TBB_ASSERT( !task_pool /*TODO: == EmptyTaskPool*/, NULL); +#else + //TODO: understand the assertion and modify +#endif + if( task_pool_ptr ) { + __TBB_ASSERT( my_task_pool_size, NULL); + NFS_Free( task_pool_ptr ); + task_pool_ptr = NULL; + my_task_pool_size = 0; + } + } +}; + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_scheduler_common_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_utility.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_utility.h new file mode 100644 index 0000000000..2a26ac6484 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/scheduler_utility.h @@ -0,0 +1,141 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_scheduler_utility_H +#define _TBB_scheduler_utility_H + +#include "scheduler.h" + +namespace tbb { +namespace internal { + +//------------------------------------------------------------------------ +// auto_empty_task +//------------------------------------------------------------------------ + +//! Smart holder for the empty task class with automatic destruction +class auto_empty_task { + task* my_task; + generic_scheduler* my_scheduler; +public: + auto_empty_task ( __TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context* context) ) + : my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_CONTEXT_ARG(NULL, context))) empty_task ) + , my_scheduler(s) + {} + // empty_task has trivial destructor, so there's no need to call it. + ~auto_empty_task () { my_scheduler->free_task<small_local_task>(*my_task); } + + operator task& () { return *my_task; } + task* operator & () { return my_task; } + task_prefix& prefix () { return my_task->prefix(); } +}; // class auto_empty_task + +//------------------------------------------------------------------------ +// fast_reverse_vector +//------------------------------------------------------------------------ + +//! Vector that grows without reallocations, and stores items in the reverse order. +/** Requires to initialize its first segment with a preallocated memory chunk + (usually it is static array or an array allocated on the stack). + The second template parameter specifies maximal number of segments. Each next + segment is twice as large as the previous one. **/ +template<typename T, size_t max_segments = 16> +class fast_reverse_vector +{ +public: + fast_reverse_vector ( T* initial_segment, size_t segment_size ) + : m_cur_segment(initial_segment) + , m_cur_segment_size(segment_size) + , m_pos(segment_size) + , m_num_segments(0) + , m_size(0) + { + __TBB_ASSERT ( initial_segment && segment_size, "Nonempty initial segment must be supplied"); + } + + ~fast_reverse_vector () + { + for ( size_t i = 1; i < m_num_segments; ++i ) + NFS_Free( m_segments[i] ); + } + + size_t size () const { return m_size + m_cur_segment_size - m_pos; } + + void push_back ( const T& val ) + { + if ( !m_pos ) { + if ( !m_num_segments ) m_segments[m_num_segments++] = m_cur_segment; + m_size += m_cur_segment_size; + m_cur_segment_size *= 2; + m_pos = m_cur_segment_size; + m_segments[m_num_segments++] = m_cur_segment = (T*)NFS_Allocate( m_cur_segment_size * sizeof(T), 1, NULL ); + __TBB_ASSERT ( m_num_segments < max_segments, "Maximal capacity exceeded" ); + } + m_cur_segment[--m_pos] = val; + } + + //! Copies the contents of the vector into the dst array. + /** Can only be used when T is a POD type, as copying does not invoke copy constructors. **/ + void copy_memory ( T* dst ) const + { + size_t sz = m_cur_segment_size - m_pos; + memcpy( dst, m_cur_segment + m_pos, sz * sizeof(T) ); + dst += sz; + sz = m_cur_segment_size / 2; + for ( long i = (long)m_num_segments - 2; i >= 0; --i ) { + memcpy( dst, m_segments[i], sz * sizeof(T) ); + dst += sz; + sz /= 2; + } + } + +protected: + //! The current (not completely filled) segment + T *m_cur_segment; + + //! Capacity of m_cur_segment + size_t m_cur_segment_size; + + //! Insertion position in m_cur_segment + size_t m_pos; + + //! Array of segments (has fixed size specified by the second template parameter) + T *m_segments[max_segments]; + + //! Number of segments (the size of m_segments) + size_t m_num_segments; + + //! Number of items in the segments in m_segments + size_t m_size; + +}; // class fast_reverse_vector + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_scheduler_utility_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.cpp new file mode 100644 index 0000000000..3490c41ea2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.cpp @@ -0,0 +1,102 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "semaphore.h" +#if __TBB_USE_SRWLOCK +#include "dynamic_link.h" // Refers to src/tbb, not include/tbb +#include "tbb_misc.h" +#endif + +namespace tbb { +namespace internal { + +// TODO: For new win UI port, we can use SRWLock API without dynamic_link etc. +#if __TBB_USE_SRWLOCK + +static atomic<do_once_state> concmon_module_inited; + +void WINAPI init_binsem_using_event( SRWLOCK* h_ ) +{ + srwl_or_handle* shptr = (srwl_or_handle*) h_; + shptr->h = CreateEventEx( NULL, NULL, 0, EVENT_ALL_ACCESS|SEMAPHORE_ALL_ACCESS ); +} + +void WINAPI acquire_binsem_using_event( SRWLOCK* h_ ) +{ + srwl_or_handle* shptr = (srwl_or_handle*) h_; + WaitForSingleObjectEx( shptr->h, INFINITE, FALSE ); +} + +void WINAPI release_binsem_using_event( SRWLOCK* h_ ) +{ + srwl_or_handle* shptr = (srwl_or_handle*) h_; + SetEvent( shptr->h ); +} + +static void (WINAPI *__TBB_init_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&init_binsem_using_event; +static void (WINAPI *__TBB_acquire_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&acquire_binsem_using_event; +static void (WINAPI *__TBB_release_binsem)( SRWLOCK* ) = (void (WINAPI *)(SRWLOCK*))&release_binsem_using_event; + +//! Table describing the how to link the handlers. +static const dynamic_link_descriptor SRWLLinkTable[] = { + DLD(InitializeSRWLock, __TBB_init_binsem), + DLD(AcquireSRWLockExclusive, __TBB_acquire_binsem), + DLD(ReleaseSRWLockExclusive, __TBB_release_binsem) +}; + +inline void init_concmon_module() +{ + __TBB_ASSERT( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event, NULL ); + if( dynamic_link( "Kernel32.dll", SRWLLinkTable, sizeof(SRWLLinkTable)/sizeof(dynamic_link_descriptor) ) ) { + __TBB_ASSERT( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event, NULL ); + __TBB_ASSERT( (uintptr_t)__TBB_acquire_binsem!=(uintptr_t)&acquire_binsem_using_event, NULL ); + __TBB_ASSERT( (uintptr_t)__TBB_release_binsem!=(uintptr_t)&release_binsem_using_event, NULL ); + } +} + +binary_semaphore::binary_semaphore() { + atomic_do_once( &init_concmon_module, concmon_module_inited ); + + __TBB_init_binsem( &my_sem.lock ); + if( (uintptr_t)__TBB_init_binsem!=(uintptr_t)&init_binsem_using_event ) + P(); +} + +binary_semaphore::~binary_semaphore() { + if( (uintptr_t)__TBB_init_binsem==(uintptr_t)&init_binsem_using_event ) + CloseHandle( my_sem.h ); +} + +void binary_semaphore::P() { __TBB_acquire_binsem( &my_sem.lock ); } + +void binary_semaphore::V() { __TBB_release_binsem( &my_sem.lock ); } + +#endif /* __TBB_USE_SRWLOCK */ + +} // namespace internal +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.h new file mode 100644 index 0000000000..2e98ee8426 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/semaphore.h @@ -0,0 +1,262 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbb_semaphore_H +#define __TBB_tbb_semaphore_H + +#include "tbb/tbb_stddef.h" + +#if _WIN32||_WIN64 +#include "tbb/machine/windows_api.h" + +#elif __APPLE__ +#include <mach/semaphore.h> +#include <mach/task.h> +#include <mach/mach_init.h> +#include <mach/error.h> + +#else +#include <semaphore.h> +#ifdef TBB_USE_DEBUG +#include <errno.h> +#endif +#endif /*_WIN32||_WIN64*/ + +namespace tbb { +namespace internal { + + +#if _WIN32||_WIN64 +typedef LONG sem_count_t; +//! Edsger Dijkstra's counting semaphore +class semaphore : no_copy { + static const int max_semaphore_cnt = MAXLONG; +public: + //! ctor + semaphore(size_t start_cnt_ = 0) {init_semaphore(start_cnt_);} + //! dtor + ~semaphore() {CloseHandle( sem );} + //! wait/acquire + void P() {WaitForSingleObjectEx( sem, INFINITE, FALSE );} + //! post/release + void V() {ReleaseSemaphore( sem, 1, NULL );} +private: + HANDLE sem; + void init_semaphore(size_t start_cnt_) { + sem = CreateSemaphoreEx( NULL, LONG(start_cnt_), max_semaphore_cnt, NULL, 0, SEMAPHORE_ALL_ACCESS ); + } +}; +#elif __APPLE__ +//! Edsger Dijkstra's counting semaphore +class semaphore : no_copy { +public: + //! ctor + semaphore(int start_cnt_ = 0) : sem(start_cnt_) { init_semaphore(start_cnt_); } + //! dtor + ~semaphore() { + kern_return_t ret = semaphore_destroy( mach_task_self(), sem ); + __TBB_ASSERT_EX( ret==err_none, NULL ); + } + //! wait/acquire + void P() { + int ret; + do { + ret = semaphore_wait( sem ); + } while( ret==KERN_ABORTED ); + __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); + } + //! post/release + void V() { semaphore_signal( sem ); } +private: + semaphore_t sem; + void init_semaphore(int start_cnt_) { + kern_return_t ret = semaphore_create( mach_task_self(), &sem, SYNC_POLICY_FIFO, start_cnt_ ); + __TBB_ASSERT_EX( ret==err_none, "failed to create a semaphore" ); + } +}; +#else /* Linux/Unix */ +typedef uint32_t sem_count_t; +//! Edsger Dijkstra's counting semaphore +class semaphore : no_copy { +public: + //! ctor + semaphore(int start_cnt_ = 0 ) { init_semaphore( start_cnt_ ); } + + //! dtor + ~semaphore() { + int ret = sem_destroy( &sem ); + __TBB_ASSERT_EX( !ret, NULL ); + } + //! wait/acquire + void P() { + while( sem_wait( &sem )!=0 ) + __TBB_ASSERT( errno==EINTR, NULL ); + } + //! post/release + void V() { sem_post( &sem ); } +private: + sem_t sem; + void init_semaphore(int start_cnt_) { + int ret = sem_init( &sem, /*shared among threads*/ 0, start_cnt_ ); + __TBB_ASSERT_EX( !ret, NULL ); + } +}; +#endif /* _WIN32||_WIN64 */ + + +//! for performance reasons, we want specialied binary_semaphore +#if _WIN32||_WIN64 +#if !__TBB_USE_SRWLOCK +//! binary_semaphore for concurrent_monitor +class binary_semaphore : no_copy { +public: + //! ctor + binary_semaphore() { my_sem = CreateEventEx( NULL, NULL, 0, EVENT_ALL_ACCESS ); } + //! dtor + ~binary_semaphore() { CloseHandle( my_sem ); } + //! wait/acquire + void P() { WaitForSingleObjectEx( my_sem, INFINITE, FALSE ); } + //! post/release + void V() { SetEvent( my_sem ); } +private: + HANDLE my_sem; +}; +#else /* __TBB_USE_SRWLOCK */ + +union srwl_or_handle { + SRWLOCK lock; + HANDLE h; +}; + +//! binary_semaphore for concurrent_monitor +class binary_semaphore : no_copy { +public: + //! ctor + binary_semaphore(); + //! dtor + ~binary_semaphore(); + //! wait/acquire + void P(); + //! post/release + void V(); +private: + srwl_or_handle my_sem; +}; +#endif /* !__TBB_USE_SRWLOCK */ +#elif __APPLE__ +//! binary_semaphore for concurrent monitor +class binary_semaphore : no_copy { +public: + //! ctor + binary_semaphore() : my_sem(0) { + kern_return_t ret = semaphore_create( mach_task_self(), &my_sem, SYNC_POLICY_FIFO, 0 ); + __TBB_ASSERT_EX( ret==err_none, "failed to create a semaphore" ); + } + //! dtor + ~binary_semaphore() { + kern_return_t ret = semaphore_destroy( mach_task_self(), my_sem ); + __TBB_ASSERT_EX( ret==err_none, NULL ); + } + //! wait/acquire + void P() { + int ret; + do { + ret = semaphore_wait( my_sem ); + } while( ret==KERN_ABORTED ); + __TBB_ASSERT( ret==KERN_SUCCESS, "semaphore_wait() failed" ); + } + //! post/release + void V() { semaphore_signal( my_sem ); } +private: + semaphore_t my_sem; +}; +#else /* Linux/Unix */ + +#if __TBB_USE_FUTEX +class binary_semaphore : no_copy { +public: + //! ctor + binary_semaphore() { my_sem = 1; } + //! dtor + ~binary_semaphore() {} + //! wait/acquire + void P() { + int s; + if( (s = my_sem.compare_and_swap( 1, 0 ))!=0 ) { + if( s!=2 ) + s = my_sem.fetch_and_store( 2 ); + while( s!=0 ) { + futex_wait( &my_sem, 2 ); + s = my_sem.fetch_and_store( 2 ); + } + } + } + //! post/release + void V() { + __TBB_ASSERT( my_sem>=1, "multiple V()'s in a row?" ); + if( my_sem--!=1 ) { + //if old value was 2 + my_sem = 0; + futex_wakeup_one( &my_sem ); + } + } +private: + atomic<int> my_sem; +}; +#else +typedef uint32_t sem_count_t; +//! binary_semaphore for concurrent monitor +class binary_semaphore : no_copy { +public: + //! ctor + binary_semaphore() { + int ret = sem_init( &my_sem, /*shared among threads*/ 0, 0 ); + __TBB_ASSERT_EX( !ret, NULL ); + } + //! dtor + ~binary_semaphore() { + int ret = sem_destroy( &my_sem ); + __TBB_ASSERT_EX( !ret, NULL ); + } + //! wait/acquire + void P() { + while( sem_wait( &my_sem )!=0 ) + __TBB_ASSERT( errno==EINTR, NULL ); + } + //! post/release + void V() { sem_post( &my_sem ); } +private: + sem_t my_sem; +}; +#endif /* __TBB_USE_FUTEX */ +#endif /* _WIN32||_WIN64 */ + +} // namespace internal +} // namespace tbb + +#endif /* __TBB_tbb_semaphore_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_mutex.cpp new file mode 100644 index 0000000000..5657e55cce --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_mutex.cpp @@ -0,0 +1,66 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_machine.h" +#include "tbb/spin_mutex.h" +#include "itt_notify.h" +#include "tbb_misc.h" + +namespace tbb { + +void spin_mutex::scoped_lock::internal_acquire( spin_mutex& m ) { + __TBB_ASSERT( !my_mutex, "already holding a lock on a spin_mutex" ); + ITT_NOTIFY(sync_prepare, &m); + __TBB_LockByte(m.flag); + my_mutex = &m; + ITT_NOTIFY(sync_acquired, &m); +} + +void spin_mutex::scoped_lock::internal_release() { + __TBB_ASSERT( my_mutex, "release on spin_mutex::scoped_lock that is not holding a lock" ); + + ITT_NOTIFY(sync_releasing, my_mutex); + __TBB_UnlockByte(my_mutex->flag, 0); + my_mutex = NULL; +} + +bool spin_mutex::scoped_lock::internal_try_acquire( spin_mutex& m ) { + __TBB_ASSERT( !my_mutex, "already holding a lock on a spin_mutex" ); + bool result = bool( __TBB_TryLockByte(m.flag) ); + if( result ) { + my_mutex = &m; + ITT_NOTIFY(sync_acquired, &m); + } + return result; +} + +void spin_mutex::internal_construct() { + ITT_SYNC_CREATE(this, _T("tbb::spin_mutex"), _T("")); +} + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_rw_mutex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_rw_mutex.cpp new file mode 100644 index 0000000000..92fe247c45 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/spin_rw_mutex.cpp @@ -0,0 +1,166 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/spin_rw_mutex.h" +#include "tbb/tbb_machine.h" +#include "itt_notify.h" + +#if defined(_MSC_VER) && defined(_Wp64) + // Workaround for overzealous compiler warnings in /Wp64 mode + #pragma warning (disable: 4244) +#endif + +namespace tbb { + +template<typename T> // a template can work with private spin_rw_mutex::state_t +static inline T CAS(volatile T &addr, T newv, T oldv) { + // ICC (9.1 and 10.1 tried) unable to do implicit conversion + // from "volatile T*" to "volatile void*", so explicit cast added. + return T(__TBB_CompareAndSwapW((volatile void *)&addr, (intptr_t)newv, (intptr_t)oldv)); +} + +//! Acquire write lock on the given mutex. +bool spin_rw_mutex_v3::internal_acquire_writer() +{ + ITT_NOTIFY(sync_prepare, this); + for( internal::atomic_backoff backoff;;backoff.pause() ){ + state_t s = const_cast<volatile state_t&>(state); // ensure reloading + if( !(s & BUSY) ) { // no readers, no writers + if( CAS(state, WRITER, s)==s ) + break; // successfully stored writer flag + backoff.reset(); // we could be very close to complete op. + } else if( !(s & WRITER_PENDING) ) { // no pending writers + __TBB_AtomicOR(&state, WRITER_PENDING); + } + } + ITT_NOTIFY(sync_acquired, this); + return false; +} + +//! Release writer lock on the given mutex +void spin_rw_mutex_v3::internal_release_writer() +{ + ITT_NOTIFY(sync_releasing, this); + __TBB_AtomicAND( &state, READERS ); +} + +//! Acquire read lock on given mutex. +void spin_rw_mutex_v3::internal_acquire_reader() +{ + ITT_NOTIFY(sync_prepare, this); + for( internal::atomic_backoff backoff;;backoff.pause() ){ + state_t s = const_cast<volatile state_t&>(state); // ensure reloading + if( !(s & (WRITER|WRITER_PENDING)) ) { // no writer or write requests + state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER ); + if( !( t&WRITER )) + break; // successfully stored increased number of readers + // writer got there first, undo the increment + __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER ); + } + } + + ITT_NOTIFY(sync_acquired, this); + __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" ); +} + +//! Upgrade reader to become a writer. +/** Returns whether the upgrade happened without releasing and re-acquiring the lock */ +bool spin_rw_mutex_v3::internal_upgrade() +{ + state_t s = state; + __TBB_ASSERT( s & READERS, "invalid state before upgrade: no readers " ); + // check and set writer-pending flag + // required conditions: either no pending writers, or we are the only reader + // (with multiple readers and pending writer, another upgrade could have been requested) + while( (s & READERS)==ONE_READER || !(s & WRITER_PENDING) ) { + state_t old_s = s; + if( (s=CAS(state, s | WRITER | WRITER_PENDING, s))==old_s ) { + ITT_NOTIFY(sync_prepare, this); + for( internal::atomic_backoff backoff; (state & READERS) != ONE_READER; ) + backoff.pause(); // while more than 1 reader + __TBB_ASSERT((state&(WRITER_PENDING|WRITER))==(WRITER_PENDING|WRITER),"invalid state when upgrading to writer"); + // both new readers and writers are blocked at this time + __TBB_FetchAndAddW( &state, - (intptr_t)(ONE_READER+WRITER_PENDING)); + ITT_NOTIFY(sync_acquired, this); + return true; // successfully upgraded + } + } + // slow reacquire + internal_release_reader(); + return internal_acquire_writer(); // always returns false +} + +//! Downgrade writer to a reader +void spin_rw_mutex_v3::internal_downgrade() { + ITT_NOTIFY(sync_releasing, this); + __TBB_FetchAndAddW( &state, (intptr_t)(ONE_READER-WRITER)); + __TBB_ASSERT( state & READERS, "invalid state after downgrade: no readers" ); +} + +//! Release read lock on the given mutex +void spin_rw_mutex_v3::internal_release_reader() +{ + __TBB_ASSERT( state & READERS, "invalid state of a read lock: no readers" ); + ITT_NOTIFY(sync_releasing, this); // release reader + __TBB_FetchAndAddWrelease( &state,-(intptr_t)ONE_READER); +} + +//! Try to acquire write lock on the given mutex +bool spin_rw_mutex_v3::internal_try_acquire_writer() +{ + // for a writer: only possible to acquire if no active readers or writers + state_t s = state; + if( !(s & BUSY) ) // no readers, no writers; mask is 1..1101 + if( CAS(state, WRITER, s)==s ) { + ITT_NOTIFY(sync_acquired, this); + return true; // successfully stored writer flag + } + return false; +} + +//! Try to acquire read lock on the given mutex +bool spin_rw_mutex_v3::internal_try_acquire_reader() +{ + // for a reader: acquire if no active or waiting writers + state_t s = state; + if( !(s & (WRITER|WRITER_PENDING)) ) { // no writers + state_t t = (state_t)__TBB_FetchAndAddW( &state, (intptr_t) ONE_READER ); + if( !( t&WRITER )) { // got the lock + ITT_NOTIFY(sync_acquired, this); + return true; // successfully stored increased number of readers + } + // writer got there first, undo the increment + __TBB_FetchAndAddW( &state, -(intptr_t)ONE_READER ); + } + return false; +} + +void spin_rw_mutex_v3::internal_construct() { + ITT_SYNC_CREATE(this, _T("tbb::spin_rw_mutex"), _T("")); +} +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/task.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/task.cpp new file mode 100644 index 0000000000..85794fc0b2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/task.cpp @@ -0,0 +1,271 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Do not include task.h directly. Use scheduler_common.h instead +#include "scheduler_common.h" +#include "governor.h" +#include "scheduler.h" +#include "itt_notify.h" + +#include "tbb/cache_aligned_allocator.h" +#include "tbb/partitioner.h" + +#include <new> + +namespace tbb { + +using namespace std; + +namespace internal { + +//------------------------------------------------------------------------ +// Methods of allocate_root_proxy +//------------------------------------------------------------------------ +task& allocate_root_proxy::allocate( size_t size ) { + internal::generic_scheduler* v = governor::local_scheduler(); + __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" ); +#if __TBB_TASK_GROUP_CONTEXT + task_prefix& p = v->my_innermost_running_task->prefix(); + + ITT_STACK_CREATE(p.context->itt_caller); +#endif + // New root task becomes part of the currently running task's cancellation context + return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) ); +} + +void allocate_root_proxy::free( task& task ) { + internal::generic_scheduler* v = governor::local_scheduler(); + __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" ); +#if __TBB_TASK_GROUP_CONTEXT + // No need to do anything here as long as there is no context -> task connection +#endif /* __TBB_TASK_GROUP_CONTEXT */ + v->free_task<local_task>( task ); +} + +#if __TBB_TASK_GROUP_CONTEXT +//------------------------------------------------------------------------ +// Methods of allocate_root_with_context_proxy +//------------------------------------------------------------------------ +task& allocate_root_with_context_proxy::allocate( size_t size ) const { + internal::generic_scheduler* s = governor::local_scheduler(); + __TBB_ASSERT( s, "Scheduler auto-initialization failed?" ); + task& t = s->allocate_task( size, NULL, &my_context ); + // Supported usage model prohibits concurrent initial binding. Thus we do not + // need interlocked operations or fences to manipulate with my_context.my_kind + if ( my_context.my_kind == task_group_context::binding_required ) { + // If we are in the outermost task dispatch loop of a master thread, then + // there is nothing to bind this context to, and we skip the binding part + // treating the context as isolated. + if ( s->my_innermost_running_task == s->my_dummy_task ) + my_context.my_kind = task_group_context::isolated; + else + my_context.bind_to( s ); + } + ITT_STACK_CREATE(my_context.itt_caller); + return t; +} + +void allocate_root_with_context_proxy::free( task& task ) const { + internal::generic_scheduler* v = governor::local_scheduler(); + __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" ); + // No need to do anything here as long as unbinding is performed by context destructor only. + v->free_task<local_task>( task ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +//------------------------------------------------------------------------ +// Methods of allocate_continuation_proxy +//------------------------------------------------------------------------ +task& allocate_continuation_proxy::allocate( size_t size ) const { + task& t = *((task*)this); + assert_task_valid(t); + generic_scheduler* s = governor::local_scheduler(); + task* parent = t.parent(); + t.prefix().parent = NULL; + return s->allocate_task( size, __TBB_CONTEXT_ARG(parent, t.prefix().context) ); +} + +void allocate_continuation_proxy::free( task& mytask ) const { + // Restore the parent as it was before the corresponding allocate was called. + ((task*)this)->prefix().parent = mytask.parent(); + governor::local_scheduler()->free_task<local_task>(mytask); +} + +//------------------------------------------------------------------------ +// Methods of allocate_child_proxy +//------------------------------------------------------------------------ +task& allocate_child_proxy::allocate( size_t size ) const { + task& t = *((task*)this); + assert_task_valid(t); + generic_scheduler* s = governor::local_scheduler(); + return s->allocate_task( size, __TBB_CONTEXT_ARG(&t, t.prefix().context) ); +} + +void allocate_child_proxy::free( task& mytask ) const { + governor::local_scheduler()->free_task<local_task>(mytask); +} + +//------------------------------------------------------------------------ +// Methods of allocate_additional_child_of_proxy +//------------------------------------------------------------------------ +task& allocate_additional_child_of_proxy::allocate( size_t size ) const { + parent.increment_ref_count(); + generic_scheduler* s = governor::local_scheduler(); + return s->allocate_task( size, __TBB_CONTEXT_ARG(&parent, parent.prefix().context) ); +} + +void allocate_additional_child_of_proxy::free( task& task ) const { + // Undo the increment. We do not check the result of the fetch-and-decrement. + // We could consider be spawning the task if the fetch-and-decrement returns 1. + // But we do not know that was the programmer's intention. + // Furthermore, if it was the programmer's intention, the program has a fundamental + // race condition (that we warn about in Reference manual), because the + // reference count might have become zero before the corresponding call to + // allocate_additional_child_of_proxy::allocate. + parent.internal_decrement_ref_count(); + governor::local_scheduler()->free_task<local_task>(task); +} + +//------------------------------------------------------------------------ +// Support for auto_partitioner +//------------------------------------------------------------------------ +size_t get_initial_auto_partitioner_divisor() { + const size_t X_FACTOR = 4; + return X_FACTOR * (governor::max_number_of_workers()+1); +} + +//------------------------------------------------------------------------ +// Methods of affinity_partitioner_base_v3 +//------------------------------------------------------------------------ +void affinity_partitioner_base_v3::resize( unsigned factor ) { + // Check factor to avoid asking for number of workers while there might be no arena. + size_t new_size = factor ? factor*(governor::max_number_of_workers()+1) : 0; + if( new_size!=my_size ) { + if( my_array ) { + NFS_Free( my_array ); + // Following two assignments must be done here for sake of exception safety. + my_array = NULL; + my_size = 0; + } + if( new_size ) { + my_array = static_cast<affinity_id*>(NFS_Allocate(new_size,sizeof(affinity_id), NULL )); + memset( my_array, 0, sizeof(affinity_id)*new_size ); + my_size = new_size; + } + } +} + +} // namespace internal + +using namespace tbb::internal; + +//------------------------------------------------------------------------ +// task +//------------------------------------------------------------------------ + +void task::internal_set_ref_count( int count ) { + __TBB_ASSERT( count>=0, "count must not be negative" ); + task_prefix &p = prefix(); + __TBB_ASSERT(p.ref_count==1 && p.state==allocated && self().parent()==this + || !(p.extra_state & es_ref_count_active), "ref_count race detected"); + ITT_NOTIFY(sync_releasing, &p.ref_count); + p.ref_count = count; +} + +internal::reference_count task::internal_decrement_ref_count() { + ITT_NOTIFY( sync_releasing, &prefix().ref_count ); + internal::reference_count k = __TBB_FetchAndDecrementWrelease( &prefix().ref_count ); + __TBB_ASSERT( k>=1, "task's reference count underflowed" ); + if( k==1 ) + ITT_NOTIFY( sync_acquired, &prefix().ref_count ); + return k-1; +} + +task& task::self() { + generic_scheduler *v = governor::local_scheduler(); + v->assert_task_pool_valid(); + __TBB_ASSERT( v->my_innermost_running_task, NULL ); + return *v->my_innermost_running_task; +} + +bool task::is_owned_by_current_thread() const { + return true; +} + +void interface5::internal::task_base::destroy( task& victim ) { + // 1 may be a guard reference for wait_for_all, which was not reset because + // of concurrent_wait mode or because prepared root task was not actually used + // for spawning tasks (as in structured_task_group). + __TBB_ASSERT( (intptr_t)victim.prefix().ref_count <= 1, "Task being destroyed must not have children" ); + __TBB_ASSERT( victim.state()==task::allocated, "illegal state for victim task" ); + task* parent = victim.parent(); + victim.~task(); + if( parent ) { + __TBB_ASSERT( parent->state()==task::allocated, "attempt to destroy child of running or corrupted parent?" ); + parent->internal_decrement_ref_count(); + // Even if the last reference to *parent is removed, it should not be spawned (documented behavior). + } + governor::local_scheduler()->free_task<no_hint>( victim ); +} + +void task::spawn_and_wait_for_all( task_list& list ) { + generic_scheduler* s = governor::local_scheduler(); + task* t = list.first; + if( t ) { + if( &t->prefix().next!=list.next_ptr ) + s->local_spawn( *t->prefix().next, *list.next_ptr ); + list.clear(); + } + s->local_wait_for_all( *this, t ); +} + +/** Defined out of line so that compiler does not replicate task's vtable. + It's pointless to define it inline anyway, because all call sites to it are virtual calls + that the compiler is unlikely to optimize. */ +void task::note_affinity( affinity_id ) { +} + +#if __TBB_TASK_GROUP_CONTEXT +void task::change_group ( task_group_context& ctx ) { + prefix().context = &ctx; + if ( ctx.my_kind == task_group_context::binding_required ) { + internal::generic_scheduler* s = governor::local_scheduler(); + // If we are in the outermost task dispatch loop of a master thread, then + // there is nothing to bind this context to, and we skip the binding part + // treating the context as isolated. + if ( s->my_innermost_running_task == s->my_dummy_task ) + ctx.my_kind = task_group_context::isolated; + else + ctx.bind_to( s ); + } + ITT_STACK_CREATE(ctx.itt_caller); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +} // namespace tbb + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/task_group_context.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/task_group_context.cpp new file mode 100644 index 0000000000..db99bf9ee6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/task_group_context.cpp @@ -0,0 +1,452 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "scheduler.h" + +#include "tbb/task.h" +#include "tbb/tbb_exception.h" +#include "tbb/cache_aligned_allocator.h" +#include "itt_notify.h" + +namespace tbb { + +#if __TBB_TASK_GROUP_CONTEXT + +using namespace internal; + +//------------------------------------------------------------------------ +// captured_exception +//------------------------------------------------------------------------ + +inline char* duplicate_string ( const char* src ) { + char* dst = NULL; + if ( src ) { + size_t len = strlen(src) + 1; + dst = (char*)allocate_via_handler_v3(len); + strncpy (dst, src, len); + } + return dst; +} + +captured_exception::~captured_exception () throw() { + clear(); +} + +void captured_exception::set ( const char* a_name, const char* info ) throw() { + my_exception_name = duplicate_string( a_name ); + my_exception_info = duplicate_string( info ); +} + +void captured_exception::clear () throw() { + deallocate_via_handler_v3 (const_cast<char*>(my_exception_name)); + deallocate_via_handler_v3 (const_cast<char*>(my_exception_info)); +} + +captured_exception* captured_exception::move () throw() { + captured_exception *e = (captured_exception*)allocate_via_handler_v3(sizeof(captured_exception)); + if ( e ) { + ::new (e) captured_exception(); + e->my_exception_name = my_exception_name; + e->my_exception_info = my_exception_info; + e->my_dynamic = true; + my_exception_name = my_exception_info = NULL; + } + return e; +} + +void captured_exception::destroy () throw() { + __TBB_ASSERT ( my_dynamic, "Method destroy can be used only on objects created by clone or allocate" ); + if ( my_dynamic ) { + this->captured_exception::~captured_exception(); + deallocate_via_handler_v3 (this); + } +} + +captured_exception* captured_exception::allocate ( const char* a_name, const char* info ) { + captured_exception *e = (captured_exception*)allocate_via_handler_v3( sizeof(captured_exception) ); + if ( e ) { + ::new (e) captured_exception(a_name, info); + e->my_dynamic = true; + } + return e; +} + +const char* captured_exception::name() const throw() { + return my_exception_name; +} + +const char* captured_exception::what() const throw() { + return my_exception_info; +} + + +//------------------------------------------------------------------------ +// tbb_exception_ptr +//------------------------------------------------------------------------ + +#if !TBB_USE_CAPTURED_EXCEPTION + +namespace internal { + +template<typename T> +tbb_exception_ptr* AllocateExceptionContainer( const T& src ) { + tbb_exception_ptr *eptr = (tbb_exception_ptr*)allocate_via_handler_v3( sizeof(tbb_exception_ptr) ); + if ( eptr ) + new (eptr) tbb_exception_ptr(src); + return eptr; +} + +tbb_exception_ptr* tbb_exception_ptr::allocate () { + return AllocateExceptionContainer( std::current_exception() ); +} + +tbb_exception_ptr* tbb_exception_ptr::allocate ( const tbb_exception& ) { + return AllocateExceptionContainer( std::current_exception() ); +} + +tbb_exception_ptr* tbb_exception_ptr::allocate ( captured_exception& src ) { + tbb_exception_ptr *res = AllocateExceptionContainer( src ); + src.destroy(); + return res; +} + +void tbb_exception_ptr::destroy () throw() { + this->tbb_exception_ptr::~tbb_exception_ptr(); + deallocate_via_handler_v3 (this); +} + +} // namespace internal +#endif /* !TBB_USE_CAPTURED_EXCEPTION */ + + +//------------------------------------------------------------------------ +// task_group_context +//------------------------------------------------------------------------ + +task_group_context::~task_group_context () { + if ( my_kind == binding_completed ) { + if ( governor::is_set(my_owner) ) { + // Local update of the context list + uintptr_t local_count_snapshot = my_owner->my_context_state_propagation_epoch; + my_owner->my_local_ctx_list_update.store<relaxed>(1); + // Prevent load of nonlocal update flag from being hoisted before the + // store to local update flag. + atomic_fence(); + if ( my_owner->my_nonlocal_ctx_list_update.load<relaxed>() ) { + spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); + my_node.my_prev->my_next = my_node.my_next; + my_node.my_next->my_prev = my_node.my_prev; + my_owner->my_local_ctx_list_update.store<relaxed>(0); + } + else { + my_node.my_prev->my_next = my_node.my_next; + my_node.my_next->my_prev = my_node.my_prev; + // Release fence is necessary so that update of our neighbors in + // the context list was committed when possible concurrent destroyer + // proceeds after local update flag is reset by the following store. + my_owner->my_local_ctx_list_update.store<release>(0); + if ( local_count_snapshot != the_context_state_propagation_epoch ) { + // Another thread was propagating cancellation request when we removed + // ourselves from the list. We must ensure that it is not accessing us + // when this destructor finishes. We'll be able to acquire the lock + // below only after the other thread finishes with us. + spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); + } + } + } + else { + // Nonlocal update of the context list + // Synchronizes with generic_scheduler::free_scheduler() + if ( __TBB_FetchAndStoreW(&my_kind, dying) == detached ) { + my_node.my_prev->my_next = my_node.my_next; + my_node.my_next->my_prev = my_node.my_prev; + } + else { + //TODO: evaluate and perhaps relax + my_owner->my_nonlocal_ctx_list_update.fetch_and_increment<full_fence>(); + //TODO: evaluate and perhaps remove + spin_wait_until_eq( my_owner->my_local_ctx_list_update, 0u ); + my_owner->my_context_list_mutex.lock(); + my_node.my_prev->my_next = my_node.my_next; + my_node.my_next->my_prev = my_node.my_prev; + my_owner->my_context_list_mutex.unlock(); + //TODO: evaluate and perhaps relax + my_owner->my_nonlocal_ctx_list_update.fetch_and_decrement<full_fence>(); + } + } + } + poison_value(my_version_and_traits); + if ( my_exception ) + my_exception->destroy(); + ITT_STACK(itt_caller != ITT_CALLER_NULL, caller_destroy, itt_caller); +} + +void task_group_context::init () { + __TBB_ASSERT ( sizeof(uintptr_t) < 32, "Layout of my_version_and_traits must be reconsidered on this platform" ); + __TBB_ASSERT ( sizeof(task_group_context) == 2 * NFS_MaxLineSize, "Context class has wrong size - check padding and members alignment" ); + __TBB_ASSERT ( (uintptr_t(this) & (sizeof(my_cancellation_requested) - 1)) == 0, "Context is improperly aligned" ); + __TBB_ASSERT ( my_kind == isolated || my_kind == bound, "Context can be created only as isolated or bound" ); + my_parent = NULL; + my_cancellation_requested = 0; + my_exception = NULL; + my_owner = NULL; + my_state = 0; + itt_caller = ITT_CALLER_NULL; +#if __TBB_TASK_PRIORITY + my_priority = normalized_normal_priority; +#endif /* __TBB_TASK_PRIORITY */ +} + +void task_group_context::register_with ( generic_scheduler *local_sched ) { + __TBB_ASSERT( local_sched, NULL ); + my_owner = local_sched; + my_node.my_prev = &local_sched->my_context_list_head; + // Notify threads that may be concurrently destroying contexts registered + // in this scheduler's list that local list update is underway. + local_sched->my_local_ctx_list_update.store<relaxed>(1); + // Prevent load of global propagation epoch counter from being hoisted before + // speculative stores above, as well as load of nonlocal update flag from + // being hoisted before the store to local update flag. + atomic_fence(); + // Finalize local context list update + if ( local_sched->my_nonlocal_ctx_list_update.load<relaxed>() ) { + spin_mutex::scoped_lock lock(my_owner->my_context_list_mutex); + local_sched->my_context_list_head.my_next->my_prev = &my_node; + my_node.my_next = local_sched->my_context_list_head.my_next; + my_owner->my_local_ctx_list_update.store<relaxed>(0); + local_sched->my_context_list_head.my_next = &my_node; + } + else { + local_sched->my_context_list_head.my_next->my_prev = &my_node; + my_node.my_next = local_sched->my_context_list_head.my_next; + my_owner->my_local_ctx_list_update.store<release>(0); + // Thread-local list of contexts allows concurrent traversal by another thread + // while propagating state change. To ensure visibility of my_node's members + // to the concurrently traversing thread, the list's head is updated by means + // of store-with-release. + __TBB_store_with_release(local_sched->my_context_list_head.my_next, &my_node); + } +} + +void task_group_context::bind_to ( generic_scheduler *local_sched ) { + __TBB_ASSERT ( my_kind == binding_required, "Already bound or isolated?" ); + __TBB_ASSERT ( !my_parent, "Parent is set before initial binding" ); + my_parent = local_sched->my_innermost_running_task->prefix().context; + + // Condition below prevents unnecessary thrashing parent context's cache line + if ( !(my_parent->my_state & may_have_children) ) + my_parent->my_state |= may_have_children; + if ( my_parent->my_parent ) { + // Even if this context were made accessible for state change propagation + // (by placing __TBB_store_with_release(s->my_context_list_head.my_next, &my_node) + // above), it still could be missed if state propagation from a grand-ancestor + // was underway concurrently with binding. + // Speculative propagation from the parent together with epoch counters + // detecting possibility of such a race allow to avoid taking locks when + // there is no contention. + + // Acquire fence is necessary to prevent reordering subsequent speculative + // loads of parent state data out of the scope where epoch counters comparison + // can reliably validate it. + uintptr_t local_count_snapshot = __TBB_load_with_acquire( my_parent->my_owner->my_context_state_propagation_epoch ); + // Speculative propagation of parent's state. The speculation will be + // validated by the epoch counters check further on. + my_cancellation_requested = my_parent->my_cancellation_requested; +#if __TBB_TASK_PRIORITY + my_priority = my_parent->my_priority; +#endif /* __TBB_TASK_PRIORITY */ + register_with( local_sched ); // Issues full fence + + // If no state propagation was detected by the following condition, the above + // full fence guarantees that the parent had correct state during speculative + // propagation before the fence. Otherwise the propagation from parent is + // repeated under the lock. + if ( local_count_snapshot != the_context_state_propagation_epoch ) { + // Another thread may be propagating state change right now. So resort to lock. + context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex); + my_cancellation_requested = my_parent->my_cancellation_requested; +#if __TBB_TASK_PRIORITY + my_priority = my_parent->my_priority; +#endif /* __TBB_TASK_PRIORITY */ + } + } + else { + register_with( local_sched ); // Issues full fence + // As we do not have grand-ancestors, concurrent state propagation (if any) + // may originate only from the parent context, and thus it is safe to directly + // copy the state from it. + my_cancellation_requested = my_parent->my_cancellation_requested; +#if __TBB_TASK_PRIORITY + my_priority = my_parent->my_priority; +#endif /* __TBB_TASK_PRIORITY */ + } + my_kind = binding_completed; +} + +#if __TBB_TASK_GROUP_CONTEXT +template <typename T> +void task_group_context::propagate_state_from_ancestors ( T task_group_context::*mptr_state, T new_state ) { + task_group_context *ancestor = my_parent; + while ( ancestor && ancestor->*mptr_state != new_state ) + ancestor = ancestor->my_parent; + if ( ancestor ) { + task_group_context *ctx = this; + do { + ctx->*mptr_state = new_state; + ctx = ctx->my_parent; + } while ( ctx != ancestor ); + } +} + +template <typename T> +void generic_scheduler::propagate_task_group_state ( T task_group_context::*mptr_state, T new_state ) { + spin_mutex::scoped_lock lock(my_context_list_mutex); + // Acquire fence is necessary to ensure that the subsequent node->my_next load + // returned the correct value in case it was just inserted in another thread. + // The fence also ensures visibility of the correct my_parent value. + context_list_node_t *node = __TBB_load_with_acquire(my_context_list_head.my_next); + while ( node != &my_context_list_head ) { + task_group_context &ctx = __TBB_get_object_ref(task_group_context, my_node, node); + if ( ctx.*mptr_state != new_state ) + ctx.propagate_state_from_ancestors( mptr_state, new_state ); + node = node->my_next; + __TBB_ASSERT( is_alive(ctx.my_version_and_traits), "Local context list contains destroyed object" ); + } + // Sync up local propagation epoch with the global one. Release fence prevents + // reordering of possible store to *mptr_state after the sync point. + __TBB_store_with_release(my_context_state_propagation_epoch, the_context_state_propagation_epoch); +} + +template <typename T> +bool market::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { + if ( !(src.my_state & task_group_context::may_have_children) ) + return true; + // The whole propagation algorithm is under the lock in order to ensure correctness + // in case of concurrent state changes at the different levels of the context tree. + // See the note 3 at the bottom of scheduler.cpp + context_state_propagation_mutex_type::scoped_lock lock(the_context_state_propagation_mutex); + if ( src.*mptr_state != new_state ) + // Another thread has concurrently changed the state. Back off. + return false; + src.*mptr_state = new_state; + // Advance global state propagation epoch + __TBB_FetchAndAddWrelease(&the_context_state_propagation_epoch, 1); + // Propagate to all workers and masters and sync up their local epochs with the global one + unsigned num_workers = my_num_workers; + for ( unsigned i = 0; i < num_workers; ++i ) { + generic_scheduler *s = my_workers[i]; + // If the worker is only about to be registered, skip it. + if ( s ) + s->propagate_task_group_state( mptr_state, new_state ); + } + // Propagate to all master threads (under my_arenas_list_mutex lock) + ForEachArena(a) { + arena_slot &slot = a.my_slots[0]; + generic_scheduler *s = slot.my_scheduler; + // If the master is under construction, skip it. Otherwise make sure that it does not + // leave its arena and its scheduler get destroyed while we accessing its data. + if ( s && __TBB_CompareAndSwapW(&slot.my_scheduler, (intptr_t)LockedMaster, (intptr_t)s) == (intptr_t)s ) { //TODO: remove need in lock + __TBB_ASSERT( slot.my_scheduler == LockedMaster, NULL ); + // The whole propagation sequence is locked, thus no contention is expected + __TBB_ASSERT( s != LockedMaster, NULL ); + s->propagate_task_group_state( mptr_state, new_state ); + __TBB_store_with_release( slot.my_scheduler, s ); + } + } EndForEach(); + return true; +} + +template <typename T> +bool arena::propagate_task_group_state ( T task_group_context::*mptr_state, task_group_context& src, T new_state ) { + return my_market->propagate_task_group_state( mptr_state, src, new_state ); +} +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +bool task_group_context::cancel_group_execution () { + __TBB_ASSERT ( my_cancellation_requested == 0 || my_cancellation_requested == 1, "Invalid cancellation state"); + if ( my_cancellation_requested || __TBB_CompareAndSwapW(&my_cancellation_requested, 1, 0) ) { + // This task group has already been canceled + return false; + } + governor::local_scheduler()->my_arena->propagate_task_group_state( &task_group_context::my_cancellation_requested, *this, (uintptr_t)1 ); + return true; +} + +bool task_group_context::is_group_execution_cancelled () const { + return my_cancellation_requested != 0; +} + +// IMPORTANT: It is assumed that this method is not used concurrently! +void task_group_context::reset () { + //! \todo Add assertion that this context does not have children + // No fences are necessary since this context can be accessed from another thread + // only after stealing happened (which means necessary fences were used). + if ( my_exception ) { + my_exception->destroy(); + my_exception = NULL; + } + my_cancellation_requested = 0; +} + +void task_group_context::register_pending_exception () { + if ( my_cancellation_requested ) + return; +#if TBB_USE_EXCEPTIONS + try { + throw; + } TbbCatchAll( this ); +#endif /* TBB_USE_EXCEPTIONS */ +} + +#if __TBB_TASK_PRIORITY +void task_group_context::set_priority ( priority_t prio ) { + __TBB_ASSERT( prio == priority_low || prio == priority_normal || prio == priority_high, "Invalid priority level value" ); + intptr_t p = normalize_priority(prio); + if ( my_priority == p ) + return; + my_priority = p; + internal::generic_scheduler* s = governor::local_scheduler_if_initialized(); + if ( !s || !s->my_arena->propagate_task_group_state(&task_group_context::my_priority, *this, p) ) + return; + // Updating arena priority here does not eliminate necessity of checking each + // task priority and updating arena priority if necessary before the task execution. + // These checks will be necessary because: + // a) set_priority() may be invoked before any tasks from this task group are spawned; + // b) all spawned tasks from this task group are retrieved from the task pools. + // These cases create a time window when arena priority may be lowered. + s->my_market->update_arena_priority( *s->my_arena, p ); +} + +priority_t task_group_context::priority () const { + return static_cast<priority_t>(priority_from_normalized_rep[my_priority]); +} +#endif /* __TBB_TASK_PRIORITY */ + +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/task_stream.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/task_stream.h new file mode 100644 index 0000000000..4ca7c6e379 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/task_stream.h @@ -0,0 +1,171 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_task_stream_H +#define _TBB_task_stream_H + +#include "tbb/tbb_stddef.h" +#include <deque> +#include <climits> +#include "tbb/atomic.h" // for __TBB_Atomic* +#include "tbb/spin_mutex.h" +#include "tbb/tbb_allocator.h" +#include "scheduler_common.h" +#include "tbb_misc.h" // for FastRandom + +namespace tbb { +namespace internal { + +//! Essentially, this is just a pair of a queue and a mutex to protect the queue. +/** The reason std::pair is not used is that the code would look less clean + if field names were replaced with 'first' and 'second'. **/ +template< typename T, typename mutex_t > +struct queue_and_mutex { + typedef std::deque< T, tbb_allocator<T> > queue_base_t; + + queue_base_t my_queue; + mutex_t my_mutex; + + queue_and_mutex () : my_queue(), my_mutex() {} + ~queue_and_mutex () {} +}; + +const uintptr_t one = 1; + +inline void set_one_bit( uintptr_t& dest, int pos ) { + __TBB_ASSERT( pos>=0, NULL ); + __TBB_ASSERT( pos<32, NULL ); + __TBB_AtomicOR( &dest, one<<pos ); +} + +inline void clear_one_bit( uintptr_t& dest, int pos ) { + __TBB_ASSERT( pos>=0, NULL ); + __TBB_ASSERT( pos<32, NULL ); + __TBB_AtomicAND( &dest, ~(one<<pos) ); +} + +inline bool is_bit_set( uintptr_t val, int pos ) { + __TBB_ASSERT( pos>=0, NULL ); + __TBB_ASSERT( pos<32, NULL ); + return (val & (one<<pos)) != 0; +} + +//! The container for "fairness-oriented" aka "enqueued" tasks. +class task_stream : no_copy{ + typedef queue_and_mutex <task*, spin_mutex> lane_t; + unsigned N; + uintptr_t population; + FastRandom random; + padded<lane_t>* lanes; + +public: + task_stream() : N(), population(), random(&N), lanes() + { + } + + void initialize( unsigned n_lanes ) { + const unsigned max_lanes = +#if __TBB_MORE_FIFO_LANES + sizeof(population) * CHAR_BIT; +#else + 32; +#endif + N = n_lanes>=max_lanes ? max_lanes : n_lanes>2 ? 1<<(__TBB_Log2(n_lanes-1)+1) : 2; + __TBB_ASSERT( N==max_lanes || N>=n_lanes && ((N-1)&N)==0, "number of lanes miscalculated"); + __TBB_ASSERT( N <= sizeof(population) * CHAR_BIT, NULL ); + lanes = new padded<lane_t>[N]; + __TBB_ASSERT( !population, NULL ); + } + + ~task_stream() { if (lanes) delete[] lanes; } + + //! Push a task into a lane. + void push( task* source, unsigned& last_random ) { + // Lane selection is random. Each thread should keep a separate seed value. + unsigned idx; + for( ; ; ) { + idx = random.get(last_random) & (N-1); + spin_mutex::scoped_lock lock; + if( lock.try_acquire(lanes[idx].my_mutex) ) { + lanes[idx].my_queue.push_back(source); + set_one_bit( population, idx ); //TODO: avoid atomic op if the bit is already set + break; + } + } + } + //! Try finding and popping a task. + /** Does not change destination if unsuccessful. */ + void pop( task*& dest, unsigned& last_used_lane ) { + if( !population ) return; // keeps the hot path shorter + // Lane selection is round-robin. Each thread should keep its last used lane. + unsigned idx = (last_used_lane+1)&(N-1); + for( ; population; idx=(idx+1)&(N-1) ) { + if( is_bit_set( population, idx ) ) { + lane_t& lane = lanes[idx]; + spin_mutex::scoped_lock lock; + if( lock.try_acquire(lane.my_mutex) && !lane.my_queue.empty() ) { + dest = lane.my_queue.front(); + lane.my_queue.pop_front(); + if( lane.my_queue.empty() ) + clear_one_bit( population, idx ); + break; + } + } + } + last_used_lane = idx; + } + + //! Checks existence of a task. + bool empty() { + return !population; + } + //! Destroys all remaining tasks in every lane. Returns the number of destroyed tasks. + /** Tasks are not executed, because it would potentially create more tasks at a late stage. + The scheduler is really expected to execute all tasks before task_stream destruction. */ + intptr_t drain() { + intptr_t result = 0; + for(unsigned i=0; i<N; ++i) { + lane_t& lane = lanes[i]; + spin_mutex::scoped_lock lock(lane.my_mutex); + for(lane_t::queue_base_t::iterator it=lane.my_queue.begin(); + it!=lane.my_queue.end(); ++it, ++result) + { + task* t = *it; + tbb::task::destroy(*t); + } + lane.my_queue.clear(); + clear_one_bit( population, i ); + } + return result; + } +}; // task_stream + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_task_stream_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_assert_impl.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_assert_impl.h new file mode 100644 index 0000000000..2dca330963 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_assert_impl.h @@ -0,0 +1,112 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// IMPORTANT: To use assertion handling in TBB, exactly one of the TBB source files +// should #include tbb_assert_impl.h thus instantiating assertion handling routines. +// The intent of putting it to a separate file is to allow some tests to use it +// as well in order to avoid dependency on the library. + +// include headers for required function declarations +#include <cstdlib> +#include <stdio.h> +#include <string.h> +#include <stdarg.h> +#if _MSC_VER +#include <crtdbg.h> +#define __TBB_USE_DBGBREAK_DLG TBB_USE_DEBUG +#endif + +#if _MSC_VER >= 1400 +#define __TBB_EXPORTED_FUNC __cdecl +#else +#define __TBB_EXPORTED_FUNC +#endif + +using namespace std; + +#if __TBBMALLOC_BUILD +namespace rml { namespace internal { +#else +namespace tbb { +#endif + //! Type for an assertion handler + typedef void(*assertion_handler_type)( const char* filename, int line, const char* expression, const char * comment ); + + static assertion_handler_type assertion_handler; + + assertion_handler_type __TBB_EXPORTED_FUNC set_assertion_handler( assertion_handler_type new_handler ) { + assertion_handler_type old_handler = assertion_handler; + assertion_handler = new_handler; + return old_handler; + } + + void __TBB_EXPORTED_FUNC assertion_failure( const char* filename, int line, const char* expression, const char* comment ) { + if( assertion_handler_type a = assertion_handler ) { + (*a)(filename,line,expression,comment); + } else { + static bool already_failed; + if( !already_failed ) { + already_failed = true; + fprintf( stderr, "Assertion %s failed on line %d of file %s\n", + expression, line, filename ); + if( comment ) + fprintf( stderr, "Detailed description: %s\n", comment ); +#if __TBB_USE_DBGBREAK_DLG + if(1 == _CrtDbgReport(_CRT_ASSERT, filename, line, "tbb_debug.dll", "%s\r\n%s", expression, comment?comment:"")) + _CrtDbgBreak(); +#else + fflush(stderr); + abort(); +#endif + } + } + } + +#if defined(_MSC_VER)&&_MSC_VER<1400 +# define vsnprintf _vsnprintf +#endif + +#if !__TBBMALLOC_BUILD + namespace internal { + //! Report a runtime warning. + void __TBB_EXPORTED_FUNC runtime_warning( const char* format, ... ) + { + char str[1024]; memset(str, 0, 1024); + va_list args; va_start(args, format); + vsnprintf( str, 1024-1, format, args); + va_end(args); + fprintf( stderr, "TBB Warning: %s\n", str); + } + } // namespace internal +#endif + +#if __TBBMALLOC_BUILD +}} // namespaces rml::internal +#else +} // namespace tbb +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.cpp new file mode 100644 index 0000000000..c4d1b875e2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.cpp @@ -0,0 +1,258 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" +#include "tbb_main.h" +#include "governor.h" +#include "tbb_misc.h" +#include "itt_notify.h" + +namespace tbb { +namespace internal { + +//------------------------------------------------------------------------ +// Begin shared data layout. +// The following global data items are mostly read-only after initialization. +//------------------------------------------------------------------------ + +//! Padding in order to prevent false sharing. +static const char _pad[NFS_MaxLineSize - sizeof(int)] = {}; + +//------------------------------------------------------------------------ +// governor data +basic_tls<generic_scheduler*> governor::theTLS; +unsigned governor::DefaultNumberOfThreads; +rml::tbb_factory governor::theRMLServerFactory; +bool governor::UsePrivateRML; +const task_scheduler_init *governor::BlockingTSI; +#if TBB_USE_ASSERT +bool governor::IsBlockingTermiantionInProgress; +#endif + +//------------------------------------------------------------------------ +// market data +market* market::theMarket; +market::global_market_mutex_type market::theMarketMutex; + +//------------------------------------------------------------------------ +// One time initialization data + +//! Counter of references to global shared resources such as TLS. +atomic<int> __TBB_InitOnce::count; + +__TBB_atomic_flag __TBB_InitOnce::InitializationLock; + +//! Flag that is set to true after one-time initializations are done. +bool __TBB_InitOnce::InitializationDone; + +#if DO_ITT_NOTIFY + static bool ITT_Present; + static bool ITT_InitializationDone; +#endif + +#if !(_WIN32||_WIN64) || __TBB_SOURCE_DIRECTLY_INCLUDED + static __TBB_InitOnce __TBB_InitOnceHiddenInstance; +#endif + +//------------------------------------------------------------------------ +// generic_scheduler data + +//! Pointer to the scheduler factory function +generic_scheduler* (*AllocateSchedulerPtr)( arena*, size_t index ); + +#if __TBB_OLD_PRIMES_RNG +//! Table of primes used by fast random-number generator (FastRandom). +/** Also serves to keep anything else from being placed in the same + cache line as the global data items preceding it. */ +static const unsigned Primes[] = { + 0x9e3779b1, 0xffe6cc59, 0x2109f6dd, 0x43977ab5, + 0xba5703f5, 0xb495a877, 0xe1626741, 0x79695e6b, + 0xbc98c09f, 0xd5bee2b3, 0x287488f9, 0x3af18231, + 0x9677cd4d, 0xbe3a6929, 0xadc6a877, 0xdcf0674b, + 0xbe4d6fe9, 0x5f15e201, 0x99afc3fd, 0xf3f16801, + 0xe222cfff, 0x24ba5fdb, 0x0620452d, 0x79f149e3, + 0xc8b93f49, 0x972702cd, 0xb07dd827, 0x6c97d5ed, + 0x085a3d61, 0x46eb5ea7, 0x3d9910ed, 0x2e687b5b, + 0x29609227, 0x6eb081f1, 0x0954c4e1, 0x9d114db9, + 0x542acfa9, 0xb3e6bd7b, 0x0742d917, 0xe9f3ffa7, + 0x54581edb, 0xf2480f45, 0x0bb9288f, 0xef1affc7, + 0x85fa0ca7, 0x3ccc14db, 0xe6baf34b, 0x343377f7, + 0x5ca19031, 0xe6d9293b, 0xf0a9f391, 0x5d2e980b, + 0xfc411073, 0xc3749363, 0xb892d829, 0x3549366b, + 0x629750ad, 0xb98294e5, 0x892d9483, 0xc235baf3, + 0x3d2402a3, 0x6bdef3c9, 0xbec333cd, 0x40c9520f +}; + +//------------------------------------------------------------------------ +// End of shared data layout +//------------------------------------------------------------------------ + +//------------------------------------------------------------------------ +// Shared data accessors +//------------------------------------------------------------------------ + +unsigned GetPrime ( unsigned seed ) { + return Primes[seed%(sizeof(Primes)/sizeof(Primes[0]))]; +} +#endif //__TBB_OLD_PRIMES_RNG + +//------------------------------------------------------------------------ +// __TBB_InitOnce +//------------------------------------------------------------------------ + +void __TBB_InitOnce::add_ref() { + if( ++count==1 ) + governor::acquire_resources(); +} + +void __TBB_InitOnce::remove_ref() { + int k = --count; + __TBB_ASSERT(k>=0,"removed __TBB_InitOnce ref that was not added?"); + if( k==0 ) + governor::release_resources(); +} + +//------------------------------------------------------------------------ +// One-time Initializations +//------------------------------------------------------------------------ + +//! Defined in cache_aligned_allocator.cpp +void initialize_cache_aligned_allocator(); + +//! Defined in scheduler.cpp +void Scheduler_OneTimeInitialization ( bool itt_present ); + +#if DO_ITT_NOTIFY + +/** Thread-unsafe lazy one-time initialization of tools interop. + Used by both dummy handlers and general TBB one-time initialization routine. **/ +void ITT_DoUnsafeOneTimeInitialization () { + if ( !ITT_InitializationDone ) { + ITT_Present = (__TBB_load_ittnotify()!=0); + ITT_InitializationDone = true; + ITT_SYNC_CREATE(&market::theMarketMutex, SyncType_GlobalLock, SyncObj_SchedulerInitialization); + } +} + +/** Thread-safe lazy one-time initialization of tools interop. + Used by dummy handlers only. **/ +extern "C" +void ITT_DoOneTimeInitialization() { + __TBB_InitOnce::lock(); + ITT_DoUnsafeOneTimeInitialization(); + __TBB_InitOnce::unlock(); +} +#endif /* DO_ITT_NOTIFY */ + +//! Performs thread-safe lazy one-time general TBB initialization. +void DoOneTimeInitializations() { + __TBB_InitOnce::lock(); + // No fence required for load of InitializationDone, because we are inside a critical section. + if( !__TBB_InitOnce::InitializationDone ) { + __TBB_InitOnce::add_ref(); + if( GetBoolEnvironmentVariable("TBB_VERSION") ) + PrintVersion(); + bool itt_present = false; +#if DO_ITT_NOTIFY + ITT_DoUnsafeOneTimeInitialization(); + itt_present = ITT_Present; +#endif /* DO_ITT_NOTIFY */ + initialize_cache_aligned_allocator(); + governor::initialize_rml_factory(); + Scheduler_OneTimeInitialization( itt_present ); + // Force processor groups support detection + governor::default_num_threads(); + // Dump version data + governor::print_version_info(); + PrintExtraVersionInfo( "Tools support", itt_present ? "enabled" : "disabled" ); + __TBB_InitOnce::InitializationDone = true; + } + __TBB_InitOnce::unlock(); +} + +#if (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED +//! Windows "DllMain" that handles startup and shutdown of dynamic library. +extern "C" bool WINAPI DllMain( HANDLE /*hinstDLL*/, DWORD reason, LPVOID /*lpvReserved*/ ) { + switch( reason ) { + case DLL_PROCESS_ATTACH: + __TBB_InitOnce::add_ref(); + break; + case DLL_PROCESS_DETACH: + __TBB_InitOnce::remove_ref(); + // It is assumed that InitializationDone is not set after DLL_PROCESS_DETACH, + // and thus no race on InitializationDone is possible. + if( __TBB_InitOnce::initialization_done() ) { + // Remove reference that we added in DoOneTimeInitializations. + __TBB_InitOnce::remove_ref(); + } + break; + case DLL_THREAD_DETACH: + governor::terminate_auto_initialized_scheduler(); + break; + } + return true; +} +#endif /* (_WIN32||_WIN64) && !__TBB_SOURCE_DIRECTLY_INCLUDED */ + +void itt_store_pointer_with_release_v3( void* dst, void* src ) { + ITT_NOTIFY(sync_releasing, dst); + __TBB_store_with_release(*static_cast<void**>(dst),src); +} + +void* itt_load_pointer_with_acquire_v3( const void* src ) { + void* result = __TBB_load_with_acquire(*static_cast<void*const*>(src)); + ITT_NOTIFY(sync_acquired, const_cast<void*>(src)); + return result; +} + +#if DO_ITT_NOTIFY +void call_itt_notify_v5(int t, void *ptr) { + switch (t) { + case 0: ITT_NOTIFY(sync_prepare, ptr); break; + case 1: ITT_NOTIFY(sync_cancel, ptr); break; + case 2: ITT_NOTIFY(sync_acquired, ptr); break; + case 3: ITT_NOTIFY(sync_releasing, ptr); break; + } +} +#else +void call_itt_notify_v5(int /*t*/, void* /*ptr*/) {} +#endif + +void* itt_load_pointer_v3( const void* src ) { + void* result = *static_cast<void*const*>(src); + return result; +} + +void itt_set_sync_name_v3( void* obj, const tchar* name) { + ITT_SYNC_RENAME(obj, name); + suppress_unused_warning(obj && name); +} + + +} // namespace internal +} // namespace tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.h new file mode 100644 index 0000000000..64c6957733 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_main.h @@ -0,0 +1,104 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_tbb_main_H +#define _TBB_tbb_main_H + +#include "tbb/atomic.h" + +namespace tbb { + +namespace internal { + +void DoOneTimeInitializations (); + +//------------------------------------------------------------------------ +// __TBB_InitOnce +//------------------------------------------------------------------------ + +//! Class that supports TBB initialization. +/** It handles acquisition and release of global resources (e.g. TLS) during startup and shutdown, + as well as synchronization for DoOneTimeInitializations. */ +class __TBB_InitOnce { + friend void DoOneTimeInitializations(); + friend void ITT_DoUnsafeOneTimeInitialization (); + + static atomic<int> count; + + //! Platform specific code to acquire resources. + static void acquire_resources(); + + //! Platform specific code to release resources. + static void release_resources(); + + //! Specifies if the one-time initializations has been done. + static bool InitializationDone; + + //! Global initialization lock + /** Scenarios are possible when tools interop has to be initialized before the + TBB itself. This imposes a requirement that the global initialization lock + has to support valid static initialization, and does not issue any tool + notifications in any build mode. **/ + static __TBB_atomic_flag InitializationLock; + +public: + static void lock() { __TBB_LockByte( InitializationLock ); } + + static void unlock() { __TBB_UnlockByte( InitializationLock, 0 ); } + + static bool initialization_done() { return __TBB_load_with_acquire(InitializationDone); } + + //! Add initial reference to resources. + /** We assume that dynamic loading of the library prevents any other threads + from entering the library until this constructor has finished running. **/ + __TBB_InitOnce() { add_ref(); } + + //! Remove the initial reference to resources. + /** This is not necessarily the last reference if other threads are still running. **/ + ~__TBB_InitOnce() { + remove_ref(); + // We assume that InitializationDone is not set after file-scope destructors + // start running, and thus no race on InitializationDone is possible. + if( initialization_done() ) { + // Remove an extra reference that was added in DoOneTimeInitializations. + remove_ref(); + } + } + //! Add reference to resources. If first reference added, acquire the resources. + static void add_ref(); + + //! Remove reference to resources. If last reference removed, release the resources. + static void remove_ref(); +}; // class __TBB_InitOnce + + +} // namespace internal + +} // namespace tbb + +#endif /* _TBB_tbb_main_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.cpp new file mode 100644 index 0000000000..c6cc1351e4 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.cpp @@ -0,0 +1,254 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Source file for miscellaneous entities that are infrequently referenced by +// an executing program. + +#include "tbb/tbb_stddef.h" +#include "tbb_assert_impl.h" // Out-of-line TBB assertion handling routines are instantiated here. +#include "tbb/tbb_exception.h" +#include "tbb/tbb_machine.h" +#include "tbb_misc.h" +#include <cstdio> +#include <cstdlib> +#include <stdexcept> + +#if _WIN32||_WIN64 +#include "tbb/machine/windows_api.h" +#endif + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + // Suppress "C++ exception handler used, but unwind semantics are not enabled" warning in STL headers + #pragma warning (push) + #pragma warning (disable: 4530) +#endif + +#include <cstring> + +#if !TBB_USE_EXCEPTIONS && _MSC_VER + #pragma warning (pop) +#endif + +using namespace std; + +namespace tbb { + +const char* bad_last_alloc::what() const throw() { return "bad allocation in previous or concurrent attempt"; } +const char* improper_lock::what() const throw() { return "attempted recursive lock on critical section or non-recursive mutex"; } +const char* user_abort::what() const throw() { return "User-initiated abort has terminated this operation"; } +const char* invalid_multiple_scheduling::what() const throw() { return "The same task_handle object cannot be executed more than once"; } +const char* missing_wait::what() const throw() { return "wait() was not called on the structured_task_group"; } + +namespace internal { + +#if TBB_USE_EXCEPTIONS + #define DO_THROW(exc, init_args) throw exc init_args; +#else /* !TBB_USE_EXCEPTIONS */ + #define PRINT_ERROR_AND_ABORT(exc_name, msg) \ + fprintf (stderr, "Exception %s with message %s would've been thrown, " \ + "if exception handling were not disabled. Aborting.\n", exc_name, msg); \ + fflush(stderr); \ + abort(); + #define DO_THROW(exc, init_args) PRINT_ERROR_AND_ABORT(#exc, #init_args) +#endif /* !TBB_USE_EXCEPTIONS */ + + +/* The "what" should be fairly short, not more than about 128 characters. + Because we control all the call sites to handle_perror, it is pointless + to bullet-proof it for very long strings. + + Design note: ADR put this routine off to the side in tbb_misc.cpp instead of + Task.cpp because the throw generates a pathetic lot of code, and ADR wanted + this large chunk of code to be placed on a cold page. */ +void handle_perror( int error_code, const char* what ) { + char buf[256]; + __TBB_ASSERT( strlen(what) < sizeof(buf) - 64, "Error description is too long" ); + sprintf(buf,"%s: ",what); + char* end = strchr(buf,0); + size_t n = buf+sizeof(buf)-end; + strncpy( end, strerror( error_code ), n ); + // Ensure that buffer ends in terminator. + buf[sizeof(buf)-1] = 0; +#if TBB_USE_EXCEPTIONS + throw runtime_error(buf); +#else + PRINT_ERROR_AND_ABORT( "runtime_error", buf); +#endif /* !TBB_USE_EXCEPTIONS */ +} + +#if _WIN32||_WIN64 +void handle_win_error( int error_code ) { + char buf[512]; +#if !__TBB_WIN8UI_SUPPORT + FormatMessageA( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, error_code, 0, buf, sizeof(buf), NULL ); +#else +//TODO: update with right replacement for FormatMessageA + sprintf_s((char*)&buf, 512, "error code %d", error_code); +#endif +#if TBB_USE_EXCEPTIONS + throw runtime_error(buf); +#else + PRINT_ERROR_AND_ABORT( "runtime_error", buf); +#endif /* !TBB_USE_EXCEPTIONS */ +} +#endif // _WIN32||_WIN64 + +void throw_bad_last_alloc_exception_v4() { + throw_exception_v4(eid_bad_last_alloc); +} + +void throw_exception_v4 ( exception_id eid ) { + __TBB_ASSERT ( eid > 0 && eid < eid_max, "Unknown exception ID" ); + switch ( eid ) { + case eid_bad_alloc: DO_THROW( bad_alloc, () ); + case eid_bad_last_alloc: DO_THROW( bad_last_alloc, () ); + case eid_nonpositive_step: DO_THROW( invalid_argument, ("Step must be positive") ); + case eid_out_of_range: DO_THROW( out_of_range, ("Index out of requested size range") ); + case eid_segment_range_error: DO_THROW( range_error, ("Index out of allocated segment slots") ); + case eid_index_range_error: DO_THROW( range_error, ("Index is not allocated") ); + case eid_missing_wait: DO_THROW( missing_wait, () ); + case eid_invalid_multiple_scheduling: DO_THROW( invalid_multiple_scheduling, () ); + case eid_improper_lock: DO_THROW( improper_lock, () ); + case eid_possible_deadlock: DO_THROW( runtime_error, ("Resource deadlock would occur") ); + case eid_operation_not_permitted: DO_THROW( runtime_error, ("Operation not permitted") ); + case eid_condvar_wait_failed: DO_THROW( runtime_error, ("Wait on condition variable failed") ); + case eid_invalid_load_factor: DO_THROW( out_of_range, ("Invalid hash load factor") ); + case eid_reserved: DO_THROW( out_of_range, ("[backward compatibility] Invalid number of buckets") ); + case eid_invalid_swap: DO_THROW( invalid_argument, ("swap() is invalid on non-equal allocators") ); + case eid_reservation_length_error: DO_THROW( length_error, ("reservation size exceeds permitted max size") ); + case eid_invalid_key: DO_THROW( out_of_range, ("invalid key") ); + case eid_user_abort: DO_THROW( user_abort, () ); +#if __TBB_SUPPORTS_WORKERS_WAITING_IN_TERMINATE + case eid_blocking_sch_init: DO_THROW( runtime_error, ("Nesting of blocking termiantion is impossible") ); +#endif + default: break; + } +#if !TBB_USE_EXCEPTIONS && __APPLE__ + out_of_range e1(""); + length_error e2(""); + range_error e3(""); + invalid_argument e4(""); +#endif /* !TBB_USE_EXCEPTIONS && __APPLE__ */ +} + +#if _XBOX || __TBB_WIN8UI_SUPPORT +bool GetBoolEnvironmentVariable( const char * ) { return false;} +#else /* _XBOX || __TBB_WIN8UI_SUPPORT */ +bool GetBoolEnvironmentVariable( const char * name ) { + if( const char* s = getenv(name) ) + return strcmp(s,"0") != 0; + return false; +} +#endif /* _XBOX || __TBB_WIN8UI_SUPPORT */ + +#include "tbb_version.h" + +/** The leading "\0" is here so that applying "strings" to the binary delivers a clean result. */ +static const char VersionString[] = "\0"; + +static bool PrintVersionFlag = false; + +void PrintVersion() { + PrintVersionFlag = true; + fputs(VersionString+1,stderr); +} + +void PrintExtraVersionInfo( const char* category, const char* format, ... ) { + if( PrintVersionFlag ) { + char str[1024]; memset(str, 0, 1024); + va_list args; va_start(args, format); + // Note: correct vsnprintf definition obtained from tbb_assert_impl.h + vsnprintf( str, 1024-1, format, args); + va_end(args); + fprintf(stderr, "TBB: %s\t%s\n", category, str ); + } +} + +void PrintRMLVersionInfo( void* arg, const char* server_info ) { + PrintExtraVersionInfo( server_info, (const char *)arg ); +} + +} // namespace internal + +extern "C" int TBB_runtime_interface_version() { + return TBB_INTERFACE_VERSION; +} + +} // namespace tbb + +#if !__TBB_RML_STATIC +#if __TBB_x86_32 + +#include "tbb/atomic.h" + +// in MSVC environment, int64_t defined in tbb::internal namespace only (see tbb_stddef.h) +#if _MSC_VER +using tbb::internal::int64_t; +#endif + +//! Warn about 8-byte store that crosses a cache line. +extern "C" void __TBB_machine_store8_slow_perf_warning( volatile void *ptr ) { + // Report run-time warning unless we have already recently reported warning for that address. + const unsigned n = 4; + static tbb::atomic<void*> cache[n]; + static tbb::atomic<unsigned> k; + for( unsigned i=0; i<n; ++i ) + if( ptr==cache[i] ) + goto done; + cache[(k++)%n] = const_cast<void*>(ptr); + tbb::internal::runtime_warning( "atomic store on misaligned 8-byte location %p is slow", ptr ); +done:; +} + +//! Handle 8-byte store that crosses a cache line. +extern "C" void __TBB_machine_store8_slow( volatile void *ptr, int64_t value ) { + for( tbb::internal::atomic_backoff b;; b.pause() ) { + int64_t tmp = *(int64_t*)ptr; + if( __TBB_machine_cmpswp8(ptr,value,tmp)==tmp ) + break; + } +} + +#endif /* __TBB_x86_32 */ +#endif /* !__TBB_RML_STATIC */ + +#if __TBB_ipf +/* It was found that on IPF inlining of __TBB_machine_lockbyte leads + to serious performance regression with ICC 10.0. So keep it out-of-line. + */ +extern "C" intptr_t __TBB_machine_lockbyte( volatile unsigned char& flag ) { + if ( !__TBB_TryLockByte(flag) ) { + tbb::internal::atomic_backoff b; + do { + b.pause(); + } while ( !__TBB_TryLockByte(flag) ); + } + return 0; +} +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.h new file mode 100644 index 0000000000..c82018898e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc.h @@ -0,0 +1,268 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_tbb_misc_H +#define _TBB_tbb_misc_H + +#include "tbb/tbb_stddef.h" +#include "tbb/tbb_machine.h" +#include "tbb/atomic.h" // For atomic_xxx definitions + +#if __linux__ || __FreeBSD__ +#include <sys/param.h> // __FreeBSD_version +#if __FreeBSD_version >= 701000 +#include <sys/cpuset.h> +#endif +#endif + +// Does the operating system have a system call to pin a thread to a set of OS processors? +#define __TBB_OS_AFFINITY_SYSCALL_PRESENT ((__linux__ && !__ANDROID__) || (__FreeBSD_version >= 701000)) + +namespace tbb { +namespace internal { + +const size_t MByte = 1024*1024; + +const size_t ThreadStackSize = (sizeof(uintptr_t) <= 4 ? 2 : 4 )*MByte; + +#ifndef __TBB_HardwareConcurrency + +//! Returns maximal parallelism level supported by the current OS configuration. +int AvailableHwConcurrency(); + +#else + +inline int AvailableHwConcurrency() { + int n = __TBB_HardwareConcurrency(); + return n > 0 ? n : 1; // Fail safety strap +} +#endif /* __TBB_HardwareConcurrency */ + + +#if _WIN32||_WIN64 + +//! Returns number of processor groups in the current OS configuration. +/** AvailableHwConcurrency must be called at least once before calling this method. **/ +int NumberOfProcessorGroups(); + +//! Retrieves index of processor group containing processor with the given index +int FindProcessorGroupIndex ( int processorIndex ); + +//! Affinitizes the thread to the specified processor group +void MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ); + +#endif /* _WIN32||_WIN64 */ + +//! Throws std::runtime_error with what() returning error_code description prefixed with aux_info +void handle_win_error( int error_code ); + +//! True if environment variable with given name is set and not 0; otherwise false. +bool GetBoolEnvironmentVariable( const char * name ); + +//! Prints TBB version information on stderr +void PrintVersion(); + +//! Prints arbitrary extra TBB version information on stderr +void PrintExtraVersionInfo( const char* category, const char* format, ... ); + +//! A callback routine to print RML version information on stderr +void PrintRMLVersionInfo( void* arg, const char* server_info ); + +// For TBB compilation only; not to be used in public headers +#if defined(min) || defined(max) +#undef min +#undef max +#endif + +//! Utility template function returning lesser of the two values. +/** Provided here to avoid including not strict safe <algorithm>.\n + In case operands cause signed/unsigned or size mismatch warnings it is caller's + responsibility to do the appropriate cast before calling the function. **/ +template<typename T1, typename T2> +T1 min ( const T1& val1, const T2& val2 ) { + return val1 < val2 ? val1 : val2; +} + +//! Utility template function returning greater of the two values. +/** Provided here to avoid including not strict safe <algorithm>.\n + In case operands cause signed/unsigned or size mismatch warnings it is caller's + responsibility to do the appropriate cast before calling the function. **/ +template<typename T1, typename T2> +T1 max ( const T1& val1, const T2& val2 ) { + return val1 < val2 ? val2 : val1; +} + +//! Utility template function to prevent "unused" warnings by various compilers. +template<typename T> +void suppress_unused_warning( const T& ) {} + +//! Utility helper structure to ease overload resolution +template<int > struct int_to_type {}; +//------------------------------------------------------------------------ +// FastRandom +//------------------------------------------------------------------------ + +/** Defined in tbb_main.cpp **/ +unsigned GetPrime ( unsigned seed ); + +//! A fast random number generator. +/** Uses linear congruential method. */ +class FastRandom { +private: +#if __TBB_OLD_PRIMES_RNG + unsigned x, a; + static const unsigned c = 1; +#else + unsigned x, c; + static const unsigned a = 0x9e3779b1; // a big prime number +#endif //__TBB_OLD_PRIMES_RNG +public: + //! Get a random number. + unsigned short get() { + return get(x); + } + //! Get a random number for the given seed; update the seed for next use. + unsigned short get( unsigned& seed ) { + unsigned short r = (unsigned short)(seed>>16); + __TBB_ASSERT(c&1, "c must be odd for big rng period"); + seed = seed*a+c; + return r; + } + //! Construct a random number generator. + FastRandom( void* unique_ptr ) { init(uintptr_t(unique_ptr)); } + FastRandom( uint32_t seed) { init(seed); } + FastRandom( uint64_t seed) { init(seed); } + template <typename T> + void init( T seed ) { + return init(seed,int_to_type<sizeof(seed)>()); + } + void init( uint64_t seed , int_to_type<8> ) { + init(uint32_t((seed>>32)+seed), int_to_type<4>()); + } + void init( uint32_t seed, int_to_type<4> ) { +#if __TBB_OLD_PRIMES_RNG + x = seed; + a = GetPrime( seed ); +#else + // threads use different seeds for unique sequences + c = (seed|1)*0xba5703f5; // c must be odd, shuffle by a prime number + x = c^(seed>>1); // also shuffle x for the first get() invocation +#endif + } +}; + +//------------------------------------------------------------------------ +// Atomic extensions +//------------------------------------------------------------------------ + +//! Atomically replaces value of dst with newValue if they satisfy condition of compare predicate +/** Return value semantics is the same as for CAS. **/ +template<typename T1, typename T2, class Pred> +T1 atomic_update ( tbb::atomic<T1>& dst, T2 newValue, Pred compare ) { + T1 oldValue = dst; + while ( compare(oldValue, newValue) ) { + if ( dst.compare_and_swap((T1)newValue, oldValue) == oldValue ) + break; + oldValue = dst; + } + return oldValue; +} + +//! One-time initialization states +enum do_once_state { + do_once_uninitialized = 0, ///< No execution attempts have been undertaken yet + do_once_pending, ///< A thread is executing associated do-once routine + do_once_executed, ///< Do-once routine has been executed + initialization_complete = do_once_executed ///< Convenience alias +}; + +//! One-time initialization function +/** /param initializer Pointer to function without arguments + The variant that returns bool is used for cases when initialization can fail + and it is OK to continue execution, but the state should be reset so that + the initialization attempt was repeated the next time. + /param state Shared state associated with initializer that specifies its + initialization state. Must be initially set to #uninitialized value + (e.g. by means of default static zero initialization). **/ +template <typename F> +void atomic_do_once ( const F& initializer, atomic<do_once_state>& state ) { + // tbb::atomic provides necessary acquire and release fences. + // The loop in the implementation is necessary to avoid race when thread T2 + // that arrived in the middle of initialization attempt by another thread T1 + // has just made initialization possible. + // In such a case T2 has to rely on T1 to initialize, but T1 may already be past + // the point where it can recognize the changed conditions. + while ( state != do_once_executed ) { + if( state == do_once_uninitialized ) { + if( state.compare_and_swap( do_once_pending, do_once_uninitialized ) == do_once_uninitialized ) { + run_initializer( initializer, state ); + break; + } + } + spin_wait_while_eq( state, do_once_pending ); + } +} + +// Run the initializer which can not fail +inline void run_initializer( void (*f)(), atomic<do_once_state>& state ) { + f(); + state = do_once_executed; +} + +// Run the initializer which can require repeated call +inline void run_initializer( bool (*f)(), atomic<do_once_state>& state ) { + state = f() ? do_once_executed : do_once_uninitialized; +} + +#if __TBB_OS_AFFINITY_SYSCALL_PRESENT + #if __linux__ + typedef cpu_set_t basic_mask_t; + #elif __FreeBSD_version >= 701000 + typedef cpuset_t basic_mask_t; + #else + #error affinity_helper is not implemented in this OS + #endif + class affinity_helper { + basic_mask_t* threadMask; + int is_changed; + public: + affinity_helper() : threadMask(NULL), is_changed(0) {} + ~affinity_helper(); + void protect_affinity_mask(); + }; +#else + class affinity_helper { + public: + void protect_affinity_mask() {} + }; +#endif /* __TBB_OS_AFFINITY_SYSCALL_PRESENT */ + +} // namespace internal +} // namespace tbb + +#endif /* _TBB_tbb_misc_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc_ex.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc_ex.cpp new file mode 100644 index 0000000000..62f75a8455 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_misc_ex.cpp @@ -0,0 +1,376 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Source file for miscellaneous entities that are infrequently referenced by +// an executing program, and implementation of which requires dynamic linking. + +#include "tbb_misc.h" + +#if !defined(__TBB_HardwareConcurrency) + +#include "dynamic_link.h" +#include <stdio.h> +#include <limits.h> + +#if _WIN32||_WIN64 +#include "tbb/machine/windows_api.h" +#if __TBB_WIN8UI_SUPPORT +#include <thread> +#endif +#else +#include <unistd.h> +#if __linux__ +#include <sys/sysinfo.h> +#include <string.h> +#include <sched.h> +#include <errno.h> +#elif __sun +#include <sys/sysinfo.h> +#elif __FreeBSD__ +#include <errno.h> +#include <string.h> +#include <sys/param.h> // Required by <sys/cpuset.h> +#include <sys/cpuset.h> +#endif +#endif + +namespace tbb { +namespace internal { + +#if __TBB_OS_AFFINITY_SYSCALL_PRESENT + +static void set_affinity_mask( size_t maskSize, const basic_mask_t* threadMask ) { +#if __linux__ + if( sched_setaffinity( 0, maskSize, threadMask ) ) +#else /* FreeBSD */ + if( cpuset_setaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) ) +#endif + runtime_warning( "setaffinity syscall failed" ); +} + +static void get_affinity_mask( size_t maskSize, basic_mask_t* threadMask ) { +#if __linux__ + if( sched_getaffinity( 0, maskSize, threadMask ) ) +#else /* FreeBSD */ + if( cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, maskSize, threadMask ) ) +#endif + runtime_warning( "getaffinity syscall failed" ); +} + +static basic_mask_t* process_mask; +static int num_masks; +struct process_mask_cleanup_helper { + ~process_mask_cleanup_helper() { + if( process_mask ) { + delete [] process_mask; + } + } +}; +static process_mask_cleanup_helper process_mask_cleanup; + +#define curMaskSize sizeof(basic_mask_t) * num_masks +affinity_helper::~affinity_helper() { + if( threadMask ) { + if( is_changed ) { + set_affinity_mask( curMaskSize, threadMask ); + } + delete [] threadMask; + } +} +void affinity_helper::protect_affinity_mask() { + if( threadMask == NULL && num_masks && process_mask ) { + threadMask = new basic_mask_t [num_masks]; + memset( threadMask, 0, curMaskSize ); + get_affinity_mask( curMaskSize, threadMask ); + is_changed = memcmp( process_mask, threadMask, curMaskSize ); + if( is_changed ) { + set_affinity_mask( curMaskSize, process_mask ); + } + } +} +#undef curMaskSize + +static atomic<do_once_state> hardware_concurrency_info; + +static int theNumProcs; + +static void initialize_hardware_concurrency_info () { + int err; + int availableProcs = 0; + int numMasks = 1; +#if __linux__ +#if __TBB_MAIN_THREAD_AFFINITY_BROKEN + int maxProcs = INT_MAX; // To check the entire mask. + int pid = 0; // Get the mask of the calling thread. +#else + int maxProcs = sysconf(_SC_NPROCESSORS_ONLN); + int pid = getpid(); +#endif + cpu_set_t *processMask; + const size_t BasicMaskSize = sizeof(cpu_set_t); + for (;;) { + int curMaskSize = BasicMaskSize * numMasks; + processMask = new cpu_set_t[numMasks]; + memset( processMask, 0, curMaskSize ); + err = sched_getaffinity( pid, curMaskSize, processMask ); + if ( !err || errno != EINVAL || curMaskSize * CHAR_BIT >= 256 * 1024 ) + break; + delete[] processMask; + numMasks <<= 1; + } +#else /* FreeBSD >= 7.1 */ + int maxProcs = sysconf(_SC_NPROCESSORS_ONLN); + cpuset_t *processMask; + const size_t BasicMaskSize = sizeof(cpuset_t); + for (;;) { + int curMaskSize = BasicMaskSize * numMasks; + processMask = new cpuset_t[numMasks]; + memset( processMask, 0, curMaskSize ); + // CPU_LEVEL_WHICH - anonymous (current) mask, CPU_LEVEL_CPUSET - assigned mask +#if __TBB_MAIN_THREAD_AFFINITY_BROKEN + err = cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, curMaskSize, processMask ); +#else + err = cpuset_getaffinity( CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, curMaskSize, processMask ); +#endif + if ( !err || errno != ERANGE || curMaskSize * CHAR_BIT >= 16 * 1024 ) + break; + delete[] processMask; + numMasks <<= 1; + } +#endif /* FreeBSD >= 7.1 */ + if ( !err ) { + for ( int m = 0; availableProcs < maxProcs && m < numMasks; ++m ) { + for ( size_t i = 0; (availableProcs < maxProcs) && (i < BasicMaskSize * CHAR_BIT); ++i ) { + if ( CPU_ISSET( i, processMask + m ) ) + ++availableProcs; + } + } + num_masks = numMasks; + process_mask = processMask; + } + else { + availableProcs = (maxProcs == INT_MAX) ? sysconf(_SC_NPROCESSORS_ONLN) : maxProcs; + delete[] processMask; + } + theNumProcs = availableProcs > 0 ? availableProcs : 1; // Fail safety strap + __TBB_ASSERT( theNumProcs <= sysconf(_SC_NPROCESSORS_ONLN), NULL ); +} + +int AvailableHwConcurrency() { + atomic_do_once( &initialize_hardware_concurrency_info, hardware_concurrency_info ); + return theNumProcs; +} + +#elif __ANDROID__ +// Work-around for Android that reads the correct number of available CPUs since system calls are unreliable. +// Format of "present" file is: ([<int>-<int>|<int>],)+ +int AvailableHwConcurrency() { + FILE *fp = fopen("/sys/devices/system/cpu/present", "r"); + if (fp == NULL) return 1; + int num_args, lower, upper, num_cpus=0; + while ((num_args = fscanf(fp, "%u-%u", &lower, &upper)) != EOF) { + switch(num_args) { + case 2: num_cpus += upper - lower + 1; break; + case 1: num_cpus += 1; break; + } + fscanf(fp, ","); + } + return (num_cpus > 0) ? num_cpus : 1; +} + +#elif defined(_SC_NPROCESSORS_ONLN) +int AvailableHwConcurrency() { + int n = sysconf(_SC_NPROCESSORS_ONLN); + return (n > 0) ? n : 1; +} + +#elif _WIN32||_WIN64 + +static atomic<do_once_state> hardware_concurrency_info; + +static const WORD TBB_ALL_PROCESSOR_GROUPS = 0xffff; + +// Statically allocate an array for processor group information. +// Windows 7 supports maximum 4 groups, but let's look ahead a little. +static const WORD MaxProcessorGroups = 64; + +struct ProcessorGroupInfo { + DWORD_PTR mask; ///< Affinity mask covering the whole group + int numProcs; ///< Number of processors in the group + int numProcsRunningTotal; ///< Subtotal of processors in this and preceding groups + + //! Total number of processor groups in the system + static int NumGroups; + + //! Index of the group with a slot reserved for the first master thread + /** In the context of multiple processor groups support current implementation + defines "the first master thread" as the first thread to invoke + AvailableHwConcurrency(). + + TODO: Implement a dynamic scheme remapping workers depending on the pending + master threads affinity. **/ + static int HoleIndex; +}; + +int ProcessorGroupInfo::NumGroups = 1; +int ProcessorGroupInfo::HoleIndex = 0; + + +ProcessorGroupInfo theProcessorGroups[MaxProcessorGroups]; + +struct TBB_GROUP_AFFINITY { + DWORD_PTR Mask; + WORD Group; + WORD Reserved[3]; +}; + +static DWORD (WINAPI *TBB_GetActiveProcessorCount)( WORD groupIndex ) = NULL; +static WORD (WINAPI *TBB_GetActiveProcessorGroupCount)() = NULL; +static BOOL (WINAPI *TBB_SetThreadGroupAffinity)( HANDLE hThread, + const TBB_GROUP_AFFINITY* newAff, TBB_GROUP_AFFINITY *prevAff ); +static BOOL (WINAPI *TBB_GetThreadGroupAffinity)( HANDLE hThread, TBB_GROUP_AFFINITY* ); + +static const dynamic_link_descriptor ProcessorGroupsApiLinkTable[] = { + DLD(GetActiveProcessorCount, TBB_GetActiveProcessorCount) + , DLD(GetActiveProcessorGroupCount, TBB_GetActiveProcessorGroupCount) + , DLD(SetThreadGroupAffinity, TBB_SetThreadGroupAffinity) + , DLD(GetThreadGroupAffinity, TBB_GetThreadGroupAffinity) +}; + +static void initialize_hardware_concurrency_info () { +#if __TBB_WIN8UI_SUPPORT + // For these applications processor groups info is unavailable + // Setting up a number of processors for one processor group + theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = std::thread::hardware_concurrency(); +#else /* __TBB_WIN8UI_SUPPORT */ + dynamic_link( "Kernel32.dll", ProcessorGroupsApiLinkTable, + sizeof(ProcessorGroupsApiLinkTable)/sizeof(dynamic_link_descriptor) ); + SYSTEM_INFO si; + GetNativeSystemInfo(&si); + DWORD_PTR pam, sam, m = 1; + GetProcessAffinityMask( GetCurrentProcess(), &pam, &sam ); + int nproc = 0; + for ( size_t i = 0; i < sizeof(DWORD_PTR) * CHAR_BIT; ++i, m <<= 1 ) { + if ( pam & m ) + ++nproc; + } + __TBB_ASSERT( nproc <= (int)si.dwNumberOfProcessors, NULL ); + // By default setting up a number of processors for one processor group + theProcessorGroups[0].numProcs = theProcessorGroups[0].numProcsRunningTotal = nproc; + // Setting up processor groups in case the process does not restrict affinity mask and more than one processor group is present + if ( nproc == (int)si.dwNumberOfProcessors && TBB_GetActiveProcessorCount ) { + // The process does not have restricting affinity mask and multiple processor groups are possible + ProcessorGroupInfo::NumGroups = (int)TBB_GetActiveProcessorGroupCount(); + __TBB_ASSERT( ProcessorGroupInfo::NumGroups <= MaxProcessorGroups, NULL ); + // Fail safety bootstrap. Release versions will limit available concurrency + // level, while debug ones would assert. + if ( ProcessorGroupInfo::NumGroups > MaxProcessorGroups ) + ProcessorGroupInfo::NumGroups = MaxProcessorGroups; + if ( ProcessorGroupInfo::NumGroups > 1 ) { + TBB_GROUP_AFFINITY ga; + if ( TBB_GetThreadGroupAffinity( GetCurrentThread(), &ga ) ) + ProcessorGroupInfo::HoleIndex = ga.Group; + int nprocs = 0; + for ( WORD i = 0; i < ProcessorGroupInfo::NumGroups; ++i ) { + ProcessorGroupInfo &pgi = theProcessorGroups[i]; + pgi.numProcs = (int)TBB_GetActiveProcessorCount(i); + __TBB_ASSERT( pgi.numProcs <= (int)sizeof(DWORD_PTR) * CHAR_BIT, NULL ); + pgi.mask = pgi.numProcs == sizeof(DWORD_PTR) * CHAR_BIT ? ~(DWORD_PTR)0 : (DWORD_PTR(1) << pgi.numProcs) - 1; + pgi.numProcsRunningTotal = nprocs += pgi.numProcs; + } + __TBB_ASSERT( nprocs == (int)TBB_GetActiveProcessorCount( TBB_ALL_PROCESSOR_GROUPS ), NULL ); + } + } +#endif /* __TBB_WIN8UI_SUPPORT */ + + PrintExtraVersionInfo("Processor groups", "%d", ProcessorGroupInfo::NumGroups); + if (ProcessorGroupInfo::NumGroups>1) + for (int i=0; i<ProcessorGroupInfo::NumGroups; ++i) + PrintExtraVersionInfo( "----- Group", "%d: size %d", i, theProcessorGroups[i].numProcs); +} + +int AvailableHwConcurrency() { + atomic_do_once( &initialize_hardware_concurrency_info, hardware_concurrency_info ); + return theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal; +} + +int NumberOfProcessorGroups() { + __TBB_ASSERT( hardware_concurrency_info == initialization_complete, "NumberOfProcessorGroups is used before AvailableHwConcurrency" ); + return ProcessorGroupInfo::NumGroups; +} + +// Offset for the slot reserved for the first master thread +#define HoleAdjusted(procIdx, grpIdx) (procIdx + (holeIdx <= grpIdx)) + +int FindProcessorGroupIndex ( int procIdx ) { + // In case of oversubscription spread extra workers in a round robin manner + int holeIdx; + const int numProcs = theProcessorGroups[ProcessorGroupInfo::NumGroups - 1].numProcsRunningTotal; + if ( procIdx >= numProcs - 1 ) { + holeIdx = INT_MAX; + procIdx = (procIdx - numProcs + 1) % numProcs; + } + else + holeIdx = ProcessorGroupInfo::HoleIndex; + __TBB_ASSERT( hardware_concurrency_info == initialization_complete, "FindProcessorGroupIndex is used before AvailableHwConcurrency" ); + // Approximate the likely group index assuming all groups are of the same size + int i = procIdx / theProcessorGroups[0].numProcs; + // Make sure the approximation is a valid group index + if (i >= ProcessorGroupInfo::NumGroups) i = ProcessorGroupInfo::NumGroups-1; + // Now adjust the approximation up or down + if ( theProcessorGroups[i].numProcsRunningTotal > HoleAdjusted(procIdx, i) ) { + while ( theProcessorGroups[i].numProcsRunningTotal - theProcessorGroups[i].numProcs > HoleAdjusted(procIdx, i) ) { + __TBB_ASSERT( i > 0, NULL ); + --i; + } + } + else { + do { + ++i; + } while ( theProcessorGroups[i].numProcsRunningTotal <= HoleAdjusted(procIdx, i) ); + } + __TBB_ASSERT( i < ProcessorGroupInfo::NumGroups, NULL ); + return i; +} + +void MoveThreadIntoProcessorGroup( void* hThread, int groupIndex ) { + __TBB_ASSERT( hardware_concurrency_info == initialization_complete, "MoveThreadIntoProcessorGroup is used before AvailableHwConcurrency" ); + if ( !TBB_SetThreadGroupAffinity ) + return; + TBB_GROUP_AFFINITY ga = { theProcessorGroups[groupIndex].mask, (WORD)groupIndex, {0,0,0} }; + TBB_SetThreadGroupAffinity( hThread, &ga, NULL ); +} + +#else + #error AvailableHwConcurrency is not implemented in this OS +#endif /* OS */ + +} // namespace internal +} // namespace tbb + +#endif /* !__TBB_HardwareConcurrency */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_resource.rc b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_resource.rc new file mode 100644 index 0000000000..e143e755e5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_resource.rc @@ -0,0 +1,126 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include <winresrc.h> +#define ENDL "\r\n" +#include "tbb_version.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +//#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// manifest integration +#ifdef TBB_MANIFEST +#include "winuser.h" +2 RT_MANIFEST tbbmanifest.exe.manifest +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION TBB_VERNUMBERS + PRODUCTVERSION TBB_VERNUMBERS + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "Intel Corporation\0" + VALUE "FileDescription", "Threading Building Blocks library\0" + VALUE "FileVersion", TBB_VERSION "\0" +//what is it? VALUE "InternalName", "tbb\0" + VALUE "LegalCopyright", "Copyright 2005-2013 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalTrademarks", "\0" +#ifndef TBB_USE_DEBUG + VALUE "OriginalFilename", "tbb.dll\0" +#else + VALUE "OriginalFilename", "tbb_debug.dll\0" +#endif + VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0" + VALUE "ProductVersion", TBB_VERSION "\0" + VALUE "Comments", TBB_VERSION_STRINGS "\0" + VALUE "PrivateBuild", "\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +//#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.cpp new file mode 100644 index 0000000000..a21c226c38 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.cpp @@ -0,0 +1,195 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb_statistics.h" + +#if __TBB_STATISTICS + +#include <climits> +#include <cstdarg> +#if __TBB_STATISTICS_STDOUT +#include <cstdio> +#endif + +#include "tbb/spin_mutex.h" + +namespace tbb { +namespace internal { + +//! Human readable titles of statistics groups defined by statistics_groups enum. +/** The order of this vector elements must correspond to the statistics_counters + structure layout. **/ +const char* StatGroupTitles[] = { + "task objects", "tasks executed", "stealing attempts", "task proxies", "arena", "market", "priority ops", "prio ops details" +}; + +//! Human readable titles of statistics elements defined by statistics_counters struct. +/** The order of this vector elements must correspond to the statistics_counters + structure layout (with NULLs interspersed to separate groups). **/ +const char* StatFieldTitles[] = { + /*task objects*/ "active", "freed", "big", NULL, + /*tasks executed*/ "total", "w/o spawn", NULL, + /*stealing attempts*/ "succeeded", "failed", "conflicts", "backoffs", NULL, + /*task proxies*/ "mailed", "revoked", "stolen", "bypassed", "ignored", NULL, + /*arena*/ "switches", "roundtrips", "avg.conc", "avg.allot", NULL, + /*market*/ "roundtrips", NULL, + /*priority ops*/ "ar.switch", "mkt.switch", "ar.reset", "ref.fixup", "avg.ar.pr", "avg.mkt.pr", NULL, + /*prio ops details*/ "winnows", "reloads", "orphaned", "winnowed", "reloaded", NULL +}; + +//! Class for logging statistics +/** There should be only one instance of this class. + Results are written to a file "statistics.txt" in tab-separated format. */ +class statistics_logger { +public: + statistics_logger () { + __TBB_ASSERT( sg_end - 1 == 1 << (sizeof(StatGroupTitles)/sizeof(*StatGroupTitles) - 1), NULL ); + + my_file = fopen("statistics.txt","w"); + if( !my_file ) + perror("fopen(\"statistics.txt\"\")"); + // Initialize groups dump layout info + group_start_field[0] = 0; + for ( size_t i = 0, j = 0; i < NumGroups; ++i, ++j ) { + __TBB_ASSERT( StatFieldTitles[j], "Empty group occurred" ); + while ( StatFieldTitles[j] ) + ++j; + group_start_field[i + 1] = j - i; // -i accounts for preceding NULL separators + } + __TBB_ASSERT( group_start_field[NumGroups] == statistics_counters::size(), + "Wrong number of elements in StatFieldTitles" ); + dump( "%-*s", IDColumnWidth, ""); + process_groups( &statistics_logger::print_group_title ); + dump( "%-*s", IDColumnWidth, "ID"); + process_groups( &statistics_logger::print_field_titles ); + } + + ~statistics_logger () { fclose(my_file); } + + void record( const statistics_counters& c, size_t id ) { + spin_mutex::scoped_lock lock(my_mutex); + counters_to_dump = &c; +#if __TBB_STATISTICS_TOTALS_ONLY + if ( id == arena_counters_total ) { + dump( "%-*s", IDColumnWidth, "Tot" ); + process_groups( &statistics_logger::print_field_values ); + } +#else /* !__TBB_STATISTICS_TOTALS_ONLY */ + const char* idString = NULL; + switch ( id ) { + case 0: + idString = "M"; break; + case workers_counters_total: + idString = "Wtot"; break; + case arena_counters_total: + idString = "Tot"; break; + default: + dump( "W%-*u", IDColumnWidth - 1, id ); + } + if ( idString ) + dump( "%-*s", IDColumnWidth, idString ); + process_groups( &statistics_logger::print_field_values ); +#endif /* !__TBB_STATISTICS_TOTALS_ONLY */ + } +private: + static const size_t IDColumnWidth = 5; + static const size_t StatisticsColumnWidth = 10; + static const size_t NumGroups = sizeof(StatGroupTitles)/sizeof(char*); + + //! File into which statistics are written. + FILE* my_file; + //! Mutex that serializes accesses to my_file + spin_mutex my_mutex; + //! Indices of the each group's first field in statistics_counters struct. + /** An extra element is used to track the total number of statistics fields. **/ + size_t group_start_field[NumGroups + 1]; + //! Currently processed set of counters. + const statistics_counters* counters_to_dump; + + static const size_t NumFields = sizeof(StatFieldTitles)/sizeof(*StatFieldTitles) - NumGroups; + bool averages_fields[NumFields]; + + void dump ( char const* fmt, ... ) { + va_list args; + if ( my_file ) { + va_start( args, fmt ); + vfprintf( my_file, fmt, args ); + va_end( args ); + } +#if __TBB_STATISTICS_STDOUT + va_start( args, fmt ); + vprintf( fmt, args ); + va_end( args ); +#endif + } + + void process_groups ( void (statistics_logger::*per_group_action)(size_t group_idx) ) { + for ( size_t i = 0, group_flag = 1; i < NumGroups; ++i, group_flag <<= 1 ) { + __TBB_ASSERT( group_flag < sg_end, "StatGroupTitles contents is incompatible with statistics_groups definition" ); + if ( __TBB_ActiveStatisticsGroups & group_flag ) + (this->*per_group_action)( i ); + } + dump( "\n" ); + } + + void print_group_title ( size_t group_idx ) { + dump( "%-*s", (group_start_field[group_idx + 1] - group_start_field[group_idx]) * (StatisticsColumnWidth + 1), + StatGroupTitles[group_idx] ); + } + + void print_field_titles ( size_t group_idx ) { + // +group_idx accounts for preceding NULL separators + size_t i = group_start_field[group_idx] + group_idx; + while ( StatFieldTitles[i] ) { + averages_fields[i - group_idx] = strncmp(StatFieldTitles[i], "avg.", 4) == 0; + dump( "%-*s ", StatisticsColumnWidth, StatFieldTitles[i++] ); + } + } + + void print_field_values ( size_t group_idx ) { + size_t begin = group_start_field[group_idx], + end = group_start_field[group_idx + 1]; + for ( size_t i = begin; i < end; ++i ) { + if ( averages_fields[i] ) + dump( "%-*.2f ", StatisticsColumnWidth, (double)counters_to_dump->field(i)/counters_to_dump->tasks_executed ); + else + dump( "%-*ld ", StatisticsColumnWidth, counters_to_dump->field(i) ); + } + } +}; // class statistics_logger + +static statistics_logger the_statistics; + +void dump_statistics ( const statistics_counters& c, size_t id ) { + the_statistics.record(c, id); +} + +} // namespace internal +} // namespace tbb + +#endif /* __TBB_STATISTICS */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.h new file mode 100644 index 0000000000..3f907a48d0 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_statistics.h @@ -0,0 +1,248 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_tbb_statistics_H +#define _TBB_tbb_statistics_H + +/** + This file defines parameters of the internal statistics collected by the TBB + library (currently by the task scheduler only). + + Statistics is accumulated separately in each thread and is dumped when + the scheduler instance associated with the given thread is destroyed. + For apps with multiple master threads or with the same master repeatedly + initializing and then deinitializing task scheduler this results in TBB + workers statistics getting inseparably mixed. + + Therefore statistics is accumulated in arena slots, and should be dumped + when arena is destroyed. This separates statistics collected for each + scheduler activity region in each master thread. + + With the current RML implementation (TBB 2.2, 3.0) to avoid complete loss of + statistics data during app shutdown (because of lazy workers deinitialization + logic) set __TBB_STATISTICS_EARLY_DUMP macro to write the statistics at the + moment a master thread deinitializes its scheduler. This may happen a little + earlier than the moment of arena destruction resulting in the following undesired + (though usually tolerable) effects: + - a few events related to unsuccessful stealing or thread pool activity may be lost, + - statistics may be substantially incomplete in case of FIFO tasks used in + the FAF mode. + + Macro __TBB_STATISTICS_STDOUT and global variable __TBB_ActiveStatisticsGroups + defined below can be used to configure the statistics output. + + To add new counter: + 1) Insert it into the appropriate group range in statistics_counters; + 2) Insert the corresponding field title into StatFieldTitles (preserving + relative order of the fields). + + To add new counters group: + 1) Insert new group bit flag into statistics_groups; + 2) Insert the new group title into StatGroupTitles (preserving + relative order of the groups). + 3) Add counter belonging to the new group as described above +**/ + +#include "tbb/tbb_stddef.h" + +#ifndef __TBB_STATISTICS +#define __TBB_STATISTICS 0 +#endif /* __TBB_STATISTICS */ + +#if __TBB_STATISTICS + +#include <string.h> // for memset + +//! Dump counters into stdout as well. +/** By default statistics counters are written to the file "statistics.txt" only. **/ +#define __TBB_STATISTICS_STDOUT 1 + +//! Dump only totals for all threads in the given arena +/** By default statistics counters for each arena slot are dumped separately, as + well as the subtotal for workers. **/ +#define __TBB_STATISTICS_TOTALS_ONLY 1 + +//! Dump statistics for an arena when its master completes +/** By default (when this macro is not set) the statistics is sent to output when + arena object is destroyed. But with the current lazy workers termination + logic default behavior may result in loosing all statistics output. **/ +#define __TBB_STATISTICS_EARLY_DUMP 1 + +#define GATHER_STATISTIC(x) (x) + +namespace tbb { +namespace internal { + +//! Groups of statistics counters. +/** The order of enumerators must be the same as the order of the corresponding + field groups in the statistics_counters structure. **/ +enum statistics_groups { + sg_task_allocation = 0x01, + sg_task_execution = 0x02, + sg_stealing = 0x04, + sg_affinity = 0x08, + sg_arena = 0x10, + sg_market = 0x20, + sg_prio = 0x40, + sg_prio_ex = 0x80, + // List end marker. Insert new groups only before it. + sg_end +}; + +//! Groups of counters to output +const uintptr_t __TBB_ActiveStatisticsGroups = sg_task_execution | sg_stealing | sg_affinity | sg_arena | sg_market; + +//! A set of various statistics counters that are updated by the library on per thread basis. +/** All the fields must be of the same type (statistics_counters::counter_type). + This is necessary to allow reinterpreting this structure as an array. **/ +struct statistics_counters { + typedef long counter_type; + + // Group: sg_task_allocation + // Counters in this group can have negative values as the tasks migrate across + // threads while the associated counters are updated in the current thread only + // to avoid data races + + //! Number of tasks allocated and not yet destroyed + counter_type active_tasks; + //! Number of task corpses stored for future reuse + counter_type free_list_length; + //! Number of big tasks allocated during the run + /** To find total number of tasks malloc'd, compute (big_tasks+my_small_task_count) */ + counter_type big_tasks; + + // Group: sg_task_execution + + //! Number of tasks executed + counter_type tasks_executed; + //! Number of elided spawns + counter_type spawns_bypassed; + + // Group: sg_stealing + + //! Number of tasks successfully stolen + counter_type steals_committed; + //! Number of failed stealing attempts + counter_type steals_failed; + //! Number of failed attempts to lock victim's task pool + counter_type thieves_conflicts; + //! Number of times thief backed off because of the collision with the owner + counter_type thief_backoffs; + + // Group: sg_affinity + + //! Number of tasks received from mailbox + counter_type mails_received; + //! Number of affinitized tasks executed by the owner + /** Goes as "revoked" in statistics printout. **/ + counter_type proxies_executed; + //! Number of affinitized tasks intercepted by thieves + counter_type proxies_stolen; + //! Number of proxy bypasses by thieves during stealing + counter_type proxies_bypassed; + //! Number of affinitized tasks executed by the owner via scheduler bypass mechanism + counter_type affinity_ignored; + + // Group: sg_arena + + //! Number of times the state of arena switched between "full" and "empty" + counter_type gate_switches; + //! Number of times workers left an arena and returned into the market + counter_type arena_roundtrips; + // !Average concurrency level of this arena + counter_type avg_arena_concurrency; + //! Average assigned priority + counter_type avg_assigned_workers; + + // Group: sg_market + + //! Number of times workers left the market and returned into RML + counter_type market_roundtrips; + + // Group; sg_prio + + //! Number of arena priority switches + counter_type arena_prio_switches; + //! Number of market priority switches + counter_type market_prio_switches; + //! Number of arena priority switches + counter_type arena_prio_resets; + //! Number of reference priority source fixups to avoid deadlock + counter_type prio_ref_fixups; + //! Average arena priority + counter_type avg_arena_prio; + //! Average market priority + counter_type avg_market_prio; + + // Group; sg_prio_ex + + //! Number of times local task pools were winnowed + counter_type prio_winnowings; + //! Number of times secondary task pools were searched for top priority tasks + counter_type prio_reloads; + //! Number of times secondary task pools were abandoned by quitting workers + counter_type prio_orphanings; + //! Number of tasks offloaded into secondary task pools + counter_type prio_tasks_offloaded; + //! Number of tasks reloaded from secondary task pools + counter_type prio_tasks_reloaded; + + // Constructor and helpers + + statistics_counters() { reset(); } + + void reset () { memset( this, 0, sizeof(statistics_counters) ); } + + counter_type& field ( size_t index ) { return reinterpret_cast<counter_type*>(this)[index]; } + + const counter_type& field ( size_t index ) const { return reinterpret_cast<const counter_type*>(this)[index]; } + + static size_t size () { return sizeof(statistics_counters) / sizeof(counter_type); } + + const statistics_counters& operator += ( const statistics_counters& rhs ) { + for ( size_t i = 0; i < size(); ++i ) + field(i) += rhs.field(i); + return *this; + } +}; // statistics_counters + +static const size_t workers_counters_total = (size_t)-1; +static const size_t arena_counters_total = (size_t)-2; + +void dump_statistics ( const statistics_counters& c, size_t id ); + +} // namespace internal +} // namespace tbb + +#else /* !__TBB_STATISTICS */ + +#define GATHER_STATISTIC(x) ((void)0) + +#endif /* !__TBB_STATISTICS */ + +#endif /* _TBB_tbb_statistics_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_thread.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_thread.cpp new file mode 100644 index 0000000000..20ac0b6898 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_thread.cpp @@ -0,0 +1,195 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#if _WIN32||_WIN64 +#include <process.h> // _beginthreadex() +#endif +#include "tbb_misc.h" // handle_win_error(), ThreadStackSize +#include "tbb/tbb_stddef.h" +#include "tbb/tbb_thread.h" +#include "tbb/tbb_allocator.h" +#include "governor.h" // default_num_threads() +#if __TBB_WIN8UI_SUPPORT +#include <thread> +#endif + +namespace tbb { +namespace internal { + +//! Allocate a closure +void* allocate_closure_v3( size_t size ) +{ + return allocate_via_handler_v3( size ); +} + +//! Free a closure allocated by allocate_closure_v3 +void free_closure_v3( void *ptr ) +{ + deallocate_via_handler_v3( ptr ); +} + +void tbb_thread_v3::join() +{ + __TBB_ASSERT( joinable(), "thread should be joinable when join called" ); +#if _WIN32||_WIN64 +#if __TBB_WIN8UI_SUPPORT + std::thread* thread_tmp=(std::thread*)my_thread_id; + thread_tmp->join(); + delete thread_tmp; +#else // __TBB_WIN8UI_SUPPORT + DWORD status = WaitForSingleObjectEx( my_handle, INFINITE, FALSE ); + if ( status == WAIT_FAILED ) + handle_win_error( GetLastError() ); + BOOL close_stat = CloseHandle( my_handle ); + if ( close_stat == 0 ) + handle_win_error( GetLastError() ); + my_thread_id = 0; +#endif // __TBB_WIN8UI_SUPPORT +#else + int status = pthread_join( my_handle, NULL ); + if( status ) + handle_perror( status, "pthread_join" ); +#endif // _WIN32||_WIN64 + my_handle = 0; +} + +void tbb_thread_v3::detach() { + __TBB_ASSERT( joinable(), "only joinable thread can be detached" ); +#if _WIN32||_WIN64 + BOOL status = CloseHandle( my_handle ); + if ( status == 0 ) + handle_win_error( GetLastError() ); + my_thread_id = 0; +#else + int status = pthread_detach( my_handle ); + if( status ) + handle_perror( status, "pthread_detach" ); +#endif // _WIN32||_WIN64 + my_handle = 0; +} + +void tbb_thread_v3::internal_start( __TBB_NATIVE_THREAD_ROUTINE_PTR(start_routine), + void* closure ) { +#if _WIN32||_WIN64 +#if __TBB_WIN8UI_SUPPORT + std::thread* thread_tmp=new std::thread(start_routine, closure); + my_handle = thread_tmp->native_handle(); +// TODO: to find out the way to find thread_id without GetThreadId and other +// desktop functions. +// Now tbb_thread does have its own thread_id that stores std::thread object + my_thread_id = (size_t)thread_tmp; +#else + unsigned thread_id; + // The return type of _beginthreadex is "uintptr_t" on new MS compilers, + // and 'unsigned long' on old MS compilers. uintptr_t works for both. + uintptr_t status = _beginthreadex( NULL, ThreadStackSize, start_routine, + closure, 0, &thread_id ); + if( status==0 ) + handle_perror(errno,"__beginthreadex"); + else { + my_handle = (HANDLE)status; + my_thread_id = thread_id; + } +#endif +#else + pthread_t thread_handle; + int status; + pthread_attr_t stack_size; + status = pthread_attr_init( &stack_size ); + if( status ) + handle_perror( status, "pthread_attr_init" ); + status = pthread_attr_setstacksize( &stack_size, ThreadStackSize ); + if( status ) + handle_perror( status, "pthread_attr_setstacksize" ); + + status = pthread_create( &thread_handle, &stack_size, start_routine, closure ); + if( status ) + handle_perror( status, "pthread_create" ); + + my_handle = thread_handle; +#endif // _WIN32||_WIN64 +} + +unsigned tbb_thread_v3::hardware_concurrency() { + return governor::default_num_threads(); +} + +tbb_thread_v3::id thread_get_id_v3() { +#if _WIN32||_WIN64 + return tbb_thread_v3::id( GetCurrentThreadId() ); +#else + return tbb_thread_v3::id( pthread_self() ); +#endif // _WIN32||_WIN64 +} + +void move_v3( tbb_thread_v3& t1, tbb_thread_v3& t2 ) +{ + if (t1.joinable()) + t1.detach(); + t1.my_handle = t2.my_handle; + t2.my_handle = 0; +#if _WIN32||_WIN64 + t1.my_thread_id = t2.my_thread_id; + t2.my_thread_id = 0; +#endif // _WIN32||_WIN64 +} + +void thread_yield_v3() +{ + __TBB_Yield(); +} + +void thread_sleep_v3(const tick_count::interval_t &i) +{ +#if _WIN32||_WIN64 + tick_count t0 = tick_count::now(); + tick_count t1 = t0; + for(;;) { + double remainder = (i-(t1-t0)).seconds()*1e3; // milliseconds remaining to sleep + if( remainder<=0 ) break; + DWORD t = remainder>=INFINITE ? INFINITE-1 : DWORD(remainder); +#if !__TBB_WIN8UI_SUPPORT + Sleep( t ); +#else + std::chrono::milliseconds sleep_time( t ); + std::this_thread::sleep_for( sleep_time ); +#endif + t1 = tick_count::now(); + } +#else + struct timespec req; + double sec = i.seconds(); + + req.tv_sec = static_cast<long>(sec); + req.tv_nsec = static_cast<long>( (sec - req.tv_sec)*1e9 ); + nanosleep(&req, NULL); +#endif // _WIN32||_WIN64 +} + +} // internal +} // tbb diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_version.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_version.h new file mode 100644 index 0000000000..ce0cfe8767 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tbb_version.h @@ -0,0 +1,127 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +// Please define version number in the file: +#include "tbb/tbb_stddef.h" + +// And don't touch anything below +#ifndef ENDL +#define ENDL "\n" +#endif +#include "version_string.ver" + +#ifndef __TBB_VERSION_STRINGS +#pragma message("Warning: version_string.ver isn't generated properly by version_info.sh script!") +// here is an example of macros value: +#define __TBB_VERSION_STRINGS \ +"TBB: BUILD_HOST\tUnknown\n" \ +"TBB: BUILD_ARCH\tUnknown\n" \ +"TBB: BUILD_OS\t\tUnknown\n" \ +"TBB: BUILD_CL\t\tUnknown\n" \ +"TBB: BUILD_COMPILER\tUnknown\n" \ +"TBB: BUILD_COMMAND\tUnknown\n" +#endif +#ifndef __TBB_DATETIME +#ifdef RC_INVOKED +#define __TBB_DATETIME "Unknown" +#else +#define __TBB_DATETIME __DATE__ __TIME__ +#endif +#endif + +#define __TBB_VERSION_NUMBER(N) #N ": VERSION\t\t" __TBB_STRING(TBB_VERSION_MAJOR.TBB_VERSION_MINOR) ENDL +#define __TBB_INTERFACE_VERSION_NUMBER(N) #N ": INTERFACE VERSION\t" __TBB_STRING(TBB_INTERFACE_VERSION) ENDL + +#define __TBB_VERSION_DATETIME(N) #N ": BUILD_DATE\t\t" __TBB_DATETIME ENDL +#ifndef TBB_USE_DEBUG + #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\tundefined" ENDL +#elif TBB_USE_DEBUG==0 + #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t0" ENDL +#elif TBB_USE_DEBUG==1 + #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t1" ENDL +#elif TBB_USE_DEBUG==2 + #define __TBB_VERSION_USE_DEBUG(N) #N ": TBB_USE_DEBUG\t2" ENDL +#else + #error Unexpected value for TBB_USE_DEBUG +#endif + +/* Make __TBB_VERSION_USE_ASSERT and __TBB_VERSION_DO_NOTIFY empty for rc + * because rc from VS2005 crashed with fatal error RC10056 for too complex + * macros (for example, when __TBB_CPF_BUILD is enabled). + * All information is available in BUILD_COMMAND anyway. + */ + +#ifdef RC_INVOKED + #define __TBB_VERSION_USE_ASSERT(N) +#else // RC_INVOKED +#ifndef TBB_USE_ASSERT + #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\tundefined" ENDL +#elif TBB_USE_ASSERT==0 + #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t0" ENDL +#elif TBB_USE_ASSERT==1 + #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t1" ENDL +#elif TBB_USE_ASSERT==2 + #define __TBB_VERSION_USE_ASSERT(N) #N ": TBB_USE_ASSERT\t2" ENDL +#else + #error Unexpected value for TBB_USE_ASSERT +#endif +#endif // RC_INVOKED + +#ifndef __TBB_CPF_BUILD + #define __TBB_VERSION_TBB_PREVIEW_BINARY(N) +#else + #define __TBB_VERSION_TBB_PREVIEW_BINARY(N) #N ": TBB_PREVIEW_BINARY\t1" ENDL +#endif + +#ifdef RC_INVOKED + #define __TBB_VERSION_DO_NOTIFY(N) +#else +#ifndef DO_ITT_NOTIFY + #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\tundefined" ENDL +#elif DO_ITT_NOTIFY==1 + #define __TBB_VERSION_DO_NOTIFY(N) #N ": DO_ITT_NOTIFY\t1" ENDL +#elif DO_ITT_NOTIFY==0 + #define __TBB_VERSION_DO_NOTIFY(N) +#else + #error Unexpected value for DO_ITT_NOTIFY +#endif +#endif // RC_INVOKED + +#define TBB_VERSION_STRINGS_P(N) __TBB_VERSION_NUMBER(N) __TBB_INTERFACE_VERSION_NUMBER(N) __TBB_VERSION_DATETIME(N) __TBB_VERSION_STRINGS(N) __TBB_VERSION_USE_DEBUG(N) __TBB_VERSION_USE_ASSERT(N) __TBB_VERSION_TBB_PREVIEW_BINARY(N) __TBB_VERSION_DO_NOTIFY(N) + +#define TBB_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBB) +#define TBBMALLOC_VERSION_STRINGS TBB_VERSION_STRINGS_P(TBBmalloc) + +// numbers +#ifndef __TBB_VERSION_YMD +#define __TBB_VERSION_YMD 0, 0 +#endif + +#define TBB_VERNUMBERS TBB_VERSION_MAJOR, TBB_VERSION_MINOR, __TBB_VERSION_YMD + +#define TBB_VERSION __TBB_STRING(TBB_VERNUMBERS) diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tls.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tls.h new file mode 100644 index 0000000000..5e85cc2276 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tls.h @@ -0,0 +1,132 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_tls_H +#define _TBB_tls_H + +#if USE_PTHREAD +#include <pthread.h> +#else /* assume USE_WINTHREAD */ +#include "tbb/machine/windows_api.h" +#endif + +namespace tbb { + +namespace internal { + +typedef void (*tls_dtor_t)(void*); + +//! Basic cross-platform wrapper class for TLS operations. +template <typename T> +class basic_tls { +#if USE_PTHREAD + typedef pthread_key_t tls_key_t; +public: + int create( tls_dtor_t dtor = NULL ) { + return pthread_key_create(&my_key, dtor); + } + int destroy() { return pthread_key_delete(my_key); } + void set( T value ) { pthread_setspecific(my_key, (void*)value); } + T get() { return (T)pthread_getspecific(my_key); } +#else /* USE_WINTHREAD */ + typedef DWORD tls_key_t; +public: +#if !__TBB_WIN8UI_SUPPORT + int create() { + tls_key_t tmp = TlsAlloc(); + if( tmp==TLS_OUT_OF_INDEXES ) + return TLS_OUT_OF_INDEXES; + my_key = tmp; + return 0; + } + int destroy() { TlsFree(my_key); my_key=0; return 0; } + void set( T value ) { TlsSetValue(my_key, (LPVOID)value); } + T get() { return (T)TlsGetValue(my_key); } +#else /*!__TBB_WIN8UI_SUPPORT*/ + int create() { + tls_key_t tmp = FlsAlloc(NULL); + if( tmp== (DWORD)0xFFFFFFFF ) + return (DWORD)0xFFFFFFFF; + my_key = tmp; + return 0; + } + int destroy() { FlsFree(my_key); my_key=0; return 0; } + void set( T value ) { FlsSetValue(my_key, (LPVOID)value); } + T get() { return (T)FlsGetValue(my_key); } +#endif /* !__TBB_WIN8UI_SUPPORT */ +#endif /* USE_WINTHREAD */ +private: + tls_key_t my_key; +}; + +//! More advanced TLS support template class. +/** It supports RAII and to some extent mimic __declspec(thread) variables. */ +template <typename T> +class tls : public basic_tls<T> { + typedef basic_tls<T> base; +public: + tls() { base::create(); } + ~tls() { base::destroy(); } + T operator=(T value) { base::set(value); return value; } + operator T() { return base::get(); } +}; + +template <typename T> +class tls<T*> : basic_tls<T*> { + typedef basic_tls<T*> base; + static void internal_dtor(void* ptr) { + if (ptr) delete (T*)ptr; + } + T* internal_get() { + T* result = base::get(); + if (!result) { + result = new T; + base::set(result); + } + return result; + } +public: + tls() { +#if USE_PTHREAD + base::create( internal_dtor ); +#else + base::create(); +#endif + } + ~tls() { base::destroy(); } + T* operator=(T* value) { base::set(value); return value; } + operator T*() { return internal_get(); } + T* operator->() { return internal_get(); } + T& operator*() { return *internal_get(); } +}; + +} // namespace internal + +} // namespace tbb + +#endif /* _TBB_tls_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/disable_warnings.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/disable_warnings.h new file mode 100644 index 0000000000..7540a0f051 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/disable_warnings.h @@ -0,0 +1,47 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "ittnotify_config.h" + +#if ITT_PLATFORM==ITT_PLATFORM_WIN + +#pragma warning (disable: 593) /* parameter "XXXX" was set but never used */ +#pragma warning (disable: 344) /* typedef name has already been declared (with same type) */ +#pragma warning (disable: 174) /* expression has no effect */ +#pragma warning (disable: 4127) /* conditional expression is constant */ +#pragma warning (disable: 4306) /* conversion from '?' to '?' of greater size */ + +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#if defined __INTEL_COMPILER + +#pragma warning (disable: 869) /* parameter "XXXXX" was never referenced */ +#pragma warning (disable: 1418) /* external function definition with no prior declaration */ +#pragma warning (disable: 1419) /* external declaration in primary source file */ + +#endif /* __INTEL_COMPILER */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/internal/ittnotify.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/internal/ittnotify.h new file mode 100644 index 0000000000..68ea7c2d87 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/internal/ittnotify.h @@ -0,0 +1,661 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _INTERNAL_ITTNOTIFY_H_ +#define _INTERNAL_ITTNOTIFY_H_ +/** + * @file + * @brief Internal User API functions and types + */ + +/** @cond exclude_from_documentation */ +#ifndef ITT_OS_WIN +# define ITT_OS_WIN 1 +#endif /* ITT_OS_WIN */ + +#ifndef ITT_OS_LINUX +# define ITT_OS_LINUX 2 +#endif /* ITT_OS_LINUX */ + +#ifndef ITT_OS_MAC +# define ITT_OS_MAC 3 +#endif /* ITT_OS_MAC */ + +#ifndef ITT_OS +# if defined WIN32 || defined _WIN32 +# define ITT_OS ITT_OS_WIN +# elif defined( __APPLE__ ) && defined( __MACH__ ) +# define ITT_OS ITT_OS_MAC +# else +# define ITT_OS ITT_OS_LINUX +# endif +#endif /* ITT_OS */ + +#ifndef ITT_PLATFORM_WIN +# define ITT_PLATFORM_WIN 1 +#endif /* ITT_PLATFORM_WIN */ + +#ifndef ITT_PLATFORM_POSIX +# define ITT_PLATFORM_POSIX 2 +#endif /* ITT_PLATFORM_POSIX */ + +#ifndef ITT_PLATFORM +# if ITT_OS==ITT_OS_WIN +# define ITT_PLATFORM ITT_PLATFORM_WIN +# else +# define ITT_PLATFORM ITT_PLATFORM_POSIX +# endif /* _WIN32 */ +#endif /* ITT_PLATFORM */ + +#include <stddef.h> +#include <stdarg.h> +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <tchar.h> +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#ifndef CDECL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define CDECL __cdecl +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# define CDECL /* nothing */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* CDECL */ + +#ifndef STDCALL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define STDCALL __stdcall +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# define STDCALL /* nothing */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* STDCALL */ + +#define ITTAPI CDECL +#define LIBITTAPI /* nothing */ + +#define ITT_JOIN_AUX(p,n) p##n +#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) + +#ifndef INTEL_ITTNOTIFY_PREFIX +# define INTEL_ITTNOTIFY_PREFIX __itt_ +#endif /* INTEL_ITTNOTIFY_PREFIX */ +#ifndef INTEL_ITTNOTIFY_POSTFIX +# define INTEL_ITTNOTIFY_POSTFIX _ptr_ +#endif /* INTEL_ITTNOTIFY_POSTFIX */ + +#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) +#define ITTNOTIFY_NAME(n) ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)) + +#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) +#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) + +#ifdef ITT_STUB +#undef ITT_STUB +#endif +#ifdef ITT_STUBV +#undef ITT_STUBV +#endif +#define ITT_STUBV(api,type,name,args,params) \ + typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ + extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); +#define ITT_STUB ITT_STUBV + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +/** @endcond */ + +/** + * @defgroup internal Internal API + * @{ + * @} + */ + +/** + * @defgroup makrs Marks + * @ingroup internal + * Marks group + * @warning Internal API: + * - It is not shipped to outside of Intel + * - It is delivered to internal Intel teams using e-mail or SVN access only + * @{ + */ +/** @brief user mark type */ +typedef int __itt_mark_type; + +/** + * @brief Creates a user mark type with the specified name using char or Unicode string. + * @param[in] name - name of mark to create + * @return Returns a handle to the mark type + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_mark_type ITTAPI __itt_mark_createA(const char *name); +__itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name); +#ifdef UNICODE +# define __itt_mark_create __itt_mark_createW +# define __itt_mark_create_ptr __itt_mark_createW_ptr +#else /* UNICODE */ +# define __itt_mark_create __itt_mark_createA +# define __itt_mark_create_ptr __itt_mark_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_mark_type ITTAPI __itt_mark_create(const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name), (name)) +ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name), (name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name), (name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA ITTNOTIFY_DATA(mark_createA) +#define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA) +#define __itt_mark_createW ITTNOTIFY_DATA(mark_createW) +#define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create ITTNOTIFY_DATA(mark_create) +#define __itt_mark_create_ptr ITTNOTIFY_NAME(mark_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA(name) (__itt_mark_type)0 +#define __itt_mark_createA_ptr 0 +#define __itt_mark_createW(name) (__itt_mark_type)0 +#define __itt_mark_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create(name) (__itt_mark_type)0 +#define __itt_mark_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA_ptr 0 +#define __itt_mark_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Creates a "discrete" user mark type of the specified type and an optional parameter using char or Unicode string. + * + * - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign. + * - The call is "synchronous" - function returns after mark is actually added to results. + * - This function is useful, for example, to mark different phases of application + * (beginning of the next mark automatically meand end of current region). + * - Can be used together with "continuous" marks (see below) at the same collection session + * @param[in] mt - mark, created by __itt_mark_create(const char* name) function + * @param[in] parameter - string parameter of mark + * @return Returns zero value in case of success, non-zero value otherwise. + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int ITTAPI __itt_markA(__itt_mark_type mt, const char *parameter); +int ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter); +#ifdef UNICODE +# define __itt_mark __itt_markW +# define __itt_mark_ptr __itt_markW_ptr +#else /* UNICODE */ +# define __itt_mark __itt_markA +# define __itt_mark_ptr __itt_markA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter), (mt, parameter)) +ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter), (mt, parameter)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter), (mt, parameter)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA ITTNOTIFY_DATA(markA) +#define __itt_markA_ptr ITTNOTIFY_NAME(markA) +#define __itt_markW ITTNOTIFY_DATA(markW) +#define __itt_markW_ptr ITTNOTIFY_NAME(markW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark ITTNOTIFY_DATA(mark) +#define __itt_mark_ptr ITTNOTIFY_NAME(mark) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA(mt, parameter) (int)0 +#define __itt_markA_ptr 0 +#define __itt_markW(mt, parameter) (int)0 +#define __itt_markW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark(mt, parameter) (int)0 +#define __itt_mark_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA_ptr 0 +#define __itt_markW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Use this if necessary to create a "discrete" user event type (mark) for process + * rather then for one thread + * @see int __itt_mark(__itt_mark_type mt, const char* parameter); + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char *parameter); +int ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter); +#ifdef UNICODE +# define __itt_mark_global __itt_mark_globalW +# define __itt_mark_global_ptr __itt_mark_globalW_ptr +#else /* UNICODE */ +# define __itt_mark_global __itt_mark_globalA +# define __itt_mark_global_ptr __itt_mark_globalA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter), (mt, parameter)) +ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter), (mt, parameter)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter), (mt, parameter)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA ITTNOTIFY_DATA(mark_globalA) +#define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA) +#define __itt_mark_globalW ITTNOTIFY_DATA(mark_globalW) +#define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global ITTNOTIFY_DATA(mark_global) +#define __itt_mark_global_ptr ITTNOTIFY_NAME(mark_global) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA(mt, parameter) (int)0 +#define __itt_mark_globalA_ptr 0 +#define __itt_mark_globalW(mt, parameter) (int)0 +#define __itt_mark_globalW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global(mt, parameter) (int)0 +#define __itt_mark_global_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA_ptr 0 +#define __itt_mark_globalW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Creates an "end" point for "continuous" mark with specified name. + * + * - Returns zero value in case of success, non-zero value otherwise. + * Also returns non-zero value when preceding "begin" point for the + * mark with the same name failed to be created or not created. + * - The mark of "continuous" type is placed to collection results in + * case of success. It appears in overtime view(s) as a special tick + * sign (different from "discrete" mark) together with line from + * corresponding "begin" mark to "end" mark. + * @note Continuous marks can overlap and be nested inside each other. + * Discrete mark can be nested inside marked region + * @param[in] mt - mark, created by __itt_mark_create(const char* name) function + * @return Returns zero value in case of success, non-zero value otherwise. + */ +int ITTAPI __itt_mark_off(__itt_mark_type mt); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt), (mt)) +#define __itt_mark_off ITTNOTIFY_DATA(mark_off) +#define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_mark_off(mt) (int)0 +#define __itt_mark_off_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_mark_off_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Use this if necessary to create an "end" point for mark of process + * @see int __itt_mark_off(__itt_mark_type mt); + */ +int ITTAPI __itt_mark_global_off(__itt_mark_type mt); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt), (mt)) +#define __itt_mark_global_off ITTNOTIFY_DATA(mark_global_off) +#define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_mark_global_off(mt) (int)0 +#define __itt_mark_global_off_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_mark_global_off_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} marks group */ + +/** + * @defgroup counters Counters + * @ingroup internal + * Counters group + * @{ + */ +/** + * @brief opaque structure for counter identification + */ +typedef struct ___itt_counter *__itt_counter; + +/** + * @brief Create a counter with given name/domain for the calling thread + * + * After __itt_counter_create() is called, __itt_counter_inc() / __itt_counter_inc_delta() can be used + * to increment the counter on any thread + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_counter ITTAPI __itt_counter_createA(const char *name, const char *domain); +__itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain); +#ifdef UNICODE +# define __itt_counter_create __itt_counter_createW +# define __itt_counter_create_ptr __itt_counter_createW_ptr +#else /* UNICODE */ +# define __itt_counter_create __itt_counter_createA +# define __itt_counter_create_ptr __itt_counter_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain), (name, domain)) +ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain), (name, domain)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain), (name, domain)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA ITTNOTIFY_DATA(counter_createA) +#define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA) +#define __itt_counter_createW ITTNOTIFY_DATA(counter_createW) +#define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create ITTNOTIFY_DATA(counter_create) +#define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA(name, domain) +#define __itt_counter_createA_ptr 0 +#define __itt_counter_createW(name, domain) +#define __itt_counter_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create(name, domain) +#define __itt_counter_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA_ptr 0 +#define __itt_counter_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() + */ +void ITTAPI __itt_counter_destroy(__itt_counter id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id), (id)) +#define __itt_counter_destroy ITTNOTIFY_VOID(counter_destroy) +#define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_destroy(id) +#define __itt_counter_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Increment the counter value + */ +void ITTAPI __itt_counter_inc(__itt_counter id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id), (id)) +#define __itt_counter_inc ITTNOTIFY_VOID(counter_inc) +#define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_inc(id) +#define __itt_counter_inc_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_inc_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Increment the counter value with x + */ +void ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value), (id, value)) +#define __itt_counter_inc_delta ITTNOTIFY_VOID(counter_inc_delta) +#define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_inc_delta(id, value) +#define __itt_counter_inc_delta_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_inc_delta_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} counters group */ + +/** + * @defgroup stitch Stack Stitching + * @ingroup internal + * Stack Stitching group + * @{ + */ +/** + * @brief opaque structure for counter identification + */ +typedef struct ___itt_caller *__itt_caller; + +/** + * @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to. + * The function returns a unique identifier which is used to match the cut points with corresponding stitch points. + */ +__itt_caller ITTAPI __itt_stack_caller_create(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void), ()) +#define __itt_stack_caller_create ITTNOTIFY_DATA(stack_caller_create) +#define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_caller_create() (__itt_caller)0 +#define __itt_stack_caller_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_caller_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Destroy the inforamtion about stitch point identified by the pointer previously returned by __itt_stack_caller_create() + */ +void ITTAPI __itt_stack_caller_destroy(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id), (id)) +#define __itt_stack_caller_destroy ITTNOTIFY_VOID(stack_caller_destroy) +#define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_caller_destroy(id) +#define __itt_stack_caller_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_caller_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Sets the cut point. Stack from each event which occurs after this call will be cut + * at the same stack level the function was called and stitched to the corresponding stitch point. + */ +void ITTAPI __itt_stack_callee_enter(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id), (id)) +#define __itt_stack_callee_enter ITTNOTIFY_VOID(stack_callee_enter) +#define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_callee_enter(id) +#define __itt_stack_callee_enter_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_callee_enter_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter(). + */ +void ITTAPI __itt_stack_callee_leave(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id), (id)) +#define __itt_stack_callee_leave ITTNOTIFY_VOID(stack_callee_leave) +#define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_callee_leave(id) +#define __itt_stack_callee_leave_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_callee_leave_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @} stitch group */ + +/* ***************************************************************************************************************************** */ + +/** @cond exclude_from_documentation */ +typedef enum __itt_error_code { + __itt_error_success = 0, /*!< no error */ + __itt_error_no_module = 1, /*!< module can't be loaded */ + /* %1$s -- library name; win: %2$d -- system error code; unx: %2$s -- system error message. */ + __itt_error_no_symbol = 2, /*!< symbol not found */ + /* %1$s -- library name, %2$s -- symbol name. */ + __itt_error_unknown_group = 3, /*!< unknown group specified */ + /* %1$s -- env var name, %2$s -- group name. */ + __itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */ + /* %1$s -- env var name, %2$d -- system error. */ + __itt_error_env_too_long = 5, /*!< variable value too long */ + /* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */ + __itt_error_system = 6 /*!< pthread_mutexattr_init or pthread_mutex_init failed */ + /* %1$s -- function name, %2$d -- errno. */ +} __itt_error_code; + +typedef void (__itt_error_notification_t)(__itt_error_code code, va_list); +__itt_error_notification_t* __itt_set_error_handler(__itt_error_notification_t*); + +const char* ITTAPI __itt_api_version(void); +/** @endcond */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler) +void __itt_error_handler(__itt_error_code code, va_list args); +extern const int ITTNOTIFY_NAME(err); +#define __itt_err ITTNOTIFY_NAME(err) +ITT_STUB(ITTAPI, const char*, api_version, (void), ()) +#define __itt_api_version ITTNOTIFY_DATA(api_version) +#define __itt_api_version_ptr ITTNOTIFY_NAME(api_version) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_api_version() (const char*)0 +#define __itt_api_version_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_api_version_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @cond exclude_from_documentation */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ +/** @endcond */ + +#endif /* _INTERNAL_ITTNOTIFY_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify.h new file mode 100644 index 0000000000..9142709725 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify.h @@ -0,0 +1,3369 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _ITTNOTIFY_H_ +#define _ITTNOTIFY_H_ + +/** +@file +@brief Public User API functions and types +@mainpage + +The ITT API is used to annotate a user's program with additional information +that can be used by correctness and performance tools. The user inserts +calls in their program. Those calls generate information that is collected +at runtime, and used by tools such as Amplifier and Inspector. + +@section API Concepts +The following general concepts are used throughout the API. + +@subsection Unicode Support +Many API functions take character string arguments. On Windows, there +are two versions of each such function. The function name is suffixed +by W if Unicode support is enabled, and by A otherwise. Any API function +that takes a character string argument adheres to this convention. + +@subsection Conditional Compilation +Many users prefer having an option to modify ITT API code when linking it +inside their runtimes. ITT API header file provides a mechanism to replace +ITT API function names inside your code with empty strings. To do this, +define the macros INTEL_NO_ITTNOTIFY_API during compilation and remove the +static library from the linker script. + +@subsection Domains +[see domains] +Domains provide a way to separate notification for different modules or +libraries in a program. Domains are specified by dotted character strings, +e.g. TBB.Internal.Control. + +A mechanism (to be specified) is provided to enable and disable +domains. By default, all domains are enabled. +@subsection Named Entities and Instances +Named entities (frames, regions, tasks, and markers) communicate +information about the program to the analysis tools. A named entity often +refers to a section of program code, or to some set of logical concepts +that the programmer wants to group together. + +Named entities relate to the programmer's static view of the program. When +the program actually executes, many instances of a given named entity +may be created. + +The API annotations denote instances of named entities. The actual +named entities are displayed using the analysis tools. In other words, +the named entities come into existence when instances are created. + +Instances of named entities may have instance identifiers (IDs). Some +API calls use instance identifiers to create relationships between +different instances of named entities. Other API calls associate data +with instances of named entities. + +Some named entities must always have instance IDs. In particular, regions +and frames always have IDs. Task and markers need IDs only if the ID is +needed in another API call (such as adding a relation or metadata). + +The lifetime of instance IDs is distinct from the lifetime of +instances. This allows various relationships to be specified separate +from the actual execution of instances. This flexibility comes at the +expense of extra API calls. + +The same ID may not be reused for different instances, unless a previous +[ref] __itt_id_destroy call for that ID has been issued. +*/ + +/** @cond exclude_from_documentation */ +#ifndef ITT_OS_WIN +# define ITT_OS_WIN 1 +#endif /* ITT_OS_WIN */ + +#ifndef ITT_OS_LINUX +# define ITT_OS_LINUX 2 +#endif /* ITT_OS_LINUX */ + +#ifndef ITT_OS_MAC +# define ITT_OS_MAC 3 +#endif /* ITT_OS_MAC */ + +#ifndef ITT_OS +# if defined WIN32 || defined _WIN32 +# define ITT_OS ITT_OS_WIN +# elif defined( __APPLE__ ) && defined( __MACH__ ) +# define ITT_OS ITT_OS_MAC +# else +# define ITT_OS ITT_OS_LINUX +# endif +#endif /* ITT_OS */ + +#ifndef ITT_PLATFORM_WIN +# define ITT_PLATFORM_WIN 1 +#endif /* ITT_PLATFORM_WIN */ + +#ifndef ITT_PLATFORM_POSIX +# define ITT_PLATFORM_POSIX 2 +#endif /* ITT_PLATFORM_POSIX */ + +#ifndef ITT_PLATFORM +# if ITT_OS==ITT_OS_WIN +# define ITT_PLATFORM ITT_PLATFORM_WIN +# else +# define ITT_PLATFORM ITT_PLATFORM_POSIX +# endif /* _WIN32 */ +#endif /* ITT_PLATFORM */ + +#if defined(_UNICODE) && !defined(UNICODE) +#define UNICODE +#endif + +#include <stddef.h> +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <tchar.h> +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#include <stdint.h> +#if defined(UNICODE) || defined(_UNICODE) +#include <wchar.h> +#endif /* UNICODE || _UNICODE */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#ifndef CDECL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define CDECL __cdecl +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define CDECL /* not actual on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define CDECL __attribute__ ((cdecl)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* CDECL */ + +#ifndef STDCALL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define STDCALL __stdcall +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define STDCALL /* not supported on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define STDCALL __attribute__ ((stdcall)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* STDCALL */ + +#define ITTAPI CDECL +#define LIBITTAPI CDECL + +/* TODO: Temporary for compatibility! */ +#define ITTAPI_CALL CDECL +#define LIBITTAPI_CALL CDECL + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +/* use __forceinline (VC++ specific) */ +#define INLINE __forceinline +#define INLINE_ATTRIBUTE /* nothing */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/* + * Generally, functions are not inlined unless optimization is specified. + * For functions declared inline, this attribute inlines the function even + * if no optimization level was specified. + */ +#ifdef __STRICT_ANSI__ +#define INLINE static +#else /* __STRICT_ANSI__ */ +#define INLINE static inline +#endif /* __STRICT_ANSI__ */ +#define INLINE_ATTRIBUTE __attribute__ ((always_inline)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/** @endcond */ + +#ifdef INTEL_ITTNOTIFY_ENABLE_LEGACY +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# pragma message("WARNING!!! Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro") +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +// #warning usage leads to ICC's compilation error +// # warning "Deprecated API is used. Please undefine INTEL_ITTNOTIFY_ENABLE_LEGACY macro" +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# include "legacy/ittnotify.h" +#endif /* INTEL_ITTNOTIFY_ENABLE_LEGACY */ + +/** @cond exclude_from_documentation */ +/* Helper macro for joining tokens */ +#define ITT_JOIN_AUX(p,n) p##n +#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) + +#ifdef ITT_MAJOR +#undef ITT_MAJOR +#endif +#ifdef ITT_MINOR +#undef ITT_MINOR +#endif +#define ITT_MAJOR 3 +#define ITT_MINOR 0 + +/* Standard versioning of a token with major and minor version numbers */ +#define ITT_VERSIONIZE(x) \ + ITT_JOIN(x, \ + ITT_JOIN(_, \ + ITT_JOIN(ITT_MAJOR, \ + ITT_JOIN(_, ITT_MINOR)))) + +#ifndef INTEL_ITTNOTIFY_PREFIX +# define INTEL_ITTNOTIFY_PREFIX __itt_ +#endif /* INTEL_ITTNOTIFY_PREFIX */ +#ifndef INTEL_ITTNOTIFY_POSTFIX +# define INTEL_ITTNOTIFY_POSTFIX _ptr_ +#endif /* INTEL_ITTNOTIFY_POSTFIX */ + +#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) +#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) + +#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) +#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) + +#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) +#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) +#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) +#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) +#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) +#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) +#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) +#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) +#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) +#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) +#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) +#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) +#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) +#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) + +#ifdef ITT_STUB +#undef ITT_STUB +#endif +#ifdef ITT_STUBV +#undef ITT_STUBV +#endif +#define ITT_STUBV(api,type,name,args) \ + typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ + extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); +#define ITT_STUB ITT_STUBV +/** @endcond */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** @cond exclude_from_gpa_documentation */ +/** + * @defgroup public Public API + * @{ + * @} + */ + +/** + * @defgroup control Collection Control + * @ingroup public + * General behavior: application continues to run, but no profiling information is being collected + * + * Pausing occurs not only for the current thread but for all process as well as spawned processes + * - Intel(R) Parallel Inspector and Intel(R) Inspector XE: + * - Does not analyze or report errors that involve memory access. + * - Other errors are reported as usual. Pausing data collection in + * Intel(R) Parallel Inspector and Intel(R) Inspector XE + * only pauses tracing and analyzing memory access. + * It does not pause tracing or analyzing threading APIs. + * . + * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE: + * - Does continue to record when new threads are started. + * . + * - Other effects: + * - Possible reduction of runtime overhead. + * . + * @{ + */ +/** @brief Pause collection */ +void ITTAPI __itt_pause(void); +/** @brief Resume collection */ +void ITTAPI __itt_resume(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, pause, (void)) +ITT_STUBV(ITTAPI, void, resume, (void)) +#define __itt_pause ITTNOTIFY_VOID(pause) +#define __itt_pause_ptr ITTNOTIFY_NAME(pause) +#define __itt_resume ITTNOTIFY_VOID(resume) +#define __itt_resume_ptr ITTNOTIFY_NAME(resume) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_pause() +#define __itt_pause_ptr 0 +#define __itt_resume() +#define __itt_resume_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_pause_ptr 0 +#define __itt_resume_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} control group */ +/** @endcond */ + +/** + * @defgroup threads Threads + * @ingroup public + * Give names to threads + * @{ + */ +/** + * @brief Sets thread name of calling thread + * @param[in] name - name of thread + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_thread_set_nameA(const char *name); +void ITTAPI __itt_thread_set_nameW(const wchar_t *name); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_thread_set_name __itt_thread_set_nameW +# define __itt_thread_set_name_ptr __itt_thread_set_nameW_ptr +#else /* UNICODE */ +# define __itt_thread_set_name __itt_thread_set_nameA +# define __itt_thread_set_name_ptr __itt_thread_set_nameA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_thread_set_name(const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name)) +ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thread_set_nameA ITTNOTIFY_VOID(thread_set_nameA) +#define __itt_thread_set_nameA_ptr ITTNOTIFY_NAME(thread_set_nameA) +#define __itt_thread_set_nameW ITTNOTIFY_VOID(thread_set_nameW) +#define __itt_thread_set_nameW_ptr ITTNOTIFY_NAME(thread_set_nameW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thread_set_name ITTNOTIFY_VOID(thread_set_name) +#define __itt_thread_set_name_ptr ITTNOTIFY_NAME(thread_set_name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thread_set_nameA(name) +#define __itt_thread_set_nameA_ptr 0 +#define __itt_thread_set_nameW(name) +#define __itt_thread_set_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thread_set_name(name) +#define __itt_thread_set_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thread_set_nameA_ptr 0 +#define __itt_thread_set_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thread_set_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @cond exclude_from_gpa_documentation */ + +/** + * @brief Mark current thread as ignored from this point on, for the duration of its existence. + */ +void ITTAPI __itt_thread_ignore(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, thread_ignore, (void)) +#define __itt_thread_ignore ITTNOTIFY_VOID(thread_ignore) +#define __itt_thread_ignore_ptr ITTNOTIFY_NAME(thread_ignore) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_thread_ignore() +#define __itt_thread_ignore_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_thread_ignore_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} threads group */ + +/** + * @defgroup sync Synchronization + * @ingroup public + * Indicate user-written synchronization code + * @{ + */ +/** + * @hideinitializer + * @brief possible value of attribute argument for sync object type + */ +#define __itt_attr_barrier 1 + +/** + * @hideinitializer + * @brief possible value of attribute argument for sync object type + */ +#define __itt_attr_mutex 2 + +/** +@brief Name a synchronization object +@param[in] addr Handle for the synchronization object. You should +use a real address to uniquely identify the synchronization object. +@param[in] objtype null-terminated object type string. If NULL is +passed, the name will be "User Synchronization". +@param[in] objname null-terminated object name string. If NULL, +no name will be assigned to the object. +@param[in] attribute one of [#__itt_attr_barrier, #__itt_attr_mutex] + */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_sync_createA(void *addr, const char *objtype, const char *objname, int attribute); +void ITTAPI __itt_sync_createW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_sync_create __itt_sync_createW +# define __itt_sync_create_ptr __itt_sync_createW_ptr +#else /* UNICODE */ +# define __itt_sync_create __itt_sync_createA +# define __itt_sync_create_ptr __itt_sync_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_sync_create (void *addr, const char *objtype, const char *objname, int attribute); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute)) +ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char* objtype, const char* objname, int attribute)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_createA ITTNOTIFY_VOID(sync_createA) +#define __itt_sync_createA_ptr ITTNOTIFY_NAME(sync_createA) +#define __itt_sync_createW ITTNOTIFY_VOID(sync_createW) +#define __itt_sync_createW_ptr ITTNOTIFY_NAME(sync_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_create ITTNOTIFY_VOID(sync_create) +#define __itt_sync_create_ptr ITTNOTIFY_NAME(sync_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_createA(addr, objtype, objname, attribute) +#define __itt_sync_createA_ptr 0 +#define __itt_sync_createW(addr, objtype, objname, attribute) +#define __itt_sync_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_create(addr, objtype, objname, attribute) +#define __itt_sync_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_createA_ptr 0 +#define __itt_sync_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** +@brief Rename a synchronization object + +You can use the rename call to assign or reassign a name to a given +synchronization object. +@param[in] addr handle for the synchronization object. +@param[in] name null-terminated object name string. +*/ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_sync_renameA(void *addr, const char *name); +void ITTAPI __itt_sync_renameW(void *addr, const wchar_t *name); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_sync_rename __itt_sync_renameW +# define __itt_sync_rename_ptr __itt_sync_renameW_ptr +#else /* UNICODE */ +# define __itt_sync_rename __itt_sync_renameA +# define __itt_sync_rename_ptr __itt_sync_renameA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_sync_rename(void *addr, const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name)) +ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_renameA ITTNOTIFY_VOID(sync_renameA) +#define __itt_sync_renameA_ptr ITTNOTIFY_NAME(sync_renameA) +#define __itt_sync_renameW ITTNOTIFY_VOID(sync_renameW) +#define __itt_sync_renameW_ptr ITTNOTIFY_NAME(sync_renameW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_rename ITTNOTIFY_VOID(sync_rename) +#define __itt_sync_rename_ptr ITTNOTIFY_NAME(sync_rename) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_renameA(addr, name) +#define __itt_sync_renameA_ptr 0 +#define __itt_sync_renameW(addr, name) +#define __itt_sync_renameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_rename(addr, name) +#define __itt_sync_rename_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_renameA_ptr 0 +#define __itt_sync_renameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_rename_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + @brief Destroy a synchronization object. + @param addr Handle for the synchronization object. + */ +void ITTAPI __itt_sync_destroy(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr)) +#define __itt_sync_destroy ITTNOTIFY_VOID(sync_destroy) +#define __itt_sync_destroy_ptr ITTNOTIFY_NAME(sync_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_sync_destroy(addr) +#define __itt_sync_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_sync_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/*****************************************************************//** + * @name group of functions is used for performance measurement tools + *********************************************************************/ +/** @{ */ +/** + * @brief Enter spin loop on user-defined sync object + */ +void ITTAPI __itt_sync_prepare(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, sync_prepare, (void *addr)) +#define __itt_sync_prepare ITTNOTIFY_VOID(sync_prepare) +#define __itt_sync_prepare_ptr ITTNOTIFY_NAME(sync_prepare) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_sync_prepare(addr) +#define __itt_sync_prepare_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_sync_prepare_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Quit spin loop without acquiring spin object + */ +void ITTAPI __itt_sync_cancel(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr)) +#define __itt_sync_cancel ITTNOTIFY_VOID(sync_cancel) +#define __itt_sync_cancel_ptr ITTNOTIFY_NAME(sync_cancel) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_sync_cancel(addr) +#define __itt_sync_cancel_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_sync_cancel_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Successful spin loop completion (sync object acquired) + */ +void ITTAPI __itt_sync_acquired(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr)) +#define __itt_sync_acquired ITTNOTIFY_VOID(sync_acquired) +#define __itt_sync_acquired_ptr ITTNOTIFY_NAME(sync_acquired) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_sync_acquired(addr) +#define __itt_sync_acquired_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_sync_acquired_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Start sync object releasing code. Is called before the lock release call. + */ +void ITTAPI __itt_sync_releasing(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, sync_releasing, (void *addr)) +#define __itt_sync_releasing ITTNOTIFY_VOID(sync_releasing) +#define __itt_sync_releasing_ptr ITTNOTIFY_NAME(sync_releasing) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_sync_releasing(addr) +#define __itt_sync_releasing_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_sync_releasing_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} */ + +/** @} sync group */ + +/**************************************************************//** + * @name group of functions is used for correctness checking tools + ******************************************************************/ +/** @{ */ +/** + * @ingroup legacy + * @deprecated Legacy API + * @brief Fast synchronization which does no require spinning. + * - This special function is to be used by TBB and OpenMP libraries only when they know + * there is no spin but they need to suppress TC warnings about shared variable modifications. + * - It only has corresponding pointers in static library and does not have corresponding function + * in dynamic library. + * @see void __itt_sync_prepare(void* addr); + */ +void ITTAPI __itt_fsync_prepare(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, fsync_prepare, (void *addr)) +#define __itt_fsync_prepare ITTNOTIFY_VOID(fsync_prepare) +#define __itt_fsync_prepare_ptr ITTNOTIFY_NAME(fsync_prepare) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_fsync_prepare(addr) +#define __itt_fsync_prepare_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_fsync_prepare_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup legacy + * @deprecated Legacy API + * @brief Fast synchronization which does no require spinning. + * - This special function is to be used by TBB and OpenMP libraries only when they know + * there is no spin but they need to suppress TC warnings about shared variable modifications. + * - It only has corresponding pointers in static library and does not have corresponding function + * in dynamic library. + * @see void __itt_sync_cancel(void *addr); + */ +void ITTAPI __itt_fsync_cancel(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr)) +#define __itt_fsync_cancel ITTNOTIFY_VOID(fsync_cancel) +#define __itt_fsync_cancel_ptr ITTNOTIFY_NAME(fsync_cancel) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_fsync_cancel(addr) +#define __itt_fsync_cancel_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_fsync_cancel_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup legacy + * @deprecated Legacy API + * @brief Fast synchronization which does no require spinning. + * - This special function is to be used by TBB and OpenMP libraries only when they know + * there is no spin but they need to suppress TC warnings about shared variable modifications. + * - It only has corresponding pointers in static library and does not have corresponding function + * in dynamic library. + * @see void __itt_sync_acquired(void *addr); + */ +void ITTAPI __itt_fsync_acquired(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr)) +#define __itt_fsync_acquired ITTNOTIFY_VOID(fsync_acquired) +#define __itt_fsync_acquired_ptr ITTNOTIFY_NAME(fsync_acquired) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_fsync_acquired(addr) +#define __itt_fsync_acquired_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_fsync_acquired_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup legacy + * @deprecated Legacy API + * @brief Fast synchronization which does no require spinning. + * - This special function is to be used by TBB and OpenMP libraries only when they know + * there is no spin but they need to suppress TC warnings about shared variable modifications. + * - It only has corresponding pointers in static library and does not have corresponding function + * in dynamic library. + * @see void __itt_sync_releasing(void* addr); + */ +void ITTAPI __itt_fsync_releasing(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, fsync_releasing, (void *addr)) +#define __itt_fsync_releasing ITTNOTIFY_VOID(fsync_releasing) +#define __itt_fsync_releasing_ptr ITTNOTIFY_NAME(fsync_releasing) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_fsync_releasing(addr) +#define __itt_fsync_releasing_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_fsync_releasing_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} */ + +/** + * @defgroup model Modeling by Intel(R) Parallel Advisor + * @ingroup public + * This is the subset of itt used for modeling by Intel(R) Parallel Advisor. + * This API is called ONLY using annotate.h, by "Annotation" macros + * the user places in their sources during the parallelism modeling steps. + * + * site_begin/end and task_begin/end take the address of handle variables, + * which are writeable by the API. Handles must be 0 initialized prior + * to the first call to begin, or may cause a run-time failure. + * The handles are initialized in a multi-thread safe way by the API if + * the handle is 0. The commonly expected idiom is one static handle to + * identify a site or task. If a site or task of the same name has already + * been started during this collection, the same handle MAY be returned, + * but is not required to be - it is unspecified if data merging is done + * based on name. These routines also take an instance variable. Like + * the lexical instance, these must be 0 initialized. Unlike the lexical + * instance, this is used to track a single dynamic instance. + * + * API used by the Intel(R) Parallel Advisor to describe potential concurrency + * and related activities. User-added source annotations expand to calls + * to these procedures to enable modeling of a hypothetical concurrent + * execution serially. + * @{ + */ +#if !defined(_ADVISOR_ANNOTATE_H_) || defined(ANNOTATE_EXPAND_NULL) + +typedef void* __itt_model_site; /*!< @brief handle for lexical site */ +typedef void* __itt_model_site_instance; /*!< @brief handle for dynamic instance */ +typedef void* __itt_model_task; /*!< @brief handle for lexical site */ +typedef void* __itt_model_task_instance; /*!< @brief handle for dynamic instance */ + +/** + * @enum __itt_model_disable + * @brief Enumerator for the disable methods + */ +typedef enum { + __itt_model_disable_observation, + __itt_model_disable_collection +} __itt_model_disable; + +#endif /* !_ADVISOR_ANNOTATE_H_ || ANNOTATE_EXPAND_NULL */ + +/** + * @brief ANNOTATE_SITE_BEGIN/ANNOTATE_SITE_END support. + * + * site_begin/end model a potential concurrency site. + * site instances may be recursively nested with themselves. + * site_end exits the most recently started but unended site for the current + * thread. The handle passed to end may be used to validate structure. + * Instances of a site encountered on different threads concurrently + * are considered completely distinct. If the site name for two different + * lexical sites match, it is unspecified whether they are treated as the + * same or different for data presentation. + */ +void ITTAPI __itt_model_site_begin(__itt_model_site *site, __itt_model_site_instance *instance, const char *name); +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_model_site_beginW(const wchar_t *name); +#endif +void ITTAPI __itt_model_site_beginAL(const char *name, size_t siteNameLen); +void ITTAPI __itt_model_site_end (__itt_model_site *site, __itt_model_site_instance *instance); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name)) +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name)) +#endif +ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t siteNameLen)) +ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance)) +#define __itt_model_site_begin ITTNOTIFY_VOID(model_site_begin) +#define __itt_model_site_begin_ptr ITTNOTIFY_NAME(model_site_begin) +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_site_beginW ITTNOTIFY_VOID(model_site_beginW) +#define __itt_model_site_beginW_ptr ITTNOTIFY_NAME(model_site_beginW) +#endif +#define __itt_model_site_beginAL ITTNOTIFY_VOID(model_site_beginAL) +#define __itt_model_site_beginAL_ptr ITTNOTIFY_NAME(model_site_beginAL) +#define __itt_model_site_end ITTNOTIFY_VOID(model_site_end) +#define __itt_model_site_end_ptr ITTNOTIFY_NAME(model_site_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_site_begin(site, instance, name) +#define __itt_model_site_begin_ptr 0 +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_site_beginW(name) +#define __itt_model_site_beginW_ptr 0 +#endif +#define __itt_model_site_beginAL(name, siteNameLen) +#define __itt_model_site_beginAL_ptr 0 +#define __itt_model_site_end(site, instance) +#define __itt_model_site_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_site_begin_ptr 0 +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_site_beginW_ptr 0 +#endif +#define __itt_model_site_beginAL_ptr 0 +#define __itt_model_site_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_TASK_BEGIN/ANNOTATE_TASK_END support + * + * task_begin/end model a potential task, which is contained within the most + * closely enclosing dynamic site. task_end exits the most recently started + * but unended task. The handle passed to end may be used to validate + * structure. It is unspecified if bad dynamic nesting is detected. If it + * is, it should be encoded in the resulting data collection. The collector + * should not fail due to construct nesting issues, nor attempt to directly + * indicate the problem. + */ +void ITTAPI __itt_model_task_begin(__itt_model_task *task, __itt_model_task_instance *instance, const char *name); +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_model_task_beginW(const wchar_t *name); +#endif +void ITTAPI __itt_model_task_beginAL(const char *name, size_t taskNameLen); +void ITTAPI __itt_model_task_end (__itt_model_task *task, __itt_model_task_instance *instance); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name)) +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name)) +#endif +ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t taskNameLen)) +ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance)) +#define __itt_model_task_begin ITTNOTIFY_VOID(model_task_begin) +#define __itt_model_task_begin_ptr ITTNOTIFY_NAME(model_task_begin) +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_task_beginW ITTNOTIFY_VOID(model_task_beginW) +#define __itt_model_task_beginW_ptr ITTNOTIFY_NAME(model_task_beginW) +#endif +#define __itt_model_task_beginAL ITTNOTIFY_VOID(model_task_beginAL) +#define __itt_model_task_beginAL_ptr ITTNOTIFY_NAME(model_task_beginAL) +#define __itt_model_task_end ITTNOTIFY_VOID(model_task_end) +#define __itt_model_task_end_ptr ITTNOTIFY_NAME(model_task_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_task_begin(task, instance, name) +#define __itt_model_task_begin_ptr 0 +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_task_beginW(name) +#define __itt_model_task_beginW_ptr 0 +#endif +#define __itt_model_task_beginAL(name, siteNameLen) +#define __itt_model_task_beginAL_ptr 0 +#define __itt_model_task_end(task, instance) +#define __itt_model_task_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_task_begin_ptr 0 +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_model_task_beginW_ptr 0 +#endif +#define __itt_model_task_beginAL_ptr 0 +#define __itt_model_task_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_LOCK_ACQUIRE/ANNOTATE_LOCK_RELEASE support + * + * lock_acquire/release model a potential lock for both lockset and + * performance modeling. Each unique address is modeled as a separate + * lock, with invalid addresses being valid lock IDs. Specifically: + * no storage is accessed by the API at the specified address - it is only + * used for lock identification. Lock acquires may be self-nested and are + * unlocked by a corresponding number of releases. + * (These closely correspond to __itt_sync_acquired/__itt_sync_releasing, + * but may not have identical semantics.) + */ +void ITTAPI __itt_model_lock_acquire(void *lock); +void ITTAPI __itt_model_lock_release(void *lock); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock)) +ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock)) +#define __itt_model_lock_acquire ITTNOTIFY_VOID(model_lock_acquire) +#define __itt_model_lock_acquire_ptr ITTNOTIFY_NAME(model_lock_acquire) +#define __itt_model_lock_release ITTNOTIFY_VOID(model_lock_release) +#define __itt_model_lock_release_ptr ITTNOTIFY_NAME(model_lock_release) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_lock_acquire(lock) +#define __itt_model_lock_acquire_ptr 0 +#define __itt_model_lock_release(lock) +#define __itt_model_lock_release_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_lock_acquire_ptr 0 +#define __itt_model_lock_release_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_RECORD_ALLOCATION/ANNOTATE_RECORD_DEALLOCATION support + * + * record_allocation/deallocation describe user-defined memory allocator + * behavior, which may be required for correctness modeling to understand + * when storage is not expected to be actually reused across threads. + */ +void ITTAPI __itt_model_record_allocation (void *addr, size_t size); +void ITTAPI __itt_model_record_deallocation(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size)) +ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr)) +#define __itt_model_record_allocation ITTNOTIFY_VOID(model_record_allocation) +#define __itt_model_record_allocation_ptr ITTNOTIFY_NAME(model_record_allocation) +#define __itt_model_record_deallocation ITTNOTIFY_VOID(model_record_deallocation) +#define __itt_model_record_deallocation_ptr ITTNOTIFY_NAME(model_record_deallocation) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_record_allocation(addr, size) +#define __itt_model_record_allocation_ptr 0 +#define __itt_model_record_deallocation(addr) +#define __itt_model_record_deallocation_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_record_allocation_ptr 0 +#define __itt_model_record_deallocation_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_INDUCTION_USES support + * + * Note particular storage is inductive through the end of the current site + */ +void ITTAPI __itt_model_induction_uses(void* addr, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_induction_uses, (void *addr, size_t size)) +#define __itt_model_induction_uses ITTNOTIFY_VOID(model_induction_uses) +#define __itt_model_induction_uses_ptr ITTNOTIFY_NAME(model_induction_uses) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_induction_uses(addr, size) +#define __itt_model_induction_uses_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_induction_uses_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_REDUCTION_USES support + * + * Note particular storage is used for reduction through the end + * of the current site + */ +void ITTAPI __itt_model_reduction_uses(void* addr, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_reduction_uses, (void *addr, size_t size)) +#define __itt_model_reduction_uses ITTNOTIFY_VOID(model_reduction_uses) +#define __itt_model_reduction_uses_ptr ITTNOTIFY_NAME(model_reduction_uses) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_reduction_uses(addr, size) +#define __itt_model_reduction_uses_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_reduction_uses_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_OBSERVE_USES support + * + * Have correctness modeling record observations about uses of storage + * through the end of the current site + */ +void ITTAPI __itt_model_observe_uses(void* addr, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_observe_uses, (void *addr, size_t size)) +#define __itt_model_observe_uses ITTNOTIFY_VOID(model_observe_uses) +#define __itt_model_observe_uses_ptr ITTNOTIFY_NAME(model_observe_uses) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_observe_uses(addr, size) +#define __itt_model_observe_uses_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_observe_uses_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_CLEAR_USES support + * + * Clear the special handling of a piece of storage related to induction, + * reduction or observe_uses + */ +void ITTAPI __itt_model_clear_uses(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_clear_uses, (void *addr)) +#define __itt_model_clear_uses ITTNOTIFY_VOID(model_clear_uses) +#define __itt_model_clear_uses_ptr ITTNOTIFY_NAME(model_clear_uses) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_clear_uses(addr) +#define __itt_model_clear_uses_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_clear_uses_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief ANNOTATE_DISABLE_*_PUSH/ANNOTATE_DISABLE_*_POP support + * + * disable_push/disable_pop push and pop disabling based on a parameter. + * Disabling observations stops processing of memory references during + * correctness modeling, and all annotations that occur in the disabled + * region. This allows description of code that is expected to be handled + * specially during conversion to parallelism or that is not recognized + * by tools (e.g. some kinds of synchronization operations.) + * This mechanism causes all annotations in the disabled region, other + * than disable_push and disable_pop, to be ignored. (For example, this + * might validly be used to disable an entire parallel site and the contained + * tasks and locking in it for data collection purposes.) + * The disable for collection is a more expensive operation, but reduces + * collector overhead significantly. This applies to BOTH correctness data + * collection and performance data collection. For example, a site + * containing a task might only enable data collection for the first 10 + * iterations. Both performance and correctness data should reflect this, + * and the program should run as close to full speed as possible when + * collection is disabled. + */ +void ITTAPI __itt_model_disable_push(__itt_model_disable x); +void ITTAPI __itt_model_disable_pop(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x)) +ITT_STUBV(ITTAPI, void, model_disable_pop, (void)) +#define __itt_model_disable_push ITTNOTIFY_VOID(model_disable_push) +#define __itt_model_disable_push_ptr ITTNOTIFY_NAME(model_disable_push) +#define __itt_model_disable_pop ITTNOTIFY_VOID(model_disable_pop) +#define __itt_model_disable_pop_ptr ITTNOTIFY_NAME(model_disable_pop) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_model_disable_push(x) +#define __itt_model_disable_push_ptr 0 +#define __itt_model_disable_pop() +#define __itt_model_disable_pop_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_model_disable_push_ptr 0 +#define __itt_model_disable_pop_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} model group */ + +/** + * @defgroup heap Heap + * @ingroup public + * Heap group + * @{ + */ + +typedef void* __itt_heap_function; + +/** + * @brief Create an identification for heap function + * @return non-zero identifier or NULL + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_heap_function ITTAPI __itt_heap_function_createA(const char* name, const char* domain); +__itt_heap_function ITTAPI __itt_heap_function_createW(const wchar_t* name, const wchar_t* domain); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_heap_function_create __itt_heap_function_createW +# define __itt_heap_function_create_ptr __itt_heap_function_createW_ptr +#else +# define __itt_heap_function_create __itt_heap_function_createA +# define __itt_heap_function_create_ptr __itt_heap_function_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_heap_function ITTAPI __itt_heap_function_create(const char* name, const char* domain); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char* name, const char* domain)) +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t* name, const wchar_t* domain)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char* name, const char* domain)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_heap_function_createA ITTNOTIFY_DATA(heap_function_createA) +#define __itt_heap_function_createA_ptr ITTNOTIFY_NAME(heap_function_createA) +#define __itt_heap_function_createW ITTNOTIFY_DATA(heap_function_createW) +#define __itt_heap_function_createW_ptr ITTNOTIFY_NAME(heap_function_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_heap_function_create ITTNOTIFY_DATA(heap_function_create) +#define __itt_heap_function_create_ptr ITTNOTIFY_NAME(heap_function_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_heap_function_createA(name, domain) (__itt_heap_function)0 +#define __itt_heap_function_createA_ptr 0 +#define __itt_heap_function_createW(name, domain) (__itt_heap_function)0 +#define __itt_heap_function_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_heap_function_create(name, domain) (__itt_heap_function)0 +#define __itt_heap_function_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_heap_function_createA_ptr 0 +#define __itt_heap_function_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_heap_function_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an allocation begin occurrence. + */ +void ITTAPI __itt_heap_allocate_begin(__itt_heap_function h, size_t size, int initialized); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized)) +#define __itt_heap_allocate_begin ITTNOTIFY_VOID(heap_allocate_begin) +#define __itt_heap_allocate_begin_ptr ITTNOTIFY_NAME(heap_allocate_begin) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_allocate_begin(h, size, initialized) +#define __itt_heap_allocate_begin_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_allocate_begin_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an allocation end occurrence. + */ +void ITTAPI __itt_heap_allocate_end(__itt_heap_function h, void** addr, size_t size, int initialized); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized)) +#define __itt_heap_allocate_end ITTNOTIFY_VOID(heap_allocate_end) +#define __itt_heap_allocate_end_ptr ITTNOTIFY_NAME(heap_allocate_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_allocate_end(h, addr, size, initialized) +#define __itt_heap_allocate_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_allocate_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an free begin occurrence. + */ +void ITTAPI __itt_heap_free_begin(__itt_heap_function h, void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr)) +#define __itt_heap_free_begin ITTNOTIFY_VOID(heap_free_begin) +#define __itt_heap_free_begin_ptr ITTNOTIFY_NAME(heap_free_begin) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_free_begin(h, addr) +#define __itt_heap_free_begin_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_free_begin_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an free end occurrence. + */ +void ITTAPI __itt_heap_free_end(__itt_heap_function h, void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr)) +#define __itt_heap_free_end ITTNOTIFY_VOID(heap_free_end) +#define __itt_heap_free_end_ptr ITTNOTIFY_NAME(heap_free_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_free_end(h, addr) +#define __itt_heap_free_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_free_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an reallocation begin occurrence. + */ +void ITTAPI __itt_heap_reallocate_begin(__itt_heap_function h, void* addr, size_t new_size, int initialized); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized)) +#define __itt_heap_reallocate_begin ITTNOTIFY_VOID(heap_reallocate_begin) +#define __itt_heap_reallocate_begin_ptr ITTNOTIFY_NAME(heap_reallocate_begin) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_reallocate_begin(h, addr, new_size, initialized) +#define __itt_heap_reallocate_begin_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_reallocate_begin_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an reallocation end occurrence. + */ +void ITTAPI __itt_heap_reallocate_end(__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized)) +#define __itt_heap_reallocate_end ITTNOTIFY_VOID(heap_reallocate_end) +#define __itt_heap_reallocate_end_ptr ITTNOTIFY_NAME(heap_reallocate_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_reallocate_end(h, addr, new_addr, new_size, initialized) +#define __itt_heap_reallocate_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_reallocate_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @brief internal access begin */ +void ITTAPI __itt_heap_internal_access_begin(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void)) +#define __itt_heap_internal_access_begin ITTNOTIFY_VOID(heap_internal_access_begin) +#define __itt_heap_internal_access_begin_ptr ITTNOTIFY_NAME(heap_internal_access_begin) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_internal_access_begin() +#define __itt_heap_internal_access_begin_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_internal_access_begin_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @brief internal access end */ +void ITTAPI __itt_heap_internal_access_end(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void)) +#define __itt_heap_internal_access_end ITTNOTIFY_VOID(heap_internal_access_end) +#define __itt_heap_internal_access_end_ptr ITTNOTIFY_NAME(heap_internal_access_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_heap_internal_access_end() +#define __itt_heap_internal_access_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_heap_internal_access_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} heap group */ +/** @endcond */ + +/* ========================================================================== */ + +/** + * @defgroup domains Domains + * @ingroup public + * Domains group + * @{ + */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_domain +{ + volatile int flags; /*!< Zero if disabled, non-zero if enabled. The meaning of different non-zero values is reserved to the runtime */ + const char* nameA; /*!< Copy of original name in ASCII. */ +#if defined(UNICODE) || defined(_UNICODE) + const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ +#else /* UNICODE || _UNICODE */ + void* nameW; +#endif /* UNICODE || _UNICODE */ + int extra1; /*!< Reserved to the runtime */ + void* extra2; /*!< Reserved to the runtime */ + struct ___itt_domain* next; +} __itt_domain; + +#pragma pack(pop) +/** @endcond */ + +/** + * @ingroup domains + * @brief Create a domain. + * Create domain using some domain name: the URI naming style is recommended. + * Because the set of domains is expected to be static over the application's + * execution time, there is no mechanism to destroy a domain. + * Any domain can be accessed by any thread in the process, regardless of + * which thread created the domain. This call is thread-safe. + * @param[in] name name of domain + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_domain* ITTAPI __itt_domain_createA(const char *name); +__itt_domain* ITTAPI __itt_domain_createW(const wchar_t *name); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_domain_create __itt_domain_createW +# define __itt_domain_create_ptr __itt_domain_createW_ptr +#else /* UNICODE */ +# define __itt_domain_create __itt_domain_createA +# define __itt_domain_create_ptr __itt_domain_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_domain* ITTAPI __itt_domain_create(const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name)) +ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_domain_createA ITTNOTIFY_DATA(domain_createA) +#define __itt_domain_createA_ptr ITTNOTIFY_NAME(domain_createA) +#define __itt_domain_createW ITTNOTIFY_DATA(domain_createW) +#define __itt_domain_createW_ptr ITTNOTIFY_NAME(domain_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_domain_create ITTNOTIFY_DATA(domain_create) +#define __itt_domain_create_ptr ITTNOTIFY_NAME(domain_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_domain_createA(name) (__itt_domain*)0 +#define __itt_domain_createA_ptr 0 +#define __itt_domain_createW(name) (__itt_domain*)0 +#define __itt_domain_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_domain_create(name) (__itt_domain*)0 +#define __itt_domain_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_domain_createA_ptr 0 +#define __itt_domain_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_domain_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} domains group */ + +/** + * @defgroup ids IDs + * @ingroup public + * IDs group + * @{ + */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_id +{ + unsigned long long d1, d2, d3; +} __itt_id; + +#pragma pack(pop) +/** @endcond */ + +static const __itt_id __itt_null = { 0, 0, 0 }; + +#if 0 // this function currently is not used +/** + * @ingroup ids + * @brief A convenience function is provided to create an ID without domain control. + * @brief This is a convenience function to initialize an __itt_id structure. This function + * does not affect the trace collector runtime in any way. After you make the ID with this + * function, you still must create it with the __itt_id_create function before using the ID + * to identify a named entity. + * @param[in] addr The address of object; high QWORD of the ID value. + * @param[in] extra The extra data to unique identify object; low QWORD of the ID value. + */ + +INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) INLINE_ATTRIBUTE; +INLINE __itt_id ITTAPI __itt_id_make(void* addr, unsigned long long extra) +{ + __itt_id id = __itt_null; + id.d1 = (unsigned long long)((uintptr_t)addr); + id.d2 = (unsigned long long)extra; + id.d3 = (unsigned long long)0; /* Reserved. Must be zero */ + return id; +} +#endif + +/** + * @ingroup ids + * @brief Create an instance of identifier. + * This establishes the beginning of the lifetime of an instance of + * the given ID in the trace. Once this lifetime starts, the ID + * can be used to tag named entity instances in calls such as + * __itt_task_begin, and to specify relationships among + * identified named entity instances, using the \ref relations APIs. + * Instance IDs are not domain specific! + * @param[in] domain The domain controlling the execution of this call. + * @param[in] id The ID to create. + */ +void ITTAPI __itt_id_create(const __itt_domain *domain, __itt_id id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id)) +#define __itt_id_create(d,x) ITTNOTIFY_VOID_D1(id_create,d,x) +#define __itt_id_create_ptr ITTNOTIFY_NAME(id_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_id_create(domain,id) +#define __itt_id_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_id_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup ids + * @brief Destroy an instance of identifier. + * This ends the lifetime of the current instance of the given ID value in the trace. + * Any relationships that are established after this lifetime ends are invalid. + * This call must be performed before the given ID value can be reused for a different + * named entity instance. + * @param[in] domain The domain controlling the execution of this call. + * @param[in] id The ID to destroy. + */ +void ITTAPI __itt_id_destroy(const __itt_domain *domain, __itt_id id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id)) +#define __itt_id_destroy(d,x) ITTNOTIFY_VOID_D1(id_destroy,d,x) +#define __itt_id_destroy_ptr ITTNOTIFY_NAME(id_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_id_destroy(domain,id) +#define __itt_id_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_id_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} ids group */ + +/** + * @defgroup handless String Handles + * @ingroup public + * String Handles group + * @{ + */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_string_handle +{ + const char* strA; /*!< Copy of original string in ASCII. */ +#if defined(UNICODE) || defined(_UNICODE) + const wchar_t* strW; /*!< Copy of original string in UNICODE. */ +#else /* UNICODE || _UNICODE */ + void* strW; +#endif /* UNICODE || _UNICODE */ + int extra1; /*!< Reserved. Must be zero */ + void* extra2; /*!< Reserved. Must be zero */ + struct ___itt_string_handle* next; +} __itt_string_handle; + +#pragma pack(pop) +/** @endcond */ + +/** + * @ingroup handles + * @brief Create a string handle. + * Create and return handle value that can be associated with a string. + * Consecutive calls to __itt_string_handle_create with the same name + * return the same value. Because the set of string handles is expected to remain + * static during the application's execution time, there is no mechanism to destroy a string handle. + * Any string handle can be accessed by any thread in the process, regardless of which thread created + * the string handle. This call is thread-safe. + * @param[in] name The input string + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_string_handle* ITTAPI __itt_string_handle_createA(const char *name); +__itt_string_handle* ITTAPI __itt_string_handle_createW(const wchar_t *name); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_string_handle_create __itt_string_handle_createW +# define __itt_string_handle_create_ptr __itt_string_handle_createW_ptr +#else /* UNICODE */ +# define __itt_string_handle_create __itt_string_handle_createA +# define __itt_string_handle_create_ptr __itt_string_handle_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_string_handle* ITTAPI __itt_string_handle_create(const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name)) +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_string_handle_createA ITTNOTIFY_DATA(string_handle_createA) +#define __itt_string_handle_createA_ptr ITTNOTIFY_NAME(string_handle_createA) +#define __itt_string_handle_createW ITTNOTIFY_DATA(string_handle_createW) +#define __itt_string_handle_createW_ptr ITTNOTIFY_NAME(string_handle_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_string_handle_create ITTNOTIFY_DATA(string_handle_create) +#define __itt_string_handle_create_ptr ITTNOTIFY_NAME(string_handle_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_string_handle_createA(name) (__itt_string_handle*)0 +#define __itt_string_handle_createA_ptr 0 +#define __itt_string_handle_createW(name) (__itt_string_handle*)0 +#define __itt_string_handle_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_string_handle_create(name) (__itt_string_handle*)0 +#define __itt_string_handle_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_string_handle_createA_ptr 0 +#define __itt_string_handle_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_string_handle_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} handles group */ + +/** @cond exclude_from_gpa_documentation */ + +/** + * @defgroup regions Regions + * @ingroup public + * Regions group + * @{ + */ +/** + * @ingroup regions + * @brief Begin of region instance. + * Successive calls to __itt_region_begin with the same ID are ignored + * until a call to __itt_region_end with the same ID + * @param[in] domain The domain for this region instance + * @param[in] id The instance ID for this region instance. Must not be __itt_null + * @param[in] parentid The instance ID for the parent of this region instance, or __itt_null + * @param[in] name The name of this region + */ +void ITTAPI __itt_region_begin(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); + +/** + * @ingroup regions + * @brief End of region instance. + * The first call to __itt_region_end with a given ID ends the + * region. Successive calls with the same ID are ignored, as are + * calls that do not have a matching __itt_region_begin call. + * @param[in] domain The domain for this region instance + * @param[in] id The instance ID for this region instance + */ +void ITTAPI __itt_region_end(const __itt_domain *domain, __itt_id id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id)) +#define __itt_region_begin(d,x,y,z) ITTNOTIFY_VOID_D3(region_begin,d,x,y,z) +#define __itt_region_begin_ptr ITTNOTIFY_NAME(region_begin) +#define __itt_region_end(d,x) ITTNOTIFY_VOID_D1(region_end,d,x) +#define __itt_region_end_ptr ITTNOTIFY_NAME(region_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_region_begin(d,x,y,z) +#define __itt_region_begin_ptr 0 +#define __itt_region_end(d,x) +#define __itt_region_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_region_begin_ptr 0 +#define __itt_region_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} regions group */ + +/** + * @defgroup frames Frames + * @ingroup public + * Frames are similar to regions, but are intended to be easier to use and to implement. + * In particular: + * - Frames always represent periods of elapsed time + * - By default, frames have no nesting relationships + * @{ + */ + +/** + * @ingroup frames + * @brief Begin a frame instance. + * Successive calls to __itt_frame_begin with the + * same ID are ignored until a call to __itt_frame_end with the same ID. + * @param[in] domain The domain for this frame instance + * @param[in] id The instance ID for this frame instance or NULL + */ +void ITTAPI __itt_frame_begin_v3(const __itt_domain *domain, __itt_id *id); + +/** + * @ingroup frames + * @brief End a frame instance. + * The first call to __itt_frame_end with a given ID + * ends the frame. Successive calls with the same ID are ignored, as are + * calls that do not have a matching __itt_frame_begin call. + * @param[in] domain The domain for this frame instance + * @param[in] id The instance ID for this frame instance or NULL for current + */ +void ITTAPI __itt_frame_end_v3(const __itt_domain *domain, __itt_id *id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id)) +ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id)) +#define __itt_frame_begin_v3(d,x) ITTNOTIFY_VOID_D1(frame_begin_v3,d,x) +#define __itt_frame_begin_v3_ptr ITTNOTIFY_NAME(frame_begin_v3) +#define __itt_frame_end_v3(d,x) ITTNOTIFY_VOID_D1(frame_end_v3,d,x) +#define __itt_frame_end_v3_ptr ITTNOTIFY_NAME(frame_end_v3) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_frame_begin_v3(domain,id) +#define __itt_frame_begin_v3_ptr 0 +#define __itt_frame_end_v3(domain,id) +#define __itt_frame_end_v3_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_frame_begin_v3_ptr 0 +#define __itt_frame_end_v3_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} frames group */ +/** @endcond */ + +/** + * @defgroup taskgroup Task Group + * @ingroup public + * Task Group + * @{ + */ +/** + * @ingroup task_groups + * @brief Denotes a task_group instance. + * Successive calls to __itt_task_group with the same ID are ignored. + * @param[in] domain The domain for this task_group instance + * @param[in] id The instance ID for this task_group instance. Must not be __itt_null. + * @param[in] parentid The instance ID for the parent of this task_group instance, or __itt_null. + * @param[in] name The name of this task_group + */ +void ITTAPI __itt_task_group(const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) +#define __itt_task_group(d,x,y,z) ITTNOTIFY_VOID_D3(task_group,d,x,y,z) +#define __itt_task_group_ptr ITTNOTIFY_NAME(task_group) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_task_group(d,x,y,z) +#define __itt_task_group_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_task_group_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} taskgroup group */ + +/** + * @defgroup tasks Tasks + * @ingroup public + * A task instance represents a piece of work performed by a particular + * thread for a period of time. A call to __itt_task_begin creates a + * task instance. This becomes the current instance for that task on that + * thread. A following call to __itt_task_end on the same thread ends the + * instance. There may be multiple simultaneous instances of tasks with the + * same name on different threads. If an ID is specified, the task instance + * receives that ID. Nested tasks are allowed. + * + * Note: The task is defined by the bracketing of __itt_task_begin and + * __itt_task_end on the same thread. If some scheduling mechanism causes + * task switching (the thread executes a different user task) or task + * switching (the user task switches to a different thread) then this breaks + * the notion of current instance. Additional API calls are required to + * deal with that possibility. + * @{ + */ + +/** + * @ingroup tasks + * @brief Begin a task instance. + * @param[in] domain The domain for this task + * @param[in] taskid The instance ID for this task instance, or __itt_null + * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null + * @param[in] name The name of this task + */ +void ITTAPI __itt_task_begin(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name); + +/** + * @ingroup tasks + * @brief Begin a task instance. + * @param[in] domain The domain for this task + * @param[in] taskid The identifier for this task instance (may be 0) + * @param[in] parentid The parent of this task (may be 0) + * @param[in] fn The pointer to the function you are tracing + */ +void ITTAPI __itt_task_begin_fn(const __itt_domain *domain, __itt_id taskid, __itt_id parentid, void* fn); + +/** + * @ingroup tasks + * @brief End the current task instance. + * @param[in] domain The domain for this task + */ +void ITTAPI __itt_task_end(const __itt_domain *domain); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parentid, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parentid, void* fn)) +ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain)) +#define __itt_task_begin(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin,d,x,y,z) +#define __itt_task_begin_ptr ITTNOTIFY_NAME(task_begin) +#define __itt_task_begin_fn(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_fn,d,x,y,z) +#define __itt_task_begin_fn_ptr ITTNOTIFY_NAME(task_begin_fn) +#define __itt_task_end(d) ITTNOTIFY_VOID_D0(task_end,d) +#define __itt_task_end_ptr ITTNOTIFY_NAME(task_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_task_begin(domain,id,parentid,name) +#define __itt_task_begin_ptr 0 +#define __itt_task_begin_fn(domain,id,parentid,fn) +#define __itt_task_begin_fn_ptr 0 +#define __itt_task_end(domain) +#define __itt_task_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_task_begin_ptr 0 +#define __itt_task_begin_fn_ptr 0 +#define __itt_task_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} tasks group */ + +/** + * @defgroup counters Counters + * @ingroup public + * Counters are user-defined objects with a monotonically increasing + * value. Counter values are 64-bit unsigned integers. Counter values + * are tracked per-thread. Counters have names that can be displayed in + * the tools. + * @{ + */ + +/** + * @ingroup counters + * @brief Increment a counter by one. + * The first call with a given name creates a counter by that name and sets its + * value to zero on every thread. Successive calls increment the counter value + * on the thread on which the call is issued. + * @param[in] domain The domain controlling the call. Counter names are not domain specific. + * The domain argument is used only to enable or disable the API calls. + * @param[in] name The name of the counter + */ +void ITTAPI __itt_counter_inc_v3(const __itt_domain *domain, __itt_string_handle *name); + +/** + * @ingroup counters + * @brief Increment a counter by the value specified in delta. + * @param[in] domain The domain controlling the call. Counter names are not domain specific. + * The domain argument is used only to enable or disable the API calls. + * @param[in] name The name of the counter + * @param[in] delta The amount by which to increment the counter + */ +void ITTAPI __itt_counter_inc_delta_v3(const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long delta)) +#define __itt_counter_inc_v3(d,x) ITTNOTIFY_VOID_D1(counter_inc_v3,d,x) +#define __itt_counter_inc_v3_ptr ITTNOTIFY_NAME(counter_inc_v3) +#define __itt_counter_inc_delta_v3(d,x,y) ITTNOTIFY_VOID_D2(counter_inc_delta_v3,d,x,y) +#define __itt_counter_inc_delta_v3_ptr ITTNOTIFY_NAME(counter_inc_delta_v3) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_inc_v3(domain,name) +#define __itt_counter_inc_v3_ptr 0 +#define __itt_counter_inc_delta_v3(domain,name,delta) +#define __itt_counter_inc_delta_v3_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_inc_v3_ptr 0 +#define __itt_counter_inc_delta_v3_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} counters group */ + +/** + * @defgroup markers Markers + * Markers represent a single discreet event in time. Markers have a scope, + * described by an enumerated type __itt_scope. Markers are created by + * the API call __itt_marker. A marker instance can be given an ID for use in + * adding metadata. + * @{ + */ + +/** + * @brief Describes the scope of an event object in the trace. + */ +typedef enum +{ + __itt_scope_unknown = 0, + __itt_scope_global, + __itt_scope_track_group, + __itt_scope_track, + __itt_scope_task, + __itt_scope_marker +} __itt_scope; + +/** @cond exclude_from_documentation */ +#define __itt_marker_scope_unknown __itt_scope_unknown +#define __itt_marker_scope_global __itt_scope_global +#define __itt_marker_scope_process __itt_scope_track_group +#define __itt_marker_scope_thread __itt_scope_track +#define __itt_marker_scope_task __itt_scope_task +/** @endcond */ + +/** + * @ingroup markers + * @brief Create a marker instance + * @param[in] domain The domain for this marker + * @param[in] id The instance ID for this marker or __itt_null + * @param[in] name The name for this marker + * @param[in] scope The scope for this marker + */ +void ITTAPI __itt_marker(const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope)) +#define __itt_marker(d,x,y,z) ITTNOTIFY_VOID_D3(marker,d,x,y,z) +#define __itt_marker_ptr ITTNOTIFY_NAME(marker) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_marker(domain,id,name,scope) +#define __itt_marker_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_marker_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} markers group */ + +/** + * @defgroup metadata Metadata + * The metadata API is used to attach extra information to named + * entities. Metadata can be attached to an identified named entity by ID, + * or to the current entity (which is always a task). + * + * Conceptually metadata has a type (what kind of metadata), a key (the + * name of the metadata), and a value (the actual data). The encoding of + * the value depends on the type of the metadata. + * + * The type of metadata is specified by an enumerated type __itt_metdata_type. + * @{ + */ + +/** + * @ingroup parameters + * @brief describes the type of metadata + */ +typedef enum { + __itt_metadata_unknown = 0, + __itt_metadata_u64, /**< Unsigned 64-bit integer */ + __itt_metadata_s64, /**< Signed 64-bit integer */ + __itt_metadata_u32, /**< Unsigned 32-bit integer */ + __itt_metadata_s32, /**< Signed 32-bit integer */ + __itt_metadata_u16, /**< Unsigned 16-bit integer */ + __itt_metadata_s16, /**< Signed 16-bit integer */ + __itt_metadata_float, /**< Signed 32-bit floating-point */ + __itt_metadata_double /**< SIgned 64-bit floating-point */ +} __itt_metadata_type; + +/** + * @ingroup parameters + * @brief Add metadata to an instance of a named entity. + * @param[in] domain The domain controlling the call + * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task + * @param[in] key The name of the metadata + * @param[in] type The type of the metadata + * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. + * @param[in] data The metadata itself +*/ +void ITTAPI __itt_metadata_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) +#define __itt_metadata_add(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add,d,x,y,z,a,b) +#define __itt_metadata_add_ptr ITTNOTIFY_NAME(metadata_add) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_metadata_add(d,x,y,z,a,b) +#define __itt_metadata_add_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_metadata_add_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup parameters + * @brief Add string metadata to an instance of a named entity. + * @param[in] domain The domain controlling the call + * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task + * @param[in] key The name of the metadata + * @param[in] data The metadata itself + * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated +*/ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_metadata_str_addA(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); +void ITTAPI __itt_metadata_str_addW(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_metadata_str_add __itt_metadata_str_addW +# define __itt_metadata_str_add_ptr __itt_metadata_str_addW_ptr +#else /* UNICODE */ +# define __itt_metadata_str_add __itt_metadata_str_addA +# define __itt_metadata_str_add_ptr __itt_metadata_str_addA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_metadata_str_add(const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length); +#endif + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) +ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t *data, size_t length)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char *data, size_t length)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_addA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addA,d,x,y,z,a) +#define __itt_metadata_str_addA_ptr ITTNOTIFY_NAME(metadata_str_addA) +#define __itt_metadata_str_addW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_addW,d,x,y,z,a) +#define __itt_metadata_str_addW_ptr ITTNOTIFY_NAME(metadata_str_addW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add,d,x,y,z,a) +#define __itt_metadata_str_add_ptr ITTNOTIFY_NAME(metadata_str_add) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_addA(d,x,y,z,a) +#define __itt_metadata_str_addA_ptr 0 +#define __itt_metadata_str_addW(d,x,y,z,a) +#define __itt_metadata_str_addW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add(d,x,y,z,a) +#define __itt_metadata_str_add_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_addA_ptr 0 +#define __itt_metadata_str_addW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup parameters + * @brief Add metadata to an instance of a named entity. + * @param[in] domain The domain controlling the call + * @param[in] scope The scope of the instance to which the metadata is to be added + + * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task + + * @param[in] key The name of the metadata + * @param[in] type The type of the metadata + * @param[in] count The number of elements of the given type. If count == 0, no metadata will be added. + * @param[in] data The metadata itself +*/ +void ITTAPI __itt_metadata_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data)) +#define __itt_metadata_add_with_scope(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(metadata_add_with_scope,d,x,y,z,a,b) +#define __itt_metadata_add_with_scope_ptr ITTNOTIFY_NAME(metadata_add_with_scope) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_metadata_add_with_scope(d,x,y,z,a,b) +#define __itt_metadata_add_with_scope_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_metadata_add_with_scope_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup parameters + * @brief Add string metadata to an instance of a named entity. + * @param[in] domain The domain controlling the call + * @param[in] scope The scope of the instance to which the metadata is to be added + + * @param[in] id The identifier of the instance to which the metadata is to be added, or __itt_null to add to the current task + + * @param[in] key The name of the metadata + * @param[in] data The metadata itself + * @param[in] length The number of characters in the string, or -1 if the length is unknown but the string is null-terminated +*/ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_metadata_str_add_with_scopeA(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); +void ITTAPI __itt_metadata_str_add_with_scopeW(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeW +# define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeW_ptr +#else /* UNICODE */ +# define __itt_metadata_str_add_with_scope __itt_metadata_str_add_with_scopeA +# define __itt_metadata_str_add_with_scope_ptr __itt_metadata_str_add_with_scopeA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_metadata_str_add_with_scope(const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length); +#endif + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeA,d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeA_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeA) +#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scopeW,d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeW_ptr ITTNOTIFY_NAME(metadata_str_add_with_scopeW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add_with_scope(d,x,y,z,a) ITTNOTIFY_VOID_D4(metadata_str_add_with_scope,d,x,y,z,a) +#define __itt_metadata_str_add_with_scope_ptr ITTNOTIFY_NAME(metadata_str_add_with_scope) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_add_with_scopeA(d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeA_ptr 0 +#define __itt_metadata_str_add_with_scopeW(d,x,y,z,a) +#define __itt_metadata_str_add_with_scopeW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add_with_scope(d,x,y,z,a) +#define __itt_metadata_str_add_with_scope_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_metadata_str_add_with_scopeA_ptr 0 +#define __itt_metadata_str_add_with_scopeW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_metadata_str_add_with_scope_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @} metadata group */ + +/** + * @defgroup relations Relations + * Instances of named entities can be explicitly associated with other + * instances using instance IDs and the relationship API calls. + * + * @{ + */ + +/** + * @ingroup relations + * @brief The kind of relation between two instances is specified by the enumerated type __itt_relation. + * Relations between instances can be added with an API call. The relation + * API uses instance IDs. Relations can be added before or after the actual + * instances are created and persist independently of the instances. This + * is the motivation for having different lifetimes for instance IDs and + * the actual instances. + */ +typedef enum +{ + __itt_relation_is_unknown = 0, + __itt_relation_is_dependent_on, /**< "A is dependent on B" means that A cannot start until B completes */ + __itt_relation_is_sibling_of, /**< "A is sibling of B" means that A and B were created as a group */ + __itt_relation_is_parent_of, /**< "A is parent of B" means that A created B */ + __itt_relation_is_continuation_of, /**< "A is continuation of B" means that A assumes the dependencies of B */ + __itt_relation_is_child_of, /**< "A is child of B" means that A was created by B (inverse of is_parent_of) */ + __itt_relation_is_continued_by, /**< "A is continued by B" means that B assumes the dependencies of A (inverse of is_continuation_of) */ + __itt_relation_is_predecessor_to /**< "A is predecessor to B" means that B cannot start until A completes (inverse of is_dependent_on) */ +} __itt_relation; + +/** + * @ingroup relations + * @brief Add a relation to the current task instance. + * The current task instance is the head of the relation. + * @param[in] domain The domain controlling this call + * @param[in] relation The kind of relation + * @param[in] tail The ID for the tail of the relation + */ +void ITTAPI __itt_relation_add_to_current(const __itt_domain *domain, __itt_relation relation, __itt_id tail); + +/** + * @ingroup relations + * @brief Add a relation between two instance identifiers. + * @param[in] domain The domain controlling this call + * @param[in] head The ID for the head of the relation + * @param[in] relation The kind of relation + * @param[in] tail The ID for the tail of the relation + */ +void ITTAPI __itt_relation_add(const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail)) +ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail)) +#define __itt_relation_add_to_current(d,x,y) ITTNOTIFY_VOID_D2(relation_add_to_current,d,x,y) +#define __itt_relation_add_to_current_ptr ITTNOTIFY_NAME(relation_add_to_current) +#define __itt_relation_add(d,x,y,z) ITTNOTIFY_VOID_D3(relation_add,d,x,y,z) +#define __itt_relation_add_ptr ITTNOTIFY_NAME(relation_add) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_relation_add_to_current(d,x,y) +#define __itt_relation_add_to_current_ptr 0 +#define __itt_relation_add(d,x,y,z) +#define __itt_relation_add_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_relation_add_to_current_ptr 0 +#define __itt_relation_add_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} relations group */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_clock_info +{ + unsigned long long clock_freq; /*!< Clock domain frequency */ + unsigned long long clock_base; /*!< Clock domain base timestamp */ +} __itt_clock_info; + +#pragma pack(pop) +/** @endcond */ + +/** @cond exclude_from_documentation */ +typedef void (ITTAPI *__itt_get_clock_info_fn)(__itt_clock_info* clock_info, void* data); +/** @endcond */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_clock_domain +{ + __itt_clock_info info; /*!< Most recent clock domain info */ + __itt_get_clock_info_fn fn; /*!< Callback function pointer */ + void* fn_data; /*!< Input argument for the callback function */ + int extra1; /*!< Reserved. Must be zero */ + void* extra2; /*!< Reserved. Must be zero */ + struct ___itt_clock_domain* next; +} __itt_clock_domain; + +#pragma pack(pop) +/** @endcond */ + +/** + * @ingroup clockdomains + * @brief Create a clock domain. + * Certain applications require the capability to trace their application using + * a clock domain different than the CPU, for instance the instrumentation of events + * that occur on a GPU. + * Because the set of domains is expected to be static over the application's execution time, + * there is no mechanism to destroy a domain. + * Any domain can be accessed by any thread in the process, regardless of which thread created + * the domain. This call is thread-safe. + * @param[in] fn A pointer to a callback function which retrieves alternative CPU timestamps + * @param[in] fn_data Argument for a callback function; may be NULL + */ +__itt_clock_domain* ITTAPI __itt_clock_domain_create(__itt_get_clock_info_fn fn, void* fn_data); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data)) +#define __itt_clock_domain_create ITTNOTIFY_DATA(clock_domain_create) +#define __itt_clock_domain_create_ptr ITTNOTIFY_NAME(clock_domain_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_clock_domain_create(fn,fn_data) (__itt_clock_domain*)0 +#define __itt_clock_domain_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_clock_domain_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup clockdomains + * @brief Recalculate clock domains frequences and clock base timestamps. + */ +void ITTAPI __itt_clock_domain_reset(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, clock_domain_reset, (void)) +#define __itt_clock_domain_reset ITTNOTIFY_VOID(clock_domain_reset) +#define __itt_clock_domain_reset_ptr ITTNOTIFY_NAME(clock_domain_reset) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_clock_domain_reset() +#define __itt_clock_domain_reset_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_clock_domain_reset_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup clockdomain + * @brief Create an instance of identifier. This establishes the beginning of the lifetime of + * an instance of the given ID in the trace. Once this lifetime starts, the ID can be used to + * tag named entity instances in calls such as __itt_task_begin, and to specify relationships among + * identified named entity instances, using the \ref relations APIs. + * @param[in] domain The domain controlling the execution of this call. + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] id The ID to create. + */ +void ITTAPI __itt_id_create_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); + +/** + * @ingroup clockdomain + * @brief Destroy an instance of identifier. This ends the lifetime of the current instance of the + * given ID value in the trace. Any relationships that are established after this lifetime ends are + * invalid. This call must be performed before the given ID value can be reused for a different + * named entity instance. + * @param[in] domain The domain controlling the execution of this call. + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] id The ID to destroy. + */ +void ITTAPI __itt_id_destroy_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) +ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id)) +#define __itt_id_create_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_create_ex,d,x,y,z) +#define __itt_id_create_ex_ptr ITTNOTIFY_NAME(id_create_ex) +#define __itt_id_destroy_ex(d,x,y,z) ITTNOTIFY_VOID_D3(id_destroy_ex,d,x,y,z) +#define __itt_id_destroy_ex_ptr ITTNOTIFY_NAME(id_destroy_ex) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_id_create_ex(domain,clock_domain,timestamp,id) +#define __itt_id_create_ex_ptr 0 +#define __itt_id_destroy_ex(domain,clock_domain,timestamp,id) +#define __itt_id_destroy_ex_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_id_create_ex_ptr 0 +#define __itt_id_destroy_ex_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup clockdomain + * @brief Begin a task instance. + * @param[in] domain The domain for this task + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] taskid The instance ID for this task instance, or __itt_null + * @param[in] parentid The parent instance to which this task instance belongs, or __itt_null + * @param[in] name The name of this task + */ +void ITTAPI __itt_task_begin_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); + +/** + * @ingroup clockdomain + * @brief Begin a task instance. + * @param[in] domain The domain for this task + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] taskid The identifier for this task instance, or __itt_null + * @param[in] parentid The parent of this task, or __itt_null + * @param[in] fn The pointer to the function you are tracing + */ +void ITTAPI __itt_task_begin_fn_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, void* fn); + +/** + * @ingroup clockdomain + * @brief End the current task instance. + * @param[in] domain The domain for this task + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + */ +void ITTAPI __itt_task_end_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn)) +ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp)) +#define __itt_task_begin_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_ex,d,x,y,z,a,b) +#define __itt_task_begin_ex_ptr ITTNOTIFY_NAME(task_begin_ex) +#define __itt_task_begin_fn_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_fn_ex,d,x,y,z,a,b) +#define __itt_task_begin_fn_ex_ptr ITTNOTIFY_NAME(task_begin_fn_ex) +#define __itt_task_end_ex(d,x,y) ITTNOTIFY_VOID_D2(task_end_ex,d,x,y) +#define __itt_task_end_ex_ptr ITTNOTIFY_NAME(task_end_ex) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_task_begin_ex(domain,clock_domain,timestamp,id,parentid,name) +#define __itt_task_begin_ex_ptr 0 +#define __itt_task_begin_fn_ex(domain,clock_domain,timestamp,id,parentid,fn) +#define __itt_task_begin_fn_ex_ptr 0 +#define __itt_task_end_ex(domain,clock_domain,timestamp) +#define __itt_task_end_ex_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_task_begin_ex_ptr 0 +#define __itt_task_begin_fn_ex_ptr 0 +#define __itt_task_end_ex_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup markers + * @brief Create a marker instance. + * @param[in] domain The domain for this marker + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] id The instance ID for this marker, or __itt_null + * @param[in] name The name for this marker + * @param[in] scope The scope for this marker + */ +void ITTAPI __itt_marker_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope)) +#define __itt_marker_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(marker_ex,d,x,y,z,a,b) +#define __itt_marker_ex_ptr ITTNOTIFY_NAME(marker_ex) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_marker_ex(domain,clock_domain,timestamp,id,name,scope) +#define __itt_marker_ex_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_marker_ex_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @ingroup clockdomain + * @brief Add a relation to the current task instance. + * The current task instance is the head of the relation. + * @param[in] domain The domain controlling this call + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] relation The kind of relation + * @param[in] tail The ID for the tail of the relation + */ +void ITTAPI __itt_relation_add_to_current_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail); + +/** + * @ingroup clockdomain + * @brief Add a relation between two instance identifiers. + * @param[in] domain The domain controlling this call + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] head The ID for the head of the relation + * @param[in] relation The kind of relation + * @param[in] tail The ID for the tail of the relation + */ +void ITTAPI __itt_relation_add_ex(const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail)) +ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail)) +#define __itt_relation_add_to_current_ex(d,x,y,z,a) ITTNOTIFY_VOID_D4(relation_add_to_current_ex,d,x,y,z,a) +#define __itt_relation_add_to_current_ex_ptr ITTNOTIFY_NAME(relation_add_to_current_ex) +#define __itt_relation_add_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(relation_add_ex,d,x,y,z,a,b) +#define __itt_relation_add_ex_ptr ITTNOTIFY_NAME(relation_add_ex) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_relation_add_to_current_ex(domain,clock_domain,timestame,relation,tail) +#define __itt_relation_add_to_current_ex_ptr 0 +#define __itt_relation_add_ex(domain,clock_domain,timestamp,head,relation,tail) +#define __itt_relation_add_ex_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_relation_add_to_current_ex_ptr 0 +#define __itt_relation_add_ex_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @cond exclude_from_documentation */ +typedef enum ___itt_track_group_type +{ + __itt_track_group_type_normal = 0 +} __itt_track_group_type; +/** @endcond */ + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_track_group +{ + __itt_string_handle* name; /*!< Name of the track group */ + struct ___itt_track* track; /*!< List of child tracks */ + __itt_track_group_type tgtype; /*!< Type of the track group */ + int extra1; /*!< Reserved. Must be zero */ + void* extra2; /*!< Reserved. Must be zero */ + struct ___itt_track_group* next; +} __itt_track_group; + +#pragma pack(pop) +/** @endcond */ + +/** + * @brief Placeholder for custom track types. Currently, "normal" custom track + * is the only available track type. + */ +typedef enum ___itt_track_type +{ + __itt_track_type_normal = 0 +#ifdef INTEL_ITTNOTIFY_API_PRIVATE + , __itt_track_type_queue +#endif /* INTEL_ITTNOTIFY_API_PRIVATE */ +} __itt_track_type; + +/** @cond exclude_from_documentation */ +#pragma pack(push, 8) + +typedef struct ___itt_track +{ + __itt_string_handle* name; /*!< Name of the track group */ + __itt_track_group* group; /*!< Parent group to a track */ + __itt_track_type ttype; /*!< Type of the track */ + int extra1; /*!< Reserved. Must be zero */ + void* extra2; /*!< Reserved. Must be zero */ + struct ___itt_track* next; +} __itt_track; + +#pragma pack(pop) +/** @endcond */ + +/** + * @brief Create logical track group. + */ +__itt_track_group* ITTAPI __itt_track_group_create(__itt_string_handle* name, __itt_track_group_type track_group_type); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type)) +#define __itt_track_group_create ITTNOTIFY_DATA(track_group_create) +#define __itt_track_group_create_ptr ITTNOTIFY_NAME(track_group_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_track_group_create(name) (__itt_track_group*)0 +#define __itt_track_group_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_track_group_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Create logical track. + */ +__itt_track* ITTAPI __itt_track_create(__itt_track_group* track_group, __itt_string_handle* name, __itt_track_type track_type); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type)) +#define __itt_track_create ITTNOTIFY_DATA(track_create) +#define __itt_track_create_ptr ITTNOTIFY_NAME(track_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_track_create(track_group,name,track_type) (__itt_track*)0 +#define __itt_track_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_track_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Set the logical track. + */ +void ITTAPI __itt_set_track(__itt_track* track); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track)) +#define __itt_set_track ITTNOTIFY_VOID(set_track) +#define __itt_set_track_ptr ITTNOTIFY_NAME(set_track) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_set_track(track) +#define __itt_set_track_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_set_track_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/* ========================================================================== */ +/** @cond exclude_from_gpa_documentation */ +/** + * @defgroup events Events + * @ingroup public + * Events group + * @{ + */ +/** @brief user event type */ +typedef int __itt_event; + +/** + * @brief Create an event notification + * @note name or namelen being null/name and namelen not matching, user event feature not enabled + * @return non-zero event identifier upon success and __itt_err otherwise + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen); +__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_event_create __itt_event_createW +# define __itt_event_create_ptr __itt_event_createW_ptr +#else +# define __itt_event_create __itt_event_createA +# define __itt_event_create_ptr __itt_event_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen)) +ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA ITTNOTIFY_DATA(event_createA) +#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA) +#define __itt_event_createW ITTNOTIFY_DATA(event_createW) +#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create ITTNOTIFY_DATA(event_create) +#define __itt_event_create_ptr ITTNOTIFY_NAME(event_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA(name, namelen) (__itt_event)0 +#define __itt_event_createA_ptr 0 +#define __itt_event_createW(name, namelen) (__itt_event)0 +#define __itt_event_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create(name, namelen) (__itt_event)0 +#define __itt_event_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA_ptr 0 +#define __itt_event_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an event occurrence. + * @return __itt_err upon failure (invalid event id/user event feature not enabled) + */ +int LIBITTAPI __itt_event_start(__itt_event event); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event)) +#define __itt_event_start ITTNOTIFY_DATA(event_start) +#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_event_start(event) (int)0 +#define __itt_event_start_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_event_start_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an event end occurrence. + * @note It is optional if events do not have durations. + * @return __itt_err upon failure (invalid event id/user event feature not enabled) + */ +int LIBITTAPI __itt_event_end(__itt_event event); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) +#define __itt_event_end ITTNOTIFY_DATA(event_end) +#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_event_end(event) (int)0 +#define __itt_event_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_event_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} events group */ +/** @endcond */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _ITTNOTIFY_H_ */ + +#ifdef INTEL_ITTNOTIFY_API_PRIVATE + +#ifndef _ITTNOTIFY_PRIVATE_ +#define _ITTNOTIFY_PRIVATE_ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * @ingroup tasks + * @brief Begin an overlapped task instance. + * @param[in] domain The domain for this task. + * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. + * @param[in] parentid The parent of this task, or __itt_null. + * @param[in] name The name of this task. + */ +void ITTAPI __itt_task_begin_overlapped(const __itt_domain* domain, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); + +/** + * @ingroup clockdomain + * @brief Begin an overlapped task instance. + * @param[in] domain The domain for this task + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] taskid The identifier for this task instance, *cannot* be __itt_null. + * @param[in] parentid The parent of this task, or __itt_null. + * @param[in] name The name of this task. + */ +void ITTAPI __itt_task_begin_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name); + +/** + * @ingroup tasks + * @brief End an overlapped task instance. + * @param[in] domain The domain for this task + * @param[in] taskid Explicit ID of finished task + */ +void ITTAPI __itt_task_end_overlapped(const __itt_domain *domain, __itt_id taskid); + +/** + * @ingroup clockdomain + * @brief End an overlapped task instance. + * @param[in] domain The domain for this task + * @param[in] clock_domain The clock domain controlling the execution of this call. + * @param[in] timestamp The user defined timestamp. + * @param[in] taskid Explicit ID of finished task + */ +void ITTAPI __itt_task_end_overlapped_ex(const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id taskid, __itt_id parentid, __itt_string_handle *name)) +ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid, __itt_id parentid, __itt_string_handle* name)) +ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id taskid)) +ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain* domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id taskid)) +#define __itt_task_begin_overlapped(d,x,y,z) ITTNOTIFY_VOID_D3(task_begin_overlapped,d,x,y,z) +#define __itt_task_begin_overlapped_ptr ITTNOTIFY_NAME(task_begin_overlapped) +#define __itt_task_begin_overlapped_ex(d,x,y,z,a,b) ITTNOTIFY_VOID_D5(task_begin_overlapped_ex,d,x,y,z,a,b) +#define __itt_task_begin_overlapped_ex_ptr ITTNOTIFY_NAME(task_begin_overlapped_ex) +#define __itt_task_end_overlapped(d,x) ITTNOTIFY_VOID_D1(task_end_overlapped,d,x) +#define __itt_task_end_overlapped_ptr ITTNOTIFY_NAME(task_end_overlapped) +#define __itt_task_end_overlapped_ex(d,x,y,z) ITTNOTIFY_VOID_D3(task_end_overlapped_ex,d,x,y,z) +#define __itt_task_end_overlapped_ex_ptr ITTNOTIFY_NAME(task_end_overlapped_ex) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_task_begin_overlapped(domain,taskid,parentid,name) +#define __itt_task_begin_overlapped_ptr 0 +#define __itt_task_begin_overlapped_ex(domain,clock_domain,timestamp,taskid,parentid,name) +#define __itt_task_begin_overlapped_ex_ptr 0 +#define __itt_task_end_overlapped(domain,taskid) +#define __itt_task_end_overlapped_ptr 0 +#define __itt_task_end_overlapped_ex(domain,clock_domain,timestamp,taskid) +#define __itt_task_end_overlapped_ex_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_task_begin_overlapped_ptr 0 +#define __itt_task_begin_overlapped_ex_ptr 0 +#define __itt_task_end_overlapped_ptr 0 +#define __itt_task_end_overlapped_ex_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @defgroup makrs_internal Marks + * @ingroup internal + * Marks group + * @warning Internal API: + * - It is not shipped to outside of Intel + * - It is delivered to internal Intel teams using e-mail or SVN access only + * @{ + */ +/** @brief user mark type */ +typedef int __itt_mark_type; + +/** + * @brief Creates a user mark type with the specified name using char or Unicode string. + * @param[in] name - name of mark to create + * @return Returns a handle to the mark type + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_mark_type ITTAPI __itt_mark_createA(const char *name); +__itt_mark_type ITTAPI __itt_mark_createW(const wchar_t *name); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_mark_create __itt_mark_createW +# define __itt_mark_create_ptr __itt_mark_createW_ptr +#else /* UNICODE */ +# define __itt_mark_create __itt_mark_createA +# define __itt_mark_create_ptr __itt_mark_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_mark_type ITTAPI __itt_mark_create(const char *name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name)) +ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA ITTNOTIFY_DATA(mark_createA) +#define __itt_mark_createA_ptr ITTNOTIFY_NAME(mark_createA) +#define __itt_mark_createW ITTNOTIFY_DATA(mark_createW) +#define __itt_mark_createW_ptr ITTNOTIFY_NAME(mark_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create ITTNOTIFY_DATA(mark_create) +#define __itt_mark_create_ptr ITTNOTIFY_NAME(mark_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA(name) (__itt_mark_type)0 +#define __itt_mark_createA_ptr 0 +#define __itt_mark_createW(name) (__itt_mark_type)0 +#define __itt_mark_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create(name) (__itt_mark_type)0 +#define __itt_mark_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_createA_ptr 0 +#define __itt_mark_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Creates a "discrete" user mark type of the specified type and an optional parameter using char or Unicode string. + * + * - The mark of "discrete" type is placed to collection results in case of success. It appears in overtime view(s) as a special tick sign. + * - The call is "synchronous" - function returns after mark is actually added to results. + * - This function is useful, for example, to mark different phases of application + * (beginning of the next mark automatically meand end of current region). + * - Can be used together with "continuous" marks (see below) at the same collection session + * @param[in] mt - mark, created by __itt_mark_create(const char* name) function + * @param[in] parameter - string parameter of mark + * @return Returns zero value in case of success, non-zero value otherwise. + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int ITTAPI __itt_markA(__itt_mark_type mt, const char *parameter); +int ITTAPI __itt_markW(__itt_mark_type mt, const wchar_t *parameter); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_mark __itt_markW +# define __itt_mark_ptr __itt_markW_ptr +#else /* UNICODE */ +# define __itt_mark __itt_markA +# define __itt_mark_ptr __itt_markA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int ITTAPI __itt_mark(__itt_mark_type mt, const char *parameter); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter)) +ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA ITTNOTIFY_DATA(markA) +#define __itt_markA_ptr ITTNOTIFY_NAME(markA) +#define __itt_markW ITTNOTIFY_DATA(markW) +#define __itt_markW_ptr ITTNOTIFY_NAME(markW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark ITTNOTIFY_DATA(mark) +#define __itt_mark_ptr ITTNOTIFY_NAME(mark) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA(mt, parameter) (int)0 +#define __itt_markA_ptr 0 +#define __itt_markW(mt, parameter) (int)0 +#define __itt_markW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark(mt, parameter) (int)0 +#define __itt_mark_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_markA_ptr 0 +#define __itt_markW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Use this if necessary to create a "discrete" user event type (mark) for process + * rather then for one thread + * @see int __itt_mark(__itt_mark_type mt, const char* parameter); + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int ITTAPI __itt_mark_globalA(__itt_mark_type mt, const char *parameter); +int ITTAPI __itt_mark_globalW(__itt_mark_type mt, const wchar_t *parameter); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_mark_global __itt_mark_globalW +# define __itt_mark_global_ptr __itt_mark_globalW_ptr +#else /* UNICODE */ +# define __itt_mark_global __itt_mark_globalA +# define __itt_mark_global_ptr __itt_mark_globalA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int ITTAPI __itt_mark_global(__itt_mark_type mt, const char *parameter); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter)) +ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA ITTNOTIFY_DATA(mark_globalA) +#define __itt_mark_globalA_ptr ITTNOTIFY_NAME(mark_globalA) +#define __itt_mark_globalW ITTNOTIFY_DATA(mark_globalW) +#define __itt_mark_globalW_ptr ITTNOTIFY_NAME(mark_globalW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global ITTNOTIFY_DATA(mark_global) +#define __itt_mark_global_ptr ITTNOTIFY_NAME(mark_global) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA(mt, parameter) (int)0 +#define __itt_mark_globalA_ptr 0 +#define __itt_mark_globalW(mt, parameter) (int)0 +#define __itt_mark_globalW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global(mt, parameter) (int)0 +#define __itt_mark_global_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_mark_globalA_ptr 0 +#define __itt_mark_globalW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_mark_global_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Creates an "end" point for "continuous" mark with specified name. + * + * - Returns zero value in case of success, non-zero value otherwise. + * Also returns non-zero value when preceding "begin" point for the + * mark with the same name failed to be created or not created. + * - The mark of "continuous" type is placed to collection results in + * case of success. It appears in overtime view(s) as a special tick + * sign (different from "discrete" mark) together with line from + * corresponding "begin" mark to "end" mark. + * @note Continuous marks can overlap and be nested inside each other. + * Discrete mark can be nested inside marked region + * @param[in] mt - mark, created by __itt_mark_create(const char* name) function + * @return Returns zero value in case of success, non-zero value otherwise. + */ +int ITTAPI __itt_mark_off(__itt_mark_type mt); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt)) +#define __itt_mark_off ITTNOTIFY_DATA(mark_off) +#define __itt_mark_off_ptr ITTNOTIFY_NAME(mark_off) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_mark_off(mt) (int)0 +#define __itt_mark_off_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_mark_off_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Use this if necessary to create an "end" point for mark of process + * @see int __itt_mark_off(__itt_mark_type mt); + */ +int ITTAPI __itt_mark_global_off(__itt_mark_type mt); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt)) +#define __itt_mark_global_off ITTNOTIFY_DATA(mark_global_off) +#define __itt_mark_global_off_ptr ITTNOTIFY_NAME(mark_global_off) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_mark_global_off(mt) (int)0 +#define __itt_mark_global_off_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_mark_global_off_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} marks group */ + +/** + * @defgroup counters_internal Counters + * @ingroup internal + * Counters group + * @{ + */ +/** + * @brief opaque structure for counter identification + */ +typedef struct ___itt_counter *__itt_counter; + +/** + * @brief Create a counter with given name/domain for the calling thread + * + * After __itt_counter_create() is called, __itt_counter_inc() / __itt_counter_inc_delta() can be used + * to increment the counter on any thread + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_counter ITTAPI __itt_counter_createA(const char *name, const char *domain); +__itt_counter ITTAPI __itt_counter_createW(const wchar_t *name, const wchar_t *domain); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_counter_create __itt_counter_createW +# define __itt_counter_create_ptr __itt_counter_createW_ptr +#else /* UNICODE */ +# define __itt_counter_create __itt_counter_createA +# define __itt_counter_create_ptr __itt_counter_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_counter ITTAPI __itt_counter_create(const char *name, const char *domain); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain)) +ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA ITTNOTIFY_DATA(counter_createA) +#define __itt_counter_createA_ptr ITTNOTIFY_NAME(counter_createA) +#define __itt_counter_createW ITTNOTIFY_DATA(counter_createW) +#define __itt_counter_createW_ptr ITTNOTIFY_NAME(counter_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create ITTNOTIFY_DATA(counter_create) +#define __itt_counter_create_ptr ITTNOTIFY_NAME(counter_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA(name, domain) +#define __itt_counter_createA_ptr 0 +#define __itt_counter_createW(name, domain) +#define __itt_counter_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create(name, domain) +#define __itt_counter_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_counter_createA_ptr 0 +#define __itt_counter_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_counter_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Destroy the counter identified by the pointer previously returned by __itt_counter_create() + */ +void ITTAPI __itt_counter_destroy(__itt_counter id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id)) +#define __itt_counter_destroy ITTNOTIFY_VOID(counter_destroy) +#define __itt_counter_destroy_ptr ITTNOTIFY_NAME(counter_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_destroy(id) +#define __itt_counter_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Increment the counter value + */ +void ITTAPI __itt_counter_inc(__itt_counter id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id)) +#define __itt_counter_inc ITTNOTIFY_VOID(counter_inc) +#define __itt_counter_inc_ptr ITTNOTIFY_NAME(counter_inc) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_inc(id) +#define __itt_counter_inc_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_inc_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Increment the counter value with x + */ +void ITTAPI __itt_counter_inc_delta(__itt_counter id, unsigned long long value); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value)) +#define __itt_counter_inc_delta ITTNOTIFY_VOID(counter_inc_delta) +#define __itt_counter_inc_delta_ptr ITTNOTIFY_NAME(counter_inc_delta) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_counter_inc_delta(id, value) +#define __itt_counter_inc_delta_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_counter_inc_delta_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} counters group */ + +/** + * @defgroup stitch Stack Stitching + * @ingroup internal + * Stack Stitching group + * @{ + */ +/** + * @brief opaque structure for counter identification + */ +typedef struct ___itt_caller *__itt_caller; + +/** + * @brief Create the stitch point e.g. a point in call stack where other stacks should be stitched to. + * The function returns a unique identifier which is used to match the cut points with corresponding stitch points. + */ +__itt_caller ITTAPI __itt_stack_caller_create(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void)) +#define __itt_stack_caller_create ITTNOTIFY_DATA(stack_caller_create) +#define __itt_stack_caller_create_ptr ITTNOTIFY_NAME(stack_caller_create) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_caller_create() (__itt_caller)0 +#define __itt_stack_caller_create_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_caller_create_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Destroy the inforamtion about stitch point identified by the pointer previously returned by __itt_stack_caller_create() + */ +void ITTAPI __itt_stack_caller_destroy(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id)) +#define __itt_stack_caller_destroy ITTNOTIFY_VOID(stack_caller_destroy) +#define __itt_stack_caller_destroy_ptr ITTNOTIFY_NAME(stack_caller_destroy) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_caller_destroy(id) +#define __itt_stack_caller_destroy_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_caller_destroy_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Sets the cut point. Stack from each event which occurs after this call will be cut + * at the same stack level the function was called and stitched to the corresponding stitch point. + */ +void ITTAPI __itt_stack_callee_enter(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id)) +#define __itt_stack_callee_enter ITTNOTIFY_VOID(stack_callee_enter) +#define __itt_stack_callee_enter_ptr ITTNOTIFY_NAME(stack_callee_enter) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_callee_enter(id) +#define __itt_stack_callee_enter_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_callee_enter_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief This function eliminates the cut point which was set by latest __itt_stack_callee_enter(). + */ +void ITTAPI __itt_stack_callee_leave(__itt_caller id); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id)) +#define __itt_stack_callee_leave ITTNOTIFY_VOID(stack_callee_leave) +#define __itt_stack_callee_leave_ptr ITTNOTIFY_NAME(stack_callee_leave) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_stack_callee_leave(id) +#define __itt_stack_callee_leave_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_stack_callee_leave_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @} stitch group */ + +/* ***************************************************************************************************************************** */ + +#include <stdarg.h> + +/** @cond exclude_from_documentation */ +typedef enum __itt_error_code +{ + __itt_error_success = 0, /*!< no error */ + __itt_error_no_module = 1, /*!< module can't be loaded */ + /* %1$s -- library name; win: %2$d -- system error code; unx: %2$s -- system error message. */ + __itt_error_no_symbol = 2, /*!< symbol not found */ + /* %1$s -- library name, %2$s -- symbol name. */ + __itt_error_unknown_group = 3, /*!< unknown group specified */ + /* %1$s -- env var name, %2$s -- group name. */ + __itt_error_cant_read_env = 4, /*!< GetEnvironmentVariable() failed */ + /* %1$s -- env var name, %2$d -- system error. */ + __itt_error_env_too_long = 5, /*!< variable value too long */ + /* %1$s -- env var name, %2$d -- actual length of the var, %3$d -- max allowed length. */ + __itt_error_system = 6 /*!< pthread_mutexattr_init or pthread_mutex_init failed */ + /* %1$s -- function name, %2$d -- errno. */ +} __itt_error_code; + +typedef void (__itt_error_handler_t)(__itt_error_code code, va_list); +__itt_error_handler_t* __itt_set_error_handler(__itt_error_handler_t*); + +const char* ITTAPI __itt_api_version(void); +/** @endcond */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#define __itt_error_handler ITT_JOIN(INTEL_ITTNOTIFY_PREFIX, error_handler) +void __itt_error_handler(__itt_error_code code, va_list args); +extern const int ITTNOTIFY_NAME(err); +#define __itt_err ITTNOTIFY_NAME(err) +ITT_STUB(ITTAPI, const char*, api_version, (void)) +#define __itt_api_version ITTNOTIFY_DATA(api_version) +#define __itt_api_version_ptr ITTNOTIFY_NAME(api_version) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_api_version() (const char*)0 +#define __itt_api_version_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_api_version_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _ITTNOTIFY_PRIVATE_ */ + +#endif /* INTEL_ITTNOTIFY_API_PRIVATE */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_config.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_config.h new file mode 100644 index 0000000000..02077a8a7d --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_config.h @@ -0,0 +1,450 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _ITTNOTIFY_CONFIG_H_ +#define _ITTNOTIFY_CONFIG_H_ + +/** @cond exclude_from_documentation */ +#ifndef ITT_OS_WIN +# define ITT_OS_WIN 1 +#endif /* ITT_OS_WIN */ + +#ifndef ITT_OS_LINUX +# define ITT_OS_LINUX 2 +#endif /* ITT_OS_LINUX */ + +#ifndef ITT_OS_MAC +# define ITT_OS_MAC 3 +#endif /* ITT_OS_MAC */ + +#ifndef ITT_OS +# if defined WIN32 || defined _WIN32 +# define ITT_OS ITT_OS_WIN +# elif defined( __APPLE__ ) && defined( __MACH__ ) +# define ITT_OS ITT_OS_MAC +# else +# define ITT_OS ITT_OS_LINUX +# endif +#endif /* ITT_OS */ + +#ifndef ITT_PLATFORM_WIN +# define ITT_PLATFORM_WIN 1 +#endif /* ITT_PLATFORM_WIN */ + +#ifndef ITT_PLATFORM_POSIX +# define ITT_PLATFORM_POSIX 2 +#endif /* ITT_PLATFORM_POSIX */ + +#ifndef ITT_PLATFORM +# if ITT_OS==ITT_OS_WIN +# define ITT_PLATFORM ITT_PLATFORM_WIN +# else +# define ITT_PLATFORM ITT_PLATFORM_POSIX +# endif /* _WIN32 */ +#endif /* ITT_PLATFORM */ + +#if defined(_UNICODE) && !defined(UNICODE) +#define UNICODE +#endif + +#include <stddef.h> +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <tchar.h> +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#include <stdint.h> +#if defined(UNICODE) || defined(_UNICODE) +#include <wchar.h> +#endif /* UNICODE || _UNICODE */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#ifndef CDECL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define CDECL __cdecl +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define CDECL /* not actual on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define CDECL __attribute__ ((cdecl)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* CDECL */ + +#ifndef STDCALL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define STDCALL __stdcall +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define STDCALL /* not supported on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define STDCALL __attribute__ ((stdcall)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* STDCALL */ + +#define ITTAPI CDECL +#define LIBITTAPI CDECL + +/* TODO: Temporary for compatibility! */ +#define ITTAPI_CALL CDECL +#define LIBITTAPI_CALL CDECL + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +/* use __forceinline (VC++ specific) */ +#define INLINE __forceinline +#define INLINE_ATTRIBUTE /* nothing */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/* + * Generally, functions are not inlined unless optimization is specified. + * For functions declared inline, this attribute inlines the function even + * if no optimization level was specified. + */ +#ifdef __STRICT_ANSI__ +#define INLINE static +#else /* __STRICT_ANSI__ */ +#define INLINE static inline +#endif /* __STRICT_ANSI__ */ +#define INLINE_ATTRIBUTE __attribute__ ((always_inline)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/** @endcond */ + +#ifndef ITT_ARCH_IA32 +# define ITT_ARCH_IA32 1 +#endif /* ITT_ARCH_IA32 */ + +#ifndef ITT_ARCH_IA32E +# define ITT_ARCH_IA32E 2 +#endif /* ITT_ARCH_IA32E */ + +#ifndef ITT_ARCH_IA64 +# define ITT_ARCH_IA64 3 +#endif /* ITT_ARCH_IA64 */ + +#ifndef ITT_ARCH +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define ITT_ARCH ITT_ARCH_IA32E +# elif defined _M_IA64 || defined __ia64 +# define ITT_ARCH ITT_ARCH_IA64 +# else +# define ITT_ARCH ITT_ARCH_IA32 +# endif +#endif + +#ifdef __cplusplus +# define ITT_EXTERN_C extern "C" +#else +# define ITT_EXTERN_C /* nothing */ +#endif /* __cplusplus */ + +#define ITT_TO_STR_AUX(x) #x +#define ITT_TO_STR(x) ITT_TO_STR_AUX(x) + +#define __ITT_BUILD_ASSERT(expr, suffix) do { static char __itt_build_check_##suffix[(expr) ? 1 : -1]; __itt_build_check_##suffix[0] = 0; } while(0) +#define _ITT_BUILD_ASSERT(expr, suffix) __ITT_BUILD_ASSERT((expr), suffix) +#define ITT_BUILD_ASSERT(expr) _ITT_BUILD_ASSERT((expr), __LINE__) + +#define ITT_MAGIC { 0xED, 0xAB, 0xAB, 0xEC, 0x0D, 0xEE, 0xDA, 0x30 } + +/* Replace with snapshot date YYYYMMDD for promotion build. */ +#define API_VERSION_BUILD 20111111 + +#ifndef API_VERSION_NUM +#define API_VERSION_NUM 0.0.0 +#endif /* API_VERSION_NUM */ + +#define API_VERSION "ITT-API-Version " ITT_TO_STR(API_VERSION_NUM) " (" ITT_TO_STR(API_VERSION_BUILD) ")" + +/* OS communication functions */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <windows.h> +typedef HMODULE lib_t; +typedef DWORD TIDT; +typedef CRITICAL_SECTION mutex_t; +#define MUTEX_INITIALIZER { 0 } +#define strong_alias(name, aliasname) /* empty for Windows */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#include <dlfcn.h> +#if defined(UNICODE) || defined(_UNICODE) +#include <wchar.h> +#endif /* UNICODE */ +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 /* need for PTHREAD_MUTEX_RECURSIVE */ +#endif /* _GNU_SOURCE */ +#include <pthread.h> +typedef void* lib_t; +typedef pthread_t TIDT; +typedef pthread_mutex_t mutex_t; +#define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER +#define _strong_alias(name, aliasname) extern __typeof (name) aliasname __attribute__ ((alias (#name))); +#define strong_alias(name, aliasname) _strong_alias(name, aliasname) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_get_proc(lib, name) GetProcAddress(lib, name) +#define __itt_mutex_init(mutex) InitializeCriticalSection(mutex) +#define __itt_mutex_lock(mutex) EnterCriticalSection(mutex) +#define __itt_mutex_unlock(mutex) LeaveCriticalSection(mutex) +#define __itt_load_lib(name) LoadLibraryA(name) +#define __itt_unload_lib(handle) FreeLibrary(handle) +#define __itt_system_error() (int)GetLastError() +#define __itt_fstrcmp(s1, s2) lstrcmpA(s1, s2) +#define __itt_fstrlen(s) lstrlenA(s) +#define __itt_fstrcpyn(s1, s2, l) lstrcpynA(s1, s2, l) +#define __itt_fstrdup(s) _strdup(s) +#define __itt_thread_id() GetCurrentThreadId() +#define __itt_thread_yield() SwitchToThread() +#ifndef ITT_SIMPLE_INIT +INLINE int __itt_interlocked_increment(volatile long* ptr) +{ + return InterlockedIncrement(ptr); +} +#endif /* ITT_SIMPLE_INIT */ +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +#define __itt_get_proc(lib, name) dlsym(lib, name) +#define __itt_mutex_init(mutex) \ + { \ + pthread_mutexattr_t mutex_attr; \ + int error_code = pthread_mutexattr_init(&mutex_attr); \ + if (error_code) \ + __itt_report_error(__itt_error_system, "pthread_mutexattr_init", error_code); \ + error_code = pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE); \ + if (error_code) \ + __itt_report_error(__itt_error_system, "pthread_mutexattr_settype", error_code); \ + error_code = pthread_mutex_init(mutex, &mutex_attr); \ + if (error_code) \ + __itt_report_error(__itt_error_system, "pthread_mutex_init", error_code); \ + error_code = pthread_mutexattr_destroy(&mutex_attr); \ + if (error_code) \ + __itt_report_error(__itt_error_system, "pthread_mutexattr_destroy", error_code); \ + } +#define __itt_mutex_lock(mutex) pthread_mutex_lock(mutex) +#define __itt_mutex_unlock(mutex) pthread_mutex_unlock(mutex) +#define __itt_load_lib(name) dlopen(name, RTLD_LAZY) +#define __itt_unload_lib(handle) dlclose(handle) +#define __itt_system_error() errno +#define __itt_fstrcmp(s1, s2) strcmp(s1, s2) +#define __itt_fstrlen(s) strlen(s) +#define __itt_fstrcpyn(s1, s2, l) strncpy(s1, s2, l) +#define __itt_fstrdup(s) strdup(s) +#define __itt_thread_id() pthread_self() +#define __itt_thread_yield() sched_yield() +#if ITT_ARCH==ITT_ARCH_IA64 +#ifdef __INTEL_COMPILER +#define __TBB_machine_fetchadd4(addr, val) __fetchadd4_acq((void *)addr, val) +#else /* __INTEL_COMPILER */ +/* TODO: Add Support for not Intel compilers for IA64 */ +#endif /* __INTEL_COMPILER */ +#else /* ITT_ARCH!=ITT_ARCH_IA64 */ +INLINE int __TBB_machine_fetchadd4(volatile void* ptr, long addend) +{ + int result; + __asm__ __volatile__("lock\nxaddl %0,%1" + : "=r"(result),"=m"(*(long*)ptr) + : "0"(addend), "m"(*(long*)ptr) + : "memory"); + return result; +} +#endif /* ITT_ARCH==ITT_ARCH_IA64 */ + +#ifndef ITT_SIMPLE_INIT +INLINE int __itt_interlocked_increment(volatile long* ptr) +{ + return __TBB_machine_fetchadd4(ptr, 1) + 1; +} +#endif /* ITT_SIMPLE_INIT */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +typedef enum { + __itt_collection_normal = 0, + __itt_collection_paused = 1 +} __itt_collection_state; + +typedef enum { + __itt_thread_normal = 0, + __itt_thread_ignored = 1 +} __itt_thread_state; + +#pragma pack(push, 8) + +typedef struct ___itt_thread_info +{ + const char* nameA; /*!< Copy of original name in ASCII. */ +#if defined(UNICODE) || defined(_UNICODE) + const wchar_t* nameW; /*!< Copy of original name in UNICODE. */ +#else /* UNICODE || _UNICODE */ + void* nameW; +#endif /* UNICODE || _UNICODE */ + TIDT tid; + __itt_thread_state state; /*!< Thread state (paused or normal) */ + int extra1; /*!< Reserved to the runtime */ + void* extra2; /*!< Reserved to the runtime */ + struct ___itt_thread_info* next; +} __itt_thread_info; + +#include "ittnotify_types.h" /* For __itt_group_id definition */ + +typedef struct ___itt_api_info_20101001 +{ + const char* name; + void** func_ptr; + void* init_func; + __itt_group_id group; +} __itt_api_info_20101001; + +typedef struct ___itt_api_info +{ + const char* name; + void** func_ptr; + void* init_func; + void* null_func; + __itt_group_id group; +} __itt_api_info; + +struct ___itt_domain; +struct ___itt_string_handle; + +typedef struct ___itt_global +{ + unsigned char magic[8]; + unsigned long version_major; + unsigned long version_minor; + unsigned long version_build; + volatile long api_initialized; + volatile long mutex_initialized; + volatile long atomic_counter; + mutex_t mutex; + lib_t lib; + void* error_handler; + const char** dll_path_ptr; + __itt_api_info* api_list_ptr; + struct ___itt_global* next; + /* Joinable structures below */ + __itt_thread_info* thread_list; + struct ___itt_domain* domain_list; + struct ___itt_string_handle* string_list; + __itt_collection_state state; +} __itt_global; + +#pragma pack(pop) + +#define NEW_THREAD_INFO_W(gptr,h,h_tail,t,s,n) { \ + h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ + if (h != NULL) { \ + h->tid = t; \ + h->nameA = NULL; \ + h->nameW = n ? _wcsdup(n) : NULL; \ + h->state = s; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->thread_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#define NEW_THREAD_INFO_A(gptr,h,h_tail,t,s,n) { \ + h = (__itt_thread_info*)malloc(sizeof(__itt_thread_info)); \ + if (h != NULL) { \ + h->tid = t; \ + h->nameA = n ? __itt_fstrdup(n) : NULL; \ + h->nameW = NULL; \ + h->state = s; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->thread_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#define NEW_DOMAIN_W(gptr,h,h_tail,name) { \ + h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ + if (h != NULL) { \ + h->flags = 0; /* domain is disabled by default */ \ + h->nameA = NULL; \ + h->nameW = name ? _wcsdup(name) : NULL; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->domain_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#define NEW_DOMAIN_A(gptr,h,h_tail,name) { \ + h = (__itt_domain*)malloc(sizeof(__itt_domain)); \ + if (h != NULL) { \ + h->flags = 0; /* domain is disabled by default */ \ + h->nameA = name ? __itt_fstrdup(name) : NULL; \ + h->nameW = NULL; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->domain_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#define NEW_STRING_HANDLE_W(gptr,h,h_tail,name) { \ + h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ + if (h != NULL) { \ + h->strA = NULL; \ + h->strW = name ? _wcsdup(name) : NULL; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->string_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#define NEW_STRING_HANDLE_A(gptr,h,h_tail,name) { \ + h = (__itt_string_handle*)malloc(sizeof(__itt_string_handle)); \ + if (h != NULL) { \ + h->strA = name ? __itt_fstrdup(name) : NULL; \ + h->strW = NULL; \ + h->extra1 = 0; /* reserved */ \ + h->extra2 = NULL; /* reserved */ \ + h->next = NULL; \ + if (h_tail == NULL) \ + (gptr)->string_list = h; \ + else \ + h_tail->next = h; \ + } \ +} + +#endif /* _ITTNOTIFY_CONFIG_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.c b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.c new file mode 100644 index 0000000000..d6d636d1f8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.c @@ -0,0 +1,1015 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "ittnotify_config.h" + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define PATH_MAX 512 +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +#include <limits.h> +#include <dlfcn.h> +#include <errno.h> +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> + +#define INTEL_NO_MACRO_BODY +#define INTEL_ITTNOTIFY_API_PRIVATE +#include "ittnotify.h" +#include "legacy/ittnotify.h" + +#include "disable_warnings.h" + +static const char api_version[] = API_VERSION "\0\n@(#) 201495 2011-12-01 14:14:56Z\n"; + +#define _N_(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) + +#if ITT_OS==ITT_OS_WIN +static const char* ittnotify_lib_name = "libittnotify.dll"; +#elif ITT_OS==ITT_OS_LINUX +static const char* ittnotify_lib_name = "libittnotify.so"; +#elif ITT_OS==ITT_OS_MAC +static const char* ittnotify_lib_name = "libittnotify.dylib"; +#else +#error Unsupported or unknown OS. +#endif + +#ifndef LIB_VAR_NAME +#if ITT_ARCH==ITT_ARCH_IA32 +#define LIB_VAR_NAME INTEL_LIBITTNOTIFY32 +#else +#define LIB_VAR_NAME INTEL_LIBITTNOTIFY64 +#endif +#endif /* LIB_VAR_NAME */ + +#define ITT_MUTEX_INIT_AND_LOCK(p) { \ + if (!p.mutex_initialized) \ + { \ + if (__itt_interlocked_increment(&p.atomic_counter) == 1) \ + { \ + __itt_mutex_init(&p.mutex); \ + p.mutex_initialized = 1; \ + } \ + else \ + while (!p.mutex_initialized) \ + __itt_thread_yield(); \ + } \ + __itt_mutex_lock(&p.mutex); \ +} + +const int _N_(err) = 0; + +typedef int (__itt_init_ittlib_t)(const char*, __itt_group_id); + +/* this define used to control initialization function name. */ +#ifndef __itt_init_ittlib_name +ITT_EXTERN_C int _N_(init_ittlib)(const char*, __itt_group_id); +static __itt_init_ittlib_t* __itt_init_ittlib_ptr = _N_(init_ittlib); +#define __itt_init_ittlib_name __itt_init_ittlib_ptr +#endif /* __itt_init_ittlib_name */ + +typedef void (__itt_fini_ittlib_t)(void); + +/* this define used to control finalization function name. */ +#ifndef __itt_fini_ittlib_name +ITT_EXTERN_C void _N_(fini_ittlib)(void); +static __itt_fini_ittlib_t* __itt_fini_ittlib_ptr = _N_(fini_ittlib); +#define __itt_fini_ittlib_name __itt_fini_ittlib_ptr +#endif /* __itt_fini_ittlib_name */ + +/* building pointers to imported funcs */ +#undef ITT_STUBV +#undef ITT_STUB +#define ITT_STUB(api,type,name,args,params,ptr,group,format) \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ +typedef type api ITT_JOIN(_N_(name),_t) args; \ +ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ +{ \ + __itt_init_ittlib_name(NULL, __itt_group_all); \ + if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \ + return ITTNOTIFY_NAME(name) params; \ + else \ + return (type)0; \ +} + +#define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ +typedef type api ITT_JOIN(_N_(name),_t) args; \ +ITT_EXTERN_C { \ +ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args \ +{ \ + __itt_init_ittlib_name(NULL, __itt_group_all); \ + if (ITTNOTIFY_NAME(name) && ITTNOTIFY_NAME(name) != ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init))) \ + ITTNOTIFY_NAME(name) params; \ + else \ + return; \ +} + +#undef __ITT_INTERNAL_INIT +#include "ittnotify_static.h" + +#undef ITT_STUB +#undef ITT_STUBV +#define ITT_STUB(api,type,name,args,params,ptr,group,format) \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ +typedef type api ITT_JOIN(_N_(name),_t) args; \ +ITT_EXTERN_C { \ +ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } + +#define ITT_STUBV(api,type,name,args,params,ptr,group,format) \ +static type api ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)) args;\ +typedef type api ITT_JOIN(_N_(name),_t) args; \ +ITT_EXTERN_C { ITT_JOIN(_N_(name),_t)* ITTNOTIFY_NAME(name) = ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)); } + +#define __ITT_INTERNAL_INIT +#include "ittnotify_static.h" +#undef __ITT_INTERNAL_INIT + +ITT_GROUP_LIST(group_list); + +#pragma pack(push, 8) + +typedef struct ___itt_group_alias +{ + const char* env_var; + __itt_group_id groups; +} __itt_group_alias; + +static __itt_group_alias group_alias[] = { + { "KMP_FOR_TPROFILE", (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync | __itt_group_mark) }, + { "KMP_FOR_TCHECK", (__itt_group_id)(__itt_group_control | __itt_group_thread | __itt_group_sync | __itt_group_fsync | __itt_group_mark) }, + { NULL, (__itt_group_none) }, + { api_version, (__itt_group_none) } /* !!! Just to avoid unused code elimination !!! */ +}; + +#pragma pack(pop) + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(push) +#pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +static __itt_api_info api_list[] = { +/* Define functions with static implementation */ +#undef ITT_STUB +#undef ITT_STUBV +#define ITT_STUB(api,type,name,args,params,nameindll,group,format) {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (void*)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), (__itt_group_id)(group)}, +#define ITT_STUBV ITT_STUB +#define __ITT_INTERNAL_INIT +#include "ittnotify_static.h" +#undef __ITT_INTERNAL_INIT +/* Define functions without static implementation */ +#undef ITT_STUB +#undef ITT_STUBV +#define ITT_STUB(api,type,name,args,params,nameindll,group,format) {ITT_TO_STR(ITT_JOIN(__itt_,nameindll)), (void**)(void*)&ITTNOTIFY_NAME(name), (void*)&ITT_VERSIONIZE(ITT_JOIN(_N_(name),_init)), NULL, (__itt_group_id)(group)}, +#define ITT_STUBV ITT_STUB +#include "ittnotify_static.h" + {NULL, NULL, NULL, NULL, __itt_group_none} +}; + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(pop) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/* private, init thread info item. used for internal purposes */ +static __itt_thread_info init_thread_info = { + (const char*)NULL, /* nameA */ +#if defined(UNICODE) || defined(_UNICODE) + (const wchar_t*)NULL, /* nameW */ +#else + (void*)NULL, /* nameW */ +#endif + 0, /* tid */ + __itt_thread_normal, /* state */ + 0, /* extra1 */ + (void*)NULL, /* extra2 */ + (__itt_thread_info*)NULL /* next */ +}; + +/* private, NULL domain item. used for internal purposes */ +static __itt_domain null_domain = { + 0, /* flags: disabled by default */ + (const char*)NULL, /* nameA */ +#if defined(UNICODE) || defined(_UNICODE) + (const wchar_t*)NULL, /* nameW */ +#else + (void*)NULL, /* nameW */ +#endif + 0, /* extra1 */ + (void*)NULL, /* extra2 */ + (__itt_domain*)NULL /* next */ +}; + +/* private, NULL string handle item. used for internal purposes */ +static __itt_string_handle null_string_handle = { + (const char*)NULL, /* strA */ +#if defined(UNICODE) || defined(_UNICODE) + (const wchar_t*)NULL, /* strW */ +#else + (void*)NULL, /* strW */ +#endif + 0, /* extra1 */ + (void*)NULL, /* extra2 */ + (__itt_string_handle*)NULL /* next */ +}; + +static const char dll_path[PATH_MAX] = { 0 }; + +/* static part descriptor which handles. all notification api attributes. */ +__itt_global __itt_ittapi_global = { + ITT_MAGIC, /* identification info */ + ITT_MAJOR, ITT_MINOR, API_VERSION_BUILD, /* version info */ + 0, /* api_initialized */ + 0, /* mutex_initialized */ + 0, /* atomic_counter */ + MUTEX_INITIALIZER, /* mutex */ + NULL, /* dynamic library handle */ + NULL, /* error_handler */ + (const char**)&dll_path, /* dll_path_ptr */ + (__itt_api_info*)&api_list, /* api_list_ptr */ + NULL, /* next __itt_global */ + (__itt_thread_info*)&init_thread_info, /* thread_list */ + (__itt_domain*)&null_domain, /* domain_list */ + (__itt_string_handle*)&null_string_handle, /* string_list */ + __itt_collection_normal /* collection state */ +}; + +typedef void (__itt_api_init_t)(__itt_global*, __itt_group_id); +typedef void (__itt_api_fini_t)(__itt_global*); + +/* ========================================================================= */ + +#ifdef ITT_NOTIFY_EXT_REPORT +ITT_EXTERN_C void _N_(error_handler)(__itt_error_code, va_list args); +#endif /* ITT_NOTIFY_EXT_REPORT */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(push) +#pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +static void __itt_report_error(__itt_error_code code, ...) +{ + va_list args; + va_start(args, code); + if (__itt_ittapi_global.error_handler != NULL) + { + __itt_error_handler_t* handler = (__itt_error_handler_t*)__itt_ittapi_global.error_handler; + handler(code, args); + } +#ifdef ITT_NOTIFY_EXT_REPORT + _N_(error_handler)(code, args); +#endif /* ITT_NOTIFY_EXT_REPORT */ + va_end(args); +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(pop) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))(const wchar_t* name) +{ + __itt_domain *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(domain_createW) && ITTNOTIFY_NAME(domain_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createW),_init))) + return ITTNOTIFY_NAME(domain_createW)(name); + } + + if (name == NULL) + return __itt_ittapi_global.domain_list; + + ITT_MUTEX_INIT_AND_LOCK(__itt_ittapi_global); + for (h_tail = NULL, h = __itt_ittapi_global.domain_list; h != NULL; h_tail = h, h = h->next) + if (h->nameW != NULL && !wcscmp(h->nameW, name)) + break; + if (h == NULL) { + NEW_DOMAIN_W(&__itt_ittapi_global,h,h_tail,name); + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); + return h; +} + +static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))(const char* name) +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +static __itt_domain* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))(const char* name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +{ + __itt_domain *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + if (ITTNOTIFY_NAME(domain_createA) && ITTNOTIFY_NAME(domain_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_createA),_init))) + return ITTNOTIFY_NAME(domain_createA)(name); +#else + if (ITTNOTIFY_NAME(domain_create) && ITTNOTIFY_NAME(domain_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(domain_create),_init))) + return ITTNOTIFY_NAME(domain_create)(name); +#endif + } + + if (name == NULL) + return __itt_ittapi_global.domain_list; + + ITT_MUTEX_INIT_AND_LOCK(__itt_ittapi_global); + for (h_tail = NULL, h = __itt_ittapi_global.domain_list; h != NULL; h_tail = h, h = h->next) + if (h->nameA != NULL && !__itt_fstrcmp(h->nameA, name)) + break; + if (h == NULL) { + NEW_DOMAIN_A(&__itt_ittapi_global,h,h_tail,name); + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); + return h; +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))(const wchar_t* name) +{ + __itt_string_handle *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(string_handle_createW) && ITTNOTIFY_NAME(string_handle_createW) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createW),_init))) + return ITTNOTIFY_NAME(string_handle_createW)(name); + } + + if (name == NULL) + return __itt_ittapi_global.string_list; + + ITT_MUTEX_INIT_AND_LOCK(__itt_ittapi_global); + for (h_tail = NULL, h = __itt_ittapi_global.string_list; h != NULL; h_tail = h, h = h->next) + if (h->strW != NULL && !wcscmp(h->strW, name)) + break; + if (h == NULL) { + NEW_STRING_HANDLE_W(&__itt_ittapi_global,h,h_tail,name); + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); + return h; +} + +static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))(const char* name) +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +static __itt_string_handle* ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))(const char* name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +{ + __itt_string_handle *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + if (ITTNOTIFY_NAME(string_handle_createA) && ITTNOTIFY_NAME(string_handle_createA) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_createA),_init))) + return ITTNOTIFY_NAME(string_handle_createA)(name); +#else + if (ITTNOTIFY_NAME(string_handle_create) && ITTNOTIFY_NAME(string_handle_create) != ITT_VERSIONIZE(ITT_JOIN(_N_(string_handle_create),_init))) + return ITTNOTIFY_NAME(string_handle_create)(name); +#endif + } + + if (name == NULL) + return __itt_ittapi_global.string_list; + + ITT_MUTEX_INIT_AND_LOCK(__itt_ittapi_global); + for (h_tail = NULL, h = __itt_ittapi_global.string_list; h != NULL; h_tail = h, h = h->next) + if (h->strA != NULL && !__itt_fstrcmp(h->strA, name)) + break; + if (h == NULL) { + NEW_STRING_HANDLE_A(&__itt_ittapi_global,h,h_tail,name); + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); + return h; +} + +/* -------------------------------------------------------------------------- */ + +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))(void) +{ + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(pause) && ITTNOTIFY_NAME(pause) != ITT_VERSIONIZE(ITT_JOIN(_N_(pause),_init))) + { + ITTNOTIFY_NAME(pause)(); + return; + } + } + __itt_ittapi_global.state = __itt_collection_paused; +} + +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))(void) +{ + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(resume) && ITTNOTIFY_NAME(resume) != ITT_VERSIONIZE(ITT_JOIN(_N_(resume),_init))) + { + ITTNOTIFY_NAME(resume)(); + return; + } + } + __itt_ittapi_global.state = __itt_collection_normal; +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(const wchar_t* name) +{ + TIDT tid = __itt_thread_id(); + __itt_thread_info *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(thread_set_nameW) && ITTNOTIFY_NAME(thread_set_nameW) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))) + { + ITTNOTIFY_NAME(thread_set_nameW)(name); + return; + } + } + + __itt_mutex_lock(&__itt_ittapi_global.mutex); + for (h_tail = NULL, h = __itt_ittapi_global.thread_list; h != NULL; h_tail = h, h = h->next) + if (h->tid == tid) + break; + if (h == NULL) { + NEW_THREAD_INFO_W(&__itt_ittapi_global, h, h_tail, tid, __itt_thread_normal, name); + } + else + { + h->nameW = name ? _wcsdup(name) : NULL; + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); +} + +static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setW),_init))(const wchar_t* name, int namelen) +{ + namelen = namelen; + ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameW),_init))(name); + return 0; +} + +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(const char* name) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(const char* name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +{ + TIDT tid = __itt_thread_id(); + __itt_thread_info *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + if (ITTNOTIFY_NAME(thread_set_nameA) && ITTNOTIFY_NAME(thread_set_nameA) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))) + { + ITTNOTIFY_NAME(thread_set_nameA)(name); + return; + } +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + if (ITTNOTIFY_NAME(thread_set_name) && ITTNOTIFY_NAME(thread_set_name) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))) + { + ITTNOTIFY_NAME(thread_set_name)(name); + return; + } +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + } + + __itt_mutex_lock(&__itt_ittapi_global.mutex); + for (h_tail = NULL, h = __itt_ittapi_global.thread_list; h != NULL; h_tail = h, h = h->next) + if (h->tid == tid) + break; + if (h == NULL) { + NEW_THREAD_INFO_A(&__itt_ittapi_global, h, h_tail, tid, __itt_thread_normal, name); + } + else + { + h->nameA = name ? __itt_fstrdup(name) : NULL; + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_setA),_init))(const char* name, int namelen) +{ + namelen = namelen; + ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_nameA),_init))(name); + return 0; +} +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +static int ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_name_set),_init))(const char* name, int namelen) +{ + namelen = namelen; + ITT_VERSIONIZE(ITT_JOIN(_N_(thread_set_name),_init))(name); + return 0; +} +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(void) +{ + TIDT tid = __itt_thread_id(); + __itt_thread_info *h_tail, *h; + + if (!__itt_ittapi_global.api_initialized && __itt_ittapi_global.thread_list->tid == 0) + { + __itt_init_ittlib_name(NULL, __itt_group_all); + if (ITTNOTIFY_NAME(thread_ignore) && ITTNOTIFY_NAME(thread_ignore) != ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))) + { + ITTNOTIFY_NAME(thread_ignore)(); + return; + } + } + + __itt_mutex_lock(&__itt_ittapi_global.mutex); + for (h_tail = NULL, h = __itt_ittapi_global.thread_list; h != NULL; h_tail = h, h = h->next) + if (h->tid == tid) + break; + if (h == NULL) { + static const char* name = "unknown"; + NEW_THREAD_INFO_A(&__itt_ittapi_global, h, h_tail, tid, __itt_thread_ignored, name); + } + else + { + h->state = __itt_thread_ignored; + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); +} + +static void ITTAPI ITT_VERSIONIZE(ITT_JOIN(_N_(thr_ignore),_init))(void) +{ + ITT_VERSIONIZE(ITT_JOIN(_N_(thread_ignore),_init))(); +} + +/* -------------------------------------------------------------------------- */ + +static const char* __itt_fsplit(const char* s, const char* sep, const char** out, int* len) +{ + int i; + int j; + + if (!s || !sep || !out || !len) + return NULL; + + for (i = 0; s[i]; i++) + { + int b = 0; + for (j = 0; sep[j]; j++) + if (s[i] == sep[j]) + { + b = 1; + break; + } + if (!b) + break; + } + + if (!s[i]) + return NULL; + + *len = 0; + *out = &s[i]; + + for (; s[i]; i++, (*len)++) + { + int b = 0; + for (j = 0; sep[j]; j++) + if (s[i] == sep[j]) + { + b = 1; + break; + } + if (b) + break; + } + + for (; s[i]; i++) + { + int b = 0; + for (j = 0; sep[j]; j++) + if (s[i] == sep[j]) + { + b = 1; + break; + } + if (!b) + break; + } + + return &s[i]; +} + +/* This function return value of env variable that placed into static buffer. + * !!! The same static buffer is used for subsequent calls. !!! + * This was done to aviod dynamic allocation for few calls. + * Actually we need this function only four times. + */ +static const char* __itt_get_env_var(const char* name) +{ +#define MAX_ENV_VALUE_SIZE 4086 + static char env_buff[MAX_ENV_VALUE_SIZE]; + static char* env_value = (char*)env_buff; + + if (name != NULL) + { +#if ITT_PLATFORM==ITT_PLATFORM_WIN + size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff); + DWORD rc = GetEnvironmentVariableA(name, env_value, (DWORD)max_len); + if (rc >= max_len) + __itt_report_error(__itt_error_env_too_long, name, (size_t)rc - 1, (size_t)(max_len - 1)); + else if (rc > 0) + { + const char* ret = (const char*)env_value; + env_value += rc + 1; + return ret; + } + else + { + /* If environment variable is empty, GetEnvirornmentVariables() + * returns zero (number of characters (not including terminating null), + * and GetLastError() returns ERROR_SUCCESS. */ + DWORD err = GetLastError(); + if (err == ERROR_SUCCESS) + return env_value; + + if (err != ERROR_ENVVAR_NOT_FOUND) + __itt_report_error(__itt_error_cant_read_env, name, (int)err); + } +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ + char* env = getenv(name); + if (env != NULL) + { + size_t len = strlen(env); + size_t max_len = MAX_ENV_VALUE_SIZE - (size_t)(env_value - env_buff); + if (len < max_len) + { + const char* ret = (const char*)env_value; + strncpy(env_value, env, len + 1); + env_value += len + 1; + return ret; + } else + __itt_report_error(__itt_error_env_too_long, name, (size_t)len, (size_t)(max_len - 1)); + } +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + } + return NULL; +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN + +#include <Winreg.h> + +typedef LONG (APIENTRY* RegCloseKeyProcType)(HKEY); +typedef LONG (APIENTRY* RegOpenKeyExAProcType)(HKEY, LPCTSTR, DWORD, REGSAM, PHKEY); +typedef LONG (APIENTRY* RegGetValueAProcType)(HKEY, LPCTSTR, LPCTSTR, DWORD, LPDWORD, PVOID, LPDWORD); + +/* This function return value of registry key that placed into static buffer. + * This was done to aviod dynamic memory allocation. + */ +static const char* __itt_get_lib_name_registry(void) +{ +#define MAX_REG_VALUE_SIZE 4086 + static char reg_buff[MAX_REG_VALUE_SIZE]; + DWORD size; + LONG res; + HKEY hKey; + RegCloseKeyProcType pRegCloseKey; + RegOpenKeyExAProcType pRegOpenKeyExA; + RegGetValueAProcType pRegGetValueA; + HMODULE h_advapi32 = LoadLibraryA("advapi32.dll"); + DWORD autodetect = 0; + + if (h_advapi32 == NULL) + { + return NULL; + } + + pRegCloseKey = (RegCloseKeyProcType)GetProcAddress(h_advapi32, "CloseKey"); + pRegOpenKeyExA = (RegOpenKeyExAProcType)GetProcAddress(h_advapi32, "RegOpenKeyExA"); + pRegGetValueA = (RegGetValueAProcType)GetProcAddress(h_advapi32, "RegGetValueA"); + + if (pRegCloseKey == NULL || + pRegOpenKeyExA == NULL || + pRegGetValueA == NULL) + { + FreeLibrary(h_advapi32); + return NULL; + } + + res = pRegOpenKeyExA(HKEY_CURRENT_USER, (LPCTSTR)"Software\\Intel Corporation\\ITT Environment\\Collector", 0, KEY_READ, &hKey); + if (res != ERROR_SUCCESS || hKey == 0) + { + FreeLibrary(h_advapi32); + return NULL; + } + + size = sizeof(DWORD); + res = pRegGetValueA(hKey, (LPCTSTR)"AutoDetect", NULL, RRF_RT_REG_DWORD, NULL, (BYTE*)&autodetect, &size); + if (res != ERROR_SUCCESS || size == 0 || autodetect == 0) + { + pRegCloseKey(hKey); + FreeLibrary(h_advapi32); + return NULL; + } + + size = MAX_REG_VALUE_SIZE-1; + res = pRegGetValueA(hKey, (LPCTSTR)ITT_TO_STR(LIB_VAR_NAME), NULL, REG_SZ, NULL, (BYTE*)®_buff, &size); + pRegCloseKey(hKey); + FreeLibrary(h_advapi32); + + return (res == ERROR_SUCCESS && size > 0) ? reg_buff : NULL; +} + +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +static const char* __itt_get_lib_name(void) +{ + const char* lib_name = __itt_get_env_var(ITT_TO_STR(LIB_VAR_NAME)); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + if (lib_name == NULL) + lib_name = __itt_get_lib_name_registry(); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + return lib_name; +} + +#ifndef min +#define min(a,b) (a) < (b) ? (a) : (b) +#endif /* min */ + +static __itt_group_id __itt_get_groups(void) +{ + register int i; + __itt_group_id res = __itt_group_none; + const char* var_name = "INTEL_ITTNOTIFY_GROUPS"; + const char* group_str = __itt_get_env_var(var_name); + + if (group_str != NULL) + { + int len; + char gr[255]; + const char* chunk; + while ((group_str = __itt_fsplit(group_str, ",; ", &chunk, &len)) != NULL) + { + __itt_fstrcpyn(gr, chunk, sizeof(gr)); + + gr[min((unsigned)len, sizeof(gr) - 1)] = 0; + + for (i = 0; group_list[i].name != NULL; i++) + { + if (!__itt_fstrcmp(gr, group_list[i].name)) + { + res = (__itt_group_id)(res | group_list[i].id); + break; + } + } + } + /* TODO: !!! Workaround for bug with warning for unknown group !!! + * Should be fixed in new initialization scheme. + * Now the following groups should be set always. */ + for (i = 0; group_list[i].id != __itt_group_none; i++) + if (group_list[i].id != __itt_group_all && + group_list[i].id > __itt_group_splitter_min && + group_list[i].id < __itt_group_splitter_max) + res = (__itt_group_id)(res | group_list[i].id); + return res; + } + else + { + for (i = 0; group_alias[i].env_var != NULL; i++) + if (__itt_get_env_var(group_alias[i].env_var) != NULL) + return group_alias[i].groups; + } + + return res; +} + +static int __itt_lib_version(lib_t lib) +{ + if (lib == NULL) + return 0; + if (__itt_get_proc(lib, "__itt_api_init")) + return 2; + if (__itt_get_proc(lib, "__itt_api_version")) + return 1; + return 0; +} + +/* It's not used right now! Comment it out to avoid warnings. +static void __itt_reinit_all_pointers(void) +{ + register int i; + // Fill all pointers with initial stubs + for (i = 0; __itt_ittapi_global.api_list_ptr[i].name != NULL; i++) + *__itt_ittapi_global.api_list_ptr[i].func_ptr = __itt_ittapi_global.api_list_ptr[i].init_func; +} +*/ + +static void __itt_nullify_all_pointers(void) +{ + register int i; + /* Nulify all pointers except domain_create and string_handle_create */ + for (i = 0; __itt_ittapi_global.api_list_ptr[i].name != NULL; i++) + *__itt_ittapi_global.api_list_ptr[i].func_ptr = __itt_ittapi_global.api_list_ptr[i].null_func; +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(push) +#pragma warning(disable: 4054) /* warning C4054: 'type cast' : from function pointer 'XXX' to data pointer 'void *' */ +#pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +ITT_EXTERN_C void _N_(fini_ittlib)(void) +{ + __itt_api_fini_t* __itt_api_fini_ptr; + static volatile TIDT current_thread = 0; + + if (__itt_ittapi_global.api_initialized) + { + __itt_mutex_lock(&__itt_ittapi_global.mutex); + if (__itt_ittapi_global.api_initialized) + { + if (current_thread == 0) + { + current_thread = __itt_thread_id(); + __itt_api_fini_ptr = (__itt_api_fini_t*)__itt_get_proc(__itt_ittapi_global.lib, "__itt_api_fini"); + if (__itt_api_fini_ptr) + __itt_api_fini_ptr(&__itt_ittapi_global); + + __itt_nullify_all_pointers(); + + /* TODO: !!! not safe !!! don't support unload so far. + * if (__itt_ittapi_global.lib != NULL) + * __itt_unload_lib(__itt_ittapi_global.lib); + * __itt_ittapi_global.lib = NULL; + */ + __itt_ittapi_global.api_initialized = 0; + current_thread = 0; + } + } + __itt_mutex_unlock(&__itt_ittapi_global.mutex); + } +} + +ITT_EXTERN_C int _N_(init_ittlib)(const char* lib_name, __itt_group_id init_groups) +{ + register int i; + __itt_group_id groups; +#ifdef ITT_COMPLETE_GROUP + __itt_group_id zero_group = __itt_group_none; +#endif /* ITT_COMPLETE_GROUP */ + static volatile TIDT current_thread = 0; + + if (!__itt_ittapi_global.api_initialized) + { +#ifndef ITT_SIMPLE_INIT + ITT_MUTEX_INIT_AND_LOCK(__itt_ittapi_global); +#endif /* ITT_SIMPLE_INIT */ + + if (!__itt_ittapi_global.api_initialized) + { + if (current_thread == 0) + { + current_thread = __itt_thread_id(); + __itt_ittapi_global.thread_list->tid = current_thread; + if (lib_name == NULL) + lib_name = __itt_get_lib_name(); + groups = __itt_get_groups(); + if (groups != __itt_group_none || lib_name != NULL) + { + __itt_ittapi_global.lib = __itt_load_lib((lib_name == NULL) ? ittnotify_lib_name : lib_name); + if (__itt_ittapi_global.lib != NULL) + { + __itt_api_init_t* __itt_api_init_ptr; + int lib_version = __itt_lib_version(__itt_ittapi_global.lib); + + switch (lib_version) { + case 0: + groups = __itt_group_legacy; + case 1: + /* Fill all pointers from dynamic library */ + for (i = 0; __itt_ittapi_global.api_list_ptr[i].name != NULL; i++) + { + if (__itt_ittapi_global.api_list_ptr[i].group & groups & init_groups) + { + *__itt_ittapi_global.api_list_ptr[i].func_ptr = (void*)__itt_get_proc(__itt_ittapi_global.lib, __itt_ittapi_global.api_list_ptr[i].name); + if (*__itt_ittapi_global.api_list_ptr[i].func_ptr == NULL) + { + /* Restore pointers for function with static implementation */ + *__itt_ittapi_global.api_list_ptr[i].func_ptr = __itt_ittapi_global.api_list_ptr[i].null_func; + __itt_report_error(__itt_error_no_symbol, lib_name, __itt_ittapi_global.api_list_ptr[i].name); +#ifdef ITT_COMPLETE_GROUP + zero_group = (__itt_group_id)(zero_group | __itt_ittapi_global.api_list_ptr[i].group); +#endif /* ITT_COMPLETE_GROUP */ + } + } + else + *__itt_ittapi_global.api_list_ptr[i].func_ptr = __itt_ittapi_global.api_list_ptr[i].null_func; + } + + if (groups == __itt_group_legacy) + { + /* Compatibility with legacy tools */ + ITTNOTIFY_NAME(thread_ignore) = ITTNOTIFY_NAME(thr_ignore); +#if ITT_PLATFORM==ITT_PLATFORM_WIN + ITTNOTIFY_NAME(sync_createA) = ITTNOTIFY_NAME(sync_set_nameA); + ITTNOTIFY_NAME(sync_createW) = ITTNOTIFY_NAME(sync_set_nameW); +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ + ITTNOTIFY_NAME(sync_create) = ITTNOTIFY_NAME(sync_set_name); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + ITTNOTIFY_NAME(sync_prepare) = ITTNOTIFY_NAME(notify_sync_prepare); + ITTNOTIFY_NAME(sync_cancel) = ITTNOTIFY_NAME(notify_sync_cancel); + ITTNOTIFY_NAME(sync_acquired) = ITTNOTIFY_NAME(notify_sync_acquired); + ITTNOTIFY_NAME(sync_releasing) = ITTNOTIFY_NAME(notify_sync_releasing); + } + +#ifdef ITT_COMPLETE_GROUP + for (i = 0; __itt_ittapi_global.api_list_ptr[i].name != NULL; i++) + if (__itt_ittapi_global.api_list_ptr[i].group & zero_group) + *__itt_ittapi_global.api_list_ptr[i].func_ptr = __itt_ittapi_global.api_list_ptr[i].null_func; +#endif /* ITT_COMPLETE_GROUP */ + break; + case 2: + __itt_api_init_ptr = (__itt_api_init_t*)__itt_get_proc(__itt_ittapi_global.lib, "__itt_api_init"); + if (__itt_api_init_ptr) + __itt_api_init_ptr(&__itt_ittapi_global, init_groups); + break; + } + } + else + { + __itt_nullify_all_pointers(); + + __itt_report_error(__itt_error_no_module, lib_name, +#if ITT_PLATFORM==ITT_PLATFORM_WIN + __itt_system_error() +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + dlerror() +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + ); + } + } + else + { + __itt_nullify_all_pointers(); + } + __itt_ittapi_global.api_initialized = 1; + current_thread = 0; + /* !!! Just to avoid unused code elimination !!! */ + if (__itt_fini_ittlib_ptr == _N_(fini_ittlib)) current_thread = 0; + } + } + +#ifndef ITT_SIMPLE_INIT + __itt_mutex_unlock(&__itt_ittapi_global.mutex); +#endif /* ITT_SIMPLE_INIT */ + } + + /* Evaluating if any function ptr is non empty and it's in init_groups */ + for (i = 0; __itt_ittapi_global.api_list_ptr[i].name != NULL; i++) + if (*__itt_ittapi_global.api_list_ptr[i].func_ptr != __itt_ittapi_global.api_list_ptr[i].null_func && + __itt_ittapi_global.api_list_ptr[i].group & init_groups) + return 1; + return 0; +} + +ITT_EXTERN_C __itt_error_handler_t* _N_(set_error_handler)(__itt_error_handler_t* handler) +{ + __itt_error_handler_t* prev = (__itt_error_handler_t*)__itt_ittapi_global.error_handler; + __itt_ittapi_global.error_handler = (void*)handler; + return prev; +} + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#pragma warning(pop) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.h new file mode 100644 index 0000000000..db19b9baf5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_static.h @@ -0,0 +1,301 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "ittnotify_config.h" + +#ifndef ITT_FORMAT_DEFINED +# ifndef ITT_FORMAT +# define ITT_FORMAT +# endif /* ITT_FORMAT */ +# ifndef ITT_NO_PARAMS +# define ITT_NO_PARAMS +# endif /* ITT_NO_PARAMS */ +#endif /* ITT_FORMAT_DEFINED */ + +/* + * parameters for macro expected: + * ITT_STUB(api, type, func_name, arguments, params, func_name_in_dll, group, printf_fmt) + */ +#ifdef __ITT_INTERNAL_INIT + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_domain*, domain_createA, (const char *name), (ITT_FORMAT name), domain_createA, __itt_group_structure, "\"%s\"") +ITT_STUB(ITTAPI, __itt_domain*, domain_createW, (const wchar_t *name), (ITT_FORMAT name), domain_createW, __itt_group_structure, "\"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_domain*, domain_create, (const char *name), (ITT_FORMAT name), domain_create, __itt_group_structure, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createA, (const char *name), (ITT_FORMAT name), string_handle_createA, __itt_group_structure, "\"%s\"") +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_createW, (const wchar_t *name), (ITT_FORMAT name), string_handle_createW, __itt_group_structure, "\"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_string_handle*, string_handle_create, (const char *name), (ITT_FORMAT name), string_handle_create, __itt_group_structure, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +ITT_STUBV(ITTAPI, void, pause, (void), (ITT_NO_PARAMS), pause, __itt_group_control | __itt_group_legacy, "no args") +ITT_STUBV(ITTAPI, void, resume, (void), (ITT_NO_PARAMS), resume, __itt_group_control | __itt_group_legacy, "no args") + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, thread_set_nameA, (const char *name), (ITT_FORMAT name), thread_set_nameA, __itt_group_thread, "\"%s\"") +ITT_STUBV(ITTAPI, void, thread_set_nameW, (const wchar_t *name), (ITT_FORMAT name), thread_set_nameW, __itt_group_thread, "\"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, thread_set_name, (const char *name), (ITT_FORMAT name), thread_set_name, __itt_group_thread, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, thread_ignore, (void), (ITT_NO_PARAMS), thread_ignore, __itt_group_thread, "no args") + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setA, __itt_group_thread | __itt_group_legacy, "\"%s\", %d") +ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), thr_name_setW, __itt_group_thread | __itt_group_legacy, "\"%S\", %d") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen), (ITT_FORMAT name, namelen), thr_name_set, __itt_group_thread | __itt_group_legacy, "\"%s\", %d") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(LIBITTAPI, void, thr_ignore, (void), (ITT_NO_PARAMS), thr_ignore, __itt_group_thread | __itt_group_legacy, "no args") +#endif /* __ITT_INTERNAL_BODY */ + +#else /* __ITT_INTERNAL_INIT */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, sync_createA, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createA, __itt_group_sync | __itt_group_fsync, "%p, \"%s\", \"%s\", %x") +ITT_STUBV(ITTAPI, void, sync_createW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_createW, __itt_group_sync | __itt_group_fsync, "%p, \"%S\", \"%S\", %x") +ITT_STUBV(ITTAPI, void, sync_renameA, (void *addr, const char *name), (ITT_FORMAT addr, name), sync_renameA, __itt_group_sync | __itt_group_fsync, "%p, \"%s\"") +ITT_STUBV(ITTAPI, void, sync_renameW, (void *addr, const wchar_t *name), (ITT_FORMAT addr, name), sync_renameW, __itt_group_sync | __itt_group_fsync, "%p, \"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_create, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_create, __itt_group_sync | __itt_group_fsync, "%p, \"%s\", \"%s\", %x") +ITT_STUBV(ITTAPI, void, sync_rename, (void *addr, const char *name), (ITT_FORMAT addr, name), sync_rename, __itt_group_sync | __itt_group_fsync, "%p, \"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_destroy, (void *addr), (ITT_FORMAT addr), sync_destroy, __itt_group_sync | __itt_group_fsync, "%p") + +ITT_STUBV(ITTAPI, void, sync_prepare, (void* addr), (ITT_FORMAT addr), sync_prepare, __itt_group_sync, "%p") +ITT_STUBV(ITTAPI, void, sync_cancel, (void *addr), (ITT_FORMAT addr), sync_cancel, __itt_group_sync, "%p") +ITT_STUBV(ITTAPI, void, sync_acquired, (void *addr), (ITT_FORMAT addr), sync_acquired, __itt_group_sync, "%p") +ITT_STUBV(ITTAPI, void, sync_releasing, (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_sync, "%p") + +ITT_STUBV(ITTAPI, void, fsync_prepare, (void* addr), (ITT_FORMAT addr), sync_prepare, __itt_group_fsync, "%p") +ITT_STUBV(ITTAPI, void, fsync_cancel, (void *addr), (ITT_FORMAT addr), sync_cancel, __itt_group_fsync, "%p") +ITT_STUBV(ITTAPI, void, fsync_acquired, (void *addr), (ITT_FORMAT addr), sync_acquired, __itt_group_fsync, "%p") +ITT_STUBV(ITTAPI, void, fsync_releasing, (void* addr), (ITT_FORMAT addr), sync_releasing, __itt_group_fsync, "%p") + +ITT_STUBV(ITTAPI, void, model_site_begin, (__itt_model_site *site, __itt_model_site_instance *instance, const char *name), (ITT_FORMAT site, instance, name), model_site_begin, __itt_group_model, "%p, %p, \"%s\"") +ITT_STUBV(ITTAPI, void, model_site_end, (__itt_model_site *site, __itt_model_site_instance *instance), (ITT_FORMAT site, instance), model_site_end, __itt_group_model, "%p, %p") +ITT_STUBV(ITTAPI, void, model_task_begin, (__itt_model_task *task, __itt_model_task_instance *instance, const char *name), (ITT_FORMAT task, instance, name), model_task_begin, __itt_group_model, "%p, %p, \"%s\"") +ITT_STUBV(ITTAPI, void, model_task_end, (__itt_model_task *task, __itt_model_task_instance *instance), (ITT_FORMAT task, instance), model_task_end, __itt_group_model, "%p, %p") +ITT_STUBV(ITTAPI, void, model_lock_acquire, (void *lock), (ITT_FORMAT lock), model_lock_acquire, __itt_group_model, "%p") +ITT_STUBV(ITTAPI, void, model_lock_release, (void *lock), (ITT_FORMAT lock), model_lock_release, __itt_group_model, "%p") +ITT_STUBV(ITTAPI, void, model_record_allocation, (void *addr, size_t size), (ITT_FORMAT addr, size), model_record_allocation, __itt_group_model, "%p, %d") +ITT_STUBV(ITTAPI, void, model_record_deallocation, (void *addr), (ITT_FORMAT addr), model_record_deallocation, __itt_group_model, "%p") +ITT_STUBV(ITTAPI, void, model_induction_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_induction_uses, __itt_group_model, "%p, %d") +ITT_STUBV(ITTAPI, void, model_reduction_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_reduction_uses, __itt_group_model, "%p, %d") +ITT_STUBV(ITTAPI, void, model_observe_uses, (void* addr, size_t size), (ITT_FORMAT addr, size), model_observe_uses, __itt_group_model, "%p, %d") +ITT_STUBV(ITTAPI, void, model_clear_uses, (void* addr), (ITT_FORMAT addr), model_clear_uses, __itt_group_model, "%p") +ITT_STUBV(ITTAPI, void, model_disable_push, (__itt_model_disable x), (ITT_FORMAT x), model_disable_push, __itt_group_model, "%p") +ITT_STUBV(ITTAPI, void, model_disable_pop, (void), (ITT_NO_PARAMS), model_disable_pop, __itt_group_model, "no args") + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, model_site_beginW, (const wchar_t *name), (ITT_FORMAT name), model_site_beginW, __itt_group_model, "\"%s\"") +ITT_STUBV(ITTAPI, void, model_task_beginW, (const wchar_t *name), (ITT_FORMAT name), model_task_beginW, __itt_group_model, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, model_site_beginAL, (const char *name, size_t len), (ITT_FORMAT name, len), model_site_beginAL, __itt_group_model, "\"%s\", %d") +ITT_STUBV(ITTAPI, void, model_task_beginAL, (const char *name, size_t len), (ITT_FORMAT name, len), model_task_beginAL, __itt_group_model, "\"%s\", %d") +#endif /* __ITT_INTERNAL_BODY */ + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createA, (const char *name, const char *domain), (ITT_FORMAT name, domain), heap_function_createA, __itt_group_heap, "\"%s\", \"%s\"") +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), heap_function_createW, __itt_group_heap, "\"%s\", \"%s\"") +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_heap_function, heap_function_create, (const char *name, const char *domain), (ITT_FORMAT name, domain), heap_function_create, __itt_group_heap, "\"%s\", \"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* __ITT_INTERNAL_BODY */ +ITT_STUBV(ITTAPI, void, heap_allocate_begin, (__itt_heap_function h, size_t size, int initialized), (ITT_FORMAT h, size, initialized), heap_allocate_begin, __itt_group_heap, "%p, %lu, %d") +ITT_STUBV(ITTAPI, void, heap_allocate_end, (__itt_heap_function h, void** addr, size_t size, int initialized), (ITT_FORMAT h, addr, size, initialized), heap_allocate_end, __itt_group_heap, "%p, %p, %lu, %d") +ITT_STUBV(ITTAPI, void, heap_free_begin, (__itt_heap_function h, void* addr), (ITT_FORMAT h, addr), heap_free_begin, __itt_group_heap, "%p, %p") +ITT_STUBV(ITTAPI, void, heap_free_end, (__itt_heap_function h, void* addr), (ITT_FORMAT h, addr), heap_free_end, __itt_group_heap, "%p, %p") +ITT_STUBV(ITTAPI, void, heap_reallocate_begin, (__itt_heap_function h, void* addr, size_t new_size, int initialized), (ITT_FORMAT h, addr, new_size, initialized), heap_reallocate_begin, __itt_group_heap, "%p, %p, %lu, %d") +ITT_STUBV(ITTAPI, void, heap_reallocate_end, (__itt_heap_function h, void* addr, void** new_addr, size_t new_size, int initialized), (ITT_FORMAT h, addr, new_addr, new_size, initialized), heap_reallocate_end, __itt_group_heap, "%p, %p, %p, %lu, %d") +ITT_STUBV(ITTAPI, void, heap_internal_access_begin, (void), (ITT_NO_PARAMS), heap_internal_access_begin, __itt_group_heap, "no args") +ITT_STUBV(ITTAPI, void, heap_internal_access_end, (void), (ITT_NO_PARAMS), heap_internal_access_end, __itt_group_heap, "no args") + +ITT_STUBV(ITTAPI, void, id_create, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_create, __itt_group_structure, "%p, %lu") +ITT_STUBV(ITTAPI, void, id_destroy, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), id_destroy, __itt_group_structure, "%p, %lu") + +ITT_STUBV(ITTAPI, void, region_begin, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), region_begin, __itt_group_structure, "%p, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, region_end, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), region_end, __itt_group_structure, "%p, %lu") + +#ifndef __ITT_INTERNAL_BODY +ITT_STUBV(ITTAPI, void, frame_begin_v3, (const __itt_domain *domain, __itt_id *id), (ITT_FORMAT domain, id), frame_begin_v3, __itt_group_structure, "%p, %p") +ITT_STUBV(ITTAPI, void, frame_end_v3, (const __itt_domain *domain, __itt_id *id), (ITT_FORMAT domain, id), frame_end_v3, __itt_group_structure, "%p, %p") +#endif /* __ITT_INTERNAL_BODY */ + +ITT_STUBV(ITTAPI, void, task_group, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_group, __itt_group_structure, "%p, %lu, %lu, %p") + +ITT_STUBV(ITTAPI, void, task_begin, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_begin, __itt_group_structure, "%p, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_begin_fn, (const __itt_domain *domain, __itt_id id, __itt_id parent, void* fn), (ITT_FORMAT domain, id, parent, fn), task_begin_fn, __itt_group_structure, "%p, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_end, (const __itt_domain *domain), (ITT_FORMAT domain), task_end, __itt_group_structure, "%p") + +ITT_STUBV(ITTAPI, void, counter_inc_v3, (const __itt_domain *domain, __itt_string_handle *name), (ITT_FORMAT domain, name), counter_inc_v3, __itt_group_structure, "%p, %p") +ITT_STUBV(ITTAPI, void, counter_inc_delta_v3, (const __itt_domain *domain, __itt_string_handle *name, unsigned long long value), (ITT_FORMAT domain, name, value), counter_inc_delta_v3, __itt_group_structure, "%p, %p, %lu") + +ITT_STUBV(ITTAPI, void, marker, (const __itt_domain *domain, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, id, name, scope), marker, __itt_group_structure, "%p, %lu, %p, %d") + +ITT_STUBV(ITTAPI, void, metadata_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, id, key, type, count, data), metadata_add, __itt_group_structure, "%p, %lu, %p, %d, %lu, %p") +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, metadata_str_addA, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_addA, __itt_group_structure, "%p, %lu, %p, %p, %lu") +ITT_STUBV(ITTAPI, void, metadata_str_addW, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const wchar_t* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_addW, __itt_group_structure, "%p, %lu, %p, %p, %lu") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, metadata_str_add, (const __itt_domain *domain, __itt_id id, __itt_string_handle *key, const char* data, size_t length), (ITT_FORMAT domain, id, key, data, length), metadata_str_add, __itt_group_structure, "%p, %lu, %p, %p, %lu") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +ITT_STUBV(ITTAPI, void, relation_add_to_current, (const __itt_domain *domain, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, relation, tail), relation_add_to_current, __itt_group_structure, "%p, %lu, %p") +ITT_STUBV(ITTAPI, void, relation_add, (const __itt_domain *domain, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, head, relation, tail), relation_add, __itt_group_structure, "%p, %p, %lu, %p") + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen), (ITT_FORMAT name, namelen), event_createA, __itt_group_mark | __itt_group_legacy, "\"%s\", %d") +ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen), (ITT_FORMAT name, namelen), event_createW, __itt_group_mark | __itt_group_legacy, "\"%S\", %d") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen), (ITT_FORMAT name, namelen), event_create, __itt_group_mark | __itt_group_legacy, "\"%s\", %d") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event), (ITT_FORMAT event), event_start, __itt_group_mark | __itt_group_legacy, "%d") +ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event), (ITT_FORMAT event), event_end, __itt_group_mark | __itt_group_legacy, "%d") +#endif /* __ITT_INTERNAL_BODY */ + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", \"%s\", %x") +ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%S\", \"%S\", %x") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute), (ITT_FORMAT addr, objtype, objname, attribute), sync_set_name, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "p, \"%s\", \"%s\", %x") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *p, const char *objtype, int typelen, const char *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameA, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", %d, \"%s\", %d, %x") +ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *p, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_nameW, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%S\", %d, \"%S\", %d, %x") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *p, const char *objtype, int typelen, const char *objname, int namelen, int attribute), (ITT_FORMAT p, objtype, typelen, objname, namelen, attribute), notify_sync_name, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p, \"%s\", %d, \"%s\", %d, %x") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *p), (ITT_FORMAT p), notify_sync_prepare, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") +ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *p), (ITT_FORMAT p), notify_sync_cancel, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") +ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *p), (ITT_FORMAT p), notify_sync_acquired, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") +ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *p), (ITT_FORMAT p), notify_sync_releasing, __itt_group_sync | __itt_group_fsync | __itt_group_legacy, "%p") +#endif /* __ITT_INTERNAL_BODY */ + +ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_read, __itt_group_legacy, "%p, %lu") +ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_write, __itt_group_legacy, "%p, %lu") +ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size), (ITT_FORMAT addr, size), memory_update, __itt_group_legacy, "%p, %lu") + +ITT_STUB(LIBITTAPI, __itt_state_t, state_get, (void), (ITT_NO_PARAMS), state_get, __itt_group_legacy, "no args") +ITT_STUB(LIBITTAPI, __itt_state_t, state_set, (__itt_state_t s), (ITT_FORMAT s), state_set, __itt_group_legacy, "%d") +ITT_STUB(LIBITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s), (ITT_FORMAT p, s), obj_mode_set, __itt_group_legacy, "%d, %d") +ITT_STUB(LIBITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s), (ITT_FORMAT p, s), thr_mode_set, __itt_group_legacy, "%d, %d") + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain), (ITT_FORMAT domain), frame_createA, __itt_group_frame, "\"%s\"") +ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain), (ITT_FORMAT domain), frame_createW, __itt_group_frame, "\"%s\"") +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain), (ITT_FORMAT domain), frame_create, __itt_group_frame, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* __ITT_INTERNAL_BODY */ +ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame), (ITT_FORMAT frame), frame_begin, __itt_group_frame, "%p") +ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame), (ITT_FORMAT frame), frame_end, __itt_group_frame, "%p") + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_counter, counter_createA, (const char *name, const char *domain), (ITT_FORMAT name, domain), counter_createA, __itt_group_counter, "\"%s\", \"%s\"") +ITT_STUB(ITTAPI, __itt_counter, counter_createW, (const wchar_t *name, const wchar_t *domain), (ITT_FORMAT name, domain), counter_createW, __itt_group_counter, "\"%s\", \"%s\"") +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_counter, counter_create, (const char *name, const char *domain), (ITT_FORMAT name, domain), counter_create, __itt_group_counter, "\"%s\", \"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* __ITT_INTERNAL_BODY */ +ITT_STUBV(ITTAPI, void, counter_destroy, (__itt_counter id), (ITT_FORMAT id), counter_destroy, __itt_group_counter, "%p") +ITT_STUBV(ITTAPI, void, counter_inc, (__itt_counter id), (ITT_FORMAT id), counter_inc, __itt_group_counter, "%p") +ITT_STUBV(ITTAPI, void, counter_inc_delta, (__itt_counter id, unsigned long long value), (ITT_FORMAT id, value), counter_inc_delta, __itt_group_counter, "%p, %lu") + +#ifndef __ITT_INTERNAL_BODY +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_mark_type, mark_createA, (const char *name), (ITT_FORMAT name), mark_createA, __itt_group_mark, "\"%s\"") +ITT_STUB(ITTAPI, __itt_mark_type, mark_createW, (const wchar_t *name), (ITT_FORMAT name), mark_createW, __itt_group_mark, "\"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_mark_type, mark_create, (const char *name), (ITT_FORMAT name), mark_create, __itt_group_mark, "\"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* __ITT_INTERNAL_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, markA, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), markA, __itt_group_mark, "%d, \"%s\"") +ITT_STUB(ITTAPI, int, markW, (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), markW, __itt_group_mark, "%d, \"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark, __itt_group_mark, "%d, \"%s\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark_off, (__itt_mark_type mt), (ITT_FORMAT mt), mark_off, __itt_group_mark, "%d") +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, int, mark_globalA, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark_globalA, __itt_group_mark, "%d, \"%s\"") +ITT_STUB(ITTAPI, int, mark_globalW, (__itt_mark_type mt, const wchar_t *parameter), (ITT_FORMAT mt, parameter), mark_globalW, __itt_group_mark, "%d, \"%S\"") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark_global, (__itt_mark_type mt, const char *parameter), (ITT_FORMAT mt, parameter), mark_global, __itt_group_mark, "%d, \"%S\"") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, int, mark_global_off, (__itt_mark_type mt), (ITT_FORMAT mt), mark_global_off, __itt_group_mark, "%d") + +#ifndef __ITT_INTERNAL_BODY +ITT_STUB(ITTAPI, __itt_caller, stack_caller_create, (void), (ITT_NO_PARAMS), stack_caller_create, __itt_group_stitch, "no args") +#endif /* __ITT_INTERNAL_BODY */ +ITT_STUBV(ITTAPI, void, stack_caller_destroy, (__itt_caller id), (ITT_FORMAT id), stack_caller_destroy, __itt_group_stitch, "%p") +ITT_STUBV(ITTAPI, void, stack_callee_enter, (__itt_caller id), (ITT_FORMAT id), stack_callee_enter, __itt_group_stitch, "%p") +ITT_STUBV(ITTAPI, void, stack_callee_leave, (__itt_caller id), (ITT_FORMAT id), stack_callee_leave, __itt_group_stitch, "%p") + +ITT_STUB(ITTAPI, __itt_clock_domain*, clock_domain_create, (__itt_get_clock_info_fn fn, void* fn_data), (ITT_FORMAT fn, fn_data), clock_domain_create, __itt_group_structure, "%p, %p") +ITT_STUBV(ITTAPI, void, clock_domain_reset, (void), (ITT_NO_PARAMS), clock_domain_reset, __itt_group_structure, "no args") +ITT_STUBV(ITTAPI, void, id_create_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_create_ex, __itt_group_structure, "%p, %p, %lu, %lu") +ITT_STUBV(ITTAPI, void, id_destroy_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), id_destroy_ex, __itt_group_structure, "%p, %p, %lu, %lu") +ITT_STUBV(ITTAPI, void, task_begin_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_begin_fn_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, void* fn), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, fn), task_begin_fn_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_end_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp), (ITT_FORMAT domain, clock_domain, timestamp), task_end_ex, __itt_group_structure, "%p, %p, %lu") +ITT_STUBV(ITTAPI, void, task_begin_overlapped, (const __itt_domain *domain, __itt_id id, __itt_id parent, __itt_string_handle *name), (ITT_FORMAT domain, id, parent, name), task_begin_overlapped, __itt_group_structure, "%p, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_begin_overlapped_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_id parentid, __itt_string_handle *name), (ITT_FORMAT domain, clock_domain, timestamp, id, parentid, name), task_begin_overlapped_ex, __itt_group_structure, "%p, %p, %lu, %lu, %lu, %p") +ITT_STUBV(ITTAPI, void, task_end_overlapped, (const __itt_domain *domain, __itt_id id), (ITT_FORMAT domain, id), task_end_overlapped, __itt_group_structure, "%p, %lu") +ITT_STUBV(ITTAPI, void, task_end_overlapped_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id), (ITT_FORMAT domain, clock_domain, timestamp, id), task_end_overlapped_ex, __itt_group_structure, "%p, %p, %lu, %lu") +ITT_STUBV(ITTAPI, void, marker_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id id, __itt_string_handle *name, __itt_scope scope), (ITT_FORMAT domain, clock_domain, timestamp, id, name, scope), marker_ex, __itt_group_structure, "%p, %p, %lu, %lu, %p, %d") +ITT_STUBV(ITTAPI, void, metadata_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, __itt_metadata_type type, size_t count, void *data), (ITT_FORMAT domain, scope, key, type, count, data), metadata_add_with_scope, __itt_group_structure, "%p, %d, %p, %d, %lu, %p") +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeA, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeA, __itt_group_structure, "%p, %d, %p, %p, %lu") +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scopeW, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const wchar_t *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scopeW, __itt_group_structure, "%p, %d, %p, %p, %lu") +#else /* ITT_PLATFORM!=ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, metadata_str_add_with_scope, (const __itt_domain *domain, __itt_scope scope, __itt_string_handle *key, const char *data, size_t length), (ITT_FORMAT domain, scope, key, data, length), metadata_str_add_with_scope, __itt_group_structure, "%p, %d, %p, %p, %lu") +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, relation_add_to_current_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, clock_domain, timestamp, relation, tail), relation_add_to_current_ex, __itt_group_structure, "%p, %p, %lu, %d, %lu") +ITT_STUBV(ITTAPI, void, relation_add_ex, (const __itt_domain *domain, __itt_clock_domain* clock_domain, unsigned long long timestamp, __itt_id head, __itt_relation relation, __itt_id tail), (ITT_FORMAT domain, clock_domain, timestamp, head, relation, tail), relation_add_ex, __itt_group_structure, "%p, %p, %lu, %lu, %d, %lu") +ITT_STUB(ITTAPI, __itt_track_group*, track_group_create, (__itt_string_handle* name, __itt_track_group_type track_group_type), (ITT_FORMAT name, track_group_type), track_group_create, __itt_group_structure, "%p, %d") +ITT_STUB(ITTAPI, __itt_track*, track_create, (__itt_track_group* track_group,__itt_string_handle* name, __itt_track_type track_type), (ITT_FORMAT track_group, name, track_type), track_create, __itt_group_structure, "%p, %p, %d") +ITT_STUBV(ITTAPI, void, set_track, (__itt_track *track), (ITT_FORMAT track), set_track, __itt_group_structure, "%p") + +#ifndef __ITT_INTERNAL_BODY +ITT_STUB(ITTAPI, const char*, api_version, (void), (ITT_NO_PARAMS), api_version, __itt_group_all & ~__itt_group_legacy, "no args") +#endif /* __ITT_INTERNAL_BODY */ + +#endif /* __ITT_INTERNAL_INIT */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_types.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_types.h new file mode 100644 index 0000000000..32d3b851dc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/ittnotify_types.h @@ -0,0 +1,81 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _ITTNOTIFY_TYPES_H_ +#define _ITTNOTIFY_TYPES_H_ + +typedef enum ___itt_group_id +{ + __itt_group_none = 0, + __itt_group_legacy = 1<<0, + __itt_group_control = 1<<1, + __itt_group_thread = 1<<2, + __itt_group_mark = 1<<3, + __itt_group_sync = 1<<4, + __itt_group_fsync = 1<<5, + __itt_group_jit = 1<<6, + __itt_group_model = 1<<7, + __itt_group_splitter_min = 1<<7, + __itt_group_counter = 1<<8, + __itt_group_frame = 1<<9, + __itt_group_stitch = 1<<10, + __itt_group_heap = 1<<11, + __itt_group_splitter_max = 1<<12, + __itt_group_structure = 1<<12, + __itt_group_all = -1 +} __itt_group_id; + +#pragma pack(push, 8) + +typedef struct ___itt_group_list +{ + __itt_group_id id; + const char* name; +} __itt_group_list; + +#pragma pack(pop) + +#define ITT_GROUP_LIST(varname) \ + static __itt_group_list varname[] = { \ + { __itt_group_all, "all" }, \ + { __itt_group_control, "control" }, \ + { __itt_group_thread, "thread" }, \ + { __itt_group_mark, "mark" }, \ + { __itt_group_sync, "sync" }, \ + { __itt_group_fsync, "fsync" }, \ + { __itt_group_jit, "jit" }, \ + { __itt_group_model, "model" }, \ + { __itt_group_counter, "counter" }, \ + { __itt_group_frame, "frame" }, \ + { __itt_group_stitch, "stitch" }, \ + { __itt_group_heap, "heap" }, \ + { __itt_group_structure, "structure" }, \ + { __itt_group_none, NULL } \ + } + +#endif /* _ITTNOTIFY_TYPES_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/legacy/ittnotify.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/legacy/ittnotify.h new file mode 100644 index 0000000000..96f609fa6e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/legacy/ittnotify.h @@ -0,0 +1,983 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _LEGACY_ITTNOTIFY_H_ +#define _LEGACY_ITTNOTIFY_H_ + +/** + * @file + * @brief Legacy User API functions and types + */ + +/** @cond exclude_from_documentation */ +#ifndef ITT_OS_WIN +# define ITT_OS_WIN 1 +#endif /* ITT_OS_WIN */ + +#ifndef ITT_OS_LINUX +# define ITT_OS_LINUX 2 +#endif /* ITT_OS_LINUX */ + +#ifndef ITT_OS_MAC +# define ITT_OS_MAC 3 +#endif /* ITT_OS_MAC */ + +#ifndef ITT_OS +# if defined WIN32 || defined _WIN32 +# define ITT_OS ITT_OS_WIN +# elif defined( __APPLE__ ) && defined( __MACH__ ) +# define ITT_OS ITT_OS_MAC +# else +# define ITT_OS ITT_OS_LINUX +# endif +#endif /* ITT_OS */ + +#ifndef ITT_PLATFORM_WIN +# define ITT_PLATFORM_WIN 1 +#endif /* ITT_PLATFORM_WIN */ + +#ifndef ITT_PLATFORM_POSIX +# define ITT_PLATFORM_POSIX 2 +#endif /* ITT_PLATFORM_POSIX */ + +#ifndef ITT_PLATFORM +# if ITT_OS==ITT_OS_WIN +# define ITT_PLATFORM ITT_PLATFORM_WIN +# else +# define ITT_PLATFORM ITT_PLATFORM_POSIX +# endif /* _WIN32 */ +#endif /* ITT_PLATFORM */ + +#if defined(_UNICODE) && !defined(UNICODE) +#define UNICODE +#endif + +#include <stddef.h> +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <tchar.h> +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#include <stdint.h> +#if defined(UNICODE) || defined(_UNICODE) +#include <wchar.h> +#endif /* UNICODE || _UNICODE */ +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#ifndef CDECL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define CDECL __cdecl +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define CDECL /* not actual on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define CDECL __attribute__ ((cdecl)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* CDECL */ + +#ifndef STDCALL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define STDCALL __stdcall +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# if defined _M_X64 || defined _M_AMD64 || defined __x86_64__ +# define STDCALL /* not supported on x86_64 platform */ +# else /* _M_X64 || _M_AMD64 || __x86_64__ */ +# define STDCALL __attribute__ ((stdcall)) +# endif /* _M_X64 || _M_AMD64 || __x86_64__ */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* STDCALL */ + +#define ITTAPI CDECL +#define LIBITTAPI CDECL + +/* TODO: Temporary for compatibility! */ +#define ITTAPI_CALL CDECL +#define LIBITTAPI_CALL CDECL + +#if ITT_PLATFORM==ITT_PLATFORM_WIN +/* use __forceinline (VC++ specific) */ +#define INLINE __forceinline +#define INLINE_ATTRIBUTE /* nothing */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/* + * Generally, functions are not inlined unless optimization is specified. + * For functions declared inline, this attribute inlines the function even + * if no optimization level was specified. + */ +#ifdef __STRICT_ANSI__ +#define INLINE static +#else /* __STRICT_ANSI__ */ +#define INLINE static inline +#endif /* __STRICT_ANSI__ */ +#define INLINE_ATTRIBUTE __attribute__ ((always_inline)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +/** @endcond */ + +/** @cond exclude_from_documentation */ +/* Helper macro for joining tokens */ +#define ITT_JOIN_AUX(p,n) p##n +#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) + +#ifdef ITT_MAJOR +#undef ITT_MAJOR +#endif +#ifdef ITT_MINOR +#undef ITT_MINOR +#endif +#define ITT_MAJOR 3 +#define ITT_MINOR 0 + +/* Standard versioning of a token with major and minor version numbers */ +#define ITT_VERSIONIZE(x) \ + ITT_JOIN(x, \ + ITT_JOIN(_, \ + ITT_JOIN(ITT_MAJOR, \ + ITT_JOIN(_, ITT_MINOR)))) + +#ifndef INTEL_ITTNOTIFY_PREFIX +# define INTEL_ITTNOTIFY_PREFIX __itt_ +#endif /* INTEL_ITTNOTIFY_PREFIX */ +#ifndef INTEL_ITTNOTIFY_POSTFIX +# define INTEL_ITTNOTIFY_POSTFIX _ptr_ +#endif /* INTEL_ITTNOTIFY_POSTFIX */ + +#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) +#define ITTNOTIFY_NAME(n) ITT_VERSIONIZE(ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX))) + +#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) +#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) + +#define ITTNOTIFY_VOID_D0(n,d) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d) +#define ITTNOTIFY_VOID_D1(n,d,x) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x) +#define ITTNOTIFY_VOID_D2(n,d,x,y) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y) +#define ITTNOTIFY_VOID_D3(n,d,x,y,z) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z) +#define ITTNOTIFY_VOID_D4(n,d,x,y,z,a) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) +#define ITTNOTIFY_VOID_D5(n,d,x,y,z,a,b) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) +#define ITTNOTIFY_VOID_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? (void)0 : (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) +#define ITTNOTIFY_DATA_D0(n,d) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d) +#define ITTNOTIFY_DATA_D1(n,d,x) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x) +#define ITTNOTIFY_DATA_D2(n,d,x,y) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y) +#define ITTNOTIFY_DATA_D3(n,d,x,y,z) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z) +#define ITTNOTIFY_DATA_D4(n,d,x,y,z,a) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a) +#define ITTNOTIFY_DATA_D5(n,d,x,y,z,a,b) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b) +#define ITTNOTIFY_DATA_D6(n,d,x,y,z,a,b,c) (!(d)->flags) ? 0 : (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n)(d,x,y,z,a,b,c) + +#ifdef ITT_STUB +#undef ITT_STUB +#endif +#ifdef ITT_STUBV +#undef ITT_STUBV +#endif +#define ITT_STUBV(api,type,name,args) \ + typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ + extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); +#define ITT_STUB ITT_STUBV +/** @endcond */ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/** + * @defgroup legacy Legacy API + * @{ + * @} + */ + +/** + * @defgroup legacy_control Collection Control + * @ingroup legacy + * General behavior: application continues to run, but no profiling information is being collected + * + * Pausing occurs not only for the current thread but for all process as well as spawned processes + * - Intel(R) Parallel Inspector and Intel(R) Inspector XE: + * - Does not analyze or report errors that involve memory access. + * - Other errors are reported as usual. Pausing data collection in + * Intel(R) Parallel Inspector and Intel(R) Inspector XE + * only pauses tracing and analyzing memory access. + * It does not pause tracing or analyzing threading APIs. + * . + * - Intel(R) Parallel Amplifier and Intel(R) VTune(TM) Amplifier XE: + * - Does continue to record when new threads are started. + * . + * - Other effects: + * - Possible reduction of runtime overhead. + * . + * @{ + */ +#ifndef _ITTNOTIFY_H_ +/** @brief Pause collection */ +void ITTAPI __itt_pause(void); +/** @brief Resume collection */ +void ITTAPI __itt_resume(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, pause, (void)) +ITT_STUBV(ITTAPI, void, resume, (void)) +#define __itt_pause ITTNOTIFY_VOID(pause) +#define __itt_pause_ptr ITTNOTIFY_NAME(pause) +#define __itt_resume ITTNOTIFY_VOID(resume) +#define __itt_resume_ptr ITTNOTIFY_NAME(resume) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_pause() +#define __itt_pause_ptr 0 +#define __itt_resume() +#define __itt_resume_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_pause_ptr 0 +#define __itt_resume_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +#endif /* _ITTNOTIFY_H_ */ +/** @} legacy_control group */ + +/** + * @defgroup legacy_threads Threads + * @ingroup legacy + * Threads group + * @warning Legacy API + * @{ + */ +/** + * @deprecated Legacy API + * @brief Set name to be associated with thread in analysis GUI. + * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched) + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int LIBITTAPI __itt_thr_name_setA(const char *name, int namelen); +int LIBITTAPI __itt_thr_name_setW(const wchar_t *name, int namelen); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_thr_name_set __itt_thr_name_setW +# define __itt_thr_name_set_ptr __itt_thr_name_setW_ptr +#else +# define __itt_thr_name_set __itt_thr_name_setA +# define __itt_thr_name_set_ptr __itt_thr_name_setA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int LIBITTAPI __itt_thr_name_set(const char *name, int namelen); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, int, thr_name_setA, (const char *name, int namelen)) +ITT_STUB(LIBITTAPI, int, thr_name_setW, (const wchar_t *name, int namelen)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, int, thr_name_set, (const char *name, int namelen)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thr_name_setA ITTNOTIFY_DATA(thr_name_setA) +#define __itt_thr_name_setA_ptr ITTNOTIFY_NAME(thr_name_setA) +#define __itt_thr_name_setW ITTNOTIFY_DATA(thr_name_setW) +#define __itt_thr_name_setW_ptr ITTNOTIFY_NAME(thr_name_setW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thr_name_set ITTNOTIFY_DATA(thr_name_set) +#define __itt_thr_name_set_ptr ITTNOTIFY_NAME(thr_name_set) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thr_name_setA(name, namelen) +#define __itt_thr_name_setA_ptr 0 +#define __itt_thr_name_setW(name, namelen) +#define __itt_thr_name_setW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thr_name_set(name, namelen) +#define __itt_thr_name_set_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_thr_name_setA_ptr 0 +#define __itt_thr_name_setW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_thr_name_set_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Mark current thread as ignored from this point on, for the duration of its existence. + */ +void LIBITTAPI __itt_thr_ignore(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, thr_ignore, (void)) +#define __itt_thr_ignore ITTNOTIFY_VOID(thr_ignore) +#define __itt_thr_ignore_ptr ITTNOTIFY_NAME(thr_ignore) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_thr_ignore() +#define __itt_thr_ignore_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_thr_ignore_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} legacy_threads group */ + +/** + * @defgroup legacy_sync Synchronization + * @ingroup legacy + * Synchronization group + * @warning Legacy API + * @{ + */ +/** + * @hideinitializer + * @brief possible value of attribute argument for sync object type + */ +#define __itt_attr_barrier 1 + +/** + * @hideinitializer + * @brief possible value of attribute argument for sync object type + */ +#define __itt_attr_mutex 2 + +/** + * @deprecated Legacy API + * @brief Assign a name to a sync object using char or Unicode string + * @param[in] addr - pointer to the sync object. You should use a real pointer to your object + * to make sure that the values don't clash with other object addresses + * @param[in] objtype - null-terminated object type string. If NULL is passed, the object will + * be assumed to be of generic "User Synchronization" type + * @param[in] objname - null-terminated object name string. If NULL, no name will be assigned + * to the object -- you can use the __itt_sync_rename call later to assign + * the name + * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the + * exact semantics of how prepare/acquired/releasing calls work. + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +void ITTAPI __itt_sync_set_nameA(void *addr, const char *objtype, const char *objname, int attribute); +void ITTAPI __itt_sync_set_nameW(void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_sync_set_name __itt_sync_set_nameW +# define __itt_sync_set_name_ptr __itt_sync_set_nameW_ptr +#else /* UNICODE */ +# define __itt_sync_set_name __itt_sync_set_nameA +# define __itt_sync_set_name_ptr __itt_sync_set_nameA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +void ITTAPI __itt_sync_set_name(void *addr, const char* objtype, const char* objname, int attribute); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUBV(ITTAPI, void, sync_set_nameA, (void *addr, const char *objtype, const char *objname, int attribute)) +ITT_STUBV(ITTAPI, void, sync_set_nameW, (void *addr, const wchar_t *objtype, const wchar_t *objname, int attribute)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUBV(ITTAPI, void, sync_set_name, (void *addr, const char *objtype, const char *objname, int attribute)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_set_nameA ITTNOTIFY_VOID(sync_set_nameA) +#define __itt_sync_set_nameA_ptr ITTNOTIFY_NAME(sync_set_nameA) +#define __itt_sync_set_nameW ITTNOTIFY_VOID(sync_set_nameW) +#define __itt_sync_set_nameW_ptr ITTNOTIFY_NAME(sync_set_nameW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_set_name ITTNOTIFY_VOID(sync_set_name) +#define __itt_sync_set_name_ptr ITTNOTIFY_NAME(sync_set_name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_set_nameA(addr, objtype, objname, attribute) +#define __itt_sync_set_nameA_ptr 0 +#define __itt_sync_set_nameW(addr, objtype, objname, attribute) +#define __itt_sync_set_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_set_name(addr, objtype, objname, attribute) +#define __itt_sync_set_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_sync_set_nameA_ptr 0 +#define __itt_sync_set_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_sync_set_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Assign a name and type to a sync object using char or Unicode string + * @param[in] addr - pointer to the sync object. You should use a real pointer to your object + * to make sure that the values don't clash with other object addresses + * @param[in] objtype - null-terminated object type string. If NULL is passed, the object will + * be assumed to be of generic "User Synchronization" type + * @param[in] objname - null-terminated object name string. If NULL, no name will be assigned + * to the object -- you can use the __itt_sync_rename call later to assign + * the name + * @param[in] typelen, namelen - a lenght of string for appropriate objtype and objname parameter + * @param[in] attribute - one of [#__itt_attr_barrier, #__itt_attr_mutex] values which defines the + * exact semantics of how prepare/acquired/releasing calls work. + * @return __itt_err upon failure (name or namelen being null,name and namelen mismatched) + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +int LIBITTAPI __itt_notify_sync_nameA(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute); +int LIBITTAPI __itt_notify_sync_nameW(void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_notify_sync_name __itt_notify_sync_nameW +#else +# define __itt_notify_sync_name __itt_notify_sync_nameA +#endif +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +int LIBITTAPI __itt_notify_sync_name(void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, int, notify_sync_nameA, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute)) +ITT_STUB(LIBITTAPI, int, notify_sync_nameW, (void *addr, const wchar_t *objtype, int typelen, const wchar_t *objname, int namelen, int attribute)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, int, notify_sync_name, (void *addr, const char *objtype, int typelen, const char *objname, int namelen, int attribute)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_notify_sync_nameA ITTNOTIFY_DATA(notify_sync_nameA) +#define __itt_notify_sync_nameA_ptr ITTNOTIFY_NAME(notify_sync_nameA) +#define __itt_notify_sync_nameW ITTNOTIFY_DATA(notify_sync_nameW) +#define __itt_notify_sync_nameW_ptr ITTNOTIFY_NAME(notify_sync_nameW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_notify_sync_name ITTNOTIFY_DATA(notify_sync_name) +#define __itt_notify_sync_name_ptr ITTNOTIFY_NAME(notify_sync_name) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_notify_sync_nameA(addr, objtype, typelen, objname, namelen, attribute) +#define __itt_notify_sync_nameA_ptr 0 +#define __itt_notify_sync_nameW(addr, objtype, typelen, objname, namelen, attribute) +#define __itt_notify_sync_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_notify_sync_name(addr, objtype, typelen, objname, namelen, attribute) +#define __itt_notify_sync_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_notify_sync_nameA_ptr 0 +#define __itt_notify_sync_nameW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_notify_sync_name_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Enter spin loop on user-defined sync object + */ +void LIBITTAPI __itt_notify_sync_prepare(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, notify_sync_prepare, (void *addr)) +#define __itt_notify_sync_prepare ITTNOTIFY_VOID(notify_sync_prepare) +#define __itt_notify_sync_prepare_ptr ITTNOTIFY_NAME(notify_sync_prepare) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_notify_sync_prepare(addr) +#define __itt_notify_sync_prepare_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_notify_sync_prepare_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Quit spin loop without acquiring spin object + */ +void LIBITTAPI __itt_notify_sync_cancel(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, notify_sync_cancel, (void *addr)) +#define __itt_notify_sync_cancel ITTNOTIFY_VOID(notify_sync_cancel) +#define __itt_notify_sync_cancel_ptr ITTNOTIFY_NAME(notify_sync_cancel) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_notify_sync_cancel(addr) +#define __itt_notify_sync_cancel_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_notify_sync_cancel_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Successful spin loop completion (sync object acquired) + */ +void LIBITTAPI __itt_notify_sync_acquired(void *addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, notify_sync_acquired, (void *addr)) +#define __itt_notify_sync_acquired ITTNOTIFY_VOID(notify_sync_acquired) +#define __itt_notify_sync_acquired_ptr ITTNOTIFY_NAME(notify_sync_acquired) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_notify_sync_acquired(addr) +#define __itt_notify_sync_acquired_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_notify_sync_acquired_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Start sync object releasing code. Is called before the lock release call. + */ +void LIBITTAPI __itt_notify_sync_releasing(void* addr); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, notify_sync_releasing, (void *addr)) +#define __itt_notify_sync_releasing ITTNOTIFY_VOID(notify_sync_releasing) +#define __itt_notify_sync_releasing_ptr ITTNOTIFY_NAME(notify_sync_releasing) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_notify_sync_releasing(addr) +#define __itt_notify_sync_releasing_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_notify_sync_releasing_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} legacy_sync group */ + +#ifndef _ITTNOTIFY_H_ +/** + * @defgroup legacy_events Events + * @ingroup legacy + * Events group + * @{ + */ + +/** @brief user event type */ +typedef int __itt_event; + +/** + * @brief Create an event notification + * @note name or namelen being null/name and namelen not matching, user event feature not enabled + * @return non-zero event identifier upon success and __itt_err otherwise + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_event LIBITTAPI __itt_event_createA(const char *name, int namelen); +__itt_event LIBITTAPI __itt_event_createW(const wchar_t *name, int namelen); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_event_create __itt_event_createW +# define __itt_event_create_ptr __itt_event_createW_ptr +#else +# define __itt_event_create __itt_event_createA +# define __itt_event_create_ptr __itt_event_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_event LIBITTAPI __itt_event_create(const char *name, int namelen); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(LIBITTAPI, __itt_event, event_createA, (const char *name, int namelen)) +ITT_STUB(LIBITTAPI, __itt_event, event_createW, (const wchar_t *name, int namelen)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(LIBITTAPI, __itt_event, event_create, (const char *name, int namelen)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA ITTNOTIFY_DATA(event_createA) +#define __itt_event_createA_ptr ITTNOTIFY_NAME(event_createA) +#define __itt_event_createW ITTNOTIFY_DATA(event_createW) +#define __itt_event_createW_ptr ITTNOTIFY_NAME(event_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create ITTNOTIFY_DATA(event_create) +#define __itt_event_create_ptr ITTNOTIFY_NAME(event_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA(name, namelen) (__itt_event)0 +#define __itt_event_createA_ptr 0 +#define __itt_event_createW(name, namelen) (__itt_event)0 +#define __itt_event_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create(name, namelen) (__itt_event)0 +#define __itt_event_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_event_createA_ptr 0 +#define __itt_event_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_event_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an event occurrence. + * @return __itt_err upon failure (invalid event id/user event feature not enabled) + */ +int LIBITTAPI __itt_event_start(__itt_event event); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(LIBITTAPI, int, event_start, (__itt_event event)) +#define __itt_event_start ITTNOTIFY_DATA(event_start) +#define __itt_event_start_ptr ITTNOTIFY_NAME(event_start) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_event_start(event) (int)0 +#define __itt_event_start_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_event_start_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @brief Record an event end occurrence. + * @note It is optional if events do not have durations. + * @return __itt_err upon failure (invalid event id/user event feature not enabled) + */ +int LIBITTAPI __itt_event_end(__itt_event event); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(LIBITTAPI, int, event_end, (__itt_event event)) +#define __itt_event_end ITTNOTIFY_DATA(event_end) +#define __itt_event_end_ptr ITTNOTIFY_NAME(event_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_event_end(event) (int)0 +#define __itt_event_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_event_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} legacy_events group */ +#endif /* _ITTNOTIFY_H_ */ + +/** + * @defgroup legacy_memory Memory Accesses + * @ingroup legacy + */ + +/** + * @deprecated Legacy API + * @brief Inform the tool of memory accesses on reading + */ +void LIBITTAPI __itt_memory_read(void *addr, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, memory_read, (void *addr, size_t size)) +#define __itt_memory_read ITTNOTIFY_VOID(memory_read) +#define __itt_memory_read_ptr ITTNOTIFY_NAME(memory_read) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_memory_read(addr, size) +#define __itt_memory_read_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_memory_read_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Inform the tool of memory accesses on writing + */ +void LIBITTAPI __itt_memory_write(void *addr, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, memory_write, (void *addr, size_t size)) +#define __itt_memory_write ITTNOTIFY_VOID(memory_write) +#define __itt_memory_write_ptr ITTNOTIFY_NAME(memory_write) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_memory_write(addr, size) +#define __itt_memory_write_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_memory_write_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief Inform the tool of memory accesses on updating + */ +void LIBITTAPI __itt_memory_update(void *address, size_t size); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(LIBITTAPI, void, memory_update, (void *addr, size_t size)) +#define __itt_memory_update ITTNOTIFY_VOID(memory_update) +#define __itt_memory_update_ptr ITTNOTIFY_NAME(memory_update) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_memory_update(addr, size) +#define __itt_memory_update_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_memory_update_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} legacy_memory group */ + +/** + * @defgroup legacy_state Thread and Object States + * @ingroup legacy + */ + +/** @brief state type */ +typedef int __itt_state_t; + +/** @cond exclude_from_documentation */ +typedef enum __itt_obj_state { + __itt_obj_state_err = 0, + __itt_obj_state_clr = 1, + __itt_obj_state_set = 2, + __itt_obj_state_use = 3 +} __itt_obj_state_t; + +typedef enum __itt_thr_state { + __itt_thr_state_err = 0, + __itt_thr_state_clr = 1, + __itt_thr_state_set = 2 +} __itt_thr_state_t; + +typedef enum __itt_obj_prop { + __itt_obj_prop_watch = 1, + __itt_obj_prop_ignore = 2, + __itt_obj_prop_sharable = 3 +} __itt_obj_prop_t; + +typedef enum __itt_thr_prop { + __itt_thr_prop_quiet = 1 +} __itt_thr_prop_t; +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief managing thread and object states + */ +__itt_state_t LIBITTAPI __itt_state_get(void); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_state_t, state_get, (void)) +#define __itt_state_get ITTNOTIFY_DATA(state_get) +#define __itt_state_get_ptr ITTNOTIFY_NAME(state_get) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_state_get(void) (__itt_state_t)0 +#define __itt_state_get_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_state_get_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief managing thread and object states + */ +__itt_state_t LIBITTAPI __itt_state_set(__itt_state_t s); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_state_t, state_set, (__itt_state_t s)) +#define __itt_state_set ITTNOTIFY_DATA(state_set) +#define __itt_state_set_ptr ITTNOTIFY_NAME(state_set) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_state_set(s) (__itt_state_t)0 +#define __itt_state_set_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_state_set_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief managing thread and object modes + */ +__itt_thr_state_t LIBITTAPI __itt_thr_mode_set(__itt_thr_prop_t p, __itt_thr_state_t s); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_thr_state_t, thr_mode_set, (__itt_thr_prop_t p, __itt_thr_state_t s)) +#define __itt_thr_mode_set ITTNOTIFY_DATA(thr_mode_set) +#define __itt_thr_mode_set_ptr ITTNOTIFY_NAME(thr_mode_set) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_thr_mode_set(p, s) (__itt_thr_state_t)0 +#define __itt_thr_mode_set_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_thr_mode_set_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** + * @deprecated Legacy API + * @brief managing thread and object modes + */ +__itt_obj_state_t LIBITTAPI __itt_obj_mode_set(__itt_obj_prop_t p, __itt_obj_state_t s); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUB(ITTAPI, __itt_obj_state_t, obj_mode_set, (__itt_obj_prop_t p, __itt_obj_state_t s)) +#define __itt_obj_mode_set ITTNOTIFY_DATA(obj_mode_set) +#define __itt_obj_mode_set_ptr ITTNOTIFY_NAME(obj_mode_set) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_obj_mode_set(p, s) (__itt_obj_state_t)0 +#define __itt_obj_mode_set_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_obj_mode_set_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} legacy_state group */ + +/** + * @defgroup frames Frames + * @ingroup legacy + * Frames group + * @{ + */ +/** + * @brief opaque structure for frame identification + */ +typedef struct __itt_frame_t *__itt_frame; + +/** + * @brief Create a global frame with given domain + */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +__itt_frame ITTAPI __itt_frame_createA(const char *domain); +__itt_frame ITTAPI __itt_frame_createW(const wchar_t *domain); +#if defined(UNICODE) || defined(_UNICODE) +# define __itt_frame_create __itt_frame_createW +# define __itt_frame_create_ptr __itt_frame_createW_ptr +#else /* UNICODE */ +# define __itt_frame_create __itt_frame_createA +# define __itt_frame_create_ptr __itt_frame_createA_ptr +#endif /* UNICODE */ +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +__itt_frame ITTAPI __itt_frame_create(const char *domain); +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +#if ITT_PLATFORM==ITT_PLATFORM_WIN +ITT_STUB(ITTAPI, __itt_frame, frame_createA, (const char *domain)) +ITT_STUB(ITTAPI, __itt_frame, frame_createW, (const wchar_t *domain)) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +ITT_STUB(ITTAPI, __itt_frame, frame_create, (const char *domain)) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_frame_createA ITTNOTIFY_DATA(frame_createA) +#define __itt_frame_createA_ptr ITTNOTIFY_NAME(frame_createA) +#define __itt_frame_createW ITTNOTIFY_DATA(frame_createW) +#define __itt_frame_createW_ptr ITTNOTIFY_NAME(frame_createW) +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_frame_create ITTNOTIFY_DATA(frame_create) +#define __itt_frame_create_ptr ITTNOTIFY_NAME(frame_create) +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#else /* INTEL_NO_ITTNOTIFY_API */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_frame_createA(domain) +#define __itt_frame_createA_ptr 0 +#define __itt_frame_createW(domain) +#define __itt_frame_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_frame_create(domain) +#define __itt_frame_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#define __itt_frame_createA_ptr 0 +#define __itt_frame_createW_ptr 0 +#else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#define __itt_frame_create_ptr 0 +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ + +/** @brief Record an frame begin occurrence. */ +void ITTAPI __itt_frame_begin(__itt_frame frame); +/** @brief Record an frame end occurrence. */ +void ITTAPI __itt_frame_end (__itt_frame frame); + +/** @cond exclude_from_documentation */ +#ifndef INTEL_NO_MACRO_BODY +#ifndef INTEL_NO_ITTNOTIFY_API +ITT_STUBV(ITTAPI, void, frame_begin, (__itt_frame frame)) +ITT_STUBV(ITTAPI, void, frame_end, (__itt_frame frame)) +#define __itt_frame_begin ITTNOTIFY_VOID(frame_begin) +#define __itt_frame_begin_ptr ITTNOTIFY_NAME(frame_begin) +#define __itt_frame_end ITTNOTIFY_VOID(frame_end) +#define __itt_frame_end_ptr ITTNOTIFY_NAME(frame_end) +#else /* INTEL_NO_ITTNOTIFY_API */ +#define __itt_frame_begin(frame) +#define __itt_frame_begin_ptr 0 +#define __itt_frame_end(frame) +#define __itt_frame_end_ptr 0 +#endif /* INTEL_NO_ITTNOTIFY_API */ +#else /* INTEL_NO_MACRO_BODY */ +#define __itt_frame_begin_ptr 0 +#define __itt_frame_end_ptr 0 +#endif /* INTEL_NO_MACRO_BODY */ +/** @endcond */ +/** @} frames group */ + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _LEGACY_ITTNOTIFY_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/prototype/ittnotify.h b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/prototype/ittnotify.h new file mode 100644 index 0000000000..11c16622ee --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/tools_api/prototype/ittnotify.h @@ -0,0 +1,148 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _PROTOTYPE_ITTNOTIFY_H_ +#define _PROTOTYPE_ITTNOTIFY_H_ +/** + * @file + * @brief Prototype User API functions and types + */ + +/** @cond exclude_from_documentation */ +#ifndef ITT_OS_WIN +# define ITT_OS_WIN 1 +#endif /* ITT_OS_WIN */ + +#ifndef ITT_OS_LINUX +# define ITT_OS_LINUX 2 +#endif /* ITT_OS_LINUX */ + +#ifndef ITT_OS_MAC +# define ITT_OS_MAC 3 +#endif /* ITT_OS_MAC */ + +#ifndef ITT_OS +# if defined WIN32 || defined _WIN32 +# define ITT_OS ITT_OS_WIN +# elif defined( __APPLE__ ) && defined( __MACH__ ) +# define ITT_OS ITT_OS_MAC +# else +# define ITT_OS ITT_OS_LINUX +# endif +#endif /* ITT_OS */ + +#ifndef ITT_PLATFORM_WIN +# define ITT_PLATFORM_WIN 1 +#endif /* ITT_PLATFORM_WIN */ + +#ifndef ITT_PLATFORM_POSIX +# define ITT_PLATFORM_POSIX 2 +#endif /* ITT_PLATFORM_POSIX */ + +#ifndef ITT_PLATFORM +# if ITT_OS==ITT_OS_WIN +# define ITT_PLATFORM ITT_PLATFORM_WIN +# else +# define ITT_PLATFORM ITT_PLATFORM_POSIX +# endif /* _WIN32 */ +#endif /* ITT_PLATFORM */ + +#include <stddef.h> +#include <stdarg.h> +#if ITT_PLATFORM==ITT_PLATFORM_WIN +#include <tchar.h> +#endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ + +#ifndef CDECL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define CDECL __cdecl +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# define CDECL /* nothing */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* CDECL */ + +#ifndef STDCALL +# if ITT_PLATFORM==ITT_PLATFORM_WIN +# define STDCALL __stdcall +# else /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +# define STDCALL /* nothing */ +# endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ +#endif /* STDCALL */ + +#define ITTAPI_CALL CDECL +#define LIBITTAPI_CALL /* nothing */ + +#define ITT_JOIN_AUX(p,n) p##n +#define ITT_JOIN(p,n) ITT_JOIN_AUX(p,n) + +#ifndef INTEL_ITTNOTIFY_PREFIX +# define INTEL_ITTNOTIFY_PREFIX __itt_ +#endif /* INTEL_ITTNOTIFY_PREFIX */ +#ifndef INTEL_ITTNOTIFY_POSTFIX +# define INTEL_ITTNOTIFY_POSTFIX _ptr_ +#endif /* INTEL_ITTNOTIFY_POSTFIX */ + +#define ITTNOTIFY_NAME_AUX(n) ITT_JOIN(INTEL_ITTNOTIFY_PREFIX,n) +#define ITTNOTIFY_NAME(n) ITTNOTIFY_NAME_AUX(ITT_JOIN(n,INTEL_ITTNOTIFY_POSTFIX)) + +#define ITTNOTIFY_VOID(n) (!ITTNOTIFY_NAME(n)) ? (void)0 : ITTNOTIFY_NAME(n) +#define ITTNOTIFY_DATA(n) (!ITTNOTIFY_NAME(n)) ? 0 : ITTNOTIFY_NAME(n) + +#ifdef ITT_STUB +#undef ITT_STUB +#endif +#ifdef ITT_STUBV +#undef ITT_STUBV +#endif +#define ITT_STUBV(api,type,name,args,params) \ + typedef type (api* ITT_JOIN(ITTNOTIFY_NAME(name),_t)) args; \ + extern ITT_JOIN(ITTNOTIFY_NAME(name),_t) ITTNOTIFY_NAME(name); +#define ITT_STUB ITT_STUBV + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ +/** @endcond */ + +/** + * @defgroup prototype Prototype API + * @{ + * @} + */ + +/**************************************************************************** + * ??? group + ****************************************************************************/ + +/** @cond exclude_from_documentation */ +#ifdef __cplusplus +} +#endif /* __cplusplus */ +/** @endcond */ + +#endif /* _PROTOTYPE_ITTNOTIFY_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.def new file mode 100644 index 0000000000..acf3e74939 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.def @@ -0,0 +1,36 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +#define __TBB_SYMBOL( sym ) sym +#if _M_ARM +#include "winrt-tbb-export.lst" +#else +#include "win32-tbb-export.lst" +#endif + + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.lst new file mode 100644 index 0000000000..0e865c842b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win32-tbb-export.lst @@ -0,0 +1,318 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +#include "tbb/tbb_config.h" + +// Assembly-language support that is called directly by clients +// __TBB_SYMBOL( __TBB_machine_cmpswp1 ) +// __TBB_SYMBOL( __TBB_machine_cmpswp2 ) +// __TBB_SYMBOL( __TBB_machine_cmpswp4 ) +__TBB_SYMBOL( __TBB_machine_cmpswp8 ) +// __TBB_SYMBOL( __TBB_machine_fetchadd1 ) +// __TBB_SYMBOL( __TBB_machine_fetchadd2 ) +// __TBB_SYMBOL( __TBB_machine_fetchadd4 ) +__TBB_SYMBOL( __TBB_machine_fetchadd8 ) +// __TBB_SYMBOL( __TBB_machine_fetchstore1 ) +// __TBB_SYMBOL( __TBB_machine_fetchstore2 ) +// __TBB_SYMBOL( __TBB_machine_fetchstore4 ) +__TBB_SYMBOL( __TBB_machine_fetchstore8 ) +__TBB_SYMBOL( __TBB_machine_store8 ) +__TBB_SYMBOL( __TBB_machine_load8 ) +__TBB_SYMBOL( __TBB_machine_trylockbyte ) + +// cache_aligned_allocator.cpp +__TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z ) +__TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YAIXZ ) +__TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z ) +__TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) + +// task.cpp v3 +__TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAAVtask@4@@Z ) +__TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AAEXH@Z ) +__TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AAEHXZ ) +__TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QBE_NXZ ) +__TBB_SYMBOL( ?note_affinity@task@tbb@@UAEXG@Z ) +__TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AAEXI@Z ) +__TBB_SYMBOL( ?self@task@tbb@@SAAAV12@XZ ) +__TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QAEXAAVtask_list@2@@Z ) +__TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAEXHI@Z ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAEXH@Z ) +__TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QAEXXZ ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QAEX_N@Z ) +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( ?internal_initialize@task_arena@interface6@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_enqueue@task_arena@interface6@tbb@@ABEXAAVtask@3@H@Z ) +__TBB_SYMBOL( ?internal_execute@task_arena@interface6@tbb@@ABEXAAVdelegate_base@internal@23@@Z ) +__TBB_SYMBOL( ?internal_terminate@task_arena@interface6@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?current_slot@task_arena@interface6@tbb@@SAHXZ ) +__TBB_SYMBOL( ?internal_wait@task_arena@interface6@tbb@@ABEXXZ ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +// task_v2.cpp +__TBB_SYMBOL( ?destroy@task@tbb@@QAEXAAV12@@Z ) +#endif + +// exception handling support +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QBEAAVtask@3@I@Z ) +__TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QBEXAAVtask@3@@Z ) +__TBB_SYMBOL( ?change_group@task@tbb@@QAEXAAVtask_group_context@2@@Z ) +__TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QBE_NXZ ) +__TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QAE_NXZ ) +__TBB_SYMBOL( ?reset@task_group_context@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?init@task_group_context@tbb@@IAEXXZ ) +__TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QAEXXZ ) +__TBB_SYMBOL( ??1task_group_context@tbb@@QAE@XZ ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QAEXW4priority_t@2@@Z ) +__TBB_SYMBOL( ?priority@task_group_context@tbb@@QBE?AW4priority_t@2@XZ ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( ?name@captured_exception@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ?what@captured_exception@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ??1captured_exception@tbb@@UAE@XZ ) +__TBB_SYMBOL( ?move@captured_exception@tbb@@UAEPAV12@XZ ) +__TBB_SYMBOL( ?destroy@captured_exception@tbb@@UAEXXZ ) +__TBB_SYMBOL( ?set@captured_exception@tbb@@QAEXPBD0@Z ) +__TBB_SYMBOL( ?clear@captured_exception@tbb@@QAEXXZ ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// Symbols for exceptions thrown from TBB +__TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) +__TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) +__TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ?what@missing_wait@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ?what@improper_lock@tbb@@UBEPBDXZ ) +__TBB_SYMBOL( ?what@user_abort@tbb@@UBEPBDXZ ) + +// tbb_misc.cpp +__TBB_SYMBOL( ?assertion_failure@tbb@@YAXPBDH00@Z ) +__TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ ) +__TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPBD@Z ) +__TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z ) +__TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPBDZZ ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +// tbb_main.cpp +__TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z ) +__TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z ) +__TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPAX@Z ) +__TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPAXPB_W@Z ) +__TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPAXPBX@Z ) + +// pipeline.cpp +__TBB_SYMBOL( ??0pipeline@tbb@@QAE@XZ ) +__TBB_SYMBOL( ??1filter@tbb@@UAE@XZ ) +__TBB_SYMBOL( ??1pipeline@tbb@@UAE@XZ ) +__TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) +__TBB_SYMBOL( ?add_filter@pipeline@tbb@@QAEXAAVfilter@2@@Z ) +__TBB_SYMBOL( ?clear@pipeline@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?inject_token@pipeline@tbb@@AAEXAAVtask@2@@Z ) +__TBB_SYMBOL( ?run@pipeline@tbb@@QAEXI@Z ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?run@pipeline@tbb@@QAEXIAAVtask_group_context@2@@Z ) +#endif +__TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QAE?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QAE?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IAEXXZ ) + +// queuing_rw_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAEXAAV23@_N@Z ) +__TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAE_NXZ ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAE_NXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAE_NAAV23@_N@Z ) + +// reader_writer_lock.cpp +__TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QAE_NXZ ) +__TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QAE_NXZ ) +__TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AAEXAAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAEXAAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAEXXZ ) + +#if !TBB_NO_LEGACY +// spin_rw_mutex.cpp v2 +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +#endif + +// spin_rw_mutex v3 +__TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AAE_NXZ ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAE_NXZ ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAE_NXZ ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAE_NXZ ) + +// spin_mutex.cpp +__TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AAEXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAE_NAAV23@@Z ) + +// mutex.cpp +__TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AAEXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AAE_NAAV23@@Z ) +__TBB_SYMBOL( ?internal_construct@mutex@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AAEXXZ ) + +// recursive_mutex.cpp +__TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAEXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAE_NAAV23@@Z ) +__TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AAEXXZ ) +__TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AAEXXZ ) + +// queuing_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QAEXAAV23@@Z ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QAE_NAAV23@@Z ) + +// critical_section.cpp +__TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QAEXXZ ) + +#if !TBB_NO_LEGACY +// concurrent_hash_map.cpp +__TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBE_NXZ ) + +// concurrent_queue.cpp v2 +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IAEXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IAEXABV123@@Z ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IBEHXZ ) +__TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IAE@I@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IAE@ABVconcurrent_queue_base@12@@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MAE@XZ ) +__TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IAE@XZ ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IAEXPAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAE_NPAX@Z ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IAEXPBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAE_NPBX@Z ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAEXHI@Z ) +#endif + +// concurrent_queue v3 +__TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IAE@XZ ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAE@ABVconcurrent_queue_base_v3@12@@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAE@ABVconcurrent_queue_base_v3@12@I@Z ) +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAEXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAEXABV123@@Z ) +__TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IAE@I@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MAE@XZ ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAEXPAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAE_NPAX@Z ) +__TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IAEXXZ ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IAEXPBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAE_NPBX@Z ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IBEHXZ ) +__TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IBE_NXZ ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAEXHI@Z ) +__TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAEXXZ ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBEXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IAEXABV123@@Z ) + +#if !TBB_NO_LEGACY +// concurrent_vector.cpp v2 +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IBEIXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IAEXP6AXPAXI@Z_N@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IAEXABV123@IP6AXPAXPBXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IAEIIIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAEXIIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IAEPAXIAAI@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IAEXIII@Z ) +#endif + +// concurrent_vector v3 +__TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IAE@XZ ) +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBEIXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAEIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAEXABV123@IP6AXPAXPBXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAEIIIP6AXPAXPBXI@Z1@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAEXIIP6AXPAXPBXI@Z1@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAEPAXIAAI@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAEXIII@Z ) +__TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAEPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z ) +__TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAEXAAV123@@Z ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBEXI@Z ) +__TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IAEXIIIPBXP6AXPAXI@ZP6AX10I@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IAEIIIP6AXPAXPBXI@Z1@Z ) + +// tbb_thread +__TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QAEXXZ ) +__TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AAEXP6GIPAX@Z0@Z ) +__TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPAXI@Z ) +__TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) +__TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) +__TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z ) +__TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z ) +__TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) + +// condition_variable +__TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAATcondvar_impl_t@123@PAVmutex@3@PBVinterval_t@tick_count@3@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.def new file mode 100644 index 0000000000..8d4652156b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.def @@ -0,0 +1,53 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + + +{ +global: + +#define __TBB_SYMBOL( sym ) sym; +#include "win64-gcc-tbb-export.lst" + +local: + +/* TBB symbols */ +*3tbb*; +*__TBB*; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_msg_buf; +get_text_buf; +message_catalog; +print_buf; +irc__get_msg; +irc__print; + +}; + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.lst new file mode 100644 index 0000000000..58892bf0d3 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-gcc-tbb-export.lst @@ -0,0 +1,369 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +/* cache_aligned_allocator.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal12NFS_AllocateEyyPv ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal15NFS_GetLineSizeEv ) +__TBB_SYMBOL( _ZN3tbb8internal8NFS_FreeEPv ) +__TBB_SYMBOL( _ZN3tbb8internal23allocate_via_handler_v3Ey ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25deallocate_via_handler_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal17is_malloc_used_v3Ev ) + +/* task.cpp v3 */ +__TBB_SYMBOL( _ZN3tbb4task13note_affinityEt ) +__TBB_SYMBOL( _ZN3tbb4task22internal_set_ref_countEi ) +__TBB_SYMBOL( _ZN3tbb4task28internal_decrement_ref_countEv ) +__TBB_SYMBOL( _ZN3tbb4task22spawn_and_wait_for_allERNS_9task_listE ) +__TBB_SYMBOL( _ZN3tbb4task4selfEv ) +__TBB_SYMBOL( _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb4task26is_owned_by_current_threadEv ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8internal19allocate_root_proxy8allocateEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal28affinity_partitioner_base_v36resizeEj ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal20allocate_child_proxy8allocateEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal27allocate_continuation_proxy8allocateEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZNK3tbb8internal34allocate_additional_child_of_proxy8allocateEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZTIN3tbb4taskE ) +__TBB_SYMBOL( _ZTSN3tbb4taskE ) +__TBB_SYMBOL( _ZTVN3tbb4taskE ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init19default_num_threadsEv ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEiy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init10initializeEi ) +__TBB_SYMBOL( _ZN3tbb19task_scheduler_init9terminateEv ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( _ZN3tbb8internal26task_scheduler_observer_v37observeEb ) +#endif /* __TBB_SCHEDULER_OBSERVER */ +__TBB_SYMBOL( _ZN3tbb10empty_task7executeEv ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD0Ev ) +__TBB_SYMBOL( _ZN3tbb10empty_taskD1Ev ) +__TBB_SYMBOL( _ZTIN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTSN3tbb10empty_taskE ) +__TBB_SYMBOL( _ZTVN3tbb10empty_taskE ) + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface610task_arena18internal_terminateEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_enqueueERNS_4taskEl ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena16internal_executeERNS0_8internal13delegate_baseE ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena19internal_initializeEv ) +__TBB_SYMBOL( _ZN3tbb10interface610task_arena12current_slotEv ) +__TBB_SYMBOL( _ZNK3tbb10interface610task_arena13internal_waitEv ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +/* task_v2.cpp */ +__TBB_SYMBOL( _ZN3tbb4task7destroyERS0_ ) +#endif /* !TBB_NO_LEGACY */ + +/* Exception handling in task scheduler */ +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy8allocateEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal32allocate_root_with_context_proxy4freeERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb4task12change_groupERNS_18task_group_contextE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context28is_group_execution_cancelledEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context22cancel_group_executionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context26register_pending_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context5resetEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_context4initEv ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD1Ev ) +__TBB_SYMBOL( _ZN3tbb18task_group_contextD2Ev ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( _ZN3tbb18task_group_context12set_priorityENS_10priority_tE ) +__TBB_SYMBOL( _ZNK3tbb18task_group_context8priorityEv ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( _ZNK3tbb18captured_exception4nameEv ) +__TBB_SYMBOL( _ZNK3tbb18captured_exception4whatEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception10throw_selfEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception3setEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exception4moveEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception5clearEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception7destroyEv ) +__TBB_SYMBOL( _ZN3tbb18captured_exception8allocateEPKcS2_ ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD0Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD1Ev ) +__TBB_SYMBOL( _ZN3tbb18captured_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb18captured_exceptionE ) +__TBB_SYMBOL( _ZN3tbb13tbb_exceptionD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTSN3tbb13tbb_exceptionE ) +__TBB_SYMBOL( _ZTVN3tbb13tbb_exceptionE ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +/* Symbols for exceptions thrown from TBB */ +__TBB_SYMBOL( _ZN3tbb8internal33throw_bad_last_alloc_exception_v4Ev ) +__TBB_SYMBOL( _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD0Ev ) +__TBB_SYMBOL( _ZN3tbb14bad_last_allocD1Ev ) +__TBB_SYMBOL( _ZNK3tbb14bad_last_alloc4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTSN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZTVN3tbb14bad_last_allocE ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD0Ev ) +__TBB_SYMBOL( _ZN3tbb12missing_waitD1Ev ) +__TBB_SYMBOL( _ZNK3tbb12missing_wait4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTSN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZTVN3tbb12missing_waitE ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD0Ev ) +__TBB_SYMBOL( _ZN3tbb27invalid_multiple_schedulingD1Ev ) +__TBB_SYMBOL( _ZNK3tbb27invalid_multiple_scheduling4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTSN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZTVN3tbb27invalid_multiple_schedulingE ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD0Ev ) +__TBB_SYMBOL( _ZN3tbb13improper_lockD1Ev ) +__TBB_SYMBOL( _ZNK3tbb13improper_lock4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTSN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZTVN3tbb13improper_lockE ) +__TBB_SYMBOL( _ZN3tbb10user_abortD0Ev ) +__TBB_SYMBOL( _ZN3tbb10user_abortD1Ev ) +__TBB_SYMBOL( _ZNK3tbb10user_abort4whatEv ) +__TBB_SYMBOL( _ZTIN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTSN3tbb10user_abortE ) +__TBB_SYMBOL( _ZTVN3tbb10user_abortE ) + +/* tbb_misc.cpp */ +__TBB_SYMBOL( _ZN3tbb17assertion_failureEPKciS1_S1_ ) +__TBB_SYMBOL( _ZN3tbb21set_assertion_handlerEPFvPKciS1_S1_E ) +__TBB_SYMBOL( _ZN3tbb8internal36get_initial_auto_partitioner_divisorEv ) +__TBB_SYMBOL( _ZN3tbb8internal13handle_perrorEiPKc ) +__TBB_SYMBOL( _ZN3tbb8internal15runtime_warningEPKcz ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +/* tbb_main.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal32itt_load_pointer_with_acquire_v3EPKv ) +__TBB_SYMBOL( _ZN3tbb8internal33itt_store_pointer_with_release_v3EPvS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal18call_itt_notify_v5EiPv ) +__TBB_SYMBOL( _ZN3tbb8internal20itt_set_sync_name_v3EPvPKc ) +__TBB_SYMBOL( _ZN3tbb8internal19itt_load_pointer_v3EPKv ) + +/* pipeline.cpp */ +__TBB_SYMBOL( _ZTIN3tbb6filterE ) +__TBB_SYMBOL( _ZTSN3tbb6filterE ) +__TBB_SYMBOL( _ZTVN3tbb6filterE ) +__TBB_SYMBOL( _ZN3tbb6filterD2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipeline10add_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline12inject_tokenERNS_4taskE ) +__TBB_SYMBOL( _ZN3tbb8pipeline13remove_filterERNS_6filterE ) +__TBB_SYMBOL( _ZN3tbb8pipeline3runEy ) // MODIFIED LINUX ENTRY +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( _ZN3tbb8pipeline3runEyRNS_18task_group_contextE ) // MODIFIED LINUX ENTRY +#endif +__TBB_SYMBOL( _ZN3tbb8pipeline5clearEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter12process_itemEv ) +__TBB_SYMBOL( _ZN3tbb19thread_bound_filter16try_process_itemEv ) +__TBB_SYMBOL( _ZTIN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTSN3tbb8pipelineE ) +__TBB_SYMBOL( _ZTVN3tbb8pipelineE ) +__TBB_SYMBOL( _ZN3tbb8pipelineC1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineC2Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD0Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD1Ev ) +__TBB_SYMBOL( _ZN3tbb8pipelineD2Ev ) +__TBB_SYMBOL( _ZN3tbb6filter16set_end_of_inputEv ) + +/* queuing_rw_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock17upgrade_to_writerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock19downgrade_to_readerEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7acquireERS0_b ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb16queuing_rw_mutex11scoped_lock11try_acquireERS0_b ) + +/* reader_writer_lock.cpp */ +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock11scoped_lock18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock13try_lock_readEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16scoped_lock_read18internal_constructERS1_ ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock4lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock6unlockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock8try_lockEv ) +__TBB_SYMBOL( _ZN3tbb10interface518reader_writer_lock9lock_readEv ) + +#if !TBB_NO_LEGACY +/* spin_rw_mutex.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex16internal_upgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex22internal_itt_releasingEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_acquire_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex18internal_downgradeEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex23internal_release_writerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_readerEPS0_ ) +__TBB_SYMBOL( _ZN3tbb13spin_rw_mutex27internal_try_acquire_writerEPS0_ ) +#endif + +/* spin_rw_mutex v3 */ +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v316internal_upgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v318internal_downgradeEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_acquire_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v323internal_release_writerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_readerEv ) +__TBB_SYMBOL( _ZN3tbb16spin_rw_mutex_v327internal_try_acquire_writerEv ) + +/* spin_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb10spin_mutex18internal_constructEv ) + +/* mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb5mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb5mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb5mutex18internal_constructEv ) + +/* recursive_mutex.cpp */ +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock16internal_releaseEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex11scoped_lock20internal_try_acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex16internal_destroyEv ) +__TBB_SYMBOL( _ZN3tbb15recursive_mutex18internal_constructEv ) + +/* QueuingMutex.cpp */ +__TBB_SYMBOL( _ZN3tbb13queuing_mutex18internal_constructEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7acquireERS0_ ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock7releaseEv ) +__TBB_SYMBOL( _ZN3tbb13queuing_mutex11scoped_lock11try_acquireERS0_ ) + +/* critical_section.cpp */ +__TBB_SYMBOL( _ZN3tbb8internal19critical_section_v418internal_constructEv ) + +#if !TBB_NO_LEGACY +/* concurrent_hash_map */ +__TBB_SYMBOL( _ZNK3tbb8internal21hash_map_segment_base23internal_grow_predicateEv ) + +/* concurrent_queue.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base12internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base13internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base21internal_set_capacityExy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base23internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_base25internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseC2Ey ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal21concurrent_queue_baseD2Ev ) +__TBB_SYMBOL( _ZTIN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTSN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZTVN3tbb8internal21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base6assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_base7advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseC2ERKNS0_21concurrent_queue_baseE ) +__TBB_SYMBOL( _ZN3tbb8internal30concurrent_queue_iterator_baseD2Ev ) +__TBB_SYMBOL( _ZNK3tbb8internal21concurrent_queue_base13internal_sizeEv ) +#endif + +/* concurrent_queue v3 */ +/* constructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3C2Ey ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3C2ERKNS0_24concurrent_queue_base_v3Ey ) // MODIFIED LINUX ENTRY +/* destructors */ +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v3D2Ev ) +/* typeinfo */ +__TBB_SYMBOL( _ZTIN3tbb8internal24concurrent_queue_base_v3E ) +__TBB_SYMBOL( _ZTSN3tbb8internal24concurrent_queue_base_v3E ) +/* vtable */ +__TBB_SYMBOL( _ZTVN3tbb8internal24concurrent_queue_base_v3E ) +/* methods */ +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v36assignERKS1_ ) +__TBB_SYMBOL( _ZN3tbb8internal33concurrent_queue_iterator_base_v37advanceEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v313internal_pushEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v325internal_push_if_not_fullEPKv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v312internal_popEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v323internal_pop_if_presentEPv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v314internal_abortEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_finish_clearEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v321internal_set_capacityExy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v313internal_sizeEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v314internal_emptyEv ) +__TBB_SYMBOL( _ZNK3tbb8internal24concurrent_queue_base_v324internal_throw_exceptionEv ) +__TBB_SYMBOL( _ZN3tbb8internal24concurrent_queue_base_v36assignERKS1_ ) + +#if !TBB_NO_LEGACY +/* concurrent_vector.cpp v2 */ +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base13internal_copyERKS1_yPFvPvPKvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base14internal_clearEPFvPvyEb ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base15internal_assignERKS1_yPFvPvyEPFvS4_PKvyESA_ ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_grow_byEyyPFvPvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base16internal_reserveEyyy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base18internal_push_backEyRy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal22concurrent_vector_base25internal_grow_to_at_leastEyyPFvPvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal22concurrent_vector_base17internal_capacityEv ) +#endif + +/* concurrent_vector v3 */ +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_copyERKS1_yPFvPvPKvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v314internal_clearEPFvPvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_assignERKS1_yPFvPvyEPFvS4_PKvyESA_ ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_grow_byEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_reserveEyyy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v318internal_push_backEyRy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v325internal_grow_to_at_leastEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v317internal_capacityEv ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v316internal_compactEyPvPFvS2_yEPFvS2_PKvyE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v313internal_swapERS1_ ) +__TBB_SYMBOL( _ZNK3tbb8internal25concurrent_vector_base_v324internal_throw_exceptionEy ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v3D2Ev ) +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v315internal_resizeEyyyPKvPFvPvyEPFvS4_S3_yE ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal25concurrent_vector_base_v337internal_grow_to_at_least_with_resultEyyPFvPvPKvyES4_ ) // MODIFIED LINUX ENTRY + +/* tbb_thread */ +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v320hardware_concurrencyEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v36detachEv ) +__TBB_SYMBOL( _ZN3tbb8internal16thread_get_id_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15free_closure_v3EPv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v34joinEv ) +__TBB_SYMBOL( _ZN3tbb8internal13tbb_thread_v314internal_startEPFjPvES2_ ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal19allocate_closure_v3Ey ) // MODIFIED LINUX ENTRY +__TBB_SYMBOL( _ZN3tbb8internal7move_v3ERNS0_13tbb_thread_v3ES2_ ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_yield_v3Ev ) +__TBB_SYMBOL( _ZN3tbb8internal15thread_sleep_v3ERKNS_10tick_count10interval_tE ) + +/* condition_variable */ +__TBB_SYMBOL( _ZN3tbb10interface58internal32internal_condition_variable_waitERNS1_14condvar_impl_tEPNS_5mutexEPKNS_10tick_count10interval_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal35internal_destroy_condition_variableERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_allERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_condition_variable_notify_oneERNS1_14condvar_impl_tE ) +__TBB_SYMBOL( _ZN3tbb10interface58internal38internal_initialize_condition_variableERNS1_14condvar_impl_tE ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.def new file mode 100644 index 0000000000..5e5888d5a2 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.def @@ -0,0 +1,34 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +; This file is organized with a section for each .cpp file. +; Each of these sections is in alphabetical order. + +EXPORTS + +#define __TBB_SYMBOL( sym ) sym +#include "win64-tbb-export.lst" + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.lst new file mode 100644 index 0000000000..bddf731892 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/win64-tbb-export.lst @@ -0,0 +1,314 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +// This file is organized with a section for each .cpp file. +// Each of these sections is in alphabetical order. + +#include "tbb/tbb_config.h" + +// Assembly-language support that is called directly by clients +__TBB_SYMBOL( __TBB_machine_cmpswp1 ) +__TBB_SYMBOL( __TBB_machine_fetchadd1 ) +__TBB_SYMBOL( __TBB_machine_fetchstore1 ) +__TBB_SYMBOL( __TBB_machine_cmpswp2 ) +__TBB_SYMBOL( __TBB_machine_fetchadd2 ) +__TBB_SYMBOL( __TBB_machine_fetchstore2 ) +__TBB_SYMBOL( __TBB_machine_pause ) + +// cache_aligned_allocator.cpp +__TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPEAX_K0PEAX@Z ) +__TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YA_KXZ ) +__TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPEAX@Z ) +__TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPEAX_K@Z ) +__TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPEAX@Z ) +__TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) + + +// task.cpp v3 +__TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AEAAXI@Z ) +__TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) +__TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) +__TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) +__TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAEAVtask@3@_K@Z ) +__TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAEAVtask@4@@Z ) +__TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAEAVtask@3@@Z ) +__TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AEAAXH@Z ) +__TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AEAA_JXZ ) +__TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QEBA_NXZ ) +__TBB_SYMBOL( ?note_affinity@task@tbb@@UEAAXG@Z ) +__TBB_SYMBOL( ?self@task@tbb@@SAAEAV12@XZ ) +__TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QEAAXAEAVtask_list@2@@Z ) +__TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH_K@Z ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QEAAXH@Z ) +__TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QEAAXXZ ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QEAAX_N@Z ) +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( ?internal_enqueue@task_arena@interface6@tbb@@AEBAXAEAVtask@3@_J@Z ) +__TBB_SYMBOL( ?internal_execute@task_arena@interface6@tbb@@AEBAXAEAVdelegate_base@internal@23@@Z ) +__TBB_SYMBOL( ?internal_initialize@task_arena@interface6@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_terminate@task_arena@interface6@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_wait@task_arena@interface6@tbb@@AEBAXXZ ) +__TBB_SYMBOL( ?current_slot@task_arena@interface6@tbb@@SAHXZ ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +// task_v2.cpp +__TBB_SYMBOL( ?destroy@task@tbb@@QEAAXAEAV12@@Z ) +#endif + +// Exception handling in task scheduler +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QEBAAEAVtask@3@_K@Z ) +__TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QEBAXAEAVtask@3@@Z ) +__TBB_SYMBOL( ?change_group@task@tbb@@QEAAXAEAVtask_group_context@2@@Z ) +__TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QEBA_NXZ ) +__TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QEAA_NXZ ) +__TBB_SYMBOL( ?reset@task_group_context@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?init@task_group_context@tbb@@IEAAXXZ ) +__TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ??1task_group_context@tbb@@QEAA@XZ ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QEAAXW4priority_t@2@@Z ) +__TBB_SYMBOL( ?priority@task_group_context@tbb@@QEBA?AW4priority_t@2@XZ ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( ?name@captured_exception@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ?what@captured_exception@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ??1captured_exception@tbb@@UEAA@XZ ) +__TBB_SYMBOL( ?move@captured_exception@tbb@@UEAAPEAV12@XZ ) +__TBB_SYMBOL( ?destroy@captured_exception@tbb@@UEAAXXZ ) +__TBB_SYMBOL( ?set@captured_exception@tbb@@QEAAXPEBD0@Z ) +__TBB_SYMBOL( ?clear@captured_exception@tbb@@QEAAXXZ ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// Symbols for exceptions thrown from TBB +__TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) +__TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) +__TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ?what@missing_wait@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ?what@improper_lock@tbb@@UEBAPEBDXZ ) +__TBB_SYMBOL( ?what@user_abort@tbb@@UEBAPEBDXZ ) + +// tbb_misc.cpp +__TBB_SYMBOL( ?assertion_failure@tbb@@YAXPEBDH00@Z ) +__TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YA_KXZ ) +__TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPEBD@Z ) +__TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPEBDH00@ZP6AX0H00@Z@Z ) +__TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPEBDZZ ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +// tbb_main.cpp +__TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPEAXPEBX@Z ) +__TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPEAX0@Z ) +__TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPEAX@Z ) +__TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPEAXPEBX@Z ) +__TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPEAXPEB_W@Z ) + +// pipeline.cpp +__TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) +__TBB_SYMBOL( ??0pipeline@tbb@@QEAA@XZ ) +__TBB_SYMBOL( ??1filter@tbb@@UEAA@XZ ) +__TBB_SYMBOL( ??1pipeline@tbb@@UEAA@XZ ) +__TBB_SYMBOL( ?add_filter@pipeline@tbb@@QEAAXAEAVfilter@2@@Z ) +__TBB_SYMBOL( ?clear@pipeline@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?inject_token@pipeline@tbb@@AEAAXAEAVtask@2@@Z ) +__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_K@Z ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?run@pipeline@tbb@@QEAAX_KAEAVtask_group_context@2@@Z ) +#endif +__TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QEAA?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IEAAXXZ ) + +// queuing_rw_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAAXAEAV23@_N@Z ) +__TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QEAA_NAEAV23@_N@Z ) + +// reader_writer_lock.cpp +__TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QEAA_NXZ ) +__TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QEAA_NXZ ) +__TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXAEAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AEAAXXZ ) + +#if !TBB_NO_LEGACY +// spin_rw_mutex.cpp v2 +__TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPEAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPEAV12@@Z ) +#endif + +// spin_rw_mutex v3 +__TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AEAA_NXZ ) + +// spin_mutex.cpp +__TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AEAAXAEAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AEAA_NAEAV23@@Z ) + +// mutex.cpp +__TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AEAAXAEAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AEAA_NAEAV23@@Z ) +__TBB_SYMBOL( ?internal_construct@mutex@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AEAAXXZ ) + +// recursive_mutex.cpp +__TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AEAAXXZ ) +__TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AEAAXAEAV23@@Z ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AEAA_NAEAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AEAAXXZ ) + +// queuing_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QEAAXAEAV23@@Z ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QEAA_NAEAV23@@Z ) + +//critical_section.cpp +__TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QEAAXXZ ) + +#if !TBB_NO_LEGACY +// concurrent_hash_map.cpp +__TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QEBA_NXZ ) + +// concurrent_queue.cpp v2 +__TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IEAA@_K@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IEAA@AEBVconcurrent_queue_base@12@@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MEAA@XZ ) +__TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IEAA@XZ ) +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IEAAXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IEAAXAEBV123@@Z ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IEAAXPEAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IEAA_NPEAX@Z ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IEAAXPEBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IEAA_NPEBX@Z ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IEAAX_J_K@Z ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IEBA_JXZ ) +#endif + +// concurrent_queue v3 +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@AEBVconcurrent_queue_base_v3@12@_K@Z ) +__TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IEAA@XZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXAEBV123@@Z ) +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IEAAXXZ ) +__TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IEAA@_K@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MEAA@XZ ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IEAAXPEBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEBX@Z ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IEAAXPEAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IEAA_NPEAX@Z ) +__TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IEBA_JXZ ) +__TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IEBA_NXZ ) +__TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IEAAXXZ ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IEAAX_J_K@Z ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IEBAXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IEAAXAEBV123@@Z ) + +#if !TBB_NO_LEGACY +// concurrent_vector.cpp v2 +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IEBA_KXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IEAAXP6AXPEAX_K@Z_N@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IEAA_K_K0P6AXPEAX0@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IEAAX_K0P6AXPEAX0@Z@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IEAAPEAX_KAEA_K@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IEAAX_K00@Z ) +#endif + +// concurrent_vector v3 +__TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IEAA@XZ ) +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IEBA_KXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IEAA_KP6AXPEAX_K@Z@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IEAAXAEBV123@_KP6AXPEAXPEBX1@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IEAAX_K0P6AXPEAXPEBX0@Z2@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KAEA_K@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00@Z ) +__TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IEAAPEAX_KPEAXP6AX10@ZP6AX1PEBX0@Z@Z ) +__TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IEAAXAEAV123@@Z ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IEBAX_K@Z ) +__TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IEAAX_K00PEBXP6AXPEAX0@ZP6AX210@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IEAA_K_K0P6AXPEAXPEBX0@Z2@Z ) + +// tbb_thread +__TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPEAX_K@Z ) +__TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPEAX@Z ) +__TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) +__TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AEAAXP6AIPEAX@Z0@Z ) +__TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QEAAXXZ ) +__TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAEAVtbb_thread_v3@12@0@Z ) +__TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) +__TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXAEBVinterval_t@tick_count@2@@Z ) +__TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) + +// condition_variable +__TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAEATcondvar_impl_t@123@PEAVmutex@3@PEBVinterval_t@tick_count@3@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAEATcondvar_impl_t@123@@Z ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/winrt-tbb-export.lst b/deal.II/bundled/tbb41_20130401oss/src/tbb/winrt-tbb-export.lst new file mode 100644 index 0000000000..85a68d5042 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/winrt-tbb-export.lst @@ -0,0 +1,301 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +#include "tbb/tbb_config.h" + +// cache_aligned_allocator.cpp +__TBB_SYMBOL( ?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z ) +__TBB_SYMBOL( ?NFS_GetLineSize@internal@tbb@@YAIXZ ) +__TBB_SYMBOL( ?NFS_Free@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z ) +__TBB_SYMBOL( ?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?is_malloc_used_v3@internal@tbb@@YA_NXZ ) + +// task.cpp v3 +__TBB_SYMBOL( ?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_child_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_continuation_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?destroy@task_base@internal@interface5@tbb@@SAXAAVtask@4@@Z ) +__TBB_SYMBOL( ?free@allocate_additional_child_of_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_child_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_continuation_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?internal_set_ref_count@task@tbb@@AAAXH@Z ) +__TBB_SYMBOL( ?internal_decrement_ref_count@task@tbb@@AAAHXZ ) +__TBB_SYMBOL( ?is_owned_by_current_thread@task@tbb@@QBA_NXZ ) +__TBB_SYMBOL( ?note_affinity@task@tbb@@UAAXG@Z ) +__TBB_SYMBOL( ?resize@affinity_partitioner_base_v3@internal@tbb@@AAAXI@Z ) +__TBB_SYMBOL( ?self@task@tbb@@SAAAV12@XZ ) +__TBB_SYMBOL( ?spawn_and_wait_for_all@task@tbb@@QAAXAAVtask_list@2@@Z ) +__TBB_SYMBOL( ?default_num_threads@task_scheduler_init@tbb@@SAHXZ ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAAXHI@Z ) +__TBB_SYMBOL( ?initialize@task_scheduler_init@tbb@@QAAXH@Z ) +__TBB_SYMBOL( ?terminate@task_scheduler_init@tbb@@QAAXXZ ) +#if __TBB_SCHEDULER_OBSERVER +__TBB_SYMBOL( ?observe@task_scheduler_observer_v3@internal@tbb@@QAAX_N@Z ) +#endif /* __TBB_SCHEDULER_OBSERVER */ + +#if __TBB_TASK_ARENA +/* arena.cpp */ +__TBB_SYMBOL( ?internal_initialize@task_arena@interface6@tbb@@ABEPAVarena@internal@3@H@Z ) +__TBB_SYMBOL( ?internal_enqueue@task_arena@interface6@tbb@@ABEXAAVtask@3@H@Z ) +__TBB_SYMBOL( ?internal_execute@task_arena@interface6@tbb@@ABEXAAVdelegate_base@internal@23@@Z ) +__TBB_SYMBOL( ?internal_terminate@task_arena@interface6@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?current_slot@task_arena@interface6@tbb@@SAHXZ ) +__TBB_SYMBOL( ?internal_wait@task_arena@interface6@tbb@@ABEXXZ ) +#endif /* __TBB_TASK_ARENA */ + +#if !TBB_NO_LEGACY +// task_v2.cpp +__TBB_SYMBOL( ?destroy@task@tbb@@QAAXAAV12@@Z ) +#endif + +// exception handling support +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?allocate@allocate_root_with_context_proxy@internal@tbb@@QBAAAVtask@3@I@Z ) +__TBB_SYMBOL( ?free@allocate_root_with_context_proxy@internal@tbb@@QBAXAAVtask@3@@Z ) +__TBB_SYMBOL( ?change_group@task@tbb@@QAAXAAVtask_group_context@2@@Z ) +__TBB_SYMBOL( ?is_group_execution_cancelled@task_group_context@tbb@@QBA_NXZ ) +__TBB_SYMBOL( ?cancel_group_execution@task_group_context@tbb@@QAA_NXZ ) +__TBB_SYMBOL( ?reset@task_group_context@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?init@task_group_context@tbb@@IAAXXZ ) +__TBB_SYMBOL( ?register_pending_exception@task_group_context@tbb@@QAAXXZ ) +__TBB_SYMBOL( ??1task_group_context@tbb@@QAA@XZ ) +#if __TBB_TASK_PRIORITY +__TBB_SYMBOL( ?set_priority@task_group_context@tbb@@QAAXW4priority_t@2@@Z ) +__TBB_SYMBOL( ?priority@task_group_context@tbb@@QBA?AW4priority_t@2@XZ ) +#endif /* __TBB_TASK_PRIORITY */ +__TBB_SYMBOL( ?name@captured_exception@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ?what@captured_exception@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ??1captured_exception@tbb@@UAA@XZ ) +__TBB_SYMBOL( ?move@captured_exception@tbb@@UAAPAV12@XZ ) +__TBB_SYMBOL( ?destroy@captured_exception@tbb@@UAAXXZ ) +__TBB_SYMBOL( ?set@captured_exception@tbb@@QAAXPBD0@Z ) +__TBB_SYMBOL( ?clear@captured_exception@tbb@@QAAXXZ ) +#endif /* __TBB_TASK_GROUP_CONTEXT */ + +// Symbols for exceptions thrown from TBB +__TBB_SYMBOL( ?throw_bad_last_alloc_exception_v4@internal@tbb@@YAXXZ ) +__TBB_SYMBOL( ?throw_exception_v4@internal@tbb@@YAXW4exception_id@12@@Z ) +__TBB_SYMBOL( ?what@bad_last_alloc@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ?what@missing_wait@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ?what@invalid_multiple_scheduling@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ?what@improper_lock@tbb@@UBAPBDXZ ) +__TBB_SYMBOL( ?what@user_abort@tbb@@UBAPBDXZ ) + +// tbb_misc.cpp +__TBB_SYMBOL( ?assertion_failure@tbb@@YAXPBDH00@Z ) +__TBB_SYMBOL( ?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ ) +__TBB_SYMBOL( ?handle_perror@internal@tbb@@YAXHPBD@Z ) +__TBB_SYMBOL( ?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z ) +__TBB_SYMBOL( ?runtime_warning@internal@tbb@@YAXPBDZZ ) +__TBB_SYMBOL( TBB_runtime_interface_version ) + +// tbb_main.cpp +__TBB_SYMBOL( ?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z ) +__TBB_SYMBOL( ?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z ) +__TBB_SYMBOL( ?call_itt_notify_v5@internal@tbb@@YAXHPAX@Z ) +__TBB_SYMBOL( ?itt_set_sync_name_v3@internal@tbb@@YAXPAXPB_W@Z ) +__TBB_SYMBOL( ?itt_load_pointer_v3@internal@tbb@@YAPAXPBX@Z ) + +// pipeline.cpp +__TBB_SYMBOL( ??0pipeline@tbb@@QAA@XZ ) +__TBB_SYMBOL( ??1filter@tbb@@UAA@XZ ) +__TBB_SYMBOL( ??1pipeline@tbb@@UAA@XZ ) +__TBB_SYMBOL( ??_7pipeline@tbb@@6B@ ) +__TBB_SYMBOL( ?add_filter@pipeline@tbb@@QAAXAAVfilter@2@@Z ) +__TBB_SYMBOL( ?clear@pipeline@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?inject_token@pipeline@tbb@@AAAXAAVtask@2@@Z ) +__TBB_SYMBOL( ?run@pipeline@tbb@@QAAXI@Z ) +#if __TBB_TASK_GROUP_CONTEXT +__TBB_SYMBOL( ?run@pipeline@tbb@@QAAXIAAVtask_group_context@2@@Z ) +#endif +__TBB_SYMBOL( ?process_item@thread_bound_filter@tbb@@QAA?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?try_process_item@thread_bound_filter@tbb@@QAA?AW4result_type@12@XZ ) +__TBB_SYMBOL( ?set_end_of_input@filter@tbb@@IAAXXZ ) + +// queuing_rw_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_rw_mutex@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAAXAAV23@_N@Z ) +__TBB_SYMBOL( ?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_rw_mutex@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAA_NAAV23@_N@Z ) + +// reader_writer_lock.cpp +__TBB_SYMBOL( ?try_lock_read@reader_writer_lock@interface5@tbb@@QAA_NXZ ) +__TBB_SYMBOL( ?try_lock@reader_writer_lock@interface5@tbb@@QAA_NXZ ) +__TBB_SYMBOL( ?unlock@reader_writer_lock@interface5@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?lock_read@reader_writer_lock@interface5@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?lock@reader_writer_lock@interface5@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?internal_construct@reader_writer_lock@interface5@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@reader_writer_lock@interface5@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock@reader_writer_lock@interface5@tbb@@AAAXAAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock@reader_writer_lock@interface5@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_construct@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAAXAAV234@@Z ) +__TBB_SYMBOL( ?internal_destroy@scoped_lock_read@reader_writer_lock@interface5@tbb@@AAAXXZ ) + +#if !TBB_NO_LEGACY +// spin_rw_mutex.cpp v2 +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z ) +#endif + +// spin_rw_mutex v3 +__TBB_SYMBOL( ?internal_construct@spin_rw_mutex_v3@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_upgrade@spin_rw_mutex_v3@tbb@@AAA_NXZ ) +__TBB_SYMBOL( ?internal_downgrade@spin_rw_mutex_v3@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ ) +__TBB_SYMBOL( ?internal_release_reader@spin_rw_mutex_v3@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_release_writer@spin_rw_mutex_v3@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAA_NXZ ) +__TBB_SYMBOL( ?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ ) + +// spin_mutex.cpp +__TBB_SYMBOL( ?internal_construct@spin_mutex@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?internal_acquire@scoped_lock@spin_mutex@tbb@@AAAXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@spin_mutex@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAA_NAAV23@@Z ) + +// mutex.cpp +__TBB_SYMBOL( ?internal_acquire@scoped_lock@mutex@tbb@@AAAXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@mutex@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@mutex@tbb@@AAA_NAAV23@@Z ) +__TBB_SYMBOL( ?internal_construct@mutex@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@mutex@tbb@@AAAXXZ ) + +// recursive_mutex.cpp +__TBB_SYMBOL( ?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAAXAAV23@@Z ) +__TBB_SYMBOL( ?internal_release@scoped_lock@recursive_mutex@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAA_NAAV23@@Z ) +__TBB_SYMBOL( ?internal_construct@recursive_mutex@tbb@@AAAXXZ ) +__TBB_SYMBOL( ?internal_destroy@recursive_mutex@tbb@@AAAXXZ ) + +// queuing_mutex.cpp +__TBB_SYMBOL( ?internal_construct@queuing_mutex@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?acquire@scoped_lock@queuing_mutex@tbb@@QAAXAAV23@@Z ) +__TBB_SYMBOL( ?release@scoped_lock@queuing_mutex@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?try_acquire@scoped_lock@queuing_mutex@tbb@@QAA_NAAV23@@Z ) + +// critical_section.cpp +__TBB_SYMBOL( ?internal_construct@critical_section_v4@internal@tbb@@QAAXXZ ) + +#if !TBB_NO_LEGACY +// concurrent_hash_map.cpp +__TBB_SYMBOL( ?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBA_NXZ ) + +// concurrent_queue.cpp v2 +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base@internal@tbb@@IAAXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base@internal@tbb@@IAAXABV123@@Z ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base@internal@tbb@@IBAHXZ ) +__TBB_SYMBOL( ??0concurrent_queue_base@internal@tbb@@IAA@I@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base@internal@tbb@@IAA@ABVconcurrent_queue_base@12@@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base@internal@tbb@@MAA@XZ ) +__TBB_SYMBOL( ??1concurrent_queue_iterator_base@internal@tbb@@IAA@XZ ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base@internal@tbb@@IAAXPAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAA_NPAX@Z ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base@internal@tbb@@IAAXPBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAA_NPBX@Z ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAAXHI@Z ) +#endif + +// concurrent_queue v3 +__TBB_SYMBOL( ??1concurrent_queue_iterator_base_v3@internal@tbb@@IAA@XZ ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@@Z ) +__TBB_SYMBOL( ??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@I@Z ) +__TBB_SYMBOL( ?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXABV123@@Z ) +__TBB_SYMBOL( ??0concurrent_queue_base_v3@internal@tbb@@IAA@I@Z ) +__TBB_SYMBOL( ??1concurrent_queue_base_v3@internal@tbb@@MAA@XZ ) +__TBB_SYMBOL( ?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAAXPAX@Z ) +__TBB_SYMBOL( ?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAA_NPAX@Z ) +__TBB_SYMBOL( ?internal_abort@concurrent_queue_base_v3@internal@tbb@@IAAXXZ ) +__TBB_SYMBOL( ?internal_push@concurrent_queue_base_v3@internal@tbb@@IAAXPBX@Z ) +__TBB_SYMBOL( ?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAA_NPBX@Z ) +__TBB_SYMBOL( ?internal_size@concurrent_queue_base_v3@internal@tbb@@IBAHXZ ) +__TBB_SYMBOL( ?internal_empty@concurrent_queue_base_v3@internal@tbb@@IBA_NXZ ) +__TBB_SYMBOL( ?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAAXHI@Z ) +__TBB_SYMBOL( ?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAAXXZ ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBAXXZ ) +__TBB_SYMBOL( ?assign@concurrent_queue_base_v3@internal@tbb@@IAAXABV123@@Z ) + +#if !TBB_NO_LEGACY +// concurrent_vector.cpp v2 +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base@internal@tbb@@IBAIXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base@internal@tbb@@IAAXP6AXPAXI@Z_N@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base@internal@tbb@@IAAIIIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAAXIIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base@internal@tbb@@IAAPAXIAAI@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base@internal@tbb@@IAAXIII@Z ) +#endif + +// concurrent_vector v3 +__TBB_SYMBOL( ??1concurrent_vector_base_v3@internal@tbb@@IAA@XZ ) +__TBB_SYMBOL( ?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z ) +__TBB_SYMBOL( ?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBAIXZ ) +__TBB_SYMBOL( ?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAAIP6AXPAXI@Z@Z ) +__TBB_SYMBOL( ?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z ) +__TBB_SYMBOL( ?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAAXIIP6AXPAXPBXI@Z1@Z ) +__TBB_SYMBOL( ?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAAPAXIAAI@Z ) +__TBB_SYMBOL( ?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAAXIII@Z ) +__TBB_SYMBOL( ?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAAPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z ) +__TBB_SYMBOL( ?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAAXAAV123@@Z ) +__TBB_SYMBOL( ?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBAXI@Z ) +__TBB_SYMBOL( ?internal_resize@concurrent_vector_base_v3@internal@tbb@@IAAXIIIPBXP6AXPAXI@ZP6AX10I@Z@Z ) +__TBB_SYMBOL( ?internal_grow_to_at_least_with_result@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z ) + +// tbb_thread +__TBB_SYMBOL( ?join@tbb_thread_v3@internal@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?detach@tbb_thread_v3@internal@tbb@@QAAXXZ ) +__TBB_SYMBOL( ?internal_start@tbb_thread_v3@internal@tbb@@AAAXP6AIPAX@Z0@Z ) +__TBB_SYMBOL( ?allocate_closure_v3@internal@tbb@@YAPAXI@Z ) +__TBB_SYMBOL( ?free_closure_v3@internal@tbb@@YAXPAX@Z ) +__TBB_SYMBOL( ?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ ) +__TBB_SYMBOL( ?thread_yield_v3@internal@tbb@@YAXXZ ) +__TBB_SYMBOL( ?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z ) +__TBB_SYMBOL( ?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z ) +__TBB_SYMBOL( ?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ ) + +// condition_variable +__TBB_SYMBOL( ?internal_initialize_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_wait@internal@interface5@tbb@@YA_NAATcondvar_impl_t@123@PAVmutex@3@PBVinterval_t@tick_count@3@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_one@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_condition_variable_notify_all@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) +__TBB_SYMBOL( ?internal_destroy_condition_variable@internal@interface5@tbb@@YAXAATcondvar_impl_t@123@@Z ) + +#undef __TBB_SYMBOL diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbb/xbox360-tbb-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbb/xbox360-tbb-export.def new file mode 100644 index 0000000000..4b48827c49 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbb/xbox360-tbb-export.def @@ -0,0 +1,234 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +; Assembly-language support that is called directly by clients +;__TBB_machine_cmpswp1 +;__TBB_machine_cmpswp2 +;__TBB_machine_cmpswp4 +;__TBB_machine_cmpswp8 +;__TBB_machine_fetchadd1 +;__TBB_machine_fetchadd2 +;__TBB_machine_fetchadd4 +;__TBB_machine_fetchadd8 +;__TBB_machine_fetchstore1 +;__TBB_machine_fetchstore2 +;__TBB_machine_fetchstore4 +;__TBB_machine_fetchstore8 +;__TBB_machine_store8 +;__TBB_machine_load8 +;__TBB_machine_trylockbyte + +; cache_aligned_allocator.cpp +?NFS_Allocate@internal@tbb@@YAPAXIIPAX@Z @1 +?NFS_GetLineSize@internal@tbb@@YAIXZ @2 +?NFS_Free@internal@tbb@@YAXPAX@Z @3 +?allocate_via_handler_v3@internal@tbb@@YAPAXI@Z @4 +?deallocate_via_handler_v3@internal@tbb@@YAXPAX@Z @5 +?is_malloc_used_v3@internal@tbb@@YA_NXZ @6 + +; task.cpp v3 +?allocate@allocate_additional_child_of_proxy@internal@tbb@@QBAAAVtask@3@I@Z @7 +?allocate@allocate_child_proxy@internal@tbb@@QBAAAVtask@3@I@Z @8 +?allocate@allocate_continuation_proxy@internal@tbb@@QBAAAVtask@3@I@Z @9 +?allocate@allocate_root_proxy@internal@tbb@@SAAAVtask@3@I@Z @10 +?destroy@task@tbb@@QAAXAAV12@@Z @11 +?free@allocate_additional_child_of_proxy@internal@tbb@@QBAXAAVtask@3@@Z @12 +?free@allocate_child_proxy@internal@tbb@@QBAXAAVtask@3@@Z @13 +?free@allocate_continuation_proxy@internal@tbb@@QBAXAAVtask@3@@Z @14 +?free@allocate_root_proxy@internal@tbb@@SAXAAVtask@3@@Z @15 +?internal_set_ref_count@task@tbb@@AAAXH@Z @16 +?is_owned_by_current_thread@task@tbb@@QBA_NXZ @17 +?note_affinity@task@tbb@@UAAXG@Z @18 +?resize@affinity_partitioner_base_v3@internal@tbb@@AAAXI@Z @19 +?self@task@tbb@@SAAAV12@XZ @20 +?spawn_and_wait_for_all@task@tbb@@QAAXAAVtask_list@2@@Z @21 +?default_num_threads@task_scheduler_init@tbb@@SAHXZ @22 +?initialize@task_scheduler_init@tbb@@QAAXHI@Z @23 +?initialize@task_scheduler_init@tbb@@QAAXH@Z @24 +?terminate@task_scheduler_init@tbb@@QAAXXZ @25 +?observe@task_scheduler_observer_v3@internal@tbb@@QAAX_N@Z @26 + +; exception handling support +?allocate@allocate_root_with_context_proxy@internal@tbb@@QBAAAVtask@3@I@Z @27 +?free@allocate_root_with_context_proxy@internal@tbb@@QBAXAAVtask@3@@Z @28 +?is_group_execution_cancelled@task_group_context@tbb@@QBA_NXZ @29 +?cancel_group_execution@task_group_context@tbb@@QAA_NXZ @30 +?reset@task_group_context@tbb@@QAAXXZ @31 +?init@task_group_context@tbb@@IAAXXZ @32 +??1task_group_context@tbb@@QAA@XZ @33 +?name@captured_exception@tbb@@UBAPBDXZ @34 +?what@captured_exception@tbb@@UBAPBDXZ @35 +??1captured_exception@tbb@@UAA@XZ @36 + +; tbb_misc.cpp +?assertion_failure@tbb@@YAXPBDH00@Z @37 +?get_initial_auto_partitioner_divisor@internal@tbb@@YAIXZ @38 +?handle_perror@internal@tbb@@YAXHPBD@Z @39 +?set_assertion_handler@tbb@@YAP6AXPBDH00@ZP6AX0H00@Z@Z @40 +?runtime_warning@internal@tbb@@YAXPBDZZ @41 + +; tbb_main.cpp +?itt_load_pointer_with_acquire_v3@internal@tbb@@YAPAXPBX@Z @42 +?itt_store_pointer_with_release_v3@internal@tbb@@YAXPAX0@Z @43 + +; pipeline.cpp +??0pipeline@tbb@@QAA@XZ @44 +??1filter@tbb@@UAA@XZ @45 +??1pipeline@tbb@@UAA@XZ @46 +??_7pipeline@tbb@@6B@ @47 +?add_filter@pipeline@tbb@@QAAXAAVfilter@2@@Z @48 +?clear@pipeline@tbb@@QAAXXZ @49 +?inject_token@pipeline@tbb@@AAAXAAVtask@2@@Z @50 +?run@pipeline@tbb@@QAAXI@Z @51 + +; queuing_rw_mutex.cpp +?acquire@scoped_lock@queuing_rw_mutex@tbb@@QAAXAAV23@_N@Z @52 +?downgrade_to_reader@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ @53 +?release@scoped_lock@queuing_rw_mutex@tbb@@QAAXXZ @54 +?upgrade_to_writer@scoped_lock@queuing_rw_mutex@tbb@@QAA_NXZ @55 +?try_acquire@scoped_lock@queuing_rw_mutex@tbb@@QAA_NAAV23@_N@Z @56 + +#if !TBB_NO_LEGACY +; spin_rw_mutex.cpp v2 +?internal_acquire_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z @57 +?internal_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z @58 +?internal_downgrade@spin_rw_mutex@tbb@@CAXPAV12@@Z @59 +?internal_itt_releasing@spin_rw_mutex@tbb@@CAXPAV12@@Z @60 +?internal_release_reader@spin_rw_mutex@tbb@@CAXPAV12@@Z @61 +?internal_release_writer@spin_rw_mutex@tbb@@CAXPAV12@@Z @62 +?internal_upgrade@spin_rw_mutex@tbb@@CA_NPAV12@@Z @63 +?internal_try_acquire_writer@spin_rw_mutex@tbb@@CA_NPAV12@@Z @64 +?internal_try_acquire_reader@spin_rw_mutex@tbb@@CA_NPAV12@@Z @65 +#endif + +; spin_rw_mutex v3 +?internal_upgrade@spin_rw_mutex_v3@tbb@@AAA_NXZ @66 +?internal_downgrade@spin_rw_mutex_v3@tbb@@AAAXXZ @67 +?internal_acquire_reader@spin_rw_mutex_v3@tbb@@AAAXXZ @68 +?internal_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ @69 +?internal_release_reader@spin_rw_mutex_v3@tbb@@AAAXXZ @70 +?internal_release_writer@spin_rw_mutex_v3@tbb@@AAAXXZ @71 +?internal_try_acquire_reader@spin_rw_mutex_v3@tbb@@AAA_NXZ @72 +?internal_try_acquire_writer@spin_rw_mutex_v3@tbb@@AAA_NXZ @73 + +; spin_mutex.cpp +?internal_acquire@scoped_lock@spin_mutex@tbb@@AAAXAAV23@@Z @74 +?internal_release@scoped_lock@spin_mutex@tbb@@AAAXXZ @75 +?internal_try_acquire@scoped_lock@spin_mutex@tbb@@AAA_NAAV23@@Z @76 + +; mutex.cpp +?internal_acquire@scoped_lock@mutex@tbb@@AAAXAAV23@@Z @77 +?internal_release@scoped_lock@mutex@tbb@@AAAXXZ @78 +?internal_try_acquire@scoped_lock@mutex@tbb@@AAA_NAAV23@@Z @79 +?internal_construct@mutex@tbb@@AAAXXZ @80 +?internal_destroy@mutex@tbb@@AAAXXZ @81 + +; recursive_mutex.cpp +?internal_acquire@scoped_lock@recursive_mutex@tbb@@AAAXAAV23@@Z @82 +?internal_release@scoped_lock@recursive_mutex@tbb@@AAAXXZ @83 +?internal_try_acquire@scoped_lock@recursive_mutex@tbb@@AAA_NAAV23@@Z @84 +?internal_construct@recursive_mutex@tbb@@AAAXXZ @85 +?internal_destroy@recursive_mutex@tbb@@AAAXXZ @86 + +; queuing_mutex.cpp +?acquire@scoped_lock@queuing_mutex@tbb@@QAAXAAV23@@Z @87 +?release@scoped_lock@queuing_mutex@tbb@@QAAXXZ @88 +?try_acquire@scoped_lock@queuing_mutex@tbb@@QAA_NAAV23@@Z @89 + +; concurrent_hash_map.cpp +?internal_grow_predicate@hash_map_segment_base@internal@tbb@@QBA_NXZ @90 + +#if !TBB_NO_LEGACY +; concurrent_queue.cpp v2 +?advance@concurrent_queue_iterator_base@internal@tbb@@IAAXXZ @91 +?assign@concurrent_queue_iterator_base@internal@tbb@@IAAXABV123@@Z @92 +?internal_size@concurrent_queue_base@internal@tbb@@IBAHXZ @93 +??0concurrent_queue_base@internal@tbb@@IAA@I@Z @94 +??0concurrent_queue_iterator_base@internal@tbb@@IAA@ABVconcurrent_queue_base@12@@Z @95 +??1concurrent_queue_base@internal@tbb@@MAA@XZ @96 +??1concurrent_queue_iterator_base@internal@tbb@@IAA@XZ @97 +?internal_pop@concurrent_queue_base@internal@tbb@@IAAXPAX@Z @98 +?internal_pop_if_present@concurrent_queue_base@internal@tbb@@IAA_NPAX@Z @99 +?internal_push@concurrent_queue_base@internal@tbb@@IAAXPBX@Z @100 +?internal_push_if_not_full@concurrent_queue_base@internal@tbb@@IAA_NPBX@Z @101 +?internal_set_capacity@concurrent_queue_base@internal@tbb@@IAAXHI@Z @102 +#endif + +; concurrent_queue v3 +??1concurrent_queue_iterator_base_v3@internal@tbb@@IAA@XZ @103 +??0concurrent_queue_iterator_base_v3@internal@tbb@@IAA@ABVconcurrent_queue_base_v3@12@@Z @104 +?advance@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXXZ @105 +?assign@concurrent_queue_iterator_base_v3@internal@tbb@@IAAXABV123@@Z @106 +??0concurrent_queue_base_v3@internal@tbb@@IAA@I@Z @107 +??1concurrent_queue_base_v3@internal@tbb@@MAA@XZ @108 +?internal_pop@concurrent_queue_base_v3@internal@tbb@@IAAXPAX@Z @109 +?internal_pop_if_present@concurrent_queue_base_v3@internal@tbb@@IAA_NPAX@Z @110 +?internal_push@concurrent_queue_base_v3@internal@tbb@@IAAXPBX@Z @111 +?internal_push_if_not_full@concurrent_queue_base_v3@internal@tbb@@IAA_NPBX@Z @112 +?internal_size@concurrent_queue_base_v3@internal@tbb@@IBAHXZ @113 +?internal_set_capacity@concurrent_queue_base_v3@internal@tbb@@IAAXHI@Z @114 +?internal_finish_clear@concurrent_queue_base_v3@internal@tbb@@IAAXXZ @115 +?internal_throw_exception@concurrent_queue_base_v3@internal@tbb@@IBAXXZ @116 + +#if !TBB_NO_LEGACY +; concurrent_vector.cpp v2 +?internal_assign@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @117 +?internal_capacity@concurrent_vector_base@internal@tbb@@IBAIXZ @118 +?internal_clear@concurrent_vector_base@internal@tbb@@IAAXP6AXPAXI@Z_N@Z @119 +?internal_copy@concurrent_vector_base@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z @120 +?internal_grow_by@concurrent_vector_base@internal@tbb@@IAAIIIP6AXPAXI@Z@Z @121 +?internal_grow_to_at_least@concurrent_vector_base@internal@tbb@@IAAXIIP6AXPAXI@Z@Z @122 +?internal_push_back@concurrent_vector_base@internal@tbb@@IAAPAXIAAI@Z @123 +?internal_reserve@concurrent_vector_base@internal@tbb@@IAAXIII@Z @124 +#endif + +; concurrent_vector v3 +??1concurrent_vector_base_v3@internal@tbb@@IAA@XZ @125 +?internal_assign@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @126 +?internal_capacity@concurrent_vector_base_v3@internal@tbb@@IBAIXZ @127 +?internal_clear@concurrent_vector_base_v3@internal@tbb@@IAAIP6AXPAXI@Z@Z @128 +?internal_copy@concurrent_vector_base_v3@internal@tbb@@IAAXABV123@IP6AXPAXPBXI@Z@Z @129 +?internal_grow_by@concurrent_vector_base_v3@internal@tbb@@IAAIIIP6AXPAXPBXI@Z1@Z @130 +?internal_grow_to_at_least@concurrent_vector_base_v3@internal@tbb@@IAAXIIP6AXPAXPBXI@Z1@Z @131 +?internal_push_back@concurrent_vector_base_v3@internal@tbb@@IAAPAXIAAI@Z @132 +?internal_reserve@concurrent_vector_base_v3@internal@tbb@@IAAXIII@Z @133 +?internal_compact@concurrent_vector_base_v3@internal@tbb@@IAAPAXIPAXP6AX0I@ZP6AX0PBXI@Z@Z @134 +?internal_swap@concurrent_vector_base_v3@internal@tbb@@IAAXAAV123@@Z @135 +?internal_throw_exception@concurrent_vector_base_v3@internal@tbb@@IBAXI@Z @136 + +; tbb_thread +?join@tbb_thread_v3@internal@tbb@@QAAXXZ @137 +?detach@tbb_thread_v3@internal@tbb@@QAAXXZ @138 +?internal_start@tbb_thread_v3@internal@tbb@@AAAXP6AIPAX@Z0@Z @139 +?allocate_closure_v3@internal@tbb@@YAPAXI@Z @140 +?free_closure_v3@internal@tbb@@YAXPAX@Z @141 +?hardware_concurrency@tbb_thread_v3@internal@tbb@@SAIXZ @142 +?thread_yield_v3@internal@tbb@@YAXXZ @143 +?thread_sleep_v3@internal@tbb@@YAXABVinterval_t@tick_count@2@@Z @144 +?move_v3@internal@tbb@@YAXAAVtbb_thread_v3@12@0@Z @145 +?thread_get_id_v3@internal@tbb@@YA?AVid@tbb_thread_v3@12@XZ @146 diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Customize.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Customize.h new file mode 100644 index 0000000000..4b1a691013 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Customize.h @@ -0,0 +1,164 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_malloc_Customize_H_ +#define _TBB_malloc_Customize_H_ + +// customizing MALLOC_ASSERT macro +#include "tbb/tbb_stddef.h" +#define MALLOC_ASSERT(assertion, message) __TBB_ASSERT(assertion, message) + +#ifndef MALLOC_DEBUG +#define MALLOC_DEBUG TBB_USE_DEBUG +#endif + +#include "tbb/tbb_machine.h" + +#if DO_ITT_NOTIFY +#include "tbb/itt_notify.h" +#define MALLOC_ITT_SYNC_PREPARE(pointer) ITT_NOTIFY(sync_prepare, (pointer)) +#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ITT_NOTIFY(sync_acquired, (pointer)) +#define MALLOC_ITT_SYNC_RELEASING(pointer) ITT_NOTIFY(sync_releasing, (pointer)) +#define MALLOC_ITT_SYNC_CANCEL(pointer) ITT_NOTIFY(sync_cancel, (pointer)) +#else +#define MALLOC_ITT_SYNC_PREPARE(pointer) ((void)0) +#define MALLOC_ITT_SYNC_ACQUIRED(pointer) ((void)0) +#define MALLOC_ITT_SYNC_RELEASING(pointer) ((void)0) +#define MALLOC_ITT_SYNC_CANCEL(pointer) ((void)0) +#endif + +//! Stripped down version of spin_mutex. +/** Instances of MallocMutex must be declared in memory that is zero-initialized. + There are no constructors. This is a feature that lets it be + used in situations where the mutex might be used while file-scope constructors + are running. + + There are no methods "acquire" or "release". The scoped_lock must be used + in a strict block-scoped locking pattern. Omitting these methods permitted + further simplification. */ +class MallocMutex : tbb::internal::no_copy { + __TBB_atomic_flag value; + +public: + class scoped_lock : tbb::internal::no_copy { + __TBB_Flag unlock_value; + MallocMutex& mutex; + public: + scoped_lock( MallocMutex& m ) : unlock_value(__TBB_LockByte(m.value)), mutex(m) {} + scoped_lock( MallocMutex& m, bool block, bool *locked ) : mutex(m) { + unlock_value = 1; + if (block) { + unlock_value = __TBB_LockByte(m.value); + if (locked) *locked = true; + } else { + if (__TBB_TryLockByte(m.value)) { + unlock_value = 0; + if (locked) *locked = true; + } else + if (locked) *locked = false; + } + } + ~scoped_lock() { + if (!unlock_value) __TBB_UnlockByte(mutex.value, unlock_value); + } + }; + friend class scoped_lock; +}; + +inline intptr_t AtomicIncrement( volatile intptr_t& counter ) { + return __TBB_FetchAndAddW( &counter, 1 )+1; +} + +inline uintptr_t AtomicAdd( volatile intptr_t& counter, intptr_t value ) { + return __TBB_FetchAndAddW( &counter, value ); +} + +inline intptr_t AtomicCompareExchange( volatile intptr_t& location, intptr_t new_value, intptr_t comparand) { + return __TBB_CompareAndSwapW( &location, new_value, comparand ); +} + +inline intptr_t FencedLoad( const volatile intptr_t &location ) { + return __TBB_load_with_acquire(location); +} + +inline void FencedStore( volatile intptr_t &location, intptr_t value ) { + __TBB_store_with_release(location, value); +} + +inline void SpinWaitWhileEq(const volatile intptr_t &location, const intptr_t value) { + tbb::internal::spin_wait_while_eq(location, value); +} + +inline void SpinWaitUntilEq(const volatile intptr_t &location, const intptr_t value) { + tbb::internal::spin_wait_until_eq(location, value); +} + +inline intptr_t BitScanRev(uintptr_t x) { + return !x? -1 : __TBB_Log2(x); +} + +template<typename T> +static inline bool isAligned(T* arg, uintptr_t alignment) { + return tbb::internal::is_aligned(arg,alignment); +} + +static inline bool isPowerOfTwo(uintptr_t arg) { + return tbb::internal::is_power_of_two(arg); +} +static inline bool isPowerOfTwoMultiple(uintptr_t arg, uintptr_t divisor) { + return arg && tbb::internal::is_power_of_two_factor(arg,divisor); +} + +inline void AtomicOr(volatile void *operand, uintptr_t addend) { + __TBB_AtomicOR(operand, addend); +} + +inline void AtomicAnd(volatile void *operand, uintptr_t addend) { + __TBB_AtomicAND(operand, addend); +} + +#define USE_DEFAULT_MEMORY_MAPPING 1 + +// To support malloc replacement with LD_PRELOAD +#include "proxy.h" + +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED +#define malloc_proxy __TBB_malloc_proxy +extern "C" void * __TBB_malloc_proxy(size_t) __attribute__ ((weak)); +#else +const bool malloc_proxy = false; +#endif + +namespace rml { +namespace internal { + void init_tbbmalloc(); +} } // namespaces + +#define MALLOC_EXTRA_INITIALIZATION rml::internal::init_tbbmalloc() + +#endif /* _TBB_malloc_Customize_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/MapMemory.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/MapMemory.h new file mode 100644 index 0000000000..76a4646bc9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/MapMemory.h @@ -0,0 +1,129 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _itt_shared_malloc_MapMemory_H +#define _itt_shared_malloc_MapMemory_H + +#include <stdlib.h> + +void *ErrnoPreservingMalloc(size_t bytes) +{ + int prevErrno = errno; + void *ret = malloc( bytes ); + if (!ret) + errno = prevErrno; + return ret; +} + +#if __linux__ || __APPLE__ || __sun || __FreeBSD__ + +#if __sun && !defined(_XPG4_2) + // To have void* as mmap's 1st argument + #define _XPG4_2 1 + #define XPG4_WAS_DEFINED 1 +#endif + +#include <sys/mman.h> +#if __linux__ +/* __TBB_MAP_HUGETLB is MAP_HUGETLB from system header linux/mman.h. + The header do not included here, as on some Linux flavors inclusion of + linux/mman.h leads to compilation error, + while changing of MAP_HUGETLB is highly unexpected. +*/ +#define __TBB_MAP_HUGETLB 0x40000 +#else +#define __TBB_MAP_HUGETLB 0 +#endif + +#if XPG4_WAS_DEFINED + #undef _XPG4_2 + #undef XPG4_WAS_DEFINED +#endif + +#define MEMORY_MAPPING_USES_MALLOC 0 +void* MapMemory (size_t bytes, bool hugePages) +{ + void* result = 0; + int prevErrno = errno; +#ifndef MAP_ANONYMOUS +// Mac OS* X defines MAP_ANON, which is deprecated in Linux. +#define MAP_ANONYMOUS MAP_ANON +#endif /* MAP_ANONYMOUS */ + int addFlags = hugePages? __TBB_MAP_HUGETLB : 0; + result = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|addFlags, -1, 0); + if (result==MAP_FAILED) + errno = prevErrno; + return result==MAP_FAILED? 0: result; +} + +int UnmapMemory(void *area, size_t bytes) +{ + int prevErrno = errno; + int ret = munmap(area, bytes); + if (-1 == ret) + errno = prevErrno; + return ret; +} + +#elif (_WIN32 || _WIN64) && !_XBOX && !__TBB_WIN8UI_SUPPORT +#include <windows.h> + +#define MEMORY_MAPPING_USES_MALLOC 0 +void* MapMemory (size_t bytes, bool) +{ + /* Is VirtualAlloc thread safe? */ + return VirtualAlloc(NULL, bytes, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); +} + +int UnmapMemory(void *area, size_t /*bytes*/) +{ + BOOL result = VirtualFree(area, 0, MEM_RELEASE); + return !result; +} + +#else + +#define MEMORY_MAPPING_USES_MALLOC 1 +void* MapMemory (size_t bytes, bool) +{ + return ErrnoPreservingMalloc( bytes ); +} + +int UnmapMemory(void *area, size_t /*bytes*/) +{ + free( area ); + return 0; +} + +#endif /* OS dependent */ + +#if MALLOC_CHECK_RECURSION && MEMORY_MAPPING_USES_MALLOC +#error Impossible to protect against malloc recursion when memory mapping uses malloc. +#endif + +#endif /* _itt_shared_malloc_MapMemory_H */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Statistics.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Statistics.h new file mode 100644 index 0000000000..cb4bd46c3f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/Statistics.h @@ -0,0 +1,137 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#define MAX_THREADS 1024 +#define NUM_OF_BINS 30 +#define ThreadCommonCounters NUM_OF_BINS + +enum counter_type { + allocBlockNew = 0, + allocBlockPublic, + allocBumpPtrUsed, + allocFreeListUsed, + allocPrivatized, + examineEmptyEnough, + examineNotEmpty, + freeRestoreBumpPtr, + freeByOtherThread, + freeToActiveBlock, + freeToInactiveBlock, + freeBlockPublic, + freeBlockBack, + MaxCounters +}; +enum common_counter_type { + allocNewLargeObj = 0, + allocCachedLargeObj, + cacheLargeObj, + freeLargeObj, + lockPublicFreeList, + freeToOtherThread +}; + +#if COLLECT_STATISTICS +/* Statistics reporting callback registred via a static object dtor + on Posix or DLL_PROCESS_DETACH on Windows. + */ + +static bool reportAllocationStatistics; + +struct bin_counters { + int counter[MaxCounters]; +}; + +static bin_counters statistic[MAX_THREADS][NUM_OF_BINS+1]; //zero-initialized; + +static inline int STAT_increment(int thread, int bin, int ctr) +{ + return reportAllocationStatistics && thread < MAX_THREADS ? ++(statistic[thread][bin].counter[ctr]) : 0; +} + +static inline void initStatisticsCollection() { +#if defined(MALLOCENV_COLLECT_STATISTICS) + if (NULL != getenv(MALLOCENV_COLLECT_STATISTICS)) + reportAllocationStatistics = true; +#endif +} + +#else +#define STAT_increment(a,b,c) ((void)0) +#endif /* COLLECT_STATISTICS */ + +#if COLLECT_STATISTICS +static inline void STAT_print(int thread) +{ + if (!reportAllocationStatistics) + return; + + char filename[100]; +#if USE_PTHREAD + sprintf(filename, "stat_ScalableMalloc_proc%04d_thr%04d.log", getpid(), thread); +#else + sprintf(filename, "stat_ScalableMalloc_thr%04d.log", thread); +#endif + FILE* outfile = fopen(filename, "w"); + for(int i=0; i<NUM_OF_BINS; ++i) + { + bin_counters& ctrs = statistic[thread][i]; + fprintf(outfile, "Thr%04d Bin%02d", thread, i); + fprintf(outfile, ": allocNewBlocks %5d", ctrs.counter[allocBlockNew]); + fprintf(outfile, ", allocPublicBlocks %5d", ctrs.counter[allocBlockPublic]); + fprintf(outfile, ", restoreBumpPtr %5d", ctrs.counter[freeRestoreBumpPtr]); + fprintf(outfile, ", privatizeCalled %10d", ctrs.counter[allocPrivatized]); + fprintf(outfile, ", emptyEnough %10d", ctrs.counter[examineEmptyEnough]); + fprintf(outfile, ", notEmptyEnough %10d", ctrs.counter[examineNotEmpty]); + fprintf(outfile, ", freeBlocksPublic %5d", ctrs.counter[freeBlockPublic]); + fprintf(outfile, ", freeBlocksBack %5d", ctrs.counter[freeBlockBack]); + fprintf(outfile, "\n"); + } + for(int i=0; i<NUM_OF_BINS; ++i) + { + bin_counters& ctrs = statistic[thread][i]; + fprintf(outfile, "Thr%04d Bin%02d", thread, i); + fprintf(outfile, ": allocBumpPtr %10d", ctrs.counter[allocBumpPtrUsed]); + fprintf(outfile, ", allocFreeList %10d", ctrs.counter[allocFreeListUsed]); + fprintf(outfile, ", freeToActiveBlk %10d", ctrs.counter[freeToActiveBlock]); + fprintf(outfile, ", freeToInactive %10d", ctrs.counter[freeToInactiveBlock]); + fprintf(outfile, ", freedByOther %10d", ctrs.counter[freeByOtherThread]); + fprintf(outfile, "\n"); + } + bin_counters& ctrs = statistic[thread][ThreadCommonCounters]; + fprintf(outfile, "Thr%04d common counters", thread); + fprintf(outfile, ": allocNewLargeObject %5d", ctrs.counter[allocNewLargeObj]); + fprintf(outfile, ": allocCachedLargeObject %5d", ctrs.counter[allocCachedLargeObj]); + fprintf(outfile, ", cacheLargeObject %5d", ctrs.counter[cacheLargeObj]); + fprintf(outfile, ", freeLargeObject %5d", ctrs.counter[freeLargeObj]); + fprintf(outfile, ", lockPublicFreeList %5d", ctrs.counter[lockPublicFreeList]); + fprintf(outfile, ", freeToOtherThread %10d", ctrs.counter[freeToOtherThread]); + fprintf(outfile, "\n"); + + fclose(outfile); +} +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/TypeDefinitions.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/TypeDefinitions.h new file mode 100644 index 0000000000..e6495a55d7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/TypeDefinitions.h @@ -0,0 +1,111 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _itt_shared_malloc_TypeDefinitions_H_ +#define _itt_shared_malloc_TypeDefinitions_H_ + +// Define preprocessor symbols used to determine architecture +#if _WIN32||_WIN64 +# if defined(_M_X64)||defined(__x86_64__) // the latter for MinGW support +# define __ARCH_x86_64 1 +# elif defined(_M_IA64) +# define __ARCH_ipf 1 +# elif defined(_M_IX86)||defined(__i386__) // the latter for MinGW support +# define __ARCH_x86_32 1 +# elif defined(_M_ARM) +# define __ARCH_other 1 +# else +# error Unknown processor architecture for Windows +# endif +# define USE_WINTHREAD 1 +#else /* Assume generic Unix */ +# if __x86_64__ +# define __ARCH_x86_64 1 +# elif __ia64__ +# define __ARCH_ipf 1 +# elif __i386__ || __i386 +# define __ARCH_x86_32 1 +# else +# define __ARCH_other 1 +# endif +# define USE_PTHREAD 1 +#endif + +// According to C99 standard INTPTR_MIN defined for C++ +// iff __STDC_LIMIT_MACROS pre-defined +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +//! PROVIDE YOUR OWN Customize.h IF YOU FEEL NECESSARY +#include "Customize.h" + +// Include files containing declarations of intptr_t and uintptr_t +#include <stddef.h> // size_t +#if _MSC_VER +typedef unsigned __int16 uint16_t; +typedef unsigned __int32 uint32_t; +typedef unsigned __int64 uint64_t; + #if !UINTPTR_MAX + #define UINTPTR_MAX SIZE_MAX + #endif +#else // _MSC_VER +#include <stdint.h> +#endif + +namespace rml { +namespace internal { + +extern bool original_malloc_found; +extern void* (*original_malloc_ptr)(size_t); +extern void (*original_free_ptr)(void*); + +} } // namespaces + +/* + * Functions to align an integer down or up to the given power of two, + * and test for such an alignment, and for power of two. + */ +template<typename T> +static inline T alignDown(T arg, uintptr_t alignment) { + return T( (uintptr_t)arg & ~(alignment-1)); +} +template<typename T> +static inline T alignUp (T arg, uintptr_t alignment) { + return T(((uintptr_t)arg+(alignment-1)) & ~(alignment-1)); + // /*is this better?*/ return (((uintptr_t)arg-1) | (alignment-1)) + 1; +} +template<typename T> // works for not power-of-2 alignments +static inline T alignUpGeneric(T arg, uintptr_t alignment) { + if (size_t rem = arg % alignment) { + arg += alignment - rem; + } + return arg; +} + +#endif /* _itt_shared_malloc_TypeDefinitions_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backend.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backend.cpp new file mode 100644 index 0000000000..6add51eabc --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backend.cpp @@ -0,0 +1,1211 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include <string.h> /* for memset */ +#include <errno.h> +#include "tbbmalloc_internal.h" + +namespace rml { +namespace internal { + +/*********** Code to acquire memory from the OS or other executive ****************/ + +/* + syscall/malloc can set non-zero errno in case of failure, + but later allocator might be able to find memory to fulfil the request. + And we do not want changing of errno by successful scalable_malloc call. + To support this, restore old errno in (get|free)RawMemory, and set errno + in frontend just before returning to user code. + Please note: every syscall/libc call used inside scalable_malloc that + sets errno must be protected this way, not just memory allocation per se. +*/ + +#if USE_DEFAULT_MEMORY_MAPPING +#include "MapMemory.h" +#else +/* assume MapMemory and UnmapMemory are customized */ +#endif + +void* getRawMemory (size_t size, bool hugePages) { + return MapMemory(size, hugePages); +} + +bool freeRawMemory (void *object, size_t size) { + return UnmapMemory(object, size); +} + +void HugePagesStatus::registerAllocation(bool gotPage) +{ + if (gotPage) { + if (!wasObserved) + FencedStore(wasObserved, 1); + } else + FencedStore(enabled, 0); + // reports huge page status only once + if (needActualStatusPrint + && AtomicCompareExchange(needActualStatusPrint, 0, 1)) + doPrintStatus(gotPage, "available"); +} + +void HugePagesStatus::registerReleasing(size_t size) +{ + // We: 1) got huge page at least once, + // 2) something that looks like a huge page is been released, + // and 3) user requested huge pages, + // so a huge page might be available at next allocation. + // TODO: keep page status in regions and use exact check here + // Use isPowerOfTwoMultiple because it's faster then generic reminder. + if (FencedLoad(wasObserved) && isPowerOfTwoMultiple(size, pageSize)) + FencedStore(enabled, requestedMode.get()); +} + +void HugePagesStatus::printStatus() { + doPrintStatus(requestedMode.get(), "requested"); + if (requestedMode.get()) { // report actual status iff requested + if (pageSize) + FencedStore(needActualStatusPrint, 1); + else + doPrintStatus(/*state=*/false, "available"); + } +} + +void HugePagesStatus::doPrintStatus(bool state, const char *stateName) +{ + fprintf(stderr, "TBBmalloc: huge pages\t%s%s\n", + state? "" : "not ", stateName); +} + +void *Backend::getRawMem(size_t &size) const +{ + if (extMemPool->userPool()) { + size = alignUpGeneric(size, extMemPool->granularity); + return (*extMemPool->rawAlloc)(extMemPool->poolId, size); + } + // try to get them at 1st allocation and still use, if successful + // if 1st try is unsuccessful, no more trying + if (FencedLoad(hugePages.enabled)) { + size_t hugeSize = alignUpGeneric(size, hugePages.getSize()); + void *res = getRawMemory(hugeSize, /*hugePages=*/true); + hugePages.registerAllocation(res); + if (res) { + size = hugeSize; + return res; + } + } + size_t granSize = alignUpGeneric(size, extMemPool->granularity); + if (void *res = getRawMemory(granSize, /*hugePages=*/false)) { + size = granSize; + return res; + } + return NULL; +} + +void Backend::freeRawMem(void *object, size_t size) const +{ + if (extMemPool->userPool()) + (*extMemPool->rawFree)(extMemPool->poolId, object, size); + else { + hugePages.registerReleasing(size); + freeRawMemory(object, size); + } +} + +/********* End memory acquisition code ********************************/ + +// Protected object size. After successful locking returns size of locked block, +// and releasing requires setting block size. +class GuardedSize : tbb::internal::no_copy { + uintptr_t value; +public: + enum State { + LOCKED, + COAL_BLOCK, // block is coalescing now + MAX_LOCKED_VAL = COAL_BLOCK, + LAST_REGION_BLOCK, // used to mark last block in region + // values after this are "normal" block sizes + MAX_SPEC_VAL = LAST_REGION_BLOCK + }; + + void initLocked() { value = LOCKED; } + void makeCoalscing() { + MALLOC_ASSERT(value == LOCKED, ASSERT_TEXT); + value = COAL_BLOCK; + } + size_t tryLock(State state) { + size_t szVal, sz; + MALLOC_ASSERT(state <= MAX_LOCKED_VAL, ASSERT_TEXT); + for (;;) { + sz = FencedLoad((intptr_t&)value); + if (sz <= MAX_LOCKED_VAL) + break; + szVal = AtomicCompareExchange((intptr_t&)value, state, sz); + + if (szVal==sz) + break; + } + return sz; + } + void unlock(size_t size) { + MALLOC_ASSERT(value <= MAX_LOCKED_VAL, "The lock is not locked"); + MALLOC_ASSERT(size > MAX_LOCKED_VAL, ASSERT_TEXT); + FencedStore((intptr_t&)value, size); + } + friend void Backend::IndexedBins::verify(); +}; + +struct MemRegion { + MemRegion *next, // keep all regions in any pool to release all them on + *prev; // pool destroying, 2-linked list to release individual + // regions. + size_t allocSz, // got from poll callback + blockSz; // initial and maximal inner block size + bool exact; // region tageted to exact large object allocation +}; + +// this data must be unmodified while block is in use, so separate it +class BlockMutexes { +protected: + GuardedSize myL, // lock for me + leftL; // lock for left neighbor +}; + +class FreeBlock : BlockMutexes { +public: + static const size_t minBlockSize; + friend void Backend::IndexedBins::verify(); + + FreeBlock *prev, // in 2-linked list related to bin + *next, + *nextToFree; // used to form a queue during coalescing + // valid only when block is in processing, i.e. one is not free and not + size_t sizeTmp; // used outside of backend + int myBin; // bin that is owner of the block + bool aligned; + bool blockInBin; // this block in myBin already + + FreeBlock *rightNeig(size_t sz) const { + MALLOC_ASSERT(sz, ASSERT_TEXT); + return (FreeBlock*)((uintptr_t)this+sz); + } + FreeBlock *leftNeig(size_t sz) const { + MALLOC_ASSERT(sz, ASSERT_TEXT); + return (FreeBlock*)((uintptr_t)this - sz); + } + + void initHeader() { myL.initLocked(); leftL.initLocked(); } + void setMeFree(size_t size) { myL.unlock(size); } + size_t trySetMeUsed(GuardedSize::State s) { return myL.tryLock(s); } + + void setLeftFree(size_t sz) { leftL.unlock(sz); } + size_t trySetLeftUsed(GuardedSize::State s) { return leftL.tryLock(s); } + + size_t tryLockBlock() { + size_t rSz, sz = trySetMeUsed(GuardedSize::LOCKED); + + if (sz <= GuardedSize::MAX_LOCKED_VAL) + return false; + rSz = rightNeig(sz)->trySetLeftUsed(GuardedSize::LOCKED); + if (rSz <= GuardedSize::MAX_LOCKED_VAL) { + setMeFree(sz); + return false; + } + MALLOC_ASSERT(rSz == sz, ASSERT_TEXT); + return sz; + } + void markCoalescing(size_t blockSz) { + myL.makeCoalscing(); + rightNeig(blockSz)->leftL.makeCoalscing(); + sizeTmp = blockSz; + nextToFree = NULL; + } + void markUsed() { + myL.initLocked(); + rightNeig(sizeTmp)->leftL.initLocked(); + nextToFree = NULL; + } + static void markBlocks(FreeBlock *fBlock, int num, size_t size) { + for (int i=1; i<num; i++) { + fBlock = (FreeBlock*)((uintptr_t)fBlock + size); + fBlock->initHeader(); + } + } +}; + +// Last block in any region. Its "size" field is GuardedSize::LAST_REGION_BLOCK, +// This kind of blocks used to find region header +// and have a possibility to return region back to OS +struct LastFreeBlock : public FreeBlock { + MemRegion *memRegion; +}; + +const size_t FreeBlock::minBlockSize = sizeof(FreeBlock); + +void CoalRequestQ::putBlock(FreeBlock *fBlock) +{ + MALLOC_ASSERT(fBlock->sizeTmp >= FreeBlock::minBlockSize, ASSERT_TEXT); + fBlock->markUsed(); + + for (;;) { + FreeBlock *myBlToFree = (FreeBlock*)FencedLoad((intptr_t&)blocksToFree); + + fBlock->nextToFree = myBlToFree; + if (myBlToFree == + (FreeBlock*)AtomicCompareExchange((intptr_t&)blocksToFree, + (intptr_t)fBlock, + (intptr_t)myBlToFree)) + return; + } +} + +FreeBlock *CoalRequestQ::getAll() +{ + for (;;) { + FreeBlock *myBlToFree = (FreeBlock*)FencedLoad((intptr_t&)blocksToFree); + + if (!myBlToFree) + return NULL; + else { + if (myBlToFree == + (FreeBlock*)AtomicCompareExchange((intptr_t&)blocksToFree, + 0, (intptr_t)myBlToFree)) + return myBlToFree; + else + continue; + } + } +} + +// Try to get a block from a bin. +// If the remaining free space would stay in the same bin, +// split the block without removing it. +// If the free space should go to other bin(s), remove the block. +// alignedBin is true, if all blocks in the bin has slab-aligned right side. +FreeBlock *Backend::IndexedBins::getBlock(int binIdx, BackendSync *sync, + size_t size, bool needAlignedRes, bool alignedBin, bool wait, + int *binLocked) +{ + Bin *b = &freeBins[binIdx]; +try_next: + FreeBlock *fBlock = NULL; + if (b->head) { + bool locked; + MallocMutex::scoped_lock scopedLock(b->tLock, wait, &locked); + + if (!locked) { + if (binLocked) (*binLocked)++; + return NULL; + } + + for (FreeBlock *curr = b->head; curr; curr = curr->next) { + size_t szBlock = curr->tryLockBlock(); + if (!szBlock) { + goto try_next; + } + + if (alignedBin || !needAlignedRes) { + size_t splitSz = szBlock - size; + // If we got a block as split result, + // it must have a room for control structures. + if (szBlock >= size && (splitSz >= FreeBlock::minBlockSize || + !splitSz)) + fBlock = curr; + } else { + void *newB = alignUp(curr, slabSize); + uintptr_t rightNew = (uintptr_t)newB + size; + uintptr_t rightCurr = (uintptr_t)curr + szBlock; + // appropriate size, and left and right split results + // are either big enough or non-exitent + if (rightNew <= rightCurr + && (newB==curr || + (uintptr_t)newB-(uintptr_t)curr >= FreeBlock::minBlockSize) + && (rightNew==rightCurr || + rightCurr - rightNew >= FreeBlock::minBlockSize)) + fBlock = curr; + } + if (fBlock) { + // consume must be called before result of removing from a bin + // is visible externally. + sync->consume(); + if (alignedBin && needAlignedRes && + Backend::sizeToBin(szBlock-size) == Backend::sizeToBin(szBlock)) { + // free remainder of fBlock stay in same bin, + // so no need to remove it from the bin + // TODO: add more "still here" cases + FreeBlock *newFBlock = fBlock; + // return block from right side of fBlock + fBlock = (FreeBlock*)((uintptr_t)newFBlock + szBlock - size); + MALLOC_ASSERT(isAligned(fBlock, slabSize), "Invalid free block"); + fBlock->initHeader(); + fBlock->setLeftFree(szBlock - size); + newFBlock->setMeFree(szBlock - size); + + fBlock->sizeTmp = size; + } else { + b->removeBlock(fBlock); + if (freeBins[binIdx].empty()) + bitMask.set(binIdx, false); + fBlock->sizeTmp = szBlock; + } + break; + } else { // block size is not valid, search for next block in the bin + curr->setMeFree(szBlock); + curr->rightNeig(szBlock)->setLeftFree(szBlock); + } + } + } + return fBlock; +} + +void Backend::Bin::removeBlock(FreeBlock *fBlock) +{ + if (head == fBlock) + head = fBlock->next; + if (tail == fBlock) + tail = fBlock->prev; + if (fBlock->prev) + fBlock->prev->next = fBlock->next; + if (fBlock->next) + fBlock->next->prev = fBlock->prev; +} + +void Backend::IndexedBins::addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail) +{ + Bin *b = &freeBins[binIdx]; + + fBlock->myBin = binIdx; + fBlock->aligned = toAlignedBin(fBlock, blockSz); + fBlock->next = fBlock->prev = NULL; + { + MallocMutex::scoped_lock scopedLock(b->tLock); + if (addToTail) { + fBlock->prev = b->tail; + b->tail = fBlock; + if (fBlock->prev) + fBlock->prev->next = fBlock; + if (!b->head) + b->head = fBlock; + } else { + fBlock->next = b->head; + b->head = fBlock; + if (fBlock->next) + fBlock->next->prev = fBlock; + if (!b->tail) + b->tail = fBlock; + } + } + bitMask.set(binIdx, true); +} + +bool Backend::IndexedBins::tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail) +{ + bool locked; + Bin *b = &freeBins[binIdx]; + + fBlock->myBin = binIdx; + fBlock->aligned = toAlignedBin(fBlock, fBlock->sizeTmp); + if (addToTail) { + fBlock->next = NULL; + { + MallocMutex::scoped_lock scopedLock(b->tLock, /*wait=*/false, &locked); + if (!locked) + return false; + fBlock->prev = b->tail; + b->tail = fBlock; + if (fBlock->prev) + fBlock->prev->next = fBlock; + if (!b->head) + b->head = fBlock; + } + } else { + fBlock->prev = NULL; + { + MallocMutex::scoped_lock scopedLock(b->tLock, /*wait=*/false, &locked); + if (!locked) + return false; + fBlock->next = b->head; + b->head = fBlock; + if (fBlock->next) + fBlock->next->prev = fBlock; + if (!b->tail) + b->tail = fBlock; + } + } + bitMask.set(binIdx, true); + return true; +} + +void Backend::IndexedBins::reset() +{ + for (int i=0; i<Backend::freeBinsNum; i++) + freeBins[i].reset(); + bitMask.reset(); +} + +void Backend::IndexedBins::lockRemoveBlock(int binIdx, FreeBlock *fBlock) +{ + MallocMutex::scoped_lock scopedLock(freeBins[binIdx].tLock); + freeBins[binIdx].removeBlock(fBlock); + if (freeBins[binIdx].empty()) + bitMask.set(binIdx, false); +} + +bool ExtMemoryPool::regionsAreReleaseable() const +{ + return !keepAllMemory && !delayRegsReleasing; +} + +// try to allocate num blocks of size Bytes from particular "generic" bin +// needAlignedRes is true if result must be slab-aligned +FreeBlock *Backend::getFromBin(int binIdx, int num, size_t size, bool needAlignedRes, + int *binLocked) +{ + FreeBlock *fBlock = + freeLargeBins.getBlock(binIdx, &bkndSync, num*size, needAlignedRes, + /*alignedBin=*/false, /*wait=*/false, binLocked); + if (fBlock) { + if (needAlignedRes) { + size_t fBlockSz = fBlock->sizeTmp; + uintptr_t fBlockEnd = (uintptr_t)fBlock + fBlockSz; + FreeBlock *newB = alignUp(fBlock, slabSize); + FreeBlock *rightPart = (FreeBlock*)((uintptr_t)newB + num*size); + + // Space to use is in the middle, + // ... return free right part + if ((uintptr_t)rightPart != fBlockEnd) { + rightPart->initHeader(); // to prevent coalescing rightPart with fBlock + coalescAndPut(rightPart, fBlockEnd - (uintptr_t)rightPart); + } + // ... and free left part + if (newB != fBlock) { + newB->initHeader(); // to prevent coalescing fBlock with newB + coalescAndPut(fBlock, (uintptr_t)newB - (uintptr_t)fBlock); + } + + fBlock = newB; + MALLOC_ASSERT(isAligned(fBlock, slabSize), ASSERT_TEXT); + } else { + if (size_t splitSz = fBlock->sizeTmp - num*size) { + // split block and return free right part + FreeBlock *splitB = (FreeBlock*)((uintptr_t)fBlock + num*size); + splitB->initHeader(); + coalescAndPut(splitB, splitSz); + } + } + bkndSync.signal(); + FreeBlock::markBlocks(fBlock, num, size); + } + + return fBlock; +} + +// try to allocate size Byte block from any of slab-aligned spaces. +// needAlignedRes is true if result must be slab-aligned +FreeBlock *Backend::getFromAlignedSpace(int binIdx, int num, size_t size, + bool needAlignedRes, bool wait, int *binLocked) +{ + FreeBlock *fBlock = + freeAlignedBins.getBlock(binIdx, &bkndSync, num*size, needAlignedRes, + /*alignedBin=*/true, wait, binLocked); + + if (fBlock) { + if (fBlock->sizeTmp != num*size) { // i.e., need to split the block + FreeBlock *newAlgnd; + size_t newSz; + + if (needAlignedRes) { + newAlgnd = fBlock; + fBlock = (FreeBlock*)((uintptr_t)newAlgnd + newAlgnd->sizeTmp + - num*size); + MALLOC_ASSERT(isAligned(fBlock, slabSize), "Invalid free block"); + fBlock->initHeader(); + newSz = newAlgnd->sizeTmp - num*size; + } else { + newAlgnd = (FreeBlock*)((uintptr_t)fBlock + num*size); + newSz = fBlock->sizeTmp - num*size; + newAlgnd->initHeader(); + } + coalescAndPut(newAlgnd, newSz); + } + bkndSync.signal(); + MALLOC_ASSERT(!needAlignedRes || isAligned(fBlock, slabSize), ASSERT_TEXT); + FreeBlock::markBlocks(fBlock, num, size); + } + return fBlock; +} + +void Backend::correctMaxRequestSize(size_t requestSize) +{ + // Find maximal requested size limited by getMaxBinnedSize() + if (requestSize < getMaxBinnedSize()) { + for (size_t oldMaxReq = maxRequestedSize; + requestSize > oldMaxReq && requestSize < getMaxBinnedSize(); ) { + size_t val = AtomicCompareExchange((intptr_t&)maxRequestedSize, + requestSize, oldMaxReq); + if (val == oldMaxReq) + break; + oldMaxReq = val; + } + } +} + +inline size_t Backend::getMaxBinnedSize() +{ + return hugePages.wasObserved && !inUserPool()? + maxBinned_HugePage : maxBinned_SmallPage; +} + +bool Backend::askMemFromOS(size_t blockSize, intptr_t startModifiedCnt, + int *lockedBinsThreshold, + int numOfLockedBins, bool *largeBinsUpdated) +{ + size_t maxBinSize = 0; + + // Another thread is modifying backend while we can't get the block. + // Wait while it leaves and re-do the scan + // before trying other ways to extend the backend. + if (bkndSync.waitTillSignalled(startModifiedCnt) + // semaphore is protecting adding more more memory from OS + || memExtendingSema.wait()) + return true; + + if (startModifiedCnt != bkndSync.getNumOfMods()) { + memExtendingSema.signal(); + return true; + } + // To keep objects below maxBinnedSize, region must be larger then that. + // So trying to balance between too small regions (that leads to + // fragmentation) and too large ones (that leads to excessive address + // space consumption). If region is "quite large", allocate only one, + // to prevent fragmentation. It supposedly doesn't hurt performance, + // because the object requested by user is large. + const size_t maxBinned = getMaxBinnedSize(); + const size_t regSz_sizeBased = blockSize>=maxBinned? + blockSize : alignUp(4*maxRequestedSize, 1024*1024); + if (blockSize == slabSize || blockSize == numOfSlabAllocOnMiss*slabSize + || regSz_sizeBased < maxBinned) { + for (unsigned idx=0; idx<4; idx++) { + size_t binSize = addNewRegion(maxBinned, /*exact=*/false); + if (!binSize) + break; + if (binSize > maxBinSize) + maxBinSize = binSize; + } + } else { + // if huge pages enabled and blockSize>=maxBinned, rest of space up to + // huge page alignment is unusable, because single user object sits + // in an region. + *largeBinsUpdated = true; + maxBinSize = addNewRegion(regSz_sizeBased, /*exact=*/true); + } + memExtendingSema.signal(); + askMemFromOSCounter.OSasked(); + + // When blockSize >= maxBinnedSize, and getRawMem failed + // for this allocation, allocation in bins + // is our last chance to fulfil the request. + // Sadly, size is larger then max bin, so have to give up. + if (maxBinSize && maxBinSize < blockSize) + return false; + + if (!maxBinSize) { // no regions have been added, try to clean cache + if (extMemPool->hardCachesCleanup()) + *largeBinsUpdated = true; + else { + if (bkndSync.waitTillSignalled(startModifiedCnt)) + return true; + // OS can't give us more memory, but we have some in locked bins + if (*lockedBinsThreshold && numOfLockedBins) { + *lockedBinsThreshold = 0; + return true; + } + return false; + } + } + return true; +} + +// try to allocate size Byte block in available bins +// needAlignedRes is true if result must be slab-aligned +FreeBlock *Backend::genericGetBlock(int num, size_t size, bool needAlignedRes) +{ + // after (soft|hard)CachesCleanup we can get memory in large bins, + // while after addNewRegion only in slab-aligned bins. This flag + // is for large bins update status. + bool largeBinsUpdated = true; + FreeBlock *block = NULL; + const size_t totalReqSize = num*size; + const int nativeBin = sizeToBin(totalReqSize); + // If we found 2 or less locked bins, it's time to ask more memory from OS. + // But nothing can be asked from fixed pool. And we prefer wait, not ask + // for more memory, if block is quite large. + int lockedBinsThreshold = extMemPool->fixedPool || size>=maxBinned_SmallPage? 0 : 2; + + correctMaxRequestSize(totalReqSize); + scanCoalescQ(/*forceCoalescQDrop=*/false); + + for (;;) { + const intptr_t startModifiedCnt = bkndSync.getNumOfMods(); + int numOfLockedBins; + + for (;;) { + numOfLockedBins = 0; + + // TODO: try different bin search order + if (needAlignedRes) { + if (!block) + for ( int i=freeAlignedBins.getMinNonemptyBin(nativeBin); + i<freeBinsNum; i=freeAlignedBins.getMinNonemptyBin(i+1) ){ + block = getFromAlignedSpace(i, num, size, /*needAlignedRes=*/true, /*wait=*/false, &numOfLockedBins); + if (block) break; + } + if (!block && largeBinsUpdated) + for ( int i=freeLargeBins.getMinNonemptyBin(nativeBin); + i<freeBinsNum; i=freeLargeBins.getMinNonemptyBin(i+1) ){ + block = getFromBin(i, num, size, /*needAlignedRes=*/true, &numOfLockedBins); + if (block) break; + } + } else { + if (!block && largeBinsUpdated) + for ( int i=freeLargeBins.getMinNonemptyBin(nativeBin); + i<freeBinsNum; i=freeLargeBins.getMinNonemptyBin(i+1) ){ + block = getFromBin(i, num, size, /*needAlignedRes=*/false, &numOfLockedBins); + if (block) break; + } + if (!block) + for ( int i=freeAlignedBins.getMinNonemptyBin(nativeBin); + i<freeBinsNum; i=freeAlignedBins.getMinNonemptyBin(i+1) ){ + block = getFromAlignedSpace(i, num, size, /*needAlignedRes=*/false, /*wait=*/false, &numOfLockedBins); + if (block) break; + } + } + if (block || numOfLockedBins<=lockedBinsThreshold) + break; + } + if (block) + break; + + largeBinsUpdated = scanCoalescQ(/*forceCoalescQDrop=*/true); + largeBinsUpdated = extMemPool->softCachesCleanup() || largeBinsUpdated; + if (!largeBinsUpdated) { + if (!askMemFromOS(totalReqSize, startModifiedCnt, &lockedBinsThreshold, + numOfLockedBins, &largeBinsUpdated)) + return NULL; + } + } + return block; +} + +LargeMemoryBlock *Backend::getLargeBlock(size_t size) +{ + LargeMemoryBlock *lmb = + (LargeMemoryBlock*)genericGetBlock(1, size, /*needAlignedRes=*/false); + if (lmb) { + lmb->unalignedSize = size; + if (extMemPool->mustBeAddedToGlobalLargeBlockList()) + extMemPool->lmbList.add(lmb); + } + return lmb; +} + +void *Backend::getBackRefSpace(size_t size, bool *rawMemUsed) +{ + // This block is released only at shutdown, so it can prevent + // a entire region releasing when it's received from the backend, + // so prefer getRawMemory using. + if (void *ret = getRawMemory(size, /*hugePages=*/false)) { + *rawMemUsed = true; + return ret; + } + void *ret = genericGetBlock(1, size, /*needAlignedRes=*/false); + if (ret) *rawMemUsed = false; + return ret; +} + +void Backend::putBackRefSpace(void *b, size_t size, bool rawMemUsed) +{ + if (rawMemUsed) + freeRawMemory(b, size); + // ignore not raw mem, as it released on region releasing +} + +void Backend::removeBlockFromBin(FreeBlock *fBlock) +{ + if (fBlock->myBin != Backend::NO_BIN) { + if (fBlock->aligned) + freeAlignedBins.lockRemoveBlock(fBlock->myBin, fBlock); + else + freeLargeBins.lockRemoveBlock(fBlock->myBin, fBlock); + } +} + +void Backend::genericPutBlock(FreeBlock *fBlock, size_t blockSz) +{ + bkndSync.consume(); + coalescAndPut(fBlock, blockSz); + bkndSync.signal(); +} + +void AllLargeBlocksList::add(LargeMemoryBlock *lmb) +{ + MallocMutex::scoped_lock scoped_cs(largeObjLock); + lmb->gPrev = NULL; + lmb->gNext = loHead; + if (lmb->gNext) + lmb->gNext->gPrev = lmb; + loHead = lmb; +} + +void AllLargeBlocksList::remove(LargeMemoryBlock *lmb) +{ + MallocMutex::scoped_lock scoped_cs(largeObjLock); + if (loHead == lmb) + loHead = lmb->gNext; + if (lmb->gNext) + lmb->gNext->gPrev = lmb->gPrev; + if (lmb->gPrev) + lmb->gPrev->gNext = lmb->gNext; +} + +void AllLargeBlocksList::removeAll(Backend *backend) +{ + LargeMemoryBlock *next, *lmb = loHead; + loHead = NULL; + + for (; lmb; lmb = next) { + next = lmb->gNext; + // nothing left to AllLargeBlocksList::remove + lmb->gNext = lmb->gPrev = NULL; + backend->returnLargeObject(lmb); + } +} + +void Backend::putLargeBlock(LargeMemoryBlock *lmb) +{ + if (extMemPool->mustBeAddedToGlobalLargeBlockList()) + extMemPool->lmbList.remove(lmb); + genericPutBlock((FreeBlock *)lmb, lmb->unalignedSize); +} + +void Backend::returnLargeObject(LargeMemoryBlock *lmb) +{ + removeBackRef(lmb->backRefIdx); + putLargeBlock(lmb); + STAT_increment(getThreadId(), ThreadCommonCounters, freeLargeObj); +} + +void Backend::releaseRegion(MemRegion *memRegion) +{ + { + MallocMutex::scoped_lock lock(regionListLock); + if (regionList == memRegion) + regionList = memRegion->next; + if (memRegion->next) + memRegion->next->prev = memRegion->prev; + if (memRegion->prev) + memRegion->prev->next = memRegion->next; + } + freeRawMem(memRegion, memRegion->allocSz); +} + +// coalesce fBlock with its neighborhood +FreeBlock *Backend::doCoalesc(FreeBlock *fBlock, MemRegion **mRegion) +{ + FreeBlock *resBlock = fBlock; + size_t resSize = fBlock->sizeTmp; + MemRegion *memRegion = NULL; + + fBlock->markCoalescing(resSize); + resBlock->blockInBin = false; + + // coalesing with left neighbor + size_t leftSz = fBlock->trySetLeftUsed(GuardedSize::COAL_BLOCK); + if (leftSz != GuardedSize::LOCKED) { + if (leftSz == GuardedSize::COAL_BLOCK) { + coalescQ.putBlock(fBlock); + return NULL; + } else { + FreeBlock *left = fBlock->leftNeig(leftSz); + size_t lSz = left->trySetMeUsed(GuardedSize::COAL_BLOCK); + if (lSz <= GuardedSize::MAX_LOCKED_VAL) { + fBlock->setLeftFree(leftSz); // rollback + coalescQ.putBlock(fBlock); + return NULL; + } else { + MALLOC_ASSERT(lSz == leftSz, "Invalid header"); + left->blockInBin = true; + resBlock = left; + resSize += leftSz; + resBlock->sizeTmp = resSize; + } + } + } + // coalesing with right neighbor + FreeBlock *right = fBlock->rightNeig(fBlock->sizeTmp); + size_t rightSz = right->trySetMeUsed(GuardedSize::COAL_BLOCK); + if (rightSz != GuardedSize::LOCKED) { + // LastFreeBlock is on the right side + if (GuardedSize::LAST_REGION_BLOCK == rightSz) { + right->setMeFree(GuardedSize::LAST_REGION_BLOCK); + memRegion = static_cast<LastFreeBlock*>(right)->memRegion; + } else if (GuardedSize::COAL_BLOCK == rightSz) { + if (resBlock->blockInBin) { + resBlock->blockInBin = false; + removeBlockFromBin(resBlock); + } + coalescQ.putBlock(resBlock); + return NULL; + } else { + size_t rSz = right->rightNeig(rightSz)-> + trySetLeftUsed(GuardedSize::COAL_BLOCK); + if (rSz <= GuardedSize::MAX_LOCKED_VAL) { + right->setMeFree(rightSz); // rollback + if (resBlock->blockInBin) { + resBlock->blockInBin = false; + removeBlockFromBin(resBlock); + } + coalescQ.putBlock(resBlock); + return NULL; + } else { + MALLOC_ASSERT(rSz == rightSz, "Invalid header"); + removeBlockFromBin(right); + resSize += rightSz; + + // Is LastFreeBlock on the right side of right? + FreeBlock *nextRight = right->rightNeig(rightSz); + size_t nextRightSz = nextRight-> + trySetMeUsed(GuardedSize::COAL_BLOCK); + if (nextRightSz > GuardedSize::MAX_LOCKED_VAL) { + if (nextRightSz == GuardedSize::LAST_REGION_BLOCK) + memRegion = static_cast<LastFreeBlock*>(nextRight)->memRegion; + + nextRight->setMeFree(nextRightSz); + } + } + } + } + if (memRegion) { + MALLOC_ASSERT((uintptr_t)memRegion + memRegion->allocSz >= + (uintptr_t)right + sizeof(LastFreeBlock), ASSERT_TEXT); + MALLOC_ASSERT((uintptr_t)memRegion < (uintptr_t)resBlock, ASSERT_TEXT); + *mRegion = memRegion; + } else + *mRegion = NULL; + resBlock->sizeTmp = resSize; + return resBlock; +} + +void Backend::coalescAndPutList(FreeBlock *list, bool forceCoalescQDrop) +{ + FreeBlock *helper; + MemRegion *memRegion; + + for (;list; list = helper) { + bool addToTail = false; + helper = list->nextToFree; + FreeBlock *toRet = doCoalesc(list, &memRegion); + if (!toRet) + continue; + + if (memRegion && memRegion->blockSz == toRet->sizeTmp + && !extMemPool->fixedPool) { + if (extMemPool->regionsAreReleaseable()) { + // release the region, because there is no used blocks in it + if (toRet->blockInBin) + removeBlockFromBin(toRet); + releaseRegion(memRegion); + continue; + } else // add block from empty region to end of bin, + addToTail = true; // preserving for exact fit + } + size_t currSz = toRet->sizeTmp; + int bin = sizeToBin(currSz); + bool toAligned = toAlignedBin(toRet, currSz); + bool needAddToBin = true; + + if (toRet->blockInBin) { + // is it stay in same bin? + if (toRet->myBin == bin && toRet->aligned == toAligned) + needAddToBin = false; + else { + toRet->blockInBin = false; + removeBlockFromBin(toRet); + } + } + + // not stay in same bin, or bin-less, add it + if (needAddToBin) { + toRet->prev = toRet->next = toRet->nextToFree = NULL; + toRet->myBin = NO_BIN; + + // If the block is too small to fit in any bin, keep it bin-less. + // It's not a leak because the block later can be coalesced. + if (currSz >= minBinnedSize) { + toRet->sizeTmp = currSz; + IndexedBins *target = toAligned? &freeAlignedBins : &freeLargeBins; + if (forceCoalescQDrop) { + target->tryAddBlock(bin, toRet, addToTail); + } else if (!target->tryAddBlock(bin, toRet, addToTail)) { + coalescQ.putBlock(toRet); + continue; + } + } + toRet->sizeTmp = 0; + } + // Free (possibly coalesced) free block. + // Adding to bin must be done before this point, + // because after a block is free it can be coalesced, and + // using its pointer became unsafe. + // Remember that coalescing is not done under any global lock. + toRet->setMeFree(currSz); + toRet->rightNeig(currSz)->setLeftFree(currSz); + } +} + +// Coalesce fBlock and add it back to a bin; +// processing delayed coalescing requests. +void Backend::coalescAndPut(FreeBlock *fBlock, size_t blockSz) +{ + fBlock->sizeTmp = blockSz; + fBlock->nextToFree = NULL; + + coalescAndPutList(fBlock, /*forceCoalescQDrop=*/false); +} + +bool Backend::scanCoalescQ(bool forceCoalescQDrop) +{ + FreeBlock *currCoalescList = coalescQ.getAll(); + + if (currCoalescList) + coalescAndPutList(currCoalescList, forceCoalescQDrop); + return currCoalescList; +} + +FreeBlock *Backend::findBlockInRegion(MemRegion *region) +{ + FreeBlock *fBlock; + size_t blockSz; + uintptr_t fBlockEnd, + lastFreeBlock = (uintptr_t)region + region->allocSz - sizeof(LastFreeBlock); + + if (region->exact) { + fBlock = (FreeBlock *)alignUp((uintptr_t)region + sizeof(MemRegion), + largeObjectAlignment); + fBlockEnd = lastFreeBlock; + } else { // right bound is slab-aligned, keep LastFreeBlock after it + fBlock = (FreeBlock *)((uintptr_t)region + sizeof(MemRegion)); + fBlockEnd = alignDown(lastFreeBlock, slabSize); + } + if (fBlockEnd <= (uintptr_t)fBlock) + return NULL; // allocSz is too small + blockSz = fBlockEnd - (uintptr_t)fBlock; + // TODO: extend getSlabBlock to support degradation, i.e. getting less blocks + // then requested, and then relax this check + // (now all or nothing is implemented, check according to this) + if (blockSz < numOfSlabAllocOnMiss*slabSize) + return NULL; + + region->blockSz = blockSz; + return fBlock; +} + +// startUseBlock adds free block to a bin, the block can be used and +// even released after this, so the region must be added to regionList already +void Backend::startUseBlock(MemRegion *region, FreeBlock *fBlock) +{ + size_t blockSz = region->blockSz; + fBlock->initHeader(); + fBlock->setMeFree(blockSz); + + LastFreeBlock *lastBl = static_cast<LastFreeBlock*>(fBlock->rightNeig(blockSz)); + lastBl->initHeader(); + lastBl->setMeFree(GuardedSize::LAST_REGION_BLOCK); + lastBl->setLeftFree(blockSz); + lastBl->myBin = NO_BIN; + lastBl->memRegion = region; + + unsigned targetBin = sizeToBin(blockSz); + if (!region->exact && toAlignedBin(fBlock, blockSz)) { + freeAlignedBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false); + } else { + freeLargeBins.addBlock(targetBin, fBlock, blockSz, /*addToTail=*/false); + } +} + +size_t Backend::addNewRegion(size_t rawSize, bool exact) +{ + // to guarantee that header is not overwritten in used blocks + MALLOC_ASSERT(sizeof(BlockMutexes) <= sizeof(BlockI), ASSERT_TEXT); + // to guarantee that block length is not conflicting with + // special values of GuardedSize + MALLOC_ASSERT(FreeBlock::minBlockSize > GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT); + // "exact" means that not less than rawSize for block inside the region. + // Reserve space for region header, worst case alignment + // and last block mark. + if (exact) + rawSize += sizeof(MemRegion) + largeObjectAlignment + + FreeBlock::minBlockSize + sizeof(LastFreeBlock); + + MemRegion *region = (MemRegion*)getRawMem(rawSize); + if (!region) return 0; + if (rawSize < sizeof(MemRegion)) { + if (!extMemPool->fixedPool) + freeRawMem(region, rawSize); + return 0; + } + + region->exact = exact; + region->allocSz = rawSize; + FreeBlock *fBlock = findBlockInRegion(region); + if (!fBlock) { + if (!extMemPool->fixedPool) + freeRawMem(region, rawSize); + return 0; + } + // adding to global list of all regions + { + region->prev = NULL; + MallocMutex::scoped_lock lock(regionListLock); + region->next = regionList; + regionList = region; + if (regionList->next) + regionList->next->prev = regionList; + } + // copy it here, as just after starting to use region it might be released + size_t blockSz = region->blockSz; + + startUseBlock(region, fBlock); + bkndSync.pureSignal(); + return blockSz; +} + +void Backend::reset() +{ + MemRegion *curr; + + MALLOC_ASSERT(extMemPool->userPool(), "Only user pool can be reset."); + // no active threads are allowed in backend while reset() called + verify(); + + freeLargeBins.reset(); + freeAlignedBins.reset(); + + for (curr = regionList; curr; curr = curr->next) { + FreeBlock *fBlock = findBlockInRegion(curr); + MALLOC_ASSERT(fBlock, "A memory region unexpectedly got smaller"); + startUseBlock(curr, fBlock); + } +} + +bool Backend::destroy() +{ + // no active threads are allowed in backend while destroy() called + verify(); + while (regionList) { + MemRegion *helper = regionList->next; + if (inUserPool()) + (*extMemPool->rawFree)(extMemPool->poolId, regionList, + regionList->allocSz); + else { + freeRawMemory(regionList, regionList->allocSz); + } + regionList = helper; + } + return true; +} + +void Backend::IndexedBins::verify() +{ + for (int i=0; i<freeBinsNum; i++) { + for (FreeBlock *fb = freeBins[i].head; fb; fb=fb->next) { + uintptr_t mySz = fb->myL.value; + MALLOC_ASSERT(mySz>GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT); + FreeBlock *right = (FreeBlock*)((uintptr_t)fb + mySz); + suppress_unused_warning(right); + MALLOC_ASSERT(right->myL.value<=GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT); + MALLOC_ASSERT(right->leftL.value==mySz, ASSERT_TEXT); + MALLOC_ASSERT(fb->leftL.value<=GuardedSize::MAX_SPEC_VAL, ASSERT_TEXT); + } + } +} + +// For correct operation, it must be called when no other threads +// is changing backend. +void Backend::verify() +{ +#if MALLOC_DEBUG + scanCoalescQ(/*forceCoalescQDrop=*/false); + + freeLargeBins.verify(); + freeAlignedBins.verify(); +#endif // MALLOC_DEBUG +} + +#if __TBB_MALLOC_BACKEND_STAT +size_t Backend::Bin::countFreeBlocks() +{ + size_t cnt = 0; + { + MallocMutex::scoped_lock lock(tLock); + for (FreeBlock *fb = head; fb; fb = fb->next) + cnt++; + } + return cnt; +} + +void Backend::IndexedBins::reportStat(FILE *f) +{ + size_t totalSize = 0; + + for (int i=0; i<Backend::freeBinsNum; i++) + if (size_t cnt = freeBins[i].countFreeBlocks()) { + totalSize += cnt*Backend::binToSize(i); + fprintf(f, "%d:%lu ", i, cnt); + } + fprintf(f, "\ttotal size %lu KB", totalSize/1024); +} + +void Backend::reportStat(FILE *f) +{ + int regNum = 0; + + scanCoalescQ(/*forceCoalescQDrop=*/false); + + { + MallocMutex::scoped_lock lock(regionListLock); + for (MemRegion *curr = regionList; curr; curr = curr->next) + regNum++; + } + fprintf(f, "%d regions\nlarge ", regNum); + freeLargeBins.reportStat(f); + fprintf(f, "\naligned "); + freeAlignedBins.reportStat(f); + fprintf(f, "\n"); +} +#endif // __TBB_MALLOC_BACKEND_STAT + +} } // namespaces diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backref.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backref.cpp new file mode 100644 index 0000000000..92999e9b96 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/backref.cpp @@ -0,0 +1,290 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbbmalloc_internal.h" +#include <string.h> +#include <new> /* for placement new */ + +namespace rml { +namespace internal { + + +/********* backreferences ***********************/ +/* Each slab block and each large memory object header contains BackRefIdx + * that points out in some BackRefBlock which points back to this block or header. + */ +struct BackRefBlock : public BlockI { + BackRefBlock *nextForUse; // the next in the chain of blocks with free items + FreeObject *bumpPtr; // bump pointer moves from the end to the beginning of the block + FreeObject *freeList; + // list of all blocks that were allocated from raw mem (i.e., not from backend) + BackRefBlock *nextRawMemBlock; + int allocatedCount; // the number of objects allocated + int myNum; // the index in the parent array + MallocMutex blockMutex; + bool addedToForUse; // this block is already added to the listForUse chain + + BackRefBlock(BackRefBlock *blockToUse, int num) : + nextForUse(NULL), bumpPtr((FreeObject*)((uintptr_t)blockToUse + slabSize - sizeof(void*))), + freeList(NULL), nextRawMemBlock(NULL), allocatedCount(0), myNum(num), + addedToForUse(false) { + memset(&blockMutex, 0, sizeof(MallocMutex)); + // index in BackRefMaster must fit to uint16_t + MALLOC_ASSERT(!(myNum >> 16), ASSERT_TEXT); + } + + // TODO: take into account VirtualAlloc granularity + static const int bytes = slabSize; +}; + +// max number of backreference pointers in slab block +static const int BR_MAX_CNT = (BackRefBlock::bytes-sizeof(BackRefBlock))/sizeof(void*); + +struct BackRefMaster { +/* A slab block can hold up to ~2K back pointers to slab blocks or large objects, + * so it can address at least 32MB. The array of 64KB holds 8K pointers + * to such blocks, addressing ~256 GB. + */ + static const size_t bytes = 64*1024; + static const int dataSz; +/* space is reserved for master table and 4 leaves + taking into account VirtualAlloc allocation granularity */ + static const int leaves = 4; + static const size_t masterSize = BackRefMaster::bytes+leaves*BackRefBlock::bytes; + + Backend *backend; + BackRefBlock *active; // if defined, use it for allocations + BackRefBlock *listForUse; // the chain of data blocks with free items + BackRefBlock *allRawMemBlocks; + intptr_t lastUsed; // index of the last used block + bool rawMemUsed; + BackRefBlock *backRefBl[1]; // the real size of the array is dataSz + + BackRefBlock *findFreeBlock(); + void addBackRefBlockToList(BackRefBlock *bl); + void addEmptyBackRefBlock(BackRefBlock *newBl); +}; + +const int BackRefMaster::dataSz + = 1+(BackRefMaster::bytes-sizeof(BackRefMaster))/sizeof(BackRefBlock*); + +static MallocMutex backRefMutex; +static BackRefMaster *backRefMaster; + +bool initBackRefMaster(Backend *backend) +{ + bool rawMemUsed; + BackRefMaster *master = + (BackRefMaster*)backend->getBackRefSpace(BackRefMaster::masterSize, + &rawMemUsed); + if (! master) + return false; + master->backend = backend; + master->listForUse = master->allRawMemBlocks = NULL; + master->rawMemUsed = rawMemUsed; + master->lastUsed = -1; + for (int i=0; i<BackRefMaster::leaves; i++) { + BackRefBlock *bl = (BackRefBlock *)((uintptr_t)master + BackRefMaster::bytes + i*BackRefBlock::bytes); + master->addEmptyBackRefBlock(bl); + if (i) + master->addBackRefBlockToList(bl); + else // active leaf is not needed in listForUse + master->active = bl; + } + // backRefMaster is read in getBackRef, so publish it in consistent state + FencedStore((intptr_t&)backRefMaster, (intptr_t)master); + return true; +} + +void destroyBackRefMaster(Backend *backend) +{ + if (backRefMaster) { // Is initBackRefMaster() called? + for (BackRefBlock *curr=backRefMaster->allRawMemBlocks; curr; ) { + BackRefBlock *next = curr->nextRawMemBlock; + // allRawMemBlocks list is only for raw mem blocks + backend->putBackRefSpace(curr, BackRefBlock::bytes, /*rawMemUsed=*/true); + curr = next; + } + backend->putBackRefSpace(backRefMaster, BackRefMaster::masterSize, + backRefMaster->rawMemUsed); + } +} + +void BackRefMaster::addBackRefBlockToList(BackRefBlock *bl) +{ + bl->nextForUse = listForUse; + listForUse = bl; + bl->addedToForUse = true; +} + +void BackRefMaster::addEmptyBackRefBlock(BackRefBlock *newBl) +{ + intptr_t nextLU = lastUsed+1; + memset((char*)newBl+sizeof(BackRefBlock), 0, + BackRefBlock::bytes-sizeof(BackRefBlock)); + new (newBl) BackRefBlock(newBl, nextLU); + backRefBl[nextLU] = newBl; + // lastUsed is read in getBackRef, and access to backRefBl[lastUsed] + // is possible only after checking backref against current lastUsed + FencedStore(lastUsed, nextLU); +} + +BackRefBlock *BackRefMaster::findFreeBlock() +{ + if (active->allocatedCount < BR_MAX_CNT) + return active; + + if (listForUse) { // use released list + active = listForUse; + listForUse = listForUse->nextForUse; + MALLOC_ASSERT(active->addedToForUse, ASSERT_TEXT); + active->addedToForUse = false; + } else if (lastUsed-1 < backRefMaster->dataSz) { // allocate new data node + bool rawMemUsed; + BackRefBlock *newBl = + (BackRefBlock*)backend->getBackRefSpace(BackRefBlock::bytes, &rawMemUsed); + if (!newBl) return NULL; + backRefMaster->addEmptyBackRefBlock(newBl); + if (rawMemUsed) { + newBl->nextRawMemBlock = backRefMaster->allRawMemBlocks; + backRefMaster->allRawMemBlocks = newBl; + } else + newBl->nextRawMemBlock = NULL; + active = newBl; + } else // no free blocks, give up + return NULL; + return active; +} + +void *getBackRef(BackRefIdx backRefIdx) +{ + // !backRefMaster means no initialization done, so it can't be valid memory + // see addEmptyBackRefBlock for fences around lastUsed + if (!FencedLoad((intptr_t&)backRefMaster) + || backRefIdx.getMaster() > FencedLoad(backRefMaster->lastUsed) + || backRefIdx.getOffset() >= BR_MAX_CNT) + return NULL; + return *(void**)((uintptr_t)backRefMaster->backRefBl[backRefIdx.getMaster()] + + sizeof(BackRefBlock)+backRefIdx.getOffset()*sizeof(void*)); +} + +void setBackRef(BackRefIdx backRefIdx, void *newPtr) +{ + MALLOC_ASSERT(backRefIdx.getMaster()<=backRefMaster->lastUsed && backRefIdx.getOffset()<BR_MAX_CNT, + ASSERT_TEXT); + *(void**)((uintptr_t)backRefMaster->backRefBl[backRefIdx.getMaster()] + + sizeof(BackRefBlock) + backRefIdx.getOffset()*sizeof(void*)) = newPtr; +} + +BackRefIdx BackRefIdx::newBackRef(bool largeObj) +{ + BackRefBlock *blockToUse; + void **toUse; + BackRefIdx res; + + do { + { // global lock taken to find a block + MallocMutex::scoped_lock lock(backRefMutex); + + MALLOC_ASSERT(backRefMaster, ASSERT_TEXT); + blockToUse = backRefMaster->findFreeBlock(); + if (!blockToUse) + return BackRefIdx(); + } + toUse = NULL; + { // the block is locked to find a reference + MallocMutex::scoped_lock lock(blockToUse->blockMutex); + + if (blockToUse->freeList) { + toUse = (void**)blockToUse->freeList; + blockToUse->freeList = blockToUse->freeList->next; + MALLOC_ASSERT(!blockToUse->freeList || + ((uintptr_t)blockToUse->freeList>=(uintptr_t)blockToUse + && (uintptr_t)blockToUse->freeList < + (uintptr_t)blockToUse + slabSize), ASSERT_TEXT); + } else if (blockToUse->allocatedCount < BR_MAX_CNT) { + toUse = (void**)blockToUse->bumpPtr; + blockToUse->bumpPtr = + (FreeObject*)((uintptr_t)blockToUse->bumpPtr - sizeof(void*)); + if (blockToUse->allocatedCount == BR_MAX_CNT-1) { + MALLOC_ASSERT((uintptr_t)blockToUse->bumpPtr + < (uintptr_t)blockToUse+sizeof(BackRefBlock), + ASSERT_TEXT); + blockToUse->bumpPtr = NULL; + } + } + if (toUse) + blockToUse->allocatedCount++; + } // end of lock scope + } while (!toUse); + res.master = blockToUse->myNum; + uintptr_t offset = + ((uintptr_t)toUse - ((uintptr_t)blockToUse + sizeof(BackRefBlock)))/sizeof(void*); + // Is offset too big? + MALLOC_ASSERT(!(offset >> 15), ASSERT_TEXT); + res.offset = offset; + if (largeObj) res.largeObj = largeObj; + + return res; +} + +void removeBackRef(BackRefIdx backRefIdx) +{ + MALLOC_ASSERT(!backRefIdx.isInvalid(), ASSERT_TEXT); + MALLOC_ASSERT(backRefIdx.getMaster()<=backRefMaster->lastUsed + && backRefIdx.getOffset()<BR_MAX_CNT, ASSERT_TEXT); + BackRefBlock *currBlock = backRefMaster->backRefBl[backRefIdx.getMaster()]; + FreeObject *freeObj = (FreeObject*)((uintptr_t)currBlock + sizeof(BackRefBlock) + + backRefIdx.getOffset()*sizeof(void*)); + MALLOC_ASSERT(((uintptr_t)freeObj>(uintptr_t)currBlock && + (uintptr_t)freeObj<(uintptr_t)currBlock + slabSize), ASSERT_TEXT); + { + MallocMutex::scoped_lock lock(currBlock->blockMutex); + + freeObj->next = currBlock->freeList; + MALLOC_ASSERT(!freeObj->next || + ((uintptr_t)freeObj->next > (uintptr_t)currBlock + && (uintptr_t)freeObj->next < + (uintptr_t)currBlock + slabSize), ASSERT_TEXT); + currBlock->freeList = freeObj; + currBlock->allocatedCount--; + } + // TODO: do we need double-check here? + if (!currBlock->addedToForUse && currBlock!=backRefMaster->active) { + MallocMutex::scoped_lock lock(backRefMutex); + + if (!currBlock->addedToForUse && currBlock!=backRefMaster->active) + backRefMaster->addBackRefBlockToList(currBlock); + } +} + +/********* End of backreferences ***********************/ + +} // namespace internal +} // namespace rml + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/frontend.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/frontend.cpp new file mode 100644 index 0000000000..ee6063bcc9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/frontend.cpp @@ -0,0 +1,2875 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + + +#include "tbbmalloc_internal.h" +#include <errno.h> +#include <new> /* for placement new */ +#include <string.h> /* for memset */ + +//! Define the main synchronization method +#define FINE_GRAIN_LOCKS + +#if USE_PTHREAD + #define TlsSetValue_func pthread_setspecific + #define TlsGetValue_func pthread_getspecific + #include <sched.h> + inline void do_yield() {sched_yield();} + extern "C" { static void mallocThreadShutdownNotification(void*); } + +#elif USE_WINTHREAD +#if __TBB_WIN8UI_SUPPORT +#include<thread> + #define TlsSetValue_func FlsSetValue + #define TlsGetValue_func FlsGetValue + #define TlsAlloc() FlsAlloc(NULL) + #define TlsFree FlsFree + inline void do_yield() {std::this_thread::yield();} +#else + #define TlsSetValue_func TlsSetValue + #define TlsGetValue_func TlsGetValue + inline void do_yield() {SwitchToThread();} +#endif +#else + #error Must define USE_PTHREAD or USE_WINTHREAD + +#endif + + +#define FREELIST_NONBLOCKING 1 + +namespace rml { +class MemoryPool; +namespace internal { + +class Block; +class MemoryPool; + +#if MALLOC_CHECK_RECURSION + +inline bool isMallocInitialized(); + +bool RecursiveMallocCallProtector::noRecursion() { + MALLOC_ASSERT(isMallocInitialized(), + "Recursion status can be checked only when initialization was done."); + return !mallocRecursionDetected; +} + +#endif // MALLOC_CHECK_RECURSION + +/* + * Block::objectSize value used to mark blocks allocated by startupAlloc + */ +const uint16_t startupAllocObjSizeMark = ~(uint16_t)0; + +/* + * This number of bins in the TLS that leads to blocks that we can allocate in. + */ +const uint32_t numBlockBinLimit = 31; + +/* + * The following constant is used to define the size of struct Block, the block header. + * The intent is to have the size of a Block multiple of the cache line size, this allows us to + * get good alignment at the cost of some overhead equal to the amount of padding included in the Block. + */ +const int blockHeaderAlignment = estimatedCacheLineSize; + +/********* The data structures and global objects **************/ + +/* + * The malloc routines themselves need to be able to occasionally malloc some space, + * in order to set up the structures used by the thread local structures. This + * routine preforms that fuctions. + */ +class BootStrapBlocks { + MallocMutex bootStrapLock; + Block *bootStrapBlock; + Block *bootStrapBlockUsed; + FreeObject *bootStrapObjectList; +public: + void *allocate(MemoryPool *memPool, size_t size); + void free(void* ptr); + void reset(); +}; + +class ThreadId { + static tls_key_t Tid_key; + static intptr_t ThreadIdCount; + + unsigned int id; +public: + + static void init() { +#if USE_WINTHREAD + Tid_key = TlsAlloc(); +#else + int status = pthread_key_create( &Tid_key, NULL ); + if ( status ) { + fprintf (stderr, "The memory manager cannot create tls key during initialization; exiting \n"); + exit(1); + } +#endif /* USE_WINTHREAD */ + } + static void destroy() { + if( Tid_key ) { +#if USE_WINTHREAD + TlsFree( Tid_key ); +#else + int status = pthread_key_delete( Tid_key ); + if ( status ) { + fprintf (stderr, "The memory manager cannot delete tls key; exiting \n"); + exit(1); + } +#endif /* USE_WINTHREAD */ + Tid_key = 0; + } + } + static ThreadId get() { + ThreadId result; + result.id = reinterpret_cast<intptr_t>(TlsGetValue_func(Tid_key)); + if( !result.id ) { + RecursiveMallocCallProtector scoped; + // Thread-local value is zero -> first call from this thread, + // need to initialize with next ID value (IDs start from 1) + result.id = AtomicIncrement(ThreadIdCount); // returned new value! + TlsSetValue_func( Tid_key, reinterpret_cast<void*>(result.id) ); + } + return result; + } + + bool defined() const { return id; } + void undef() { id = 0; } + void invalid() { id = (unsigned int)-1; } + bool own() const { return id == ThreadId::get().id; } + + friend bool operator==(const ThreadId &id1, const ThreadId &id2); + friend unsigned int getThreadId(); +}; + +tls_key_t ThreadId::Tid_key; +intptr_t ThreadId::ThreadIdCount; + +bool operator==(const ThreadId &id1, const ThreadId &id2) { + return id1.id == id2.id; +} + +unsigned int getThreadId() { return ThreadId::get().id; } + +/*********** Code to provide thread ID and a thread-local void pointer **********/ + +TLSKey::TLSKey() +{ +#if USE_WINTHREAD + TLS_pointer_key = TlsAlloc(); +#else + int status = pthread_key_create( &TLS_pointer_key, mallocThreadShutdownNotification ); + if ( status ) { + fprintf (stderr, "The memory manager cannot create tls key during initialization; exiting \n"); + exit(1); + } +#endif /* USE_WINTHREAD */ +} + +TLSKey::~TLSKey() +{ +#if USE_WINTHREAD + TlsFree(TLS_pointer_key); +#else + int status1 = pthread_key_delete(TLS_pointer_key); + if ( status1 ) { + fprintf (stderr, "The memory manager cannot delete tls key during; exiting \n"); + exit(1); + } +#endif /* USE_WINTHREAD */ +} + +inline TLSData* TLSKey::getThreadMallocTLS() const +{ + return (TLSData *)TlsGetValue_func( TLS_pointer_key ); +} + +inline void TLSKey::setThreadMallocTLS( TLSData * newvalue ) { + RecursiveMallocCallProtector scoped; + TlsSetValue_func( TLS_pointer_key, newvalue ); +} + +/* The 'next' field in the block header has to maintain some invariants: + * it needs to be on a 16K boundary and the first field in the block. + * Any value stored there needs to have the lower 14 bits set to 0 + * so that various assert work. This means that if you want to smash this memory + * for debugging purposes you will need to obey this invariant. + * The total size of the header needs to be a power of 2 to simplify + * the alignment requirements. For now it is a 128 byte structure. + * To avoid false sharing, the fields changed only locally are separated + * from the fields changed by foreign threads. + * Changing the size of the block header would require to change + * some bin allocation sizes, in particular "fitting" sizes (see above). + */ +class Bin; +class StartupBlock; +class TLSData; + +class LifoList { +public: + inline LifoList(); + inline void push(Block *block); + inline Block *pop(); + +private: + Block *top; +#ifdef FINE_GRAIN_LOCKS + MallocMutex lock; +#endif /* FINE_GRAIN_LOCKS */ +}; + +/* + * When a block that is not completely free is returned for reuse by other threads + * this is where the block goes. + * + * LifoList assumes zero initialization; so below its constructors are omitted, + * to avoid linking with C++ libraries on Linux. + */ + +class OrphanedBlocks { + LifoList bins[numBlockBinLimit]; +public: + Block *get(Bin* bin, unsigned int size); + void put(Bin* bin, Block *block); + void reset(); +}; + +class MemoryPool { + // if no explicit grainsize, expect to see malloc in user's pAlloc + // and set reasonable low granularity + static const size_t defaultGranularity = estimatedCacheLineSize; + + MemoryPool(); // deny +public: + static MallocMutex memPoolListLock; + + // list of all active pools is used to release + // all TLS data on thread termination or library unload + MemoryPool *next, + *prev; + ExtMemoryPool extMemPool; + OrphanedBlocks orphanedBlocks; + BootStrapBlocks bootStrapBlocks; + + bool init(intptr_t poolId, const MemPoolPolicy* memPoolPolicy); + static void initDefaultPool(); + void reset(); + void destroy(); + void processThreadShutdown(TLSData *tlsData); + + inline TLSData *getTLS(bool create); + void clearTLS() { extMemPool.tlsPointerKey.setThreadMallocTLS(NULL); } + + Bin *getAllocationBin(TLSData* tls, size_t size); + Block *getEmptyBlock(size_t size); + void returnEmptyBlock(Block *block, bool poolTheBlock); + + // get/put large object to/from local large object cache + void *getFromLLOCache(TLSData *tls, size_t size, size_t alignment); + void putToLLOCache(TLSData *tls, void *object); + + inline void allocatorCalledHook(TLSData *tls); +}; + +static char defaultMemPool_space[sizeof(MemoryPool)]; +static MemoryPool *defaultMemPool = (MemoryPool *)defaultMemPool_space; +const size_t MemoryPool::defaultGranularity; +// zero-initialized +MallocMutex MemoryPool::memPoolListLock; +// TODO: move huge page status to default pool, because that's its states +HugePagesStatus hugePages; + +// Slab block is 16KB-aligned. To prvent false sharing, separate locally-accessed +// fields and fields commonly accessed by not owner threads. +class GlobalBlockFields : public BlockI { +protected: + FreeObject *publicFreeList; + Block *nextPrivatizable; +}; + +class LocalBlockFields : public GlobalBlockFields { +protected: + size_t __pad_local_fields[(blockHeaderAlignment - + sizeof(GlobalBlockFields))/sizeof(size_t)]; + + Block *next; + Block *previous; /* Use double linked list to speed up removal */ + uint16_t objectSize; + ThreadId owner; + FreeObject *bumpPtr; /* Bump pointer moves from the end to the beginning of a block */ + FreeObject *freeList; + BackRefIdx backRefIdx; + unsigned int allocatedCount; /* Number of objects allocated (obviously by the owning thread) */ + bool isFull; + bool orphaned; + + friend void *BootStrapBlocks::allocate(MemoryPool *memPool, size_t size); + friend class FreeBlockPool; + friend class StartupBlock; + friend class LifoList; + friend Block *MemoryPool::getEmptyBlock(size_t size); +}; + +class Block : public LocalBlockFields { + size_t __pad_public_fields[(2*blockHeaderAlignment - + sizeof(LocalBlockFields))/sizeof(size_t)]; +public: + bool empty() const { return allocatedCount==0 && publicFreeList==NULL; } + inline FreeObject* allocate(); + inline FreeObject *allocateFromFreeList(); + inline bool emptyEnoughToUse(); + bool freeListNonNull() { return freeList; } + void freePublicObject(FreeObject *objectToFree); + inline void freeOwnObject(MemoryPool *memPool, TLSData *tls, void *object); + void makeEmpty(); + void privatizePublicFreeList(); + void restoreBumpPtr(); + void privatizeOrphaned(Bin *bin); + void shareOrphaned(const Bin *bin); + unsigned int getSize() const { + MALLOC_ASSERT(isStartupAllocObject() || objectSize<minLargeObjectSize, + "Invalid object size"); + return objectSize; + } + const BackRefIdx *getBackRefIdx() const { return &backRefIdx; } + bool ownBlock() const { return !orphaned && owner.own(); } + bool isStartupAllocObject() const { return objectSize == startupAllocObjSizeMark; } + inline FreeObject *findObjectToFree(void *object) const; + bool checkFreePrecond(void *object) const { + if (allocatedCount>0) { + if (startupAllocObjSizeMark == objectSize) // startup block + return object<=bumpPtr; + else + return allocatedCount <= (slabSize-sizeof(Block))/objectSize + && (!bumpPtr || object>bumpPtr); + } + return false; + } + const BackRefIdx *getBackRef() const { return &backRefIdx; } + void initEmptyBlock(Bin* tlsBin, size_t size); + +protected: + void cleanBlockHeader(); + +private: + static const float emptyEnoughRatio; /* "Reactivate" a block if this share of its objects is free. */ + + inline FreeObject *allocateFromBumpPtr(); + inline FreeObject *findAllocatedObject(const void *address) const; + inline bool isProperlyPlaced(const void *object) const; + + friend class Bin; + friend class TLSData; + friend void MemoryPool::destroy(); +}; + +const float Block::emptyEnoughRatio = 1.0 / 4.0; + +class Bin { + Block *activeBlk; + Block *mailbox; + MallocMutex mailLock; + +public: + inline Block* getActiveBlock() const { return activeBlk; } + void resetActiveBlock() { activeBlk = 0; } + bool activeBlockUnused() const { return activeBlk && !activeBlk->allocatedCount; } + inline void setActiveBlock(Block *block); + inline Block* setPreviousBlockActive(); + Block* getPublicFreeListBlock(); + void moveBlockToBinFront(Block *block); + void processLessUsedBlock(MemoryPool *memPool, Block *block); + + void outofTLSBin (Block* block); + void verifyTLSBin (size_t size) const; + void pushTLSBin(Block* block); + + void verifyInitState() const { + MALLOC_ASSERT( activeBlk == 0, ASSERT_TEXT ); + MALLOC_ASSERT( mailbox == 0, ASSERT_TEXT ); + } + + friend void Block::freePublicObject (FreeObject *objectToFree); +}; + +/********* End of the data structures **************/ + +/* + * There are bins for all 8 byte aligned objects less than this segregated size; 8 bins in total + */ +const uint32_t minSmallObjectIndex = 0; +const uint32_t numSmallObjectBins = 8; +const uint32_t maxSmallObjectSize = 64; + +/* + * There are 4 bins between each couple of powers of 2 [64-128-256-...] + * from maxSmallObjectSize till this size; 16 bins in total + */ +const uint32_t minSegregatedObjectIndex = minSmallObjectIndex+numSmallObjectBins; +const uint32_t numSegregatedObjectBins = 16; +const uint32_t maxSegregatedObjectSize = 1024; + +/* + * And there are 5 bins with allocation sizes that are multiples of estimatedCacheLineSize + * and selected to fit 9, 6, 4, 3, and 2 allocations in a block. + */ +const uint32_t minFittingIndex = minSegregatedObjectIndex+numSegregatedObjectBins; +const uint32_t numFittingBins = 5; + +const uint32_t fittingAlignment = estimatedCacheLineSize; + +#define SET_FITTING_SIZE(N) ( (slabSize-sizeof(Block))/N ) & ~(fittingAlignment-1) +// For blockSize=16*1024, sizeof(Block)=2*estimatedCacheLineSize and fittingAlignment=estimatedCacheLineSize, +// the comments show the fitting sizes and the amounts left unused for estimatedCacheLineSize=64/128: +const uint32_t fittingSize1 = SET_FITTING_SIZE(9); // 1792/1792 128/000 +const uint32_t fittingSize2 = SET_FITTING_SIZE(6); // 2688/2688 128/000 +const uint32_t fittingSize3 = SET_FITTING_SIZE(4); // 4032/3968 128/256 +const uint32_t fittingSize4 = SET_FITTING_SIZE(3); // 5376/5376 128/000 +const uint32_t fittingSize5 = SET_FITTING_SIZE(2); // 8128/8064 000/000 +#undef SET_FITTING_SIZE + +/* + * The total number of thread-specific Block-based bins + */ +const uint32_t numBlockBins = minFittingIndex+numFittingBins; + +/* + * Objects of this size and larger are considered large objects. + */ +const uint32_t minLargeObjectSize = fittingSize5 + 1; + +/* + * Default granularity of memory pools + */ + +#if USE_WINTHREAD +const size_t scalableMallocPoolGranularity = 64*1024; // for VirtualAlloc use +#else +const size_t scalableMallocPoolGranularity = 4*1024; // page size, for mmap use +#endif + +/* + * Per-thread pool of slab blocks. Idea behind it is to not share with other + * threads memory that are likely in local cache(s) of our CPU. + */ +class FreeBlockPool { + Block *head; + Block *tail; + int size; + Backend *backend; + bool lastAccessMiss; + void insertBlock(Block *block); +public: + static const int POOL_HIGH_MARK = 32; + static const int POOL_LOW_MARK = 8; + + class ResOfGet { + ResOfGet(); + public: + Block* block; + bool lastAccMiss; + ResOfGet(Block *b, bool lastMiss) : block(b), lastAccMiss(lastMiss) {} + }; + + // allocated in zero-initialized memory + FreeBlockPool(Backend *bknd) : backend(bknd) {} + ResOfGet getBlock(); + void returnBlock(Block *block); + bool releaseAllBlocks(); +}; + +template<int LOW_MARK, int HIGH_MARK> +class LocalLOC { + static const size_t MAX_TOTAL_SIZE = 4*1024*1024; + + // TODO: can single-linked list be faster here? + LargeMemoryBlock *head, + *tail; + intptr_t lastSeenOSCallsCnt, + lastUsedOSCallsCnt; + size_t totalSize; + int numOfBlocks; +public: + bool put(LargeMemoryBlock *object, ExtMemoryPool *extMemPool); + LargeMemoryBlock *get(size_t size); + bool clean(ExtMemoryPool *extMemPool); + void allocatorCalledHook(ExtMemoryPool *extMemPool); +#if __TBB_MALLOC_WHITEBOX_TEST + LocalLOC() : head(NULL), tail(NULL), lastSeenOSCallsCnt(0), + lastUsedOSCallsCnt(0), totalSize(0), + numOfBlocks(0) {} + static size_t getMaxSize() { return MAX_TOTAL_SIZE; } +#else + // no ctor, object must be created in zero-initialized memory +#endif +}; + +class TLSData { +#if USE_PTHREAD + MemoryPool *memPool; +#endif +public: + Bin bin[numBlockBinLimit]; + FreeBlockPool freeSlabBlocks; + LocalLOC<8,32> lloc; +#if USE_PTHREAD + TLSData(MemoryPool *mPool, Backend *bknd) : memPool(mPool), freeSlabBlocks(bknd) {} + MemoryPool *getMemPool() const { return memPool; } +#else + TLSData(MemoryPool * /*memPool*/, Backend *bknd) : freeSlabBlocks(bknd) {} +#endif + void release(MemoryPool *mPool); +}; + +TLSData *TLSKey::createTLS(MemoryPool *memPool, Backend *backend) +{ + MALLOC_ASSERT( sizeof(TLSData) >= sizeof(Bin) * numBlockBins + sizeof(FreeBlockPool), ASSERT_TEXT ); + TLSData* tls = (TLSData*) memPool->bootStrapBlocks.allocate(memPool, sizeof(TLSData)); + if ( !tls ) + return NULL; + new(tls) TLSData(memPool, backend); + /* the block contains zeroes after bootStrapMalloc, so bins are initialized */ +#if MALLOC_DEBUG + for (uint32_t i = 0; i < numBlockBinLimit; i++) + tls->bin[i].verifyInitState(); +#endif + setThreadMallocTLS(tls); + return tls; +} + +bool ExtMemoryPool::releaseTLCaches() +{ + bool released = false; + + if (TLSData *tlsData = tlsPointerKey.getThreadMallocTLS()) { + released = tlsData->freeSlabBlocks.releaseAllBlocks(); + released |= tlsData->lloc.clean(this); + + // active blocks can be not used, so return them to backend + for (uint32_t i=0; i<numBlockBinLimit; i++) + if (tlsData->bin[i].activeBlockUnused()) { + Block *block = tlsData->bin[i].getActiveBlock(); + tlsData->bin[i].outofTLSBin(block); + // slab blocks in user's pools do not have valid backRefIdx + if (!userPool()) + removeBackRef(*(block->getBackRefIdx())); + backend.putSlabBlock(block); + + released = true; + } + } + return released; +} + + +#if MALLOC_CHECK_RECURSION +MallocMutex RecursiveMallocCallProtector::rmc_mutex; +pthread_t RecursiveMallocCallProtector::owner_thread; +void *RecursiveMallocCallProtector::autoObjPtr; +bool RecursiveMallocCallProtector::mallocRecursionDetected; +#if __FreeBSD__ +bool RecursiveMallocCallProtector::canUsePthread; +#endif + +#endif + +/*********** End code to provide thread ID and a TLS pointer **********/ + +static void *internalMalloc(size_t size); +static void internalFree(void *object); +static void *internalPoolMalloc(MemoryPool* mPool, size_t size); +static bool internalPoolFree(MemoryPool *mPool, void *object); + +#if !MALLOC_DEBUG +#if __INTEL_COMPILER || _MSC_VER +#define NOINLINE(decl) __declspec(noinline) decl +#define ALWAYSINLINE(decl) __forceinline decl +#elif __GNUC__ +#define NOINLINE(decl) decl __attribute__ ((noinline)) +#define ALWAYSINLINE(decl) decl __attribute__ ((always_inline)) +#else +#define NOINLINE(decl) decl +#define ALWAYSINLINE(decl) decl +#endif + +static NOINLINE( void doInitialization() ); +ALWAYSINLINE( bool isMallocInitialized() ); + +#undef ALWAYSINLINE +#undef NOINLINE +#endif /* !MALLOC_DEBUG */ + + +/********* Now some rough utility code to deal with indexing the size bins. **************/ + +/* + * Given a number return the highest non-zero bit in it. It is intended to work with 32-bit values only. + * Moreover, on IPF, for sake of simplicity and performance, it is narrowed to only serve for 64 to 1023. + * This is enough for current algorithm of distribution of sizes among bins. + * __TBB_Log2 is not used here to minimize dependencies on TBB specific sources. + */ +#if _WIN64 && _MSC_VER>=1400 && !__INTEL_COMPILER +extern "C" unsigned char _BitScanReverse( unsigned long* i, unsigned long w ); +#pragma intrinsic(_BitScanReverse) +#endif +static inline unsigned int highestBitPos(unsigned int n) +{ + MALLOC_ASSERT( n>=64 && n<1024, ASSERT_TEXT ); // only needed for bsr array lookup, but always true + unsigned int pos; +#if __ARCH_x86_32||__ARCH_x86_64 + +# if __linux__||__APPLE__||__FreeBSD__||__NetBSD__||__sun||__MINGW32__ + __asm__ ("bsr %1,%0" : "=r"(pos) : "r"(n)); +# elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER)) + __asm + { + bsr eax, n + mov pos, eax + } +# elif _WIN64 && _MSC_VER>=1400 + _BitScanReverse((unsigned long*)&pos, (unsigned long)n); +# else +# error highestBitPos() not implemented for this platform +# endif +#elif __arm__ + __asm__ __volatile__ + ( + "clz %0, %1\n" + "rsb %0, %0, %2\n" + :"=r" (pos) :"r" (n), "I" (31) + ); +#else + static unsigned int bsr[16] = {0/*N/A*/,6,7,7,8,8,8,8,9,9,9,9,9,9,9,9}; + pos = bsr[ n>>6 ]; +#endif /* __ARCH_* */ + return pos; +} + +/* + * Depending on indexRequest, for a given size return either the index into the bin + * for objects of this size, or the actual size of objects in this bin. + */ +template<bool indexRequest> +static unsigned int getIndexOrObjectSize (unsigned int size) +{ + if (size <= maxSmallObjectSize) { // selection from 4/8/16/24/32/40/48/56/64 + /* Index 0 holds up to 8 bytes, Index 1 16 and so forth */ + return indexRequest ? (size - 1) >> 3 : alignUp(size,8); + } + else if (size <= maxSegregatedObjectSize ) { // 80/96/112/128 / 160/192/224/256 / 320/384/448/512 / 640/768/896/1024 + unsigned int order = highestBitPos(size-1); // which group of bin sizes? + MALLOC_ASSERT( 6<=order && order<=9, ASSERT_TEXT ); + if (indexRequest) + return minSegregatedObjectIndex - (4*6) - 4 + (4*order) + ((size-1)>>(order-2)); + else { + unsigned int alignment = 128 >> (9-order); // alignment in the group + MALLOC_ASSERT( alignment==16 || alignment==32 || alignment==64 || alignment==128, ASSERT_TEXT ); + return alignUp(size,alignment); + } + } + else { + if( size <= fittingSize3 ) { + if( size <= fittingSize2 ) { + if( size <= fittingSize1 ) + return indexRequest ? minFittingIndex : fittingSize1; + else + return indexRequest ? minFittingIndex+1 : fittingSize2; + } else + return indexRequest ? minFittingIndex+2 : fittingSize3; + } else { + if( size <= fittingSize5 ) { + if( size <= fittingSize4 ) + return indexRequest ? minFittingIndex+3 : fittingSize4; + else + return indexRequest ? minFittingIndex+4 : fittingSize5; + } else { + MALLOC_ASSERT( 0,ASSERT_TEXT ); // this should not happen + return ~0U; + } + } + } +} + +static unsigned int getIndex (unsigned int size) +{ + return getIndexOrObjectSize</*indexRequest*/true>(size); +} + +static unsigned int getObjectSize (unsigned int size) +{ + return getIndexOrObjectSize</*indexRequest*/false>(size); +} + + +void *BootStrapBlocks::allocate(MemoryPool *memPool, size_t size) +{ + FreeObject *result; + + MALLOC_ASSERT( size == sizeof(TLSData), ASSERT_TEXT ); + + { // Lock with acquire + MallocMutex::scoped_lock scoped_cs(bootStrapLock); + + if( bootStrapObjectList) { + result = bootStrapObjectList; + bootStrapObjectList = bootStrapObjectList->next; + } else { + if (!bootStrapBlock) { + bootStrapBlock = memPool->getEmptyBlock(size); + if (!bootStrapBlock) return NULL; + } + result = bootStrapBlock->bumpPtr; + bootStrapBlock->bumpPtr = (FreeObject *)((uintptr_t)bootStrapBlock->bumpPtr - bootStrapBlock->objectSize); + if ((uintptr_t)bootStrapBlock->bumpPtr < (uintptr_t)bootStrapBlock+sizeof(Block)) { + bootStrapBlock->bumpPtr = NULL; + bootStrapBlock->next = bootStrapBlockUsed; + bootStrapBlockUsed = bootStrapBlock; + bootStrapBlock = NULL; + } + } + } // Unlock with release + + memset (result, 0, size); + return (void*)result; +} + +void BootStrapBlocks::free(void* ptr) +{ + MALLOC_ASSERT( ptr, ASSERT_TEXT ); + { // Lock with acquire + MallocMutex::scoped_lock scoped_cs(bootStrapLock); + ((FreeObject*)ptr)->next = bootStrapObjectList; + bootStrapObjectList = (FreeObject*)ptr; + } // Unlock with release +} + +void BootStrapBlocks::reset() +{ + bootStrapBlock = bootStrapBlockUsed = NULL; + bootStrapObjectList = NULL; +} + +#if !(FREELIST_NONBLOCKING) +static MallocMutex publicFreeListLock; // lock for changes of publicFreeList +#endif + +const uintptr_t UNUSABLE = 0x1; +inline bool isSolidPtr( void* ptr ) +{ + return (UNUSABLE|(uintptr_t)ptr)!=UNUSABLE; +} +inline bool isNotForUse( void* ptr ) +{ + return (uintptr_t)ptr==UNUSABLE; +} + +/********* End rough utility code **************/ + +#ifdef FINE_GRAIN_LOCKS +/* LifoList assumes zero initialization so a vector of it can be created + * by just allocating some space with no call to constructor. + * On Linux, it seems to be necessary to avoid linking with C++ libraries. + * + * By usage convention there is no race on the initialization. */ +LifoList::LifoList( ) : top(NULL) +{ + // MallocMutex assumes zero initialization + memset(&lock, 0, sizeof(MallocMutex)); +} + +void LifoList::push(Block *block) +{ + MallocMutex::scoped_lock scoped_cs(lock); + block->next = top; + top = block; +} + +Block *LifoList::pop() +{ + Block *block=NULL; + if (!top) goto done; + { + MallocMutex::scoped_lock scoped_cs(lock); + if (!top) goto done; + block = top; + top = block->next; + } +done: + return block; +} + +#endif /* FINE_GRAIN_LOCKS */ + +/********* Thread and block related code *************/ + +TLSData* MemoryPool::getTLS(bool create) +{ + TLSData* tls = extMemPool.tlsPointerKey.getThreadMallocTLS(); + if( create && !tls ) { + tls = extMemPool.tlsPointerKey.createTLS(this, &extMemPool.backend); + MALLOC_ASSERT( tls, ASSERT_TEXT ); + } + return tls; +} + +/* + * Return the bin for the given size. + */ +Bin* MemoryPool::getAllocationBin(TLSData* tls, size_t size) +{ + return tls->bin + getIndex(size); +} + +/* Return an empty uninitialized block in a non-blocking fashion. */ +Block *MemoryPool::getEmptyBlock(size_t size) +{ + FreeBlockPool::ResOfGet resOfGet(NULL, false); + Block *result = NULL, *b; + TLSData* tls = extMemPool.tlsPointerKey.getThreadMallocTLS(); + + if (tls) + resOfGet = tls->freeSlabBlocks.getBlock(); + if (resOfGet.block) { + result = resOfGet.block; + } else { + int i, num = resOfGet.lastAccMiss? Backend::numOfSlabAllocOnMiss : 1; + BackRefIdx backRefIdx[Backend::numOfSlabAllocOnMiss]; + + result = static_cast<Block*>(extMemPool.backend.getSlabBlock(num)); + if (!result) return NULL; + + if (!extMemPool.userPool()) + for (i=0; i<num; i++) { + backRefIdx[i] = BackRefIdx::newBackRef(/*largeObj=*/false); + if (backRefIdx[i].isInvalid()) { + // roll back resource allocation + for (int j=0; j<i; j++) + removeBackRef(backRefIdx[j]); + Block *b; + for (b=result, i=0; i<num; + b=(Block*)((uintptr_t)b+slabSize), i++) + extMemPool.backend.putSlabBlock(b); + return NULL; + } + } + // resources were allocated, register blocks + for (b=result, i=0; i<num; b=(Block*)((uintptr_t)b+slabSize), i++) { + // slab block in user's pool must have invalid backRefIdx + if (extMemPool.userPool()) { + new (&b->backRefIdx) BackRefIdx(); + } else { + setBackRef(backRefIdx[i], b); + b->backRefIdx = backRefIdx[i]; + } + // all but first one go to per-thread pool + if (i > 0) { + MALLOC_ASSERT(tls, ASSERT_TEXT); + tls->freeSlabBlocks.returnBlock(b); + } + } + } + if (result) { + result->initEmptyBlock(tls? tls->bin : NULL, size); + STAT_increment(result->owner, getIndex(result->objectSize), allocBlockNew); + } + return result; +} + +void MemoryPool::returnEmptyBlock(Block *block, bool poolTheBlock) +{ + block->makeEmpty(); + if (poolTheBlock) { + extMemPool.tlsPointerKey.getThreadMallocTLS()->freeSlabBlocks.returnBlock(block); + } + else { + // slab blocks in user's pools do not have valid backRefIdx + if (!extMemPool.userPool()) + removeBackRef(*(block->getBackRefIdx())); + extMemPool.backend.putSlabBlock(block); + } +} + +bool ExtMemoryPool::init(intptr_t poolId, rawAllocType rawAlloc, + rawFreeType rawFree, size_t granularity, + bool keepAllMemory, bool fixedPool) +{ + this->poolId = poolId; + this->rawAlloc = rawAlloc; + this->rawFree = rawFree; + this->granularity = granularity; + this->keepAllMemory = keepAllMemory; + this->fixedPool = fixedPool; + this->delayRegsReleasing = false; + initTLS(); + // allocate initial region for user's objects placement + return backend.bootstrap(this); +} + +void ExtMemoryPool::initTLS() { new (&tlsPointerKey) TLSKey(); } + +bool MemoryPool::init(intptr_t poolId, const MemPoolPolicy *policy) +{ + if (!extMemPool.init(poolId, policy->pAlloc, policy->pFree, + policy->granularity? policy->granularity : defaultGranularity, + policy->keepAllMemory, policy->fixedPool)) + return false; + { + MallocMutex::scoped_lock lock(memPoolListLock); + next = defaultMemPool->next; + defaultMemPool->next = this; + prev = defaultMemPool; + if (next) + next->prev = this; + } + return true; +} + +void MemoryPool::reset() +{ + // memory is not releasing during pool reset + // TODO: mark regions to release unused on next reset() + extMemPool.delayRegionsReleasing(true); + + bootStrapBlocks.reset(); + orphanedBlocks.reset(); + extMemPool.reset(); + + extMemPool.initTLS(); + extMemPool.delayRegionsReleasing(false); +} + +void MemoryPool::destroy() +{ + { + MallocMutex::scoped_lock lock(memPoolListLock); + // remove itself from global pool list + if (prev) + prev->next = next; + if (next) + next->prev = prev; + } + // slab blocks in non-default pool do not have backreferencies, + // only large objects do + for (LargeMemoryBlock *lmb = extMemPool.lmbList.getHead(); lmb; ) { + LargeMemoryBlock *next = lmb->gNext; + if (extMemPool.userPool()) + removeBackRef(lmb->backRefIdx); + lmb = next; + } + extMemPool.destroy(); +} + +void MemoryPool::processThreadShutdown(TLSData *tlsData) +{ + tlsData->release(this); + bootStrapBlocks.free(tlsData); + clearTLS(); +} + +void Bin::verifyTLSBin (size_t size) const +{ + suppress_unused_warning(size); +#if MALLOC_DEBUG +/* The debug version verifies the TLSBin as needed */ + uint32_t objSize = getObjectSize(size); + + if (activeBlk) { + MALLOC_ASSERT( activeBlk->owner.own(), ASSERT_TEXT ); + MALLOC_ASSERT( activeBlk->objectSize == objSize, ASSERT_TEXT ); +#if MALLOC_DEBUG>1 + for (Block* temp = activeBlk->next; temp; temp=temp->next) { + MALLOC_ASSERT( temp!=activeBlk, ASSERT_TEXT ); + MALLOC_ASSERT( temp->owner.own(), ASSERT_TEXT ); + MALLOC_ASSERT( temp->objectSize == objSize, ASSERT_TEXT ); + MALLOC_ASSERT( temp->previous->next == temp, ASSERT_TEXT ); + if (temp->next) { + MALLOC_ASSERT( temp->next->previous == temp, ASSERT_TEXT ); + } + } + for (Block* temp = activeBlk->previous; temp; temp=temp->previous) { + MALLOC_ASSERT( temp!=activeBlk, ASSERT_TEXT ); + MALLOC_ASSERT( temp->owner.own(), ASSERT_TEXT ); + MALLOC_ASSERT( temp->objectSize == objSize, ASSERT_TEXT ); + MALLOC_ASSERT( temp->next->previous == temp, ASSERT_TEXT ); + if (temp->previous) { + MALLOC_ASSERT( temp->previous->next == temp, ASSERT_TEXT ); + } + } +#endif /* MALLOC_DEBUG>1 */ + } +#endif /* MALLOC_DEBUG */ +} + +/* + * Add a block to the start of this tls bin list. + */ +void Bin::pushTLSBin(Block* block) +{ + /* The objectSize should be defined and not a parameter + because the function is applied to partially filled blocks as well */ + unsigned int size = block->objectSize; + + MALLOC_ASSERT( block->owner == ThreadId::get(), ASSERT_TEXT ); + MALLOC_ASSERT( block->objectSize != 0, ASSERT_TEXT ); + MALLOC_ASSERT( block->next == NULL, ASSERT_TEXT ); + MALLOC_ASSERT( block->previous == NULL, ASSERT_TEXT ); + + MALLOC_ASSERT( this, ASSERT_TEXT ); + verifyTLSBin(size); + + block->next = activeBlk; + if( activeBlk ) { + block->previous = activeBlk->previous; + activeBlk->previous = block; + if( block->previous ) + block->previous->next = block; + } else { + activeBlk = block; + } + + verifyTLSBin(size); +} + +/* + * Take a block out of its tls bin (e.g. before removal). + */ +void Bin::outofTLSBin(Block* block) +{ + unsigned int size = block->objectSize; + + MALLOC_ASSERT( block->owner == ThreadId::get(), ASSERT_TEXT ); + MALLOC_ASSERT( block->objectSize != 0, ASSERT_TEXT ); + + MALLOC_ASSERT( this, ASSERT_TEXT ); + verifyTLSBin(size); + + if (block == activeBlk) { + activeBlk = block->previous? block->previous : block->next; + } + /* Delink the block */ + if (block->previous) { + MALLOC_ASSERT( block->previous->next == block, ASSERT_TEXT ); + block->previous->next = block->next; + } + if (block->next) { + MALLOC_ASSERT( block->next->previous == block, ASSERT_TEXT ); + block->next->previous = block->previous; + } + block->next = NULL; + block->previous = NULL; + + verifyTLSBin(size); +} + +Block* Bin::getPublicFreeListBlock() +{ + Block* block; + MALLOC_ASSERT( this, ASSERT_TEXT ); + // if this method is called, active block usage must be unsuccesful + MALLOC_ASSERT( !activeBlk && !mailbox || activeBlk && activeBlk->isFull, ASSERT_TEXT ); + +// the counter should be changed STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList); + { + MallocMutex::scoped_lock scoped_cs(mailLock); + block = mailbox; + if( block ) { + MALLOC_ASSERT( block->ownBlock(), ASSERT_TEXT ); + MALLOC_ASSERT( !isNotForUse(block->nextPrivatizable), ASSERT_TEXT ); + mailbox = block->nextPrivatizable; + block->nextPrivatizable = (Block*) this; + } + } + if( block ) { + MALLOC_ASSERT( isSolidPtr(block->publicFreeList), ASSERT_TEXT ); + block->privatizePublicFreeList(); + } + return block; +} + +bool Block::emptyEnoughToUse() +{ + const float threshold = (slabSize - sizeof(Block)) * (1-emptyEnoughRatio); + + if (bumpPtr) { + /* If we are still using a bump ptr for this block it is empty enough to use. */ + STAT_increment(owner, getIndex(objectSize), examineEmptyEnough); + isFull = false; + return 1; + } + + /* allocatedCount shows how many objects in the block are in use; however it still counts + blocks freed by other threads; so prior call to privatizePublicFreeList() is recommended */ + isFull = (allocatedCount*objectSize > threshold)? true: false; +#if COLLECT_STATISTICS + if (isFull) + STAT_increment(owner, getIndex(objectSize), examineNotEmpty); + else + STAT_increment(owner, getIndex(objectSize), examineEmptyEnough); +#endif + return !isFull; +} + +/* Restore the bump pointer for an empty block that is planned to use */ +void Block::restoreBumpPtr() +{ + MALLOC_ASSERT( allocatedCount == 0, ASSERT_TEXT ); + MALLOC_ASSERT( publicFreeList == NULL, ASSERT_TEXT ); + STAT_increment(owner, getIndex(objectSize), freeRestoreBumpPtr); + bumpPtr = (FreeObject *)((uintptr_t)this + slabSize - objectSize); + freeList = NULL; + isFull = 0; +} + +void Block::freeOwnObject(MemoryPool *memPool, TLSData *tls, void *object) +{ + allocatedCount--; + MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT ); +#if COLLECT_STATISTICS + if (getActiveBlock(memPool->getAllocationBin(block->objectSize)) != block) + STAT_increment(myTid, getIndex(block->objectSize), freeToInactiveBlock); + else + STAT_increment(myTid, getIndex(block->objectSize), freeToActiveBlock); +#endif + if (allocatedCount==0 && publicFreeList==NULL) { + // The bump pointer is about to be restored for the block, + // no need to find objectToFree here (this is costly). + + // if the last object of a slab is freed, the slab cannot be marked full + MALLOC_ASSERT(!isFull, ASSERT_TEXT); + memPool->getAllocationBin(tls, objectSize)-> + processLessUsedBlock(memPool, this); + } else { + FreeObject *objectToFree = findObjectToFree(object); + objectToFree->next = freeList; + freeList = objectToFree; + + if (isFull) { + if (emptyEnoughToUse()) + memPool->getAllocationBin(tls, objectSize)->moveBlockToBinFront(this); + } + } +} + +void Block::freePublicObject (FreeObject *objectToFree) +{ + FreeObject *localPublicFreeList; + + MALLOC_ITT_SYNC_RELEASING(&publicFreeList); +#if FREELIST_NONBLOCKING + FreeObject *temp = publicFreeList; + do { + localPublicFreeList = objectToFree->next = temp; + temp = (FreeObject*)AtomicCompareExchange( + (intptr_t&)publicFreeList, + (intptr_t)objectToFree, (intptr_t)localPublicFreeList ); + // no backoff necessary because trying to make change, not waiting for a change + } while( temp != localPublicFreeList ); +#else + STAT_increment(getThreadId(), ThreadCommonCounters, lockPublicFreeList); + { + MallocMutex::scoped_lock scoped_cs(publicFreeListLock); + localPublicFreeList = objectToFree->next = publicFreeList; + publicFreeList = objectToFree; + } +#endif + + if( localPublicFreeList==NULL ) { + // if the block is abandoned, its nextPrivatizable pointer should be UNUSABLE + // otherwise, it should point to the bin the block belongs to. + // reading nextPrivatizable is thread-safe below, because: + // 1) the executing thread atomically got localPublicFreeList==NULL and changed it to non-NULL; + // 2) only owning thread can change it back to NULL, + // 3) but it can not be done until the block is put to the mailbox + // So the executing thread is now the only one that can change nextPrivatizable + if( !isNotForUse(nextPrivatizable) ) { + MALLOC_ASSERT( nextPrivatizable!=NULL, ASSERT_TEXT ); + MALLOC_ASSERT( owner.defined(), ASSERT_TEXT ); + Bin* theBin = (Bin*) nextPrivatizable; + MallocMutex::scoped_lock scoped_cs(theBin->mailLock); + nextPrivatizable = theBin->mailbox; + theBin->mailbox = this; + } else { + MALLOC_ASSERT( !owner.defined(), ASSERT_TEXT ); + } + } + STAT_increment(ThreadId::get(), ThreadCommonCounters, freeToOtherThread); + STAT_increment(owner, getIndex(objectSize), freeByOtherThread); +} + +void Block::privatizePublicFreeList() +{ + FreeObject *temp, *localPublicFreeList; + + MALLOC_ASSERT( owner.own(), ASSERT_TEXT ); +#if FREELIST_NONBLOCKING + temp = publicFreeList; + do { + localPublicFreeList = temp; + temp = (FreeObject*)AtomicCompareExchange( + (intptr_t&)publicFreeList, + 0, (intptr_t)localPublicFreeList); + // no backoff necessary because trying to make change, not waiting for a change + } while( temp != localPublicFreeList ); +#else + STAT_increment(owner, ThreadCommonCounters, lockPublicFreeList); + { + MallocMutex::scoped_lock scoped_cs(publicFreeListLock); + localPublicFreeList = publicFreeList; + publicFreeList = NULL; + } + temp = localPublicFreeList; +#endif + MALLOC_ITT_SYNC_ACQUIRED(&publicFreeList); + + MALLOC_ASSERT( localPublicFreeList && localPublicFreeList==temp, ASSERT_TEXT ); // there should be something in publicFreeList! + if( !isNotForUse(temp) ) { // return/getPartialBlock could set it to UNUSABLE + MALLOC_ASSERT( allocatedCount <= (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT ); + /* other threads did not change the counter freeing our blocks */ + allocatedCount--; + while( isSolidPtr(temp->next) ){ // the list will end with either NULL or UNUSABLE + temp = temp->next; + allocatedCount--; + } + MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT ); + /* merge with local freeList */ + temp->next = freeList; + freeList = localPublicFreeList; + STAT_increment(owner, getIndex(objectSize), allocPrivatized); + } +} + +void Block::privatizeOrphaned(Bin* bin) +{ + next = NULL; + previous = NULL; + MALLOC_ASSERT( publicFreeList!=NULL, ASSERT_TEXT ); + /* There is not a race here since no other thread owns this block */ + MALLOC_ASSERT( !owner.defined(), ASSERT_TEXT ); + owner = ThreadId::get(); + MALLOC_ASSERT(orphaned, ASSERT_TEXT); + orphaned = false; + // It is safe to change nextPrivatizable, as publicFreeList is not null + MALLOC_ASSERT( isNotForUse(nextPrivatizable), ASSERT_TEXT ); + nextPrivatizable = (Block*)bin; + // the next call is required to change publicFreeList to 0 + privatizePublicFreeList(); + if( allocatedCount ) { + emptyEnoughToUse(); // check its fullness and set result->isFull + } else { + restoreBumpPtr(); + } + MALLOC_ASSERT( !isNotForUse(publicFreeList), ASSERT_TEXT ); +} + +void Block::shareOrphaned(const Bin *bin) +{ + MALLOC_ASSERT( bin, ASSERT_TEXT ); + STAT_increment(owner, index, freeBlockPublic); + MALLOC_ASSERT(!orphaned, ASSERT_TEXT); + orphaned = true; + // need to set publicFreeList to non-zero, so other threads + // will not change nextPrivatizable and it can be zeroed. + if ((intptr_t)nextPrivatizable==(intptr_t)bin) { + void* oldval; +#if FREELIST_NONBLOCKING + oldval = (void*)AtomicCompareExchange((intptr_t&)publicFreeList, (intptr_t)UNUSABLE, 0); +#else + STAT_increment(owner, ThreadCommonCounters, lockPublicFreeList); + { + MallocMutex::scoped_lock scoped_cs(publicFreeListLock); + if ( (oldval=publicFreeList)==NULL ) + (uintptr_t&)(publicFreeList) = UNUSABLE; + } +#endif + if ( oldval!=NULL ) { + // another thread freed an object; we need to wait until it finishes. + // I believe there is no need for exponential backoff, as the wait here is not for a lock; + // but need to yield, so the thread we wait has a chance to run. + int count = 256; + while( (intptr_t)const_cast<Block* volatile &>(nextPrivatizable)==(intptr_t)bin ) { + if (--count==0) { + do_yield(); + count = 256; + } + } + } + } else { + MALLOC_ASSERT( isSolidPtr(publicFreeList), ASSERT_TEXT ); + } + MALLOC_ASSERT( publicFreeList!=NULL, ASSERT_TEXT ); + // now it is safe to change our data + previous = NULL; + owner.undef(); + // it is caller responsibility to ensure that the list of blocks + // formed by nextPrivatizable pointers is kept consistent if required. + // if only called from thread shutdown code, it does not matter. + (uintptr_t&)(nextPrivatizable) = UNUSABLE; +} + +void Block::cleanBlockHeader() +{ + next = NULL; + previous = NULL; + freeList = NULL; + allocatedCount = 0; + isFull = 0; + orphaned = false; + + publicFreeList = NULL; +} + +void Block::initEmptyBlock(Bin* tlsBin, size_t size) +{ + // Having getIndex and getObjectSize called next to each other + // allows better compiler optimization as they basically share the code. + unsigned int index = getIndex(size); + unsigned int objSz = getObjectSize(size); + + cleanBlockHeader(); + objectSize = objSz; + owner = ThreadId::get(); + // bump pointer should be prepared for first allocation - thus mode it down to objectSize + bumpPtr = (FreeObject *)((uintptr_t)this + slabSize - objectSize); + + // each block should have the address where the head of the list of "privatizable" blocks is kept + // the only exception is a block for boot strap which is initialized when TLS is yet NULL + nextPrivatizable = tlsBin? (Block*)(tlsBin + index) : NULL; + TRACEF(( "[ScalableMalloc trace] Empty block %p is initialized, owner is %d, objectSize is %d, bumpPtr is %p\n", + this, owner, objectSize, bumpPtr )); +} + +Block *OrphanedBlocks::get(Bin* bin, unsigned int size) +{ + Block *result; + MALLOC_ASSERT( bin, ASSERT_TEXT ); + unsigned int index = getIndex(size); + result = bins[index].pop(); + if (result) { + MALLOC_ITT_SYNC_ACQUIRED(bins+index); + result->privatizeOrphaned(bin); + STAT_increment(result->owner, index, allocBlockPublic); + } + return result; +} + +void OrphanedBlocks::put(Bin* bin, Block *block) +{ + unsigned int index = getIndex(block->getSize()); + block->shareOrphaned(bin); + MALLOC_ITT_SYNC_RELEASING(bins+index); + bins[index].push(block); +} + +void OrphanedBlocks::reset() +{ + for (uint32_t i=0; i<numBlockBinLimit; i++) + new (bins+i) LifoList(); +} + +void FreeBlockPool::insertBlock(Block *block) +{ + size++; + block->next = head; + head = block; + if (!tail) + tail = block; +} + +FreeBlockPool::ResOfGet FreeBlockPool::getBlock() +{ + Block *b = head; + + if (head) { + size--; + head = head->next; + if (!head) + tail = NULL; + lastAccessMiss = false; + } else + lastAccessMiss = true; + + return ResOfGet(b, lastAccessMiss); +} + +void FreeBlockPool::returnBlock(Block *block) +{ + MALLOC_ASSERT( size <= POOL_HIGH_MARK, ASSERT_TEXT ); + if (size == POOL_HIGH_MARK) { + // release cold blocks and add hot one + Block *headToFree = head, + *helper; + for (int i=0; i<POOL_LOW_MARK-2; i++) + headToFree = headToFree->next; + tail = headToFree; + headToFree = headToFree->next; + tail->next = NULL; + size = POOL_LOW_MARK-1; + // slab blocks from user pools not have valid backreference + for (Block *currBl = headToFree; currBl; currBl = helper) { + helper = currBl->next; + if (!backend->inUserPool()) + removeBackRef(currBl->backRefIdx); + backend->putSlabBlock(currBl); + } + } + insertBlock(block); +} + +bool FreeBlockPool::releaseAllBlocks() +{ + Block *helper; + bool nonEmpty = size; + + for (Block *currBl = head; currBl; currBl=helper) { + helper = currBl->next; + // slab blocks in user's pools not have valid backRefIdx + if (!backend->inUserPool()) + removeBackRef(currBl->backRefIdx); + backend->putSlabBlock(currBl); + } + head = tail = NULL; + size = 0; + + return nonEmpty; +} + +/* We have a block give it back to the malloc block manager */ +void Block::makeEmpty() +{ + // it is caller's responsibility to ensure no data is lost before calling this + MALLOC_ASSERT( allocatedCount==0, ASSERT_TEXT ); + MALLOC_ASSERT( publicFreeList==NULL, ASSERT_TEXT ); + STAT_increment(owner, getIndex(objectSize), freeBlockBack); + + cleanBlockHeader(); + + nextPrivatizable = NULL; + + objectSize = 0; + owner.invalid(); + // for an empty block, bump pointer should point right after the end of the block + bumpPtr = (FreeObject *)((uintptr_t)this + slabSize); +} + +inline void Bin::setActiveBlock (Block *block) +{ +// MALLOC_ASSERT( bin, ASSERT_TEXT ); + MALLOC_ASSERT( block->owner.own(), ASSERT_TEXT ); + // it is the caller responsibility to keep bin consistence (i.e. ensure this block is in the bin list) + activeBlk = block; +} + +inline Block* Bin::setPreviousBlockActive() +{ + MALLOC_ASSERT( activeBlk, ASSERT_TEXT ); + Block* temp = activeBlk->previous; + if( temp ) { + MALLOC_ASSERT( temp->isFull == 0, ASSERT_TEXT ); + activeBlk = temp; + } + return temp; +} + +FreeObject *Block::findObjectToFree(void *object) const +{ + FreeObject *objectToFree; + // Due to aligned allocations, a pointer passed to scalable_free + // might differ from the address of internally allocated object. + // Small objects however should always be fine. + if (objectSize <= maxSegregatedObjectSize) + objectToFree = (FreeObject*)object; + // "Fitting size" allocations are suspicious if aligned higher than naturally + else { + if ( ! isAligned(object,2*fittingAlignment) ) + // TODO: the above check is questionable - it gives false negatives in ~50% cases, + // so might even be slower in average than unconditional use of findAllocatedObject. + // here it should be a "real" object + objectToFree = (FreeObject*)object; + else + // here object can be an aligned address, so applying additional checks + objectToFree = findAllocatedObject(object); + MALLOC_ASSERT( isAligned(objectToFree,fittingAlignment), ASSERT_TEXT ); + } + MALLOC_ASSERT( isProperlyPlaced(objectToFree), ASSERT_TEXT ); + + return objectToFree; +} + +void TLSData::release(MemoryPool *mPool) +{ + lloc.clean(&mPool->extMemPool); + freeSlabBlocks.releaseAllBlocks(); + + for (unsigned index = 0; index < numBlockBins; index++) { + Block *activeBlk = bin[index].getActiveBlock(); + if (!activeBlk) + continue; + Block *threadlessBlock = activeBlk->previous; + while (threadlessBlock) { + Block *threadBlock = threadlessBlock->previous; + if (threadlessBlock->empty()) { + /* we destroy the thread, so not use its block pool */ + mPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false); + } else { + mPool->orphanedBlocks.put(bin+index, threadlessBlock); + } + threadlessBlock = threadBlock; + } + threadlessBlock = activeBlk; + while (threadlessBlock) { + Block *threadBlock = threadlessBlock->next; + if (threadlessBlock->empty()) { + /* we destroy the thread, so not use its block pool */ + mPool->returnEmptyBlock(threadlessBlock, /*poolTheBlock=*/false); + } else { + mPool->orphanedBlocks.put(bin+index, threadlessBlock); + } + threadlessBlock = threadBlock; + } + bin[index].resetActiveBlock(); + } +} + + +#if MALLOC_CHECK_RECURSION +// TODO: Use deducated heap for this + +/* + * It's a special kind of allocation that can be used when malloc is + * not available (either during startup or when malloc was already called and + * we are, say, inside pthread_setspecific's call). + * Block can contain objects of different sizes, + * allocations are performed by moving bump pointer and increasing of object counter, + * releasing is done via counter of objects allocated in the block + * or moving bump pointer if releasing object is on a bound. + */ + +class StartupBlock : public Block { + size_t availableSize() const { + return slabSize - ((uintptr_t)bumpPtr - (uintptr_t)this); + } + static StartupBlock *getBlock(); +public: + static FreeObject *allocate(size_t size); + static size_t msize(void *ptr) { return *((size_t*)ptr - 1); } + void free(void *ptr); +}; + +static MallocMutex startupMallocLock; +static StartupBlock *firstStartupBlock; + +StartupBlock *StartupBlock::getBlock() +{ + BackRefIdx backRefIdx = BackRefIdx::newBackRef(/*largeObj=*/false); + if (backRefIdx.isInvalid()) return NULL; + + StartupBlock *block = static_cast<StartupBlock*>( + defaultMemPool->extMemPool.backend.getSlabBlock(1)); + if (!block) return NULL; + + block->cleanBlockHeader(); + setBackRef(backRefIdx, block); + block->backRefIdx = backRefIdx; + // use startupAllocObjSizeMark to mark objects from startup block marker + block->objectSize = startupAllocObjSizeMark; + block->bumpPtr = (FreeObject *)((uintptr_t)block + sizeof(StartupBlock)); + return block; +} + +FreeObject *StartupBlock::allocate(size_t size) +{ + FreeObject *result; + StartupBlock *newBlock = NULL; + bool newBlockUnused = false; + + /* Objects must be aligned on their natural bounds, + and objects bigger than word on word's bound. */ + size = alignUp(size, sizeof(size_t)); + // We need size of an object to implement msize. + size_t reqSize = size + sizeof(size_t); + // speculatively allocates newBlock to try avoid allocation while holding lock + /* TODO: The function is called when malloc nested call is detected, + so simultaneous usage from different threads seems unlikely. + If pre-allocation is found useless, the code might be simplified. */ + if (!firstStartupBlock || firstStartupBlock->availableSize() < reqSize) { + newBlock = StartupBlock::getBlock(); + if (!newBlock) return NULL; + } + { + MallocMutex::scoped_lock scoped_cs(startupMallocLock); + // Re-check whether we need a new block (conditions might have changed) + if (!firstStartupBlock || firstStartupBlock->availableSize() < reqSize) { + if (!newBlock) { + newBlock = StartupBlock::getBlock(); + if (!newBlock) return NULL; + } + newBlock->next = (Block*)firstStartupBlock; + if (firstStartupBlock) + firstStartupBlock->previous = (Block*)newBlock; + firstStartupBlock = newBlock; + } else + newBlockUnused = true; + result = firstStartupBlock->bumpPtr; + firstStartupBlock->allocatedCount++; + firstStartupBlock->bumpPtr = + (FreeObject *)((uintptr_t)firstStartupBlock->bumpPtr + reqSize); + } + if (newBlock && newBlockUnused) + defaultMemPool->returnEmptyBlock(newBlock, /*poolTheBlock=*/false); + + // keep object size at the negative offset + *((size_t*)result) = size; + return (FreeObject*)((size_t*)result+1); +} + +void StartupBlock::free(void *ptr) +{ + Block* blockToRelease = NULL; + { + MallocMutex::scoped_lock scoped_cs(startupMallocLock); + + MALLOC_ASSERT(firstStartupBlock, ASSERT_TEXT); + MALLOC_ASSERT(startupAllocObjSizeMark==objectSize + && allocatedCount>0, ASSERT_TEXT); + MALLOC_ASSERT((uintptr_t)ptr>=(uintptr_t)this+sizeof(StartupBlock) + && (uintptr_t)ptr+StartupBlock::msize(ptr)<=(uintptr_t)this+slabSize, + ASSERT_TEXT); + if (0 == --allocatedCount) { + if (this == firstStartupBlock) + firstStartupBlock = (StartupBlock*)firstStartupBlock->next; + if (previous) + previous->next = next; + if (next) + next->previous = previous; + blockToRelease = this; + } else if ((uintptr_t)ptr + StartupBlock::msize(ptr) == (uintptr_t)bumpPtr) { + // last object in the block released + FreeObject *newBump = (FreeObject*)((size_t*)ptr - 1); + MALLOC_ASSERT((uintptr_t)newBump>(uintptr_t)this+sizeof(StartupBlock), + ASSERT_TEXT); + bumpPtr = newBump; + } + } + if (blockToRelease) { + blockToRelease->previous = blockToRelease->next = NULL; + defaultMemPool->returnEmptyBlock(blockToRelease, /*poolTheBlock=*/false); + } +} + +#endif /* MALLOC_CHECK_RECURSION */ + +/********* End thread related code *************/ + +/********* Library initialization *************/ + +//! Value indicating the state of initialization. +/* 0 = initialization not started. + * 1 = initialization started but not finished. + * 2 = initialization finished. + * In theory, we only need values 0 and 2. But value 1 is nonetheless + * useful for detecting errors in the double-check pattern. + */ +static intptr_t mallocInitialized; // implicitly initialized to 0 +static MallocMutex initMutex; + +#include "../tbb/tbb_version.h" + +/** The leading "\0" is here so that applying "strings" to the binary + delivers a clean result. */ +static char VersionString[] = "\0" TBBMALLOC_VERSION_STRINGS; + +#if _XBOX || __TBB_WIN8UI_SUPPORT +bool GetBoolEnvironmentVariable(const char *) { return false; } +#else +bool GetBoolEnvironmentVariable(const char *name) +{ + if( const char* s = getenv(name) ) + return strcmp(s,"0") != 0; + return false; +} +#endif + +void AllocControlledMode::initReadEnv(const char *envName, intptr_t defaultVal) +{ + if (!setDone) { +#if !_XBOX && !__TBB_WIN8UI_SUPPORT + const char *envVal = getenv(envName); + if (envVal && !strcmp(envVal, "1")) + val = 1; + else +#endif + val = defaultVal; + setDone = true; + } +} + +void MemoryPool::initDefaultPool() +{ + long long hugePageSize = 0; +#if __linux__ + if (FILE *f = fopen("/proc/meminfo", "r")) { + const int READ_BUF_SIZE = 100; + char buf[READ_BUF_SIZE]; + MALLOC_ASSERT(sizeof(hugePageSize) >= 8, + "At least 64 bits required for keeping page size/numbers."); + + while (fgets(buf, READ_BUF_SIZE, f)) { + if (1 == sscanf(buf, "Hugepagesize: %llu kB", &hugePageSize)) { + hugePageSize *= 1024; + break; + } + } + fclose(f); + } +#endif + hugePages.init(hugePageSize); +} + +inline bool isMallocInitialized() { + // Load must have acquire fence; otherwise thread taking "initialized" path + // might perform textually later loads *before* mallocInitialized becomes 2. + return 2 == FencedLoad(mallocInitialized); +} + +bool isMallocInitializedExt() { + return isMallocInitialized(); +} + +/* + * Allocator initialization routine; + * it is called lazily on the very first scalable_malloc call. + */ +static void initMemoryManager() +{ + TRACEF(( "[ScalableMalloc trace] sizeof(Block) is %d (expected 128); sizeof(uintptr_t) is %d\n", + sizeof(Block), sizeof(uintptr_t) )); + MALLOC_ASSERT( 2*blockHeaderAlignment == sizeof(Block), ASSERT_TEXT ); + MALLOC_ASSERT( sizeof(FreeObject) == sizeof(void*), ASSERT_TEXT ); + + bool initOk = defaultMemPool-> + extMemPool.init(0, NULL, NULL, scalableMallocPoolGranularity, + /*keepAllMemory=*/false, /*fixedPool=*/false); +// TODO: add error handling, and on error do something better than exit(1) + if (!initOk || !initBackRefMaster(&defaultMemPool->extMemPool.backend)) { + fprintf (stderr, "The memory manager cannot access sufficient memory to initialize; exiting \n"); + exit(1); + } + ThreadId::init(); // Create keys for thread id + MemoryPool::initDefaultPool(); +#if COLLECT_STATISTICS + initStatisticsCollection(); +#endif +} + +//! Ensures that initMemoryManager() is called once and only once. +/** Does not return until initMemoryManager() has been completed by a thread. + There is no need to call this routine if mallocInitialized==2 . */ +static void doInitialization() +{ + MallocMutex::scoped_lock lock( initMutex ); + if (mallocInitialized!=2) { + MALLOC_ASSERT( mallocInitialized==0, ASSERT_TEXT ); + mallocInitialized = 1; + RecursiveMallocCallProtector scoped; + initMemoryManager(); +#ifdef MALLOC_EXTRA_INITIALIZATION + MALLOC_EXTRA_INITIALIZATION; +#endif +#if MALLOC_CHECK_RECURSION + RecursiveMallocCallProtector::detectNaiveOverload(); +#endif + MALLOC_ASSERT( mallocInitialized==1, ASSERT_TEXT ); + // Store must have release fence, otherwise mallocInitialized==2 + // might become remotely visible before side effects of + // initMemoryManager() become remotely visible. + FencedStore( mallocInitialized, 2 ); + if( GetBoolEnvironmentVariable("TBB_VERSION") ) { + fputs(VersionString+1,stderr); + hugePages.printStatus(); + } + } + /* It can't be 0 or I would have initialized it */ + MALLOC_ASSERT( mallocInitialized==2, ASSERT_TEXT ); +} + +/********* End library initialization *************/ + +/********* The malloc show begins *************/ + + +FreeObject *Block::allocateFromFreeList() +{ + FreeObject *result; + + if (!freeList) return NULL; + + result = freeList; + MALLOC_ASSERT( result, ASSERT_TEXT ); + + freeList = result->next; + MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT ); + allocatedCount++; + STAT_increment(owner, getIndex(objectSize), allocFreeListUsed); + + return result; +} + +FreeObject *Block::allocateFromBumpPtr() +{ + FreeObject *result = bumpPtr; + if (result) { + bumpPtr = (FreeObject *) ((uintptr_t) bumpPtr - objectSize); + if ( (uintptr_t)bumpPtr < (uintptr_t)this+sizeof(Block) ) { + bumpPtr = NULL; + } + MALLOC_ASSERT( allocatedCount < (slabSize-sizeof(Block))/objectSize, ASSERT_TEXT ); + allocatedCount++; + STAT_increment(owner, getIndex(objectSize), allocBumpPtrUsed); + } + return result; +} + +inline FreeObject* Block::allocate() +{ + MALLOC_ASSERT( owner.own(), ASSERT_TEXT ); + + /* for better cache locality, first looking in the free list. */ + if ( FreeObject *result = allocateFromFreeList() ) { + return result; + } + MALLOC_ASSERT( !freeList, ASSERT_TEXT ); + + /* if free list is empty, try thread local bump pointer allocation. */ + if ( FreeObject *result = allocateFromBumpPtr() ) { + return result; + } + MALLOC_ASSERT( !bumpPtr, ASSERT_TEXT ); + + /* the block is considered full. */ + isFull = 1; + return NULL; +} + +void Bin::moveBlockToBinFront(Block *block) +{ + /* move the block to the front of the bin */ + if (block == activeBlk) return; + outofTLSBin(block); + pushTLSBin(block); +} + +void Bin::processLessUsedBlock(MemoryPool *memPool, Block *block) +{ + if (block != activeBlk) { + /* We are not actively using this block; return it to the general block pool */ + outofTLSBin(block); + memPool->returnEmptyBlock(block, /*poolTheBlock=*/true); + } else { + /* all objects are free - let's restore the bump pointer */ + block->restoreBumpPtr(); + } +} + +template<int LOW_MARK, int HIGH_MARK> +bool LocalLOC<LOW_MARK, HIGH_MARK>::put(LargeMemoryBlock *object, ExtMemoryPool *extMemPool) +{ + const size_t size = object->unalignedSize; + if (size > MAX_TOTAL_SIZE) + return false; + + totalSize += size; + object->prev = NULL; + object->next = head; + if (head) head->prev = object; + head = object; + if (!tail) tail = object; + numOfBlocks++; + MALLOC_ASSERT(!tail->next, ASSERT_TEXT); + // must meet both size and number of cached objects constrains + if (totalSize > MAX_TOTAL_SIZE || numOfBlocks >= HIGH_MARK) { + // scanning from tail until meet conditions + while (totalSize > MAX_TOTAL_SIZE || numOfBlocks > LOW_MARK) { + totalSize -= tail->unalignedSize; + numOfBlocks--; + tail = tail->prev; + } + LargeMemoryBlock *headToRelease = tail->next; + tail->next = NULL; + + extMemPool->freeLargeObjectList(headToRelease); + } + lastUsedOSCallsCnt = lastSeenOSCallsCnt; + return true; +} + +template<int LOW_MARK, int HIGH_MARK> +LargeMemoryBlock *LocalLOC<LOW_MARK, HIGH_MARK>::get(size_t size) +{ + if (lastUsedOSCallsCnt != lastSeenOSCallsCnt) + lastUsedOSCallsCnt = lastSeenOSCallsCnt; + + for (LargeMemoryBlock *curr = head; curr; curr=curr->next) { + if (curr->unalignedSize == size) { + LargeMemoryBlock *res = curr; + if (curr->next) + curr->next->prev = curr->prev; + else + tail = curr->prev; + if (curr->prev) + curr->prev->next = curr->next; + else + head = curr->next; + totalSize -= size; + numOfBlocks--; + return res; + } + } + return NULL; +} + +template<int LOW_MARK, int HIGH_MARK> +bool LocalLOC<LOW_MARK, HIGH_MARK>::clean(ExtMemoryPool *extMemPool) +{ + bool released = numOfBlocks; + + if (numOfBlocks) + extMemPool->freeLargeObjectList(head); + head = tail = NULL; + numOfBlocks = 0; + totalSize = 0; + return released; +} + +template<int LOW_MARK, int HIGH_MARK> +void LocalLOC<LOW_MARK, HIGH_MARK>::allocatorCalledHook(ExtMemoryPool *extMemPool) +{ + intptr_t currCnt = extMemPool->backend.askMemFromOSCounter.get(); + + // clean the cache iff there was OS memory request since last hook call + // and the cache was not touched since previous OS memory request + if (currCnt != lastSeenOSCallsCnt && lastUsedOSCallsCnt != lastSeenOSCallsCnt + && head) + clean(extMemPool); + lastSeenOSCallsCnt = currCnt; +} + +void *MemoryPool::getFromLLOCache(TLSData* tls, size_t size, size_t alignment) +{ + LargeMemoryBlock *lmb = NULL; + + size_t headersSize = sizeof(LargeMemoryBlock)+sizeof(LargeObjectHdr); + size_t allocationSize = LargeObjectCache::alignToBin(size+headersSize+alignment); + if (allocationSize < size) // allocationSize is wrapped around after alignToBin + return NULL; + + if (tls) + lmb = tls->lloc.get(allocationSize); + if (!lmb) + lmb = extMemPool.mallocLargeObject(allocationSize); + + if (lmb) { + void *alignedArea = (void*)alignUp((uintptr_t)lmb+headersSize, alignment); + LargeObjectHdr *header = (LargeObjectHdr*)alignedArea-1; + header->memoryBlock = lmb; + header->backRefIdx = lmb->backRefIdx; + setBackRef(header->backRefIdx, header); + + lmb->objectSize = size; + + MALLOC_ASSERT( isLargeObject(alignedArea), ASSERT_TEXT ); + + return alignedArea; + } + return NULL; +} + +void MemoryPool::putToLLOCache(TLSData *tls, void *object) +{ + LargeObjectHdr *header = (LargeObjectHdr*)object - 1; + // overwrite backRefIdx to simplify double free detection + header->backRefIdx = BackRefIdx(); + + if (!tls || !tls->lloc.put(header->memoryBlock, &extMemPool)) + extMemPool.freeLargeObject(header->memoryBlock); +} + +// called on each allocator call +void MemoryPool::allocatorCalledHook(TLSData *tls) +{ + // TODO: clean freeSlabBlocks as well + tls->lloc.allocatorCalledHook(&extMemPool); +} + +#if USE_PTHREAD && (__TBB_SOURCE_DIRECTLY_INCLUDED || __TBB_USE_DLOPEN_REENTRANCY_WORKAROUND) + +/* Decrease race interval between dynamic library unloading and pthread key + destructor. Protect only Pthreads with supported unloading. */ +class ShutdownSync { +/* flag is the number of threads in pthread key dtor body + (i.e., between threadDtorStart() and threadDtorDone()) + or the signal to skip dtor, if flag < 0 */ + intptr_t flag; + static const intptr_t skipDtor = INTPTR_MIN/2; +public: +/* Suppose that 2*abs(skipDtor) or more threads never call threadExitStart() + simultaneously, so flag is never becomes negative because of that. */ + bool threadDtorStart() { + if (flag < 0) + return false; + if (AtomicIncrement(flag) <= 0) { // note that new value returned + AtomicAdd(flag, -1); // flag is spoiled by us, restore it + return false; + } + return true; + } + void threadDtorDone() { + AtomicAdd(flag, -1); + } + void processExit() { + if (AtomicAdd(flag, skipDtor) != 0) + SpinWaitUntilEq(flag, skipDtor); + } +}; + +#else + +class ShutdownSync { +public: + bool threadDtorStart() { return true; } + void threadDtorDone() { } + void processExit() { } +}; + +#endif // USE_PTHREAD && (__TBB_SOURCE_DIRECTLY_INCLUDED || __TBB_USE_DLOPEN_REENTRANCY_WORKAROUND) + +static ShutdownSync shutdownSync; + +/* + * All aligned allocations fall into one of the following categories: + * 1. if both request size and alignment are <= maxSegregatedObjectSize, + * we just align the size up, and request this amount, because for every size + * aligned to some power of 2, the allocated object is at least that aligned. + * 2. for size<minLargeObjectSize, check if already guaranteed fittingAlignment is enough. + * 3. if size+alignment<minLargeObjectSize, we take an object of fittingSizeN and align + * its address up; given such pointer, scalable_free could find the real object. + * Wrapping of size+alignment is impossible because maximal allowed + * alignment plus minLargeObjectSize can't lead to wrapping. + * 4. otherwise, aligned large object is allocated. + */ +static void *allocateAligned(MemoryPool *memPool, size_t size, size_t alignment) +{ + MALLOC_ASSERT( isPowerOfTwo(alignment), ASSERT_TEXT ); + + if (!isMallocInitialized()) doInitialization(); + + void *result; + if (size<=maxSegregatedObjectSize && alignment<=maxSegregatedObjectSize) + result = internalPoolMalloc(memPool, alignUp(size? size: sizeof(size_t), alignment)); + else if (size<minLargeObjectSize) { + if (alignment<=fittingAlignment) + result = internalPoolMalloc(memPool, size); + else if (size+alignment < minLargeObjectSize) { + void *unaligned = internalPoolMalloc(memPool, size+alignment); + if (!unaligned) return NULL; + result = alignUp(unaligned, alignment); + } else + goto LargeObjAlloc; + } else { + LargeObjAlloc: + /* This can be the first allocation call. */ + if (!isMallocInitialized()) + doInitialization(); + TLSData *tls = memPool->getTLS(/*create=*/true); + memPool->allocatorCalledHook(tls); + // take into account only alignment that are higher then natural + result = + memPool->getFromLLOCache(tls, size, largeObjectAlignment>alignment? + largeObjectAlignment: alignment); + } + + MALLOC_ASSERT( isAligned(result, alignment), ASSERT_TEXT ); + return result; +} + +static void *reallocAligned(MemoryPool *memPool, void *ptr, + size_t size, size_t alignment = 0) +{ + void *result; + size_t copySize; + + if (isLargeObject(ptr)) { + LargeMemoryBlock* lmb = ((LargeObjectHdr *)ptr - 1)->memoryBlock; + copySize = lmb->unalignedSize-((uintptr_t)ptr-(uintptr_t)lmb); + if (size <= copySize && (0==alignment || isAligned(ptr, alignment))) { + lmb->objectSize = size; + return ptr; + } else { + copySize = lmb->objectSize; + result = alignment ? allocateAligned(memPool, size, alignment) : + internalPoolMalloc(memPool, size); + } + } else { + Block* block = (Block *)alignDown(ptr, slabSize); + copySize = block->getSize(); + if (size <= copySize && (0==alignment || isAligned(ptr, alignment))) { + return ptr; + } else { + result = alignment ? allocateAligned(memPool, size, alignment) : + internalPoolMalloc(memPool, size); + } + } + if (result) { + memcpy(result, ptr, copySize<size? copySize: size); + internalPoolFree(memPool, ptr); + } + return result; +} + +/* A predicate checks if an object is properly placed inside its block */ +inline bool Block::isProperlyPlaced(const void *object) const +{ + return 0 == ((uintptr_t)this + slabSize - (uintptr_t)object) % objectSize; +} + +/* Finds the real object inside the block */ +FreeObject *Block::findAllocatedObject(const void *address) const +{ + // calculate offset from the end of the block space + uint16_t offset = (uintptr_t)this + slabSize - (uintptr_t)address; + MALLOC_ASSERT( offset<=slabSize-sizeof(Block), ASSERT_TEXT ); + // find offset difference from a multiple of allocation size + offset %= objectSize; + // and move the address down to where the real object starts. + return (FreeObject*)((uintptr_t)address - (offset? objectSize-offset: 0)); +} + +/* + * Bad dereference caused by a foreign pointer is possible only here, not earlier in call chain. + * Separate function isolates SEH code, as it has bad influence on compiler optimization. + */ +static inline BackRefIdx safer_dereference (const BackRefIdx *ptr) +{ + BackRefIdx id; +#if _MSC_VER + __try { +#endif + id = *ptr; +#if _MSC_VER + } __except( GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION? + EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH ) { + id = BackRefIdx(); + } +#endif + return id; +} + +bool isLargeObject(void *object) +{ + if (!isAligned(object, largeObjectAlignment)) + return false; + LargeObjectHdr *header = (LargeObjectHdr*)object - 1; + BackRefIdx idx = safer_dereference(&header->backRefIdx); + + return idx.isLargeObject() + // in valid LargeObjectHdr memoryBlock points somewhere before header + // TODO: more strict check + && (uintptr_t)header->memoryBlock < (uintptr_t)header + && getBackRef(idx) == header; +} + +static inline bool isSmallObject (void *ptr) +{ + void* expected = alignDown(ptr, slabSize); + const BackRefIdx* idx = ((Block*)expected)->getBackRef(); + + return expected == getBackRef(safer_dereference(idx)); +} + +/**** Check if an object was allocated by scalable_malloc ****/ +static inline bool isRecognized (void* ptr) +{ + return isLargeObject(ptr) || isSmallObject(ptr); +} + +static inline void freeSmallObject(MemoryPool *memPool, TLSData *tls, void *object) +{ + /* mask low bits to get the block */ + Block *block = (Block *)alignDown(object, slabSize); + MALLOC_ASSERT( block->checkFreePrecond(object), + "Possible double free or heap corruption." ); + +#if MALLOC_CHECK_RECURSION + if (block->isStartupAllocObject()) { + ((StartupBlock *)block)->free(object); + return; + } +#endif + if (block->ownBlock()) + block->freeOwnObject(memPool, tls, object); + else { /* Slower path to add to the shared list, the allocatedCount is updated by the owner thread in malloc. */ + FreeObject *objectToFree = block->findObjectToFree(object); + block->freePublicObject(objectToFree); + } +} + +static void *internalPoolMalloc(MemoryPool* memPool, size_t size) +{ + Bin* bin; + Block * mallocBlock; + + if (!memPool) return NULL; + + if (!size) size = sizeof(size_t); + + TLSData *tls = memPool->getTLS(/*create=*/true); + memPool->allocatorCalledHook(tls); + /* + * Use Large Object Allocation + */ + if (size >= minLargeObjectSize) + return memPool->getFromLLOCache(tls, size, largeObjectAlignment); + + /* + * Get an element in thread-local array corresponding to the given size; + * It keeps ptr to the active block for allocations of this size + */ + bin = memPool->getAllocationBin(tls, size); + if ( !bin ) return NULL; + + /* Get a block to try to allocate in. */ + for( mallocBlock = bin->getActiveBlock(); mallocBlock; + mallocBlock = bin->setPreviousBlockActive() ) // the previous block should be empty enough + { + if( FreeObject *result = mallocBlock->allocate() ) + return result; + } + + /* + * else privatize publicly freed objects in some block and allocate from it + */ + mallocBlock = bin->getPublicFreeListBlock(); + if (mallocBlock) { + if (mallocBlock->emptyEnoughToUse()) { + bin->moveBlockToBinFront(mallocBlock); + } + MALLOC_ASSERT( mallocBlock->freeListNonNull(), ASSERT_TEXT ); + if ( FreeObject *result = mallocBlock->allocateFromFreeList() ) + return result; + /* Else something strange happened, need to retry from the beginning; */ + TRACEF(( "[ScalableMalloc trace] Something is wrong: no objects in public free list; reentering.\n" )); + return internalPoolMalloc(memPool, size); + } + + /* + * no suitable own blocks, try to get a partial block that some other thread has discarded. + */ + mallocBlock = memPool->orphanedBlocks.get(bin, size); + while (mallocBlock) { + bin->pushTLSBin(mallocBlock); + bin->setActiveBlock(mallocBlock); // TODO: move under the below condition? + if( FreeObject *result = mallocBlock->allocate() ) + return result; + mallocBlock = memPool->orphanedBlocks.get(bin, size); + } + + /* + * else try to get a new empty block + */ + mallocBlock = memPool->getEmptyBlock(size); + if (mallocBlock) { + bin->pushTLSBin(mallocBlock); + bin->setActiveBlock(mallocBlock); + if( FreeObject *result = mallocBlock->allocate() ) + return result; + /* Else something strange happened, need to retry from the beginning; */ + TRACEF(( "[ScalableMalloc trace] Something is wrong: no objects in empty block; reentering.\n" )); + return internalPoolMalloc(memPool, size); + } + /* + * else nothing works so return NULL + */ + TRACEF(( "[ScalableMalloc trace] No memory found, returning NULL.\n" )); + return NULL; +} + +static bool internalPoolFree(MemoryPool *memPool, void *object) +{ + if (!memPool || !object) return false; + + // The library is initialized at allocation call, so releasing while + // not initialized means foreign object is releasing. + MALLOC_ASSERT(isMallocInitialized(), ASSERT_TEXT); + MALLOC_ASSERT(memPool->extMemPool.userPool() || isRecognized(object), + "Invalid pointer in pool_free detected."); + TLSData *tls = memPool->getTLS(/*create=*/false); + if (tls) memPool->allocatorCalledHook(tls); + + if (isLargeObject(object)) + memPool->putToLLOCache(tls, object); + else + freeSmallObject(memPool, tls, object); + return true; +} + +static void *internalMalloc(size_t size) +{ + if (!size) size = sizeof(size_t); + +#if MALLOC_CHECK_RECURSION + if (RecursiveMallocCallProtector::sameThreadActive()) + return size<minLargeObjectSize? StartupBlock::allocate(size) : + // nested allocation, so skip tls + (FreeObject*)defaultMemPool->getFromLLOCache(NULL, size, slabSize); +#endif + + if (!isMallocInitialized()) + doInitialization(); + + return internalPoolMalloc(defaultMemPool, size); +} + +static void internalFree(void *object) +{ + internalPoolFree(defaultMemPool, object); +} + +static size_t internalMsize(void* ptr) +{ + if (ptr) { + MALLOC_ASSERT(isRecognized(ptr), "Invalid pointer in scalable_msize detected."); + if (isLargeObject(ptr)) { + LargeMemoryBlock* lmb = ((LargeObjectHdr*)ptr - 1)->memoryBlock; + return lmb->objectSize; + } else { + Block* block = (Block *)alignDown(ptr, slabSize); +#if MALLOC_CHECK_RECURSION + size_t size = block->getSize()? block->getSize() : StartupBlock::msize(ptr); +#else + size_t size = block->getSize(); +#endif + MALLOC_ASSERT(size>0 && size<minLargeObjectSize, ASSERT_TEXT); + return size; + } + } + errno = EINVAL; + // Unlike _msize, return 0 in case of parameter error. + // Returning size_t(-1) looks more like the way to troubles. + return 0; +} + +} // namespace internal + +using namespace rml::internal; + +// legacy entry point saved for compatibility with binaries complied +// with pre-6003 versions of TBB +rml::MemoryPool *pool_create(intptr_t pool_id, const MemPoolPolicy *policy) +{ + rml::MemoryPool *pool; + MemPoolPolicy pol(policy->pAlloc, policy->pFree, policy->granularity); + + pool_create_v1(pool_id, &pol, &pool); + return pool; +} + +rml::MemPoolError pool_create_v1(intptr_t pool_id, const MemPoolPolicy *policy, + rml::MemoryPool **pool) +{ + if ( !policy->pAlloc || policy->version<MemPoolPolicy::TBBMALLOC_POOL_VERSION + // empty pFree allowed only for fixed pools + || !(policy->fixedPool || policy->pFree) ) { + *pool = NULL; + return INVALID_POLICY; + } + if ( policy->version>MemPoolPolicy::TBBMALLOC_POOL_VERSION // future versions are not supported + // new flags can be added in place of reserved, but default + // behaviour must be supported by this version + || policy->reserved ) { + *pool = NULL; + return UNSUPPORTED_POLICY; + } + if (!isMallocInitialized()) + doInitialization(); + + rml::internal::MemoryPool *memPool = + (rml::internal::MemoryPool*)internalMalloc((sizeof(rml::internal::MemoryPool))); + if (!memPool) { + *pool = NULL; + return NO_MEMORY; + } + memset(memPool, 0, sizeof(rml::internal::MemoryPool)); + if (!memPool->init(pool_id, policy)) { + internalFree(memPool); + *pool = NULL; + return NO_MEMORY; + } + + *pool = (rml::MemoryPool*)memPool; + return POOL_OK; +} + +bool pool_destroy(rml::MemoryPool* memPool) +{ + if (!memPool) return false; + ((rml::internal::MemoryPool*)memPool)->destroy(); + internalFree(memPool); + + return true; +} + +bool pool_reset(rml::MemoryPool* memPool) +{ + if (!memPool) return false; + + ((rml::internal::MemoryPool*)memPool)->reset(); + return true; +} + +void *pool_malloc(rml::MemoryPool* mPool, size_t size) +{ + return internalPoolMalloc((rml::internal::MemoryPool*)mPool, size); +} + +void *pool_realloc(rml::MemoryPool* mPool, void *object, size_t size) +{ + if (!object) + return internalPoolMalloc((rml::internal::MemoryPool*)mPool, size); + if (!size) { + internalPoolFree((rml::internal::MemoryPool*)mPool, object); + return NULL; + } + return reallocAligned((rml::internal::MemoryPool*)mPool, object, size, 0); +} + +void *pool_aligned_malloc(rml::MemoryPool* mPool, size_t size, size_t alignment) +{ + if (!isPowerOfTwo(alignment) || 0==size) + return NULL; + + return allocateAligned((rml::internal::MemoryPool*)mPool, size, alignment); +} + +void *pool_aligned_realloc(rml::MemoryPool* memPool, void *ptr, size_t size, size_t alignment) +{ + if (!isPowerOfTwo(alignment)) + return NULL; + rml::internal::MemoryPool *mPool = (rml::internal::MemoryPool*)memPool; + void *tmp; + + if (!ptr) + tmp = allocateAligned(mPool, size, alignment); + else if (!size) { + internalPoolFree(mPool, ptr); + return NULL; + } else + tmp = reallocAligned(mPool, ptr, size, alignment); + + return tmp; +} + +bool pool_free(rml::MemoryPool *mPool, void *object) +{ + return internalPoolFree((rml::internal::MemoryPool*)mPool, object); +} + +} // namespace rml + +using namespace rml::internal; + +#if MALLOC_TRACE +static unsigned int threadGoingDownCount = 0; +#endif + +/* + * When a thread is shutting down this routine should be called to remove all the thread ids + * from the malloc blocks and replace them with a NULL thread id. + * + * For pthreads, the function is set as a callback in pthread_key_create for TLS bin. + * For non-NULL keys it will be automatically called at thread exit with the key value + * as the argument. + * + * for Windows, it should be called directly e.g. from DllMain +*/ +void mallocThreadShutdownNotification(void* arg) +{ + // Check whether TLS has been initialized + if (!isMallocInitialized()) return; + + TRACEF(( "[ScalableMalloc trace] Thread id %d blocks return start %d\n", + getThreadId(), threadGoingDownCount++ )); +#if USE_WINTHREAD + suppress_unused_warning(arg); + MallocMutex::scoped_lock lock(MemoryPool::memPoolListLock); + // The routine is called once per thread, need to walk through all pools on Windows + for (MemoryPool *memPool = defaultMemPool; memPool; memPool = memPool->next) + if (TLSData *tls = memPool->getTLS(/*create=*/false)) + memPool->processThreadShutdown(tls); +#else + if (!shutdownSync.threadDtorStart()) return; + // The routine is called for each memPool, just need to get memPool from TLSData. + TLSData *tls = (TLSData*)arg; + tls->getMemPool()->processThreadShutdown(tls); + shutdownSync.threadDtorDone(); +#endif + + TRACEF(( "[ScalableMalloc trace] Thread id %d blocks return end\n", getThreadId() )); +} + +#if USE_WINTHREAD +extern "C" void __TBB_mallocThreadShutdownNotification() +{ + mallocThreadShutdownNotification(NULL); +} +#endif + +extern "C" void __TBB_mallocProcessShutdownNotification() +{ + if (!isMallocInitialized()) return; + +#if __TBB_MALLOC_LOCACHE_STAT + printf("cache hit ratio %f, size hit %f\n", + 1.*cacheHits/mallocCalls, 1.*memHitKB/memAllocKB); + defaultMemPool->extMemPool.loc.reportStat(stdout); +#endif + shutdownSync.processExit(); +#if __TBB_SOURCE_DIRECTLY_INCLUDED +/* Pthread keys must be deleted as soon as possible to not call key dtor + on thread termination when then the tbbmalloc code can be already unloaded. +*/ + defaultMemPool->destroy(); + destroyBackRefMaster(&defaultMemPool->extMemPool.backend); + ThreadId::destroy(); // Delete key for thread id +#elif __TBB_USE_DLOPEN_REENTRANCY_WORKAROUND +/* In most cases we prevent unloading tbbmalloc, and don't clean up memory + on process shutdown. When impossible to prevent, library unload results + in shutdown notification, and it makes sense to release unused memory + at that point (we can't release all memory because it's possible that + it will be accessed after this point). + TODO: better support systems where we can't prevent unloading by removing + pthread destructors and releasing caches. + */ + defaultMemPool->extMemPool.hardCachesCleanup(); +#endif // __TBB_SOURCE_DIRECTLY_INCLUDED + +#if COLLECT_STATISTICS + ThreadId nThreads = ThreadIdCount; + for( int i=1; i<=nThreads && i<MAX_THREADS; ++i ) + STAT_print(i); +#endif +} + +extern "C" void * scalable_malloc(size_t size) +{ + void *ptr = internalMalloc(size); + if (!ptr) errno = ENOMEM; + return ptr; +} + +extern "C" void scalable_free (void *object) { + internalFree(object); +} + +/* + * A variant that provides additional memory safety, by checking whether the given address + * was obtained with this allocator, and if not redirecting to the provided alternative call. + */ +extern "C" void safer_scalable_free (void *object, void (*original_free)(void*)) +{ + if (!object) + return; + + // must check 1st for large object, because small object check touches 4 pages on left, + // and it can be unaccessable + if (isLargeObject(object)) { + TLSData *tls = defaultMemPool->getTLS(/*create=*/false); + if (tls) defaultMemPool->allocatorCalledHook(tls); + + defaultMemPool->putToLLOCache(tls, object); + } else if (isSmallObject(object)) { + TLSData *tls = defaultMemPool->getTLS(/*create=*/false); + if (tls) defaultMemPool->allocatorCalledHook(tls); + + freeSmallObject(defaultMemPool, tls, object); + } else if (original_free) + original_free(object); +} + +/********* End the free code *************/ + +/********* Code for scalable_realloc ***********/ + +/* + * From K&R + * "realloc changes the size of the object pointed to by p to size. The contents will + * be unchanged up to the minimum of the old and the new sizes. If the new size is larger, + * the new space is uninitialized. realloc returns a pointer to the new space, or + * NULL if the request cannot be satisfied, in which case *p is unchanged." + * + */ +extern "C" void* scalable_realloc(void* ptr, size_t size) +{ + void *tmp; + + if (!ptr) + tmp = internalMalloc(size); + else if (!size) { + internalFree(ptr); + return NULL; + } else + tmp = reallocAligned(defaultMemPool, ptr, size, 0); + + if (!tmp) errno = ENOMEM; + return tmp; +} + +/* + * A variant that provides additional memory safety, by checking whether the given address + * was obtained with this allocator, and if not redirecting to the provided alternative call. + */ +extern "C" void* safer_scalable_realloc (void* ptr, size_t sz, void* original_realloc) +{ + void *tmp; // TODO: fix warnings about uninitialized use of tmp + + if (!ptr) { + tmp = internalMalloc(sz); + } else if (isRecognized(ptr)) { + if (!sz) { + internalFree(ptr); + return NULL; + } else { + tmp = reallocAligned(defaultMemPool, ptr, sz, 0); + } + } +#if USE_WINTHREAD + else if (original_realloc && sz) { + orig_ptrs *original_ptrs = static_cast<orig_ptrs*>(original_realloc); + if ( original_ptrs->orig_msize ){ + size_t oldSize = original_ptrs->orig_msize(ptr); + tmp = internalMalloc(sz); + if (tmp) { + memcpy(tmp, ptr, sz<oldSize? sz : oldSize); + if ( original_ptrs->orig_free ){ + original_ptrs->orig_free( ptr ); + } + } + } else + tmp = NULL; + } +#else + else if (original_realloc) { + typedef void* (*realloc_ptr_t)(void*,size_t); + realloc_ptr_t original_realloc_ptr; + (void *&)original_realloc_ptr = original_realloc; + tmp = original_realloc_ptr(ptr,sz); + } +#endif + else tmp = NULL; + + if (!tmp) errno = ENOMEM; + return tmp; +} + +/********* End code for scalable_realloc ***********/ + +/********* Code for scalable_calloc ***********/ + +/* + * From K&R + * calloc returns a pointer to space for an array of nobj objects, + * each of size size, or NULL if the request cannot be satisfied. + * The space is initialized to zero bytes. + * + */ + +extern "C" void * scalable_calloc(size_t nobj, size_t size) +{ + size_t arraySize = nobj * size; + void* result = internalMalloc(arraySize); + if (result) + memset(result, 0, arraySize); + else + errno = ENOMEM; + return result; +} + +/********* End code for scalable_calloc ***********/ + +/********* Code for aligned allocation API **********/ + +extern "C" int scalable_posix_memalign(void **memptr, size_t alignment, size_t size) +{ + if ( !isPowerOfTwoMultiple(alignment, sizeof(void*)) ) + return EINVAL; + void *result = allocateAligned(defaultMemPool, size, alignment); + if (!result) + return ENOMEM; + *memptr = result; + return 0; +} + +extern "C" void * scalable_aligned_malloc(size_t size, size_t alignment) +{ + if (!isPowerOfTwo(alignment) || 0==size) { + errno = EINVAL; + return NULL; + } + void *tmp = allocateAligned(defaultMemPool, size, alignment); + if (!tmp) errno = ENOMEM; + return tmp; +} + +extern "C" void * scalable_aligned_realloc(void *ptr, size_t size, size_t alignment) +{ + if (!isPowerOfTwo(alignment)) { + errno = EINVAL; + return NULL; + } + void *tmp; + + if (!ptr) + tmp = allocateAligned(defaultMemPool, size, alignment); + else if (!size) { + scalable_free(ptr); + return NULL; + } else + tmp = reallocAligned(defaultMemPool, ptr, size, alignment); + + if (!tmp) errno = ENOMEM; + return tmp; +} + +extern "C" void * safer_scalable_aligned_realloc(void *ptr, size_t size, size_t alignment, void* orig_function) +{ + /* corner cases left out of reallocAligned to not deal with errno there */ + if (!isPowerOfTwo(alignment)) { + errno = EINVAL; + return NULL; + } + void *tmp = NULL; + + if (!ptr) { + tmp = allocateAligned(defaultMemPool, size, alignment); + } else if (isRecognized(ptr)) { + if (!size) { + internalFree(ptr); + return NULL; + } else { + tmp = reallocAligned(defaultMemPool, ptr, size, alignment); + } + } +#if USE_WINTHREAD + else { + orig_ptrs *original_ptrs = static_cast<orig_ptrs*>(orig_function); + if (size) { + // Without orig_msize, we can't do anything with this. + // Just keeping old pointer. + if ( original_ptrs->orig_msize ){ + size_t oldSize = original_ptrs->orig_msize(ptr); + tmp = allocateAligned(defaultMemPool, size, alignment); + if (tmp) { + memcpy(tmp, ptr, size<oldSize? size : oldSize); + if ( original_ptrs->orig_free ){ + original_ptrs->orig_free( ptr ); + } + } + } + } else { + if ( original_ptrs->orig_free ){ + original_ptrs->orig_free( ptr ); + } + return NULL; + } + } +#else + // As original_realloc can't align result, and there is no way to find + // size of reallocating object, we are giving up. + suppress_unused_warning(orig_function); +#endif + if (!tmp) errno = ENOMEM; + return tmp; +} + +extern "C" void scalable_aligned_free(void *ptr) +{ + internalFree(ptr); +} + +/********* end code for aligned allocation API **********/ + +/********* Code for scalable_msize ***********/ + +/* + * Returns the size of a memory block allocated in the heap. + */ +extern "C" size_t scalable_msize(void* ptr) +{ + return internalMsize(ptr); +} + +/* + * A variant that provides additional memory safety, by checking whether the given address + * was obtained with this allocator, and if not redirecting to the provided alternative call. + */ +extern "C" size_t safer_scalable_msize (void *object, size_t (*original_msize)(void*)) +{ + if (object) { + // Check if the memory was allocated by scalable_malloc + if (isRecognized(object)) + return internalMsize(object); + else if (original_msize) + return original_msize(object); + } + // object is NULL or unknown + errno = EINVAL; + return 0; +} + +/********* End code for scalable_msize ***********/ + +extern "C" int scalable_allocation_mode(int param, intptr_t value) +{ +#if __linux__ + if (param == USE_HUGE_PAGES) + switch (value) { + case 0: + case 1: + hugePages.setMode(value); + return 0; + default: + return 1; + } +#else + suppress_unused_warning(param); + suppress_unused_warning(value); +#endif + return 1; +} diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/large_objects.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/large_objects.cpp new file mode 100644 index 0000000000..83798b0c77 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/large_objects.cpp @@ -0,0 +1,591 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbbmalloc_internal.h" + +/********* Allocation of large objects ************/ + + +namespace rml { +namespace internal { + +#if __TBB_MALLOC_LOCACHE_STAT +intptr_t mallocCalls, cacheHits; +intptr_t memAllocKB, memHitKB; +#endif + +inline bool lessThanWithOverflow(intptr_t a, intptr_t b) +{ + return (a < b && (b - a < UINTPTR_MAX/2)) || + (a > b && (a - b > UINTPTR_MAX/2)); +} + +template<typename Props> +LargeMemoryBlock *LargeObjectCacheImpl<Props>::CacheBin:: + putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *head, BinBitMask *bitMask, int idx) +{ + int i, num, totalNum; + size_t size = head->unalignedSize; + LargeMemoryBlock *curr, *tail, *toRelease = NULL; + uintptr_t currTime; + + // we not kept prev pointers during assigning blocks to bins, set them now + head->prev = NULL; + for (num=1, curr=head; curr->next; num++, curr=curr->next) + curr->next->prev = curr; + tail = curr; + totalNum = num; + + { + MallocMutex::scoped_lock scoped_cs(lock); + usedSize -= num*size; + // to keep ordering on list, get time under list lock + currTime = extMemPool->loc.getCurrTimeRange(num); + + for (curr=tail, i=0; curr; curr=curr->prev, i++) { + curr->age = currTime+i; + STAT_increment(getThreadId(), ThreadCommonCounters, cacheLargeBlk); + } + + if (!lastCleanedAge) { + // 1st object of such size was released. + // Not cache it, and remeber when this occurs + // to take into account during cache miss. + lastCleanedAge = tail->age; + toRelease = tail; + tail = tail->prev; + if (tail) + tail->next = NULL; + else + head = NULL; + num--; + } + if (num) { + // add [head;tail] list to cache + tail->next = first; + if (first) + first->prev = tail; + first = head; + if (!last) { + MALLOC_ASSERT(0 == oldest, ASSERT_TEXT); + oldest = tail->age; + last = tail; + } + + cachedSize += num*size; + } +/* It's accebtable, if a bin is empty, and we have non-empty in bit mask. + So set true in bitmask without lock. + It's not acceptable, if a bin is non-empty and we have empty in bitmask. + So set false in bitmask under lock. */ + + // No used object, and nothing in the bin, mark the bin as empty + if (!usedSize && !first) + bitMask->set(idx, false); + } + extMemPool->loc.cleanupCacheIfNeededOnRange(&extMemPool->backend, totalNum, currTime); + if (toRelease) + toRelease->prev = toRelease->next = NULL; + return toRelease; +} + +template<typename Props> +LargeMemoryBlock *LargeObjectCacheImpl<Props>::CacheBin:: + get(size_t size, uintptr_t currTime, bool *setNonEmpty) +{ + LargeMemoryBlock *result=NULL; + { + MallocMutex::scoped_lock scoped_cs(lock); + forgetOutdatedState(currTime); + + if (first) { + result = first; + first = result->next; + if (first) + first->prev = NULL; + else { + last = NULL; + oldest = 0; + } + // use moving average with current hit interval + intptr_t hitR = currTime - result->age; + lastHit = lastHit? (lastHit + hitR)/2 : hitR; + + cachedSize -= size; + } else { + if (lastCleanedAge) + ageThreshold = Props::OnMissFactor*(currTime - lastCleanedAge); + } + if (!usedSize) // inform that there are used blocks in the bin + *setNonEmpty = true; + // subject to later correction, if got cache miss and later allocation failed + usedSize += size; + lastGet = currTime; + } + return result; +} + +// forget the history for the bin if it was unused for long time +template<typename Props> +void LargeObjectCacheImpl<Props>::CacheBin::forgetOutdatedState(uintptr_t currTime) +{ + // If the time since the last get is LongWaitFactor times more than ageThreshold + // for the bin, treat the bin as rarely-used and forget everything we know + // about it. + // If LongWaitFactor is too small, we forget too early and + // so prevents good caching, while if too high, caching blocks + // with unrelated usage pattern occurs. + const uintptr_t sinceLastGet = currTime - lastGet; + bool doCleanup = false; + + if (!last) { // clean only empty bins + if (ageThreshold) + doCleanup = sinceLastGet > Props::LongWaitFactor*ageThreshold; + else if (lastCleanedAge) + doCleanup = sinceLastGet > Props::LongWaitFactor*(lastCleanedAge - lastGet); + } + if (doCleanup) { + lastCleanedAge = 0; + ageThreshold = 0; + } +} + +template<typename Props> +bool LargeObjectCacheImpl<Props>::CacheBin:: + cleanToThreshold(Backend *backend, BinBitMask *bitMask, uintptr_t currTime, int idx) +{ + LargeMemoryBlock *toRelease = NULL; + bool released = false; +#if MALLOC_DEBUG + uintptr_t nextAge = 0; +#endif + + /* oldest may be more recent then age, that's why cast to signed type + was used. age overflow is also processed correctly. */ + if (last && (intptr_t)(currTime - oldest) > ageThreshold) { + MallocMutex::scoped_lock scoped_cs(lock); + // double check + if (last && (intptr_t)(currTime - last->age) > ageThreshold) { + do { +#if MALLOC_DEBUG + // check that list ordered + MALLOC_ASSERT(!nextAge || lessThanWithOverflow(nextAge, last->age), + ASSERT_TEXT); + nextAge = last->age; +#endif + cachedSize -= last->unalignedSize; + last = last->prev; + } while (last && (intptr_t)(currTime - last->age) > ageThreshold); + if (last) { + toRelease = last->next; + oldest = last->age; + last->next = NULL; + } else { + toRelease = first; + first = NULL; + oldest = 0; + if (!usedSize) + bitMask->set(idx, false); + } + MALLOC_ASSERT( toRelease, ASSERT_TEXT ); + lastCleanedAge = toRelease->age; + } + else + return false; + } + released = toRelease; + + while ( toRelease ) { + LargeMemoryBlock *helper = toRelease->next; + backend->returnLargeObject(toRelease); + toRelease = helper; + } + return released; +} + +template<typename Props> +bool LargeObjectCacheImpl<Props>:: + CacheBin::cleanAll(Backend *backend, BinBitMask *bitMask, int idx) +{ + LargeMemoryBlock *toRelease = NULL; + bool released = false; + + if (last) { + MallocMutex::scoped_lock scoped_cs(lock); + // double check + if (last) { + toRelease = first; + last = NULL; + first = NULL; + oldest = 0; + cachedSize = 0; + if (!usedSize) + bitMask->set(idx, false); + } + else + return false; + } + released = toRelease; + + while ( toRelease ) { + LargeMemoryBlock *helper = toRelease->next; + MALLOC_ASSERT(!helper || lessThanWithOverflow(helper->age, toRelease->age), + ASSERT_TEXT); + backend->returnLargeObject(toRelease); + toRelease = helper; + } + return released; +} + +template<typename Props> +size_t LargeObjectCacheImpl<Props>::CacheBin::reportStat(int num, FILE *f) +{ +#if __TBB_MALLOC_LOCACHE_STAT + if (first) + printf("%d(%lu): total %lu KB thr %ld lastCln %lu lastHit %lu oldest %lu\n", + num, num*CacheStep+MinSize, + cachedSize/1024, ageThreshold, lastCleanedAge, lastHit, oldest); +#else + suppress_unused_warning(num); + suppress_unused_warning(f); +#endif + return cachedSize; +} + +// release from cache blocks that are older than ageThreshold +template<typename Props> +bool LargeObjectCacheImpl<Props>::regularCleanup(Backend *backend, uintptr_t currTime) +{ + bool released = false, doThreshDecr = false; + BinsSummary binsSummary; + + for (int i = bitMask.getMaxTrue(numBins-1); i >= 0; + i = bitMask.getMaxTrue(i-1)) { + bin[i].updateBinsSummary(&binsSummary); + if (!doThreshDecr && tooLargeLOC>2 && binsSummary.isLOCTooLarge()) { + // if LOC is too large for quite long time, decrease the threshold + // based on bin hit statistics. + // For this, redo cleanup from the beginnig. + // Note: on this iteration total usedSz can be not too large + // in comparison to total cachedSz, as we calculated it only + // partially. We are ok this it. + i = bitMask.getMaxTrue(numBins-1); + doThreshDecr = true; + binsSummary.reset(); + continue; + } + if (doThreshDecr) + bin[i].decreaseThreshold(); + if (bin[i].cleanToThreshold(backend, &bitMask, currTime, i)) + released = true; + } + + // We want to find if LOC was too large for some time continuously, + // so OK with races between incrementing and zeroing, but incrementing + // must be atomic. + if (binsSummary.isLOCTooLarge()) + AtomicIncrement(tooLargeLOC); + else + tooLargeLOC = 0; + return released; +} + +template<typename Props> +bool LargeObjectCacheImpl<Props>::cleanAll(Backend *backend) +{ + bool released = false; + for (int i = numBins-1; i >= 0; i--) + released |= bin[i].cleanAll(backend, &bitMask, i); + return released; +} + +#if __TBB_MALLOC_WHITEBOX_TEST +template<typename Props> +size_t LargeObjectCacheImpl<Props>::getLOCSize() const +{ + size_t size = 0; + for (int i = numBins-1; i >= 0; i--) + size += bin[i].getSize(); + return size; +} + +size_t LargeObjectCache::getLOCSize() const +{ + return largeCache.getLOCSize() + hugeCache.getLOCSize(); +} + +template<typename Props> +size_t LargeObjectCacheImpl<Props>::getUsedSize() const +{ + size_t size = 0; + for (int i = numBins-1; i >= 0; i--) + size += bin[i].getUsedSize(); + return size; +} + +size_t LargeObjectCache::getUsedSize() const +{ + return largeCache.getUsedSize() + hugeCache.getUsedSize(); +} +#endif // __TBB_MALLOC_WHITEBOX_TEST + +uintptr_t LargeObjectCache::getCurrTime() +{ + return (uintptr_t)AtomicIncrement((intptr_t&)cacheCurrTime); +} + +uintptr_t LargeObjectCache::getCurrTimeRange(uintptr_t range) +{ + return (uintptr_t)AtomicAdd((intptr_t&)cacheCurrTime, range)+1; +} + +void LargeObjectCache::cleanupCacheIfNeeded(Backend *backend, uintptr_t currTime) +{ + if ( 0 == currTime % cacheCleanupFreq ) + doRegularCleanup(backend, currTime); +} + +void LargeObjectCache:: + cleanupCacheIfNeededOnRange(Backend *backend, uintptr_t range, uintptr_t currTime) +{ + if (range >= cacheCleanupFreq + || currTime+range < currTime-1 // overflow, 0 is power of 2, do cleanup + // (prev;prev+range] contains n*cacheCleanupFreq + || alignUp(currTime, cacheCleanupFreq)<=currTime+range) + doRegularCleanup(backend, currTime); +} + +bool LargeObjectCache::doRegularCleanup(Backend *backend, uintptr_t currTime) +{ + return largeCache.regularCleanup(backend, currTime) + | hugeCache.regularCleanup(backend, currTime); +} + +bool LargeObjectCache::cleanAll(Backend *backend) +{ + return largeCache.cleanAll(backend) | hugeCache.cleanAll(backend); +} + +template<typename Props> +LargeMemoryBlock *LargeObjectCacheImpl<Props>::get(uintptr_t currTime, size_t size) +{ + MALLOC_ASSERT( size%Props::CacheStep==0, ASSERT_TEXT ); + int idx = sizeToIdx(size); + bool setNonEmpty = false; + + LargeMemoryBlock *lmb = bin[idx].get(size, currTime, &setNonEmpty); + // Setting to true is possible out of lock. As bitmask is used only for cleanup, + // the lack of consistency is not violating correctness here. + if (setNonEmpty) + bitMask.set(idx, true); + if (lmb) { + MALLOC_ITT_SYNC_ACQUIRED(bin+idx); + STAT_increment(getThreadId(), ThreadCommonCounters, allocCachedLargeBlk); + } + return lmb; +} + +template<typename Props> +void LargeObjectCacheImpl<Props>::rollbackCacheState(size_t size) +{ + int idx = sizeToIdx(size); + MALLOC_ASSERT(idx<numBins, ASSERT_TEXT); + bin[idx].decrUsedSize(size, &bitMask, idx); +} + +#if __TBB_MALLOC_LOCACHE_STAT +template<typename Props> +void LargeObjectCacheImpl<Props>::reportStat(FILE *f) +{ + size_t cachedSize = 0; + for (int i=0; i<numLargeBlockBins; i++) + cachedSize += bin[i].reportStat(i, f); + fprintf(f, "total LOC size %lu MB\nnow %lu\n", cachedSize/1024/1024, + loCacheStat.age); +} + +void LargeObjectCache::reportStat(FILE *f) +{ + largeObjs.reportStat(f); + hugeObjs.reportStat(f); +} +#endif + +template<typename Props> +void LargeObjectCacheImpl<Props>::putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *toCache) +{ + int toBinIdx = sizeToIdx(toCache->unalignedSize); + + MALLOC_ITT_SYNC_RELEASING(bin+toBinIdx); + if (LargeMemoryBlock *release = bin[toBinIdx].putList(extMemPool, toCache, + &bitMask, toBinIdx)) + extMemPool->backend.returnLargeObject(release); +} + +void LargeObjectCache::rollbackCacheState(size_t size) +{ + if (size < maxLargeSize) + largeCache.rollbackCacheState(size); + else if (size < maxHugeSize) + hugeCache.rollbackCacheState(size); +} + +// return artifical bin index, it's used only during sorting and never saved +int LargeObjectCache::sizeToIdx(size_t size) +{ + MALLOC_ASSERT(size < maxHugeSize, ASSERT_TEXT); + return size < maxLargeSize? + LargeCacheType::sizeToIdx(size) : + LargeCacheType::getNumBins()+HugeCacheType::sizeToIdx(size); +} + +void LargeObjectCache::putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *list) +{ + LargeMemoryBlock *toProcess, *n; + + for (LargeMemoryBlock *curr = list; curr; curr = toProcess) { + LargeMemoryBlock *tail = curr; + toProcess = curr->next; + if (curr->unalignedSize >= maxHugeSize) { + extMemPool->backend.returnLargeObject(curr); + continue; + } + int currIdx = sizeToIdx(curr->unalignedSize); + + // Find all blocks fitting to same bin. Not use more efficient sorting + // algorithm because list is short (commonly, + // LocalLOC's HIGH_MARK-LOW_MARK, i.e. 24 items). + for (LargeMemoryBlock *b = toProcess; b; b = n) { + n = b->next; + if (sizeToIdx(b->unalignedSize) == currIdx) { + tail->next = b; + tail = b; + if (toProcess == b) + toProcess = toProcess->next; + else { + b->prev->next = b->next; + if (b->next) + b->next->prev = b->prev; + } + } + } + tail->next = NULL; + if (curr->unalignedSize < maxLargeSize) + largeCache.putList(extMemPool, curr); + else + hugeCache.putList(extMemPool, curr); + } +} + +void LargeObjectCache::put(ExtMemoryPool *extMemPool, LargeMemoryBlock *largeBlock) +{ + if (largeBlock->unalignedSize < maxHugeSize) { + largeBlock->next = NULL; + if (largeBlock->unalignedSize<maxLargeSize) + largeCache.putList(extMemPool, largeBlock); + else + hugeCache.putList(extMemPool, largeBlock); + } else + extMemPool->backend.returnLargeObject(largeBlock); +} + +LargeMemoryBlock *LargeObjectCache::get(Backend *backend, size_t size) +{ + MALLOC_ASSERT( size%largeBlockCacheStep==0, ASSERT_TEXT ); + MALLOC_ASSERT( size>=minLargeSize, ASSERT_TEXT ); + + if ( size < maxHugeSize) { + uintptr_t currTime = getCurrTime(); + cleanupCacheIfNeeded(backend, currTime); + return size < maxLargeSize? + largeCache.get(currTime, size) : hugeCache.get(currTime, size); + } + return NULL; +} + + +LargeMemoryBlock *ExtMemoryPool::mallocLargeObject(size_t allocationSize) +{ +#if __TBB_MALLOC_LOCACHE_STAT + AtomicIncrement(mallocCalls); + AtomicAdd(memAllocKB, allocationSize/1024); +#endif + LargeMemoryBlock* lmb = loc.get(&backend, allocationSize); + if (!lmb) { + BackRefIdx backRefIdx = BackRefIdx::newBackRef(/*largeObj=*/true); + if (backRefIdx.isInvalid()) + return NULL; + + // unalignedSize is set in getLargeBlock + lmb = backend.getLargeBlock(allocationSize); + if (!lmb) { + removeBackRef(backRefIdx); + loc.rollbackCacheState(allocationSize); + return NULL; + } + lmb->backRefIdx = backRefIdx; + STAT_increment(getThreadId(), ThreadCommonCounters, allocNewLargeObj); + } else { +#if __TBB_MALLOC_LOCACHE_STAT + AtomicIncrement(cacheHits); + AtomicAdd(memHitKB, allocationSize/1024); +#endif + } + return lmb; +} + +void ExtMemoryPool::freeLargeObject(LargeMemoryBlock *mBlock) +{ + loc.put(this, mBlock); +} + +void ExtMemoryPool::freeLargeObjectList(LargeMemoryBlock *head) +{ + loc.putList(this, head); +} + +bool ExtMemoryPool::softCachesCleanup() +{ + // TODO: cleanup small objects as well + return loc.regularCleanup(&backend); +} + +bool ExtMemoryPool::hardCachesCleanup() +{ + // thread-local caches must be cleaned before LOC, + // because object from thread-local cache can be released to LOC + bool tlCaches = releaseTLCaches(), locCaches = loc.cleanAll(&backend); + return tlCaches || locCaches; +} + + +/*********** End allocation of large objects **********/ + +} // namespace internal +} // namespace rml + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-proxy-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-proxy-export.def new file mode 100644 index 0000000000..1b7edc3e8c --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-proxy-export.def @@ -0,0 +1,59 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +calloc; +free; +malloc; +realloc; +posix_memalign; +memalign; +valloc; +pvalloc; +mallinfo; +mallopt; +__TBB_malloc_proxy; +__TBB_internal_find_original_malloc; +_ZdaPv; /* next ones are new/delete */ +_ZdaPvRKSt9nothrow_t; +_ZdlPv; +_ZdlPvRKSt9nothrow_t; +_Znaj; +_ZnajRKSt9nothrow_t; +_Znwj; +_ZnwjRKSt9nothrow_t; + +local: + +/* TBB symbols */ +*3rml8internal*; +*3tbb*; +*__TBB*; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-tbbmalloc-export.def new file mode 100644 index 0000000000..58c95cf2be --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin32-tbbmalloc-export.def @@ -0,0 +1,82 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +scalable_calloc; +scalable_free; +scalable_malloc; +scalable_realloc; +scalable_posix_memalign; +scalable_aligned_malloc; +scalable_aligned_realloc; +scalable_aligned_free; +__TBB_internal_calloc; +__TBB_internal_free; +__TBB_internal_malloc; +__TBB_internal_realloc; +__TBB_internal_posix_memalign; +scalable_msize; +scalable_allocation_mode; + +/* memory pool stuff */ +_ZN3rml10pool_resetEPNS_10MemoryPoolE; +_ZN3rml11pool_createEiPKNS_13MemPoolPolicyE; +_ZN3rml14pool_create_v1EiPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE; +_ZN3rml11pool_mallocEPNS_10MemoryPoolEj; +_ZN3rml12pool_destroyEPNS_10MemoryPoolE; +_ZN3rml9pool_freeEPNS_10MemoryPoolEPv; +_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvj; +_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvjj; +_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEjj; + +local: + +/* TBB symbols */ +*3rml*; +*3tbb*; +*__TBB*; +__itt_*; +ITT_DoOneTimeInitialization; +TBB_runtime_interface_version; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_memcpy_largest_cachelinesize; +get_memcpy_largest_cache_size; +get_mem_ops_method; +init_mem_ops_method; +irc__get_msg; +irc__print; +override_mem_ops_method; +set_memcpy_largest_cachelinesize; +set_memcpy_largest_cache_size; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-proxy-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-proxy-export.def new file mode 100644 index 0000000000..bf81cd7e0e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-proxy-export.def @@ -0,0 +1,59 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +calloc; +free; +malloc; +realloc; +posix_memalign; +memalign; +valloc; +pvalloc; +mallinfo; +mallopt; +__TBB_malloc_proxy; +__TBB_internal_find_original_malloc; +_ZdaPv; /* next ones are new/delete */ +_ZdaPvRKSt9nothrow_t; +_ZdlPv; +_ZdlPvRKSt9nothrow_t; +_Znam; +_ZnamRKSt9nothrow_t; +_Znwm; +_ZnwmRKSt9nothrow_t; + +local: + +/* TBB symbols */ +*3rml8internal*; +*3tbb*; +*__TBB*; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-tbbmalloc-export.def new file mode 100644 index 0000000000..ef6cb6f629 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64-tbbmalloc-export.def @@ -0,0 +1,82 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +scalable_calloc; +scalable_free; +scalable_malloc; +scalable_realloc; +scalable_posix_memalign; +scalable_aligned_malloc; +scalable_aligned_realloc; +scalable_aligned_free; +__TBB_internal_calloc; +__TBB_internal_free; +__TBB_internal_malloc; +__TBB_internal_realloc; +__TBB_internal_posix_memalign; +scalable_msize; +scalable_allocation_mode; + +/* memory pool stuff */ +_ZN3rml11pool_createElPKNS_13MemPoolPolicyE; +_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE; +_ZN3rml10pool_resetEPNS_10MemoryPoolE; +_ZN3rml11pool_mallocEPNS_10MemoryPoolEm; +_ZN3rml12pool_destroyEPNS_10MemoryPoolE; +_ZN3rml9pool_freeEPNS_10MemoryPoolEPv; +_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm; +_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm; +_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm; + +local: + +/* TBB symbols */ +*3rml*; +*3tbb*; +*__TBB*; +__itt_*; +ITT_DoOneTimeInitialization; +TBB_runtime_interface_version; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_memcpy_largest_cachelinesize; +get_memcpy_largest_cache_size; +get_mem_ops_method; +init_mem_ops_method; +irc__get_msg; +irc__print; +override_mem_ops_method; +set_memcpy_largest_cachelinesize; +set_memcpy_largest_cache_size; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-proxy-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-proxy-export.def new file mode 100644 index 0000000000..bf81cd7e0e --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-proxy-export.def @@ -0,0 +1,59 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +calloc; +free; +malloc; +realloc; +posix_memalign; +memalign; +valloc; +pvalloc; +mallinfo; +mallopt; +__TBB_malloc_proxy; +__TBB_internal_find_original_malloc; +_ZdaPv; /* next ones are new/delete */ +_ZdaPvRKSt9nothrow_t; +_ZdlPv; +_ZdlPvRKSt9nothrow_t; +_Znam; +_ZnamRKSt9nothrow_t; +_Znwm; +_ZnwmRKSt9nothrow_t; + +local: + +/* TBB symbols */ +*3rml8internal*; +*3tbb*; +*__TBB*; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-tbbmalloc-export.def new file mode 100644 index 0000000000..ef6cb6f629 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/lin64ipf-tbbmalloc-export.def @@ -0,0 +1,82 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: + +scalable_calloc; +scalable_free; +scalable_malloc; +scalable_realloc; +scalable_posix_memalign; +scalable_aligned_malloc; +scalable_aligned_realloc; +scalable_aligned_free; +__TBB_internal_calloc; +__TBB_internal_free; +__TBB_internal_malloc; +__TBB_internal_realloc; +__TBB_internal_posix_memalign; +scalable_msize; +scalable_allocation_mode; + +/* memory pool stuff */ +_ZN3rml11pool_createElPKNS_13MemPoolPolicyE; +_ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE; +_ZN3rml10pool_resetEPNS_10MemoryPoolE; +_ZN3rml11pool_mallocEPNS_10MemoryPoolEm; +_ZN3rml12pool_destroyEPNS_10MemoryPoolE; +_ZN3rml9pool_freeEPNS_10MemoryPoolEPv; +_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm; +_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm; +_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm; + +local: + +/* TBB symbols */ +*3rml*; +*3tbb*; +*__TBB*; +__itt_*; +ITT_DoOneTimeInitialization; +TBB_runtime_interface_version; + +/* Intel Compiler (libirc) symbols */ +__intel_*; +_intel_*; +get_memcpy_largest_cachelinesize; +get_memcpy_largest_cache_size; +get_mem_ops_method; +init_mem_ops_method; +irc__get_msg; +irc__print; +override_mem_ops_method; +set_memcpy_largest_cachelinesize; +set_memcpy_largest_cache_size; + +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac32-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac32-tbbmalloc-export.def new file mode 100644 index 0000000000..4eb11f76b5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac32-tbbmalloc-export.def @@ -0,0 +1,48 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +_scalable_calloc +_scalable_free +_scalable_malloc +_scalable_realloc +_scalable_posix_memalign +_scalable_aligned_malloc +_scalable_aligned_realloc +_scalable_aligned_free +_scalable_msize +_scalable_allocation_mode +/* memory pool stuff */ +__ZN3rml11pool_createElPKNS_13MemPoolPolicyE +__ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE +__ZN3rml10pool_resetEPNS_10MemoryPoolE +__ZN3rml12pool_destroyEPNS_10MemoryPoolE +__ZN3rml11pool_mallocEPNS_10MemoryPoolEm +__ZN3rml9pool_freeEPNS_10MemoryPoolEPv +__ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm +__ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm +__ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac64-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac64-tbbmalloc-export.def new file mode 100644 index 0000000000..4eb11f76b5 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/mac64-tbbmalloc-export.def @@ -0,0 +1,48 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +_scalable_calloc +_scalable_free +_scalable_malloc +_scalable_realloc +_scalable_posix_memalign +_scalable_aligned_malloc +_scalable_aligned_realloc +_scalable_aligned_free +_scalable_msize +_scalable_allocation_mode +/* memory pool stuff */ +__ZN3rml11pool_createElPKNS_13MemPoolPolicyE +__ZN3rml14pool_create_v1ElPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE +__ZN3rml10pool_resetEPNS_10MemoryPoolE +__ZN3rml12pool_destroyEPNS_10MemoryPoolE +__ZN3rml11pool_mallocEPNS_10MemoryPoolEm +__ZN3rml9pool_freeEPNS_10MemoryPoolEPv +__ZN3rml12pool_reallocEPNS_10MemoryPoolEPvm +__ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvmm +__ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEmm diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.cpp new file mode 100644 index 0000000000..04692c7cb1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.cpp @@ -0,0 +1,490 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "proxy.h" +#include "tbb/tbb_config.h" + +#if !defined(__EXCEPTIONS) && !defined(_CPPUNWIND) && !defined(__SUNPRO_CC) || defined(_XBOX) + #if TBB_USE_EXCEPTIONS + #error Compilation settings do not support exception handling. Please do not set TBB_USE_EXCEPTIONS macro or set it to 0. + #elif !defined(TBB_USE_EXCEPTIONS) + #define TBB_USE_EXCEPTIONS 0 + #endif +#elif !defined(TBB_USE_EXCEPTIONS) + #define TBB_USE_EXCEPTIONS 1 +#endif + +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED + +/*** service functions and variables ***/ + +#include <unistd.h> // for sysconf +#include <dlfcn.h> + +static long memoryPageSize; + +static inline void initPageSize() +{ + memoryPageSize = sysconf(_SC_PAGESIZE); +} + +/* For the expected behaviour (i.e., finding malloc/free/etc from libc.so, + not from ld-linux.so) dlsym(RTLD_NEXT) should be called from + a LD_PRELOADed library, not another dynamic library. + So we have to put find_original_malloc here. + */ +extern "C" bool __TBB_internal_find_original_malloc(int num, const char *names[], + void *ptrs[]) +{ + for (int i=0; i<num; i++) + if (NULL == (ptrs[i] = dlsym (RTLD_NEXT, names[i]))) + return false; + + return true; +} + +/* __TBB_malloc_proxy used as a weak symbol by libtbbmalloc for: + 1) detection that the proxy library is loaded + 2) check that dlsym("malloc") found something different from our replacement malloc +*/ +extern "C" void *__TBB_malloc_proxy() __attribute__ ((alias ("malloc"))); + +#ifndef __THROW +#define __THROW +#endif + +/*** replacements for malloc and the family ***/ + +extern "C" { + +void *malloc(size_t size) __THROW +{ + return __TBB_internal_malloc(size); +} + +void * calloc(size_t num, size_t size) __THROW +{ + return __TBB_internal_calloc(num, size); +} + +void free(void *object) __THROW +{ + __TBB_internal_free(object); +} + +void * realloc(void* ptr, size_t sz) __THROW +{ + return __TBB_internal_realloc(ptr, sz); +} + +int posix_memalign(void **memptr, size_t alignment, size_t size) __THROW +{ + return __TBB_internal_posix_memalign(memptr, alignment, size); +} + +/* The older *NIX interface for aligned allocations; + it's formally substituted by posix_memalign and deprecated, + so we do not expect it to cause cyclic dependency with C RTL. */ +void * memalign(size_t alignment, size_t size) __THROW +{ + return scalable_aligned_malloc(size, alignment); +} + +/* valloc allocates memory aligned on a page boundary */ +void * valloc(size_t size) __THROW +{ + if (! memoryPageSize) initPageSize(); + + return scalable_aligned_malloc(size, memoryPageSize); +} + +/* pvalloc allocates smallest set of complete pages which can hold + the requested number of bytes. Result is aligned on page boundary. */ +void * pvalloc(size_t size) __THROW +{ + if (! memoryPageSize) initPageSize(); + // align size up to the page size + size = ((size-1) | (memoryPageSize-1)) + 1; + + return scalable_aligned_malloc(size, memoryPageSize); +} + +int mallopt(int /*param*/, int /*value*/) __THROW +{ + return 1; +} + +} /* extern "C" */ + +#if __linux__ +#include <malloc.h> +#include <string.h> // for memset + +extern "C" struct mallinfo mallinfo() __THROW +{ + struct mallinfo m; + memset(&m, 0, sizeof(struct mallinfo)); + + return m; +} +#endif /* __linux__ */ + +/*** replacements for global operators new and delete ***/ + +#include <new> + +void * operator new(size_t sz) throw (std::bad_alloc) { + void *res = scalable_malloc(sz); +#if TBB_USE_EXCEPTIONS + if (NULL == res) + throw std::bad_alloc(); +#endif /* TBB_USE_EXCEPTIONS */ + return res; +} +void* operator new[](size_t sz) throw (std::bad_alloc) { + void *res = scalable_malloc(sz); +#if TBB_USE_EXCEPTIONS + if (NULL == res) + throw std::bad_alloc(); +#endif /* TBB_USE_EXCEPTIONS */ + return res; +} +void operator delete(void* ptr) throw() { + scalable_free(ptr); +} +void operator delete[](void* ptr) throw() { + scalable_free(ptr); +} +void* operator new(size_t sz, const std::nothrow_t&) throw() { + return scalable_malloc(sz); +} +void* operator new[](std::size_t sz, const std::nothrow_t&) throw() { + return scalable_malloc(sz); +} +void operator delete(void* ptr, const std::nothrow_t&) throw() { + scalable_free(ptr); +} +void operator delete[](void* ptr, const std::nothrow_t&) throw() { + scalable_free(ptr); +} + +#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED */ + + +#ifdef _WIN32 +#include <windows.h> + +#if !__TBB_WIN8UI_SUPPORT + +#include <stdio.h> +#include "tbb_function_replacement.h" + +void safer_scalable_free2( void *ptr) +{ + safer_scalable_free( ptr, NULL ); +} + +// we do not support _expand(); +void* safer_expand( void *, size_t ) +{ + return NULL; +} + +#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(CRTLIB)\ +void (*orig_free_##CRTLIB)(void*); \ +void safer_scalable_free_##CRTLIB( void *ptr) \ +{ \ + safer_scalable_free( ptr, orig_free_##CRTLIB ); \ +} \ + \ +size_t (*orig_msize_##CRTLIB)(void*); \ +size_t safer_scalable_msize_##CRTLIB( void *ptr) \ +{ \ + return safer_scalable_msize( ptr, orig_msize_##CRTLIB ); \ +} \ + \ +void* safer_scalable_realloc_##CRTLIB( void *ptr, size_t size ) \ +{ \ + orig_ptrs func_ptrs = {orig_free_##CRTLIB, orig_msize_##CRTLIB}; \ + return safer_scalable_realloc( ptr, size, &func_ptrs ); \ +} \ + \ +void* safer_scalable_aligned_realloc_##CRTLIB( void *ptr, size_t size, size_t aligment ) \ +{ \ + orig_ptrs func_ptrs = {orig_free_##CRTLIB, orig_msize_##CRTLIB}; \ + return safer_scalable_aligned_realloc( ptr, size, aligment, &func_ptrs ); \ +} + +// limit is 30 bytes/60 symbols per line +const char* known_bytecodes[] = { +#if _WIN64 + "4883EC284885C974", //release free() win64 + "4883EC384885C975", //release msize() win64 + "4885C974375348", //release free() 8.0.50727.42 win64 + "48894C24084883EC28BA", //debug prologue for win64 + "4C8BC1488B0DA6E4040033", //win64 SDK + "4883EC284885C975", //release msize() 10.0.21003.1 win64 +#else + "558BEC6A018B", //debug free() & _msize() 8.0.50727.4053 win32 + "6A1868********E8", //release free() 8.0.50727.4053 win32 + "6A1C68********E8", //release _msize() 8.0.50727.4053 win32 + "558BEC837D08000F", //release _msize() 11.0.51106.1 win32 + "8BFF558BEC6A", //debug free() & _msize() 9.0.21022.8 win32 + "8BFF558BEC83", //debug free() & _msize() 10.0.21003.1 win32 +#endif + NULL + }; + +#if _WIN64 +#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(CRT_VER)\ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "free", (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d, known_bytecodes, (FUNCPTR*)&orig_free_ ## CRT_VER ## d ); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "free", (FUNCPTR)safer_scalable_free_ ## CRT_VER, known_bytecodes, (FUNCPTR*)&orig_free_ ## CRT_VER ); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER ## d, known_bytecodes, (FUNCPTR*)&orig_msize_ ## CRT_VER ## d ); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER, known_bytecodes, (FUNCPTR*)&orig_msize_ ## CRT_VER ); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "realloc", (FUNCPTR)safer_scalable_realloc_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "realloc", (FUNCPTR)safer_scalable_realloc_ ## CRT_VER, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_aligned_free", (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_aligned_free", (FUNCPTR)safer_scalable_free_ ## CRT_VER, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER, 0, NULL); +#else +#define __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(CRT_VER)\ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "free", (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d, known_bytecodes, (FUNCPTR*)&orig_free_ ## CRT_VER ## d ); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "free", (FUNCPTR)safer_scalable_free_ ## CRT_VER, known_bytecodes, (FUNCPTR*)&orig_free_ ## CRT_VER ); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER ## d, known_bytecodes, (FUNCPTR*)&orig_msize_ ## CRT_VER ## d ); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_msize",(FUNCPTR)safer_scalable_msize_ ## CRT_VER, known_bytecodes, (FUNCPTR*)&orig_msize_ ## CRT_VER ); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "realloc", (FUNCPTR)safer_scalable_realloc_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "realloc", (FUNCPTR)safer_scalable_realloc_ ## CRT_VER, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_aligned_free", (FUNCPTR)safer_scalable_free_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_aligned_free", (FUNCPTR)safer_scalable_free_ ## CRT_VER, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER "d.dll", "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER ## d, 0, NULL); \ + ReplaceFunctionWithStore( #CRT_VER ".dll", "_aligned_realloc",(FUNCPTR)safer_scalable_aligned_realloc_ ## CRT_VER, 0, NULL); +#endif + +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr70); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr71); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr80); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr90); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr100d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr100); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr110d); +__TBB_ORIG_ALLOCATOR_REPLACEMENT_WRAPPER(msvcr110); + + +/*** replacements for global operators new and delete ***/ + +#include <new> + +#if _MSC_VER && !defined(__INTEL_COMPILER) +#pragma warning( push ) +#pragma warning( disable : 4290 ) +#endif + +void * operator_new(size_t sz) throw (std::bad_alloc) { + void *res = scalable_malloc(sz); + if (NULL == res) throw std::bad_alloc(); + return res; +} +void* operator_new_arr(size_t sz) throw (std::bad_alloc) { + void *res = scalable_malloc(sz); + if (NULL == res) throw std::bad_alloc(); + return res; +} +void operator_delete(void* ptr) throw() { + safer_scalable_free2(ptr); +} +#if _MSC_VER && !defined(__INTEL_COMPILER) +#pragma warning( pop ) +#endif + +void operator_delete_arr(void* ptr) throw() { + safer_scalable_free2(ptr); +} +void* operator_new_t(size_t sz, const std::nothrow_t&) throw() { + return scalable_malloc(sz); +} +void* operator_new_arr_t(std::size_t sz, const std::nothrow_t&) throw() { + return scalable_malloc(sz); +} +void operator_delete_t(void* ptr, const std::nothrow_t&) throw() { + safer_scalable_free2(ptr); +} +void operator_delete_arr_t(void* ptr, const std::nothrow_t&) throw() { + safer_scalable_free2(ptr); +} + +const char* modules_to_replace[] = { + "msvcr80d.dll", + "msvcr80.dll", + "msvcr90d.dll", + "msvcr90.dll", + "msvcr100d.dll", + "msvcr100.dll", + "msvcr110d.dll", + "msvcr110.dll", + "msvcr70d.dll", + "msvcr70.dll", + "msvcr71d.dll", + "msvcr71.dll", + }; + +/* +We need to replace following functions: +malloc +calloc +_aligned_malloc +_expand (by dummy implementation) +??2@YAPAXI@Z operator new (ia32) +??_U@YAPAXI@Z void * operator new[] (size_t size) (ia32) +??3@YAXPAX@Z operator delete (ia32) +??_V@YAXPAX@Z operator delete[] (ia32) +??2@YAPEAX_K@Z void * operator new(unsigned __int64) (intel64) +??_V@YAXPEAX@Z void * operator new[](unsigned __int64) (intel64) +??3@YAXPEAX@Z operator delete (intel64) +??_V@YAXPEAX@Z operator delete[] (intel64) +??2@YAPAXIABUnothrow_t@std@@@Z void * operator new (size_t sz, const std::nothrow_t&) throw() (optional) +??_U@YAPAXIABUnothrow_t@std@@@Z void * operator new[] (size_t sz, const std::nothrow_t&) throw() (optional) + +and these functions have runtime-specific replacement: +realloc +free +_msize +_aligned_realloc +_aligned_free +*/ + +typedef struct FRData_t { + //char *_module; + const char *_func; + FUNCPTR _fptr; + FRR_ON_ERROR _on_error; +} FRDATA; + +FRDATA routines_to_replace[] = { + { "malloc", (FUNCPTR)scalable_malloc, FRR_FAIL }, + { "calloc", (FUNCPTR)scalable_calloc, FRR_FAIL }, + { "_aligned_malloc", (FUNCPTR)scalable_aligned_malloc, FRR_FAIL }, + { "_expand", (FUNCPTR)safer_expand, FRR_IGNORE }, +#if _WIN64 + { "??2@YAPEAX_K@Z", (FUNCPTR)operator_new, FRR_FAIL }, + { "??_U@YAPEAX_K@Z", (FUNCPTR)operator_new_arr, FRR_FAIL }, + { "??3@YAXPEAX@Z", (FUNCPTR)operator_delete, FRR_FAIL }, + { "??_V@YAXPEAX@Z", (FUNCPTR)operator_delete_arr, FRR_FAIL }, +#else + { "??2@YAPAXI@Z", (FUNCPTR)operator_new, FRR_FAIL }, + { "??_U@YAPAXI@Z", (FUNCPTR)operator_new_arr, FRR_FAIL }, + { "??3@YAXPAX@Z", (FUNCPTR)operator_delete, FRR_FAIL }, + { "??_V@YAXPAX@Z", (FUNCPTR)operator_delete_arr, FRR_FAIL }, +#endif + { "??2@YAPAXIABUnothrow_t@std@@@Z", (FUNCPTR)operator_new_t, FRR_IGNORE }, + { "??_U@YAPAXIABUnothrow_t@std@@@Z", (FUNCPTR)operator_new_arr_t, FRR_IGNORE } +}; + +#ifndef UNICODE +void ReplaceFunctionWithStore( const char*dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc ) +#else +void ReplaceFunctionWithStore( const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc ) +#endif +{ + FRR_TYPE type = ReplaceFunction( dllName, funcName, newFunc, opcodes, origFunc ); + if (type == FRR_NODLL) return; + if ( type != FRR_OK ) + { + fprintf(stderr, "Failed to replace function %s in module %s\n", + funcName, dllName); + exit(1); + } +} + +void doMallocReplacement() +{ + int i,j; + + // Replace functions and keep backup of original code (separate for each runtime) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr70) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr71) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr80) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr90) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr100) + __TBB_ORIG_ALLOCATOR_REPLACEMENT_CALL(msvcr110) + + // Replace functions without storing original code + int modules_to_replace_count = sizeof(modules_to_replace) / sizeof(modules_to_replace[0]); + int routines_to_replace_count = sizeof(routines_to_replace) / sizeof(routines_to_replace[0]); + for ( j=0; j<modules_to_replace_count; j++ ) + for (i = 0; i < routines_to_replace_count; i++) + { +#if !_WIN64 + // in Microsoft* Visual Studio* 11 Beta 32-bit operator delete consists of 2 bytes only: short jump to free(ptr); + // replacement should be skipped for this particular case. + if ( (strcmp(modules_to_replace[j],"msvcr110.dll")==0) && (strcmp(routines_to_replace[i]._func,"??3@YAXPAX@Z")==0) ) continue; +#endif + FRR_TYPE type = ReplaceFunction( modules_to_replace[j], routines_to_replace[i]._func, routines_to_replace[i]._fptr, NULL, NULL ); + if (type == FRR_NODLL) break; + if (type != FRR_OK && routines_to_replace[i]._on_error==FRR_FAIL) + { + fprintf(stderr, "Failed to replace function %s in module %s\n", + routines_to_replace[i]._func, modules_to_replace[j]); + exit(1); + } + } +} + +#endif // !__TBB_WIN8UI_SUPPORT + +extern "C" BOOL WINAPI DllMain( HINSTANCE hInst, DWORD callReason, LPVOID reserved ) +{ + + if ( callReason==DLL_PROCESS_ATTACH && reserved && hInst ) { +#if !__TBB_WIN8UI_SUPPORT +#if TBBMALLOC_USE_TBB_FOR_ALLOCATOR_ENV_CONTROLLED + char pinEnvVariable[50]; + if( GetEnvironmentVariable("TBBMALLOC_USE_TBB_FOR_ALLOCATOR", pinEnvVariable, 50)) + { + doMallocReplacement(); + } +#else + doMallocReplacement(); +#endif +#endif // !__TBB_WIN8UI_SUPPORT + } + + return TRUE; +} + +// Just to make the linker happy and link the DLL to the application +extern "C" __declspec(dllexport) void __TBB_malloc_proxy() +{ + +} + +#endif //_WIN32 diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.h new file mode 100644 index 0000000000..1a8cd19ba6 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/proxy.h @@ -0,0 +1,72 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef _TBB_malloc_proxy_H_ +#define _TBB_malloc_proxy_H_ + +#if __linux__ +#define MALLOC_UNIXLIKE_OVERLOAD_ENABLED 1 +#endif + +// MALLOC_UNIXLIKE_OVERLOAD_ENABLED depends on MALLOC_CHECK_RECURSION stuff +#if __linux__ || __APPLE__ || __sun || __FreeBSD__ || MALLOC_UNIXLIKE_OVERLOAD_ENABLED +#define MALLOC_CHECK_RECURSION 1 +#endif + +#include <stddef.h> + +extern "C" { + void * scalable_malloc(size_t size); + void * scalable_calloc(size_t nobj, size_t size); + void scalable_free(void *ptr); + void * scalable_realloc(void* ptr, size_t size); + void * scalable_aligned_malloc(size_t size, size_t alignment); + void * scalable_aligned_realloc(void* ptr, size_t size, size_t alignment); + int scalable_posix_memalign(void **memptr, size_t alignment, size_t size); + size_t scalable_msize(void *ptr); + void safer_scalable_free( void *ptr, void (*original_free)(void*)); + void * safer_scalable_realloc( void *ptr, size_t, void* ); + void * safer_scalable_aligned_realloc( void *ptr, size_t, size_t, void* ); + size_t safer_scalable_msize( void *ptr, size_t (*orig_msize_crt80d)(void*)); + + void * __TBB_internal_malloc(size_t size); + void * __TBB_internal_calloc(size_t num, size_t size); + void __TBB_internal_free(void *ptr); + void * __TBB_internal_realloc(void* ptr, size_t sz); + int __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size); + + bool __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]); +} // extern "C" + +// Struct with original free() and _msize() pointers +struct orig_ptrs { + void (*orig_free) (void*); + size_t (*orig_msize)(void*); +}; + +#endif /* _TBB_malloc_proxy_H_ */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.cpp new file mode 100644 index 0000000000..ed432ed8f8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.cpp @@ -0,0 +1,478 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" + +#if !__TBB_WIN8UI_SUPPORT && defined(_WIN32) + +#define _CRT_SECURE_NO_DEPRECATE 1 +#define __TBB_NO_IMPLICIT_LINKAGE 1 + +#include <windows.h> +#include <new> +#include <stdio.h> +#include "tbb_function_replacement.h" + +#include "tbb/tbb_config.h" +#include "tbb/tbb_stddef.h" +#include "../tbb/tbb_assert_impl.h" + +inline UINT_PTR Ptr2Addrint(LPVOID ptr) +{ + Int2Ptr i2p; + i2p.lpv = ptr; + return i2p.uip; +} + +inline LPVOID Addrint2Ptr(UINT_PTR ptr) +{ + Int2Ptr i2p; + i2p.uip = ptr; + return i2p.lpv; +} + +// Is the distance between addr1 and addr2 smaller than dist +inline bool IsInDistance(UINT_PTR addr1, UINT_PTR addr2, __int64 dist) +{ + __int64 diff = addr1>addr2 ? addr1-addr2 : addr2-addr1; + return diff<dist; +} + +/* + * When inserting a probe in 64 bits process the distance between the insertion + * point and the target may be bigger than 2^32. In this case we are using + * indirect jump through memory where the offset to this memory location + * is smaller than 2^32 and it contains the absolute address (8 bytes). + * + * This class is used to hold the pages used for the above trampolines. + * Since this utility will be used to replace malloc functions this implementation + * doesn't allocate memory dynamically. + * + * The struct MemoryBuffer holds the data about a page in the memory used for + * replacing functions in Intel64 where the target is too far to be replaced + * with a short jump. All the calculations of m_base and m_next are in a multiple + * of SIZE_OF_ADDRESS (which is 8 in Win64). + */ +class MemoryProvider { +private: + struct MemoryBuffer { + UINT_PTR m_base; // base address of the buffer + UINT_PTR m_next; // next free location in the buffer + DWORD m_size; // size of buffer + + // Default constructor + MemoryBuffer() : m_base(0), m_next(0), m_size(0) {} + + // Constructor + MemoryBuffer(void *base, DWORD size) + { + m_base = Ptr2Addrint(base); + m_next = m_base; + m_size = size; + } + }; + +MemoryBuffer *CreateBuffer(UINT_PTR addr) + { + // No more room in the pages database + if (m_lastBuffer - m_pages == MAX_NUM_BUFFERS) + return 0; + + void *newAddr = Addrint2Ptr(addr); + // Get information for the region which the given address belongs to + MEMORY_BASIC_INFORMATION memInfo; + if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo)) + return 0; + + for(;;) { + // The new address to check is beyond the current region and aligned to allocation size + newAddr = Addrint2Ptr( (Ptr2Addrint(memInfo.BaseAddress) + memInfo.RegionSize + m_allocSize) & ~(UINT_PTR)(m_allocSize-1) ); + + // Check that the address is in the right distance. + // VirtualAlloc can only round the address down; so it will remain in the right distance + if (!IsInDistance(addr, Ptr2Addrint(newAddr), MAX_DISTANCE)) + break; + + if (VirtualQuery(newAddr, &memInfo, sizeof(memInfo)) != sizeof(memInfo)) + break; + + if (memInfo.State == MEM_FREE && memInfo.RegionSize >= m_allocSize) + { + // Found a free region, try to allocate a page in this region + void *newPage = VirtualAlloc(newAddr, m_allocSize, MEM_COMMIT|MEM_RESERVE, PAGE_READWRITE); + if (!newPage) + break; + + // Add the new page to the pages database + MemoryBuffer *pBuff = new (m_lastBuffer) MemoryBuffer(newPage, m_allocSize); + ++m_lastBuffer; + return pBuff; + } + } + + // Failed to find a buffer in the distance + return 0; + } + +public: + MemoryProvider() + { + SYSTEM_INFO sysInfo; + GetSystemInfo(&sysInfo); + m_allocSize = sysInfo.dwAllocationGranularity; + m_lastBuffer = &m_pages[0]; + } + + // We can't free the pages in the destructor because the trampolines + // are using these memory locations and a replaced function might be called + // after the destructor was called. + ~MemoryProvider() + { + } + + // Return a memory location in distance less than 2^31 from input address + UINT_PTR GetLocation(UINT_PTR addr) + { + MemoryBuffer *pBuff = m_pages; + for (; pBuff<m_lastBuffer && IsInDistance(pBuff->m_next, addr, MAX_DISTANCE); ++pBuff) + { + if (pBuff->m_next < pBuff->m_base + pBuff->m_size) + { + UINT_PTR loc = pBuff->m_next; + pBuff->m_next += MAX_PROBE_SIZE; + return loc; + } + } + + pBuff = CreateBuffer(addr); + if(!pBuff) + return 0; + + UINT_PTR loc = pBuff->m_next; + pBuff->m_next += MAX_PROBE_SIZE; + return loc; + } + +private: + MemoryBuffer m_pages[MAX_NUM_BUFFERS]; + MemoryBuffer *m_lastBuffer; + DWORD m_allocSize; +}; + +static MemoryProvider memProvider; + +// Compare opcodes from dictionary (str1) and opcodes from code (str2) +// str1 might contain '*' to mask adresses +// RETURN: NULL if opcodes did not match, string lentgh of str1 on success +size_t compareStrings( const char *str1, const char *str2 ) +{ + size_t str1Lentgh = strlen(str1); + for (size_t i=0; i<str1Lentgh; i++){ + if( str1[i] != '*' && str1[i] != str2[i] ) return 0; + } + return str1Lentgh; +} + +// Check function prologue with know prologues from the dictionary +// opcodes - dictionary +// inpAddr - pointer to function prologue +// Dictionary contains opcodes for several full asm instructions +// + one opcode byte for the next asm instruction for safe address processing +// RETURN: number of bytes for safe bytes replacement +// (matched_pattern/2-1) +UINT CheckOpcodes( const char ** opcodes, void *inpAddr ) +{ + static size_t opcodesStringsCount = 0; + static size_t maxOpcodesLength = 0; + static size_t opcodes_pointer = (size_t)opcodes; + char opcodeString[61]; + size_t i; + size_t result; + + // Get the values for static variables + // max length and number of patterns + if( !opcodesStringsCount || opcodes_pointer != (size_t)opcodes ){ + while( *(opcodes + opcodesStringsCount)!= NULL ){ + if( (i=strlen(*(opcodes + opcodesStringsCount))) > maxOpcodesLength ) + maxOpcodesLength = i; + opcodesStringsCount++; + } + opcodes_pointer = (size_t)opcodes; + __TBB_ASSERT( maxOpcodesLength < 61, "Limit is 30 opcodes/60 symbols per pattern" ); + } + + // Translate prologue opcodes to string format to compare + for( i=0; i< maxOpcodesLength/2; i++ ){ + sprintf( opcodeString + 2*i, "%.2X", *((unsigned char*)inpAddr+i) ); + } + opcodeString[maxOpcodesLength] = 0; + + // Compare translated opcodes with patterns + for( i=0; i< opcodesStringsCount; i++ ){ + result = compareStrings( opcodes[i],opcodeString ); + if( result ) + return (UINT)(result/2-1); + } + // TODO: to add more stuff to patterns + __TBB_ASSERT( false, "CheckOpcodes failed" ); + + // No matches found just do not store original calls + return 0; +} + +// Insert jump relative instruction to the input address +// RETURN: the size of the trampoline or 0 on failure +static DWORD InsertTrampoline32(void *inpAddr, void *targetAddr, const char ** opcodes, void** storedAddr) +{ + UINT opcodesNumber = SIZE_OF_RELJUMP; + UINT_PTR srcAddr = Ptr2Addrint(inpAddr); + UINT_PTR tgtAddr = Ptr2Addrint(targetAddr); + // Check that the target fits in 32 bits + if (!IsInDistance(srcAddr, tgtAddr, MAX_DISTANCE)) + return 0; + + UINT_PTR offset; + UINT offset32; + UCHAR *codePtr = (UCHAR *)inpAddr; + + // If requested, store original function code + if ( storedAddr ){ + opcodesNumber = CheckOpcodes( opcodes, inpAddr ); + if( opcodesNumber >= SIZE_OF_RELJUMP ){ + UINT_PTR strdAddr = memProvider.GetLocation(srcAddr); + if (!strdAddr) + return 0; + *storedAddr = Addrint2Ptr(strdAddr); + // Set 'executable' flag for original instructions in the new place + DWORD pageFlags = PAGE_EXECUTE_READWRITE; + if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0; + // Copy original instructions to the new place + memcpy(*storedAddr, codePtr, opcodesNumber); + // Set jump to the code after replacement + offset = srcAddr - strdAddr - SIZE_OF_RELJUMP; + offset32 = (UINT)((offset & 0xFFFFFFFF)); + *((UCHAR*)*storedAddr+opcodesNumber) = 0xE9; + memcpy(((UCHAR*)*storedAddr+opcodesNumber+1), &offset32, sizeof(offset32)); + }else{ + // No matches found just do not store original calls + *storedAddr = NULL; + } + } + + // The following will work correctly even if srcAddr>tgtAddr, as long as + // address difference is less than 2^31, which is guaranteed by IsInDistance. + offset = tgtAddr - srcAddr - SIZE_OF_RELJUMP; + offset32 = (UINT)(offset & 0xFFFFFFFF); + // Insert the jump to the new code + *codePtr = 0xE9; + memcpy(codePtr+1, &offset32, sizeof(offset32)); + + // Fill the rest with NOPs to correctly see disassembler of old code in debugger. + for( unsigned i=SIZE_OF_RELJUMP; i<opcodesNumber; i++ ){ + *(codePtr+i) = 0x90; + } + + return SIZE_OF_RELJUMP; +} + +// This function is called when the offset doesn't fit in 32 bits +// 1 Find and allocate a page in the small distance (<2^31) from input address +// 2 Put jump RIP relative indirect through the address in the close page +// 3 Put the absolute address of the target in the allocated location +// RETURN: the size of the trampoline or 0 on failure +static DWORD InsertTrampoline64(void *inpAddr, void *targetAddr, const char ** opcodes, void** storedAddr) +{ + UINT opcodesNumber = SIZE_OF_INDJUMP; + + UINT_PTR srcAddr = Ptr2Addrint(inpAddr); + UINT_PTR tgtAddr = Ptr2Addrint(targetAddr); + + // Get a location close to the source address + UINT_PTR location = memProvider.GetLocation(srcAddr); + if (!location) + return 0; + + UINT_PTR offset; + UINT offset32; + UCHAR *codePtr = (UCHAR *)inpAddr; + + // Fill the location + UINT_PTR *locPtr = (UINT_PTR *)Addrint2Ptr(location); + *locPtr = tgtAddr; + + // If requested, store original function code + if( storedAddr ){ + opcodesNumber = CheckOpcodes( opcodes, inpAddr ); + if( opcodesNumber >= SIZE_OF_INDJUMP ){ + UINT_PTR strdAddr = memProvider.GetLocation(srcAddr); + if (!strdAddr) + return 0; + *storedAddr = Addrint2Ptr(strdAddr); + // Set 'executable' flag for original instructions in the new place + DWORD pageFlags = PAGE_EXECUTE_READWRITE; + if (!VirtualProtect(*storedAddr, MAX_PROBE_SIZE, pageFlags, &pageFlags)) return 0; + // Copy original instructions to the new place + memcpy(*storedAddr, codePtr, opcodesNumber); + // Set jump to the code after replacement. It is within the distance of relative jump! + offset = srcAddr - strdAddr - SIZE_OF_RELJUMP; + offset32 = (UINT)((offset & 0xFFFFFFFF)); + *((UCHAR*)*storedAddr+opcodesNumber) = 0xE9; + memcpy(((UCHAR*)*storedAddr+opcodesNumber+1), &offset32, sizeof(offset32)); + }else{ + // No matches found just do not store original calls + *storedAddr = NULL; + } + } + + // Fill the buffer + offset = location - srcAddr - SIZE_OF_INDJUMP; + offset32 = (UINT)(offset & 0xFFFFFFFF); + *(codePtr) = 0xFF; + *(codePtr+1) = 0x25; + memcpy(codePtr+2, &offset32, sizeof(offset32)); + + // Fill the rest with NOPs to correctly see disassembler of old code in debugger. + for( unsigned i=SIZE_OF_INDJUMP; i<opcodesNumber; i++ ){ + *(codePtr+i) = 0x90; + } + + return SIZE_OF_INDJUMP; +} + +// Insert a jump instruction in the inpAddr to the targetAddr +// 1. Get the memory protection of the page containing the input address +// 2. Change the memory protection to writable +// 3. Call InsertTrampoline32 or InsertTrampoline64 +// 4. Restore memory protection +// RETURN: FALSE on failure, TRUE on success +static bool InsertTrampoline(void *inpAddr, void *targetAddr, const char ** opcodes, void** origFunc) +{ + DWORD probeSize; + // Change page protection to EXECUTE+WRITE + DWORD origProt = 0; + if (!VirtualProtect(inpAddr, MAX_PROBE_SIZE, PAGE_EXECUTE_WRITECOPY, &origProt)) + return FALSE; + probeSize = InsertTrampoline32(inpAddr, targetAddr, opcodes, origFunc); + if (!probeSize) + probeSize = InsertTrampoline64(inpAddr, targetAddr, opcodes, origFunc); + + // Restore original protection + VirtualProtect(inpAddr, MAX_PROBE_SIZE, origProt, &origProt); + + if (!probeSize) + return FALSE; + + FlushInstructionCache(GetCurrentProcess(), inpAddr, probeSize); + FlushInstructionCache(GetCurrentProcess(), origFunc, probeSize); + + return TRUE; +} + +// Routine to replace the functions +// TODO: replace opcodesNumber with opcodes and opcodes number to check if we replace right code. +FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc) +{ + // Cache the results of the last search for the module + // Assume that there was no DLL unload between + static char cachedName[MAX_PATH+1]; + static HMODULE cachedHM = 0; + + if (!dllName || !*dllName) + return FRR_NODLL; + + if (!cachedHM || strncmp(dllName, cachedName, MAX_PATH) != 0) + { + // Find the module handle for the input dll + HMODULE hModule = GetModuleHandleA(dllName); + if (hModule == 0) + { + // Couldn't find the module with the input name + cachedHM = 0; + return FRR_NODLL; + } + + cachedHM = hModule; + strncpy(cachedName, dllName, MAX_PATH); + } + + FARPROC inpFunc = GetProcAddress(cachedHM, funcName); + if (inpFunc == 0) + { + // Function was not found + return FRR_NOFUNC; + } + + if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodes, (void**)origFunc)){ + // Failed to insert the trampoline to the target address + return FRR_FAILED; + } + + return FRR_OK; +} + +FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc) +{ + // Cache the results of the last search for the module + // Assume that there was no DLL unload between + static wchar_t cachedName[MAX_PATH+1]; + static HMODULE cachedHM = 0; + + if (!dllName || !*dllName) + return FRR_NODLL; + + if (!cachedHM || wcsncmp(dllName, cachedName, MAX_PATH) != 0) + { + // Find the module handle for the input dll + HMODULE hModule = GetModuleHandleW(dllName); + if (hModule == 0) + { + // Couldn't find the module with the input name + cachedHM = 0; + return FRR_NODLL; + } + + cachedHM = hModule; + wcsncpy(cachedName, dllName, MAX_PATH); + } + + FARPROC inpFunc = GetProcAddress(cachedHM, funcName); + if (inpFunc == 0) + { + // Function was not found + return FRR_NOFUNC; + } + + if (!InsertTrampoline((void*)inpFunc, (void*)newFunc, opcodes, (void**)origFunc)){ + // Failed to insert the trampoline to the target address + return FRR_FAILED; + } + + return FRR_OK; +} + +#endif /* !__TBB_WIN8UI_SUPPORT && defined(_WIN32) */ diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.h new file mode 100644 index 0000000000..40f9c429a9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbb_function_replacement.h @@ -0,0 +1,85 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_function_replacement_H +#define __TBB_function_replacement_H + +#include <stddef.h> //for ptrdiff_t +typedef enum { + FRR_OK, /* Succeeded in replacing the function */ + FRR_NODLL, /* The requested DLL was not found */ + FRR_NOFUNC, /* The requested function was not found */ + FRR_FAILED, /* The function replacement request failed */ +} FRR_TYPE; + +typedef enum { + FRR_FAIL, /* Required function */ + FRR_IGNORE, /* optional function */ +} FRR_ON_ERROR; + +typedef void (*FUNCPTR)(); + +#ifndef UNICODE +#define ReplaceFunction ReplaceFunctionA +#else +#define ReplaceFunction ReplaceFunctionW +#endif //UNICODE + +FRR_TYPE ReplaceFunctionA(const char *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc=NULL); +FRR_TYPE ReplaceFunctionW(const wchar_t *dllName, const char *funcName, FUNCPTR newFunc, const char ** opcodes, FUNCPTR* origFunc=NULL); + +// Utilities to convert between ADDRESS and LPVOID +union Int2Ptr { + UINT_PTR uip; + LPVOID lpv; +}; + +inline UINT_PTR Ptr2Addrint(LPVOID ptr); +inline LPVOID Addrint2Ptr(UINT_PTR ptr); + +// Use this value as the maximum size the trampoline region +const unsigned MAX_PROBE_SIZE = 32; + +// The size of a jump relative instruction "e9 00 00 00 00" +const unsigned SIZE_OF_RELJUMP = 5; + +// The size of jump RIP relative indirect "ff 25 00 00 00 00" +const unsigned SIZE_OF_INDJUMP = 6; + +// The size of address we put in the location (in Intel64) +const unsigned SIZE_OF_ADDRESS = 8; + +// The max distance covered in 32 bits: 2^31 - 1 - C +// where C should not be smaller than the size of a probe. +// The latter is important to correctly handle "backward" jumps. +const __int64 MAX_DISTANCE = (((__int64)1 << 31) - 1) - MAX_PROBE_SIZE; + +// The maximum number of distinct buffers in memory +const ptrdiff_t MAX_NUM_BUFFERS = 256; + +#endif //__TBB_function_replacement_H diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.cpp new file mode 100644 index 0000000000..491114ff90 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.cpp @@ -0,0 +1,235 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "TypeDefinitions.h" // Customize.h and proxy.h get included +#include "tbbmalloc_internal_api.h" + +#include "../tbb/itt_notify.h" // for __TBB_load_ittnotify() + +#include "../tbb/tbb_assert_impl.h" // Out-of-line TBB assertion handling routines are instantiated here. + +#undef UNICODE + +#if USE_PTHREAD +#include <dlfcn.h> +#elif USE_WINTHREAD +#include "tbb/machine/windows_api.h" +#endif + +#if MALLOC_CHECK_RECURSION + +#include <pthread.h> +#include <stdio.h> +#include <unistd.h> +#if __sun +#include <string.h> /* for memset */ +#include <errno.h> +#endif + +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED + +extern "C" { + +void safer_scalable_free( void*, void (*)(void*) ); +void * safer_scalable_realloc( void*, size_t, void* ); + +bool __TBB_internal_find_original_malloc(int num, const char *names[], void *table[]) __attribute__ ((weak)); + +} + +#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED */ +#endif /* MALLOC_CHECK_RECURSION */ + +namespace rml { +namespace internal { + +#if MALLOC_CHECK_RECURSION + +void* (*original_malloc_ptr)(size_t) = 0; +void (*original_free_ptr)(void*) = 0; +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED +static void* (*original_calloc_ptr)(size_t,size_t) = 0; +static void* (*original_realloc_ptr)(void*,size_t) = 0; +#endif + +#endif /* MALLOC_CHECK_RECURSION */ + +/** Caller is responsible for ensuring this routine is called exactly once. */ +extern "C" void MallocInitializeITT() { +#if DO_ITT_NOTIFY + tbb::internal::__TBB_load_ittnotify(); +#endif +} + +#if TBB_USE_DEBUG +#define DEBUG_SUFFIX "_debug" +#else +#define DEBUG_SUFFIX +#endif /* TBB_USE_DEBUG */ + +// MALLOCLIB_NAME is the name of the TBB memory allocator library. +#if _WIN32||_WIN64 +#define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" +#elif __APPLE__ +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib" +#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" +#elif __linux__ +#define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) +#else +#error Unknown OS +#endif + +void init_tbbmalloc() { +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED + if (malloc_proxy && __TBB_internal_find_original_malloc) { + const char *alloc_names[] = { "malloc", "free", "realloc", "calloc"}; + void *orig_alloc_ptrs[4]; + + if (__TBB_internal_find_original_malloc(4, alloc_names, orig_alloc_ptrs)) { + (void *&)original_malloc_ptr = orig_alloc_ptrs[0]; + (void *&)original_free_ptr = orig_alloc_ptrs[1]; + (void *&)original_realloc_ptr = orig_alloc_ptrs[2]; + (void *&)original_calloc_ptr = orig_alloc_ptrs[3]; + MALLOC_ASSERT( original_malloc_ptr!=malloc_proxy, + "standard malloc not found" ); +/* It's workaround for a bug in GNU Libc 2.9 (as it shipped with Fedora 10). + 1st call to libc's malloc should be not from threaded code. + */ + original_free_ptr(original_malloc_ptr(1024)); + original_malloc_found = 1; + } + } +#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED */ + +#if DO_ITT_NOTIFY + MallocInitializeITT(); +#endif + +/* Preventing TBB allocator library from unloading to prevent + resource leak, as memory is not released on the library unload. +*/ +#if USE_WINTHREAD && !__TBB_SOURCE_DIRECTLY_INCLUDED && !__TBB_WIN8UI_SUPPORT + // Prevent Windows from displaying message boxes if it fails to load library + UINT prev_mode = SetErrorMode (SEM_FAILCRITICALERRORS); + HMODULE lib = LoadLibrary(MALLOCLIB_NAME); + MALLOC_ASSERT(lib, "Allocator can't load ifself."); + SetErrorMode (prev_mode); +#endif /* USE_PTHREAD && !__TBB_SOURCE_DIRECTLY_INCLUDED */ +} + +#if !__TBB_SOURCE_DIRECTLY_INCLUDED +#if USE_WINTHREAD +extern "C" BOOL WINAPI DllMain( HINSTANCE /*hInst*/, DWORD callReason, LPVOID ) +{ + + if (callReason==DLL_THREAD_DETACH) + { + __TBB_mallocThreadShutdownNotification(); + } + else if (callReason==DLL_PROCESS_DETACH) + { + __TBB_mallocProcessShutdownNotification(); + } + return TRUE; +} +#else /* !USE_WINTHREAD */ +struct RegisterProcessShutdownNotification { +// Work around non-reentrancy in dlopen() on Android +#if !__TBB_USE_DLOPEN_REENTRANCY_WORKAROUND + RegisterProcessShutdownNotification() { + // prevents unloading, POSIX case + dlopen(MALLOCLIB_NAME, RTLD_NOW); + } +#endif /* !__ANDROID__ */ + ~RegisterProcessShutdownNotification() { + __TBB_mallocProcessShutdownNotification(); + } +}; + +static RegisterProcessShutdownNotification reg; +#endif /* !USE_WINTHREAD */ +#endif /* !__TBB_SOURCE_DIRECTLY_INCLUDED */ + +#if MALLOC_CHECK_RECURSION + +bool original_malloc_found; + +#if MALLOC_UNIXLIKE_OVERLOAD_ENABLED + +extern "C" { + +void * __TBB_internal_malloc(size_t size) +{ + return scalable_malloc(size); +} + +void * __TBB_internal_calloc(size_t num, size_t size) +{ + return scalable_calloc(num, size); +} + +int __TBB_internal_posix_memalign(void **memptr, size_t alignment, size_t size) +{ + return scalable_posix_memalign(memptr, alignment, size); +} + +void* __TBB_internal_realloc(void* ptr, size_t sz) +{ + return safer_scalable_realloc(ptr, sz, (void*&)original_realloc_ptr); +} + +void __TBB_internal_free(void *object) +{ + safer_scalable_free(object, original_free_ptr); +} + +} /* extern "C" */ + +#endif /* MALLOC_UNIXLIKE_OVERLOAD_ENABLED */ + +#endif /* MALLOC_CHECK_RECURSION */ + +} } // namespaces + +#if __TBB_ipf +/* It was found that on IPF inlining of __TBB_machine_lockbyte leads + to serious performance regression with ICC 10.0. So keep it out-of-line. + + This code is copy-pasted from tbb_misc.cpp. + */ +extern "C" intptr_t __TBB_machine_lockbyte( volatile unsigned char& flag ) { + if ( !__TBB_TryLockByte(flag) ) { + tbb::internal::atomic_backoff b; + do { + b.pause(); + } while ( !__TBB_TryLockByte(flag) ); + } + return 0; +} +#endif diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.rc b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.rc new file mode 100644 index 0000000000..68ca40d4d8 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc.rc @@ -0,0 +1,129 @@ +// Copyright 2005-2013 Intel Corporation. All Rights Reserved. +// +// This file is part of Threading Building Blocks. +// +// Threading Building Blocks is free software; you can redistribute it +// and/or modify it under the terms of the GNU General Public License +// version 2 as published by the Free Software Foundation. +// +// Threading Building Blocks is distributed in the hope that it will be +// useful, but WITHOUT ANY WARRANTY; without even the implied warranty +// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Threading Building Blocks; if not, write to the Free Software +// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +// +// As a special exception, you may use this file as part of a free software +// library without restriction. Specifically, if other files instantiate +// templates or use macros or inline functions from this file, or you compile +// this file and link it with other files to produce an executable, this +// file does not by itself cause the resulting executable to be covered by +// the GNU General Public License. This exception does not however +// invalidate any other reasons why the executable file might be covered by +// the GNU General Public License. + +// Microsoft Visual C++ generated resource script. +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NO_MFC 1 +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include <winresrc.h> +#define ENDL "\r\n" +#include "tbb/tbb_version.h" + +#define TBBMALLOC_VERNUMBERS TBB_VERSION_MAJOR, TBB_VERSION_MINOR, __TBB_VERSION_YMD +#define TBBMALLOC_VERSION __TBB_STRING(TBBMALLOC_VERNUMBERS) + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// manifest integration +#ifdef TBB_MANIFEST +#include "winuser.h" +2 RT_MANIFEST tbbmanifest.exe.manifest +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION TBBMALLOC_VERNUMBERS + PRODUCTVERSION TBB_VERNUMBERS + FILEFLAGSMASK 0x17L +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x40004L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "Intel Corporation\0" + VALUE "FileDescription", "Scalable Allocator library\0" + VALUE "FileVersion", TBBMALLOC_VERSION "\0" +//what is it? VALUE "InternalName", "tbbmalloc\0" + VALUE "LegalCopyright", "Copyright 2005-2013 Intel Corporation. All Rights Reserved.\0" + VALUE "LegalTrademarks", "\0" +#ifndef TBB_USE_DEBUG + VALUE "OriginalFilename", "tbbmalloc.dll\0" +#else + VALUE "OriginalFilename", "tbbmalloc_debug.dll\0" +#endif + VALUE "ProductName", "Intel(R) Threading Building Blocks for Windows\0" + VALUE "ProductVersion", TBB_VERSION "\0" + VALUE "Comments", TBB_VERSION_STRINGS "\0" + VALUE "PrivateBuild", "\0" + VALUE "SpecialBuild", "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal.h new file mode 100644 index 0000000000..23cdd84f53 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal.h @@ -0,0 +1,938 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbbmalloc_internal_H +#define __TBB_tbbmalloc_internal_H 1 + + +#include "TypeDefinitions.h" /* Also includes customization layer Customize.h */ + +#if USE_PTHREAD + // Some pthreads documentation says that <pthreads.h> must be first header. + #include <pthread.h> + typedef pthread_key_t tls_key_t; +#elif USE_WINTHREAD + #include "tbb/machine/windows_api.h" + typedef DWORD tls_key_t; +#else + #error Must define USE_PTHREAD or USE_WINTHREAD +#endif + +#include "tbb/tbb_config.h" +#if __TBB_LIBSTDCPP_EXCEPTION_HEADERS_BROKEN + #define _EXCEPTION_PTR_H /* prevents exception_ptr.h inclusion */ + #define _GLIBCXX_NESTED_EXCEPTION_H /* prevents nested_exception.h inclusion */ +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <limits.h> // for CHAR_BIT +#include <string.h> // for memset +#if MALLOC_CHECK_RECURSION +#include <new> /* for placement new */ +#endif +#include "tbb/scalable_allocator.h" +#include "tbbmalloc_internal_api.h" + +#if __sun || __SUNPRO_CC +#define __asm__ asm +#endif + +/********* Various compile-time options **************/ + +#if !__TBB_DEFINE_MIC && __TBB_MIC_NATIVE + #error Intel(R) Many Integrated Core Compiler does not define __MIC__ anymore. +#endif + +#define MALLOC_TRACE 0 + +#if MALLOC_TRACE +#define TRACEF(x) printf x +#else +#define TRACEF(x) ((void)0) +#endif /* MALLOC_TRACE */ + +#define ASSERT_TEXT NULL + +#define COLLECT_STATISTICS ( MALLOC_DEBUG && MALLOCENV_COLLECT_STATISTICS ) +#include "Statistics.h" + +/********* End compile-time options **************/ + +namespace rml { + +namespace internal { + +#if __TBB_MALLOC_LOCACHE_STAT +extern intptr_t mallocCalls, cacheHits; +extern intptr_t memAllocKB, memHitKB; +#endif + +//! Utility template function to prevent "unused" warnings by various compilers. +template<typename T> +void suppress_unused_warning( const T& ) {} + +/********** Various numeric parameters controlling allocations ********/ + +/* + * smabSize - the size of a block for allocation of small objects, + * it must be larger than maxSegregatedObjectSize. + */ +const uintptr_t slabSize = 16*1024; + +/* + * Large blocks cache cleanup frequency. + * It should be power of 2 for the fast checking. + */ +const unsigned cacheCleanupFreq = 256; + +/* + * Best estimate of cache line size, for the purpose of avoiding false sharing. + * Too high causes memory overhead, too low causes false-sharing overhead. + * Because, e.g., 32-bit code might run on a 64-bit system with a larger cache line size, + * it would probably be better to probe at runtime where possible and/or allow for an environment variable override, + * but currently this is still used for compile-time layout of class Block, so the change is not entirely trivial. + */ +#if __powerpc64__ || __ppc64__ || __bgp__ +const uint32_t estimatedCacheLineSize = 128; +#else +const uint32_t estimatedCacheLineSize = 64; +#endif + +/* + * Alignment of large (>= minLargeObjectSize) objects. + */ +const size_t largeObjectAlignment = estimatedCacheLineSize; + +/********** End of numeric parameters controlling allocations *********/ + +class BlockI; +struct LargeMemoryBlock; +struct ExtMemoryPool; +struct MemRegion; +class FreeBlock; +class TLSData; +class Backend; +class MemoryPool; +extern const uint32_t minLargeObjectSize; + +class TLSKey { + tls_key_t TLS_pointer_key; +public: + TLSKey(); + ~TLSKey(); + TLSData* getThreadMallocTLS() const; + void setThreadMallocTLS( TLSData * newvalue ); + TLSData* createTLS(MemoryPool *memPool, Backend *backend); +}; + +// TODO: make BitMaskBasic more general +// (currenty, it fits BitMaskMin well, but not as suitable for BitMaskMax) +template<unsigned NUM> +class BitMaskBasic { + static const int SZ = (NUM-1)/(CHAR_BIT*sizeof(uintptr_t))+1; + static const unsigned WORD_LEN = CHAR_BIT*sizeof(uintptr_t); + uintptr_t mask[SZ]; +protected: + void set(size_t idx, bool val) { + MALLOC_ASSERT(idx<NUM, ASSERT_TEXT); + + size_t i = idx / WORD_LEN; + int pos = WORD_LEN - idx % WORD_LEN - 1; + if (val) + AtomicOr(&mask[i], 1ULL << pos); + else + AtomicAnd(&mask[i], ~(1ULL << pos)); + } + int getMinTrue(unsigned startIdx) const { + size_t idx = startIdx / WORD_LEN; + uintptr_t curr; + int pos; + + if (startIdx % WORD_LEN) { // clear bits before startIdx + pos = WORD_LEN - startIdx % WORD_LEN; + curr = mask[idx] & ((1ULL<<pos) - 1); + } else + curr = mask[idx]; + + for (int i=idx; i<SZ; i++, curr=mask[i]) { + if (-1 != (pos = BitScanRev(curr))) + return (i+1)*WORD_LEN - pos - 1; + } + return -1; + } +public: + void reset() { for (int i=0; i<SZ; i++) mask[i] = 0; } +}; + +template<unsigned NUM> +class BitMaskMin : public BitMaskBasic<NUM> { +public: + void set(size_t idx, bool val) { BitMaskBasic<NUM>::set(idx, val); } + int getMinTrue(unsigned startIdx) const { + return BitMaskBasic<NUM>::getMinTrue(startIdx); + } +}; + +template<unsigned NUM> +class BitMaskMax : public BitMaskBasic<NUM> { +public: + void set(size_t idx, bool val) { + BitMaskBasic<NUM>::set(NUM - 1 - idx, val); + } + int getMaxTrue(unsigned startIdx) const { + int p = BitMaskBasic<NUM>::getMinTrue(NUM-startIdx-1); + return -1==p? -1 : (int)NUM - 1 - p; + } +}; + +/* cache blocks in range [MinSize; MaxSize) in bins with CacheStep + TooLargeFactor -- when cache size treated "too large" in comparison to user data size + OnMissFactor -- If cache miss occurred and cache was cleaned, + set ageThreshold to OnMissFactor * the difference + between current time and last time cache was cleaned. + LongWaitFactor -- to detect rarely-used bins and forget about their usage history +*/ +template<size_t MIN_SIZE, size_t MAX_SIZE, uint32_t CACHE_STEP, int TOO_LARGE, + int ON_MISS, int LONG_WAIT> +struct LargeObjectCacheProps { + static const size_t MinSize = MIN_SIZE, MaxSize = MAX_SIZE; + static const uint32_t CacheStep = CACHE_STEP; + static const int TooLargeFactor = TOO_LARGE, OnMissFactor = ON_MISS, + LongWaitFactor = LONG_WAIT; +}; + +template<typename Props> +class LargeObjectCacheImpl { + // The number of bins to cache large objects. + static const uint32_t numBins = (Props::MaxSize-Props::MinSize)/Props::CacheStep; + + typedef BitMaskMax<numBins> BinBitMask; + + // Current sizes of used and cached objects. It's calculated while we are + // traversing bins, and used for isLOCTooLarge() check at the same time. + class BinsSummary { + size_t usedSz; + size_t cachedSz; + public: + BinsSummary() : usedSz(0), cachedSz(0) {} + // "too large" criteria + bool isLOCTooLarge() const { return cachedSz > Props::TooLargeFactor*usedSz; } + void update(size_t usedSize, size_t cachedSize) { + usedSz += usedSize; + cachedSz += cachedSize; + } + void reset() { usedSz = cachedSz = 0; } + }; + + // 2-linked list of same-size cached blocks ordered by age (oldest on top) + // TODO: are we really want the list to be 2-linked? This allows us + // reduce memory consumption and do less operations under lock. + // TODO: try to switch to 32-bit logical time to save space in CacheBin + // and move bins to different cache lines. + class CacheBin { + LargeMemoryBlock *first, + *last; + /* age of an oldest block in the list; equal to last->age, if last defined, + used for quick cheching it without acquiring the lock. */ + uintptr_t oldest; + /* currAge when something was excluded out of list because of the age, + not because of cache hit */ + uintptr_t lastCleanedAge; + /* Current threshold value for the blocks of a particular size. + Set on cache miss. */ + intptr_t ageThreshold; + + /* total size of all objects corresponding to the bin and allocated by user */ + size_t usedSize, + /* total size of all objects cached in the bin */ + cachedSize; + /* time of last hit for the bin */ + intptr_t lastHit; + /* time of last get called for the bin */ + uintptr_t lastGet; + + MallocMutex lock; + /* should be placed in zero-initialized memory, ctor not needed. */ + CacheBin(); + void forgetOutdatedState(uintptr_t currT); + public: + void init() { memset(this, 0, sizeof(CacheBin)); } + LargeMemoryBlock *putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *head, BinBitMask *bitMask, int idx); + inline LargeMemoryBlock *get(size_t size, uintptr_t currTime, bool *setNonEmpty); + void decreaseThreshold() { + if (ageThreshold) + ageThreshold = (ageThreshold + lastHit)/2; + } + void updateBinsSummary(BinsSummary *binsSummary) const { + binsSummary->update(usedSize, cachedSize); + } + bool cleanToThreshold(Backend *backend, BinBitMask *bitMask, uintptr_t currTime, int idx); + bool cleanAll(Backend *backend, BinBitMask *bitMask, int idx); + void decrUsedSize(size_t size, BinBitMask *bitMask, int idx) { + MallocMutex::scoped_lock scoped_cs(lock); + usedSize -= size; + if (!usedSize && !first) + bitMask->set(idx, false); + } + size_t getSize() const { return cachedSize; } + size_t getUsedSize() const { return usedSize; } + size_t reportStat(int num, FILE *f); + }; + + intptr_t tooLargeLOC; // how many times LOC was "too large" + // for fast finding of used bins and bins with non-zero usedSize; + // indexed from the end, as we need largest 1st + BinBitMask bitMask; + // bins with lists of recently freed large blocks cached for re-use + CacheBin bin[numBins]; + +public: + static int sizeToIdx(size_t size) { + MALLOC_ASSERT(Props::MinSize <= size && size < Props::MaxSize, ASSERT_TEXT); + return (size-Props::MinSize)/Props::CacheStep; + } + static int getNumBins() { return numBins; } + + void putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *largeBlock); + LargeMemoryBlock *get(uintptr_t currTime, size_t size); + + void rollbackCacheState(size_t size); + uintptr_t cleanupCacheIfNeeded(ExtMemoryPool *extMemPool, uintptr_t currTime); + bool regularCleanup(Backend *backend, uintptr_t currAge); + bool cleanAll(Backend *backend); + void reset() { + tooLargeLOC = 0; + for (int i = numBins-1; i >= 0; i--) + bin[i].init(); + bitMask.reset(); + } +#if __TBB_MALLOC_LOCACHE_STAT + void reportStat(FILE *f); +#endif +#if __TBB_MALLOC_WHITEBOX_TEST + size_t getLOCSize() const; + size_t getUsedSize() const; +#endif +}; + +class LargeObjectCache { + static const size_t minLargeSize = 8*1024, + maxLargeSize = 8*1024*1024, + maxHugeSize = 128*1024*1024; +public: + // Difference between object sizes in large block bins + static const uint32_t largeBlockCacheStep = 8*1024, + hugeBlockCacheStep = 512*1024; +private: + typedef LargeObjectCacheImpl< LargeObjectCacheProps<minLargeSize, maxLargeSize, largeBlockCacheStep, 2, 2, 16> > LargeCacheType; + typedef LargeObjectCacheImpl< LargeObjectCacheProps<maxLargeSize, maxHugeSize, hugeBlockCacheStep, 1, 1, 4> > HugeCacheType; + + LargeCacheType largeCache; + HugeCacheType hugeCache; + + /* logical time, incremented on each put/get operation + To prevent starvation between pools, keep separatly for each pool. + Overflow is OK, as we only want difference between + its current value and some recent. + + Both malloc and free should increment logical time, as in + a different case multiple cached blocks would have same age, + and accuracy of predictors suffers. + */ + uintptr_t cacheCurrTime; + + static int sizeToIdx(size_t size); + bool doRegularCleanup(Backend *backend, uintptr_t currTime); +public: + void put(ExtMemoryPool *extMemPool, LargeMemoryBlock *largeBlock); + void putList(ExtMemoryPool *extMemPool, LargeMemoryBlock *head); + LargeMemoryBlock *get(Backend *backend, size_t size); + + void rollbackCacheState(size_t size); + void cleanupCacheIfNeeded(Backend *backend, uintptr_t currTime); + void cleanupCacheIfNeededOnRange(Backend *backend, uintptr_t range, uintptr_t currTime); + bool regularCleanup(Backend *backend) { + return doRegularCleanup(backend, FencedLoad((intptr_t&)cacheCurrTime)); + } + bool cleanAll(Backend *backend); + void reset() { + largeCache.reset(); + hugeCache.reset(); + } +#if __TBB_MALLOC_LOCACHE_STAT + void reportStat(FILE *f); +#endif +#if __TBB_MALLOC_WHITEBOX_TEST + size_t getLOCSize() const; + size_t getUsedSize() const; +#endif + static size_t alignToBin(size_t size) { + return size<maxLargeSize? alignUp(size, largeBlockCacheStep) + : alignUp(size, hugeBlockCacheStep); + } + + uintptr_t getCurrTime(); + uintptr_t getCurrTimeRange(uintptr_t range); +}; + +class BackRefIdx { // composite index to backreference array +private: + uint16_t master; // index in BackRefMaster + uint16_t largeObj:1; // is this object "large"? + uint16_t offset :15; // offset from beginning of BackRefBlock +public: + BackRefIdx() : master((uint16_t)-1) {} + bool isInvalid() const { return master == (uint16_t)-1; } + bool isLargeObject() const { return largeObj; } + uint16_t getMaster() const { return master; } + uint16_t getOffset() const { return offset; } + + // only newBackRef can modify BackRefIdx + static BackRefIdx newBackRef(bool largeObj); +}; + +// Block header is used during block coalescing +// and must be preserved in used blocks. +class BlockI { + intptr_t blockState[2]; +}; + +struct LargeMemoryBlock : public BlockI { + LargeMemoryBlock *next, // ptrs in list of cached blocks + *prev, + // 2-linked list of pool's large objects + // Used to destroy backrefs on pool destroy/reset (backrefs are global) + // and for releasing all non-binned blocks. + *gPrev, + *gNext; + uintptr_t age; // age of block while in cache + size_t objectSize; // the size requested by a client + size_t unalignedSize; // the size requested from getMemory + BackRefIdx backRefIdx; // cached here, used copy is in LargeObjectHdr +}; + +// global state of blocks currently in processing +class BackendSync { + // Class instances should reside in zero-initialized memory! + // The number of blocks currently removed from a bin and not returned back + intptr_t blocksInProcessing; // to another + intptr_t binsModifications; // incremented on every bin modification +public: + void consume() { AtomicIncrement(blocksInProcessing); } + void pureSignal() { AtomicIncrement(binsModifications); } + void signal() { +#if __TBB_MALLOC_BACKEND_STAT + MALLOC_ITT_SYNC_RELEASING(&blocksInProcessing); +#endif + AtomicIncrement(binsModifications); + intptr_t prev = AtomicAdd(blocksInProcessing, -1); + MALLOC_ASSERT(prev > 0, ASSERT_TEXT); + suppress_unused_warning(prev); + } + intptr_t getNumOfMods() const { return FencedLoad(binsModifications); } + // return true if need re-do the search + bool waitTillSignalled(intptr_t startModifiedCnt) { + intptr_t myBlocksNum = FencedLoad(blocksInProcessing); + if (!myBlocksNum) { + // no threads, but were bins modified since scanned? + return startModifiedCnt != getNumOfMods(); + } +#if __TBB_MALLOC_BACKEND_STAT + MALLOC_ITT_SYNC_PREPARE(&blocksInProcessing); +#endif + for (;;) { + SpinWaitWhileEq(blocksInProcessing, myBlocksNum); + if (myBlocksNum > blocksInProcessing) + break; + myBlocksNum = FencedLoad(blocksInProcessing); + } +#if __TBB_MALLOC_BACKEND_STAT + MALLOC_ITT_SYNC_ACQUIRED(&blocksInProcessing); +#endif + return true; + } +}; + +class CoalRequestQ { // queue of free blocks that coalescing was delayed + FreeBlock *blocksToFree; +public: + FreeBlock *getAll(); // return current list of blocks and make queue empty + void putBlock(FreeBlock *fBlock); +}; + +class MemExtendingSema { + intptr_t active; +public: + bool wait() { + bool rescanBins = false; + // up to 3 threads can add more memory from OS simultaneously, + // rest of threads have to wait + for (;;) { + intptr_t prevCnt = FencedLoad(active); + if (prevCnt < 3) { + intptr_t n = AtomicCompareExchange(active, prevCnt+1, prevCnt); + if (n == prevCnt) + break; + } else { + SpinWaitWhileEq(active, prevCnt); + rescanBins = true; + break; + } + } + return rescanBins; + } + void signal() { AtomicAdd(active, -1); } +}; + +class Backend { +private: +/* Blocks in range [minBinnedSize; getMaxBinnedSize()] are kept in bins, + one region can contains several blocks. Larger blocks are allocated directly + and one region always contains one block. +*/ + enum { + minBinnedSize = 8*1024UL, + /* If huge pages are available, maxBinned_HugePage used. + If not, maxBinned_SmallPage is the thresold. + TODO: use pool's granularity for upper bound setting.*/ + maxBinned_SmallPage = 1024*1024UL, + // TODO: support other page sizes + maxBinned_HugePage = 4*1024*1024UL + }; +public: + static const int freeBinsNum = + (maxBinned_HugePage-minBinnedSize)/LargeObjectCache::largeBlockCacheStep + 1; + + // if previous access missed per-thread slabs pool, + // allocate numOfSlabAllocOnMiss blocks in advance + static const int numOfSlabAllocOnMiss = 2; + + enum { + NO_BIN = -1, + HUGE_BIN = freeBinsNum-1 + }; + + // Bin keeps 2-linked list of free blocks. It must be 2-linked + // because during coalescing a block it's removed from a middle of the list. + struct Bin { + FreeBlock *head, + *tail; + MallocMutex tLock; + + void removeBlock(FreeBlock *fBlock); + void reset() { head = tail = 0; } +#if __TBB_MALLOC_BACKEND_STAT + size_t countFreeBlocks(); +#endif + bool empty() const { return !head; } + }; + + // array of bins accomplished bitmask for fast finding of non-empty bins + class IndexedBins { + BitMaskMin<Backend::freeBinsNum> bitMask; + Bin freeBins[Backend::freeBinsNum]; + public: + FreeBlock *getBlock(int binIdx, BackendSync *sync, size_t size, + bool resSlabAligned, bool alignedBin, bool wait, + int *resLocked); + void lockRemoveBlock(int binIdx, FreeBlock *fBlock); + void addBlock(int binIdx, FreeBlock *fBlock, size_t blockSz, bool addToTail); + bool tryAddBlock(int binIdx, FreeBlock *fBlock, bool addToTail); + int getMinNonemptyBin(unsigned startBin) const { + int p = bitMask.getMinTrue(startBin); + return p == -1 ? Backend::freeBinsNum : p; + } + void verify(); +#if __TBB_MALLOC_BACKEND_STAT + void reportStat(FILE *f); +#endif + void reset(); + }; + // number of OS/pool callback calls for more memory + class AskMemFromOSCounter { + intptr_t cnt; + public: + void OSasked() { AtomicIncrement(cnt); } + intptr_t get() const { return FencedLoad(cnt); } + }; + +private: + ExtMemoryPool *extMemPool; + // used for release every region on pool destroying + MemRegion *regionList; + MallocMutex regionListLock; + + CoalRequestQ coalescQ; // queue of coalescing requests + BackendSync bkndSync; + // semaphore protecting adding more more memory from OS + MemExtendingSema memExtendingSema; + + // Using of maximal observed requested size allows descrease + // memory consumption for small requests and descrease fragmentation + // for workloads when small and large allocation requests are mixed. + // TODO: decrease, not only increase it + size_t maxRequestedSize; + void correctMaxRequestSize(size_t requestSize); + + size_t addNewRegion(size_t rawSize, bool exact); + FreeBlock *findBlockInRegion(MemRegion *region); + void startUseBlock(MemRegion *region, FreeBlock *fBlock); + void releaseRegion(MemRegion *region); + + bool askMemFromOS(size_t totalReqSize, intptr_t startModifiedCnt, + int *lockedBinsThreshold, + int numOfLockedBins, bool *largeBinsUpdated); + FreeBlock *genericGetBlock(int num, size_t size, bool resSlabAligned); + void genericPutBlock(FreeBlock *fBlock, size_t blockSz); + FreeBlock *getFromAlignedSpace(int binIdx, int num, size_t size, bool resSlabAligned, bool wait, int *locked); + FreeBlock *getFromBin(int binIdx, int num, size_t size, bool resSlabAligned, int *locked); + + FreeBlock *doCoalesc(FreeBlock *fBlock, MemRegion **memRegion); + void coalescAndPutList(FreeBlock *head, bool forceCoalescQDrop); + bool scanCoalescQ(bool forceCoalescQDrop); + void coalescAndPut(FreeBlock *fBlock, size_t blockSz); + + void removeBlockFromBin(FreeBlock *fBlock); + + void *getRawMem(size_t &size) const; + void freeRawMem(void *object, size_t size) const; + + void putLargeBlock(LargeMemoryBlock *lmb); +public: + void verify(); +#if __TBB_MALLOC_BACKEND_STAT + void reportStat(FILE *f); +#endif + bool bootstrap(ExtMemoryPool *extMemoryPool) { + extMemPool = extMemoryPool; + return addNewRegion(2*1024*1024, /*exact=*/false); + } + void reset(); + bool destroy(); + + BlockI *getSlabBlock(int num) { + BlockI *b = (BlockI*) + genericGetBlock(num, slabSize, /*resSlabAligned=*/true); + MALLOC_ASSERT(isAligned(b, slabSize), ASSERT_TEXT); + return b; + } + void putSlabBlock(BlockI *block) { + genericPutBlock((FreeBlock *)block, slabSize); + } + void *getBackRefSpace(size_t size, bool *rawMemUsed); + void putBackRefSpace(void *b, size_t size, bool rawMemUsed); + + bool inUserPool() const; + + LargeMemoryBlock *getLargeBlock(size_t size); + void returnLargeObject(LargeMemoryBlock *lmb); + + AskMemFromOSCounter askMemFromOSCounter; +private: + static int sizeToBin(size_t size) { + if (size >= maxBinned_HugePage) + return HUGE_BIN; + else if (size < minBinnedSize) + return NO_BIN; + + int bin = (size - minBinnedSize)/LargeObjectCache::largeBlockCacheStep; + + MALLOC_ASSERT(bin < HUGE_BIN, "Invalid size."); + return bin; + } +#if __TBB_MALLOC_BACKEND_STAT + static size_t binToSize(int bin) { + MALLOC_ASSERT(bin < HUGE_BIN, "Invalid bin."); + + return bin*largeBlockCacheStep + minBinnedSize; + } +#endif + static bool toAlignedBin(FreeBlock *block, size_t size) { + return isAligned((char*)block+size, slabSize) + && size >= slabSize; + } + inline size_t getMaxBinnedSize(); + + IndexedBins freeLargeBins, + freeAlignedBins; +}; + +class AllLargeBlocksList { + MallocMutex largeObjLock; + LargeMemoryBlock *loHead; +public: + LargeMemoryBlock *getHead() { return loHead; } + void add(LargeMemoryBlock *lmb); + void remove(LargeMemoryBlock *lmb); + void removeAll(Backend *backend); +}; + +// An TBB allocator mode that can be controlled by user +// via API/environment variable. Must be placed in zero-initialized memory. +// External synchronization assumed. +// TODO: TBB_VERSION support +class AllocControlledMode { + intptr_t val; + bool setDone; +public: + intptr_t get() const { + MALLOC_ASSERT(setDone, ASSERT_TEXT); + return val; + } + void set(intptr_t newVal) { // note set() can be called before init() + val = newVal; + setDone = true; + } + // envName - environment variable to get controlled mode + void initReadEnv(const char *envName, intptr_t defaultVal); +}; + +// init() and printStatus() is called only under global initialization lock. +// Race is possible between registerAllocation() and registerReleasing(), +// harm is that up to single huge page releasing is missed (because failure +// to get huge page is registred only 1st time), that is negligible. +// setMode is also can be called concurrently. +// Object must reside in zero-initialized memory +class HugePagesStatus { +private: + AllocControlledMode requestedMode; // changed only by user + // to keep enabled and requestedMode consistent + MallocMutex setModeLock; + size_t pageSize; + intptr_t needActualStatusPrint; + + static void doPrintStatus(bool state, const char *stateName); +public: + // both variables are changed only inside HugePagesStatus + intptr_t enabled; + // Have we got huge pages at all? It's used when large hugepage-aligned + // region is releasing, to find can it release some huge pages or not. + intptr_t wasObserved; + + size_t getSize() const { + MALLOC_ASSERT(pageSize, ASSERT_TEXT); + return pageSize; + } + void printStatus(); + void registerAllocation(bool available); + void registerReleasing(size_t size); + + void init(size_t hugePageSize) { + MALLOC_ASSERT(!hugePageSize || isPowerOfTwo(hugePageSize), + "Only memory pages of a power-of-two size are supported."); + MALLOC_ASSERT(!pageSize, "Huge page size can't be set twice."); + pageSize = hugePageSize; + + MallocMutex::scoped_lock lock(setModeLock); + requestedMode.initReadEnv("TBB_MALLOC_USE_HUGE_PAGES", 0); + enabled = pageSize && requestedMode.get(); + } + void setMode(intptr_t newVal) { + MallocMutex::scoped_lock lock(setModeLock); + requestedMode.set(newVal); + enabled = pageSize && newVal; + } +}; + +extern HugePagesStatus hugePages; + +struct ExtMemoryPool { + Backend backend; + + intptr_t poolId; + // to find all large objects + AllLargeBlocksList lmbList; + // Callbacks to be used instead of MapMemory/UnmapMemory. + rawAllocType rawAlloc; + rawFreeType rawFree; + size_t granularity; + bool keepAllMemory, + delayRegsReleasing, + fixedPool; + TLSKey tlsPointerKey; // per-pool TLS key + + LargeObjectCache loc; + + bool init(intptr_t poolId, rawAllocType rawAlloc, rawFreeType rawFree, + size_t granularity, bool keepAllMemory, bool fixedPool); + void initTLS(); + + // i.e., not system default pool for scalable_malloc/scalable_free + bool userPool() const { return rawAlloc; } + + // true if something has beed released + bool softCachesCleanup(); + bool releaseTLCaches(); + // TODO: to release all thread's pools, not just current thread + bool hardCachesCleanup(); + void reset() { + lmbList.removeAll(&backend); + loc.reset(); + tlsPointerKey.~TLSKey(); + backend.reset(); + } + void destroy() { + // pthread_key_dtors must be disabled before memory unmapping + // TODO: race-free solution + tlsPointerKey.~TLSKey(); + if (rawFree || !userPool()) + backend.destroy(); + } + bool mustBeAddedToGlobalLargeBlockList() const { return userPool(); } + void delayRegionsReleasing(bool mode) { delayRegsReleasing = mode; } + inline bool regionsAreReleaseable() const; + + LargeMemoryBlock *mallocLargeObject(size_t allocationSize); + void freeLargeObject(LargeMemoryBlock *lmb); + void freeLargeObjectList(LargeMemoryBlock *head); +}; + +inline bool Backend::inUserPool() const { return extMemPool->userPool(); } + +struct LargeObjectHdr { + LargeMemoryBlock *memoryBlock; + /* Backreference points to LargeObjectHdr. + Duplicated in LargeMemoryBlock to reuse in subsequent allocations. */ + BackRefIdx backRefIdx; +}; + +struct FreeObject { + FreeObject *next; +}; + +/******* A helper class to support overriding malloc with scalable_malloc *******/ +#if MALLOC_CHECK_RECURSION + +class RecursiveMallocCallProtector { + // pointer to an automatic data of holding thread + static void *autoObjPtr; + static MallocMutex rmc_mutex; + static pthread_t owner_thread; +/* Under FreeBSD 8.0 1st call to any pthread function including pthread_self + leads to pthread initialization, that causes malloc calls. As 1st usage of + RecursiveMallocCallProtector can be before pthread initialized, pthread calls + can't be used in 1st instance of RecursiveMallocCallProtector. + RecursiveMallocCallProtector is used 1st time in checkInitialization(), + so there is a guarantee that on 2nd usage pthread is initialized. + No such situation observed with other supported OSes. + */ +#if __FreeBSD__ + static bool canUsePthread; +#else + static const bool canUsePthread = true; +#endif +/* + The variable modified in checkInitialization, + so can be read without memory barriers. + */ + static bool mallocRecursionDetected; + + MallocMutex::scoped_lock* lock_acquired; + char scoped_lock_space[sizeof(MallocMutex::scoped_lock)+1]; + + static uintptr_t absDiffPtr(void *x, void *y) { + uintptr_t xi = (uintptr_t)x, yi = (uintptr_t)y; + return xi > yi ? xi - yi : yi - xi; + } +public: + + RecursiveMallocCallProtector() : lock_acquired(NULL) { + lock_acquired = new (scoped_lock_space) MallocMutex::scoped_lock( rmc_mutex ); + if (canUsePthread) + owner_thread = pthread_self(); + autoObjPtr = &scoped_lock_space; + } + ~RecursiveMallocCallProtector() { + if (lock_acquired) { + autoObjPtr = NULL; + lock_acquired->~scoped_lock(); + } + } + static bool sameThreadActive() { + if (!autoObjPtr) // fast path + return false; + // Some thread has an active recursive call protector; check if the current one. + // Exact pthread_self based test + if (canUsePthread) { + if (pthread_equal( owner_thread, pthread_self() )) { + mallocRecursionDetected = true; + return true; + } else + return false; + } + // inexact stack size based test + const uintptr_t threadStackSz = 2*1024*1024; + int dummy; + return absDiffPtr(autoObjPtr, &dummy)<threadStackSz; + } + static bool noRecursion(); +/* The function is called on 1st scalable_malloc call to check if malloc calls + scalable_malloc (nested call must set mallocRecursionDetected). */ + static void detectNaiveOverload() { + if (!malloc_proxy) { +#if __FreeBSD__ +/* If !canUsePthread, we can't call pthread_self() before, but now pthread + is already on, so can do it. False positives here lead to silent switching + from malloc to mmap for all large allocations with bad performance impact. */ + if (!canUsePthread) { + canUsePthread = true; + owner_thread = pthread_self(); + } +#endif + free(malloc(1)); + } + } +}; + +#else + +class RecursiveMallocCallProtector { +public: + RecursiveMallocCallProtector() {} + ~RecursiveMallocCallProtector() {} +}; + +#endif /* MALLOC_CHECK_RECURSION */ + +bool isMallocInitializedExt(); + +bool isLargeObject(void *object); + +unsigned int getThreadId(); + +bool initBackRefMaster(Backend *backend); +void destroyBackRefMaster(Backend *backend); +void removeBackRef(BackRefIdx backRefIdx); +void setBackRef(BackRefIdx backRefIdx, void *newPtr); +void *getBackRef(BackRefIdx backRefIdx); + +} // namespace internal +} // namespace rml + +#endif // __TBB_tbbmalloc_internal_H diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal_api.h b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal_api.h new file mode 100644 index 0000000000..c6784496d9 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/tbbmalloc_internal_api.h @@ -0,0 +1,45 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#ifndef __TBB_tbbmalloc_internal_api_H +#define __TBB_tbbmalloc_internal_api_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +void __TBB_mallocProcessShutdownNotification(); +#if _WIN32||_WIN64 +void __TBB_mallocThreadShutdownNotification(); +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif // __TBB_tbbmalloc_internal_api_H diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-gcc-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-gcc-tbbmalloc-export.def new file mode 100644 index 0000000000..bbf6d7183f --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-gcc-tbbmalloc-export.def @@ -0,0 +1,57 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +scalable_calloc; +scalable_free; +scalable_malloc; +scalable_realloc; +scalable_posix_memalign; +scalable_aligned_malloc; +scalable_aligned_realloc; +scalable_aligned_free; +safer_scalable_free; +safer_scalable_realloc; +scalable_msize; +scalable_allocation_mode; +safer_scalable_msize; +safer_scalable_aligned_realloc; +/* memory pool stuff */ +_ZN3rml10pool_resetEPNS_10MemoryPoolE; +_ZN3rml11pool_createEiPKNS_13MemPoolPolicyE; +_ZN3rml14pool_create_v1EiPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE; +_ZN3rml11pool_mallocEPNS_10MemoryPoolEj; +_ZN3rml12pool_destroyEPNS_10MemoryPoolE; +_ZN3rml9pool_freeEPNS_10MemoryPoolEPv; +_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvj; +_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvjj; +_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEjj; + +local:*; +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-tbbmalloc-export.def new file mode 100644 index 0000000000..43c97d7422 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win32-tbbmalloc-export.def @@ -0,0 +1,52 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +; frontend.cpp +scalable_calloc +scalable_free +scalable_malloc +scalable_realloc +scalable_posix_memalign +scalable_aligned_malloc +scalable_aligned_realloc +scalable_aligned_free +safer_scalable_free +safer_scalable_realloc +scalable_msize +scalable_allocation_mode +safer_scalable_msize +safer_scalable_aligned_realloc +?pool_create@rml@@YAPAVMemoryPool@1@HPBUMemPoolPolicy@1@@Z +?pool_create_v1@rml@@YA?AW4MemPoolError@1@HPBUMemPoolPolicy@1@PAPAVMemoryPool@1@@Z +?pool_destroy@rml@@YA_NPAVMemoryPool@1@@Z +?pool_malloc@rml@@YAPAXPAVMemoryPool@1@I@Z +?pool_free@rml@@YA_NPAVMemoryPool@1@PAX@Z +?pool_reset@rml@@YA_NPAVMemoryPool@1@@Z +?pool_realloc@rml@@YAPAXPAVMemoryPool@1@PAXI@Z +?pool_aligned_realloc@rml@@YAPAXPAVMemoryPool@1@PAXII@Z +?pool_aligned_malloc@rml@@YAPAXPAVMemoryPool@1@II@Z diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-gcc-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-gcc-tbbmalloc-export.def new file mode 100644 index 0000000000..646f33867b --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-gcc-tbbmalloc-export.def @@ -0,0 +1,57 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +{ +global: +scalable_calloc; +scalable_free; +scalable_malloc; +scalable_realloc; +scalable_posix_memalign; +scalable_aligned_malloc; +scalable_aligned_realloc; +scalable_aligned_free; +safer_scalable_free; +safer_scalable_realloc; +scalable_msize; +scalable_allocation_mode; +safer_scalable_msize; +safer_scalable_aligned_realloc; +/* memory pool stuff */ +_ZN3rml10pool_resetEPNS_10MemoryPoolE; +_ZN3rml11pool_createExPKNS_13MemPoolPolicyE; +_ZN3rml14pool_create_v1ExPKNS_13MemPoolPolicyEPPNS_10MemoryPoolE; +_ZN3rml11pool_mallocEPNS_10MemoryPoolEy; +_ZN3rml12pool_destroyEPNS_10MemoryPoolE; +_ZN3rml9pool_freeEPNS_10MemoryPoolEPv; +_ZN3rml12pool_reallocEPNS_10MemoryPoolEPvy; +_ZN3rml20pool_aligned_reallocEPNS_10MemoryPoolEPvyy; +_ZN3rml19pool_aligned_mallocEPNS_10MemoryPoolEyy; + +local:*; +}; diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-tbbmalloc-export.def new file mode 100644 index 0000000000..7b18b03ba7 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/win64-tbbmalloc-export.def @@ -0,0 +1,53 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +; frontend.cpp +scalable_calloc +scalable_free +scalable_malloc +scalable_realloc +scalable_posix_memalign +scalable_aligned_malloc +scalable_aligned_realloc +scalable_aligned_free +safer_scalable_free +safer_scalable_realloc +scalable_msize +scalable_allocation_mode +safer_scalable_msize +safer_scalable_aligned_realloc +; memory pool stuff +?pool_create@rml@@YAPEAVMemoryPool@1@_JPEBUMemPoolPolicy@1@@Z +?pool_create_v1@rml@@YA?AW4MemPoolError@1@_JPEBUMemPoolPolicy@1@PEAPEAVMemoryPool@1@@Z +?pool_destroy@rml@@YA_NPEAVMemoryPool@1@@Z +?pool_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K@Z +?pool_free@rml@@YA_NPEAVMemoryPool@1@PEAX@Z +?pool_reset@rml@@YA_NPEAVMemoryPool@1@@Z +?pool_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K@Z +?pool_aligned_realloc@rml@@YAPEAXPEAVMemoryPool@1@PEAX_K2@Z +?pool_aligned_malloc@rml@@YAPEAXPEAVMemoryPool@1@_K1@Z diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/xbox360-tbbmalloc-export.def b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/xbox360-tbbmalloc-export.def new file mode 100644 index 0000000000..4a41694413 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbmalloc/xbox360-tbbmalloc-export.def @@ -0,0 +1,42 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +EXPORTS + +; MemoryAllocator.cpp +scalable_calloc @1 +scalable_free @2 +scalable_malloc @3 +scalable_realloc @4 +scalable_posix_memalign @5 +scalable_aligned_malloc @6 +scalable_aligned_realloc @7 +scalable_aligned_free @8 +safer_scalable_free @9 +safer_scalable_realloc @10 +scalable_msize @11 +safer_scalable_msize @12 +safer_scalable_aligned_realloc @13 diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy-windows.asm b/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy-windows.asm new file mode 100644 index 0000000000..734cc2e3f1 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy-windows.asm @@ -0,0 +1,121 @@ +; Copyright 2005-2013 Intel Corporation. All Rights Reserved. +; +; This file is part of Threading Building Blocks. +; +; Threading Building Blocks is free software; you can redistribute it +; and/or modify it under the terms of the GNU General Public License +; version 2 as published by the Free Software Foundation. +; +; Threading Building Blocks is distributed in the hope that it will be +; useful, but WITHOUT ANY WARRANTY; without even the implied warranty +; of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with Threading Building Blocks; if not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +; +; As a special exception, you may use this file as part of a free software +; library without restriction. Specifically, if other files instantiate +; templates or use macros or inline functions from this file, or you compile +; this file and link it with other files to produce an executable, this +; file does not by itself cause the resulting executable to be covered by +; the GNU General Public License. This exception does not however +; invalidate any other reasons why the executable file might be covered by +; the GNU General Public License. + +#include "tbb/tbb_config.h" + +// __TBB_STRING macro defined in "tbb_stddef.h". However, we cannot include "tbb_stddef.h" +// because it contains a lot of C/C++ definitions. So, we have to define __TBB_STRING here: +#define __TBB_STRING_AUX( x ) #x +#define __TBB_STRING( x ) __TBB_STRING_AUX( x ) + +// Eliminate difference between IA-32 and Intel 64: AWORD is a type of pointer, LANG is language +// specification for extern directive. +#ifdef ARCH_ia32 + #define AWORD dword + #define LANG c +#else + #define AWORD qword + #define LANG +#endif + +#ifdef ARCH_ia32 + // These directives are required for IA32 architecture only. + .686 + .model flat, syscall +#endif + +/* + Symbol names. +*/ + +// Note: masm for IA-32 does not like symbols defined as "name:" in data sections, +// so we have to define symbols with "name label type" directive instead. + +fname macro sym:req + align sizeof AWORD + Ln_&sym& label byte + byte "&sym&", 0 +endm + +.const // Symbol names are constants. +#define __TBB_SYMBOL( sym ) fname sym +#include __TBB_STRING( __TBB_LST ) + +/* + Symbol descriptors. +*/ + +extern LANG __tbb_internal_runtime_loader_stub : AWORD + +fsymbol macro sym:req + Ls_&sym& label AWORD + AWORD __tbb_internal_runtime_loader_stub + AWORD Ln_&sym& + dword sizeof AWORD + dword 1 +endm + +.data +align sizeof AWORD +public LANG __tbb_internal_runtime_loader_symbols +__tbb_internal_runtime_loader_symbols label AWORD +#define __TBB_SYMBOL( sym ) fsymbol sym +#include __TBB_STRING( __TBB_LST ) +AWORD 0, 0 // Terminator of the __tbb_internal_runtime_loader_symbols array. +dword 0, 0 + +/* + Generate functions. +*/ + +// Helper assembler macro to handle different naming conventions on IA-32 and Intel 64: +// IA-32: C++ names preserved, C names require leading underscore. +// Intel 64: All names preserved. +mangle macro name:req + #ifdef ARCH_ia32 + if @instr( 1, name, <?> ) + exitm @catstr( name ) + else + exitm @catstr( <_>, name ) + endif + #else + exitm @catstr( name ) + #endif +endm + +function macro sym:req + mangle( sym ) proc + jmp AWORD ptr Ls_&sym& + mangle( sym ) endp +endm + +.code +#define __TBB_SYMBOL( sym ) function sym +#include __TBB_STRING( __TBB_LST ) + +end + +// end of file // diff --git a/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy.cpp b/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy.cpp new file mode 100644 index 0000000000..49e4332a05 --- /dev/null +++ b/deal.II/bundled/tbb41_20130401oss/src/tbbproxy/tbbproxy.cpp @@ -0,0 +1,618 @@ +/* + Copyright 2005-2013 Intel Corporation. All Rights Reserved. + + This file is part of Threading Building Blocks. + + Threading Building Blocks is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + Threading Building Blocks is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied warranty + of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Threading Building Blocks; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + As a special exception, you may use this file as part of a free software + library without restriction. Specifically, if other files instantiate + templates or use macros or inline functions from this file, or you compile + this file and link it with other files to produce an executable, this + file does not by itself cause the resulting executable to be covered by + the GNU General Public License. This exception does not however + invalidate any other reasons why the executable file might be covered by + the GNU General Public License. +*/ + +#include "tbb/tbb_config.h" +#if !__TBB_WIN8UI_SUPPORT +#define TBB_PREVIEW_RUNTIME_LOADER 1 +#include "tbb/runtime_loader.h" +#include "tbb/tbb_stddef.h" + +// C standard headers. +#include <cctype> // isspace +#include <cstdarg> // va_list, etc. +#include <cstdio> // fprintf, stderr, etc. +#include <cstdlib> // malloc, free, abort. +#include <cstring> // strlen, etc. + +// C++ standard headers. +#include <typeinfo> + +// OS-specific includes. +#if _WIN32 || _WIN64 + #include <windows.h> + #define snprintf _snprintf + #undef max +#else + #include <dlfcn.h> // dlopen, dlsym, dlclose, dlerror. +#endif + +#if TBB_USE_ASSERT + // We cannot use __TBB_ASSERT as it is because it calls a function from tbb library which may + // be not yet loaded. Redefine __TBB_ASSERT not to call tbb functions. + #undef __TBB_ASSERT + #define __TBB_ASSERT( cond, msg ) { \ + if ( ! (cond) ) { \ + say( "%s:%d: Assertion failed: %s.", __FILE__, __LINE__, (msg) ); \ + } /* if */ \ + /* TODO: abort? */ \ + } +#endif + +// Declare here, define at the bottom. +extern "C" int __tbb_internal_runtime_loader_stub(); + +namespace tbb { + +namespace interface6 { + +namespace internal { + +namespace runtime_loader { + + +/* + ------------------------------------------------------------------------------------------------ + User interaction utilities. + ------------------------------------------------------------------------------------------------ +*/ + + +// Print message to stderr. Do not call it directly, use say() or tell() instead. +static void _say( char const * format, va_list args ) { + /* + On Linux Intel 64, vsnprintf() modifies args argument, so vsnprintf() crashes if it + is called for the second time with the same args. To prevent the crash, we have to + pass a fresh intact copy of args to vsnprintf() each time. + + On Windows, unfortunately, standard va_copy() macro is not available. However, it + seems vsnprintf() does not modify args argument. + */ + #if ! ( _WIN32 || _WIN64 ) + va_list _args; + __va_copy( _args, args ); // Make copy of args. + #define args _args // Substitute args with its copy, _args. + #endif + int len = vsnprintf( NULL, 0, format, args ); + #if ! ( _WIN32 || _WIN64 ) + #undef args // Remove substitution. + va_end( _args ); + #endif + char * buf = reinterpret_cast< char * >( malloc( len + 1 ) ); + if ( buf == NULL ) { + abort(); + } // if + vsnprintf( buf, len + 1, format, args ); + fprintf( stderr, "TBB: %s\n", buf ); + free( buf ); +} // _say + + +// Debug/test/troubleshooting printing controlled by TBB_VERSION environment variable. +// To enable printing, the variable must be set and not empty. +// Do not call it directly, use tell() instead. +static void _tell( char const * format, va_list args ) { + char const * var = getenv( "TBB_VERSION" ); + if ( var != NULL && var[ 0 ] != 0 ) { + _say( format, args ); + } // if +} // _tell + + +// Print message to stderr unconditinally. +static void say( char const * format, ... ) { + va_list args; + va_start( args, format ); + _say( format, args ); + va_end( args ); +} // say + + +// Debug/test/troubleshooting printing controlled by TBB_VERSION environment variable. +// To enable printing, the variable must be set and not empty. +static void tell( char const * format, ... ) { + va_list args; + va_start( args, format ); + _tell( format, args ); + va_end( args ); +} // tell + + +// Error reporting utility. Behavior depends on mode. +static tbb::runtime_loader::error_code error( tbb::runtime_loader::error_mode mode, tbb::runtime_loader::error_code err, char const * format, ... ) { + va_list args; + va_start( args, format ); + if ( mode == tbb::runtime_loader::em_abort ) { + // In em_abort mode error message printed unconditionally. + _say( format, args ); + } else { + // In other modes printing depends on TBB_VERSION environment variable. + _tell( format, args ); + } // if + va_end( args ); + switch ( mode ) { + case tbb::runtime_loader::em_abort : { + say( "Aborting..." ); + #if TBB_USE_DEBUG && ( _WIN32 || _WIN64 ) + DebugBreak(); + #endif + abort(); + } break; + case tbb::runtime_loader::em_throw : { + throw err; + } break; + case tbb::runtime_loader::em_status : { + // Do nothing. + } break; + } // switch + return err; +} // error + + +/* + ------------------------------------------------------------------------------------------------ + General-purpose string manupulation utilities. + ------------------------------------------------------------------------------------------------ +*/ + + +// Delete character ch from string str in-place. +static void strip( char * str, char ch ) { + int in = 0; // Input character index. + int out = 0; // Output character index. + for ( ; ; ) { + if ( str[ in ] != ch ) { + str[ out ] = str[ in ]; + ++ out; + } // if + if ( str[ in ] == 0 ) { + break; + } // if + ++ in; + } // forever +} // func strip + + +// Strip trailing whitespaces in-place. +static void trim( char * str ) { + size_t len = strlen( str ); + while ( len > 0 && isspace( str[ len - 1 ] ) ) { + -- len; + } // while + str[ len ] = 0; +} // func trim + + +#if _WIN32 || _WIN64 + // "When specifying a path, be sure to use backslashes (\), not forward slashes (/)." + // (see http://msdn.microsoft.com/en-us/library/ms886736.aspx). + const char proper_slash = '\\'; + inline char char_or_slash( char c ) { return c=='/'? '\\': c; } +#else + const char proper_slash = '/'; + inline char char_or_slash( char c ) { return c; } +#endif + +// Concatenate name of directory and name of file. +void cat_file( char const * dir, char const * file, char * buffer, size_t len ) { + size_t i = 0; + // Copy directory name + for( ; i<len && *dir; ++i, ++dir ) { + buffer[i] = char_or_slash(*dir); + } + // Append trailing slash if missed. + if( i>0 && i<len && buffer[i-1]!=proper_slash ) { + buffer[i++] = proper_slash; + } + // Copy file name + __TBB_ASSERT( char_or_slash(*file)!=proper_slash, "File name starts with a slash" ); + for( ; i<len && *file; ++i, ++file ) { + buffer[i] = *file; + } + // Append null terminator + buffer[ i<len? i: len-1 ] = '\0'; +} // cat_file + + +/* + ------------------------------------------------------------------------------------------------ + Windows implementation of dlopen, dlclose, dlsym, dlerror. + ------------------------------------------------------------------------------------------------ +*/ + + +#if _WIN32 || _WIN64 + + // Implement Unix-like interface (dlopen, dlclose, dlsym, dlerror) via Win32 API functions. + + // Type of dlopen result. + typedef HMODULE handle_t; + + enum rtld_flags_t { + RTLD_NOW, + RTLD_GLOBAL + }; // enum rtld_flags_t + + // Unix-like dlopen(). + static handle_t dlopen( char const * name, rtld_flags_t ) { + return LoadLibrary( name ); + } // dlopen + + // Unix-like dlsym(). + static void * dlsym( handle_t lib, char const * sym ) { + return (void*)GetProcAddress( lib, sym ); + } // dlsym + + // Unix-like dlclose(). + static int dlclose( handle_t lib ) { + return ! FreeLibrary( lib ); + } // dlclose + + // The function mimics Unix dlerror() function. + // Note: Not thread-safe due to statically allocated buffer. + static char * dlerror() { + + static char buffer[ 2048 ]; // Note: statically allocated buffer. + + DWORD err = GetLastError(); + if ( err == ERROR_SUCCESS ) { + return NULL; + } // if + + DWORD rc; + rc = + FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM, + NULL, + err, + MAKELANGID( LANG_NEUTRAL, SUBLANG_DEFAULT ), // Default language. + reinterpret_cast< LPTSTR >( & buffer ), + sizeof( buffer ), + NULL + ); + if ( rc == 0 ) { + // FormatMessage() failed to format system error message. Buffer to short or another issue. + snprintf( buffer, sizeof( buffer ), "System error %u.", err ); + } else { + /* + FormatMessage() returns Windows-style end-of-lines, "\r\n". When string is printed, + printf() also replaces all the occurrences of "\n" with "\r\n" (again!), so sequences + like "\r\r\r\n" appear in output. It is not too good. Stripping all "\r" normalizes + string and returns it to canonical form, so printf() will produce correct end-of-line + sequences. + */ + strip( buffer, '\r' ); // Delete carriage returns if any. + trim( buffer ); // Delete trailing newlines and spaces. + } // if + + return buffer; + + } // dlerror + +#else + + // Type of dlopen() result. + typedef void * handle_t; + +#endif + + +/* + ------------------------------------------------------------------------------------------------ + Runtime loader stuff. + ------------------------------------------------------------------------------------------------ +*/ + + +// Descriptor table declaration. It is defined in assembler file. +enum symbol_type_t { + st_object = 0, + st_function = 1 +}; // enum symbol_type_t +struct symbol_t { + void * addr; + char const * name; + int size; + symbol_type_t type; +}; // symbol_t +extern "C" symbol_t __tbb_internal_runtime_loader_symbols[]; + +// Hooks for internal use (e. g. for testing). +tbb::runtime_loader::error_mode stub_mode = tbb::runtime_loader::em_abort; + +static char const * tbb_dll_name = __TBB_STRING(__TBB_DLL_NAME); // Name of TBB library. +static handle_t handle = NULL; // Handle of loaded TBB library or NULL. +static int version = 0; // Version of the loaded library. +static int counter = 0; // Number of runtime_loader objects using the loaded library. + +#define ANOTHER_RTL "probably multiple runtime_loader objects work in parallel" + + +// One attempt to load library (dll_name can be a full path or just a file name). +static tbb::runtime_loader::error_code _load( char const * dll_name, int min_ver, int max_ver ) { + + tbb::runtime_loader::error_mode mode = tbb::runtime_loader::em_status; + tbb::runtime_loader::error_code code = tbb::runtime_loader::ec_ok; + + /* + If these variables declared at the first usage, Intel compiler (on Windows IA-32) isues + warning(s): + transfer of control [goto error] bypasses initialization of: ... + Declaring variables at the beginning of the function eliminates warnings. + */ + typedef int (*int_func_t)( void ); + char const * get_ver_name = "TBB_runtime_interface_version"; // Name of function. + int_func_t get_ver_func = NULL; // Pointer to function. + handle_t _handle = NULL; + int _version = 0; + int total = 0; + int not_found = 0; + + // This function should be called iff there is no loaded library. + __TBB_ASSERT( handle == NULL, "Handle is invalid; " ANOTHER_RTL ); + __TBB_ASSERT( version == 0, "Version is invalid; " ANOTHER_RTL ); + __TBB_ASSERT( counter == 0, "Counter is invalid; " ANOTHER_RTL ); + + tell( "Loading \"%s\"...", dll_name ); + + // First load the library. + _handle = dlopen( dll_name, RTLD_NOW ); + if ( _handle == NULL ) { + char * msg = dlerror(); + code = error( mode, tbb::runtime_loader::ec_no_lib, "Loading \"%s\" failed; system error: %s", dll_name, msg ); + goto error; + } // if + + // Then try to find out its version. + /* + g++ 3.4 issues error: + ISO C++ forbids casting between pointer-to-function and pointer-to-object + on reinterpret_cast<>. Thus, we have no choice but using C-style type cast. + */ + get_ver_func = (int_func_t) dlsym( _handle, get_ver_name ); + if ( get_ver_func == NULL ) { + code = error( mode, tbb::runtime_loader::ec_bad_lib, "Symbol \"%s\" not found; library rejected.", get_ver_name ); + goto error; + } // if + _version = get_ver_func(); + if ( ! ( min_ver <= _version && _version <= max_ver ) ) { + code = error( mode, tbb::runtime_loader::ec_bad_ver, "Version %d is out of requested range; library rejected.", _version ); + goto error; + } // if + + // Library is suitable. Mark it as loaded. + handle = _handle; + version = _version; + counter += 1; + __TBB_ASSERT( counter == 1, "Counter is invalid; " ANOTHER_RTL ); + + // Now search for all known symbols. + for ( int i = 0; __tbb_internal_runtime_loader_symbols[ i ].name != NULL; ++ i ) { + symbol_t & symbol = __tbb_internal_runtime_loader_symbols[ i ]; + // Verify symbol descriptor. + __TBB_ASSERT( symbol.type == st_object || symbol.type == st_function, "Invalid symbol type" ); + #if _WIN32 || _WIN64 + __TBB_ASSERT( symbol.type == st_function, "Should not be symbols of object type on Windows" ); + #endif + if ( symbol.type == st_object ) { + __TBB_ASSERT( symbol.addr != NULL, "Object address invalid" ); + __TBB_ASSERT( symbol.size > 0, "Symbol size must be > 0" ); + __TBB_ASSERT( symbol.size <= 0x1000, "Symbol size too big" ); + } else { // Function + // __TBB_ASSERT( symbol.addr == reinterpret_cast< void * >( & stub ), "Invalid symbol address" ); + __TBB_ASSERT( symbol.size == sizeof( void * ), "Invalid symbol size" ); + } // if + void * addr = dlsym( _handle, symbol.name ); + if ( addr != NULL ) { + if ( symbol.type == st_object ) { + if ( strncmp( symbol.name, "_ZTS", 4 ) == 0 ) { + // If object name begins with "_ZTS", it is a string, mangled type name. + // Its value must equal to name of symbol without "_ZTS" prefix. + char const * name = static_cast< char const * >( addr ); + __TBB_ASSERT( strlen( name ) + 1 == size_t( symbol.size ), "Unexpected size of typeinfo name" ); + __TBB_ASSERT( strcmp( symbol.name + 4, name ) == 0, "Unexpected content of typeinfo name" ); + strncpy( reinterpret_cast< char * >( symbol.addr ), name, symbol.size ); + reinterpret_cast< char * >( symbol.addr )[ symbol.size - 1 ] = 0; + } else { + #if TBB_USE_ASSERT + // If object name begins with "_ZTI", it is an object of std::type_info class. + // Its protected value must equal to name of symbol without "_ZTI" prefix. + if ( strncmp( symbol.name, "_ZTI", 4 ) == 0 ) { + std::type_info const * info = static_cast< std::type_info const * >( addr ); + __TBB_ASSERT( size_t( symbol.size ) >= sizeof( std::type_info ), "typeinfo size is too small" ); + // std::type_info::name is not a virtual method, it is safe to call it. + __TBB_ASSERT( strcmp( symbol.name + 4, info->name() ) == 0, "Unexpected content of typeinfo" ); + } // if + #endif + // Copy object content from libtbb into runtime_loader. + memcpy( symbol.addr, addr, symbol.size ); + }; // if + } else { // Function + symbol.addr = addr; + } // if + } else { + char const * msg = dlerror(); + tell( "Symbol \"%s\" not found; system error: %s", symbol.name, msg ); + ++ not_found; + } // if + ++ total; + } // for i + + if ( not_found > 0 ) { + tell( "%d of %d symbols not found.", not_found, total ); + } // if + + tell( "The library successfully loaded." ); + return code; + + error: + if ( _handle != NULL ) { + int rc = dlclose( _handle ); + if ( rc != 0 ) { + // Error occurred. + __TBB_ASSERT( rc != 0, "Unexpected error: dlclose() failed" ); + } // if + } // if + _handle = NULL; + return code; + +} // _load + + +static tbb::runtime_loader::error_code load( tbb::runtime_loader::error_mode mode, char const * path[], int min_ver, int max_ver ) { + // Check arguments first. + if ( min_ver <= 0 ) { + return error( mode, tbb::runtime_loader::ec_bad_arg, "tbb::runtime_loader::load(): Invalid value of min_ver argument: %d.", min_ver ); + } // if + if ( max_ver <= 0 ) { + return error( mode, tbb::runtime_loader::ec_bad_arg, "tbb::runtime_loader::load(): Invalid value of max_ver argument: %d.", max_ver ); + } // if + if ( min_ver > max_ver ) { + return error( mode, tbb::runtime_loader::ec_bad_arg, "tbb::runtime_loader::load(): min_ver and max_ver specify empty range: [%d, %d].", min_ver, max_ver ); + } // if + if ( min_ver == max_ver ) { + tell( "Searching for \"%s\" version %d...", tbb_dll_name, min_ver ); + } else if ( max_ver == INT_MAX ) { + tell( "Searching for \"%s\" version %d+...", tbb_dll_name, min_ver ); + } else { + tell( "Searching for \"%s\" version in range [%d, %d]...", tbb_dll_name, min_ver, max_ver ); + } // if + // Then check whether a library already loaded. + if ( handle != NULL ) { + // Library already loaded. Check whether the version is compatible. + __TBB_ASSERT( version > 0, "Version is invalid; " ANOTHER_RTL ); + __TBB_ASSERT( counter > 0, "Counter is invalid; " ANOTHER_RTL ); + if ( min_ver <= version && version <= max_ver ) { + // Version is ok, let us use this library. + tell( "Library version %d is already loaded.", version ); + counter += 1; + return tbb::runtime_loader::ec_ok; + } else { + // Version is not suitable. + return error( mode, tbb::runtime_loader::ec_bad_ver, "Library version %d is already loaded.", version ); + } // if + } // if + // There is no loaded library, try to load it using provided directories. + __TBB_ASSERT( version == 0, "Version is invalid; " ANOTHER_RTL ); + __TBB_ASSERT( counter == 0, "Counter is invalid; " ANOTHER_RTL ); + size_t namelen = strlen(tbb_dll_name); + size_t buflen = 0; + char * buffer = NULL; + for ( int i = 0; path[i] != NULL; ++ i ) { + size_t len = strlen(path[i]) + namelen + 2; // 1 for slash and 1 for null terminator + if( buflen<len ) { + free( buffer ); + buflen = len; + buffer = (char*)malloc( buflen ); + } + cat_file( path[i], tbb_dll_name, buffer, buflen ); + __TBB_ASSERT(strstr(buffer,tbb_dll_name), "Name concatenation error"); + tbb::runtime_loader::error_code ec = _load( buffer, min_ver, max_ver ); + if ( ec == tbb::runtime_loader::ec_ok ) { + return ec; // Success. Exiting... + } // if + } // for i + free( buffer ); + return error( mode, tbb::runtime_loader::ec_no_lib, "No suitable library found." ); +} // load + + + + +// Supress "defined but not used" compiler warnings. +static void const * dummy[] = { + (void *) & strip, + (void *) & trim, + & dummy, + NULL +}; + + +} // namespace runtime_loader + +} // namespace internal + + +runtime_loader::runtime_loader( error_mode mode ) : + my_mode( mode ), + my_status( ec_ok ), + my_loaded( false ) +{ +} // ctor + + +runtime_loader::runtime_loader( char const * path[], int min_ver, int max_ver, error_mode mode ) : + my_mode( mode ), + my_status( ec_ok ), + my_loaded( false ) +{ + load( path, min_ver, max_ver ); +} // ctor + + +runtime_loader::~runtime_loader() { +} // dtor + + +tbb::runtime_loader::error_code runtime_loader::load( char const * path[], int min_ver, int max_ver ) { + if ( my_loaded ) { + my_status = tbb::interface6::internal::runtime_loader::error( my_mode, ec_bad_call, "tbb::runtime_loader::load(): Library already loaded by this runtime_loader object." ); + } else { + my_status = internal::runtime_loader::load( my_mode, path, min_ver, max_ver ); + if ( my_status == ec_ok ) { + my_loaded = true; + } // if + } // if + return my_status; +} // load + + + + +tbb::runtime_loader::error_code runtime_loader::status() { + return my_status; +} // status + + +} // namespace interface6 + +} // namespace tbb + + +// Stub function replaces all TBB entry points when no library is loaded. +int __tbb_internal_runtime_loader_stub() { + char const * msg = NULL; + if ( tbb::interface6::internal::runtime_loader::handle == NULL ) { + msg = "A function is called while TBB library is not loaded"; + } else { + msg = "A function is called which is not present in loaded TBB library"; + } // if + return tbb::interface6::internal::runtime_loader::error( tbb::interface6::internal::runtime_loader::stub_mode, tbb::runtime_loader::ec_no_lib, msg ); +} // stub + +#endif // !__TBB_WIN8UI_SUPPORT // +// end of file //