mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 18:45:43 +00:00
Fix VTKM_VECTORIZATION_IN_LOOP placement
It is only applicable on the statement on following line.
This commit is contained in:
parent
61ed34e154
commit
6efc1920df
@ -229,8 +229,8 @@ public:
|
||||
VTKM_VECTORIZATION_PRE_LOOP
|
||||
for(vtkm::Id i=(numberOfValues-1); i >= 1; --i)
|
||||
{
|
||||
VTKM_VECTORIZATION_IN_LOOP
|
||||
//nothing for gcc as input & output could be the same
|
||||
VTKM_VECTORIZATION_IN_LOOP
|
||||
outputPortal.Set(i, inputPortal.Get(i-1));
|
||||
}
|
||||
outputPortal.Set(0, initialValue);
|
||||
@ -317,19 +317,15 @@ public:
|
||||
|
||||
DeviceAdapterAlgorithm<Device>::ScheduleKernel<Functor> kernel(functor);
|
||||
|
||||
vtkm::Id3 index;
|
||||
for(vtkm::Id k=0; k < rangeMax[2]; ++k)
|
||||
{
|
||||
index[2] = k;
|
||||
for(vtkm::Id j=0; j < rangeMax[1]; ++j)
|
||||
{
|
||||
index[1] = j;
|
||||
VTKM_VECTORIZATION_PRE_LOOP
|
||||
for(vtkm::Id i=0; i < rangeMax[0]; ++i)
|
||||
{
|
||||
VTKM_VECTORIZATION_IN_LOOP
|
||||
index[0] = i;
|
||||
kernel( index );
|
||||
kernel(vtkm::Id3(i, j, k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -383,21 +383,17 @@ public:
|
||||
void operator()(const ::tbb::blocked_range3d<vtkm::Id> &range) const {
|
||||
try
|
||||
{
|
||||
vtkm::Id3 index;
|
||||
for( vtkm::Id k=range.pages().begin(); k!=range.pages().end(); ++k)
|
||||
{
|
||||
index[2] = k;
|
||||
for( vtkm::Id j=range.rows().begin(); j!=range.rows().end(); ++j)
|
||||
{
|
||||
index[1] = j;
|
||||
const vtkm::Id start =range.cols().begin();
|
||||
const vtkm::Id end = range.cols().end();
|
||||
VTKM_VECTORIZATION_PRE_LOOP
|
||||
for( vtkm::Id i=start; i != end; ++i)
|
||||
{
|
||||
VTKM_VECTORIZATION_IN_LOOP
|
||||
index[0] = i;
|
||||
this->Functor( index );
|
||||
this->Functor(vtkm::Id3(i, j, k));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user