Skip to content
Snippets Groups Projects
Commit 15275f3d authored by Bram Veenboer's avatar Bram Veenboer
Browse files

Add minimal example to demonstrate libtcc integration

parent c7f22068
Branches
No related tags found
1 merge request!5Use CMake and upgrade to cudawrappers 0.6.0
project(example)
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
find_package(CUDAToolkit REQUIRED)
find_package(cudawrappers REQUIRED)
find_package(libtcc REQUIRED)
add_executable(${PROJECT_NAME} example.cpp)
target_link_libraries(${PROJECT_NAME} tcc cudawrappers::cu cudawrappers::nvrtc)
\ No newline at end of file
#include <iostream>
#include <cudawrappers/cu.hpp>
#include <libtcc/Correlator.h>
#define NR_BITS 8
#define NR_CHANNELS 480
#define NR_POLARIZATIONS 2
#define NR_SAMPLES_PER_CHANNEL 3072
#define NR_RECEIVERS 576
#define NR_RECEIVERS_PER_BLOCK 64
int main(int argc, char *argv[]) {
cu::init();
cu::Device device(0);
cu::Context context(0, device);
context.setCurrent();
tcc::Correlator correlator(NR_BITS, NR_RECEIVERS, NR_CHANNELS,
NR_SAMPLES_PER_CHANNEL, NR_POLARIZATIONS,
NR_RECEIVERS_PER_BLOCK);
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment