X hits on this document

74 views

0 shares

0 downloads

0 comments

14 / 26

© NVIDIA Corporation 2009

thrust::sort

#include <thrust/host_vector.h>

#include <thrust/device_vector.h>

#include <thrust/generate.h>

#include <thrust/sort.h>

#include <cstdlib>

int main(void)

{

 // generate random data on the host

 thrust::host_vector<int> h_vec(1000000);

 thrust::generate(h_vec.begin(), h_vec.end(), rand);

 // transfer to device and sort

 thrust::device_vector<int> d_vec = h_vec;

 // sort 140M 32b keys/sec on GT200

 thrust::sort(d_vec.begin(), d_vec.end());

 return 0; }

Document info
Document views74
Page views74
Page last viewedTue Dec 06 14:29:44 UTC 2016
Pages26
Paragraphs209
Words942

Comments