-1

OpenCLNet.dll 中出现“System.AccessViolationException”类型的未处理异常

@

平台测试 = new Platform(platformid); 并且“platformID”在运行时的值为 1。

public class Program
{
    static void Main(string[] args)
    {
        IntPtr[] IntPtrArr = new IntPtr[10];
        uint platformID;
        OpenCL.GetPlatformIDs(1, IntPtrArr,out platformID);
        IntPtr platformid = new IntPtr(platformID);
        Platform test = new Platform(platformid);
    }
}

我是否正确获得了 PlatfromID 或 platfromid?

4

1 回答 1

2

OpenCL.GetPlatformIDsout 参数不是平台 ID,它是在您IntPtrArr的.IntPtrArrplatformID

于 2016-01-19T03:34:57.460 回答