OXIESEC PANEL
- Current Dir:
/
/
usr
/
include
/
tbb
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
10/28/2024 06:50:42 AM
rwxr-xr-x
📄
aggregator.h
7.95 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
aligned_space.h
1.35 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
atomic.h
20.63 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
blocked_range.h
6.12 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
blocked_range2d.h
3.15 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
blocked_range3d.h
4.2 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
cache_aligned_allocator.h
4.64 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
combinable.h
2.35 KB
06/07/2017 07:54:02 AM
rw-r--r--
📁
compat
-
10/28/2024 06:50:34 AM
rwxr-xr-x
📄
concurrent_hash_map.h
62.77 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_lru_cache.h
10.12 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_priority_queue.h
18.72 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_queue.h
15.41 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_unordered_map.h
10.7 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_unordered_set.h
9.63 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
concurrent_vector.h
57.68 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
critical_section.h
3.61 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
enumerable_thread_specific.h
46.97 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
flow_graph.h
151.78 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
flow_graph_abstractions.h
1.49 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
flow_graph_opencl_node.h
58.66 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
gfx_factory.h
10.34 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
global_control.h
2.51 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
index.html
901 bytes
06/07/2017 07:54:02 AM
rw-r--r--
📁
internal
-
10/28/2024 06:50:34 AM
rwxr-xr-x
📁
machine
-
10/28/2024 06:50:34 AM
rwxr-xr-x
📄
memory_pool.h
10.33 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
mutex.h
5.98 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
null_mutex.h
1.41 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
null_rw_mutex.h
1.61 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_do.h
19.41 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_for.h
19.58 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_for_each.h
4.95 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_invoke.h
17.25 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_reduce.h
26.34 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_scan.h
13.47 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_sort.h
9.37 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
parallel_while.h
5.86 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
partitioner.h
27.79 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
pipeline.h
23.04 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
queuing_mutex.h
3.37 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
queuing_rw_mutex.h
4.78 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
reader_writer_lock.h
8.07 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
recursive_mutex.h
6.47 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
runtime_loader.h
5.94 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
scalable_allocator.h
11.12 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
spin_mutex.h
6.6 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
spin_rw_mutex.h
8.89 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
task.h
40.89 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
task_arena.h
11.39 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
task_group.h
5.83 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
task_scheduler_init.h
6.95 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
task_scheduler_observer.h
6.77 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb.h
2.35 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb_allocator.h
7.68 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb_config.h
40.22 KB
10/04/2017 01:46:23 PM
rw-r--r--
📄
tbb_exception.h
13.15 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb_machine.h
39.66 KB
10/04/2017 01:46:23 PM
rw-r--r--
📄
tbb_profiling.h
12.64 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb_stddef.h
19.18 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbb_thread.h
12.49 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tbbmalloc_proxy.h
1.75 KB
06/07/2017 07:54:02 AM
rw-r--r--
📄
tick_count.h
4.39 KB
06/07/2017 07:54:02 AM
rw-r--r--
Editing: tbb_allocator.h
Close
/* Copyright (c) 2005-2017 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #ifndef __TBB_tbb_allocator_H #define __TBB_tbb_allocator_H #include "tbb_stddef.h" #include <new> #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #include <utility> // 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 <cstring> #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<typename T> class tbb_allocator { public: typedef typename internal::allocator_type<T>::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<typename U> struct rebind { typedef tbb_allocator<U> other; }; //! Specifies current allocator enum malloc_type { scalable, standard }; tbb_allocator() throw() {} tbb_allocator( const tbb_allocator& ) throw() {} template<typename U> tbb_allocator(const tbb_allocator<U>&) 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<size_type>(-1) / sizeof (value_type); return (max > 0 ? max : 1); } //! Copy-construct value at location pointed to by p. #if __TBB_ALLOCATOR_CONSTRUCT_VARIADIC template<typename U, typename... Args> void construct(U *p, Args&&... args) { ::new((void *)p) U(std::forward<Args>(args)...); } #else // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC #if __TBB_CPP11_RVALUE_REF_PRESENT void construct( pointer p, value_type&& value ) {::new((void*)(p)) value_type(std::move(value));} #endif void construct( pointer p, const value_type& value ) {::new((void*)(p)) value_type(value);} #endif // __TBB_ALLOCATOR_CONSTRUCT_VARIADIC //! 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<void>, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template<> class tbb_allocator<void> { public: typedef void* pointer; typedef const void* const_pointer; typedef void value_type; template<typename U> struct rebind { typedef tbb_allocator<U> other; }; }; template<typename T, typename U> inline bool operator==( const tbb_allocator<T>&, const tbb_allocator<U>& ) {return true;} template<typename T, typename U> inline bool operator!=( const tbb_allocator<T>&, const tbb_allocator<U>& ) {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 <typename T, template<typename X> class Allocator = tbb_allocator> class zero_allocator : public Allocator<T> { public: typedef Allocator<T> 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<typename U> struct rebind { typedef zero_allocator<U, Allocator> other; }; zero_allocator() throw() { } zero_allocator(const zero_allocator &a) throw() : base_allocator_type( a ) { } template<typename U> zero_allocator(const zero_allocator<U> &a) throw() : base_allocator_type( Allocator<U>( 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<void>, as defined in ISO C++ Standard, Section 20.4.1 /** @ingroup memory_allocation */ template<template<typename T> class Allocator> class zero_allocator<void, Allocator> : public Allocator<void> { public: typedef Allocator<void> 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<typename U> struct rebind { typedef zero_allocator<U, Allocator> other; }; }; template<typename T1, template<typename X1> class B1, typename T2, template<typename X2> class B2> inline bool operator==( const zero_allocator<T1,B1> &a, const zero_allocator<T2,B2> &b) { return static_cast< B1<T1> >(a) == static_cast< B2<T2> >(b); } template<typename T1, template<typename X1> class B1, typename T2, template<typename X2> class B2> inline bool operator!=( const zero_allocator<T1,B1> &a, const zero_allocator<T2,B2> &b) { return static_cast< B1<T1> >(a) != static_cast< B2<T2> >(b); } } // namespace tbb #endif /* __TBB_tbb_allocator_H */