This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <benchmark/benchmark.h> | |
#include <pcl/common/centroid.h> | |
#include <pcl/common/common.h> | |
#include <pcl/filters/conditional_removal.h> | |
#include <pcl/io/pcd_io.h> | |
#include <pcl/pcl_base.h> | |
#include <pcl/point_cloud.h> | |
#include <pcl/point_types.h> | |
using namespace pcl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <QJSEngine> | |
#include "sol.hpp" //https://github.com/ThePhD/sol2 | |
#include <benchmark/benchmark.h> | |
static void QmlFunction(benchmark::State& state) { | |
QJSEngine js; | |
js.evaluate("function calc(time, value){ return value*2 }"); | |
QJSValue func = js.evaluate("calc"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SizeStream{ | |
unsigned size; | |
SizeStream(): size(0) {} | |
template <typename T> | |
typename std::enable_if<std::is_arithmetic<T>::value, SizeStream&>::type | |
operator <<(T& op) | |
{ | |
size += sizeof(op); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Super simple, unmutable, string_view with | |
* small string optimization. | |
* If the string is 15 bytes or less, it is copied, otherwise, | |
* StringRef stores a not-owning reference. | |
*/ | |
class StringRef | |
{ | |
private: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <pcl_conversions/pcl_conversions.h> | |
namespace pcl_df | |
{ | |
// Usage: substitute pcl::fromROSMsg with pcl_df::fromROSMsg in your code and you have done. | |
// You should experience a considerable speedup. | |
template<typename T> | |
void fromROSMsg(const sensor_msgs::PointCloud2 &cloud, pcl::PointCloud<T> &pcl_cloud) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
// Magically converts any representation of a point in 3D | |
// (type with x, y and z) to another one. Works with: | |
// | |
// - pcl::PointXYZ, pcl::PointXYZI, pcl::PointXYZRGB, etc | |
// - Eigen::Vector3d, Eigen::Vector3f | |
// - custom type with x,y,z fields. | |
// - arrays or vectors with 3 elements. |
OlderNewer