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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#ifndef CONTAINER_OF | |
#define CONTAINER_OF | |
#include <cstddef> | |
template <class T, typename M> |
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
default: all | |
DEBUG ?= -g -ggdb -DDEBUG | |
ifeq ($(DEBUG),) | |
override DEBUG := -DNDEBUG | |
endif | |
override LDFLAGS += -lstdc++ | |
override CFLAGS += $(DEBUG) -MD -MP | |
override CXXFLAGS += $(DEBUG) -MD -MP |
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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#ifndef COUNTABLE_H | |
#define COUNTABLE_H | |
#include <cassert> | |
template <class T> |
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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#ifndef INTRUSIVE_STACK_H | |
#define INTRUSIVE_STACK_H | |
#include <cassert> | |
#include <cstddef> |
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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#ifndef INTRUSIVE_QUEUE_H | |
#define INTRUSIVE_QUEUE_H | |
#include <cassert> | |
#include <cstddef> |
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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#include <cmath> | |
#include <cstdlib> | |
template <typename fp_type> | |
fp_type minkowski_question_mark(const fp_type fp) { | |
float a0 = floor(fp); |
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
// All rights reserved, | |
// Derrick Pallas | |
// License: zlib | |
#include <cmath> | |
#include <cstdlib> | |
#include <limits> | |
#include <vector> | |
template <typename fp_type> |
NewerOlder