// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2020 Everton Constantino <everton.constantino@ibm.com> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/
#include"main.h"
// Disable "ignoring attributes on template argument" // for packet_traits<Packet*> // => The only workaround would be to wrap _m128 and the likes // within wrappers. #if EIGEN_GNUC_AT_LEAST(6,0) #pragma GCC diagnostic ignored "-Wignored-attributes" #endif
void comparePacketBlock(Scalar *data, int i, int j, int stride, internal::PacketBlock<Packet, n>& block)
{ for(int idx = 0; idx < n; idx++)
{
Packet line = internal::ploadu<Packet>(data + SCATTER(i,j,idx));
compare<Scalar, Packet>(block.packet[idx], line);
}
}
};
template<typename Scalar, int StorageOrder, int BlockSize> void run_bdmp_spec_1()
{ typedef internal::blas_data_mapper<Scalar, int, StorageOrder> BlasDataMapper; int packetSize = internal::packet_traits<Scalar>::size; int minSize = std::max<int>(packetSize, BlockSize); typedeftypename internal::packet_traits<Scalar>::type Packet;
int szm = internal::random<int>(minSize,500), szn = internal::random<int>(minSize,500); int stride = StorageOrder == RowMajor ? szn : szm;
Scalar *d = new Scalar[szn*szm];
// Initializing with random entries for(int i = 0; i < szm*szn; i++)
{
d[i] = internal::random<Scalar>(static_cast<Scalar>(3), static_cast<Scalar>(10));
}
EIGEN_DECLARE_TEST(blasutil)
{ for(int i = 0; i < g_repeat; i++)
{
CALL_SUBTEST_1(run_test<numext::int8_t>());
CALL_SUBTEST_2(run_test<numext::int16_t>());
CALL_SUBTEST_3(run_test<numext::int32_t>());
// TODO: Replace this by a call to numext::int64_t as soon as we have a way to // detect the typedef for int64_t on all platforms #if EIGEN_HAS_CXX11
CALL_SUBTEST_4(run_test<signedlonglong>()); #else
CALL_SUBTEST_4(run_test<signedlong>()); #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.