perf(hex8): packetize ordered gradient and geometric contractions

This commit is contained in:
KOKO\Mimi
2026-10-14 22:37:39 +09:00
parent 01590bbb0d
commit 96772651d8
5 changed files with 323 additions and 3 deletions
+24
View File
@@ -23,6 +23,30 @@ struct MaterialPacketInput {
PairPacket accumulated;
PacketPair weight;
};
/// @brief One owned trial point/a and four independent b gradients, raw only.
struct GeometryPacketInput {
PacketPair gradient_a[3];
PacketPair gradient_stress[3][3];
PairPacket gradient_b[3];
PacketPair weight;
};
/// @brief Independent raw contractions; accumulator entries remain caller-owned.
struct GeometryPacketOutput {
PairPacket gradient_dot;
PairPacket weighted_geometric;
};
using GeometryPacketEvaluator = void (*)(const GeometryPacketInput&,
GeometryPacketOutput*);
/// @brief Baseline checked zero-start Dot3/ordered j,l Geo9 and weight products.
/// @note Lane order is 0..3. Invalid pairs remain invalid for original gates.
void EvaluateGeometryPacketScalar(const GeometryPacketInput& input,
GeometryPacketOutput* output);
/// @brief Evaluates independent b lanes without horizontal reduction.
/// @pre The material selector has admitted CPU/OS/current masked FP state.
/// @note Keeps original zero-start, product association and j,l Add order.
void EvaluateGeometryPacketAvx2(const GeometryPacketInput& input,
GeometryPacketOutput* output);
using MaterialPacketEvaluator = void (*)(const MaterialPacketInput&, PairPacket*);
/// @brief Evaluates each lane's original checked material graph in order 0..3.