MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / compute2cores

Function compute2cores

src/backend/cuda/device_manager.cpp:193–201  ·  view source on GitHub ↗

pulled from CUTIL from CUDA SDK

Source from the content-addressed store, hash-verified

191
192// pulled from CUTIL from CUDA SDK
193static inline int compute2cores(unsigned major, unsigned minor) {
194 for (int i = 0; gpus[i].compute_capability != -1; ++i) {
195 if (static_cast<unsigned>(gpus[i].compute_capability) ==
196 (major << 4U) + minor) {
197 return gpus[i].cores_per_sm;
198 }
199 }
200 return 0;
201}
202
203static inline int getMinSupportedCompute(int cudaMajorVer) {
204 int CVSize = static_cast<int>(minSV.size());

Callers 1

DeviceManagerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected