MCPcopy Create free account
hub / github.com/AdvancedCompiler/AdvancedCompiler / initDevice

Function initDevice

code/Chapter10/freshman.h:81–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81void initDevice(int devNum)
82{
83 int dev = devNum;
84 cudaDeviceProp deviceProp;
85 CHECK(cudaGetDeviceProperties(&deviceProp,dev));
86 printf("Using device %d: %s\n",dev,deviceProp.name);
87 CHECK(cudaSetDevice(dev));
88
89}
90void checkResult(float * hostRef,float * gpuRef,const int N)
91{
92 double epsilon=1.0E-8;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected