Add comment to Matrix::New function.

This commit is contained in:
Krad
2023-04-20 11:53:34 +08:00
parent 286008c4ab
commit 6ec61aa4cb
3 changed files with 35 additions and 11 deletions

View File

@@ -8,6 +8,7 @@
#include "Matrix.h"
#include "Function.h"
#include "Function1D.h"
#include "spdlog/spdlog.h"
@@ -16,9 +17,9 @@
int main() {
{
double *dataA = new double[8];
double *dataB = new double[8];
double *dataC = new double[4];
double *dataA = Aurora::malloc(8);
double *dataB = Aurora::malloc(8);;
double *dataC = Aurora::malloc(8);;
for (int i = 0; i < 8; ++i) {
dataA[i] = (double) (i - 3);
dataB[i] = (double) (i + 2);
@@ -63,8 +64,8 @@ int main() {
printf("New A:\r\n");
A.printf();
}{
double * dataA =new double[9];
double * dataB =new double[9];
double * dataA = Aurora::malloc(9);
double * dataB = Aurora::malloc(9);
for (int i = 0; i < 9; ++i) {
dataA[i]=(double)(i-3);
dataB[i]=(double)(i+2);