[Bf-blender-cvs] SVN commit: /data/svn/repos/bf-blender [61665] trunk/lib/win64_vc14/tbb: MSVC 2015 windows x64 (vc140) tbb 44_20160128

Martijn Berger martijn.berger at gmail.com
Tue May 31 13:23:00 CEST 2016


Revision: 61665
          https://developer.blender.org/rBL61665
Author:   juicyfruit
Date:     2016-05-31 13:22:59 +0200 (Tue, 31 May 2016)
Log Message:
-----------
MSVC 2015 windows x64 (vc140) tbb 44_20160128

Added Paths:
-----------
    trunk/lib/win64_vc14/tbb/
    trunk/lib/win64_vc14/tbb/include/
    trunk/lib/win64_vc14/tbb/include/tbb/
    trunk/lib/win64_vc14/tbb/include/tbb/aggregator.h
    trunk/lib/win64_vc14/tbb/include/tbb/aligned_space.h
    trunk/lib/win64_vc14/tbb/include/tbb/atomic.h
    trunk/lib/win64_vc14/tbb/include/tbb/blocked_range.h
    trunk/lib/win64_vc14/tbb/include/tbb/blocked_range2d.h
    trunk/lib/win64_vc14/tbb/include/tbb/blocked_range3d.h
    trunk/lib/win64_vc14/tbb/include/tbb/cache_aligned_allocator.h
    trunk/lib/win64_vc14/tbb/include/tbb/combinable.h
    trunk/lib/win64_vc14/tbb/include/tbb/compat/
    trunk/lib/win64_vc14/tbb/include/tbb/compat/condition_variable
    trunk/lib/win64_vc14/tbb/include/tbb/compat/ppl.h
    trunk/lib/win64_vc14/tbb/include/tbb/compat/thread
    trunk/lib/win64_vc14/tbb/include/tbb/compat/tuple
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_hash_map.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_lru_cache.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_priority_queue.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_queue.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_unordered_map.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_unordered_set.h
    trunk/lib/win64_vc14/tbb/include/tbb/concurrent_vector.h
    trunk/lib/win64_vc14/tbb/include/tbb/critical_section.h
    trunk/lib/win64_vc14/tbb/include/tbb/enumerable_thread_specific.h
    trunk/lib/win64_vc14/tbb/include/tbb/flow_graph.h
    trunk/lib/win64_vc14/tbb/include/tbb/flow_graph_opencl_node.h
    trunk/lib/win64_vc14/tbb/include/tbb/global_control.h
    trunk/lib/win64_vc14/tbb/include/tbb/index.html
    trunk/lib/win64_vc14/tbb/include/tbb/internal/
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_aggregator_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_concurrent_queue_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_concurrent_unordered_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_indexer_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_item_buffer_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_join_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_node_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_tagged_buffer_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_trace_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_flow_graph_types_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_mutex_padding.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_range_iterator.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_tbb_hash_compare_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_tbb_strings.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_tbb_windef.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_template_helpers.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_x86_eliding_mutex_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/internal/_x86_rtm_rw_mutex_impl.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/
    trunk/lib/win64_vc14/tbb/include/tbb/machine/gcc_armv7.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/gcc_generic.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/gcc_ia32_common.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/gcc_itsx.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/ibm_aix51.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/icc_generic.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/linux_common.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/linux_ia32.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/linux_ia64.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/linux_intel64.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/mac_ppc.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/macos_common.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/mic_common.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/msvc_armv7.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/msvc_ia32_common.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/sunos_sparc.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/windows_api.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/windows_ia32.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/windows_intel64.h
    trunk/lib/win64_vc14/tbb/include/tbb/machine/xbox360_ppc.h
    trunk/lib/win64_vc14/tbb/include/tbb/memory_pool.h
    trunk/lib/win64_vc14/tbb/include/tbb/mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/null_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/null_rw_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_do.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_for.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_for_each.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_invoke.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_reduce.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_scan.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_sort.h
    trunk/lib/win64_vc14/tbb/include/tbb/parallel_while.h
    trunk/lib/win64_vc14/tbb/include/tbb/partitioner.h
    trunk/lib/win64_vc14/tbb/include/tbb/pipeline.h
    trunk/lib/win64_vc14/tbb/include/tbb/queuing_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/queuing_rw_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/reader_writer_lock.h
    trunk/lib/win64_vc14/tbb/include/tbb/recursive_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/runtime_loader.h
    trunk/lib/win64_vc14/tbb/include/tbb/scalable_allocator.h
    trunk/lib/win64_vc14/tbb/include/tbb/spin_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/spin_rw_mutex.h
    trunk/lib/win64_vc14/tbb/include/tbb/task.h
    trunk/lib/win64_vc14/tbb/include/tbb/task_arena.h
    trunk/lib/win64_vc14/tbb/include/tbb/task_group.h
    trunk/lib/win64_vc14/tbb/include/tbb/task_scheduler_init.h
    trunk/lib/win64_vc14/tbb/include/tbb/task_scheduler_observer.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_allocator.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_config.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_exception.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_machine.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_profiling.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_stddef.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbb_thread.h
    trunk/lib/win64_vc14/tbb/include/tbb/tbbmalloc_proxy.h
    trunk/lib/win64_vc14/tbb/include/tbb/tick_count.h
    trunk/lib/win64_vc14/tbb/lib/
    trunk/lib/win64_vc14/tbb/lib/tbb.lib
    trunk/lib/win64_vc14/tbb/lib/tbb_debug.lib

