Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix for mistakenly added files #3

Merged
merged 28 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f115662
Add support for builtin detection
Rinzii Mar 1, 2024
1f8a61f
Update comments to be more eye catching
Rinzii Mar 1, 2024
918cc5f
Add clang-cl and apple clang support
Rinzii Mar 1, 2024
0b2bdfe
push work up
Rinzii Mar 1, 2024
2588ab6
push work up
Rinzii Mar 1, 2024
0a6a1cc
Fix bug with MSVC where not checking for nan
Rinzii Mar 1, 2024
37a6cff
Remove msvc specific code in favor of generic approach
Rinzii Mar 1, 2024
1398eb1
Prepare for 0.1.0 release.
Rinzii Mar 2, 2024
9b871f6
Add doxygen docs
Rinzii Mar 2, 2024
a07a344
Finalize min/max
Rinzii Mar 2, 2024
bb99a4c
Add todo for later work on remquo
Rinzii Mar 2, 2024
0a587d7
Cleanup main for 0.1.0 release
Rinzii Mar 2, 2024
03a0068
Bring standard back to C++17
Rinzii Mar 2, 2024
bec535c
Minor cleanup to cmake list
Rinzii Mar 2, 2024
c6923da
Prep files for v0.1.0 release
Rinzii Mar 2, 2024
0e7168d
Clean up conflicts
Rinzii Mar 2, 2024
0593ffc
Prepare for 0.1.0 release.
Rinzii Mar 2, 2024
f21bad8
Add doxygen docs
Rinzii Mar 2, 2024
df69b06
Finalize min/max
Rinzii Mar 2, 2024
796ca0e
Add todo for later work on remquo
Rinzii Mar 2, 2024
f62558c
Cleanup main for 0.1.0 release
Rinzii Mar 2, 2024
0f84b0a
Bring standard back to C++17
Rinzii Mar 2, 2024
35a7efa
Minor cleanup to cmake list
Rinzii Mar 2, 2024
7e297c6
Prep files for v0.1.0 release
Rinzii Mar 2, 2024
6bc4cd4
Add helper macros
Rinzii Mar 2, 2024
98e4948
Bring everything in
Rinzii Mar 2, 2024
7aa69eb
Merge remote-tracking branch 'origin/dev' into dev
Rinzii Mar 2, 2024
1246c74
Remove artifacts that mistakenly got pushed to main
Rinzii Mar 2, 2024
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
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;
}
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
Loading