vtk-m/vtkm/filter/ClipWithFieldSignedInteger.cxx.in
Vicente Adolfo Bolea Sanchez 5ddfb719a3 ClipWithField: Use primive types in instantiations
`vtkm::[U]Int*` types depending of each platform/arch would translate to
different integer types. We cannot make a generalization with this.

A simple way to handle this is to simply use primitive types, such as
char, signed char, long..., instead of vtkm::[U]Int*. This makes sure
that every primitive type is actually instantiated.

We could potentially use this in other filters instantiation file.

This error has been reported in VTK when being build with vtkm.
2020-11-19 19:14:16 -05:00

64 lines
2.1 KiB
C++

//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
//
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the above copyright notice for more information.
//============================================================================
//$# This file uses the pyexpander macro processing utility to build the
//$# FunctionInterface facilities that use a variable number of arguments.
//$# Information, documentation, and downloads for pyexpander can be found at:
//$#
//$# http://pyexpander.sourceforge.net/
//$#
//$# To build the source code, execute the following (after installing
//$# pyexpander, of course):
//$#
//$# expander.py ClipWithFieldSignedInteger.cxx.in > ClipWithFieldSignedInteger.cxx
//$#
//$# Ignore the following comment. It is meant for the generated file.
// **** DO NOT EDIT THIS FILE!!! ****
// This file is automatically generated by ClipWithFieldSignedInteger.cxx.in
// clang-format off
#ifndef vtkm_filter_ClipWithFieldExecuteSignedInteger_cxx
#define vtkm_filter_ClipWithFieldExecuteSignedInteger_cxx
#include <vtkm/filter/ClipWithField.h>
#include <vtkm/filter/ClipWithField.hxx>
namespace vtkm
{
namespace filter
{
$py(
# These values are taken from vtkm/TypeList.h
types = [ "char", "signed char", "short", "int", "long", "long long" ]
)\
\
$for(TYPE in types)\
template VTKM_FILTER_EXTRA_EXPORT vtkm::cont::DataSet ClipWithField::DoExecute(
const vtkm::cont::DataSet&,
const vtkm::cont::ArrayHandle<$(TYPE)>&,
const vtkm::filter::FieldMetadata&,
vtkm::filter::PolicyBase<vtkm::filter::PolicyDefault>);
#ifndef VTKM_NO_DEPRECATED_VIRTUAL
VTKM_DEPRECATED_SUPPRESS_BEGIN
template VTKM_FILTER_EXTRA_EXPORT vtkm::cont::DataSet ClipWithField::DoExecute(
const vtkm::cont::DataSet&,
const vtkm::cont::ArrayHandle<$(TYPE), vtkm::cont::StorageTagVirtual>&,
const vtkm::filter::FieldMetadata&,
vtkm::filter::PolicyBase<vtkm::filter::PolicyDefault>);
VTKM_DEPRECATED_SUPPRESS_END
#endif
$endfor\
}
}
#endif