Skip to content

Commit

Permalink
Added additional device properties to JSON-output
Browse files Browse the repository at this point in the history
  • Loading branch information
CNugteren committed Oct 25, 2015
1 parent e6e195d commit 0a8e371
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

Version 1.7.1
- Added additional device properties to JSON-output

Version 1.7.0
- Now using the Claduc C++11 interface to OpenCL
- Added a method to print all tuning results in JSON-format to file
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cmake_minimum_required(VERSION 2.8.10)
project("cltune" CXX)
set(cltune_VERSION_MAJOR 1)
set(cltune_VERSION_MINOR 7)
set(cltune_VERSION_PATCH 0)
set(cltune_VERSION_PATCH 1)

# Options
option(SAMPLES "Enable compilation of sample programs" ON)
Expand Down
6 changes: 4 additions & 2 deletions src/cltune.cc
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,11 @@ void Tuner::PrintJSON(const std::string &filename,
for (auto &description: descriptions) {
fprintf(file, " \"%s\": \"%s\",\n", description.first.c_str(), description.second.c_str());
}
fprintf(file, " \"vendor\": \"%s\",\n", pimpl->device().Vendor().c_str());
fprintf(file, " \"type\": \"%s\",\n", device_type.c_str());
fprintf(file, " \"device\": \"%s\",\n", pimpl->device().Name().c_str());
fprintf(file, " \"device_vendor\": \"%s\",\n", pimpl->device().Vendor().c_str());
fprintf(file, " \"device_type\": \"%s\",\n", device_type.c_str());
fprintf(file, " \"device_core_clock\": \"%lu\",\n", pimpl->device().CoreClock());
fprintf(file, " \"device_compute_units\": \"%lu\",\n", pimpl->device().ComputeUnits());
fprintf(file, " \"results\": [\n");

// Loops over all the results
Expand Down

0 comments on commit 0a8e371

Please sign in to comment.