~ubuntu-branches/ubuntu/utopic/libthrust/utopic

« back to all changes in this revision

Viewing changes to system/tbb/memory.h

  • Committer: Package Import Robot
  • Author(s): Andreas Beckmann
  • Date: 2013-07-10 12:57:33 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20130710125733-my19jic71sqsabaj
Tags: 1.7.0-1
* New upstream release.  (Closes: #715362)
* Update watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#pragma once
22
22
 
23
23
#include <thrust/detail/config.h>
24
 
#include <thrust/system/tbb/detail/tag.h>
 
24
#include <thrust/system/tbb/detail/execution_policy.h>
25
25
#include <thrust/memory.h>
26
26
#include <thrust/detail/type_traits.h>
27
27
#include <thrust/detail/allocator/malloc_allocator.h>
114
114
/*! \endcond
115
115
 */
116
116
 
117
 
#if 0
118
 
/*! \p tbb::tag is type representing Thrust's TBB backend system in C++'s type system.
119
 
 *  Iterators "tagged" with a type which is convertible to \p tbb::tag assert that they may be
120
 
 *  "dispatched" to algorithm implementations in the \p tbb system.
121
 
 *
122
 
 *  \p tbb::tag is convertible to \p cpp::tag.
123
 
 */
124
 
struct tag { unspecified };
125
 
#endif
126
117
 
127
118
/*! \p pointer stores a pointer to an object allocated in memory available to the tbb system.
128
119
 *  This type provides type safety when dispatching standard algorithms on ranges resident
325
316
 */
326
317
inline pointer<void> malloc(std::size_t n);
327
318
 
 
319
/*! Allocates a typed area of memory available to Thrust's <tt>tbb</tt> system.
 
320
 *  \param n Number of elements to allocate.
 
321
 *  \return A <tt>tbb::pointer<T></tt> pointing to the beginning of the newly
 
322
 *          allocated memory. A null <tt>tbb::pointer<T></tt> is returned if
 
323
 *          an error occurs.
 
324
 *  \note The <tt>tbb::pointer<T></tt> returned by this function must be
 
325
 *        deallocated with \p tbb::free.
 
326
 *  \see tbb::free
 
327
 *  \see std::malloc
 
328
 */
 
329
template<typename T>
 
330
inline pointer<T> malloc(std::size_t n);
 
331
 
328
332
/*! Deallocates an area of memory previously allocated by <tt>tbb::malloc</tt>.
329
333
 *  \param ptr A <tt>tbb::pointer<void></tt> pointing to the beginning of an area
330
334
 *         of memory previously allocated with <tt>tbb::malloc</tt>.
408
412
 
409
413
#include <thrust/system/tbb/detail/memory.inl>
410
414
 
411
 
// make the backend's entry points available to dispatch
412
 
#include <thrust/system/tbb/detail/algorithm.h>
413