-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Fastor as a full backend and frontend. (#78)
This adds the fastor plugin
- Loading branch information
Showing
28 changed files
with
1,114 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Algebra plugins library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2022 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# Set up the library. | ||
algebra_add_library( algebra_fastor_fastor fastor_fastor | ||
"include/algebra/fastor_fastor.hpp" ) | ||
target_link_libraries( algebra_fastor_fastor | ||
INTERFACE algebra::common algebra::fastor_storage algebra::cmath_math | ||
algebra::fastor_math ) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/** Algebra plugins library, part of the ACTS project | ||
* | ||
* (c) 2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
// Project include(s). | ||
#include "algebra/math/cmath.hpp" | ||
#include "algebra/math/fastor.hpp" | ||
#include "algebra/storage/fastor.hpp" | ||
|
||
// Fastor include(s). | ||
#ifdef _MSC_VER | ||
#pragma warning(disable : 4244 4701 4702) | ||
#endif // MSVC | ||
#include <Fastor/Fastor.h> | ||
#ifdef _MSC_VER | ||
#pragma warning(default : 4244 4701 4702) | ||
#endif // MSVC | ||
|
||
namespace algebra { | ||
|
||
namespace getter { | ||
|
||
/// @name Getter functions on @c algebra::fastor::storage_type | ||
/// @{ | ||
|
||
using fastor::math::eta; | ||
using fastor::math::norm; | ||
using fastor::math::perp; | ||
using fastor::math::phi; | ||
using fastor::math::theta; | ||
|
||
/// @} | ||
|
||
/// Function extracting a slice from the matrix used by | ||
/// @c algebra::fastor::transform3 | ||
template <std::size_t SIZE, std::size_t ROWS, std::size_t COLS, | ||
typename scalar_t> | ||
ALGEBRA_HOST_DEVICE inline auto vector( | ||
const Fastor::Tensor<scalar_t, ROWS, COLS>& m, std::size_t row, | ||
std::size_t col) { | ||
|
||
return fastor::storage_type<scalar_t, SIZE>( | ||
m(Fastor::seq(static_cast<int>(row), static_cast<int>(row + SIZE)), | ||
static_cast<int>(col))); | ||
} | ||
|
||
/// @name Getter functions on @c algebra::fastor::matrix_type | ||
/// @{ | ||
|
||
using fastor::math::element; | ||
|
||
/// @} | ||
|
||
} // namespace getter | ||
|
||
namespace vector { | ||
|
||
/// @name Vector functions on @c algebra::fastor::storage_type | ||
/// @{ | ||
|
||
using fastor::math::cross; | ||
using fastor::math::dot; | ||
using fastor::math::normalize; | ||
|
||
/// @} | ||
|
||
} // namespace vector | ||
|
||
namespace matrix { | ||
|
||
template <typename scalar_t> | ||
using actor = fastor::matrix::actor<scalar_t>; | ||
|
||
} // namespace matrix | ||
|
||
namespace fastor { | ||
|
||
template <typename T> | ||
using transform3 = math::transform3<T, matrix::actor<T>>; | ||
|
||
} // namespace fastor | ||
|
||
} // namespace algebra |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Algebra plugins library, part of the ACTS project (R&D line) | ||
# | ||
# (c) 2022 CERN for the benefit of the ACTS project | ||
# | ||
# Mozilla Public License Version 2.0 | ||
|
||
# Set up the library. | ||
algebra_add_library(algebra_fastor_math fastor_math | ||
"include/algebra/math/fastor.hpp" | ||
"include/algebra/math/impl/fastor_getter.hpp" | ||
"include/algebra/math/impl/fastor_matrix.hpp" | ||
"include/algebra/math/impl/fastor_transform3.hpp" | ||
"include/algebra/math/impl/fastor_vector.hpp") | ||
|
||
target_link_libraries(algebra_fastor_math | ||
INTERFACE algebra::common algebra::common_math Fastor::Fastor ) | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** Algebra plugins library, part of the ACTS project | ||
* | ||
* (c) 2020-2022 CERN for the benefit of the ACTS project | ||
* | ||
* Mozilla Public License Version 2.0 | ||
*/ | ||
|
||
#pragma once | ||
|
||
// Project include(s). | ||
#include "algebra/math/impl/fastor_getter.hpp" | ||
#include "algebra/math/impl/fastor_matrix.hpp" | ||
#include "algebra/math/impl/fastor_transform3.hpp" | ||
#include "algebra/math/impl/fastor_vector.hpp" |
Oops, something went wrong.