Skip to content

Commit 05041ab

Browse files
authored
Support custom block size in storage traits (#1392)
1 parent f190742 commit 05041ab

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

include/gridtools/storage/storage_traits_cuda.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace gridtools {
2727
struct storage_traits_from_id;
2828

2929
/** @brief storage traits for the CUDA backend*/
30-
template <>
31-
struct storage_traits_from_id<backend::cuda> {
30+
template <class IBlockSize, class JBlockSize>
31+
struct storage_traits_from_id<cuda::backend<IBlockSize, JBlockSize>> {
3232

3333
template <typename ValueType>
3434
struct select_storage {

include/gridtools/storage/storage_traits_mc.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace gridtools {
3636

3737
/** @brief storage traits for the Mic backend*/
3838
template <>
39-
struct storage_traits_from_id<backend::mc> {
39+
struct storage_traits_from_id<mc::backend> {
4040

4141
template <typename ValueType>
4242
struct select_storage {

include/gridtools/storage/storage_traits_naive.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace gridtools {
2626

2727
/** @brief storage traits for the Host backend*/
2828
template <>
29-
struct storage_traits_from_id<backend::naive> {
29+
struct storage_traits_from_id<naive::backend> {
3030

3131
template <typename ValueType>
3232
struct select_storage {

include/gridtools/storage/storage_traits_x86.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace gridtools {
2525
struct storage_traits_from_id;
2626

2727
/** @brief storage traits for the Host backend*/
28-
template <>
29-
struct storage_traits_from_id<backend::x86> {
28+
template <class IBlockSize, class JBlockSize>
29+
struct storage_traits_from_id<x86::backend<IBlockSize, JBlockSize>> {
3030

3131
template <typename ValueType>
3232
struct select_storage {

0 commit comments

Comments
 (0)