Skip to content

Commit

Permalink
Updated thrust example to use raw_pointer_cast.
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflarkin committed Aug 29, 2014
1 parent 0bb2c26 commit 75f70c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thrust.cu
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main(int argc, char **argv)
thrust::fill(d_x.begin(),d_x.end(), 1.0f);
thrust::fill(d_y.begin(),d_y.end(), 0.0f);

saxpy(N,2.0,d_x.data().get(),d_y.data().get());
saxpy(N,2.0,thrust::raw_pointer_cast(d_x.data()),thrust::raw_pointer_cast(d_y.data()));

y = d_y;
printf("%f\n",y[0]);
Expand Down

0 comments on commit 75f70c5

Please sign in to comment.