Commit Graph

472 Commits

Author SHA1 Message Date
Will Usher
a6078a6413 It looks like the type here should actually be vtkm::Id
Encountered this causing a compilation error when trying to run some
benchmarks with FloatDefault input and values since it was using the
wrong type for some iterators iirc and couldn't cast to the vtkm::Id
type. This should fix that by using the correct type for the output
portal.
2015-07-08 14:01:30 -06:00
Robert Maynard
faba821809 Merge branch 'remove_unneeded_helpers' into 'master'
Remove unneeded helpers from the TestingDeviceAdapter.

See merge request !74
2015-07-08 12:34:38 -04:00
Robert Maynard
ffa1e4ed50 Remove unneeded helpers from the TestingDeviceAdapter. 2015-07-08 10:58:20 -04:00
Kenneth Moreland
79960e8383 Merge branch 'vector-analysis' into 'master'
Vector Analysis

Add basic vector analysis methods.

See merge request !73
2015-07-07 17:38:48 -04:00
Kenneth Moreland
3350c0da38 Add basic vector analysis methods. 2015-07-07 14:25:58 -06:00
Kenneth Moreland
d0508264fa Fix typo TypeTraitsUnkownTag -> TypeTraitsUnknownTag
There was a simple typo in the tag. Since the tag is basically a
placeholder for an invalid value, the typo was missed.
2015-07-07 10:23:10 -06:00
Kenneth Moreland
fd1a36dce7 Remove cast warnings in UnitTestMatrix.
Unlike most compilers, MSVC will give conversion warnings when
implicitly converting a 32-bit int to a 32-bit float because the
mantissa can potentially drop some of the lower order bits of large
ints. Use static casts to (hopefully) remove the warnings.
2015-07-07 09:54:19 -06:00
Kenneth Moreland
dc91446972 Fix issue with Intel compiler removing loop in MatrixTranspose
For some reason when optimization was on with the Intel compiler it
was removing the loop in some instances of the templated MatrixTranspose
function. I inserted an empty assembly statement that prevents the
compiler from removing the loop but does not add any actual code. That
seems to fix the problem.
2015-07-06 14:31:43 -06:00
Kenneth Moreland
1c2f33926b Use test_equal for comparisons in UnitTestMatrix.
Some compilers, particularly icc, do strange things to literals during
optimization that makes them slightly different. This change was originally
to fix a testing issue with the icc build. It is not actually fixing the
problem, but I am leaving in the change because it is good practice.
2015-07-06 12:23:33 -06:00
Kenneth Moreland
eb870fb045 Fix ICC warning about unused member method
Specifically a conversion operator was not being used in the StringInt
class of UnitTestArrayHandleCounting. Because it was in an anonymous
namespace that could not be used outside of the file, ICC warned about
it. Rather than remove the method, which could cause confusion later,
gave the namespace a name so the compiler assumes that the class could
potentially be used somewhere else.
2015-07-06 10:40:08 -06:00
Kenneth Moreland
4fc3626712 Fix compiler directives for icc
The Intel icc compiler tries to pretend it is gcc, but it sometimes
behaves differently. Add more explicit checks for what compiler is
being used.
2015-07-06 10:35:06 -06:00
Kenneth Moreland
abcc6da52f Add Matrix class.
The matrix class is for thread-local matrix computations. It is intended
to store things like tensors or geometric transforms.
2015-07-02 11:20:21 -06:00
Robert Maynard
ef33573d62 Remove unreferenced local variable 2015-07-01 08:33:35 -04:00
Robert Maynard
804166cdba Correct warning C4800 from msvc ( forcing value to bool 'true' or 'false' ). 2015-07-01 08:18:22 -04:00
Kenneth Moreland
0b6d351a49 Enable the Vec negate operator only if the component is negatable.
Robert Maynard pointed out that the unary operator- I added to Vec could
lead to undesirable behavior for vectors of unsigned integer types. This
changed makes the definition of operator- conditional on the component
type being either a signed integer or a float type.

