Skip to content

Commit

Permalink
review updates
Browse files Browse the repository at this point in the history
- make volatile load/store SFINAE more readable
- add missing includes
- disable assertions for HIP

Co-authored-by: Thomas Grützmacher <thomas.gruetzmacher@kit.edu>
  • Loading branch information
upsj and Thomas Grützmacher committed Jul 22, 2022
1 parent 81f8241 commit 81f0a5d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
6 changes: 3 additions & 3 deletions common/cuda_hip/components/volatile.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ load(const thrust::complex<ValueType>* values, IndexType index)
}

template <typename ValueType, typename IndexType>
__device__ __forceinline__ void store(
ValueType* values, IndexType index,
std::enable_if_t<!is_complex_s<ValueType>::value, ValueType> value)
__device__ __forceinline__
std::enable_if_t<!is_complex_s<ValueType>::value, void>
store(ValueType* values, IndexType index, ValueType value)
{
volatile ValueType* val = values + index;
*val = value;
Expand Down
2 changes: 1 addition & 1 deletion common/cuda_hip/factorization/lu_kernels.hpp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ __global__ __launch_bounds__(default_block_size) void factorize(
auto val = vals[lower_nz];
const auto diag_idx = diag_idxs[dep];
const auto dep_end = row_ptrs[dep + 1];
assert(dep < row);
// assert(dep < row);
if (dep_block == block) {
// wait for a local dependency
while (!load(sh_ready, dep_local)) {
Expand Down
3 changes: 3 additions & 0 deletions reference/test/factorization/lu_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
******************************<GINKGO LICENSE>*******************************/

#include <algorithm>
#include <fstream>
#include <memory>


#include <gtest/gtest.h>


#include <ginkgo/core/base/array.hpp>
#include <ginkgo/core/base/types.hpp>
#include <ginkgo/core/matrix/csr.hpp>


Expand Down
3 changes: 3 additions & 0 deletions test/factorization/lu_kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


#include <algorithm>
#include <fstream>
#include <memory>


#include <gtest/gtest.h>


#include <ginkgo/core/base/array.hpp>
#include <ginkgo/core/base/exception.hpp>
#include <ginkgo/core/base/types.hpp>
#include <ginkgo/core/matrix/csr.hpp>
#include <ginkgo/core/matrix/sparsity_csr.hpp>

Expand Down

0 comments on commit 81f0a5d

Please sign in to comment.