VTK: Common/Core/vtkArrayDispatch.h Source File

| VTK 9.3.1

vtkArrayDispatch.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
195 #ifndef vtkArrayDispatch_h
196 #define vtkArrayDispatch_h
197
198 #include "vtkArrayDispatchArrayList.h"
199 #include "vtkType.h"
200 #include "vtkTypeList.h"
201
202 namespace vtkArrayDispatch
203 {
204 VTK_ABI_NAMESPACE_BEGIN
205
209 typedef vtkTypeList::Create<double, float> Reals;
210
214 typedef vtkTypeList::Unique<
215 vtkTypeList::Create<char, int, long, long long, short, signed char, unsigned char, unsigned int,
216 unsigned long, unsigned long long, unsigned short, vtkIdType>>::Result Integrals;
217
221 typedef vtkTypeList::Append<Reals, Integrals>::Result AllTypes;
222
223 //------------------------------------------------------------------------------
230 struct Dispatch;
231
232 //------------------------------------------------------------------------------
239 template <typename ArrayList>
240 struct DispatchByArray;
241
242 //------------------------------------------------------------------------------
250 template <typename ArrayList, typename ValueTypeList>
251 struct DispatchByValueTypeUsingArrays;
252 template <typename ValueTypeList>
253 struct DispatchByValueType;
254
255 //------------------------------------------------------------------------------
263 struct Dispatch2;
264
265 //------------------------------------------------------------------------------
274 template <typename ArrayList>
275 struct Dispatch2SameValueTypeUsingArrays;
276 struct Dispatch2SameValueType;
277
278 //------------------------------------------------------------------------------
288 template <typename ArrayList1, typename ArrayList2>
289 struct Dispatch2ByArray;
290
291 //------------------------------------------------------------------------------
303 template <typename ArrayList, typename ValueTypeList1, typename ValueTypeList2>
304 struct Dispatch2ByValueTypeUsingArrays;
305 template <typename ValueTypeList1, typename ValueTypeList2>
306 struct Dispatch2ByValueType;
307
308 //------------------------------------------------------------------------------
319 template <typename ArrayList1, typename ArrayList2>
320 struct Dispatch2ByArrayWithSameValueType;
321
322 //------------------------------------------------------------------------------
334 template <typename ArrayList, typename ValueTypeList>
335 struct Dispatch2BySameValueTypeUsingArrays;
336 template <typename ValueTypeList>
337 struct Dispatch2BySameValueType;
338
339 //------------------------------------------------------------------------------
347 struct Dispatch3;
348
349 //------------------------------------------------------------------------------
358 template <typename ArrayList>
359 struct Dispatch3SameValueTypeUsingArrays;
360 struct Dispatch3SameValueType;
361
362 //------------------------------------------------------------------------------
373 template <typename ArrayList1, typename ArrayList2, typename ArrayList3>
374 struct Dispatch3ByArray;
375
376 //------------------------------------------------------------------------------
390 template <typename ArrayList, typename ValueTypeList1, typename ValueTypeList2,
391 typename ValueTypeList3>
392 struct Dispatch3ByValueTypeUsingArrays;
393 template <typename ValueTypeList1, typename ValueTypeList2, typename ValueTypeList3>
394 struct Dispatch3ByValueType;
395
396 //------------------------------------------------------------------------------
407 template <typename ArrayList1, typename ArrayList2, typename ArrayList3>
408 struct Dispatch3ByArrayWithSameValueType;
409
410 //------------------------------------------------------------------------------
422 template <typename ArrayList, typename ValueTypeList>
423 struct Dispatch3BySameValueTypeUsingArrays;
424 template <typename ValueTypeList>
425 struct Dispatch3BySameValueType;
426
427 //------------------------------------------------------------------------------
432 template <typename ArrayList, typename ValueList>
433 struct FilterArraysByValueType;
434
435 VTK_ABI_NAMESPACE_END
436 } // end namespace vtkArrayDispatch
437
438 #include "vtkArrayDispatch.txx"
439
440 #endif // vtkArrayDispatch_h
441 // VTK-HeaderTest-Exclude: vtkArrayDispatch.h
vtkArrayDispatch::AllTypes
vtkTypeList::Append< Reals, Integrals >::Result AllTypes
A Typelist containing all standard VTK array ValueTypes.
Definition: vtkArrayDispatch.h:221
vtkArrayDispatch::Reals
vtkTypeList::Create< double, float > Reals
A TypeList containing all real ValueTypes.
Definition: vtkArrayDispatch.h:209
vtkArrayDispatch::Integrals
vtkTypeList::Unique< vtkTypeList::Create< char, int, long, long long, short, signed char, unsigned char, unsigned int, unsigned long, unsigned long long, unsigned short, vtkIdType > >::Result Integrals
A Typelist containing all integral ValueTypes.
Definition: vtkArrayDispatch.h:216
vtkTypeList::Create
typename vtkTypeList::detail::CreateImpl< Ts... >::type Create
Definition: vtkTypeList.h:163
vtkArrayDispatch
Definition: vtkArrayDispatch.h:203
vtkIOSSUtilities::ArrayList
typename vtkTypeList::Unique< vtkTypeList::Create< vtkDoubleArray, vtkTypeInt32Array, vtkTypeInt64Array > >::Result ArrayList
List of possible ArrayTypes that are produced by vtkIOSSUtilities.
Definition: vtkIOSSUtilities.h:127
vtkArrayDispatch::Dispatch2ByArrayWithSameValueType
Dispatch two arrays, restricting the valid code paths to use only array types specified in the ArrayL...
Definition: vtkArrayDispatch.h:320
vtkArrayDispatch::Dispatch2ByArray
Dispatch two arrays with the restriction that the type of the first array is in the ArrayList1 TypeLi...
Definition: vtkArrayDispatch.h:289
vtkArrayDispatch::Dispatch2BySameValueTypeUsingArrays
Dispatch two arrays, restricting the valid code paths to use only array types found in application-wi...
Definition: vtkArrayDispatch.h:335
vtkArrayDispatch::Dispatch2BySameValueType
Definition: vtkArrayDispatch.h:337
vtkArrayDispatch::Dispatch2ByValueTypeUsingArrays
Dispatch two arrays, restricting the valid code paths to use ValueType-filtered versions of the appli...
Definition: vtkArrayDispatch.h:304
vtkArrayDispatch::Dispatch2ByValueType
Definition: vtkArrayDispatch.h:306
vtkArrayDispatch::Dispatch2SameValueTypeUsingArrays
Dispatch two arrays, restricting the valid code paths to use only arrays that have the same ValueType...
Definition: vtkArrayDispatch.h:275
vtkArrayDispatch::Dispatch3ByArrayWithSameValueType
Dispatch three arrays, restricting the valid code paths to use only array types specified in the Arra...
Definition: vtkArrayDispatch.h:408
vtkArrayDispatch::Dispatch3ByArray
Dispatch three arrays with the restriction that the type of the first array is in the ArrayList1 Type...
Definition: vtkArrayDispatch.h:374
vtkArrayDispatch::Dispatch3BySameValueTypeUsingArrays
Dispatch three arrays, restricting the valid code paths to use only array types found in application-...
Definition: vtkArrayDispatch.h:423
vtkArrayDispatch::Dispatch3BySameValueType
Definition: vtkArrayDispatch.h:425
vtkArrayDispatch::Dispatch3ByValueTypeUsingArrays
Dispatch three arrays, restricting the valid code paths to use ValueType-filtered versions of the app...
Definition: vtkArrayDispatch.h:392
vtkArrayDispatch::Dispatch3ByValueType
Definition: vtkArrayDispatch.h:394
vtkArrayDispatch::Dispatch3SameValueTypeUsingArrays
Dispatch three arrays, restricting the valid code paths to use only arrays that have the same ValueTy...
Definition: vtkArrayDispatch.h:359
vtkArrayDispatch::DispatchByArray
Dispatch a single array against all array types mentioned in the ArrayList template parameter.
Definition: vtkArrayDispatch.h:240
vtkArrayDispatch::DispatchByValueTypeUsingArrays
Dispatch a single array against all array types in the application-wide vtkArrayDispatch::Arrays list...
Definition: vtkArrayDispatch.h:251
vtkArrayDispatch::DispatchByValueType
Definition: vtkArrayDispatch.h:253
vtkArrayDispatch::FilterArraysByValueType
Filter the ArrayList to contain only arrays with ArrayType::ValueType that exist in ValueList.
Definition: vtkArrayDispatch.h:433
vtkTypeList::Append
Appends type T to TypeList TList and stores the result in Result.
Definition: vtkTypeList.h:151
vtkTypeList::Unique
Remove all duplicate types from TypeList TList, storing the new list in Result.
Definition: vtkTypeList.h:110
vtkTypeList.h
vtkType.h
vtkIdType
int vtkIdType
Definition: vtkType.h:315