I also added some more actual testing of the new operator.
2015-06-30 14:55:16 -06:00
Kenneth Moreland
b5398babc5 Remove overloads for scalar to Vec multiplications
Previously, the templated Vec classes had overloaded multiply operators
to allow it to be multiplied by any basic type (float, double, int,
long, char, etc.). This was there to make it easier to multiply a vector
by a scalar without having to jump through introspection hoops for the
component types. However, using them almost always resulted in a
conversion warning on some type of compiler, so I think it is easier
just to remove them.
2015-06-30 09:23:18 -06:00
Kenneth Moreland
f426b16daf Fix an issue where the remainder function not well supported on MSVC
Also fix a minor conversion warning.
2015-06-30 08:50:02 -06:00
Robert Maynard
21205d0785 Merge branch 'degagore_warnings' into 'master'
Degagore warnings

See merge request !66
2015-06-30 09:45:05 -04:00
Robert Maynard
e1d1a08161 Correct casting issues ArrayHandleUniformPointCoordinates. 2015-06-30 09:21:19 -04:00
Robert Maynard
b18f59f10c Remove unused typedef in DeviceAdapterAlgorithmGeneral. 2015-06-30 08:38:25 -04:00
Robert Maynard
d12375450f Make ChooseCudaDevice only consider SM3 and above equal. 2015-06-30 08:18:16 -04:00
Robert Maynard
6af949f488 Fix warnings in ChooseCudaDevice by moving performance metric to double. 2015-06-30 08:16:42 -04:00
Kenneth Moreland
e19e0ea551 Merge branch 'mesh-simplify-changes' into 'master'
Some fixes to VertexClustering

VertexClustering previously only worked with data of a specific floating
point type (32 bit for point coordinates). Add some templates to accept
either 32 bit or 64 bit floating points for point coordintes and be a
bit more careful about implicit type conversions.

I also made some changes to conform better with the VTK-m coding
standards. The most common changes are using 2 space indentation for all
block levels, capitolizing and using camel case for all class members,
and prefixing "this->" to all use of internal class members.

See merge request !64
2015-06-29 18:14:19 -04:00
Kenneth Moreland
ba99e830ae Make sure VertexClustering grid dimensions do not exceed nDimensions
When mixing precision, it is possible for the computation to pick a grid
size greater than the requested number of dimensions. This change
ensures that you never get more dimensions than requested. (Thanks to
Chun-Ming Chen for the fix.)

The test now behaves the same way as it did before the last change.
2015-06-29 16:10:25 -06:00
Kenneth Moreland
cc8a5d35ec Some fixes to VertexClustering
VertexClustering previously only worked with data of a specific floating
point type (32 bit for point coordinates). Add some templates to accept
either 32 bit or 64 bit floating points for point coordintes and be a
bit more careful about implicit type conversions.

I also made some changes to conform better with the VTK-m coding
standards. The most common changes are using 2 space indentation for all
block levels, capitolizing and using camel case for all class members,
and prefixing "this->" to all use of internal class members.
2015-06-29 15:14:50 -06:00
Robert Maynard
99df565f85 Merge branch 'vtkm_exec_array_in' into 'master'
Implement a way to pass a portal to worklet as a parameter.

This is built ontop of the ExecutionObjectBase work, and is designed to show
other developers how they can create custom objects that are shared among
all worklets, but are passed as parameters to the worklet.

See merge request !60
2015-06-29 15:06:41 -04:00
Kenneth Moreland
ba20680728 Merge branch 'math-msvc-fix' into 'master'
Fix use of VTKM_MSVC

Fix an inappropriate use of the VTKM_MSVC macro.

See merge request !61
2015-06-29 13:46:38 -04:00
Robert Maynard
c53f61d4fd Make releasing an implicit storage resources a no-op instead of exception.
See https://gitlab.kitware.com/vtk/vtk-m/issues/16 for the full discussion.
2015-06-29 11:56:53 -04:00
Kenneth Moreland
3ab8288dc7 Fix use of VTKM_MSVC
The VTKM_MSVC is just defined if using MSVC. It is not set to any value.
There was a reference in Math.h that assumed it was set to true, which
it was not. This simple change should fix that.
2015-06-29 09:27:16 -06:00
Robert Maynard
40a2ce0645 Merge branch 'MeshSimplifyWorklets' into 'master'
Mesh simplify worklets

