Skip to content

Commit

Permalink
[SYCLomatic oneapi-src#319] Add test for migration of thrust::device_…
Browse files Browse the repository at this point in the history
…reference (oneapi-src#138)

This reverts commit 8eec9bf.

Signed-off-by: Cai, Justin <justin.cai@intel.com>

Signed-off-by: Cai, Justin <justin.cai@intel.com>
  • Loading branch information
jzc authored Jan 20, 2023
1 parent e98916a commit b295fd7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions features/feature_case/thrust/thrust-vector-2.cu
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,12 @@ int main() {
Report::check("device_vector size", dv2.size(), 5);
checkVector(dv2, "device_vector dynamic expansion");

thrust::device_vector<int> dv5(2, -1);
dv5[1] = 10;
thrust::device_reference<int> r0 = dv5[0];
thrust::device_reference<int> r1 = dv5[1];
r0 = r1;
Report::check("device_reference = ", dv5[0], 10);

return Report::finish();
}

0 comments on commit b295fd7

Please sign in to comment.