samedi 5 mai 2018

copy host vector to device vector takes long time

Is it normal when i want to copy host vector to thrust vector took more than 2.5 seconds?? i use this code

`

double sz = 1000000;
        std::vector<double> p_a(sz);
        std::fill(p_a.begin(), p_a.end(), 10);
        const clock_t begin_time = clock();
        thrust::device_vector<double> d_vec=p_a;
        std::cout << "\n" << float(clock() - begin_time) / CLOCKS_PER_SEC << "\n";

`

is there any method to decrease the copy time???

Aucun commentaire:

Enregistrer un commentaire