Refactor string handling for GPU usage report
authorMark Abraham <mark.j.abraham@gmail.com>
Sat, 17 May 2014 13:27:25 +0000 (15:27 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 22 May 2014 04:23:32 +0000 (06:23 +0200)
commit2c59f6decc622f845b8ca658521a675654ee55e9
tree2af0f268a11dfb39f149ca464320c4fec533ba7a
parent6e506cfddbe0d38de56ce8d0b3310b24234d1986
Refactor string handling for GPU usage report

This prepares for future addition of reporting the list of available
compatible GPUs in the auto-selection case, which is needed for gmx
tune-pme to function well. Current outputs are only of IDs of
available GPUs, or IDs of those that will be used. The latter depends
on the number of PP ranks, so it doesn't help gmx tune-pme find out
how to run the optimization. At some point, delegating this kind of
task to hwinfo called from gmx tune-pme might be preferable.

The only functionality changes here are of reporting GPU ids by
referring to them as IDs, and the string of the ones used is of style
"0,1,4" rather than "#0, #1, #4". The use of the template function and
constructing the temporary vector prepares for the next commit.

Change-Id: Ic37989ce2f8e6396f450e1b5457ea7ea70b3849b
src/gromacs/gmxlib/gmx_detect_hardware.cpp