This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <DynamicInterface.hpp> | |
| #include <CRTPInterface.hpp> | |
| #include <benchmark/benchmark.h> | |
| #include <memory> | |
| unsigned long N = 10000; | |
| //auto dynobj = std::make_unique<DynamicImplementation>(); | |
| //auto crtpobj = std::make_unique<CRTPImplementation>(); | |
| DynamicImplementation dynobj; | |
| CRTPImplementation crtpobj; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <DynamicInterface.hpp> | |
| #include <CRTPInterface.hpp> | |
| #include <benchmark/benchmark.h> | |
| #include <memory> | |
| unsigned long N = 10000; | |
| auto dynobj = std::make_unique<DynamicImplementation>(); | |
| auto crtpobj = std::make_unique<CRTPImplementation>(); | |
| void run_dynamic(DynamicInterface* obj) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef CRTP_INTERFACE_HPP__ | |
| #define CRTP_INTERFACE_HPP__ | |
| template <typename Implementation> | |
| class CRTPInterface { | |
| public: | |
| void tick(unsigned long n) { | |
| impl().tick(n); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <memory> | |
| #include <algorithm> | |
| using namespace std; | |
| namespace shogun | |
| { | |
| // cpu types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <shogun/lib/common.h> | |
| #include <shogun/lib/SGVector.h> | |
| #include <shogun/mathematics/Math.h> | |
| #include <shogun/mathematics/linalg/linalg.h> | |
| #include <hayai/hayai.hpp> | |
| using namespace shogun; | |
| using namespace Eigen; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <shogun/lib/common.h> | |
| #include <shogun/lib/SGVector.h> | |
| #include <shogun/mathematics/Math.h> | |
| #include <shogun/mathematics/linalg/linalg.h> | |
| #include <hayai/hayai.hpp> | |
| using namespace shogun; | |
| using namespace Eigen; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| #include <cstdlib> | |
| #include <ctime> | |
| #include <cassert> | |
| /** | |
| * returns -1 if all the elements are smaller than val | |
| */ | |
| int search_first_larger(int a[], int first, int last, int val) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstdio> | |
| #include <string> | |
| #include <functional> | |
| #include <cmath> | |
| #include <initializer_list> | |
| /* | |
| Format("{type} {name} = -2*{pi}*sqrt(element)*pow({weights},2)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <algorithm> | |
| #include <memory> | |
| #include <type_traits> | |
| #include <cmath> | |
| namespace impl | |
| { | |
| template <typename T> |