F16 and F32
This commit is contained in:
parent
1544e92391
commit
07910a81c3
6 changed files with 898 additions and 7 deletions
|
|
@ -20,10 +20,20 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
export module Crafter.Math:Basic;
|
||||
import std;
|
||||
import :VectorF16;
|
||||
import :VectorF32;
|
||||
|
||||
namespace Crafter {
|
||||
template<typename T>
|
||||
constexpr T ToRadian(T degrees) {
|
||||
return degrees * (std::numbers::pi / 180);
|
||||
}
|
||||
|
||||
#ifdef __AVX512FP16__
|
||||
export template <std::uint32_t Len, std::uint32_t Packing, std::uint32_t Repeats>
|
||||
using VectorF16L = VectorF16<Len, Packing, Repeats>;
|
||||
#else
|
||||
export template <std::uint32_t Len, std::uint32_t Packing, std::uint32_t Repeats>
|
||||
using VectorF16L = VectorF32<Len, Packing, Repeats>;
|
||||
#endif
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue