0
나는 다음과 같은 유형의 정적 멤버를 추가하기 위해 노력하고있어 :추력에 정적 멤버를 추가하는 방법 :: binary_predicate?
struct mostRightCornerPred
{
__host__ __device__
static int numIterations;
bool operator()(const long long first,const long long seconds) const
{
return true;
}
};
하지만 오류가 점점 계속 :
1>c:\users\igal\desktop\pj1712 fixed map res\graph\types.h(21): error : attribute "__host__" does not apply here 1>c:\users\igal\desktop\pj1712 fixed map res\graph\types.h(21): error : memory qualifier on data member is not allowed
내 생각은 CUDA이 멤버를 참조 할 수 없다는 것입니다을 . 어떻게 해결할 수 있습니까?
코드가 깨졌습니다. 물론 컴파일하려고하는 것이 아닙니다. – talonmies
무엇을 의미합니까? –
'__host__ __device__'는 운영자를위한 것입니까? 현재 정적 멤버에 적용하고 있습니다 ....... – talonmies