Commit Graph

11439 Commits

Author SHA1 Message Date
Kenneth Moreland
2adb4a83a8 Merge branch 'no-portal-get-iterator' 2014-09-09 11:19:39 -06:00
Kenneth Moreland
904f582103 Properly check "raw" iterators in MSVC.
For MSVC we use the non-portable wrapper stdext::checked_array_iterators
because the compiler insists on it for safety. When we check to make sure
our templates are giving us raw pointers, we have to check for this wrapper
instead of the raw pointer itself.
2014-09-09 10:36:38 -06:00
Kenneth Moreland
8839e615e6 Remove GetIteratorBegin/End from all ArrayPortal classes.
Replace them (and their use) with the new ArrayPortalToIterators
functionality.
2014-09-08 14:59:11 -06:00
Kenneth Moreland
9bbbaecab6 Add ArrayPortalToIterators functionality.
This moves the ability to get an iterator from an array portal out of
the portal itself. The next step is to move the GetIteratorBegin/End out
of ArrayPortal. This should make the implemenation a bit cleaner.
2014-09-08 13:39:58 -06:00
Kenneth Moreland
fdf3543c36 Merge branch 'msvc-unsafe-warnings' 2014-08-12 16:09:26 -06:00
Kenneth Moreland
6fb33f88af Use MSVC checked_array_iterator to suppress warnings and add checks.
MSVC likes to warn about using raw pointers as iterators in generic
algorithms because they have been known to lead to problems. When
compiling with that compiler, wrap raw pointers in
stdext::checked_array_pointer to suppress the error and also add a bit
more checking.
2014-08-12 15:25:45 -06:00
Kenneth Moreland
fe4d26210c Turn off unsafe function warning for CMake-generated test code.
The CMake template for the source file that contains the main function for
tests uses functions that MSVC considers unsafe. We want to check for these
conditions but have no control over the CMake-generated test code (which
looks right anyway). This disables the warning specifically for those
source files but nothing else.
2014-08-12 14:00:24 -06:00
Kenneth Moreland
85664c8ed9 Merge remote-tracking branch 'msvc-warnings' 2014-07-17 17:05:45 -06:00
Kenneth Moreland
b917cf49f4 Replace CountByTwo with String Int in ArrayHandleCounting test.
I wanted to test ArrayHandleCounting with some non-standard data type.
I was using a class that looked like a number that counts by two, but
the operator behavior was not a proper group and that was causing issues.
Replaced that with a class that inefficiently represents an unsigned
integer as a string with that many characters. The inefficiency does not
matter because it is just a test.
2014-07-17 14:35:39 -06:00
Kenneth Moreland
6052ce2620 Merge branch 'update-readme' 2014-07-16 10:16:08 -06:00
Kenneth Moreland
029c278286 Update readme to include PISTON. 2014-07-16 10:15:44 -06:00
Kenneth Moreland
b66a5c706a Merge branch 'icc-fix' 2014-07-10 10:58:04 -06:00
Kenneth Moreland
9466151326 Make floating point comparison more tolerant in UnitTestDynamicArrayHandle
It appears that when the Intel compiler is optimizing, constant floating
point values can be slightly different than the same value stored in memory
and never changed. This change uses the test_equal method to compare
these floating point values that might have a slight numeric error.
2014-07-10 10:53:02 -06:00
Kenneth Moreland
4c65092322 Merge branch 'expand-function-interface' 2014-07-07 08:31:47 -06:00
Robert Maynard
d8e615b0cb Merge branch 'cdash_support' 2014-06-30 11:21:27 -04:00
Robert Maynard
1156078552 Add the correct copyright statement to CTestConfig. 2014-06-30 11:21:07 -04:00
Robert Maynard
15d43d8803 Merge branch 'cdash_support' 2014-06-27 17:06:32 -04:00
Robert Maynard
978d9b4272 Add a CDash support to vtkm. 2014-06-27 16:50:36 -04:00
Kenneth Moreland
adad702652 If pyexpander is available, run it and check the source file.
Although we cannot expect every developer to have pyexpander, for those
that do the build will automatically run it and check the expanded file
in the source code. If they match, a descriptive error is given.

