Fixed bug that caused the code to always return a single device info per platform; made matrix size and device id run-time parameters