2 Replies Latest reply on Jan 31, 2012 10:29 AM by takercena

    Too many opencl devices reported, what happen?

    takercena

      Based on these code, OpenCL report 2046 devices on AMD platform. What happen?

          int ctr = 0;
          cl_uint selectedPlatform = 0;
          char param[50];
          for(ctr; ctr < num_platforms; ctr++)
          {
              clGetPlatformInfo(platforms[ctr], CL_PLATFORM_VENDOR, sizeof(param), &param, NULL);
              printf("%s\n", param);
              if(strncmp(param, "NVIDIA", 6) == 0)
              {
                  printf("nVidia\n");
                  selectedPlatform = ctr;
      
      
              }
              else if (strncmp(param, "Advanced", 8) == 0)
              {
                  printf("Advanced Micro Devices\n");
                  clGetDeviceIDs(platforms[ctr], CL_DEVICE_TYPE_ALL, 5, NULL, &num_devices);
                  printf("Consist of %d OpenCL devices\n", num_devices); 
      
              }
              else if (strncmp(param, "Intel", 5) == 0)
              {
                  printf("Intel\n");
      
              }
      
      
          }