Browse Source

Fixed misplaced function

channel
Ludovic 'Archivist' Lagouardette 3 years ago
parent
commit
8c3d7f6297
5 changed files with 17 additions and 12 deletions
  1. +4
    -4
      Makefile
  2. +1
    -1
      blacklist.txt
  3. +2
    -7
      include/gp/algorithms/min_of.hpp
  4. +9
    -0
      include/gp/functional/identity.hpp
  5. +1
    -0
      include/gp/math/rendering/renderer.hpp

+ 4
- 4
Makefile View File

@ -1,11 +1,11 @@
CXX= g++
CXX= clang++
CXXFLAGS= --std=c++20 -O0 -g -pthread -DGP_TESTS -DFUZZ_STRENGTH=100000 -DNO_BENCH=0 -pedantic \
# -fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes -fno-omit-frame-pointer \
-fprofile-instr-generate -fcoverage-mapping -Wno-unknown-attributes -fno-omit-frame-pointer \
# -fsanitize=address -fsanitize-blacklist=blacklist.txt
EVERY_USEFUL_FILE= $(shell find include/ -name "*.hpp" -type "f")
EVERY_TEST_FILE= $(shell find tests/ -name "*.cpp" -type "f")
# -fsanitize=address -fsanitize-blacklist=blacklist.txt
all: tests
docs: $(EVERY_USEFUL_FILE)

+ 1
- 1
blacklist.txt View File

@ -1,3 +1,3 @@
src:gp/system/scheduler.hpp
src:gp/system/platforms/gcc-x86_64.hpp
fun:gp::specifics::platform_data::push(void*)
fun:gp::system::specifics::platform_data::push(void*)

+ 2
- 7
include/gp/algorithms/min_of.hpp View File

@ -3,15 +3,10 @@
#include "gp_config.hpp"
#include "gp/algorithms/move.hpp"
#include "gp/functional/identity.hpp"
namespace gp{
// TODO: this goes in functional
template<typename T>
T identity(T v){return v;}
template<typename T>
T& identity(T& v){return v;}
namespace gp{
template<typename it, typename transform>
auto&& min_of(it beg, it end, transform fn = identity) {

+ 9
- 0
include/gp/functional/identity.hpp View File

@ -0,0 +1,9 @@
#pragma once
namespace gp {
template<typename T>
T identity(T v){return v;}
template<typename T>
T& identity(T& v){return v;}
}

+ 1
- 0
include/gp/math/rendering/renderer.hpp View File

@ -10,6 +10,7 @@
#include "gp/math/rendering_math.hpp"
// TODO: Namespace this correctly
// BUG: The rendering behaves improperly, I don't know why
namespace gp {
namespace math {

Loading…
Cancel
Save