eigenpy.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2019, CNRS
3  * Copyright 2018-2023, INRIA
4  */
5 
6 #include "eigenpy/eigenpy.hpp"
7 
8 #include <stdlib.h>
9 
10 namespace eigenpy {
11 
12 void seed(unsigned int seed_value) { srand(seed_value); }
13 
14 void exposeMatrixBool();
15 void exposeMatrixInt8();
16 void exposeMatrixChar();
17 void exposeMatrixUInt8();
18 void exposeMatrixInt16();
19 void exposeMatrixUInt16();
20 void exposeMatrixInt32();
21 void exposeMatrixUInt32();
24 void exposeMatrixMacLong();
26 void exposeMatrixInt64();
27 void exposeMatrixUInt64();
30 void exposeMatrixFloat();
31 void exposeMatrixDouble();
33 
37 
38 void exposeNoneType();
39 void exposeTypeInfo();
40 
41 /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instances.
42  */
43 void enableEigenPy() {
44  using namespace Eigen;
45  import_numpy();
46 
48 
49  bp::def("sharedMemory", (void (*)(const bool))NumpyType::sharedMemory,
50  bp::arg("value"),
51  "Share the memory when converting from Eigen to Numpy.");
52 
53  bp::def("sharedMemory", (bool (*)())NumpyType::sharedMemory,
54  "Status of the shared memory when converting from Eigen to Numpy.\n"
55  "If True, the memory is shared when converting an Eigen::Matrix to a "
56  "numpy.array.\n"
57  "Otherwise, a deep copy of the Eigen::Matrix is performed.");
58 
59  bp::def("seed", &seed, bp::arg("seed_value"),
60  "Initialize the pseudo-random number generator with the argument "
61  "seed_value.");
62 
82 
86 
89 }
90 
92 #ifdef EIGENPY_WITH_TENSOR_SUPPORT
93  return true;
94 #else
95  return false;
96 #endif
97 }
98 
99 } // namespace eigenpy
eigenpy::exposeMatrixUInt32
void exposeMatrixUInt32()
Definition: matrix-uint32.cpp:10
Eigen
Definition: complex.cpp:7
eigenpy::exposeMatrixInt64
void exposeMatrixInt64()
Definition: matrix-int64.cpp:10
eigenpy::seed
void seed(unsigned int seed_value)
Definition: eigenpy.cpp:12
eigenpy::enableEigenPy
void EIGENPY_DLLAPI enableEigenPy()
Definition: eigenpy.cpp:43
eigenpy::exposeNoneType
void exposeNoneType()
Definition: optional.cpp:8
eigenpy::exposeMatrixWindowsLong
void exposeMatrixWindowsLong()
Definition: matrix-windows-long.cpp:8
eigenpy::import_numpy
void EIGENPY_DLLAPI import_numpy()
Definition: numpy.cpp:8
eigenpy::Exception::registerException
static void registerException()
Definition: exception.cpp:21
eigenpy::exposeMatrixUInt16
void exposeMatrixUInt16()
Definition: matrix-uint16.cpp:10
eigenpy::NumpyType::sharedMemory
static bool sharedMemory()
Definition: numpy-type.cpp:32
eigenpy
Definition: alignment.hpp:14
eigenpy::exposeTypeInfo
void exposeTypeInfo()
Definition: src/type_info.cpp:77
eigenpy::exposeMatrixDouble
void exposeMatrixDouble()
Definition: matrix-double.cpp:8
eigenpy::exposeMatrixFloat
void exposeMatrixFloat()
Definition: matrix-float.cpp:8
eigenpy::exposeMatrixLongDouble
void exposeMatrixLongDouble()
Definition: matrix-long-double.cpp:8
eigenpy::exposeMatrixUInt64
void exposeMatrixUInt64()
Definition: matrix-uint64.cpp:10
eigenpy::withTensorSupport
bool EIGENPY_DLLAPI withTensorSupport()
Definition: eigenpy.cpp:91
eigenpy::exposeMatrixUInt8
void exposeMatrixUInt8()
Definition: matrix-uint8.cpp:10
eigenpy::exposeMatrixMacULong
void exposeMatrixMacULong()
Definition: matrix-mac-ulong.cpp:8
eigenpy.hpp
eigenpy::exposeMatrixComplexFloat
void exposeMatrixComplexFloat()
Definition: matrix-complex-float.cpp:8
eigenpy::exposeMatrixLinuxULongLong
void exposeMatrixLinuxULongLong()
Definition: matrix-linux-ulong-long.cpp:8
eigenpy::exposeMatrixComplexLongDouble
void exposeMatrixComplexLongDouble()
Definition: matrix-complex-long-double.cpp:8
eigenpy::exposeMatrixComplexDouble
void exposeMatrixComplexDouble()
Definition: matrix-complex-double.cpp:8
eigenpy::exposeMatrixChar
void exposeMatrixChar()
Definition: matrix-char.cpp:10
eigenpy::exposeMatrixInt8
void exposeMatrixInt8()
Definition: matrix-int8.cpp:10
eigenpy::exposeMatrixLinuxLongLong
void exposeMatrixLinuxLongLong()
Definition: matrix-linux-long-long.cpp:8
eigenpy::exposeMatrixInt32
void exposeMatrixInt32()
Definition: matrix-int32.cpp:10
eigenpy::exposeMatrixInt16
void exposeMatrixInt16()
Definition: matrix-int16.cpp:10
eigenpy::exposeMatrixMacLong
void exposeMatrixMacLong()
Definition: matrix-mac-long.cpp:8
eigenpy::exposeMatrixWindowsULong
void exposeMatrixWindowsULong()
Definition: matrix-windows-ulong.cpp:8
eigenpy::exposeMatrixBool
void exposeMatrixBool()
Definition: matrix-bool.cpp:8


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Nov 2 2024 02:14:45