0
다음 코드 스 니펫에 포함시켜야 할 cuda 이벤트 mathods를 사용하여 시간을 측정 할 헤더 파일은 무엇입니까?cuda 이벤트 함수의 헤더 파일
cudaEvent_t start,stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);
float Elapsed=0,Cycle;
for (int p=1; p<=MSG_NUM; p++)
{
cudaEventRecord(start,0);
add<<<R, (M+R), (M+R)* sizeof(int)>>>(d_msg, d_checkSumArray);
cudaEventRecord(stop,0);
cudaEventSynchronize(stop);
cudaElapsedTime(&Cycle,start,stop);
Elapsed += Cycle;
}
printf("Time = %f",Elapsed);
내 프로그램에 다음 헤더 파일이 포함되어 있지 않으므로 다음 오류가 표시됩니다.
오류 : 식별자 "cudaElapsedTime는"
을 정의되지
사람이 해결책을 줄 수주십시오?
대단히 감사합니다. Robert Crovella ... – Shohidul