perf(hex8): prepare guarded private four-column paired tangent packet
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#ifndef FESA_SRC_FESA_ELEMENTS_HEX8_PAIR_SIMD_H_
|
||||
#define FESA_SRC_FESA_ELEMENTS_HEX8_PAIR_SIMD_H_
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "../math/high_low_arithmetic.h"
|
||||
|
||||
namespace fesa::hex8_internal {
|
||||
using PairPacket = std::array<math_internal::HighLow, 4>;
|
||||
struct MaterialPacketInput {
|
||||
PairPacket deviatoric_left, deviatoric_right;
|
||||
PairPacket shear_left, shear_right;
|
||||
PairPacket tensor_left, gradient_dot;
|
||||
PairPacket accumulated;
|
||||
math_internal::HighLow weight;
|
||||
};
|
||||
using MaterialPacketEvaluator = void (*)(const MaterialPacketInput&, PairPacket*);
|
||||
|
||||
void EvaluateMaterialPacketScalar(const MaterialPacketInput& input,
|
||||
PairPacket* output);
|
||||
void EvaluateMaterialPacketAvx2(const MaterialPacketInput& input,
|
||||
PairPacket* output);
|
||||
/// @brief Selects a private backend from CPU/OS and this thread's FP state.
|
||||
/// @note Never mutates FP state or caches a thread's environment decision.
|
||||
MaterialPacketEvaluator SelectMaterialPacketEvaluator();
|
||||
} // namespace fesa::hex8_internal
|
||||
|
||||
#endif // FESA_SRC_FESA_ELEMENTS_HEX8_PAIR_SIMD_H_
|
||||
Reference in New Issue
Block a user