Download Latest Version demo_binaries.zip (260.6 kB)
Email in envelope

Get an email when there's a new version of GoFXMath

Home / doc / DOXYGEN / html / search
Name Modified Size InfoDownloads / Week
Parent folder
variables_a.html 2015-03-08 1.0 kB
variables_a.js 2015-03-08 121 Bytes
variables_b.html 2015-03-08 1.0 kB
variables_b.js 2015-03-08 308 Bytes
variables_c.html 2015-03-08 1.0 kB
variables_c.js 2015-03-08 308 Bytes
variables_d.html 2015-03-08 1.0 kB
variables_d.js 2015-03-08 217 Bytes
search_m.png 2015-03-08 158 Bytes
search_r.png 2015-03-08 612 Bytes
searchdata.js 2015-03-08 694 Bytes
typedefs_0.html 2015-03-08 1.0 kB
typedefs_0.js 2015-03-08 133 Bytes
typedefs_1.html 2015-03-08 1.0 kB
typedefs_1.js 2015-03-08 120 Bytes
variables_0.html 2015-03-08 1.0 kB
variables_0.js 2015-03-08 900 Bytes
variables_1.html 2015-03-08 1.0 kB
variables_1.js 2015-03-08 143 Bytes
variables_2.html 2015-03-08 1.0 kB
variables_2.js 2015-03-08 134 Bytes
variables_3.html 2015-03-08 1.0 kB
variables_3.js 2015-03-08 3.2 kB
variables_4.html 2015-03-08 1.0 kB
variables_4.js 2015-03-08 144 Bytes
variables_5.html 2015-03-08 1.0 kB
variables_5.js 2015-03-08 1.8 kB
variables_6.html 2015-03-08 1.0 kB
variables_6.js 2015-03-08 290 Bytes
variables_7.html 2015-03-08 1.0 kB
variables_7.js 2015-03-08 134 Bytes
variables_8.html 2015-03-08 1.0 kB
variables_8.js 2015-03-08 452 Bytes
variables_9.html 2015-03-08 1.0 kB
variables_9.js 2015-03-08 323 Bytes
functions_d.html 2015-03-08 1.0 kB
functions_d.js 2015-03-08 1.4 kB
functions_e.html 2015-03-08 1.0 kB
functions_e.js 2015-03-08 3.4 kB
functions_f.html 2015-03-08 1.0 kB
functions_f.js 2015-03-08 1.4 kB
groups_0.html 2015-03-08 1.0 kB
groups_0.js 2015-03-08 585 Bytes
groups_1.html 2015-03-08 1.0 kB
groups_1.js 2015-03-08 122 Bytes
mag_sel.png 2015-03-08 563 Bytes
namespaces_0.html 2015-03-08 1.0 kB
namespaces_0.js 2015-03-08 81 Bytes
nomatches.html 2015-03-08 461 Bytes
pages_0.html 2015-03-08 1.0 kB
pages_0.js 2015-03-08 89 Bytes
pages_1.html 2015-03-08 1.0 kB
pages_1.js 2015-03-08 85 Bytes
related_0.html 2015-03-08 1.0 kB
related_0.js 2015-03-08 1.8 kB
related_1.html 2015-03-08 1.0 kB
related_1.js 2015-03-08 131 Bytes
related_2.html 2015-03-08 1.0 kB
related_2.js 2015-03-08 161 Bytes
search.css 2015-03-08 4.5 kB
search.js 2015-03-08 22.1 kB
search_l.png 2015-03-08 604 Bytes
functions_2.js 2015-03-08 598 Bytes
functions_3.html 2015-03-08 1.0 kB
functions_3.js 2015-03-08 229 Bytes
functions_4.html 2015-03-08 1.0 kB
functions_4.js 2015-03-08 646 Bytes
functions_5.html 2015-03-08 1.0 kB
functions_5.js 2015-03-08 1.9 kB
functions_6.html 2015-03-08 1.0 kB
functions_6.js 2015-03-08 604 Bytes
functions_7.html 2015-03-08 1.0 kB
functions_7.js 2015-03-08 1.7 kB
functions_8.html 2015-03-08 1.0 kB
functions_8.js 2015-03-08 3.4 kB
functions_9.html 2015-03-08 1.0 kB
functions_9.js 2015-03-08 1.1 kB
functions_10.html 2015-03-08 1.0 kB
functions_10.js 2015-03-08 221 Bytes
functions_11.html 2015-03-08 1.0 kB
functions_11.js 2015-03-08 14.9 kB
functions_12.html 2015-03-08 1.0 kB
functions_12.js 2015-03-08 323 Bytes
functions_a.html 2015-03-08 1.0 kB
functions_a.js 2015-03-08 1.5 kB
functions_b.html 2015-03-08 1.0 kB
functions_b.js 2015-03-08 1.0 kB
functions_c.html 2015-03-08 1.0 kB
functions_c.js 2015-03-08 3.5 kB
enumvalues_4.html 2015-03-08 1.0 kB
enumvalues_4.js 2015-03-08 284 Bytes
enumvalues_5.html 2015-03-08 1.0 kB
enumvalues_5.js 2015-03-08 151 Bytes
enumvalues_6.html 2015-03-08 1.0 kB
enumvalues_6.js 2015-03-08 147 Bytes
enumvalues_7.html 2015-03-08 1.0 kB
enumvalues_7.js 2015-03-08 143 Bytes
enumvalues_8.html 2015-03-08 1.0 kB
enumvalues_8.js 2015-03-08 143 Bytes
enumvalues_9.html 2015-03-08 1.0 kB
enumvalues_9.js 2015-03-08 143 Bytes
enumvalues_a.html 2015-03-08 1.0 kB
enumvalues_a.js 2015-03-08 143 Bytes
files_0.html 2015-03-08 1.0 kB
files_0.js 2015-03-08 206 Bytes
files_1.html 2015-03-08 1.0 kB
files_1.js 2015-03-08 90 Bytes
files_2.html 2015-03-08 1.0 kB
files_2.js 2015-03-08 406 Bytes
files_3.html 2015-03-08 1.0 kB
files_3.js 2015-03-08 237 Bytes
functions_0.html 2015-03-08 1.0 kB
functions_0.js 2015-03-08 142 Bytes
functions_1.html 2015-03-08 1.0 kB
functions_1.js 2015-03-08 127 Bytes
functions_2.html 2015-03-08 1.0 kB
classes_3.html 2015-03-08 1.0 kB
classes_3.js 2015-03-08 221 Bytes
close.png 2015-03-08 273 Bytes
defines_0.html 2015-03-08 1.0 kB
defines_0.js 2015-03-08 284 Bytes
enums_0.html 2015-03-08 1.0 kB
enums_0.js 2015-03-08 128 Bytes
enums_1.html 2015-03-08 1.0 kB
enums_1.js 2015-03-08 147 Bytes
enums_2.html 2015-03-08 1.0 kB
enums_2.js 2015-03-08 137 Bytes
enums_3.html 2015-03-08 1.0 kB
enums_3.js 2015-03-08 128 Bytes
enums_4.html 2015-03-08 1.0 kB
enums_4.js 2015-03-08 124 Bytes
enumvalues_0.html 2015-03-08 1.0 kB
enumvalues_0.js 2015-03-08 147 Bytes
enumvalues_1.html 2015-03-08 1.0 kB
enumvalues_1.js 2015-03-08 161 Bytes
enumvalues_2.html 2015-03-08 1.0 kB
enumvalues_2.js 2015-03-08 288 Bytes
enumvalues_3.html 2015-03-08 1.0 kB
enumvalues_3.js 2015-03-08 477 Bytes
all_b.html 2015-03-08 1.0 kB
all_b.js 2015-03-08 1.7 kB
all_c.html 2015-03-08 1.0 kB
all_c.js 2015-03-08 3.3 kB
all_d.html 2015-03-08 1.0 kB
all_d.js 2015-03-08 1.1 kB
all_e.html 2015-03-08 1.0 kB
all_e.js 2015-03-08 3.6 kB
all_f.html 2015-03-08 1.0 kB
all_f.js 2015-03-08 1.5 kB
classes_0.html 2015-03-08 1.0 kB
classes_0.js 2015-03-08 90 Bytes
classes_1.html 2015-03-08 1.0 kB
classes_1.js 2015-03-08 105 Bytes
classes_2.html 2015-03-08 1.0 kB
classes_2.js 2015-03-08 100 Bytes
all_13.html 2015-03-08 1.0 kB
all_13.js 2015-03-08 15.8 kB
all_14.html 2015-03-08 1.0 kB
all_14.js 2015-03-08 239 Bytes
all_15.html 2015-03-08 1.0 kB
all_15.js 2015-03-08 421 Bytes
all_16.html 2015-03-08 1.0 kB
all_16.js 2015-03-08 421 Bytes
all_17.html 2015-03-08 1.0 kB
all_17.js 2015-03-08 633 Bytes
all_a.html 2015-03-08 1.0 kB
all_a.js 2015-03-08 6.1 kB
all_2.html 2015-03-08 1.0 kB
all_2.js 2015-03-08 1.6 kB
all_3.html 2015-03-08 1.0 kB
all_3.js 2015-03-08 352 Bytes
all_4.html 2015-03-08 1.0 kB
all_4.js 2015-03-08 760 Bytes
all_5.html 2015-03-08 1.0 kB
all_5.js 2015-03-08 5.2 kB
all_6.html 2015-03-08 1.0 kB
all_6.js 2015-03-08 81 Bytes
all_7.html 2015-03-08 1.0 kB
all_7.js 2015-03-08 161 Bytes
all_8.html 2015-03-08 1.0 kB
all_8.js 2015-03-08 711 Bytes
all_9.html 2015-03-08 1.0 kB
all_9.js 2015-03-08 1.9 kB
all_10.html 2015-03-08 1.0 kB
all_10.js 2015-03-08 5.1 kB
all_11.html 2015-03-08 1.0 kB
all_11.js 2015-03-08 1.5 kB
all_12.html 2015-03-08 1.0 kB
all_12.js 2015-03-08 653 Bytes
all_0.html 2015-03-08 1.0 kB
all_0.js 2015-03-08 142 Bytes
all_1.html 2015-03-08 1.0 kB
all_1.js 2015-03-08 235 Bytes
Totals: 193 Items   231.2 kB 0



