Skip to content

Commit 8f121b7

Browse files
committed
Fix pybind11 visbility
1 parent 85a2643 commit 8f121b7

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/ConstantFlow.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@
1717
#define HOSTDEVICE
1818
#endif // __HIPCC__
1919

20+
#ifndef PYBIND11_EXPORT
21+
#define PYBIND11_EXPORT __attribute__((visibility("default")))
22+
#endif
23+
2024
namespace hoomd
2125
{
2226
namespace azplugins
2327
{
2428

2529
//! Position-independent flow along a vector
26-
class ConstantFlow
30+
class PYBIND11_EXPORT ConstantFlow
2731
{
2832
public:
2933
//! Constructor
@@ -64,5 +68,6 @@ class ConstantFlow
6468
} // namespace hoomd
6569

6670
#undef HOSTDEVICE
71+
#undef PYBIND11_EXPORT
6772

6873
#endif // AZPLUGINS_CONSTANT_FLOW_H_

src/ParabolicFlow.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#define HOSTDEVICE
2323
#endif // __HIPCC__
2424

25+
#ifndef PYBIND11_EXPORT
26+
#define PYBIND11_EXPORT __attribute__((visibility("default")))
27+
#endif
28+
2529
namespace hoomd
2630
{
2731
namespace azplugins
@@ -44,7 +48,7 @@ namespace azplugins
4448
* \note The user must properly establish no flux of particles through the channel
4549
* walls through an appropriate wall potential.
4650
*/
47-
class ParabolicFlow
51+
class PYBIND11_EXPORT ParabolicFlow
4852
{
4953
public:
5054
//! Construct parabolic flow profile
@@ -95,6 +99,8 @@ class ParabolicFlow
9599

96100
} // namespace azplugins
97101
} // namespace hoomd
102+
98103
#undef HOSTDEVICE
104+
#undef PYBIND11_EXPORT
99105

100106
#endif // AZPLUGINS_PARABOLIC_FLOW_H_

src/module.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// Part of azplugins, released under the BSD 3-Clause License.
44

55
#include <pybind11/pybind11.h>
6+
67
namespace hoomd
78
{
89
//! Plugins for soft matter
@@ -72,7 +73,6 @@ PYBIND11_MODULE(_azplugins, m)
7273
{
7374
using namespace hoomd::azplugins::detail;
7475

75-
7676
export_ConstantFlow(m);
7777
export_ParabolicFlow(m);
7878

0 commit comments

Comments
 (0)