single bug fix
This commit is contained in:
@@ -55,9 +55,17 @@ namespace Recon {
|
|||||||
// 1))./(vecnorm(senderNormalBlock, 2, 1) .* vecnorm(receiverNormalBlock, 2,
|
// 1))./(vecnorm(senderNormalBlock, 2, 1) .* vecnorm(receiverNormalBlock, 2,
|
||||||
// 1)
|
// 1)
|
||||||
auto transData = ones(1, aMSenderNormalBlock.getDimSize(1));
|
auto transData = ones(1, aMSenderNormalBlock.getDimSize(1));
|
||||||
auto inbetweenAngle = acosd(dot(aMSenderNormalBlock, aMReceiverNormalBlock) /
|
Aurora::Matrix inbetweenAngle;
|
||||||
|
{
|
||||||
|
auto tempM = dot(aMSenderNormalBlock, aMReceiverNormalBlock) /
|
||||||
(vecnorm(aMSenderNormalBlock, Norm2, 1) *
|
(vecnorm(aMSenderNormalBlock, Norm2, 1) *
|
||||||
vecnorm(aMReceiverNormalBlock, Norm2, 1)));
|
vecnorm(aMReceiverNormalBlock, Norm2, 1));
|
||||||
|
float* temp = new float[tempM.getDataSize()]{0};
|
||||||
|
std::copy(tempM.getData(),tempM.getData()+tempM.getDataSize(),temp);
|
||||||
|
std::copy(temp,temp+tempM.getDataSize(),tempM.getData());
|
||||||
|
delete [] temp;
|
||||||
|
inbetweenAngle = acosd(tempM);
|
||||||
|
}
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
for (size_t i = 0; i < transData.getDataSize(); i++)
|
for (size_t i = 0; i < transData.getDataSize(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,6 +31,12 @@ namespace Recon
|
|||||||
Aurora::Matrix prepareAScansForTransmissionDetection(const Aurora::Matrix& aMaScanBlock, const Aurora::Matrix aVGainBlock)
|
Aurora::Matrix prepareAScansForTransmissionDetection(const Aurora::Matrix& aMaScanBlock, const Aurora::Matrix aVGainBlock)
|
||||||
{
|
{
|
||||||
auto ret = aMaScanBlock/Aurora::repmat(aVGainBlock,aMaScanBlock.getDimSize(0),1);
|
auto ret = aMaScanBlock/Aurora::repmat(aVGainBlock,aMaScanBlock.getDimSize(0),1);
|
||||||
|
{
|
||||||
|
float* temp = new float[ret.getDataSize()]{0};
|
||||||
|
std::copy(ret.getData(),ret.getData()+ret.getDataSize(),temp);
|
||||||
|
std::copy(temp,temp+ret.getDataSize(),ret.getData());
|
||||||
|
delete [] temp;
|
||||||
|
}
|
||||||
ret = ret-Aurora::repmat(Aurora::mean(ret),aMaScanBlock.getDimSize(0),1);
|
ret = ret-Aurora::repmat(Aurora::mean(ret),aMaScanBlock.getDimSize(0),1);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,9 +220,7 @@ namespace Recon
|
|||||||
|
|
||||||
uint *temp = new uint[path.getDataSize()]{0};
|
uint *temp = new uint[path.getDataSize()]{0};
|
||||||
//uint32(path)
|
//uint32(path)
|
||||||
std::copy(path.getData(),path.getData()+path.getDataSize(),temp);
|
Aurora::round(path);
|
||||||
std::copy(temp,temp+path.getDataSize(),path.getData());
|
|
||||||
delete [] temp;
|
|
||||||
result.weighting = traceLineResult.ds;
|
result.weighting = traceLineResult.ds;
|
||||||
result.path = correctPathToImgDimensions(path, dims);
|
result.path = correctPathToImgDimensions(path, dims);
|
||||||
result.pathLen = result.path.getDimSize(0);
|
result.pathLen = result.path.getDimSize(0);
|
||||||
|
|||||||
@@ -170,6 +170,10 @@ namespace Recon
|
|||||||
double * csrValues;
|
double * csrValues;
|
||||||
sparse_index_base_t index;
|
sparse_index_base_t index;
|
||||||
mkl_sparse_d_export_csr(csrA, &index, &n_rows, &n_cols, &rows_start, &rows_end, &col_indx, &csrValues);
|
mkl_sparse_d_export_csr(csrA, &index, &n_rows, &n_cols, &rows_start, &rows_end, &col_indx, &csrValues);
|
||||||
|
mkl_sparse_destroy(A);
|
||||||
|
delete [] xIdxs;
|
||||||
|
delete [] yIdxs;
|
||||||
|
|
||||||
int *row_idx = new int[n_rows+1];
|
int *row_idx = new int[n_rows+1];
|
||||||
std::copy(rows_start,rows_start+n_rows,row_idx);
|
std::copy(rows_start,rows_start+n_rows,row_idx);
|
||||||
row_idx[n_rows] = rows_end[n_rows-1];
|
row_idx[n_rows] = rows_end[n_rows-1];
|
||||||
@@ -178,14 +182,9 @@ namespace Recon
|
|||||||
size_t bDims[3]={(size_t)b.getDimSize(0),(size_t)b.getDimSize(1),(size_t)b.getDimSize(2)};
|
size_t bDims[3]={(size_t)b.getDimSize(0),(size_t)b.getDimSize(1),(size_t)b.getDimSize(2)};
|
||||||
size_t rdims[3] = {(size_t)dims[0], (size_t)dims[1], (size_t)dims[2]};
|
size_t rdims[3] = {(size_t)dims[0], (size_t)dims[1], (size_t)dims[2]};
|
||||||
bool pagelocked = false;
|
bool pagelocked = false;
|
||||||
|
|
||||||
|
|
||||||
auto result = TVALGPU(row_idx, col_indx, csrValues, M.getM(), M.getN(), nz, bData, bDims, rdims, opt, device, false);
|
auto result = TVALGPU(row_idx, col_indx, csrValues, M.getM(), M.getN(), nz, bData, bDims, rdims, opt, device, false);
|
||||||
mkl_sparse_destroy(A);
|
|
||||||
mkl_sparse_destroy(csrA);
|
mkl_sparse_destroy(csrA);
|
||||||
delete [] row_idx;
|
delete [] row_idx;
|
||||||
delete [] xIdxs;
|
|
||||||
delete [] yIdxs;
|
|
||||||
delete [] bData;
|
delete [] bData;
|
||||||
return Aurora::Matrix::fromRawData(result.data, result.dims[0],result.dims[1],result.dims[2]);
|
return Aurora::Matrix::fromRawData(result.data, result.dims[0],result.dims[1],result.dims[2]);
|
||||||
// return Aurora::Matrix();
|
// return Aurora::Matrix();
|
||||||
|
|||||||
Reference in New Issue
Block a user