Vertex clustering algorithm and a AverageByKey computation are now in vtkm::worklets

See merge request !57
2015-06-29 09:49:19 -04:00
Kenneth Moreland
3b9bb5ffeb Merge branch 'math' into 'master'
Math

Adds a set of portable math functions, most of which are "expected" to be available and are typically useful. They include things like trigonometry (sin, cos, tan, etc.), floating point information (nan, finite, etc), and min/max.

See merge request !58
2015-06-27 20:29:49 -04:00
Robert Maynard
d7e85bb6ae Implement a way to pass a portal to worklet as a parameter.
This is built ontop of the ExecutionObjectBase work, and is designed to show
other developers how they can create custom objects that are shared among
all worklets, but are passed as parameters to the worklet.
2015-06-26 16:26:51 -04:00
Robert Maynard
5fa6afed2e Cleanup the worklet UnitTests. Mainly move everything into namespaces. 2015-06-26 15:52:59 -04:00
Kenneth Moreland
4a8d69ca66 Add CUDA math test
Also fix some issues that caused the compile to fail when trying to
run some of the math functions on a CUDA device. In particular, CUDA
is picky about using a global const on a device when the const type is
not one of the basic C types.
2015-06-25 13:54:24 -06:00
Chun-Ming Chen
00382a3b8b fix warning: && with || 2015-06-25 15:33:25 -04:00
Kenneth Moreland
787feacf1e Change math test to run in execution environment
This change is to do the test on a CUDA device.
2015-06-25 12:07:15 -06:00
Jimmy
0fd5556cae Move DataSet related codes in VertexClustering to UnitTestVertexClustering 2015-06-25 13:16:16 -04:00
Jimmy
05b550b574 change double to vtkm::Float64 2015-06-25 11:46:28 -04:00
Jimmy
7d1e3f8b1d set the invlid_id to -1, so the Id3Less will have to take care of this. 2015-06-25 11:43:29 -04:00
Jimmy
e234f29148 remove vc_debug 2015-06-25 10:52:02 -04:00
Jimmy
314c1b9da2 remove if 0 blocks in averageByKey 2015-06-25 10:38:34 -04:00
Jimmy
a5a4fb36ad remove internal namespace to expose AverageByKey 2015-06-25 10:37:11 -04:00
Robert Maynard
2d7e44de62 Make it so that we actually use cuda texture memory loads.
By mistake the cuda texture memory load code was not being used, so correct
that issue and allow loading of vtkm::Vec and primitive types. Currently
the only issue is loading int8/int16 uint8/uint16 through texture memory.
2015-06-25 08:21:49 -04:00
Robert Maynard
47f9874132 Extend the array handle testing to be done on a per device basis.
Now we test ArrayHandle with all the vtkm types to make sure all the
transfer logic / access logic works for all T types.
2015-06-25 08:21:49 -04:00
Kenneth Moreland
b642338465 Fix copyright statement in UnitTestMath.cxx. 2015-06-24 16:31:57 -06:00
Kenneth Moreland
7e2feb7e52 Add trig functions to math. 2015-06-24 16:27:07 -06:00
Kenneth Moreland
c7ad5207a3 Add sign-based math functions. 2015-06-24 15:40:18 -06:00
Jimmy
03823d96a1 Fix VertexClustering and missing iteratortype in ArrayHandleImplicit.h for CUDA 2015-06-24 16:35:11 -04:00
Jimmy
73564d7a2c Fix VortexClustering for thrust backend (partially) 2015-06-24 15:52:56 -04:00
Jimmy
3c25024781 hide debug / benchmark outputs 2015-06-24 15:13:16 -04:00