im getting here an annoying message and im not quite sure what im doing wrong.
float4 *IntsOnHost = new float4[ MAXX * (MAXY - 1) ];
//copy possible intersection points from device to host
CU_SAFE_CALL(cudaMemcpy(IntsOnHost,IntsOnDevToCpyToHost,(MAXX*(MAXY - 1)-1)*sizeof(float4),cudaMemcpyDeviceToHost));
thrust::device_vector<float4> IntsOnDev (IntsOnHost,IntsOnHost + (MAXX * (MAXY - 1)-1)*sizeof(float4));
//find the index of the smallest intersection point
thrust::device_vector<float4>::iterator it = thrust::min_element(IntsOnDev.begin(),IntsOnDev.end(),equalOperator());
and the predicate:
struct equalOperator
{
__host__ __device__
bool operator()(float4 x, float4 y)
{
return ( x.w > y.w );
}
};
the error message :
1>c:\program files\nvidia gpu computing toolkit\cuda\v4.0\include\thrust\detail\device\generic\extrema.inl(104): error : function "equalOperator::operator()" cannot be called with the given argument list
thanks!