X hits on this document

91 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 views91
Page views91
Page last viewedTue Jan 17 06:28:54 UTC 2017
Pages26
Paragraphs209
Words942

Comments