Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/pipeline/pipelines.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Pipeline : public FunctionStage<Input, Output> {
* indicates whether storage is present or not for
* the output.
*/
virtual Output Run(const Input &input) = 0;
Output Run(const Input &input) override = 0;

protected:
/// The stages of this
Expand Down
15 changes: 10 additions & 5 deletions src/common/style.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
namespace found {

/// Alias for very precise floating point numbers.
typedef __float128 PreciseDecimal;
#if defined(__aarch64__) || defined(__arm64__)
// ARM/Apple Silicon doesn't support __float128
typedef long double PreciseDecimal;
#else
typedef __float128 PreciseDecimal;
#endif

/// The output for Edge Detection Algorithms (edge.hpp/cpp). Currently set
/// to a vector of 2D points on the image, according to image coordinate systems
Expand Down Expand Up @@ -76,10 +81,10 @@ typedef std::vector<Edge> Edges;
struct Component {
/// The points in this component
std::unordered_set<uint64_t> points;
/// The lowest point (left upper edge)
Vec2 upperLeft;
/// The highest point (right lower edge)
Vec2 lowerRight;
/// The pixel index of the upper left bound
uint64_t upperLeftIndex;
/// The pixel index of the lower right bound
uint64_t lowerRightIndex;
};

/// A collection of Image Pixels
Expand Down
22 changes: 21 additions & 1 deletion src/datafile/encoding.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
#ifndef SRC_DATAFILE_ENCODING_HPP_
#define SRC_DATAFILE_ENCODING_HPP_

#include <endian.h>
#include <stdint.h>
#ifdef __APPLE__
#include <machine/endian.h>
#else
#include <endian.h>
#endif

#include "common/decimal.hpp"

// On macOS, undefine the system macros before defining our functions
#ifdef __APPLE__
#ifdef htonl
#undef htonl
#endif
#ifdef ntohl
#undef ntohl
#endif
#ifdef htons
#undef htons
#endif
#ifdef ntohs
#undef ntohs
#endif
#endif

#ifdef __BYTE_ORDER__
#define ENDIANESS __BYTE_ORDER__
#else
Expand Down
Loading
Loading