Commit 085d9d11 authored by Astha Rai's avatar Astha Rai
Browse files

changed NumDim into 2D

parent 5da7cd69
...@@ -26,12 +26,17 @@ template <typename InDataTypeTuple, ...@@ -26,12 +26,17 @@ template <typename InDataTypeTuple,
index_t NPerThread, index_t NPerThread,
typename InScalarPerVectorSeq, typename InScalarPerVectorSeq,
typename OutScalarPerVectorSeq> typename OutScalarPerVectorSeq>
struct DeviceElementwise struct DeviceElementwise : public DeviceElementwiseBase<InDataTypeTuple,
: public DeviceElementwiseBase<InDataTypeTuple, OutDataTypeTuple, ElementwiseOperation, NumDim> OutDataTypeTuple,
ElementwiseOperation,
NumDim_m,
NumDim_n>
{ {
static constexpr int NumInput = InDataTypeTuple::Size(); static constexpr int NumInput = InDataTypeTuple::Size();
static constexpr int NumOutput = OutDataTypeTuple::Size(); static constexpr int NumOutput = OutDataTypeTuple::Size();
const index_t NumDim = NumDim_m + NumDim_n;
static_assert(NumInput == InScalarPerVectorSeq::Size() && static_assert(NumInput == InScalarPerVectorSeq::Size() &&
NumOutput == OutScalarPerVectorSeq::Size(), NumOutput == OutScalarPerVectorSeq::Size(),
"Tuple size is inconsistent with the number of in/out!"); "Tuple size is inconsistent with the number of in/out!");
...@@ -115,7 +120,7 @@ struct DeviceElementwise ...@@ -115,7 +120,7 @@ struct DeviceElementwise
} }
template <index_t TupleSize> template <index_t TupleSize>
static auto GenerateInOutGridse_2d.hpp2dDescTuple(Number<TupleSize>) static auto GenerateInOutGrid1dDescTuple(Number<TupleSize>)
{ {
return generate_tuple( return generate_tuple(
[&](auto) { [&](auto) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment