Viskores
1.0
viskores
internal
ArrayPortalDummy.h
Go to the documentation of this file.
1
//============================================================================
2
// The contents of this file are covered by the Viskores license. See
3
// LICENSE.txt for details.
4
//
5
// By contributing to this file, all contributors agree to the Developer
6
// Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7
//============================================================================
8
9
//============================================================================
10
// Copyright (c) Kitware, Inc.
11
// All rights reserved.
12
// See LICENSE.txt for details.
13
//
14
// This software is distributed WITHOUT ANY WARRANTY; without even
15
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16
// PURPOSE. See the above copyright notice for more information.
17
//============================================================================
18
#ifndef viskores_internal_ArrayPortalDummy
19
#define viskores_internal_ArrayPortalDummy
20
21
#include <
viskores/Assert.h
>
22
#include <
viskores/Types.h
>
23
24
namespace
viskores
25
{
26
namespace
internal
27
{
28
32
template
<
typename
T>
33
struct
ArrayPortalDummy
34
{
35
using
ValueType = T;
36
37
VISKORES_EXEC_CONT
viskores::Id
GetNumberOfValues()
const
{
return
0; }
38
39
VISKORES_EXEC_CONT
ValueType
Get
(
viskores::Id
)
const
40
{
41
VISKORES_ASSERT
(
false
&&
"Tried to use a dummy portal."
);
42
return
ValueType{};
43
}
44
};
45
46
}
47
}
// namespace viskores::internal
48
49
#endif //viskores_internal_ArrayPortalDummy
Types.h
Assert.h
VISKORES_EXEC_CONT
#define VISKORES_EXEC_CONT
Definition:
ExportMacros.h:60
viskores::Id
viskores::Int64 Id
Base type to use to index arrays.
Definition:
Types.h:235
viskores
Groups connected points that have the same field value.
Definition:
Atomic.h:27
VISKORES_ASSERT
#define VISKORES_ASSERT(condition)
Definition:
Assert.h:51
viskores::Get
auto Get(const viskores::Tuple< Ts... > &tuple)
Retrieve the object from a viskores::Tuple at the given index.
Definition:
Tuple.h:89
Generated by
1.8.17