51 #include <pvsutil/Assert.h>
52 #include <pvsutil/Logger.h>
54 #include <SkelCL/IndexMatrix.h>
57 #include <SkelCL/detail/Device.h>
58 #include <SkelCL/detail/DeviceBuffer.h>
59 #include <SkelCL/detail/DeviceList.h>
60 #include <SkelCL/detail/Distribution.h>
61 #include <SkelCL/detail/Event.h>
69 LOG_DEBUG_INFO(
"Created new IndexMatrix object (",
this,
") with ",
75 LOG_DEBUG_INFO(
"IndexMatrix object (",
this,
") with ", getDebugInfo(),
91 return {_maxIndex.rowID() + 1, _maxIndex.columnID() + 1};
96 ASSERT(_distribution !=
nullptr);
99 for (
auto& devicePtr : _distribution->devices()) {
100 s.push_back(this->_distribution->sizeForDevice(*
this, devicePtr));
113 std::make_tuple(_maxIndex.rowID(), _maxIndex.columnID())) {
114 throw std::out_of_range(
"Out of range access.");
129 detail::Distribution<Matrix<IndexPoint>>&
132 ASSERT(_distribution !=
nullptr);
133 return *_distribution;
139 ASSERT(newDistribution !=
nullptr);
140 ASSERT(newDistribution->isValid());
142 _distribution = std::move(newDistribution);
144 ASSERT(_distribution->isValid());
146 LOG_DEBUG_INFO(
"IndexMatrix object (",
this,
147 ") assigned new distribution, now with ", getDebugInfo());
152 return std::string();
162 std::string Matrix<IndexPoint>::getDebugInfo()
const
169 const detail::DeviceBuffer&
172 ASSERT_MESSAGE(
false,
"This function should never be called!");
173 static detail::DeviceBuffer db;
179 ASSERT_MESSAGE(
false,
"This function should never be called!");
180 static std::vector<IndexPoint> v;
186 ASSERT_MESSAGE(
false,
"This function should never be called!");
191 ASSERT_MESSAGE(
false,
"This function should never be called!");
The Matrix class is a two dimensional container which makes its data accessible on the host as well a...
Matrix()
Creates a new empty Matrix.
This class defines a two dimensional size for a Matrix.
size_type rowCount() const
Returns the number of rows.
size_type columnCount() const
Returns the number of columns.
host_buffer_type::value_type value_type
The type of the elements.
The IndexMatrix (a.k.a. Matrix) class is a special implementation of a Matrix with Elemen...