Loading compiler/clang/QCORASTConsumer.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -16,21 +16,10 @@ QCORASTConsumer::QCORASTConsumer(CompilerInstance &c, Rewriter &rw) rewriter(rw) {} bool QCORASTConsumer::HandleTopLevelDecl(DeclGroupRef DR) { using namespace std::chrono; auto start = std::chrono::high_resolution_clock::now(); LambdaVisitor visitor(ci, rewriter); for (DeclGroupRef::iterator b = DR.begin(), e = DR.end(); b != e; ++b) { // if (std::string((*b)->getDeclKindName()) == "Function") { // std::cout << (*b)->getDeclKindName() << "\n"; // (*b)->dumpColor(); visitor.TraverseDecl(*b); // } } auto stop = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast<microseconds>(stop - start); // std::cout << "Visitor time: " << duration.count() << ", " << std::endl; return true; } } // namespace compiler Loading compiler/clang/qcor-driver.in.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ protected: for (auto& p : pragmaHandlers) { CI.getSema().getPreprocessor().RemovePragmaHandler(p.get()); } CI.getDiagnosticClient().EndSourceFile(); std::string outName(fileName); Loading compiler/clang/tests/LambdaVisitorTester.in.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ protected: CompilerInstance &CI = getCompilerInstance(); CI.createSema(getTranslationUnitKind(), nullptr); compiler::FuzzyParsingExternalSemaSource fuzzyParser; fuzzyParser.initialize(); fuzzyParser.setASTContext(&CI.getASTContext()); CI.getSema().addExternalSource(&fuzzyParser); Loading runtime/CMakeLists.txt +3 −3 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ else() set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-shared") endif() file(GLOB HEADERS *.hpp) file(GLOB HEADERS qcor.hpp qpu_handler.hpp) install(FILES ${HEADERS} DESTINATION include/qcor) install(TARGETS ${LIBRARY_NAME} DESTINATION lib) add_subdirectory(algorithms) add_subdirectory(nlopt-optimizers) No newline at end of file #add_subdirectory(algorithms) #add_subdirectory(nlopt-optimizers) No newline at end of file runtime/qcor.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ submit(HandlerLambda &&totalJob, std::shared_ptr<AcceleratorBuffer> buffer) { std::shared_ptr<Optimizer> getOptimizer(const std::string &name) { return xacc::getService<qcor::Optimizer>(name); return xacc::getService<xacc::Optimizer>(name); } std::shared_ptr<Optimizer> getOptimizer(const std::string &name, Loading Loading @@ -241,8 +241,8 @@ getObservable(const std::string &type, observable->fromOptions(options); return observable; } std::shared_ptr<algorithm::Algorithm> getAlgorithm(const std::string name) { return xacc::getService<qcor::algorithm::Algorithm>(name); std::shared_ptr<xacc::Algorithm> getAlgorithm(const std::string name) { return xacc::getService<xacc::Algorithm>(name); } } // namespace qcor Loading
compiler/clang/QCORASTConsumer.cpp +0 −11 Original line number Diff line number Diff line Loading @@ -16,21 +16,10 @@ QCORASTConsumer::QCORASTConsumer(CompilerInstance &c, Rewriter &rw) rewriter(rw) {} bool QCORASTConsumer::HandleTopLevelDecl(DeclGroupRef DR) { using namespace std::chrono; auto start = std::chrono::high_resolution_clock::now(); LambdaVisitor visitor(ci, rewriter); for (DeclGroupRef::iterator b = DR.begin(), e = DR.end(); b != e; ++b) { // if (std::string((*b)->getDeclKindName()) == "Function") { // std::cout << (*b)->getDeclKindName() << "\n"; // (*b)->dumpColor(); visitor.TraverseDecl(*b); // } } auto stop = std::chrono::high_resolution_clock::now(); auto duration = std::chrono::duration_cast<microseconds>(stop - start); // std::cout << "Visitor time: " << duration.count() << ", " << std::endl; return true; } } // namespace compiler Loading
compiler/clang/qcor-driver.in.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ protected: for (auto& p : pragmaHandlers) { CI.getSema().getPreprocessor().RemovePragmaHandler(p.get()); } CI.getDiagnosticClient().EndSourceFile(); std::string outName(fileName); Loading
compiler/clang/tests/LambdaVisitorTester.in.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ protected: CompilerInstance &CI = getCompilerInstance(); CI.createSema(getTranslationUnitKind(), nullptr); compiler::FuzzyParsingExternalSemaSource fuzzyParser; fuzzyParser.initialize(); fuzzyParser.setASTContext(&CI.getASTContext()); CI.getSema().addExternalSource(&fuzzyParser); Loading
runtime/CMakeLists.txt +3 −3 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ else() set_target_properties(${LIBRARY_NAME} PROPERTIES LINK_FLAGS "-shared") endif() file(GLOB HEADERS *.hpp) file(GLOB HEADERS qcor.hpp qpu_handler.hpp) install(FILES ${HEADERS} DESTINATION include/qcor) install(TARGETS ${LIBRARY_NAME} DESTINATION lib) add_subdirectory(algorithms) add_subdirectory(nlopt-optimizers) No newline at end of file #add_subdirectory(algorithms) #add_subdirectory(nlopt-optimizers) No newline at end of file
runtime/qcor.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ submit(HandlerLambda &&totalJob, std::shared_ptr<AcceleratorBuffer> buffer) { std::shared_ptr<Optimizer> getOptimizer(const std::string &name) { return xacc::getService<qcor::Optimizer>(name); return xacc::getService<xacc::Optimizer>(name); } std::shared_ptr<Optimizer> getOptimizer(const std::string &name, Loading Loading @@ -241,8 +241,8 @@ getObservable(const std::string &type, observable->fromOptions(options); return observable; } std::shared_ptr<algorithm::Algorithm> getAlgorithm(const std::string name) { return xacc::getService<qcor::algorithm::Algorithm>(name); std::shared_ptr<xacc::Algorithm> getAlgorithm(const std::string name) { return xacc::getService<xacc::Algorithm>(name); } } // namespace qcor