Fix getDims, copyFromRawData and fromRawData bug.2
This commit is contained in:
@@ -239,11 +239,7 @@ namespace Aurora {
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
if(mInfo[1] > 1)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
return 1;
|
||||
return 2;
|
||||
}
|
||||
|
||||
double *Matrix::getData() const {
|
||||
@@ -322,7 +318,7 @@ namespace Aurora {
|
||||
|
||||
Matrix Matrix::copyFromRawData(double *data, int rows, int cols, int slices, ValueType type) {
|
||||
int colsize = cols>0?cols:1;
|
||||
int slicesize = slicesize>0?slicesize:1;
|
||||
int slicesize = slices>0?slices:1;
|
||||
int size = rows*colsize*slicesize;
|
||||
double *newBuffer = malloc(size, type);
|
||||
cblas_dcopy(size*type,data,1,newBuffer,1);
|
||||
|
||||
Reference in New Issue
Block a user