2014-02-10 18:58:41 +00:00
|
|
|
//============================================================================
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// Copyright 2014 Sandia Corporation.
|
|
|
|
// Copyright 2014 UT-Battelle, LLC.
|
2015-05-21 12:09:22 +00:00
|
|
|
// Copyright 2014 Los Alamos National Security.
|
2014-02-10 18:58:41 +00:00
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
|
|
|
|
// the U.S. Government retains certain rights in this software.
|
|
|
|
//
|
|
|
|
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
|
|
|
|
// Laboratory (LANL), the U.S. Government retains certain rights in
|
|
|
|
// this software.
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#include <vtkm/internal/ConfigureFor64.h>
|
|
|
|
|
|
|
|
#include <vtkm/Types.h>
|
|
|
|
|
|
|
|
#include <vtkm/testing/Testing.h>
|
|
|
|
|
|
|
|
// Size of 64 bits.
|
|
|
|
#define EXPECTED_SIZE 8
|
|
|
|
|
|
|
|
#if VTKM_SIZE_ID != EXPECTED_SIZE
|
|
|
|
#error VTKM_SIZE_ID an unexpected size.
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if VTKM_SIZE_SCALAR != EXPECTED_SIZE
|
|
|
|
#error VTKM_SIZE_SCALAR an unexpected size.
|
|
|
|
#endif
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace
|
|
|
|
{
|
2014-02-10 18:58:41 +00:00
|
|
|
|
|
|
|
void TestTypeSizes()
|
|
|
|
{
|
2017-05-18 14:29:41 +00:00
|
|
|
VTKM_TEST_ASSERT(VTKM_SIZE_ID == EXPECTED_SIZE, "VTKM_SIZE_ID an unexpected size.");
|
|
|
|
VTKM_TEST_ASSERT(sizeof(vtkm::Id) == EXPECTED_SIZE, "vtkm::Id an unexpected size.");
|
|
|
|
VTKM_TEST_ASSERT(VTKM_SIZE_SCALAR == EXPECTED_SIZE, "VTKM_SIZE_SCALAR an unexpected size.");
|
2014-10-09 14:54:56 +00:00
|
|
|
VTKM_TEST_ASSERT(sizeof(vtkm::FloatDefault) == EXPECTED_SIZE,
|
2014-12-10 15:38:03 +00:00
|
|
|
"vtkm::FloatDefault an unexpected size.");
|
2014-02-10 18:58:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
int UnitTestConfigureFor64(int, char* [])
|
2014-02-10 18:58:41 +00:00
|
|
|
{
|
|
|
|
return vtkm::testing::Testing::Run(TestTypeSizes);
|
|
|
|
}
|