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
|
KOKKOS_INLINE_FUNCTION
|
||||||
void join(volatile value_type& dst, const volatile value_type& src) const
|
void join(value_type& dst, const value_type& src) const { dst = this->Operator(dst, src); }
|
||||||
{
|
|
||||||
dst = this->Operator(dst, src);
|
|
||||||
}
|
|
||||||
|
|
||||||
KOKKOS_INLINE_FUNCTION
|
KOKKOS_INLINE_FUNCTION
|
||||||
void init(value_type& dst) const
|
void init(value_type& dst) const
|
||||||
|
@ -24,6 +24,25 @@
|
|||||||
|
|
||||||
#include <cstdio>
|
#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) \
|
#define DEVICE_ASSERT_MSG(cond, message) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
@ -47,6 +66,7 @@
|
|||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while (false)
|
||||||
|
#endif
|
||||||
|
|
||||||
// Test with some trailing bits in partial last word:
|
// Test with some trailing bits in partial last word:
|
||||||
#define NUM_BITS \
|
#define NUM_BITS \
|
||||||
|
@ -110,8 +110,6 @@ public:
|
|||||||
{
|
{
|
||||||
tableOffset = tables.FaceLookUp(3, 0);
|
tableOffset = tables.FaceLookUp(3, 0);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
printf("Error shape not recognized %d\n", (int)shapeType);
|
|
||||||
|
|
||||||
return tableOffset;
|
return tableOffset;
|
||||||
}
|
}
|
||||||
@ -282,7 +280,6 @@ public:
|
|||||||
vtkm::Int32 shapesFaceOffset = tables.FaceLookUp(tables.CellTypeLookUp(shapeId), 0);
|
vtkm::Int32 shapesFaceOffset = tables.FaceLookUp(tables.CellTypeLookUp(shapeId), 0);
|
||||||
if (shapesFaceOffset == -1)
|
if (shapesFaceOffset == -1)
|
||||||
{
|
{
|
||||||
printf("Unsupported Shape Type %d\n", shapeId);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -403,10 +400,6 @@ public:
|
|||||||
for (segment = 0; index >= Segments[segment + 1]; ++segment)
|
for (segment = 0; index >= Segments[segment + 1]; ++segment)
|
||||||
;
|
;
|
||||||
|
|
||||||
if (segment >= 6)
|
|
||||||
{
|
|
||||||
printf("OUT OF BOUDNS %d", (int)index);
|
|
||||||
}
|
|
||||||
vtkm::Int32 cellFace = SegmentToFace[segment];
|
vtkm::Int32 cellFace = SegmentToFace[segment];
|
||||||
|
|
||||||
// Face relative directions of the
|
// Face relative directions of the
|
||||||
|
@ -183,7 +183,6 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Unknown shape type %d\n", (int)cellShape.Id);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user