This file contains 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 "iod/parse_options.hh" | |
#include "symbols.hh" | |
using namespace s; | |
int main(int argc, char* argv[]) | |
{ | |
auto options = iod::parse_options(argc, argv, | |
_size | _s = int(20), |
This file contains 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
#! /bin/sh | |
rec() { | |
for f in `ls $2`; do | |
echo $1 $f | |
if [ -d "$2/$f" ]; then | |
rec $1-- "$2/$f" | |
fi |
This file contains 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 <iod/aos_view.hh> | |
#include "symbols.hh" | |
#include <cassert> | |
// aos_view allows to view several arrays as a unique array of structures. | |
// Any class with a size() method and operator[](int i) is supported. | |
// The view only hold references to the arrays so no deep array copy is involved. |
This file contains 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 <iod/array_view.hh> | |
#include "symbols.hh" | |
#include <cassert> | |
int main() | |
{ | |
using namespace iod; | |
using namespace s; |
This file contains 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 <opencv2/opencv.hpp> | |
#include <chrono> | |
class timer | |
{ | |
public: | |
void start() { start_ = std::chrono::high_resolution_clock::now(); } | |
void end() { end_ = std::chrono::high_resolution_clock::now(); } |
This file contains 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
// Results one OnePlus two (snapdragon 810 - 8 cores ARMv8): | |
// with optimization -fopenmp -Ofast -mcpu=cortex-a57.cortex-a53 | |
// Serial time: 19.480000 ms | |
// OpenMP time: 10.000000 ms | |
{ | |
const int S = 10e6; | |
auto A = new int[S]; | |
auto B = new int[S]; |
This file contains 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
std::vector<cv::Point2f> pts; | |
std::vector<cv::Point2f> next_pts; | |
std::vector<unsigned char> status; | |
cv::Mat err; | |
int winsize = 11; | |
int nscales = 4; | |
for (auto p : i1_gl.domain()) | |
pts.push_back(cv::Point2f(p[1], p[0])); | |
calcOpticalFlowPyrLK(to_opencv(i1_gl), to_opencv(i2_gl), pts, next_pts, status, err, |
This file contains 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 <string_view> | |
#include <iostream> | |
#include <cstring> | |
#include <vector> | |
std::vector<std::string> split(const std::string& str, char split_char) { | |
const char* cur = str.c_str(); |
OlderNewer