G○FXMath

Introduction

The (G○F)(X) Math library (abbreviated GoFXMath) is a lightweight, but powerful, data-oriented math library focused on the development of graphics-oriented applications in C++.

Design

Given that the GoFXMath library is designed with data in mind, much of its functionality is overloaded between two major sections: SISD code and SIMD code.

SISD


The SISD code is all standard C++, and generally does not leverage the hardware or compiler for optimizations more than is absolutely necessary, keeping the code relatively fast without sacrificing too much readability. Given that the compiler will typically optimize standard C++ operations far better than most programmers ever could anyway, this doesn't affect the performance of the SISD code much.

SIMD


The SIMD side, on the other hand, almost exclusively utilizes intel® SSE intrinsics, and frequently makes use of some very low-level techniques. However, while these will somewhat reduce readability, many of the more common operations (such as absolute value, negation, etc.) have been written into helper functions. Additionally, the many of the intel® SSE functions have been given wrapper functions to improve their readability, and maintainability for future changes to SSE functions or additions of similar functionality from other libraries such as ARM NEON™. For example, _mm_mul_ps(__m128) is wrapped in VecMul(SseVec). It should be noted that almost all the functions in the SIMD portions are marked as inline, including the wrapper functions, and are fully defined in the header files. As well, GoFXMath library does not make use of .inl files, or split header files for inline functions; the declarations and definitions are fully contained in the same files.

