Skip to content

Instantly share code, notes, and snippets.

@jrussino
jrussino / cudaDetectAndComputeAsync.cpp
Created Jul 8, 2017
OpenCV multi-threaded CUDA ORB example (fails with "illegal memory access")
View cudaDetectAndComputeAsync.cpp
#include <iostream>
#include <thread>
#include <opencv2/cudafeatures2d.hpp>
#include <opencv2/cudaimgproc.hpp>
#include <opencv2/highgui.hpp>
void capture_thread(int device_num, int n_cycles)
{
std::cout << "Starting capture thread for device " + std::to_string(device_num) + "\n" << std::flush;