diff --git a/.gitignore b/.gitignore index 1e03b39..1368988 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ subprojects/nlohmann_json/ subprojects/packagecache/ subprojects/yaml-cpp-0.8.0 subprojects/base64-0.5.2/ +subprojects/stdexec/ +subprojects/.* .venv/ diff --git a/include/cloud_point/image.h b/include/cloud_point/image.h new file mode 100644 index 0000000..c12a194 --- /dev/null +++ b/include/cloud_point/image.h @@ -0,0 +1,20 @@ +// +// Created by vptyp on 11.03.2026. +// +#pragma once +#include +namespace score { + +class Image { +public: + Image(); + explicit Image(cv::Mat&& image); + ~Image(); + + cv::Mat get() const; + +protected: + cv::Mat data_; +}; + +} \ No newline at end of file diff --git a/meson.build b/meson.build index da38769..8b205a1 100644 --- a/meson.build +++ b/meson.build @@ -3,6 +3,7 @@ project('cloud_point_rpc', 'cpp', default_options : ['warning_level=3', 'cpp_std=c++20']) # Dependencies +stdexec_dep = dependency('stdexec', fallback: ['stdexec', 'stdexec_dep']) json_dep = dependency('nlohmann_json', fallback : ['nlohmann_json', 'nlohmann_json_dep']) thread_dep = dependency('threads') asio_dep = dependency('asio', fallback : ['asio', 'asio_dep']) diff --git a/src/cloud_point/image.cpp b/src/cloud_point/image.cpp new file mode 100644 index 0000000..cc265f2 --- /dev/null +++ b/src/cloud_point/image.cpp @@ -0,0 +1,22 @@ +// +// Created by vptyp on 12.03.2026. +// +#include "cloud_point/image.h" + +namespace score { + + Image::Image() { + //no work + } + + Image::Image(cv::Mat&& image) { + this->data_ = std::move(image); + } + +Image::~Image() = default; + + cv::Mat Image::get() const { + return this->data_; +} + +} \ No newline at end of file diff --git a/src/cloud_point/meson.build b/src/cloud_point/meson.build new file mode 100644 index 0000000..d8caf55 --- /dev/null +++ b/src/cloud_point/meson.build @@ -0,0 +1,27 @@ +opencv_dep = dependency('opencv4', + fallback: ['libopencv', 'libopencv4'], + required: false) + +if not opencv_dep.found() + message('\'opencv\' was not found. Try install libopencv-dev or similar package on your system') + message('cloud_point_compute library removed from compilation') + subdir_done() +endif + +cloud_point_sources = files( + 'image.cpp' +) + +cpc_deps = [ cloud_point_rpc_dep, opencv_dep ] + +cloud_point_compute_lib = shared_library('cloud_point_compute', + sources: cloud_point_sources, + include_directories: inc, + dependencies: cpc_deps, +) + +cloud_point_compute_dep = declare_dependency( + include_directories: inc, + link_with: cloud_point_compute_lib, + dependencies: cpc_deps +) \ No newline at end of file diff --git a/src/meson.build b/src/meson.build index fe19d22..3b2b929 100644 --- a/src/meson.build +++ b/src/meson.build @@ -7,16 +7,18 @@ cloud_point_rpc_sources = files( 'rpc_coder.cpp' ) +deps = [json_dep, thread_dep, glog_dep, yaml_dep, asio_dep, base64_dep] + libcloud_point_rpc = shared_library('cloud_point_rpc', cloud_point_rpc_sources, include_directories : inc, - dependencies : [json_dep, thread_dep, glog_dep, yaml_dep, asio_dep, base64_dep], + dependencies : deps, install : true) cloud_point_rpc_dep = declare_dependency( include_directories : inc, link_with : libcloud_point_rpc, - dependencies : [json_dep, glog_dep, yaml_dep, asio_dep, base64_dep]) + dependencies : deps) # Test lib libcloud_point_rpc_test = shared_library('test_cloud_point', @@ -54,3 +56,5 @@ executable('cloud_point_rpc_server', dependencies : cloud_point_rpc_dep, link_args : '-pthread', install : true) + +subdir('cloud_point') \ No newline at end of file diff --git a/src/rpc_coder.cpp b/src/rpc_coder.cpp index ee8aa58..c8a9329 100644 --- a/src/rpc_coder.cpp +++ b/src/rpc_coder.cpp @@ -11,7 +11,7 @@ Base64RPCCoder::Base64RPCCoder() = default; Base64RPCCoder::~Base64RPCCoder() = default; /** - * Tries to decode ASCII complained string to the + * Tries to decode ASCII complained string to the raw bytes * @param encoded ASCII complained base64 encoded string * @return vector of raw bytes << allocated on encoded.size() / 4 * 3 + 1 size */ diff --git a/subprojects/stdexec.wrap b/subprojects/stdexec.wrap new file mode 100644 index 0000000..21db8fb --- /dev/null +++ b/subprojects/stdexec.wrap @@ -0,0 +1,7 @@ +[wrap-git] +url = https://github.com/NVIDIA/stdexec.git +revision = gtc-2026 +depth = 1 + +[provide] +stdexec = stdexec_dep