Skip to content

Commit

Permalink
Ccmath version 0.1.0 release build (#2)
Browse files Browse the repository at this point in the history
* Add support for builtin detection

* Update comments to be more eye catching

* Add clang-cl and apple clang support

* push work up

* push work up

* Fix bug with MSVC where not checking for nan

* Remove msvc specific code in favor of generic approach

* Prepare for 0.1.0 release.

* Add doxygen docs

* Finalize min/max

* Add todo for later work on remquo

* Cleanup main for 0.1.0 release

* Bring standard back to C++17

* Minor cleanup to cmake list

* Prep files for v0.1.0 release

* Prepare for 0.1.0 release.

* Add doxygen docs

* Finalize min/max

* Add todo for later work on remquo

* Cleanup main for 0.1.0 release

* Bring standard back to C++17

* Minor cleanup to cmake list

* Prep files for v0.1.0 release

* Bring everything in
  • Loading branch information
Rinzii authored Mar 2, 2024
1 parent 35921f6 commit b16b9de
Show file tree
Hide file tree
Showing 39 changed files with 979 additions and 703 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/delete-workflows.yml

This file was deleted.

11 changes: 4 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ cmake_minimum_required(VERSION 3.18)

enable_language(CXX)

# We will hit 1.0.0 when we have a stable API
# We will hit 0.1.0 when we have finished the basic API
set(CCMATH_BUILD_VERSION 0.0.1)
set(CCMATH_BUILD_VERSION 0.1.0)
set(INTERNAL_PROJ_DEFAULT_NAME ccmath)

project(${INTERNAL_PROJ_DEFAULT_NAME} VERSION ${CCMATH_BUILD_VERSION})
Expand All @@ -23,8 +21,7 @@ option(CCMATH_BUILD_TEST "Build ccmath tests" ${is_root_project})
option(CCMATH_BUILD_EXAMPLES "Build ccmath examples" ${is_root_project})
option(CCMATH_BUILD_BENCHMARKS "Build ccmath benchmarks" ${is_root_project})
option(CCMATH_INSTALL "Setup install and package steps" ${is_root_project})
option(CCMATH_USE_SIMD "Use SIMD instructions" OFF)
option(CCMATH_BUILD_EXE "Build ccmath benchmarks" ${is_root_project}) # TODO: This will be removed once we reach a stable API
option(CCMATH_USE_SIMD "Use SIMD instructions" OFF) # SIMD is not yet implemented.

# include the global configuration file
include(cmake/GlobalConfig.cmake)
Expand Down Expand Up @@ -65,8 +62,8 @@ target_link_libraries(${PROJECT_NAME} INTERFACE

configure_file(cmake/version.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/include/${PROJECT_NAME}/version.hpp" @ONLY)

if (CCMATH_BUILD_EXE)
add_subdirectory(temp_exe)
if (CCMATH_BUILD_EXAMPLES)
add_subdirectory(example)
endif()

if (CCMATH_BUILD_EXAMPLES OR CCMATH_BUILD_BENCHMARKS OR CCMATH_BUILD_TEST)
Expand Down
198 changes: 99 additions & 99 deletions README.md

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
project(ccmath-examples)

set(CMAKE_CXX_STANDARD 17)

add_executable(${PROJECT_NAME} main.cpp)

target_link_libraries(${PROJECT_NAME} ccmath::ccmath)
16 changes: 16 additions & 0 deletions example/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present ccmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/


int main()
{

// TODO: Implement actual examples showcasing the library

return 0;
}
16 changes: 16 additions & 0 deletions example/main.cpp~HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present ccmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/


int main()
{

// TODO: Implement actual examples showcasing the library

return 0;
}
16 changes: 16 additions & 0 deletions example/main.cpp~HEAD_0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present ccmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/


int main()
{

// TODO: Implement actual examples showcasing the library

return 0;
}
16 changes: 16 additions & 0 deletions example/main.cpp~dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present ccmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/


int main()
{

// TODO: Implement actual examples showcasing the library

return 0;
}
16 changes: 16 additions & 0 deletions example/main.cpp~dev_0
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present ccmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/


int main()
{

// TODO: Implement actual examples showcasing the library

return 0;
}
1 change: 0 additions & 1 deletion include/ccmath/basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@
#include "ccmath/detail/basic/min.hpp"
#include "ccmath/detail/basic/remainder.hpp"
#include "ccmath/detail/basic/remquo.hpp"

120 changes: 15 additions & 105 deletions include/ccmath/ccmath.hpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/*
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present cmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/
* Copyright (c) 2024-Present Ian Pike
* Copyright (c) 2024-Present cmath contributors
*
* This library is provided under the MIT License.
* See LICENSE for more information.
*/

#pragma once


/*
CCMATH REQUIREMENTS:
* The entire library mandates everything MUST be constexpr. If it is not constexpr, it is not part of the library.
Expand All @@ -18,125 +17,36 @@ CCMATH REQUIREMENTS:
* Anything that could be considered UB is strictly forbidden.
* Performance is are primary concern. Everything must be as fast as possible.
* Anything implemented by cmath that is already constexpr is allowed to be wrapped by ccmath and not implemented by ccmath.
*/

/// Basic math functions

#include "ccmath/detail/basic/abs.hpp"
#include "ccmath/detail/basic/fdim.hpp"
#include "ccmath/detail/basic/fma.hpp"
#include "ccmath/detail/basic/fmod.hpp"
#include "ccmath/detail/basic/max.hpp"
#include "ccmath/detail/basic/min.hpp"
#include "ccmath/detail/basic/remainder.hpp"
#include "ccmath/detail/basic/remquo.hpp"

#include "ccmath/basic.hpp"

/// Comparison functions

#include "ccmath/detail/compare/fpclassify.hpp"
#include "ccmath/detail/compare/isfinite.hpp"
#include "ccmath/detail/compare/isgreater.hpp"
#include "ccmath/detail/compare/isgreaterequal.hpp"
#include "ccmath/detail/compare/isinf.hpp"
#include "ccmath/detail/compare/isless.hpp"
#include "ccmath/detail/compare/islessequal.hpp"
#include "ccmath/detail/compare/islessgreater.hpp"
#include "ccmath/detail/compare/isnan.hpp"
#include "ccmath/detail/compare/isnormal.hpp"
#include "ccmath/detail/compare/isunordered.hpp"
#include "ccmath/detail/compare/signbit.hpp"

#include "ccmath/compare.hpp"

/// Exponential functions

#include "ccmath/detail/exponential/exp.hpp"
#include "ccmath/detail/exponential/exp2.hpp"
#include "ccmath/detail/exponential/expm1.hpp"
#include "ccmath/detail/exponential/log.hpp"
#include "ccmath/detail/exponential/log1p.hpp"
#include "ccmath/detail/exponential/log2.hpp"
#include "ccmath/detail/exponential/log10.hpp"

#include "ccmath/exponential.hpp"

/// Float manipulation functions

#include "ccmath/detail/fmanip/copysign.hpp"
#include "ccmath/detail/fmanip/frexp.hpp"
#include "ccmath/detail/fmanip/ilogb.hpp"
#include "ccmath/detail/fmanip/ldexp.hpp"
#include "ccmath/detail/fmanip/logb.hpp"
#include "ccmath/detail/fmanip/modf.hpp"
#include "ccmath/detail/fmanip/nextafter.hpp"
#include "ccmath/detail/fmanip/scalbn.hpp"

#include "ccmath/fmanip.hpp"

/// Hyperbolic functions

#include "ccmath/detail/hyperbolic/acosh.hpp"
#include "ccmath/detail/hyperbolic/asinh.hpp"
#include "ccmath/detail/hyperbolic/atanh.hpp"
#include "ccmath/detail/hyperbolic/cosh.hpp"
#include "ccmath/detail/hyperbolic/sinh.hpp"
#include "ccmath/detail/hyperbolic/tanh.hpp"

#include "ccmath/hyperbolic.hpp"

/// Nearest functions

#include "ccmath/detail/nearest/ceil.hpp"
#include "ccmath/detail/nearest/floor.hpp"
#include "ccmath/detail/nearest/nearbyint.hpp"
#include "ccmath/detail/nearest/rint.hpp"
#include "ccmath/detail/nearest/round.hpp"
#include "ccmath/detail/nearest/trunc.hpp"

#include "ccmath/nearest.hpp"

/// Power functions

#include "ccmath/detail/power/cbrt.hpp"
#include "ccmath/detail/power/hypot.hpp"
#include "ccmath/detail/power/pow.hpp"
#include "ccmath/detail/power/sqrt.hpp"

#include "ccmath/power.hpp"

/// Special functions

#include "ccmath/detail/special/assoc_laguerre.hpp"
#include "ccmath/detail/special/assoc_legendre.hpp"
#include "ccmath/detail/special/beta.hpp"
#include "ccmath/detail/special/comp_ellint_1.hpp"
#include "ccmath/detail/special/comp_ellint_2.hpp"
#include "ccmath/detail/special/comp_ellint_3.hpp"
#include "ccmath/detail/special/cyl_bessel_i.hpp"
#include "ccmath/detail/special/cyl_bessel_j.hpp"
#include "ccmath/detail/special/cyl_bessel_k.hpp"
#include "ccmath/detail/special/cyl_neumann.hpp"
#include "ccmath/detail/special/ellint_1.hpp"
#include "ccmath/detail/special/ellint_2.hpp"
#include "ccmath/detail/special/ellint_3.hpp"
#include "ccmath/detail/special/expint.hpp"
#include "ccmath/detail/special/hermite.hpp"
#include "ccmath/detail/special/laguerre.hpp"
#include "ccmath/detail/special/legendre.hpp"
#include "ccmath/detail/special/riemann_zeta.hpp"
#include "ccmath/detail/special/sph_bessel.hpp"
#include "ccmath/detail/special/sph_legendre.hpp"
#include "ccmath/detail/special/sph_neumann.hpp"

#include "ccmath/special.hpp"

/// Trigonometric functions
#include "ccmath/detail/trig/acos.hpp"
#include "ccmath/detail/trig/asin.hpp"
#include "ccmath/detail/trig/atan.hpp"
#include "ccmath/detail/trig/atan2.hpp"
#include "ccmath/detail/trig/cos.hpp"
#include "ccmath/detail/trig/sin.hpp"
#include "ccmath/detail/trig/tan.hpp"

#include "ccmath/trig.hpp"

/// Uncategorized functions

#include "ccmath/detail/gamma.hpp"
#include "ccmath/detail/lerp.hpp"
#include "ccmath/detail/lgamma.hpp"
13 changes: 13 additions & 0 deletions include/ccmath/compare.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@
*/

#pragma once

#include "ccmath/detail/compare/fpclassify.hpp"
#include "ccmath/detail/compare/isfinite.hpp"
#include "ccmath/detail/compare/isgreater.hpp"
#include "ccmath/detail/compare/isgreaterequal.hpp"
#include "ccmath/detail/compare/isinf.hpp"
#include "ccmath/detail/compare/isless.hpp"
#include "ccmath/detail/compare/islessequal.hpp"
#include "ccmath/detail/compare/islessgreater.hpp"
#include "ccmath/detail/compare/isnan.hpp"
#include "ccmath/detail/compare/isnormal.hpp"
#include "ccmath/detail/compare/isunordered.hpp"
#include "ccmath/detail/compare/signbit.hpp"
Loading

0 comments on commit b16b9de

Please sign in to comment.