Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VTK-m
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sreekanth Arikatla
VTK-m
Commits
9ca4d36e
Commit
9ca4d36e
authored
Nov 29, 2018
by
Robert Maynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update benchmarking to work with ArrayHandleVariant
parent
f63be1ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
38 deletions
+19
-38
benchmarking/BenchmarkFieldAlgorithms.cxx
benchmarking/BenchmarkFieldAlgorithms.cxx
+14
-18
benchmarking/BenchmarkFilters.cxx
benchmarking/BenchmarkFilters.cxx
+1
-13
benchmarking/BenchmarkTopologyAlgorithms.cxx
benchmarking/BenchmarkTopologyAlgorithms.cxx
+4
-7
No files found.
benchmarking/BenchmarkFieldAlgorithms.cxx
View file @
9ca4d36e
...
...
@@ -22,8 +22,8 @@
#include <vtkm/VectorAnalysis.h>
#include <vtkm/cont/ArrayHandle.h>
#include <vtkm/cont/ArrayHandleVariant.h>
#include <vtkm/cont/CellSetStructured.h>
#include <vtkm/cont/DynamicArrayHandle.h>
#include <vtkm/cont/ImplicitFunctionHandle.h>
#include <vtkm/cont/Timer.h>
...
...
@@ -309,7 +309,6 @@ struct ValueTypes : vtkm::ListTagBase<vtkm::Float32, vtkm::Float64>
struct
InterpValueTypes
:
vtkm
::
ListTagBase
<
vtkm
::
Float32
,
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>>
{
};
using
StorageListTag
=
::
vtkm
::
cont
::
StorageListTagBasic
;
/// This class runs a series of micro-benchmarks to measure
/// performance of different field operations
...
...
@@ -318,14 +317,11 @@ class BenchmarkFieldAlgorithms
{
using
StorageTag
=
vtkm
::
cont
::
StorageTagBasic
;
using
Algorithm
=
vtkm
::
cont
::
DeviceAdapterAlgorithm
<
DeviceAdapterTag
>
;
using
Timer
=
vtkm
::
cont
::
Timer
<
DeviceAdapterTag
>
;
using
ValueDynamicHandle
=
vtkm
::
cont
::
DynamicArrayHandleBase
<
ValueTypes
,
StorageListTag
>
;
using
InterpDynamicHandle
=
vtkm
::
cont
::
DynamicArrayHandleBase
<
InterpValueTypes
,
StorageListTag
>
;
using
IdDynamicHandle
=
vtkm
::
cont
::
DynamicArrayHandleBase
<
vtkm
::
TypeListTagIndex
,
StorageListTag
>
;
using
ValueVariantHandle
=
vtkm
::
cont
::
ArrayHandleVariantBase
<
ValueTypes
>
;
using
InterpVariantHandle
=
vtkm
::
cont
::
ArrayHandleVariantBase
<
InterpValueTypes
>
;
using
IdVariantHandle
=
vtkm
::
cont
::
ArrayHandleVariantBase
<
vtkm
::
TypeListTagIndex
>
;
private:
template
<
typename
Value
>
...
...
@@ -402,9 +398,9 @@ private:
VTKM_CONT
vtkm
::
Float64
operator
()()
{
Value
Dynamic
Handle
dstocks
(
this
->
StockPrice
);
Value
Dynamic
Handle
dstrikes
(
this
->
OptionStrike
);
Value
Dynamic
Handle
doptions
(
this
->
OptionYears
);
Value
Variant
Handle
dstocks
(
this
->
StockPrice
);
Value
Variant
Handle
dstrikes
(
this
->
OptionStrike
);
Value
Variant
Handle
doptions
(
this
->
OptionYears
);
vtkm
::
cont
::
ArrayHandle
<
Value
>
callResultHandle
,
putResultHandle
;
const
Value
RISKFREE
=
0.02
f
;
...
...
@@ -488,9 +484,9 @@ private:
vtkm
::
cont
::
ArrayHandle
<
Value
>
temp1
;
vtkm
::
cont
::
ArrayHandle
<
Value
>
temp2
;
vtkm
::
cont
::
DynamicArrayHandleBase
<
MathTypes
,
StorageListTag
>
dinput
(
this
->
InputHandle
);
Value
Dynamic
Handle
dtemp1
(
temp1
);
Value
Dynamic
Handle
dtemp2
(
temp2
);
vtkm
::
cont
::
ArrayHandleVariantBase
<
MathTypes
>
dinput
(
this
->
InputHandle
);
Value
Variant
Handle
dtemp1
(
temp1
);
Value
Variant
Handle
dtemp2
(
temp2
);
Timer
timer
;
...
...
@@ -564,7 +560,7 @@ private:
{
using
MathTypes
=
vtkm
::
ListTagBase
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>>
;
vtkm
::
cont
::
DynamicArrayHandleBase
<
MathTypes
,
StorageListTag
>
dinput
(
this
->
InputHandle
);
vtkm
::
cont
::
ArrayHandleVariantBase
<
MathTypes
>
dinput
(
this
->
InputHandle
);
vtkm
::
cont
::
ArrayHandle
<
Value
,
StorageTag
>
result
;
...
...
@@ -666,9 +662,9 @@ private:
VTKM_CONT
vtkm
::
Float64
operator
()()
{
Interp
Dynamic
Handle
dfield
(
this
->
FieldHandle
);
Interp
Dynamic
Handle
dweight
(
this
->
WeightHandle
);
Id
Dynamic
Handle
dedges
(
this
->
EdgePairHandle
);
Interp
Variant
Handle
dfield
(
this
->
FieldHandle
);
Interp
Variant
Handle
dweight
(
this
->
WeightHandle
);
Id
Variant
Handle
dedges
(
this
->
EdgePairHandle
);
vtkm
::
cont
::
ArrayHandle
<
Value
>
result
;
Timer
timer
;
...
...
benchmarking/BenchmarkFilters.cxx
View file @
9ca4d36e
...
...
@@ -147,8 +147,6 @@ using FieldTypes = vtkm::ListTagBase<vtkm::Float32,
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>>
;
using
FieldStorage
=
vtkm
::
ListTagBase
<
vtkm
::
cont
::
StorageTagBasic
>
;
using
StructuredCellList
=
vtkm
::
ListTagBase
<
vtkm
::
cont
::
CellSetStructured
<
3
>>
;
using
UnstructuredCellList
=
...
...
@@ -158,26 +156,16 @@ using AllCellList = vtkm::ListTagJoin<StructuredCellList, UnstructuredCellList>;
using
CoordinateList
=
vtkm
::
ListTagBase
<
vtkm
::
Vec
<
vtkm
::
Float32
,
3
>
,
vtkm
::
Vec
<
vtkm
::
Float64
,
3
>>
;
using
CoordinateStorage
=
vtkm
::
ListTagBase
<
vtkm
::
cont
::
ArrayHandleUniformPointCoordinates
::
StorageTag
,
vtkm
::
cont
::
StorageTagBasic
>
;
using
DeviceAdapters
=
vtkm
::
ListTagBase
<
Device
>
;
class
BenchmarkFilterPolicy
:
public
vtkm
::
filter
::
PolicyBase
<
BenchmarkFilterPolicy
>
{
public:
using
FieldTypeList
=
FieldTypes
;
using
FieldStorageList
=
FieldStorage
;
using
StructuredCellSetList
=
StructuredCellList
;
using
UnstructuredCellSetList
=
UnstructuredCellList
;
using
AllCellSetList
=
AllCellList
;
using
CoordinateTypeList
=
CoordinateList
;
using
CoordinateStorageList
=
CoordinateStorage
;
using
DeviceAdapterList
=
DeviceAdapters
;
};
// Class implementing all filter benchmarks:
...
...
@@ -852,7 +840,7 @@ public:
}
};
// Get the number of components in a
DynamicArrayHandle
, ArrayHandle, or Field's
// Get the number of components in a
ArrayHandleVariant
, ArrayHandle, or Field's
// ValueType.
struct
NumberOfComponents
{
...
...
benchmarking/BenchmarkTopologyAlgorithms.cxx
View file @
9ca4d36e
...
...
@@ -136,7 +136,6 @@ struct ValueTypes
:
vtkm
::
ListTagBase
<
vtkm
::
UInt32
,
vtkm
::
Int32
,
vtkm
::
Int64
,
vtkm
::
Float32
,
vtkm
::
Float64
>
{
};
using
StorageListTag
=
::
vtkm
::
cont
::
StorageListTagBasic
;
/// This class runs a series of micro-benchmarks to measure
/// performance of different field operations
...
...
@@ -145,11 +144,9 @@ class BenchmarkTopologyAlgorithms
{
using
StorageTag
=
vtkm
::
cont
::
StorageTagBasic
;
using
Algorithm
=
vtkm
::
cont
::
DeviceAdapterAlgorithm
<
DeviceAdapterTag
>
;
using
Timer
=
vtkm
::
cont
::
Timer
<
DeviceAdapterTag
>
;
using
Value
DynamicHandle
=
vtkm
::
cont
::
DynamicArrayHandleBase
<
ValueTypes
,
StorageListTag
>
;
using
Value
VariantHandle
=
vtkm
::
cont
::
ArrayHandleVariantBase
<
ValueTypes
>
;
private:
template
<
typename
T
,
typename
Enable
=
void
>
...
...
@@ -245,7 +242,7 @@ private:
vtkm
::
cont
::
CellSetStructured
<
3
>
cellSet
;
cellSet
.
SetPointDimensions
(
vtkm
::
Id3
(
CUBE_SIZE
,
CUBE_SIZE
,
CUBE_SIZE
));
Value
Dynamic
Handle
dinput
(
this
->
InputHandle
);
Value
Variant
Handle
dinput
(
this
->
InputHandle
);
vtkm
::
cont
::
ArrayHandle
<
Value
,
StorageTag
>
result
;
Timer
timer
;
...
...
@@ -324,7 +321,7 @@ private:
vtkm
::
cont
::
CellSetStructured
<
3
>
cellSet
;
cellSet
.
SetPointDimensions
(
vtkm
::
Id3
(
CUBE_SIZE
,
CUBE_SIZE
,
CUBE_SIZE
));
Value
Dynamic
Handle
dinput
(
this
->
InputHandle
);
Value
Variant
Handle
dinput
(
this
->
InputHandle
);
vtkm
::
cont
::
ArrayHandle
<
Value
,
StorageTag
>
result
;
Timer
timer
;
...
...
@@ -372,7 +369,7 @@ private:
cellSet
.
SetPointDimensions
(
vtkm
::
Id3
(
CUBE_SIZE
,
CUBE_SIZE
,
CUBE_SIZE
));
vtkm
::
cont
::
ArrayHandle
<
vtkm
::
IdComponent
,
StorageTag
>
result
;
Value
Dynamic
Handle
dinput
(
this
->
InputHandle
);
Value
Variant
Handle
dinput
(
this
->
InputHandle
);
Timer
timer
;
...
...
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