mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-08 11:29:02 +00:00
Changes for compiling with SYCL
- Remove volatile keyword from `join' - Remove various `printf' in device code
This commit is contained in:
parent
5fd7a3711f
commit
7d3ea2126d
@ -256,10 +256,7 @@ private:
|
||||
}
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void join(volatile value_type& dst, const volatile value_type& src) const
|
||||
{
|
||||
dst = this->Operator(dst, src);
|
||||
}
|
||||
void join(value_type& dst, const value_type& src) const { dst = this->Operator(dst, src); }
|
||||
|
||||
KOKKOS_INLINE_FUNCTION
|
||||
void init(value_type& dst) const
|
||||
|
@ -24,6 +24,25 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#if defined(KOKKOS_ENABLE_SYCL)
|
||||
#define DEVICE_ASSERT_MSG(cond, message) \
|
||||
do \
|
||||
{ \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
return false; \
|
||||
} \
|
||||
} while (false)
|
||||
|
||||
#define DEVICE_ASSERT(cond) \
|
||||
do \
|
||||
{ \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
return false; \
|
||||
} \
|
||||
} while (false)
|
||||
#else
|
||||
#define DEVICE_ASSERT_MSG(cond, message) \
|
||||
do \
|
||||
{ \
|
||||
@ -47,6 +66,7 @@
|
||||
return false; \
|
||||
} \
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
// Test with some trailing bits in partial last word:
|
||||
#define NUM_BITS \
|
||||
|
@ -110,8 +110,6 @@ public:
|
||||
{
|
||||
tableOffset = tables.FaceLookUp(3, 0);
|
||||
}
|
||||
else
|
||||
printf("Error shape not recognized %d\n", (int)shapeType);
|
||||
|
||||
return tableOffset;
|
||||
}
|
||||
@ -282,7 +280,6 @@ public:
|
||||
vtkm::Int32 shapesFaceOffset = tables.FaceLookUp(tables.CellTypeLookUp(shapeId), 0);
|
||||
if (shapesFaceOffset == -1)
|
||||
{
|
||||
printf("Unsupported Shape Type %d\n", shapeId);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -403,10 +400,6 @@ public:
|
||||
for (segment = 0; index >= Segments[segment + 1]; ++segment)
|
||||
;
|
||||
|
||||
if (segment >= 6)
|
||||
{
|
||||
printf("OUT OF BOUDNS %d", (int)index);
|
||||
}
|
||||
vtkm::Int32 cellFace = SegmentToFace[segment];
|
||||
|
||||
// Face relative directions of the
|
||||
|
@ -183,7 +183,6 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unknown shape type %d\n", (int)cellShape.Id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user