相关疑难解决方法(0)

似乎达到了CUDA限制,但这有什么限制?

我有一个CUDA程序似乎在某种资源的某种限制,但我无法弄清楚该资源是什么.这是内核函数:

__global__ void DoCheck(float2* points, int* segmentToPolylineIndexMap, 
                        int segmentCount, int* output)
{
    int segmentIndex = threadIdx.x + blockIdx.x * blockDim.x;
    int pointCount = segmentCount + 1;

    if(segmentIndex >= segmentCount)
        return;

    int polylineIndex = segmentToPolylineIndexMap[segmentIndex];
    int result = 0;
    if(polylineIndex >= 0)
    {
        float2 p1 = points[segmentIndex];
        float2 p2 = points[segmentIndex+1];
        float2 A = p2;
        float2 a;
        a.x = p2.x - p1.x;
        a.y = p2.y - p1.y;

        for(int i = segmentIndex+2; i < segmentCount; i++)
        {
            int currentPolylineIndex = segmentToPolylineIndexMap[i];

            // …
Run Code Online (Sandbox Code Playgroud)

cuda gpgpu

1
推荐指数
1
解决办法
1564
查看次数

标签 统计

cuda ×1

gpgpu ×1