pybind11/include/pybind11
Jason Rhinelander 423a49b8be array: add unchecked access via proxy object
This adds bounds-unchecked access to arrays through a `a.unchecked<Type,
Dimensions>()` method.  (For `array_t<T>`, the `Type` template parameter
is omitted).  The mutable version (which requires the array have the
`writeable` flag) is available as `a.mutable_unchecked<...>()`.

Specifying the Dimensions as a template parameter allows storage of an
std::array; having the strides and sizes stored that way (as opposed to
storing a copy of the array's strides/shape pointers) allows the
compiler to make significant optimizations of the shape() method that it
can't make with a pointer; testing with nested loops of the form:

    for (size_t i0 = 0; i0 < r.shape(0); i0++)
        for (size_t i1 = 0; i1 < r.shape(1); i1++)
            ...
                r(i0, i1, ...) += 1;

over a 10 million element array gives around a 25% speedup (versus using
a pointer) for the 1D case, 33% for 2D, and runs more than twice as fast
with a 5D array.
2017-03-22 16:13:59 -03:00
..
attr.h Support class-specific operator new and delete 2017-03-22 19:28:04 +01:00
cast.h Support class-specific operator new and delete 2017-03-22 19:28:04 +01:00
chrono.h Fix for floating point durations 2017-03-11 23:04:16 -04:00
class_support.h Support class-specific operator new and delete 2017-03-22 19:28:04 +01:00
common.h Support class-specific operator new and delete 2017-03-22 19:28:04 +01:00
complex.h Made arithmetic and complex casters respect convert 2017-02-03 20:16:14 -05:00
descr.h std::valarray support for stl.h (#545) 2016-12-08 00:43:29 +01:00
eigen.h Eigen: don't require conformability on length-1 dimensions 2017-03-17 15:32:18 -03:00
eval.h WIP: PyPy support (#527) 2016-12-16 15:00:46 +01:00
functional.h Fixed compilation error when binding function accepting some forms of std::function (#689) 2017-02-22 20:00:59 +01:00
numpy.h array: add unchecked access via proxy object 2017-03-22 16:13:59 -03:00
operators.h Multiple inheritance support 2016-09-19 13:45:31 +02:00
options.h Provide more control over automatic generation of docstrings (#486) 2016-11-15 12:38:05 +01:00
pybind11.h Support class-specific operator new and delete 2017-03-22 19:28:04 +01:00
pytypes.h Add and remove some PyPy iterator workarounds 2017-02-26 23:57:03 +01:00
stl_bind.h remove all pybind11 namespace prefixes from stl_bind.h 2017-03-16 11:44:01 +01:00
stl.h WIP: PyPy support (#527) 2016-12-16 15:00:46 +01:00
typeid.h minor cleanups in common.h; updated author info and copyright year 2016-04-18 10:53:38 +02:00