Add fromRawData & copyFromRawData to Matrix class.
This commit is contained in:
24
src/Matrix.h
24
src/Matrix.h
@@ -41,6 +41,30 @@ namespace Aurora {
|
||||
|
||||
explicit Matrix(const Matrix::MatrixSlice& slice);
|
||||
|
||||
/**
|
||||
* Create from a Raw data(double array).
|
||||
* Use Raw data which create like new double[size]() as a data source
|
||||
* and the share_ptr's deleter will be std::default_delete<double[]>
|
||||
* @param data
|
||||
* @param rows
|
||||
* @param cols
|
||||
* @param slices
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
static Matrix fromRawData(double *data, int rows, int cols = 0, int slices = 0, ValueType type = Normal);
|
||||
|
||||
/**
|
||||
* Create from a Raw data(double array) with copy the data to a new mkl memory.
|
||||
* @param data
|
||||
* @param rows
|
||||
* @param cols
|
||||
* @param slices
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
static Matrix copyFromRawData(double *data, int rows, int cols = 0, int slices = 0, ValueType type = Normal);
|
||||
|
||||
/**
|
||||
* New a mkl calculate based Matrix
|
||||
* @attention Using New function, must use Aurora:malloc to get memory
|
||||
|
||||
Reference in New Issue
Block a user