pageTitle = "Devices"; $devices = array(); $in_db = dbolist("SELECT DISTINCT device, vendorid FROM benchmarks ORDER BY device, vendorid"); foreach ($in_db as $row) { // todo: chip column in db $vendorid = $row['vendorid']; $words = explode(' ', $row['device']); $chip = array_pop($words); if (!is_numeric($chip)) { if (substr($vendorid,0,4) == '10de') $chip = array_pop($words); else $chip = array_pop($words).' '.$chip; } $devices[$vendorid] = $chip; } $chip = 'all'; $options = ''; foreach($devices as $a => $count) { if($a == $chip) $options .= ''; else $options .= ''; } echo <<

Devices in database

end; $algos_columns = ''; $algos = dbocolumn("SELECT DISTINCT algo FROM benchmarks ORDER BY algo LIMIT 30"); foreach ($algos as $algo) { $algos_columns .= ''.$algo.''; } JavascriptFile("/yaamp/ui/js/jquery.metadata.js"); JavascriptFile("/yaamp/ui/js/jquery.tablesorter.widgets.js"); showTableSorter('maintable', "{ tableClass: 'dataGrid', widgets: ['zebra','filter'], textExtraction: { // 4: function(node, table, n) { return $(node).attr('data'); } }, widgetOptions: { filter_external: '.search', filter_columnFilters: false, filter_childRows : true, filter_ignoreCase: true } }"); echo << Chip Device Vendor ID {$algos_columns} END; foreach ($in_db as $row) { echo ''; $vendorid = $row['vendorid']; echo ''.arraySafeVal($devices, $vendorid, '-').''; echo ''.$row['device'].getProductIdSuffix($row).''; if (substr($vendorid,0,4) == '10de') echo ''.$vendorid.''; else echo ''.$vendorid.''; $records = dbocolumn("SELECT algo FROM benchmarks WHERE vendorid=:vid ", array(':vid'=>$vendorid)); foreach ($algos as $algo) { $tick = ' '; if (in_array($algo, $records)) { $tick = CHtml::link('✓','/bench?algo='.$algo); } echo ''.$tick.''; } echo ''; } echo '
'; echo 'Learn how to submit your results'; echo '

';