Hi,
A piece of code which ran well till cuda-5.0 seems to be generating compilation errors on cuda-5.5. The offending line is
boost::const_multi_array_ref<std::complex<float>, 3> myClass::getData(){
thrust::copy(myVector.begin(), myVector.end(),
(std::complex<float> *)hostData.data());··
return boost::const_multi_array_ref<std::complex<float>, 3>(hostData);
}
where myVector is of type
thrust::device_vector<cusp::complex > myVector;
and hostData is of type
boost::multi_array<std::complex, 3> m_host_frames;
/usr/local/cuda-5.5/include/thrust/system/detail/internal/scalar/general_copy.h(43): error: no operator “=” matches these operands
operand types are: std::complex = thrust::reference<cusp::complex, thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>, thrust::use_default>
detected during:
instantiation of “OutputIterator thrust::system::detail::internal::scalar::general_copy(InputIterator, InputIterator, OutputIterator) [with InputIterator=thrust::detail::normal_iterator<thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/system/detail/internal/scalar/copy.inl(69): here
instantiation of “OutputIterator thrust::system::detail::internal::scalar::copy_detail::copy(InputIterator, InputIterator, OutputIterator, thrust::detail::false_type) [with InputIterator=thrust::detail::normal_iterator<thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/system/detail/internal/scalar/copy.inl(107): here
instantiation of “OutputIterator thrust::system::detail::internal::scalar::copy(InputIterator, InputIterator, OutputIterator) [with InputIterator=thrust::detail::normal_iterator<thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/system/cpp/detail/copy.h(43): here
instantiation of “OutputIterator thrust::system::cpp::detail::copy(thrust::system::cpp::detail::tag, InputIterator, InputIterator, OutputIterator) [with InputIterator=thrust::detail::normal_iterator<thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/detail/copy.inl(35): here
instantiation of “OutputIterator thrust::copy(const thrust::detail::execution_policy_base &, InputIterator, InputIterator, OutputIterator) [with System=thrust::system::cpp::detail::tag, InputIterator=thrust::detail::normal_iterator<thrust::pointer<cusp::complex, thrust::host_system_tag, thrust::use_default, thrust::use_default>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/system/cuda/detail/copy_cross_system.inl(207): here
[ 3 instantiation contexts not shown ]
instantiation of “OutputIterator thrust::system::cuda::detail::copy_cross_system(thrust::system::cuda::detail::cross_system<System1, System2>, InputIterator, InputIterator, OutputIterator) [with System1=thrust::system::cuda::detail::tag, System2=thrust::host_system_tag, InputIterator=thrust::detail::normal_iterator<thrust::device_ptr<cusp::complex>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/system/cuda/detail/copy.inl(53): here
instantiation of “OutputIterator thrust::system::cuda::detail::copy(thrust::system::cuda::detail::cross_system<System1, System2>, InputIterator, InputIterator, OutputIterator) [with System1=thrust::system::cuda::detail::tag, System2=thrust::host_system_tag, InputIterator=thrust::detail::normal_iterator<thrust::device_ptr<cusp::complex>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/detail/copy.inl(35): here
instantiation of “OutputIterator thrust::copy(const thrust::detail::execution_policy_base &, InputIterator, InputIterator, OutputIterator) [with System=thrust::system::cuda::detail::cross_system<thrust::system::cuda::detail::tag, thrust::host_system_tag>, InputIterator=thrust::detail::normal_iterator<thrust::device_ptr<cusp::complex>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/detail/copy.inl(66): here
instantiation of “OutputIterator thrust::detail::two_system_copy(thrust::execution_policy &, thrust::execution_policy &, InputIterator, InputIterator, OutputIterator) [with FromSystem=thrust::system::cuda::detail::tag, ToSystem=thrust::system::cpp::detail::tag, InputIterator=thrust::detail::normal_iterator<thrust::device_ptr<cusp::complex>>, OutputIterator=std::complex *]”
/usr/local/cuda-5.5/include/thrust/detail/copy.inl(102): here
instantiation of “OutputIterator thrust::copy(InputIterator, InputIterator, OutputIterator) [with InputIterator=thrust::detail::normal_iterator<thrust::device_ptr<cusp::complex>>, OutputIterator=std::complex *]”
/home/user1043/Projects/src/data_generate.cu(248): here