From c4533a78eb156b809e0c44304ace021dc9ce3bf9 Mon Sep 17 00:00:00 2001 From: cyy Date: Mon, 30 Dec 2024 19:26:04 +0800 Subject: [PATCH] Use std::array --- torchcsprng/csrc/OffsetCalculator.cuh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/torchcsprng/csrc/OffsetCalculator.cuh b/torchcsprng/csrc/OffsetCalculator.cuh index a47fba2..cda3845 100644 --- a/torchcsprng/csrc/OffsetCalculator.cuh +++ b/torchcsprng/csrc/OffsetCalculator.cuh @@ -7,7 +7,6 @@ #pragma once -#include #include #include #include @@ -29,7 +28,7 @@ struct OffsetCalculator { // On CUDA, zero sized array is not allowed, so when we are handling nullary // operators, we need to create a size 1 offset to avoid compiler failure. // This size 1 offset is just a placeholder, and we will not use it. - using offset_type = at::detail::Array(NARGS, 1)>; + using offset_type = std::array(NARGS, 1)>; // if element_sizes is nullptr, then the strides will be in bytes, otherwise // the strides will be in # of elements. @@ -89,7 +88,7 @@ struct TrivialOffsetCalculator { // On CUDA, zero sized array is not allowed, so when we are handling nullary // operators, we need to create a size 1 offset to avoid compiler failure. // This size 1 offset is just a placeholder, and we will not use it. - using offset_type = at::detail::Array(NARGS, 1)>; + using offset_type = std::array(NARGS, 1)>; C10_HOST_DEVICE offset_type get(index_t linear_idx) const { offset_type offsets;