2016-10-03 1 views

답변

0

대답 년 11 월 (26), 2016, 아니오, Cudafy.NET는 휘발성 키워드를 지원하지 않습니다. 그러나 Cudafy.NET을 특정 상황에서 허용하도록 속일 수 있습니다.

예는 :

//declare a dummy in global scope 
public static int[] volatileArray = new int[256]; 
[Cudafy] 
private static void doStuffOnGPU(GThread thread, int[] output) 
{ 
    //use the GThread.InsertCode() function to declare in CUDA 
    GThread.InsertCode("__shared__ volatile int volatileArray[256];"); 
    //do a whole bunch of stuff 
} 

이 코드는 테스트를 순차적으로 실행하는 글로벌 선언을 사용하고 GPU에 휘발성 선언을 사용합니다.