OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DataMgrAllocationPolicy.h File Reference
#include <cuda_runtime.h>
#include <thrust/execution_policy.h>
#include "DataMgr/Allocators/ThrustAllocator.h"
+ Include dependency graph for DataMgrAllocationPolicy.h:

Go to the source code of this file.




using Data_Namespace::DataMgrAllocationPolicy = typename thrust::detail::allocator_aware_execution_policy< thrust::device_execution_policy >::execute_with_allocator_type< ThrustAllocator >::type
 This is a custom device execution policy to allow a custom allocator backed by a DataMgr instance for any temp allocations done in thrust calls. This execution policy is required when using thrust functions that do host <-> device transfers internally, such as thrust::equal_range(). Without the use of this custom policy, thrust::equal_range() will crash. For more clarity, if you were to use the thrust::device(allocator) as the execution policy for thrust::equal_range, where allocator is a ThrustAllocator instance, thrust will crash because that policy by default uses a cuda default stream wrapper class (execute_on_stream_base): More...