Commit Graph

5277 Commits

Author SHA1 Message Date
Erik Hofman
2c2a57f368 Addd support for AVX, 4 double precision operations in one go 2016-12-21 09:04:46 +01:00
Erik Hofman
4ea1326126 A better MSVC fix and code speedups 2016-12-20 09:54:19 +01:00
Erik Hofman
09b44ac68a MSVC compiler fix (hopefully) 2016-12-19 18:37:52 +01:00
Erik Hofman
a48ab434ab Convert more code to SIMD 2016-12-19 15:58:57 +01:00
Florent Rougon
d39a56d4fb Add missing include: <cctype> for unary std::islower()
Thanks to Ron H. for the report.
2016-12-18 11:02:01 +01:00
Erik Hofman
892579456d add SSE support for the C compiler (gcc and clang) 2016-12-18 09:40:38 +01:00
Erik Hofman
4dde1d365c MSVC 2013+ for 64-bit automatically sets /arch:SSE2 and doesn't recognise te option 2016-12-17 10:50:19 +01:00
James Turner
2f21b582cd Canvas image fill and source rect setters.
C++ code can set the fill and source rect directly.
2016-12-16 19:14:44 +00:00
James Turner
b29536f8b7 Set Canvas element transforms from C++
Also allow transforms to be disabled.
2016-12-16 19:14:44 +00:00
James Turner
039f9920db Direct rect support. 2016-12-16 19:14:44 +00:00
James Turner
7c254e9c04 Native SVG path-data parsing in the Canvas.
This substantially cuts down the amount of properties needed when
importing SVG elements into Canvas paths.
2016-12-16 19:14:44 +00:00
Erik Hofman
35a115bfd4 Fix a stupid mistake and move hsum_ps_sse to shVector.c 2016-12-16 16:01:59 +01:00
Erik Hofman
70dd9d35b1 Also accelerate SHVector3 using SIMD 2016-12-16 15:12:53 +01:00
Erik Hofman
31e3cf06fb Accelerate SHVector4 and SHMatrix3x3 operations using SIMD 2016-12-16 14:54:24 +01:00
Erik Hofman
175eddd1fa Add the proper SSE options to Clang too 2016-12-16 11:05:03 +01:00
Erik Hofman
fe73247b82 Really use _mm_setzero_ps9) instead 2016-12-16 11:04:49 +01:00
Erik Hofman
203db3d095 Enable SSE and SSE2 by default 2016-12-16 10:49:44 +01:00
James Turner
8c4695b991 Fix duplicate variants in packages. 2016-12-15 17:37:32 +00:00
James Turner
a2b111bb09 Bugfix: reject dubious paths in HTTP repos.
This avoids a malicious repository writing to files outside the local
storage root.
2016-12-15 17:37:28 +00:00
James Turner
2a1542d544 Helper for parsing CSS/SVG strings. 2016-12-15 17:37:25 +00:00
Erik Hofman
e5b51677c5 MacOS fix 2016-12-15 13:11:31 +01:00
Erik Hofman
f9450d136d Minor speedups in small tweaks 2016-12-15 09:57:10 +01:00
Erik Hofman
0586cb62c3 Fix the pink-sky bug, don't initilize the vector with (z,y,z,w) but use the proper (x,y,z,w) instead 2016-12-15 09:56:52 +01:00
Erik Hofman
8fee04b32b Generalize the code to be able to test integers too 2016-12-14 11:05:56 +01:00
Erik Hofman
04e16c95e2 Consolidate some code, exlicitly use intrinsics (instead of the usual math operators): this fixes a compiler bug for integers and add some SSE4.1 accelerations for integers 2016-12-14 11:05:31 +01:00
Erik Hofman
e257dbe6ed accelerate float rotation_matrix and fix a bug for double rotation_matrix 2016-12-14 11:03:32 +01:00
Erik Hofman
abf78f8e31 Make absolutely sure the unions are 16-bytes aligned, move more setters and min() and max() to the simd implementation and add horizontal SIMD add functions for magnitude2 and dot 2016-12-12 20:27:07 +01:00
Stuart Buchanan
da13bd9f04 Fix minor compiler warnings 2016-12-10 16:00:28 +00:00
Alessandro Menti
86fb1ed00f BoostTestTargets.cmake: fix a wrong include test
BoostTestTargets.cmake requires the CMake-configurable form of the Boost
test framework to be used (i.e. "#include <BoostTestTargetConfig.h>"), and
checks each test source code file for this, outputting a warning in case
this requirement is not met.

Unfortunately, a conditional in the check is badly specified (the CMake
variable syntax is not followed), so the warning is emitted even when it
should not be.

This patch fixes this bug and restores the correct behavior.

Submitted upstream at https://github.com/rpavlik/cmake-modules/pull/44
2016-12-08 11:47:18 +01:00
Erik Hofman
56fb81dc03 Hopefuly the last MSVC fix 2016-12-08 09:39:45 +01:00
Erik Hofman
343ce57468 Tupe conversion is evil, don't allow it 2016-12-08 01:02:44 +01:00
Erik Hofman
3e52e37181 remove explicit, it looks like SMVC chokes on it 2016-12-07 13:22:17 +01:00
Erik Hofman
e768553a4a Replace auto_ptr with unique_ptr 2016-12-07 11:03:49 +01:00
Erik Hofman
b74d1a8351 Add some more accelerated functions (dot, magnitude, matrix transpose), allow simd_t4 with non mathcing elements to be assigned and a bunch of fixes. Make sure the code compiles when SSE is not available. 2016-12-07 10:00:02 +01:00
James Turner
801d8c4af5 Revert recursive listeners for the moment.
Want to verify this is the cause of crashes inside the property code,
since if it's not we have a much bigger problem.

