- Ubuntu 18.04
- NVIDIA driver 430.40
- NVIDIA Video Codec SDK 9.0.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
// How to "wrap" a CUDA kernel with a C++ class; the kernel must be defined outside of | |
// the class and launched from within a class instance's method. | |
#include <iostream> | |
#include <cuda.h> | |
#include <cuda_runtime.h> | |
#define LEN 10 | |
__global__ void kernel(int *a, int *b, unsigned int N); |
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
struct GPUData { | |
int number_of_finger; | |
int number_of_cyliner; | |
float * q_theta_arrs; | |
int * x_arrs; | |
int * y_arrs; | |
unsigned long long* byte_arrs_offset0; | |
unsigned long long* byte_arrs_offset1; | |
unsigned long long* byte_arrs_offset2; | |
unsigned long long* byte_arrs_offset3; |
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 <QCoreApplication> | |
#include <QFile> | |
#include <QTextStream> | |
#include <QDebug> | |
void convert_date(QString& date) | |
{ | |
date=date.mid(0,4)+"-"+date.mid(4,2)+"-"+date.mid(6,2); | |
} | |
int main(int argc, char *argv[]) | |
{ |
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> | |
using namespace cv; | |
#include <assert.h> | |
//#define normal | |
void CreateKernel(cv::Mat& kernel, | |
int KernelSize, | |
float angle /*angle is in degree format*/); | |
void motionBlur(cv::InputArray src,cv::Mat & dst,int angle,int kernel_size); |
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
int main(int argc, char* argv[]) { | |
int n_boards = 0; // Will be set by input list | |
float image_sf = 0.5f; | |
float delay = 1.f; | |
int board_w = 0; | |
int board_h = 0; | |
if(argc < 4 || argc > 6) { | |
cout << "\nERROR: Wrong number of input parameters"; | |
help( argv ); |
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
From ubuntu:18.04 as base | |
# install github and vim | |
RUN apt-get install -y vim wget gnupg | |
ENV DEBIAN_FRONTEND "noninteractive" # to skip any interactive configurations during installation | |
RUN apt-get install -yq keyboard-configuration | |
# install gstreamer | |
RUN apt install -y \ |
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 <vector> | |
#include <algorithm> | |
#include <numeric> | |
#include <future> | |
#include <string> | |
#include <mutex> | |
#include <iomanip> | |
using namespace std::chrono_literals; |
When you add --graphviz=graph/X.dot
to the cmake command, it will generate some .dot files based on the dependencies you have.
For unix based systems, you can use the following python code to generate svg for each dot file:
import os
# read all .dot files in a path