It should be noted that the defined functions and constants for the GoFXMath library rely on big-endian logic for the SSE registers. That is to say that the logic incorporated positions the values in "reverse" order in the register from what the built-in sse functions use. The reason for this is to improve readability of complex SSE logic, and to prevent extra loading/unloading overhead when switching between the standard registers and the SSE registers. What this means is that when loading a Vec4 into or out from an SSE register, its values will not need to be reversed on each transfer, and can simply be loaded and unloaded in-order. Similarly, when calling one of the SetSseVec functions, the arguments passed are to be used in the same logical order for the desired vector (e.g. SetSseVec3(x,y,z) loads the SSE register with the values like this: <1.0f, z, y, x> where the 1.0f is used with calculations involving transformation matrices.

Requirements

The GoFXMath library doesn't have any particular dependencies attached to it. It has been built and tested with Visual C++ 2013 (32 and 64-bit versions, on Windows 7 64-bit), MinGW-w64 g++4.9.2 (64-bit version on Windows 7 64-bit), and GNU g++4.8.2 (Ubuntu 14.04.2 LTS 64-bit). As of yet, it has not been tested on an Apple machine, though the standard XCode C++ compiler should yield similarly successful results.

The GoFXMath library does make use of some C++11 features, so any compiler that should have any hope of building or using it would need to be up to at least the same level of C++11 standards as Visual C++ 12.

Additionally, as mentioned in the SIMD section, the GoFXMath library makes heavy use of intel® SSE functions. While most of this functionality is defined in earlier forms of the SSE intrinsics, some require SSE-4.1. However, most currently used, standard, consumer-grade CPUs should be able to accommodate this requirement, as it has had fairly wide support for quite some time.

Tests and Demo Projects

The prepackaged distribution files, in addition to the binaries and documentation, also contain the compiled test projects and a demo project written for OpenGL (using GLEW and GLFW).

Tests


The tests should build and run on any Windows 7 or higher machine, as well as any Linux distribution capable of running g++4.8.2 compiled libraries. The tests have been built with the Catch Testing Framework. Note that there are (sometimes significantly) more than one assertion-per-test, in many, if not most, of the test cases. The tests are written this way due to the fact that the catch framework offers a method of posing an assert while not forcing a halt on a specific test case, and all the tests have been written with this method in mind. There are also numerous fringe-cases when working with matrices and vectors (especially SSE vectors) that must be accounted for to maintain the expected mathematical behavior.

More information on how to run (or even add to) the tests can be found on the Catch Testing Framework github page.

Demo


There are included windows and linux executables for the demo project. Naturally, the source code is included alongside the executable. As mentioned in the beginning of this section, the demo project uses GLEW and GLFW, and will require both to be properly linked before it can be built.

Source: README.md, updated 2015-03-08