Lines Matching refs:internal

16 namespace internal {  namespace
23 return internal::isMuchSmallerThan(a-b, refvalue); in isApproxAbs()
43 if (a[i]!=b[i] && !internal::isApprox(a[i],b[i])) in areApprox()
56internal::pstore(data2, POP(internal::pload<Packet>(data1), internal::pload<Packet>(data1+PacketSi…
63 internal::pstore(data2, POP(internal::pload<Packet>(data1))); \
71 inline Packet load(const T* from) const { return internal::pload<Packet>(from); } in load()
74 inline void store(T* to, const Packet& x) const { internal::pstore(to,x); } in store()
103 typedef typename internal::packet_traits<Scalar>::type Packet; in packetmath()
104 const int PacketSize = internal::packet_traits<Scalar>::size; in packetmath()
108 EIGEN_ALIGN16 Scalar data1[internal::packet_traits<Scalar>::size*4]; in packetmath()
109 EIGEN_ALIGN16 Scalar data2[internal::packet_traits<Scalar>::size*4]; in packetmath()
111 EIGEN_ALIGN16 Scalar ref[internal::packet_traits<Scalar>::size*4]; in packetmath()
115 data1[i] = internal::random<Scalar>()/RealScalar(PacketSize); in packetmath()
116 data2[i] = internal::random<Scalar>()/RealScalar(PacketSize); in packetmath()
120 internal::pstore(data2, internal::pload<Packet>(data1)); in packetmath()
125 internal::pstore(data2, internal::ploadu<Packet>(data1+offset)); in packetmath()
131 internal::pstoreu(data2+offset, internal::pload<Packet>(data1)); in packetmath()
137 packets[0] = internal::pload<Packet>(data1); in packetmath()
138 packets[1] = internal::pload<Packet>(data1+PacketSize); in packetmath()
139 if (offset==0) internal::palign<0>(packets[0], packets[1]); in packetmath()
140 else if (offset==1) internal::palign<1>(packets[0], packets[1]); in packetmath()
141 else if (offset==2) internal::palign<2>(packets[0], packets[1]); in packetmath()
142 else if (offset==3) internal::palign<3>(packets[0], packets[1]); in packetmath()
143 internal::pstore(data2, packets[0]); in packetmath()
151 CHECK_CWISE2(REF_ADD, internal::padd); in packetmath()
152 CHECK_CWISE2(REF_SUB, internal::psub); in packetmath()
153 CHECK_CWISE2(REF_MUL, internal::pmul); in packetmath()
155 if (!internal::is_same<Scalar,int>::value) in packetmath()
156 CHECK_CWISE2(REF_DIV, internal::pdiv); in packetmath()
158 CHECK_CWISE1(internal::negate, internal::pnegate); in packetmath()
159 CHECK_CWISE1(numext::conj, internal::pconj); in packetmath()
165 internal::pstore(data2, internal::pset1<Packet>(data1[offset])); in packetmath()
169 …VERIFY(internal::isApprox(data1[0], internal::pfirst(internal::pload<Packet>(data1))) && "internal… in packetmath()
177 internal::pstore(data2,internal::ploaddup<Packet>(data1+offset)); in packetmath()
185 …VERIFY(isApproxAbs(ref[0], internal::predux(internal::pload<Packet>(data1)), refvalue) && "interna… in packetmath()
190 …VERIFY(internal::isApprox(ref[0], internal::predux_mul(internal::pload<Packet>(data1))) && "intern… in packetmath()
197 packets[j] = internal::pload<Packet>(data1+j*PacketSize); in packetmath()
199 internal::pstore(data2, internal::preduxp(packets)); in packetmath()
204 internal::pstore(data2, internal::preverse(internal::pload<Packet>(data1))); in packetmath()
211 typedef typename internal::packet_traits<Scalar>::type Packet; in packetmath_real()
212 const int PacketSize = internal::packet_traits<Scalar>::size; in packetmath_real()
215 EIGEN_ALIGN16 Scalar data1[internal::packet_traits<Scalar>::size*4]; in packetmath_real()
216 EIGEN_ALIGN16 Scalar data2[internal::packet_traits<Scalar>::size*4]; in packetmath_real()
217 EIGEN_ALIGN16 Scalar ref[internal::packet_traits<Scalar>::size*4]; in packetmath_real()
221 … data1[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3)); in packetmath_real()
222 … data2[i] = internal::random<Scalar>(-1,1) * std::pow(Scalar(10), internal::random<Scalar>(-3,3)); in packetmath_real()
224 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasSin, std::sin, internal::psin); in packetmath_real()
225 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasCos, std::cos, internal::pcos); in packetmath_real()
226 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasTan, std::tan, internal::ptan); in packetmath_real()
230 data1[i] = internal::random<Scalar>(-1,1); in packetmath_real()
231 data2[i] = internal::random<Scalar>(-1,1); in packetmath_real()
233 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasASin, std::asin, internal::pasin); in packetmath_real()
234 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasACos, std::acos, internal::pacos); in packetmath_real()
238 data1[i] = internal::random<Scalar>(-87,88); in packetmath_real()
239 data2[i] = internal::random<Scalar>(-87,88); in packetmath_real()
241 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasExp, std::exp, internal::pexp); in packetmath_real()
244 packet_helper<internal::packet_traits<Scalar>::HasExp,Packet> h; in packetmath_real()
245 h.store(data2, internal::pexp(h.load(data1))); in packetmath_real()
251 data1[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6)); in packetmath_real()
252 data2[i] = internal::random<Scalar>(0,1) * std::pow(Scalar(10), internal::random<Scalar>(-6,6)); in packetmath_real()
254 if(internal::random<float>(0,1)<0.1) in packetmath_real()
255 data1[internal::random<int>(0, PacketSize)] = 0; in packetmath_real()
256 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasSqrt, std::sqrt, internal::psqrt); in packetmath_real()
257 CHECK_CWISE1_IF(internal::packet_traits<Scalar>::HasLog, std::log, internal::plog); in packetmath_real()
260 packet_helper<internal::packet_traits<Scalar>::HasLog,Packet> h; in packetmath_real()
261 h.store(data2, internal::plog(h.load(data1))); in packetmath_real()
264 h.store(data2, internal::plog(h.load(data1))); in packetmath_real()
267 h.store(data2, internal::psqrt(h.load(data1))); in packetmath_real()
277 typedef typename internal::packet_traits<Scalar>::type Packet; in packetmath_notcomplex()
278 const int PacketSize = internal::packet_traits<Scalar>::size; in packetmath_notcomplex()
280 EIGEN_ALIGN16 Scalar data1[internal::packet_traits<Scalar>::size*4]; in packetmath_notcomplex()
281 EIGEN_ALIGN16 Scalar data2[internal::packet_traits<Scalar>::size*4]; in packetmath_notcomplex()
282 EIGEN_ALIGN16 Scalar ref[internal::packet_traits<Scalar>::size*4]; in packetmath_notcomplex()
284 Array<Scalar,Dynamic,1>::Map(data1, internal::packet_traits<Scalar>::size*4).setRandom(); in packetmath_notcomplex()
289 …VERIFY(internal::isApprox(ref[0], internal::predux_min(internal::pload<Packet>(data1))) && "intern… in packetmath_notcomplex()
291 CHECK_CWISE2((std::min), internal::pmin); in packetmath_notcomplex()
292 CHECK_CWISE2((std::max), internal::pmax); in packetmath_notcomplex()
293 CHECK_CWISE1(abs, internal::pabs); in packetmath_notcomplex()
298 …VERIFY(internal::isApprox(ref[0], internal::predux_max(internal::pload<Packet>(data1))) && "intern… in packetmath_notcomplex()
302 internal::pstore(data2, internal::plset(data1[0])); in packetmath_notcomplex()
308 typedef typename internal::packet_traits<Scalar>::type Packet; in test_conj_helper()
309 const int PacketSize = internal::packet_traits<Scalar>::size; in test_conj_helper()
311 internal::conj_if<ConjLhs> cj0; in test_conj_helper()
312 internal::conj_if<ConjRhs> cj1; in test_conj_helper()
313 internal::conj_helper<Scalar,Scalar,ConjLhs,ConjRhs> cj; in test_conj_helper()
314 internal::conj_helper<Packet,Packet,ConjLhs,ConjRhs> pcj; in test_conj_helper()
319 VERIFY(internal::isApprox(ref[i], cj.pmul(data1[i],data2[i])) && "conj_helper pmul"); in test_conj_helper()
321 internal::pstore(pval,pcj.pmul(internal::pload<Packet>(data1),internal::pload<Packet>(data2))); in test_conj_helper()
328 VERIFY(internal::isApprox(ref[i], cj.pmadd(data1[i],data2[i],tmp)) && "conj_helper pmadd"); in test_conj_helper()
330internal::pstore(pval,pcj.pmadd(internal::pload<Packet>(data1),internal::pload<Packet>(data2),inte… in test_conj_helper()
336 typedef typename internal::packet_traits<Scalar>::type Packet; in packetmath_complex()
337 const int PacketSize = internal::packet_traits<Scalar>::size; in packetmath_complex()
347 data1[i] = internal::random<Scalar>() * Scalar(1e2); in packetmath_complex()
348 data2[i] = internal::random<Scalar>() * Scalar(1e2); in packetmath_complex()
359 internal::pstore(pval,internal::pcplxflip(internal::pload<Packet>(data1))); in packetmath_complex()