做好矩阵乘法和转置之后本来开心得不行的!
准备上手做个最基本的波束形成了!
突然发现希尔伯特变换完以后需要进行各种复数的运算…所以临时补写了一个复数乘法…
学着学着好像有点感觉了~!还是蛮有意思的。当然前提是能调试成功。
用一句傅小姐的名言鼓励一下“只要心甘情愿任何事情都会变得简单!”。
代码
__device__ float GetReal(const Matrix A, int row, int col) {
return A.real[row * A.stride + col];
}
__device__ float GetImag(const Matrix A, int row, int col) {
return A.imag[row * A.stride + col];
}
__device__ void SetElement(Matrix A, int row, int col, float valueR, float valueI) {
A.real[row * A.stride + col] = valueR;
A.imag[row * A.stride + col] = valueI;
}
__device__ Matrix GetSubMatrix(Matrix A, int row, int col) {
Matrix Asub;
Asub.width = BLOCK_SIZE;
Asub.height = BLOCK_SIZE;
Asub.stride = A.stride;
Asub.real = &A.real[A.stride * BLOCK_SIZE * row+ BLOCK_SIZE * col];
Asub.im

博主在实现矩阵乘法和转置后,计划进行波束形成,但在处理希尔伯特变换后的复数运算时遇到挑战。通过学习,博主逐渐理解复数运算,并感受到其趣味性,希望调试顺利。尽管无法上传图片,但博主引用名言以示鼓励。
最低0.47元/天 解锁文章
901

被折叠的 条评论
为什么被折叠?