This means all listeners are recursive, with a parent-chain walk on each
setValue call, as has been the case since 'forever'.
2016-12-05 12:57:29 +00:00
Florent Rougon
3a4693803b strutils: new functions stripTrailingNewlines() and stripTrailingNewlines_inplace() 2016-12-04 22:41:12 +01:00
Florent Rougon
79f0d3356e Convert strutils_test.cxx to use the SG test macros instead of BOOST 2016-12-04 22:41:12 +01:00
Florent Rougon
6a1bf02ddb Use appropriate test macros in parse_color_test.cxx and state_machine_test.cxx
- osg::Vec4 objects can't be output to a stream -> use the _NOSTREAM
  variant of the test macro.

- ditto for the NULL... thing -> use SG_CHECK_IS_NULL().
2016-12-04 22:41:12 +01:00
Florent Rougon
6662800deb Expand the test macros framework
- Add an _NOSTREAM variant for each macro (except for SG_TEST_FAIL, that
  doesn't take any argument, and for SG_VERIFY, which doesn't attempt to
  print its argument to a stream---doesn't sound very useful). So, if a
  and b can be output to a stream (without any undesirable side effect,
  of course), use for instance SG_CHECK_EQUAL(a, b); otherwise, use
  SG_CHECK_EQUAL_NOSTREAM(a, b).

- Add test macros SG_CHECK_IS_NULL, SG_CHECK_IS_NULL_NOSTREAM,
  SG_CHECK_IS_NOT_NULL and SG_CHECK_IS_NOT_NULL_NOSTREAM.

- Add a few comments.
2016-12-04 22:41:04 +01:00
Florent Rougon
c9bb6102c0 Test macros: add parentheses around arguments 2016-12-04 21:22:43 +01:00
Florent Rougon
90479419cc Add test macros: SG_CHECK_NE, SG_CHECK_LT, SG_CHECK_LE, SG_CHECK_GT, SG_CHECK_GE 2016-12-04 21:09:39 +01:00
Florent Rougon
b4178ae888 Test macros: be more rigorous and consistent
- Because of possible operator overloading, make SG_CHECK_EQUAL(a, b)
  fail if, and only if (a) == (b) is false (testing if (a) != (b) for
  this macro is not correct in general).

- For clarity and consistency, change the messages printed when some
  tests fail: SG_VERIFY(some_test) prints 'failed: some_test' (okay),
  but SG_CHECK_EQUAL(a, b) used to print 'failed: a != b', which is
  inconsistent. Instead, print: 'failed: a == b' because this is what we
  know that failed (again, because of possible operator overloading,
  pretending we know the the logical value of (a != b) after testing
  (a == b) is not correct in general.

  Similarly, the "approximate equality tests" SG_CHECK_EQUAL_EP() and
  SG_CHECK_EQUAL_EP2() now print something like 'failed: a ~= b' when
  they fail, instead of 'failed with epsilon: a != b'.
2016-12-04 21:09:39 +01:00
Florent Rougon
ab4814c916 simgear/misc/test_macros.hxx: add missing <iostream> header + minor changes
- The header is needed for std::cerr.
- Also improve the messages when tests fail (spacing, and in some cases
  an argument was missing).
- Reorder the macros a tiny bit.
2016-12-04 21:09:39 +01:00
Florent Rougon
6b16f96c8a Test macros: use defensive parentheses and std::fabs() for SG_CHECK_EQUAL_EP*
Some of the modules where I previously removed duplicate private
definitions of these macros had these features, and since they seem wise
to me, I'm applying them to the canonical SG_CHECK_EQUAL_EP() and
SG_CHECK_EQUAL_EP2() macros defined in simgear/misc/test_macros.hxx.
2016-12-04 21:09:39 +01:00
Florent Rougon
e655d41817 Rename the COMPARE, COMPARE_EP, COMPARE_EP2 and VERIFY test macros
COMPARE     -> SG_CHECK_EQUAL
COMPARE_EP  -> SG_CHECK_EQUAL_EP
COMPARE_EP2 -> SG_CHECK_EQUAL_EP2
VERIFY      -> SG_VERIFY

Also remove duplicate private definitions of these macros in test
modules, using instead those defined in simgear/misc/test_macros.hxx.
2016-12-04 21:04:40 +01:00
James Turner
b5c1902a2d Tweaks to recursive listener behaviour 2016-12-03 14:09:56 +00:00
James Turner
d088259739 Add aliased listener test, disabled for now. 2016-12-02 17:15:11 +00:00
James Turner
d8acf44a3a Revert unintended change in listener refactoring. 2016-12-02 17:14:27 +00:00
Torsten Dreyer
4664af12fa Fix lockup on Windows when polling DNS, add test 2016-12-02 14:44:38 +01:00
James Turner
7a909d0c0b Improved Package search function.
Handle or/and groups, and search variant descriptions and names.
2016-11-30 21:32:31 +00:00