mirror of https://github.com/Jittor/Jittor
update int64-type w.r.t OS
This commit is contained in:
parent
e095821843
commit
a866cc2387
|
@ -146,7 +146,7 @@ ArrayOp::ArrayOp(PyObject* obj) {
|
|||
long dims[args.shape.size()];
|
||||
#endif
|
||||
for (int i=0; i<args.shape.size(); i++)
|
||||
dims[i] = (long) args.shape[i];
|
||||
dims[i] = args.shape[i];
|
||||
holder.assign(PyArray_New(
|
||||
PyArray_Type, // subtype
|
||||
args.shape.size(), // nd
|
||||
|
|
|
@ -388,7 +388,7 @@ DEF_IS(DataView, PyObject*) to_py_object(T a) {
|
|||
long dims[a.shape.size()];
|
||||
#endif
|
||||
for (int i=0; i<a.shape.size(); i++)
|
||||
dims[i] = (int64) a.shape[i];
|
||||
dims[i] = a.shape[i];
|
||||
PyObjHolder oh(PyArray_New(
|
||||
PyArray_Type, // subtype
|
||||
a.shape.size(), // nd
|
||||
|
|
|
@ -109,9 +109,13 @@ static void push_py_object(RingBuffer* rb, PyObject* obj, uint64& __restrict__ o
|
|||
rb->push_t<NanoString>(args.dtype, offset);
|
||||
rb->push(size, offset);
|
||||
args.ptr = rb->get_ptr(size, offset);
|
||||
#if defined(__linux__)
|
||||
int64 dims[args.shape.size()];
|
||||
#elif defined(__APPLE__)
|
||||
long dims[args.shape.size()];
|
||||
for (int i=0; i<args.shape.size(); i++)
|
||||
dims[i] = args.shape[i];
|
||||
#endif
|
||||
for (int i = 0; i < args.shape.size(); i++)
|
||||
dims[i] = args.shape[i];
|
||||
PyObjHolder oh(PyArray_New(
|
||||
PyArray_Type, // subtype
|
||||
args.shape.size(), // nd
|
||||
|
|
Loading…
Reference in New Issue