📄 convolution.cwp.lib
字号:
CONVOLUTION - Compute z = x convolved with yconv compute the convolution of two input vector arraysInput:lx length of x arrayifx sample index of first xx array[lx] to be convolved with yly length of y arrayify sample index of first yy array[ly] with which x is to be convolvedlz length of z arrayifz sample index of first zOutput:z array[lz] containing x convolved with yFunction Prototype:void conv (int lx, int ifx, float *x, int ly, int ify, float *y, int lz, int ifz, float *z);Notes:The operation z = x convolved with y is defined to be ifx+lx-1 z[i] = sum x[j]*y[i-j] ; i = ifz,...,ifz+lz-1 j=ifxThe x samples are contained in x[0], x[1], ..., x[lx-1]; likewise forthe y and z samples. The sample indices of the first x, y, and z valuesdetermine the location of the origin for each array. For example, ifz is to be a weighted average of the nearest 5 samples of y, one mightuse ... x[0] = x[1] = x[2] = x[3] = x[4] = 1.0/5.0; conv(5,-2,x,lx,0,y,ly,0,z); ...In this example, the filter x is symmetric, with index of first sample = -2.This function is optimized for architectures that can simultaneously performa multiply, add, and one load from memory; e.g., the IBM RISC System/6000.Because, for each value of i, it accumulates the convolution sum z[i] in ascalar, this function is not likely to be optimal for vector architectures.Author: Dave Hale, Colorado School of Mines, 11/23/91
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -