Merge topic 'type-order'

23fbedf54 Order the VTK scalar types to favor used types
053237e90 Favor base types used by VTK-m when making new basic array

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3171
This commit is contained in:
Kenneth Moreland 2023-12-18 18:57:11 +00:00 committed by Kitware Robot
commit 05f9da459c
2 changed files with 5 additions and 5 deletions

@ -205,7 +205,7 @@ VTKM_CONT UnknownArrayHandle UnknownArrayHandle::NewInstanceBasic() const
// capture the correct number of components.
auto runtimeVecArrayCreator = [&](auto exampleComponent) {
using ComponentType = decltype(exampleComponent);
if (this->IsBaseComponentType<ComponentType>())
if (!newArray.IsValid() && this->IsBaseComponentType<ComponentType>())
{
newArray =
vtkm::cont::make_ArrayHandleRuntimeVec<ComponentType>(this->GetNumberOfComponentsFlat());

@ -33,19 +33,19 @@ namespace tovtkm
//------------------------------------------------------------------------------
// All scalar types in vtkType.h
using VTKScalarTypes = vtkm::List< //
char, //
signed char, //
unsigned char, //
short, //
unsigned short, //
int, //
unsigned int, //
long, //
unsigned long, //
long long, //
unsigned long long, //
float, //
double //
double, //
char, //
long, //
unsigned long //
>;
using SpecialGradientOutTypes =