mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Removed more dependencies on cxx11.
This commit is contained in:
parent
f76c802973
commit
43d9dd9b28
@ -11,7 +11,6 @@
|
|||||||
#include "main.h"
|
#include "main.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <random>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
#include <Eigen/CXX11/Tensor>
|
#include <Eigen/CXX11/Tensor>
|
||||||
@ -49,8 +48,8 @@ static DSizes<Index, NumDims> RandomDims() {
|
|||||||
|
|
||||||
/** Dummy data type to test TensorBlock copy ops. */
|
/** Dummy data type to test TensorBlock copy ops. */
|
||||||
struct Data {
|
struct Data {
|
||||||
Data() : Data(0) {}
|
Data() : value(0) {}
|
||||||
explicit Data(int v) { value = v; }
|
explicit Data(int v) : value(v) { }
|
||||||
int value;
|
int value;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -324,7 +323,7 @@ static void test_block_io_copy_using_reordered_dimensions() {
|
|||||||
// Create a random dimension re-ordering/shuffle.
|
// Create a random dimension re-ordering/shuffle.
|
||||||
std::vector<Index> shuffle;
|
std::vector<Index> shuffle;
|
||||||
for (int i = 0; i < NumDims; ++i) shuffle.push_back(i);
|
for (int i = 0; i < NumDims; ++i) shuffle.push_back(i);
|
||||||
std::shuffle(shuffle.begin(), shuffle.end(), std::mt19937());
|
std::random_shuffle(shuffle.begin(), shuffle.end());
|
||||||
|
|
||||||
DSizes<Index, NumDims> output_tensor_dims;
|
DSizes<Index, NumDims> output_tensor_dims;
|
||||||
array<Index, NumDims> input_to_output_dim_map;
|
array<Index, NumDims> input_to_output_dim_map;
|
||||||
|
Loading…
Reference in New Issue
Block a user