Skip to content
Snippets Groups Projects
Commit 94084be3 authored by Daniel Maier's avatar Daniel Maier
Browse files

add info tool

parent dccc4ec8
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,10 @@ cmake_minimum_required (VERSION 2.6)
project (perf)
include_directories("../clan-0.8.0/osl/include")
link_directories("/home/daniel/polyhedral_perforation/clan-0.8.0/osl/.libs")
set(CMAKE_CXX_FLAGS "-g -Wall")
add_executable(perf main.cpp)
target_link_libraries(perf osl)
set(CMAKE_CXX_FLAGS "-g -Wall")
add_executable(info info.cpp)
target_link_libraries(info osl)
info.cpp 0 → 100644
#include <iostream>
#include <osl/osl.h>
int main(int argc, char *argv[]) {
if(argc != 2) {
std::cerr << "usage: <SCOP>\n";
return -1;
}
auto *fp = fopen(argv[1], "r");
if(!fp) {
std::cerr << "openscop read failed\n";
return -1;
}
auto scop = osl_scop_read(fp);
fclose(fp);
for(auto s = scop->statement; s; s = s->next) {
std::cout << s->domain->nb_output_dims << "\n";
}
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment