This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

multiply all array element in cortex-m4

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
void scale1(uint32_t dst[], uint32_t src[], uint32_t size, uint32_t value){
uin32_t i;
for(i=0;i<size;i++){
dst[i] = src[i]*value;
}
}
void scale2(float32_t dst[], uint32_t src[], uint32_t size, float32_t value){
uin32_t i;
for(i=0;i<size;i++){
dst[i] = src[i]*value;
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

hello all, I'm learn cortex-m4 which has dsp instruction

may I ask like code above, when I need to multiply all array element,

is there a much faster way to handle this situation,

is the way can be suitable for multiplier is float type?

 

thanks all, for giving me any idea =)

0