Skip to content

Commit

Permalink
add std::dims test
Browse files Browse the repository at this point in the history
  • Loading branch information
fbusato committed Nov 25, 2024
1 parent b490614 commit 6f023ab
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES.
//
//===----------------------------------------------------------------------===//

// UNSUPPORTED: c++11
// UNSUPPORTED: msvc && c++14, msvc && c++17

#include <cuda/std/cassert>
#include <cuda/std/mdspan>

int main(int, char**)
{
{
using index_t = size_t;

cuda::std::dextents<index_t, 3> e0{1, 2, 3};
cuda::std::dims<3> e1{1, 2, 3};

assert(e0 == e1);
}

return 0;
}

0 comments on commit 6f023ab

Please sign in to comment.