Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ah_mdspan_test.cc File Reference

Tests for the multidimensional view type (ah-mdspan.H). More...

#include <array>
#include <stdexcept>
#include <type_traits>
#include <vector>
#include <gtest/gtest.h>
#include <ah-mdspan.H>
Include dependency graph for ah_mdspan_test.cc:

Go to the source code of this file.

Concepts

concept  CanCall
 
concept  CanCallAt
 

Typedefs

using Rank2 = mdspan< int, dextents< size_t, 2 > >
 

Functions

 TEST (AhMdspan, DetectionMacroIsDefined)
 
 TEST (AhMdspan, DextentsRankAndRankDynamic)
 
 TEST (AhMdspan, MixedStaticAndDynamicExtents)
 
 TEST (AhMdspan, ExtentsFromArray)
 
 TEST (AhMdspan, ExtentsEquality)
 
 TEST (AhMdspan, BasicConstructionAndShape)
 
 TEST (AhMdspan, OperatorRequiresExactRankArguments)
 
 TEST (AhMdspan, ConstructFromArrayOfDynamicExtents)
 
 TEST (AhMdspan, RowMajorIsDefaultAndMatchesFlatBufferOrder)
 
 TEST (AhMdspan, LayoutLeftIsColumnMajor)
 
 TEST (AhMdspan, WriteThroughViewIsVisibleThroughBuffer)
 
 TEST (AhMdspan, ReadOnlyViewOverConstElement)
 
 TEST (AhMdspan, AtThrowsOnOutOfRangeIndex)
 
 TEST (AhMdspan, OneDimensionalView)
 
 TEST (AhMdspan, ThreeDimensionalRowMajorRoundTrip)
 
 TEST (AhMdspan, DefaultConstructedIsEmptyWithNullData)
 
 TEST (AhMdspan, MultipleIndependentViewsOverSameBufferDoNotInterfere)
 
 TEST (AhMdspan, MutableViewConvertsImplicitlyToConstView)
 

Detailed Description

Tests for the multidimensional view type (ah-mdspan.H).

Exercises Aleph::mdspan through the same surface regardless of whether it resolves to std::mdspan (C++23) or the in-house C++20 polyfill.

Definition in file ah_mdspan_test.cc.

Typedef Documentation

◆ Rank2

using Rank2 = mdspan<int, dextents<size_t, 2> >

Definition at line 59 of file ah_mdspan_test.cc.

Function Documentation

◆ TEST() [1/18]

TEST ( AhMdspan  ,
AtThrowsOnOutOfRangeIndex   
)

Definition at line 212 of file ah_mdspan_test.cc.

References m.

◆ TEST() [2/18]

TEST ( AhMdspan  ,
BasicConstructionAndShape   
)

◆ TEST() [3/18]

TEST ( AhMdspan  ,
ConstructFromArrayOfDynamicExtents   
)

Definition at line 154 of file ah_mdspan_test.cc.

References m.

◆ TEST() [4/18]

TEST ( AhMdspan  ,
DefaultConstructedIsEmptyWithNullData   
)

◆ TEST() [5/18]

TEST ( AhMdspan  ,
DetectionMacroIsDefined   
)

Definition at line 79 of file ah_mdspan_test.cc.

References ALEPH_HAS_STD_MDSPAN.

◆ TEST() [6/18]

TEST ( AhMdspan  ,
DextentsRankAndRankDynamic   
)

Definition at line 86 of file ah_mdspan_test.cc.

◆ TEST() [7/18]

TEST ( AhMdspan  ,
ExtentsEquality   
)

Definition at line 119 of file ah_mdspan_test.cc.

◆ TEST() [8/18]

TEST ( AhMdspan  ,
ExtentsFromArray   
)

Definition at line 111 of file ah_mdspan_test.cc.

◆ TEST() [9/18]

TEST ( AhMdspan  ,
LayoutLeftIsColumnMajor   
)

Definition at line 178 of file ah_mdspan_test.cc.

References m.

◆ TEST() [10/18]

TEST ( AhMdspan  ,
MixedStaticAndDynamicExtents   
)

Definition at line 97 of file ah_mdspan_test.cc.

◆ TEST() [11/18]

TEST ( AhMdspan  ,
MultipleIndependentViewsOverSameBufferDoNotInterfere   
)

Definition at line 255 of file ah_mdspan_test.cc.

◆ TEST() [12/18]

TEST ( AhMdspan  ,
MutableViewConvertsImplicitlyToConstView   
)

Definition at line 264 of file ah_mdspan_test.cc.

References m.

◆ TEST() [13/18]

TEST ( AhMdspan  ,
OneDimensionalView   
)

Definition at line 221 of file ah_mdspan_test.cc.

References m.

◆ TEST() [14/18]

TEST ( AhMdspan  ,
OperatorRequiresExactRankArguments   
)

Definition at line 141 of file ah_mdspan_test.cc.

References m.

◆ TEST() [15/18]

TEST ( AhMdspan  ,
ReadOnlyViewOverConstElement   
)

Definition at line 203 of file ah_mdspan_test.cc.

References m.

◆ TEST() [16/18]

TEST ( AhMdspan  ,
RowMajorIsDefaultAndMatchesFlatBufferOrder   
)

Definition at line 163 of file ah_mdspan_test.cc.

References m.

◆ TEST() [17/18]

TEST ( AhMdspan  ,
ThreeDimensionalRowMajorRoundTrip   
)

Definition at line 230 of file ah_mdspan_test.cc.

References k, and m.

◆ TEST() [18/18]

TEST ( AhMdspan  ,
WriteThroughViewIsVisibleThroughBuffer   
)

Definition at line 192 of file ah_mdspan_test.cc.

References m.