Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Sudhanshu Sane
VTK-m
Commits
efbc8d68
Commit
efbc8d68
authored
Mar 01, 2019
by
Dave Pugmire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change compiler flags and undo conversions.
parent
d38849e2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
15 deletions
+19
-15
CMake/VTKmCompilerFlags.cmake
CMake/VTKmCompilerFlags.cmake
+6
-2
vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx
vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx
+2
-2
vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx
vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx
+2
-2
vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx
vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx
+2
-2
vtkm/worklet/testing/UnitTestWorkletMapField.cxx
vtkm/worklet/testing/UnitTestWorkletMapField.cxx
+4
-4
vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx
vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx
+2
-2
vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx
vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx
+1
-1
No files found.
CMake/VTKmCompilerFlags.cmake
View file @
efbc8d68
...
...
@@ -119,8 +119,12 @@ elseif(VTKM_COMPILER_IS_ICC)
target_compile_options
(
vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd1478 -wd13379>
)
elseif
(
VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG
)
set
(
cxx_flags -Wall -Wcast-align -Wconversion -Wchar-subscripts -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -fno-common
)
set
(
cxx_flags -Wall -Wcast-align -Wchar-subscripts -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -fno-common
)
if
(
VTKM_COMPILER_IS_GNU
)
list
(
APPEND cxx_flags -Wfloat-conversion
)
elseif
(
VTKM_COMPILER_IS_CLANG
)
list
(
APPEND cxx_flags -Wconversion
)
endif
()
set
(
cuda_flags -Xcompiler=-Wall,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-local-typedefs,-Wno-unused-function,-Wcast-align,-Wconversion,-Wchar-subscripts,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-Wunused-parameter,-fno-common
)
#GCC 5, 6 don't properly handle strict-overflow suppression through pragma's.
...
...
vtkm/cont/arg/testing/UnitTestTransportArrayInOut.cxx
View file @
efbc8d68
...
...
@@ -42,7 +42,7 @@ struct TestKernelInOut : public vtkm::exec::FunctorBase
{
using
ValueType
=
typename
PortalType
::
ValueType
;
ValueType
inValue
=
this
->
Portal
.
Get
(
index
);
this
->
Portal
.
Set
(
index
,
static_cast
<
ValueType
>
(
inValue
+
inValue
)
)
;
this
->
Portal
.
Set
(
index
,
inValue
+
inValue
);
}
};
...
...
@@ -76,7 +76,7 @@ struct TryArrayInOutType
"Portal has wrong number of values."
);
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
T
expectedValue
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
TestValue
(
index
,
T
())
)
;
T
expectedValue
=
TestValue
(
index
,
T
())
+
TestValue
(
index
,
T
());
T
retrievedValue
=
portal
.
Get
(
index
);
VTKM_TEST_ASSERT
(
test_equal
(
expectedValue
,
retrievedValue
),
"Functor did not modify in place."
);
...
...
vtkm/cont/arg/testing/UnitTestTransportWholeArray.cxx
View file @
efbc8d68
...
...
@@ -88,7 +88,7 @@ struct TestInOutKernel : public vtkm::exec::FunctorBase
this
->
RaiseError
(
"In/Out whole array has wrong size."
);
}
using
ValueType
=
typename
PortalType
::
ValueType
;
this
->
Portal
.
Set
(
index
,
static_cast
<
ValueType
>
(
this
->
Portal
.
Get
(
index
)
+
ValueType
(
OFFSET
))
)
;
this
->
Portal
.
Set
(
index
,
this
->
Portal
.
Get
(
index
)
+
ValueType
(
OFFSET
));
}
};
...
...
@@ -156,7 +156,7 @@ struct TryWholeArrayType
VTKM_TEST_ASSERT
(
array
.
GetNumberOfValues
()
==
ARRAY_SIZE
,
"Array size wrong?"
);
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
T
expectedValue
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
T
(
OFFSET
)
)
;
T
expectedValue
=
TestValue
(
index
,
T
())
+
T
(
OFFSET
);
T
retrievedValue
=
array
.
GetPortalConstControl
().
Get
(
index
);
VTKM_TEST_ASSERT
(
test_equal
(
expectedValue
,
retrievedValue
),
"In/Out array not set correctly."
);
...
...
vtkm/cont/testing/UnitTestArrayHandlePermutation.cxx
View file @
efbc8d68
...
...
@@ -90,7 +90,7 @@ struct InPlacePermutationFunctor : vtkm::exec::FunctorBase
using
T
=
typename
PermutedPortalType
::
ValueType
;
T
value
=
this
->
PermutedPortal
.
Get
(
index
);
value
=
static_cast
<
T
>
(
value
+
T
(
1000
)
)
;
value
=
value
+
T
(
1000
);
this
->
PermutedPortal
.
Set
(
index
,
value
);
}
...
...
@@ -117,7 +117,7 @@ VTKM_CONT void CheckInPlaceResult(PortalType portal)
if
(
permutedIndex
%
2
==
0
)
{
// This index was part of the permuted array; has a value changed
T
expectedValue
=
static_cast
<
T
>
(
TestValue
(
permutedIndex
,
T
())
+
T
(
1000
)
)
;
T
expectedValue
=
TestValue
(
permutedIndex
,
T
())
+
T
(
1000
);
T
retrievedValue
=
portal
.
Get
(
permutedIndex
);
VTKM_TEST_ASSERT
(
test_equal
(
expectedValue
,
retrievedValue
),
"Permuted set unexpected value."
);
}
...
...
vtkm/worklet/testing/UnitTestWorkletMapField.cxx
View file @
efbc8d68
...
...
@@ -41,7 +41,7 @@ public:
{
this
->
RaiseError
(
"Got wrong input value."
);
}
out
=
static_cast
<
T
>
(
in
-
T
(
100
)
)
;
out
=
in
-
T
(
100
);
if
(
!
test_equal
(
inout
,
TestValue
(
workIndex
,
T
())
+
T
(
100
)))
{
this
->
RaiseError
(
"Got wrong in-out value."
);
...
...
@@ -49,7 +49,7 @@ public:
// We return the new value of inout. Since _3 is both an arg and return,
// this tests that the return value is set after updating the arg values.
return
static_cast
<
T
>
(
inout
-
T
(
100
)
)
;
return
inout
-
T
(
100
);
}
template
<
typename
T1
,
typename
T2
,
typename
T3
>
...
...
@@ -75,7 +75,7 @@ struct DoStaticTestWorklet
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
inputArray
[
index
]
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
T
(
100
)
)
;
inputArray
[
index
]
=
TestValue
(
index
,
T
())
+
T
(
100
);
}
vtkm
::
cont
::
ArrayHandle
<
T
>
inputHandle
=
vtkm
::
cont
::
make_ArrayHandle
(
inputArray
,
ARRAY_SIZE
);
...
...
@@ -123,7 +123,7 @@ struct DoVariantTestWorklet
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
inputArray
[
index
]
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
T
(
100
)
)
;
inputArray
[
index
]
=
TestValue
(
index
,
T
())
+
T
(
100
);
}
vtkm
::
cont
::
ArrayHandle
<
T
>
inputHandle
=
vtkm
::
cont
::
make_ArrayHandle
(
inputArray
,
ARRAY_SIZE
);
...
...
vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx
View file @
efbc8d68
...
...
@@ -46,7 +46,7 @@ struct TestExecObjectWorklet
{
this
->
RaiseError
(
"Got wrong input value."
);
}
out
=
static_cast
<
T
>
(
execIn
.
Get
(
index
)
-
T
(
100
)
)
;
out
=
execIn
.
Get
(
index
)
-
T
(
100
);
execOut
.
Set
(
index
,
out
);
}
};
...
...
@@ -68,7 +68,7 @@ struct DoTestWorklet
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
inputArray
[
index
]
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
T
(
100
)
)
;
inputArray
[
index
]
=
TestValue
(
index
,
T
())
+
T
(
100
);
}
vtkm
::
cont
::
ArrayHandleIndex
counting
(
ARRAY_SIZE
);
...
...
vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx
View file @
efbc8d68
...
...
@@ -76,7 +76,7 @@ struct DoTestWholeArrayWorklet
for
(
vtkm
::
Id
index
=
0
;
index
<
ARRAY_SIZE
;
index
++
)
{
inArray
[
index
]
=
TestValue
(
index
,
T
());
inOutArray
[
index
]
=
static_cast
<
T
>
(
TestValue
(
index
,
T
())
+
T
(
100
)
)
;
inOutArray
[
index
]
=
TestValue
(
index
,
T
())
+
T
(
100
);
}
vtkm
::
cont
::
ArrayHandle
<
T
>
inHandle
=
vtkm
::
cont
::
make_ArrayHandle
(
inArray
,
ARRAY_SIZE
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment