You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code below gives me an error "error C2027: use of undefined type 'nanobind::detail::ndarray_config_t<int,APOD,nanobind::no_framework,nanobind::detail::shape<-1>,nanobind::c_contig>'
"
I expect that it should work because APOD is a trivially copyable POD with known size.
struct APOD {
Matrix4f m;
uint32_t b;
float c;
};
struct TestArray {
...
APOD * data = nullptr;
};
using NBAPODArray = nb::ndarray<APOD, nb::no_framework, nb::shape<-1>, nb::c_contig>;
nb::class_<TestArray>(m, "TestArray")
.def(nb::init<>())
.def("data",
[](TestArray& m) {
return NBAPODArray(m.data, {100});
},
nb::rv_policy::reference_internal);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The code below gives me an error "error C2027: use of undefined type 'nanobind::detail::ndarray_config_t<int,APOD,nanobind::no_framework,nanobind::detail::shape<-1>,nanobind::c_contig>'
"
I expect that it should work because APOD is a trivially copyable POD with known size.
Beta Was this translation helpful? Give feedback.
All reactions