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

Add minimal example to demonstrate libtcc integration

parent ba618690
Branches
Tags
No related merge requests found
Pipeline #60016 passed
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