正在加载图片...
VECTOR ADDITION IN THRUST thrust:device_vector<float>deviceInputl(inputLength); thrust:device_vector<float>deviceInput2(inputLength); thrust:device_vector<float>deviceOutput(inputLength); thrust:copy(hostInputl.hostInput1 +inputLength, deviceInputl.beginO); thrust:copy(hostInput2,hostInput2 inputLength, deviceInput2.begin(); thrust:transform(deviceInputl.beginO,deviceInputl.end(), deviceInput2.begin() deviceOutput.begin(), thrust:plus<1oat>0)月 电子料战女学 University of Electreaie Science and Technolory of China OVECTOR ADDITION IN THRUST thrust::device_vector<float> deviceInput1(inputLength); thrust::device_vector<float> deviceInput2(inputLength); thrust::device_vector<float> deviceOutput(inputLength); thrust::copy(hostInput1, hostInput1 + inputLength, deviceInput1.begin()); thrust::copy(hostInput2, hostInput2 + inputLength, deviceInput2.begin()); thrust::transform(deviceInput1.begin(), deviceInput1.end(), deviceInput2.begin(), deviceOutput.begin(), thrust::plus<float>());
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有