X hits on this document

77 views

0 shares

0 downloads

0 comments

13 / 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 views77
Page views77
Page last viewedWed Dec 07 12:28:59 UTC 2016
Pages26
Paragraphs209
Words942

Comments