We don't automatically update the file because subtle problems might
occur. It is better to alert a developer to fix the problem properly.
2014-06-26 18:26:45 -06:00
Kenneth Moreland
5fb7f63829 Replace Boost preprocessor iteration with macro expansion tool
This commit removes the usage of the boost preprocessor library to
iteratively generate templates with a variable number of parameters. It
is replaced with a template that is expanded by running it through the
pyexpander macro processing tool (http://pyexpander.sourceforge.net).

One reason for this change is to make the code easier to read. In
particular, it is difficult to understand compiler errors when they
occur deep within an iterating macro. Another reason for this change is
that the Intel compiler currently has a bug that breaks with the boost
preprocessor library.

One issue with this approach is that the macro expansion is not part of
the build process. Although open, pyexpander is not a tool most
developers will have readily installed on their system. Thus, if you
want to make changes to any of the macro code, you have to make sure
pyexpander is installed, then make changes to the input files, then
manually run pyexpander from the command line.
2014-06-25 16:03:44 -06:00
Kenneth Moreland
2f1d910eeb Merge branch 'container-to-storage' 2014-06-25 11:29:26 -06:00
Kenneth Moreland
21823500c3 Change ArrayContainerControl to Storage.
After a talk with Robert Maynard, we decided to change the name
ArrayContainerControl to Storage. There are several reasons for this
change.

1. The name ArrayContainerControl is unwieldy. It is long, hard for
humans to parse, and makes for long lines and wraparound. It is also
hard to distinguish from other names like ArrayHandleFoo and
ArrayExecutionManager.

2. The word container is getting overloaded. For example, there is a
SimplePolymorphicContainer. Container is being used for an object that
literally acts like a container for data. This class really manages
data.

3. The data does not necessarily have to be on the control side.
Implicit containers store the data nowhere. Derivative containers might
have all the real data on the execution side. It is possible in the
future to have storage on the execution environment instead of the
control (think interfacing with a simulator on the GPU).

Storage is not a perfect word (what does implicit storage really mean?),
but its the best English word we came up with.
2014-06-24 09:58:32 -06:00
Robert Maynard
b2584f92a6 Merge branch 'windows_function_interface' 2014-06-20 16:55:12 -04:00
Robert Maynard
9f3d68c2c0 MSVC 2010 has troubles with < operators in the middle of enable_if.
Moved the code over to using mpl::less to solve the problem.
2014-06-20 16:53:27 -04:00
Kenneth Moreland
19f16951a3 Merge branch 'count-vectors' 2014-06-19 11:13:06 -06:00
Kenneth Moreland
9573aa2764 Fix a test object to handle changes in the counting array handle 2014-06-19 11:12:54 -06:00
Kenneth Moreland
8ce0a268ea Minor change that allows vector types to be used in ArrayHandleCounting.
Probably not a lot of use for this, but a simple implementation that
should not affect anything else.
2014-06-18 23:14:39 -06:00
Kenneth Moreland
01f6b0a42b Merge branch 'remove-copy-into' 2014-06-11 16:16:21 -06:00
Kenneth Moreland
a789d54e99 Remove CopyInto method from array-support classes
It was originally put there to support CopyInto in ArrayHandle, but that
has already been removed. It really only makes sense for trivial
examples and testing code, and it sometimes causes complications with
coding.
2014-06-11 16:15:46 -06:00
Kenneth Moreland
e9ba448e3f Merge branch 'correct-header-wrappers' 2014-06-11 10:46:09 -06:00
Kenneth Moreland
2bd9632a36 Fix testing versions.
There is a special version of the testing methods for use in the control
environment that handles execeptions that can be thrown there. There are
tests to make sure you are using the correct version of the testing
framework, but it was broken until the last commit. Now that it's fixed,
here are two places where the wrong testing method was used.
2014-06-11 10:45:36 -06:00
Kenneth Moreland
ed9cf46a17 Make sure all header wrapper macros start with vtk_m_ rather than vtkm_
We made this change a while ago to help with completion in IDEs.
(Completion was matching a bunch of wrapper macros that were almost
never used anywhere.) Most of the changes are in comments, but there are
a few bad macro definitions.
2014-06-11 10:43:36 -06:00
Kenneth Moreland
9f7fcaf579 Merge branch 'windows-fixes' 2014-06-10 16:16:54 -06:00
Kenneth Moreland
fb4f550918 Fix MSVC compiler warnings.
Most of the warnings were about losing precision in conversions.
2014-06-10 16:09:28 -06:00
Kenneth Moreland
155a7eba54 Add special types for Tuples of size 0 and 1.
Mostly this is was motivated by the windows compiler complaining about a
zero-length array in Tuple<T,0>.
2014-06-10 15:33:39 -06:00
Kenneth Moreland
95edbdf0ab Include correct files for timing on windows. 2014-06-10 13:12:42 -06:00
Kenneth Moreland
7ad3bb0683 Remove alignment attribute from Extent struct.
See commit 763949351f8aec10896f7edf62839f261a25e2fd for an explanation on
why we are no longer using alignment attributes.
2014-06-10 13:00:26 -06:00
Kenneth Moreland
6d52c878c2 Merge branch 'timer' 2014-06-10 12:55:43 -06:00
Kenneth Moreland
50a5210a7d Add Timer class.
Helpful for safely timing parallel code across different devices.
2014-06-10 12:54:18 -06:00
Kenneth Moreland
5109cd40a3 Merge branch 'exec-cmake' 2014-06-10 11:36:40 -06:00
Kenneth Moreland
b012668345 Add a FunctorBase class for scheduling non-worklets
Whenever creating a functor to be launched in the execution environment
using the device adapter Schedule algorithm, you had to also create a
couple of methods to handle error message buffers. For convenience, lots
of code started to just inherit from WorkletBase. Although this worked,
it was a misnomer (and might cause problems in the future if worklets
later require different things from its base). To get around this
problem, add a FunctorBase class that is intended to be used as the
superclass to functors called with Schedule.
2014-06-10 11:35:13 -06:00
Kenneth Moreland
3ed7093945 Add test for ErrorMessageBuffer 2014-06-10 11:21:55 -06:00
Kenneth Moreland
b692cb3d89 Add CMake configuration for execution environment code 2014-06-10 11:14:11 -06:00
Kenneth Moreland
8f8ee4500e Merge branch 'undefined-flags' 2014-06-09 16:32:45 -06:00
Kenneth Moreland
744d97229f Changed undefined macros to something other than zero.
Previously, VTKM_DEVICE_ADAPTER_UNDEFINED and
VTKM_ARRAY_CONTAINER_CONTROL_UNDEFINED were set to 0. The problem is
that if someone set VTKM_DEVICE_ADAPTER or VTKM_ARRAY_CONTAINER_CONTROL
to something invalid, that would test positive when compared to 0. Thus,
you get an error about not defining the default when in fact the problem
is setting an invalid flag.

This change makes the undefined constants -1 so that the comparison will
fail unless the macro is actually properly set.
2014-06-09 16:32:02 -06:00
Kenneth Moreland
da68debbf3 Merge branch 'dynamic-point-coordinates' 2014-06-09 11:13:17 -06:00
Kenneth Moreland
7b3ea2345d Add a helper class to determine composite array types
Getting the type right for ArrayHandleCompositeVector can be a bit
tricky. It is expressed in a somewhat strange function signature format
and you have to extract the right component type for the return. This
adds an ArrayHandleCompositeVectorType that makes it easier (although no
less verbose).
2014-06-06 16:05:55 -06:00
Kenneth Moreland
e706a52cc8 Add documentation for FunctionInterface and make_FunctionInterface. 2014-06-06 15:20:50 -06:00
Kenneth Moreland
29973facf1 Merge branch 'config-file' 2014-05-27 19:58:02 -06:00
Kenneth Moreland
f157453e0e Create and install CMake configure files for external projects. 2014-05-22 15:20:41 -06:00