mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix compilation warnings and errors with clang in TensorBlockV2 code and tests
This commit is contained in:
@@ -104,13 +104,13 @@ static TensorBlockParams<NumDims> FixedSizeBlock(DSizes<Index, NumDims> dims) {
|
||||
return {offsets, dims, TensorBlockDescriptor<NumDims, Index>(0, dims)};
|
||||
}
|
||||
|
||||
inline Eigen::IndexList<int, Eigen::type2index<1>> NByOne(int n) {
|
||||
Eigen::IndexList<int, Eigen::type2index<1>> ret;
|
||||
inline Eigen::IndexList<Index, Eigen::type2index<1>> NByOne(Index n) {
|
||||
Eigen::IndexList<Index, Eigen::type2index<1>> ret;
|
||||
ret.set(0, n);
|
||||
return ret;
|
||||
}
|
||||
inline Eigen::IndexList<Eigen::type2index<1>, int> OneByM(int m) {
|
||||
Eigen::IndexList<Eigen::type2index<1>, int> ret;
|
||||
inline Eigen::IndexList<Eigen::type2index<1>, Index> OneByM(Index m) {
|
||||
Eigen::IndexList<Eigen::type2index<1>, Index> ret;
|
||||
ret.set(1, m);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -582,10 +582,11 @@ static void test_async_execute_unary_expr(Device d)
|
||||
Eigen::Barrier done(1);
|
||||
auto on_done = [&done]() { done.Notify(); };
|
||||
|
||||
static const bool TilingOn = Tiling == TiledEvaluation::Off ? false : true;
|
||||
using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;
|
||||
using DoneCallback = decltype(on_done);
|
||||
using Executor = internal::TensorAsyncExecutor<const Assign, Device, DoneCallback,
|
||||
Vectorizable, Tiling>;
|
||||
Vectorizable, TilingOn>;
|
||||
|
||||
Executor::runAsync(Assign(dst, expr), d, on_done);
|
||||
done.Wait();
|
||||
@@ -618,10 +619,11 @@ static void test_async_execute_binary_expr(Device d)
|
||||
Eigen::Barrier done(1);
|
||||
auto on_done = [&done]() { done.Notify(); };
|
||||
|
||||
static const bool TilingOn = Tiling == TiledEvaluation::Off ? false : true;
|
||||
using Assign = TensorAssignOp<decltype(dst), const decltype(expr)>;
|
||||
using DoneCallback = decltype(on_done);
|
||||
using Executor = internal::TensorAsyncExecutor<const Assign, Device, DoneCallback,
|
||||
Vectorizable, Tiling>;
|
||||
Vectorizable, TilingOn>;
|
||||
|
||||
Executor::runAsync(Assign(dst, expr), d, on_done);
|
||||
done.Wait();
|
||||
|
||||
Reference in New Issue
Block a user