32 #ifndef GF_ALGORITHMS_HPP
33 #define GF_ALGORITHMS_HPP
35 #include <CLUtils.hpp>
67 template <SeparateRGBConfig C>
119 SeparateRGB (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
121 cl::Memory&
get (SeparateRGB::Memory mem);
123 void init (
unsigned int _width,
unsigned int _height,
Staging _staging =
Staging::IO);
125 void write (SeparateRGB::Memory mem = SeparateRGB::Memory::D_IN,
void *ptr =
nullptr,
bool block = CL_FALSE,
126 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
128 void* read (SeparateRGB::Memory mem = SeparateRGB::Memory::H_OUT_R,
bool block = CL_TRUE,
129 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
131 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
140 clutils::CLEnvInfo<1> info;
142 cl::CommandQueue queue;
144 cl::NDRange global, local;
147 unsigned int width, height;
148 unsigned int bufferInSize, bufferOutSize;
149 cl::Buffer hBufferIn, hBufferOutR, hBufferOutG, hBufferOutB;
150 cl::Buffer dBufferIn, dBufferOutR, dBufferOutG, dBufferOutB;
160 template <
typename period>
161 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
163 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
164 queue.flush (); timer.wait ();
166 return timer.duration ();
221 SeparateRGB (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
223 cl::Memory&
get (SeparateRGB::Memory mem);
225 void init (
unsigned int _width,
unsigned int _height,
Staging _staging =
Staging::IO);
227 void write (SeparateRGB::Memory mem = SeparateRGB::Memory::D_IN,
void *ptr =
nullptr,
bool block = CL_FALSE,
228 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
230 void* read (SeparateRGB::Memory mem = SeparateRGB::Memory::H_OUT_R,
bool block = CL_TRUE,
231 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
233 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
242 clutils::CLEnvInfo<1> info;
244 cl::CommandQueue queue;
246 cl::NDRange global, local;
249 unsigned int width, height;
250 unsigned int bufferInSize, bufferOutSize;
251 cl::Buffer hBufferIn, hBufferOutR, hBufferOutG, hBufferOutB;
252 cl::Buffer dBufferIn, dBufferOutR, dBufferOutG, dBufferOutB;
262 template <
typename period>
263 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
265 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
266 queue.flush (); timer.wait ();
268 return timer.duration ();
291 template <CombineRGBConfig C>
342 CombineRGB (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
344 cl::Memory&
get (CombineRGB::Memory mem);
346 void init (
unsigned int _width,
unsigned int _height,
Staging _staging =
Staging::IO);
348 void write (CombineRGB::Memory mem = CombineRGB::Memory::D_IN_R,
void *ptr =
nullptr,
bool block = CL_FALSE,
349 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
351 void* read (CombineRGB::Memory mem = CombineRGB::Memory::H_OUT,
bool block = CL_TRUE,
352 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
354 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
363 clutils::CLEnvInfo<1> info;
365 cl::CommandQueue queue;
367 cl::NDRange global, local;
370 unsigned int width, height;
371 unsigned int bufferInSize, bufferOutSize;
372 cl::Buffer hBufferInR, hBufferInG, hBufferInB, hBufferOut;
373 cl::Buffer dBufferInR, dBufferInG, dBufferInB, dBufferOut;
383 template <
typename period>
384 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
386 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
387 queue.flush (); timer.wait ();
389 return timer.duration ();
444 CombineRGB (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
446 cl::Memory&
get (CombineRGB::Memory mem);
448 void init (
unsigned int _width,
unsigned int _height,
Staging _staging =
Staging::IO);
450 void write (CombineRGB::Memory mem = CombineRGB::Memory::D_IN_R,
451 void *ptr =
nullptr,
bool block = CL_FALSE,
452 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
454 void* read (CombineRGB::Memory mem = CombineRGB::Memory::H_OUT,
bool block = CL_TRUE,
455 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
457 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
466 clutils::CLEnvInfo<1> info;
468 cl::CommandQueue queue;
470 cl::NDRange global, local;
473 unsigned int width, height;
474 unsigned int bufferInSize, bufferOutSize;
475 cl::Buffer hBufferInR, hBufferInG, hBufferInB, hBufferOut;
476 cl::Buffer dBufferInR, dBufferInG, dBufferInB, dBufferOut;
486 template <
typename period>
487 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
489 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
490 queue.flush (); timer.wait ();
492 return timer.duration ();
514 template <DepthConfig C>
558 Depth (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
560 cl::Memory&
get (Depth::Memory mem);
562 void init (
unsigned int _width,
unsigned int _height,
float _scaling = 1.f,
Staging _staging =
Staging::IO);
564 void write (Depth::Memory mem = Depth::Memory::D_IN,
void *ptr =
nullptr,
bool block = CL_FALSE,
565 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
567 void* read (Depth::Memory mem = Depth::Memory::H_OUT,
bool block = CL_TRUE,
568 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
570 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
574 void setScaling (
float _scaling);
581 clutils::CLEnvInfo<1> info;
583 cl::CommandQueue queue;
588 unsigned int bufferInSize, bufferOutSize;
590 cl::Buffer hBufferIn, hBufferOut;
591 cl::Buffer dBufferIn, dBufferOut;
601 template <
typename period>
602 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
604 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, cl::NullRange, events, &timer.event ());
605 queue.flush (); timer.wait ();
607 return timer.duration ();
650 DepthTo3D (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
654 void init (
unsigned int _width,
unsigned int _height,
658 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
661 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
663 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
678 clutils::CLEnvInfo<1> info;
680 cl::CommandQueue queue;
684 unsigned int width, height;
685 unsigned int bufferInSize, bufferOutSize;
687 cl::Buffer hBufferIn, hBufferOut;
688 cl::Buffer dBufferIn, dBufferOut;
698 template <
typename period>
699 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
701 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, cl::NullRange, events, &timer.event ());
702 queue.flush (); timer.wait ();
704 return timer.duration ();
759 RGBDTo8D (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
763 void init (
unsigned int _width,
unsigned int _height,
767 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
770 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
772 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
794 clutils::CLEnvInfo<1> info;
796 cl::CommandQueue queue;
798 cl::NDRange global, local;
801 unsigned int width, height, points;
802 unsigned int bufferInSize, bufferOutSize;
805 cl::Buffer hBufferInD, hBufferInR, hBufferInG, hBufferInB, hBufferOut;
806 cl::Buffer dBufferInD, dBufferInR, dBufferInG, dBufferInB, dBufferOut;
816 template <
typename period>
817 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
819 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
820 queue.flush (); timer.wait ();
822 return timer.duration ();
868 SplitPC8D (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
875 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
878 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
880 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
892 clutils::CLEnvInfo<1> info;
894 cl::CommandQueue queue;
898 unsigned int n, offset;
899 unsigned int bufferInSize, bufferOutSize;
900 cl::Buffer hBufferIn, hBufferOutPC4D, hBufferOutRGBA;
901 cl::Buffer dBufferIn, dBufferOutPC4D, dBufferOutRGBA;
911 template <
typename period>
912 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
914 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, cl::NullRange, events, &timer.event ());
915 queue.flush (); timer.wait ();
917 return timer.duration ();
959 RGBNorm (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
966 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
969 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
971 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
978 clutils::CLEnvInfo<1> info;
980 cl::CommandQueue queue;
984 unsigned int width, height, bufferSize;
985 cl::Buffer hBufferIn, hBufferOut;
986 cl::Buffer dBufferIn, dBufferOut;
996 template <
typename period>
997 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
999 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, cl::NullRange, events, &timer.event ());
1000 queue.flush (); timer.wait ();
1002 return timer.duration ();
1045 Scan (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
1049 void init (
unsigned int _width,
unsigned int _height,
float _scaling = 1.f,
Staging _staging =
Staging::IO);
1052 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1055 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1057 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1067 clutils::CLEnv &env;
1068 clutils::CLEnvInfo<1> info;
1069 cl::Context context;
1070 cl::CommandQueue queue;
1071 cl::Kernel kernelScan, kernelSumsScan, kernelAddSums;
1072 cl::NDRange globalScan, globalSumsScan, localScan;
1073 cl::NDRange globalAddSums, localAddSums, offsetAddSums;
1075 size_t wgMultiple, wgXdim;
1076 unsigned int width, height, bufferSize, bufferSumsSize;
1078 cl::Buffer hBufferIn, hBufferOut;
1079 cl::Buffer dBufferIn, dBufferOut, dBufferSums;
1089 template <
typename period>
1090 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1096 queue.enqueueNDRangeKernel (
1097 kernelScan, cl::NullRange, globalScan, localScan, events, &timer.event ());
1098 queue.flush (); timer.wait ();
1099 pTime = timer.duration ();
1103 queue.enqueueNDRangeKernel (
1104 kernelScan, cl::NullRange, globalScan, localScan, events, &timer.event ());
1105 queue.flush (); timer.wait ();
1106 pTime = timer.duration ();
1108 queue.enqueueNDRangeKernel (
1109 kernelSumsScan, cl::NullRange, globalSumsScan, localScan,
nullptr, &timer.event ());
1110 queue.flush (); timer.wait ();
1111 pTime += timer.duration ();
1113 queue.enqueueNDRangeKernel (
1114 kernelAddSums, offsetAddSums, globalAddSums, localAddSums,
nullptr, &timer.event ());
1115 queue.flush (); timer.wait ();
1116 pTime += timer.duration ();
1161 Transpose (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
1168 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1171 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1173 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1179 clutils::CLEnv &env;
1180 clutils::CLEnvInfo<1> info;
1181 cl::Context context;
1182 cl::CommandQueue queue;
1184 cl::NDRange global, local;
1186 unsigned int width, height, bufferSize;
1187 cl::Buffer hBufferIn, hBufferOut;
1188 cl::Buffer dBufferIn, dBufferOut;
1198 template <
typename period>
1199 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1201 queue.enqueueNDRangeKernel (kernel, cl::NullRange, global, local, events, &timer.event ());
1202 queue.flush (); timer.wait ();
1204 return timer.duration ();
1247 SAT (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info,
bool _transposed =
true);
1251 void init (
unsigned int _width,
unsigned int _height,
float _scaling = 1.f,
Staging _staging =
Staging::IO);
1254 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1257 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1259 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1269 clutils::CLEnv &env;
1270 clutils::CLEnvInfo<1> info;
1271 cl::Context context;
1272 cl::CommandQueue queue;
1273 Scan scanRows, scanColumns;
1276 unsigned int width, height, bufferSize;
1279 cl::Buffer hBufferIn, hBufferOut;
1289 template <
typename period>
1290 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1294 pTime = scanRows.
run (timer, events);
1295 pTime += transpose1.
run (timer);
1296 pTime += scanColumns.
run (timer);
1299 pTime += transpose2.
run (timer);
1343 BoxFilterSAT (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
1347 void init (
unsigned int _width,
unsigned int _height,
1351 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1354 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1356 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1370 static const unsigned int lXdim = 16;
1371 static const unsigned int lYdim = 16;
1372 clutils::CLEnv &env;
1373 clutils::CLEnvInfo<1> info;
1374 cl::Context context;
1375 cl::CommandQueue queue;
1377 cl::NDRange global, local;
1379 unsigned int width, height, bufferSize;
1383 cl::Buffer hBufferIn, hBufferOut;
1384 cl::Buffer dBufferOut;
1394 template <
typename period>
1395 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1399 pTime = sat.
run (timer, events);
1401 queue.enqueueNDRangeKernel (
1402 kernel, cl::NullRange, global, local,
nullptr, &timer.event ());
1403 queue.flush (); timer.wait ();
1404 pTime += timer.duration ();
1448 BoxFilter (clutils::CLEnv &_env, clutils::CLEnvInfo<1> _info);
1455 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1458 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1460 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1470 static const unsigned int lXdim = 16;
1471 static const unsigned int lYdim = 16;
1472 clutils::CLEnv &env;
1473 clutils::CLEnvInfo<1> info;
1474 cl::Context context;
1475 cl::CommandQueue queue;
1477 cl::NDRange global, local;
1479 unsigned int width, height, bufferSize;
1481 cl::Buffer hBufferIn, hBufferOut;
1482 cl::Buffer dBufferIn, dBufferOut;
1492 template <
typename period>
1493 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1495 queue.enqueueNDRangeKernel (
1496 kernel, cl::NullRange, global, local,
nullptr, &timer.event ());
1497 queue.flush (); timer.wait ();
1499 return timer.duration ();
1525 template <Gu
idedFilterConfig Ip>
1569 GuidedFilter (clutils::CLEnv &_env, clutils::CLEnvInfo<2> _info);
1571 cl::Memory&
get (GuidedFilter::Memory mem);
1573 void init (
unsigned int _width,
unsigned int _height,
int _radius,
float _eps,
int _zero_out = 0,
1574 float _boxScaling = 1e-4f,
float _outputScaling = 1.f,
Staging _staging =
Staging::IO);
1576 void write (GuidedFilter::Memory mem = GuidedFilter::Memory::D_IN,
void *ptr =
nullptr,
bool block = CL_FALSE,
1577 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1579 void* read (GuidedFilter::Memory mem = GuidedFilter::Memory::H_OUT,
bool block = CL_TRUE,
1580 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1582 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1586 void setRadius (
int _radius);
1590 void setEps (
float _eps);
1592 float getBoxScaling ();
1594 void setBoxScaling (
float _boxScaling);
1596 float getOutputScaling ();
1598 void setOutputScaling (
float _outputScaling);
1602 void setZeroing (
int _zero_out);
1608 clutils::CLEnv &env;
1609 clutils::CLEnvInfo<2> info;
1610 cl::Context context;
1611 cl::CommandQueue queue0;
1617 unsigned int width, height, bufferSize;
1618 int radius;
float eps;
1620 float boxScaling, outputScaling;
1621 cl::Buffer hBufferIn, hBufferOut;
1622 cl::Buffer dBufferIn, dBufferOut;
1623 cl::Buffer dBufferOutA, dBufferOutB;
1624 cl::Event p2Event, abEvent, mbEvent;
1625 std::vector<cl::Event> waitListAB, waitListMB, waitListQ;
1642 template <
typename period>
1643 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1647 pTime = mean_p.
run (timer, events);
1648 pTime += squared.
run (timer);
1649 pTime += mean_p2.
run (timer);
1651 queue0.enqueueNDRangeKernel (ab, cl::NullRange, global, cl::NullRange,
nullptr, &timer.event ());
1652 queue0.flush (); timer.wait ();
1653 pTime += timer.duration ();
1655 pTime += mean_a.
run (timer);
1656 pTime += mean_b.
run (timer);
1658 queue0.enqueueNDRangeKernel (q, cl::NullRange, global, cl::NullRange,
nullptr, &timer.event ());
1659 queue0.flush (); timer.wait ();
1660 pTime += timer.duration ();
1714 GuidedFilter (clutils::CLEnv &_env, clutils::CLEnvInfo<2> _info);
1716 cl::Memory&
get (GuidedFilter::Memory mem);
1718 void init (
unsigned int _width,
unsigned int _height,
int _radius,
float _eps,
1721 void write (GuidedFilter::Memory mem = GuidedFilter::Memory::D_IN_I,
void *ptr =
nullptr,
bool block = CL_FALSE,
1722 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1724 void* read (GuidedFilter::Memory mem = GuidedFilter::Memory::H_OUT,
bool block = CL_TRUE,
1725 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1727 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1731 void setRadius (
int _radius);
1735 void setEps (
float _eps);
1737 float getBoxScaling ();
1739 void setBoxScaling (
float _boxScaling);
1743 void setZeroing (
int _zero_out);
1750 clutils::CLEnv &env;
1751 clutils::CLEnvInfo<2> info;
1752 cl::Context context;
1753 cl::CommandQueue queue0;
1754 BoxFilterSAT mean_I, mean_p, corr_I, corr_Ip, mean_a, mean_b;
1756 cl::Kernel var, ab, q;
1759 unsigned int width, height, bufferSize;
1760 int radius;
float eps;
1763 cl::Buffer hBufferInI, hBufferInP, hBufferOut;
1764 cl::Buffer dBufferInI, dBufferInP, dBufferOut;
1765 cl::Buffer dBufferOutVarI, dBufferOutCovIp;
1766 cl::Buffer dBufferOutA, dBufferOutB;
1767 cl::Event corrIpEvent, abEvent, mbEvent;
1768 std::vector<cl::Event> waitListVar, waitListMB, waitListQ;
1785 template <
typename period>
1786 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1790 pTime = mean_I.
run (timer, events);
1791 pTime += mean_p.
run (timer, events);
1792 pTime += mult_II.
run (timer, events);
1793 pTime += mult_Ip.
run (timer, events);
1794 pTime += corr_I.
run (timer);
1795 pTime += corr_Ip.
run (timer);
1797 queue0.enqueueNDRangeKernel (var, cl::NullRange, global, cl::NullRange,
nullptr, &timer.event ());
1798 queue0.flush (); timer.wait ();
1799 pTime += timer.duration ();
1801 queue0.enqueueNDRangeKernel (ab, cl::NullRange, global, cl::NullRange,
nullptr, &timer.event ());
1802 queue0.flush (); timer.wait ();
1803 pTime += timer.duration ();
1805 pTime += mean_a.
run (timer);
1806 pTime += mean_b.
run (timer);
1808 queue0.enqueueNDRangeKernel (q, cl::NullRange, global, cl::NullRange,
nullptr, &timer.event ());
1809 queue0.flush (); timer.wait ();
1810 pTime += timer.duration ();
1841 template <Gu
idedFilterRGBConfig C>
1897 cl::Memory&
get (GuidedFilterRGB::Memory mem);
1899 void init (
unsigned int _width,
unsigned int _height,
1902 void write (GuidedFilterRGB::Memory mem = GuidedFilterRGB::Memory::D_IN,
void *ptr =
nullptr,
1903 bool block = CL_FALSE,
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1905 void* read (GuidedFilterRGB::Memory mem = GuidedFilterRGB::Memory::H_OUT_R,
bool block = CL_TRUE,
1906 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1908 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
1912 void setRadius (
int _radius);
1916 void setEps (
float _eps);
1924 clutils::CLEnv &env;
1925 clutils::CLEnvInfo<2> info;
1926 cl::Context context;
1927 cl::CommandQueue queue0;
1931 unsigned int width, height;
1932 unsigned int bufferInSize, bufferOutSize;
1933 int radius;
float eps;
1934 cl::Buffer hBufferIn, hBufferOutR, hBufferOutG, hBufferOutB;
1935 cl::Buffer dBufferIn, dBufferOutR, dBufferOutG, dBufferOutB;
1936 cl::Event sEvent; std::vector<cl::Event> waitList;
1946 template <
typename period>
1947 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
1951 pTime = sRGB.
run (timer, events);
1952 pTime += gfR.
run (timer);
1953 pTime += gfG.
run (timer);
1954 pTime += gfB.
run (timer);
2006 cl::Memory&
get (GuidedFilterRGB::Memory mem);
2008 void init (
unsigned int _width,
unsigned int _height,
2011 void write (GuidedFilterRGB::Memory mem = GuidedFilterRGB::Memory::D_IN,
void *ptr =
nullptr,
2012 bool block = CL_FALSE,
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2014 void* read (GuidedFilterRGB::Memory mem = GuidedFilterRGB::Memory::H_OUT,
bool block = CL_TRUE,
2015 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2017 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2021 void setRadius (
int _radius);
2025 void setEps (
float _eps);
2031 clutils::CLEnv &env;
2032 clutils::CLEnvInfo<2> info;
2033 cl::Context context;
2034 cl::CommandQueue queue0;
2039 unsigned int width, height;
2040 unsigned int bufferInSize, bufferOutSize;
2041 int radius;
float eps;
2042 cl::Buffer hBufferIn, hBufferOut;
2043 cl::Buffer dBufferIn, dBufferOut;
2044 cl::Event sEvent; std::vector<cl::Event> waitList;
2054 template <
typename period>
2055 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
2059 pTime = sRGB.
run (timer, events);
2060 pTime += gfR.
run (timer);
2061 pTime += gfG.
run (timer);
2062 pTime += gfB.
run (timer);
2063 pTime = cRGB.
run (timer);
2110 void init (
unsigned int _width,
unsigned int _height,
2114 void *ptr =
nullptr,
bool block = CL_FALSE,
2115 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2118 const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2120 void run (
const std::vector<cl::Event> *events =
nullptr, cl::Event *event =
nullptr);
2128 void setEps (
float _eps);
2138 clutils::CLEnv &env;
2139 clutils::CLEnvInfo<2> info;
2140 cl::Context context;
2141 cl::CommandQueue queue0;
2145 unsigned int width, height;
2146 unsigned int bufferInSize, bufferOutSize;
2147 int radius;
float eps;
float dScaling;
2148 cl::Buffer hBufferIn, hBufferOut;
2149 cl::Buffer dBufferIn, dBufferOut;
2150 cl::Event dEvent; std::vector<cl::Event> waitList;
2160 template <
typename period>
2161 double run (clutils::GPUTimer<period> &timer,
const std::vector<cl::Event> *events =
nullptr)
2165 pTime = depth.
run (timer, events);
2166 pTime += gf.
run (timer);
2178 #endif // GF_ALGORITHMS_HPP
void init(unsigned int _width, unsigned int _height, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:2489
Transpose(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:2450
cl_uchar * hPtrIn
Definition: algorithms.hpp:235
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:1700
cl_float * hPtrOutPC4D
Definition: algorithms.hpp:887
int getRadius()
Gets the filter window radius.
Definition: algorithms.cpp:3138
cl_float * hPtrIn
Definition: algorithms.hpp:973
void * read(GuidedFilterDepth::Memory mem=GuidedFilterDepth::Memory::H_OUT, 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:4893
cl_float * hPtrOutG
Definition: algorithms.hpp:237
unsigned int getOffset()
Gets the offset.
Definition: algorithms.cpp:1968
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1879
Interface class for the Guided Filter pipeline.
Definition: algorithms.hpp:1551
cl_float * hPtrOut
Definition: algorithms.hpp:1467
GuidedFilterConfig
Enumerates configurations for the Guided Filter algorithm.
Definition: algorithms.hpp:1506
cl_float * hPtrInB
Definition: algorithms.hpp:358
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:3677
cl_float * hPtrOut
Definition: algorithms.hpp:1064
void * read(Scan::Memory mem=Scan::Memory::H_OUT, 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:2384
cl_float * hPtrOutB
Definition: algorithms.hpp:1921
void setRadius(int _radius)
Sets the filter window radius.
Definition: algorithms.cpp:3431
Interface class for the rgbNorm kernel.
Definition: algorithms.hpp:943
void * read(SAT::Memory mem=SAT::Memory::H_OUT, 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:2823
void write(GuidedFilterDepth::Memory mem=GuidedFilterDepth::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:4864
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1493
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:2162
float getScaling()
Gets the scaling factor.
Definition: algorithms.cpp:3156
void write(BoxFilterSAT::Memory mem=BoxFilterSAT::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:3077
Scan(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:2171
void write(Transpose::Memory mem=Transpose::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:2598
void init(unsigned int _width, unsigned int _height, float _scaling=1.f, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:2708
cl_float * hPtrInB
Definition: algorithms.hpp:789
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1395
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:515
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:1960
Interface class for the splitPC8D kernel.
Definition: algorithms.hpp:850
cl_float * hPtrOut
Definition: algorithms.hpp:1605
Interface class for the mult kernel.
Definition: math.hpp:73
Interface class for the transpose kernel.
Definition: algorithms.hpp:1145
cl_float * hPtrOutB
Definition: algorithms.hpp:136
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:3129
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1643
Interface class for the Guided Filter algorithm.
Definition: algorithms.hpp:1526
Interface class for the pown_ kernel.
Definition: math.hpp:160
void write(RGBNorm::Memory mem=RGBNorm::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:2111
void write(SAT::Memory mem=SAT::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:2794
void * read(BoxFilter::Memory mem=BoxFilter::Memory::H_OUT, 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:3390
cl_float * hPtrOutB
Definition: algorithms.hpp:238
cl_float * hPtrIn
Definition: algorithms.hpp:1604
Staging
Enumerates staging buffer configurations.
Definition: common.hpp:43
void init(unsigned int _width, unsigned int _height, int _radius, float _scaling=1e-4f, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:2975
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1035
cl_ushort * hPtrIn
Definition: algorithms.hpp:576
void setEps(float _eps)
Sets the regularization parameter .
Definition: algorithms.cpp:4954
cl_float * hPtrInG
Definition: algorithms.hpp:357
cl_float * hPtrOutR
Definition: algorithms.hpp:1919
BoxFilter(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:3177
void * read(DepthTo3D::Memory mem=DepthTo3D::Memory::H_OUT, 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:1371
GuidedFilterRGBConfig
Enumerates configurations for the GuidedFilterRGB class.
Definition: algorithms.hpp:1825
void init(unsigned int _width, unsigned int _height, int _radius, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:3262
void setScaling(float _scaling)
Sets the scaling factor.
Definition: algorithms.cpp:3166
cl_float * hPtrIn
Definition: algorithms.hpp:886
cl_float * hPtrIn
Definition: algorithms.hpp:1175
Offers classes which set up kernel execution parameters and provide interfaces for the handling of me...
Definition: algorithms.hpp:43
Interface class for the separateRGBChannels kernels.
Definition: algorithms.hpp:68
void setScaling(float _scaling)
Sets the scaling factor.
Definition: algorithms.cpp:1431
float getEps()
Gets the regularization parameter .
Definition: algorithms.cpp:4944
float getScaling()
Gets the scaling factor.
Definition: algorithms.cpp:1725
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:2097
void setScaling(float _scaling)
Sets the scaling factor.
Definition: algorithms.cpp:1735
cl_float * hPtrOut
Definition: algorithms.hpp:974
CombineRGBConfig
Enumerates configurations for the CombineRGB class.
Definition: algorithms.hpp:275
cl_float * hPtrInB
Definition: algorithms.hpp:461
Declares classes used by the OpenCL interface classes in cl_algo.
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1947
void init(unsigned int _n, unsigned int _offset=0, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:1810
cl_float * hPtrOut
Definition: algorithms.hpp:1266
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1786
void write(BoxFilter::Memory mem=BoxFilter::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:3362
cl_float * hPtrInI
Definition: algorithms.hpp:1745
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:2407
void setScaling(float _scaling)
Sets the scaling factor.
Definition: algorithms.cpp:2440
void init(unsigned int _width, unsigned int _height, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:2027
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:699
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:106
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1199
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:329
void * read(RGBDTo8D::Memory mem=RGBDTo8D::Memory::H_OUT, 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:1677
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: math.cpp:442
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:641
void * read(BoxFilterSAT::Memory mem=BoxFilterSAT::Memory::H_OUT, 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:3106
cl_ushort * hPtrIn
Definition: algorithms.hpp:2134
Interface class for the combineRGBChannels_Float2Float kernel.
Definition: algorithms.hpp:322
void init(unsigned int _width, unsigned int _height, int _radius, float _eps, float _dScaling=1e-3f, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:4785
void setDScaling(float _dScaling)
Sets the depth scaling factor.
Definition: algorithms.cpp:4973
void setRGBNorm(int _rgbNorm)
Sets the flag for RGB normalization.
Definition: algorithms.cpp:1753
cl_float * hPtrInG
Definition: algorithms.hpp:460
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:756
Interface class for the scan kernel.
Definition: algorithms.hpp:1028
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:817
Declares classes that organize the execution of OpenCL math kernels.
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1992
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:487
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:857
cl_float * hPtrInR
Definition: algorithms.hpp:459
void setOffset(unsigned int _offset)
Sets the offset.
Definition: algorithms.cpp:1978
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1334
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:549
cl_float * hPtrOutR
Definition: algorithms.hpp:134
void * read(RGBNorm::Memory mem=RGBNorm::Memory::H_OUT, 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:2139
cl_float * hPtrOut
Definition: algorithms.hpp:359
void setScaling(float _scaling)
Sets the scaling factor.
Definition: algorithms.cpp:2874
cl_float * hPtrOut
Definition: algorithms.hpp:577
void setRadius(int _radius)
Sets the filter window radius.
Definition: algorithms.cpp:3148
void init(unsigned int _width, unsigned int _height, float _scaling=1.f, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:2219
cl_float * hPtrIn
Definition: algorithms.hpp:1265
void setFocalLength(float _f)
Sets the focal length.
Definition: algorithms.cpp:1412
Interface class for the combineRGBChannels kernels.
Definition: algorithms.hpp:292
cl_float * hPtrOut
Definition: algorithms.hpp:1176
cl_float * hPtrIn
Definition: algorithms.hpp:1466
Interface class for the depth_Ushort2Float kernel.
Definition: algorithms.hpp:542
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:2851
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:161
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:3413
cl_float * hPtrOutRGBA
Definition: algorithms.hpp:888
Interface class for the boxFilter kernel.
Definition: algorithms.hpp:1432
Interface class for the depthTo3D kernel.
Definition: algorithms.hpp:634
RGBNorm(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:1988
cl_float * hPtrOut
Definition: algorithms.hpp:2028
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:744
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:2055
Interface class for the Summed Area Table operation.
Definition: algorithms.hpp:1231
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:1394
Interface class for performing Guided Image Filtering on a Depth image from Kinect.
Definition: algorithms.hpp:2090
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1699
cl_float * hPtrOut
Definition: algorithms.hpp:1747
int getRadius()
Gets the filter window radius.
Definition: algorithms.cpp:4925
cl_float4 * hPtrOut
Definition: algorithms.hpp:674
void init(unsigned int _width, unsigned int _height, float _f, float _scaling=1.f, int _rgbNorm=0, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:1497
cl_float * hPtrInD
Definition: algorithms.hpp:786
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:2161
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:208
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:384
GuidedFilterDepth(clutils::CLEnv &_env, clutils::CLEnvInfo< 2 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:4738
cl_uchar * hPtrOut
Definition: algorithms.hpp:462
Interface class for the rgbdTo8D kernel.
Definition: algorithms.hpp:737
cl_float * hPtrOut
Definition: algorithms.hpp:1367
Interface class for the boxFilterSAT{_Tr} kernel.
Definition: algorithms.hpp:1327
float getFocalLength()
Gets the focal length.
Definition: algorithms.cpp:1707
int getRGBNorm()
Gets the flag for RGB normalization.
Definition: algorithms.cpp:1743
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:4916
Interface class for performing Guided Image Filtering on an RGB image from Kinect.
Definition: algorithms.hpp:1842
SplitPC8D(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:1763
void setRadius(int _radius)
Sets the filter window radius.
Definition: algorithms.cpp:4935
cl_float * hPtrOutR
Definition: algorithms.hpp:236
cl_float * hPtrOutG
Definition: algorithms.hpp:1920
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1238
void init(unsigned int _width, unsigned int _height, float _f, float _scaling=1.f, Staging _staging=Staging::IO)
Configures kernel execution parameters.
Definition: algorithms.cpp:1256
cl_float * hPtrInG
Definition: algorithms.hpp:788
float getFocalLength()
Gets the focal length.
Definition: algorithms.cpp:1402
cl_float * hPtrIn
Definition: algorithms.hpp:673
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:2649
float getDScaling()
Gets the depth scaling factor.
Definition: algorithms.cpp:4963
float getScaling()
Gets the scaling factor.
Definition: algorithms.cpp:1421
void * read(Transpose::Memory mem=Transpose::Memory::H_OUT, 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:2626
int getRadius()
Gets the filter window radius.
Definition: algorithms.cpp:3421
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:950
Definition: helper_funcs.hpp:41
float getScaling()
Gets the scaling factor.
Definition: algorithms.cpp:2864
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1439
BoxFilterSAT(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:2884
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1558
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:431
float getScaling()
Gets the scaling factor.
Definition: algorithms.cpp:2430
DepthConfig
Enumerates configurations for the Depth class.
Definition: algorithms.hpp:499
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: math.cpp:253
cl_float * hPtrInP
Definition: algorithms.hpp:1746
cl_float * hPtrIn
Definition: algorithms.hpp:133
void setFocalLength(float _f)
Sets the focal length.
Definition: algorithms.cpp:1717
cl_float * hPtrIn
Definition: algorithms.hpp:1366
cl_float * hPtrIn
Definition: algorithms.hpp:1063
SAT(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info, bool _transposed=true)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:2663
void write(RGBDTo8D::Memory mem=RGBDTo8D::Memory::D_IN_D, 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:1634
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:997
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:1906
Memory
Enumerates the memory objects handled by the class.
Definition: algorithms.hpp:1152
cl_float * hPtrInR
Definition: algorithms.hpp:787
void write(Scan::Memory mem=Scan::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:2356
cl_float8 * hPtrOut
Definition: algorithms.hpp:790
cl_uchar * hPtrIn
Definition: algorithms.hpp:2027
cl_uchar * hPtrIn
Definition: algorithms.hpp:1918
void write(DepthTo3D::Memory mem=DepthTo3D::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:1343
cl_float * hPtrOutG
Definition: algorithms.hpp:135
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1290
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:912
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:263
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:1090
void * read(SplitPC8D::Memory mem=SplitPC8D::Memory::H_OUT_PC4D, 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:1934
void run(const std::vector< cl::Event > *events=nullptr, cl::Event *event=nullptr)
Executes the necessary kernels.
Definition: algorithms.cpp:1187
DepthTo3D(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:1215
cl_float * hPtrInR
Definition: algorithms.hpp:356
Interface class for the separateRGBChannels_Uchar2Float kernel.
Definition: algorithms.hpp:201
Interface class for the depth kernels.
Definition: algorithms.hpp:515
double run(clutils::GPUTimer< period > &timer, const std::vector< cl::Event > *events=nullptr)
Executes the necessary kernels.
Definition: algorithms.hpp:602
SeparateRGBConfig
Enumerates configurations for the SeparateRGB class.
Definition: algorithms.hpp:51
cl_float * hPtrOut
Definition: algorithms.hpp:2135
RGBDTo8D(clutils::CLEnv &_env, clutils::CLEnvInfo< 1 > _info)
Configures an OpenCL environment as specified by _info.
Definition: algorithms.cpp:1441