Skip to content

Commit

Permalink
fix external allocation
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jan 21, 2021
1 parent 9875938 commit 9ac352d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cuvec/include/pycuvec.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ template <class T> struct PyCuVec_tp {
template <class T> PyCuVec<T> *PyCuVec_new() {
static PyCuVec_tp<T> Vector_T;
if (PyType_Ready(&Vector_T.tp_obj) < 0) return NULL;
return (PyCuVec<T> *)Vector_T.tp_obj.tp_alloc(&Vector_T.tp_obj, 0);
return (PyCuVec<T> *)Vector_T.tp_obj.tp_alloc(&Vector_T.tp_obj, 1);
}
template <class T> PyCuVec<T> *PyCuVec_zeros(std::vector<Py_ssize_t> shape) {
PyCuVec<T> *self = PyCuVec_new<T>();
Expand Down

0 comments on commit 9ac352d

Please sign in to comment.