32 #ifndef OCLSLAM_ALGORITHMS_HPP
33 #define OCLSLAM_ALGORITHMS_HPP
35 #include <CLUtils.hpp>
37 #include <RBC/data_types.hpp>
38 #include <RBC/algorithms.hpp>
39 #include <eigen3/Eigen/Dense>
92 SplitPC8D (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
99 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
102 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
104 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
112 clutils::CLEnvInfo<1> info;
114 cl::CommandQueue queue;
119 unsigned int bufferInSize, bufferOutPC3DSize, bufferOutRGBSize;
120 cl::Buffer hBufferIn, hBufferOutPC3D, hBufferOutRGB;
121 cl::Buffer dBufferIn, dBufferOutPC3D, dBufferOutRGB;
131 template <
typename period>
132 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
134 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, cl::NullRange, events, &timer.event ());
135 queue.flush (); timer.wait ();
137 return timer.duration ();
145 #endif // OCLSLAM_ALGORITHMS_HPP
void write(SplitPC8D::Memory mem=SplitPC8D::Memory::D_IN, void *ptr=nullptr, bool block=CL_FALSE, const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Performs a data transfer to a device buffer.
Definition: algorithms.cpp:190
Interface class for the splitPC8D_octomap kernel.
Definition: algorithms.hpp:74
cl_uchar * hPtrOutRGB
Definition: algorithms.hpp:108
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:81
Offers classes which set up kernel execution parameters and provide interfaces for the handling of me...
Definition: algorithms.hpp:45
Declares classes used by the OpenCL interface classes in cl_algo.
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:244
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:132
SplitPC8D(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:53
Offers functions that are serial CPU implementations of the relevant algorithms in the OCLSLAM pipeli...
Definition: helper_funcs.hpp:47
void init(unsigned int _n, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:95
void * read(SplitPC8D::Memory mem=SplitPC8D::Memory::H_OUT_PC3D, bool block=CL_TRUE, const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Performs a data transfer to a staging buffer.
Definition: algorithms.cpp:218
Staging
Enumerates staging buffer configurations.
Definition: common.hpp:43
cl_float * hPtrOutPC3D
Definition: algorithms.hpp:107
cl_float * hPtrIn
Definition: algorithms.hpp:106