mirror of
https://github.com/allemangD/toddcox-visualize.git
synced 2025-11-10 12:02:47 -05:00
restructure cmake project
This commit is contained in:
2
example/CMakeLists.txt
Normal file
2
example/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_executable(bench bench.cpp)
|
||||
target_link_libraries(bench PRIVATE tc)
|
||||
20
example/bench.cpp
Normal file
20
example/bench.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "solver.h"
|
||||
#include "groups.h"
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
tc::Group g = tc::group::T(2, 5000);
|
||||
|
||||
auto s = std::chrono::system_clock::now();
|
||||
auto cosets = solve(g);
|
||||
auto e = std::chrono::system_clock::now();
|
||||
|
||||
std::chrono::duration<double> diff = e - s;
|
||||
int order = cosets.len;
|
||||
|
||||
std::cout << order << std::endl;
|
||||
std::cout << diff.count() << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user