mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-09-15 10:53:50 +08:00
Implemented the ptranspose function on half floats
This commit is contained in:
parent
e644f60907
commit
584832cb3c
@ -226,10 +226,12 @@ template<> EIGEN_DEVICE_FUNC inline half2 pabs<half2>(const half2& a) {
|
|||||||
|
|
||||||
EIGEN_DEVICE_FUNC inline void
|
EIGEN_DEVICE_FUNC inline void
|
||||||
ptranspose(PacketBlock<half2,2>& kernel) {
|
ptranspose(PacketBlock<half2,2>& kernel) {
|
||||||
assert(false && "tbd");
|
half a1 = __low2half(kernel.packet[0]);
|
||||||
// half tmp = kernel.packet[0].y;
|
half a2 = __high2half(kernel.packet[0]);
|
||||||
// kernel.packet[0].y = kernel.packet[1].x;
|
half b1 = __low2half(kernel.packet[1]);
|
||||||
// kernel.packet[1].x = tmp;
|
half b2 = __high2half(kernel.packet[1]);
|
||||||
|
kernel.packet[0] = __halves2half2(a1, b1);
|
||||||
|
kernel.packet[1] = __halves2half2(a2, b2);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
|
Loading…
x
Reference in New Issue
Block a user