Skip to content
This repository was archived by the owner on Apr 24, 2022. It is now read-only.

Commit b046b63

Browse files
committedJan 29, 2018
List pcie info - rework of abandonned PR#516 opened 22 days ago
by StefanOberhumer
1 parent de00189 commit b046b63

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
 

‎libethash-cuda/CUDAMiner.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,19 @@ void CUDAMiner::listDevices()
172172
{
173173
try
174174
{
175-
string outString = "\nListing CUDA devices.\nFORMAT: [deviceID] deviceName\n";
175+
cout << "\nListing CUDA devices.\nFORMAT: [deviceID] deviceName\n";
176176
int numDevices = getNumDevices();
177177
for (int i = 0; i < numDevices; ++i)
178178
{
179179
cudaDeviceProp props;
180180
CUDA_SAFE_CALL(cudaGetDeviceProperties(&props, i));
181181

182-
outString += "[" + to_string(i) + "] " + string(props.name) + "\n";
183-
outString += "\tCompute version: " + to_string(props.major) + "." + to_string(props.minor) + "\n";
184-
outString += "\tcudaDeviceProp::totalGlobalMem: " + to_string(props.totalGlobalMem) + "\n";
182+
cout << "[" + to_string(i) + "] " + string(props.name) + "\n";
183+
cout << "\tCompute version: " + to_string(props.major) + "." + to_string(props.minor) + "\n";
184+
cout << "\tcudaDeviceProp::totalGlobalMem: " + to_string(props.totalGlobalMem) + "\n";
185+
cout << "\tPci: " << setw(4) << setfill('0') << hex << props.pciDomainID << ':' << setw(2)
186+
<< props.pciBusID << ':' << setw(2) << props.pciDeviceID << '\n';
185187
}
186-
std::cout << outString;
187188
}
188189
catch(std::runtime_error const& err)
189190
{

0 commit comments

Comments
 (0)
This repository has been archived.