Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/lib/cl-target/clinfo.c
ViewVC logotype

Diff of /trunk/src/lib/cl-target/clinfo.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2059, Tue Oct 30 17:46:04 2012 UTC revision 2060, Tue Oct 30 19:31:28 2012 UTC
# Line 106  Line 106 
106              exit (1);              exit (1);
107          }          }
108          CHECK(clGetDeviceInfo (          CHECK(clGetDeviceInfo (
109                devices[i], CL_DEVICE_VENDOR_ID, sizeof(cl_uint), &(dev->vendorId), 0));
110            CHECK(clGetDeviceInfo (
111              devices[i], CL_DEVICE_TYPE, sizeof(cl_device_type), &(dev->ty), 0));              devices[i], CL_DEVICE_TYPE, sizeof(cl_device_type), &(dev->ty), 0));
112          CHECK(clGetDeviceInfo (          CHECK(clGetDeviceInfo (
113              devices[i], CL_DEVICE_AVAILABLE, sizeof(cl_bool), &(dev->isAvail), 0));              devices[i], CL_DEVICE_AVAILABLE, sizeof(cl_bool), &(dev->isAvail), 0));
# Line 166  Line 168 
168          CHECK(clGetDeviceInfo (          CHECK(clGetDeviceInfo (
169              devices[i], CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, sizeof(cl_uint), &(dev->doubleWid), 0));              devices[i], CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, sizeof(cl_uint), &(dev->doubleWid), 0));
170        // determine the compute-unit width        // determine the compute-unit width
171    
172          if (isCPUDevice(dev))          if (isCPUDevice(dev))
173              dev->cuWidth = 1;              dev->cuWidth = 1;
174          else if (isGPUDevice(dev))          else if (isGPUDevice(dev))
175              if (strcasecmp("AMD", dev->vendor) == 0)              if (dev->vendorId == AMD_VENDOR_ID)
176                  dev->cuWidth = 64; // an AMD wavefront is 64-wide                  dev->cuWidth = 64; // an AMD wavefront is 64-wide
177              else if (strcasecmp("NVIDIA", dev->vendor) == 0)              else if (dev->vendorId == NVIDIA_VENDOR_ID)
178                  dev->cuWidth = 32; // an NVIDIA warp is 32-wide                  dev->cuWidth = 32; // an NVIDIA warp is 32-wide
179              else              else
180                  dev->cuWidth = 32; // FIXME: not sure what this should be?                  dev->cuWidth = 32; // FIXME: not sure what this should be?
# Line 203  Line 206 
206              else              else
207                  fprintf (outS, "    Device %d.%d (%s): **UNAVAILABLE**\n", i, j, dev->name);                  fprintf (outS, "    Device %d.%d (%s): **UNAVAILABLE**\n", i, j, dev->name);
208              fprintf (outS, "      Vendor:                  %s\n", dev->vendor);              fprintf (outS, "      Vendor:                  %s\n", dev->vendor);
209                fprintf (outS, "      Vendor Id:                  %d\n", dev->vendorId);
210              fprintf (outS, "      OpenCL version:          %d.%d\n",              fprintf (outS, "      OpenCL version:          %d.%d\n",
211                  dev->majorVersion, dev->minorVersion);                  dev->majorVersion, dev->minorVersion);
212              fprintf (outS, "      Type:                   ");              fprintf (outS, "      Type:                   ");

Legend:
Removed from v.2059  
changed lines
  Added in v.2060

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0