Added: trunk/lib/win64_vc14/tbb/include/tbb/aggregator.h
===================================================================
--- trunk/lib/win64_vc14/tbb/include/tbb/aggregator.h	                        (rev 0)
+++ trunk/lib/win64_vc14/tbb/include/tbb/aggregator.h	2016-05-31 11:22:59 UTC (rev 61665)
@@ -0,0 +1,202 @@
+/*
+    Copyright 2005-2016 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks. Threading Building Blocks is free software;
+    you can redistribute it and/or modify it under the terms of the GNU General Public License
+    version 2  as  published  by  the  Free Software Foundation.  Threading Building Blocks is
+    distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+    implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+    See  the GNU General Public License for more details.   You should have received a copy of
+    the  GNU General Public License along with Threading Building Blocks; if not, write to the
+    Free Software Foundation, Inc.,  51 Franklin St,  Fifth Floor,  Boston,  MA 02110-1301 USA
+
+    As a special exception,  you may use this file  as part of a free software library without
+    restriction.  Specifically,  if other files instantiate templates  or use macros or inline
+    functions from this file, or you compile this file and link it with other files to produce
+    an executable,  this file does not by itself cause the resulting executable to be covered
+    by the GNU General 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<typename handler_type> 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<typename Body>
+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<basic_operation_base&>(*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 <typename handler_type>
+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<aggregator_operation *> 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<internal::basic_handler> {
+public:
+    aggregator() : aggregator_ext<internal::basic_handler>(internal::basic_handler()) {}
+    //! BASIC INTERFACE: Enter a function for exclusive 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<typename Body>
+    void execute(const Body& b) {
+        internal::basic_operation<Body> 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

Added: trunk/lib/win64_vc14/tbb/include/tbb/aligned_space.h
===================================================================
--- trunk/lib/win64_vc14/tbb/include/tbb/aligned_space.h	                        (rev 0)
+++ trunk/lib/win64_vc14/tbb/include/tbb/aligned_space.h	2016-05-31 11:22:59 UTC (rev 61665)
@@ -0,0 +1,47 @@
+/*
+    Copyright 2005-2016 Intel Corporation.  All Rights Reserved.
+
+    This file is part of Threading Building Blocks. Threading Building Blocks is free software;
+    you can redistribute it and/or modify it under the terms of the GNU General Public License
+    version 2  as  published  by  the  Free Software Foundation.  Threading Building Blocks is
+    distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
+    implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+    See  the GNU General Public License for more details.   You should have received a copy of

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list