mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-03 02:30:38 +08:00
Formatting.
This commit is contained in:
parent
92f9544f6d
commit
5808122017
@ -136,8 +136,8 @@ void test_execute_broadcasting(Device d) {
|
|||||||
template <typename T, int NumDims, typename Device, bool Vectorizable, TiledEvaluation Tiling, int Layout>
|
template <typename T, int NumDims, typename Device, bool Vectorizable, TiledEvaluation Tiling, int Layout>
|
||||||
struct test_execute_chipping_rvalue_runner {
|
struct test_execute_chipping_rvalue_runner {
|
||||||
template <int ChipDim>
|
template <int ChipDim>
|
||||||
static std::enable_if_t<0 <= ChipDim, void>
|
static std::enable_if_t<0 <= ChipDim, void> run_dim(Device& d, const array<Index, NumDims>& dims,
|
||||||
run_dim(Device& d, const array<Index, NumDims>& dims, const Tensor<T, NumDims, Layout, Index>& src) {
|
const Tensor<T, NumDims, Layout, Index>& src) {
|
||||||
const auto offset = internal::random<Index>(0, dims[(ChipDim)] - 1);
|
const auto offset = internal::random<Index>(0, dims[(ChipDim)] - 1);
|
||||||
const auto expr = src.template chip<ChipDim>(offset);
|
const auto expr = src.template chip<ChipDim>(offset);
|
||||||
|
|
||||||
@ -160,8 +160,8 @@ struct test_execute_chipping_rvalue_runner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <int ChipDim>
|
template <int ChipDim>
|
||||||
static std::enable_if_t<ChipDim < 0, void>
|
static std::enable_if_t <
|
||||||
run_dim(Device&, const array<Index, NumDims>&, const Tensor<T, NumDims, Layout, Index>&) {}
|
ChipDim<0, void> run_dim(Device&, const array<Index, NumDims>&, const Tensor<T, NumDims, Layout, Index>&) {}
|
||||||
|
|
||||||
static void run(Device d) {
|
static void run(Device d) {
|
||||||
auto dims = RandomDims<NumDims>(1, 10);
|
auto dims = RandomDims<NumDims>(1, 10);
|
||||||
@ -179,8 +179,7 @@ void test_execute_chipping_rvalue(Device d) {
|
|||||||
template <typename T, int NumDims, typename Device, bool Vectorizable, TiledEvaluation Tiling, int Layout>
|
template <typename T, int NumDims, typename Device, bool Vectorizable, TiledEvaluation Tiling, int Layout>
|
||||||
struct test_execute_chipping_lvalue_runner {
|
struct test_execute_chipping_lvalue_runner {
|
||||||
template <int ChipDim>
|
template <int ChipDim>
|
||||||
static std::enable_if_t<0 <= ChipDim>
|
static std::enable_if_t<0 <= ChipDim> run_dim(Device& d, const array<Index, NumDims>& dims) {
|
||||||
run_dim(Device& d, const array<Index, NumDims>& dims) {
|
|
||||||
/* Generate random data that we'll assign to the chipped tensor dim. */
|
/* Generate random data that we'll assign to the chipped tensor dim. */
|
||||||
array<Index, NumDims - 1> src_dims;
|
array<Index, NumDims - 1> src_dims;
|
||||||
for (int i = 0; i < NumDims - 1; ++i) {
|
for (int i = 0; i < NumDims - 1; ++i) {
|
||||||
@ -217,7 +216,7 @@ struct test_execute_chipping_lvalue_runner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <int ChipDim>
|
template <int ChipDim>
|
||||||
static std::enable_if_t<ChipDim < 0, void> run_dim(Device&, const array<Index, NumDims>&) {}
|
static std::enable_if_t < ChipDim<0, void> run_dim(Device&, const array<Index, NumDims>&) {}
|
||||||
|
|
||||||
static void run(Device d) {
|
static void run(Device d) {
|
||||||
auto dims = RandomDims<NumDims>(1, 10);
|
auto dims = RandomDims<NumDims>(1, 10);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user