17 lines
641 B
Text
17 lines
641 B
Text
Memory needed
|
|
A) 2Vectors + Result: (2N+1)*sizeof(datatype)
|
|
B) Matrix + Vector + Resultvector: (N*M+N+M)*sizeof(datatype)
|
|
C) Matrix + Matrix + Resultmatrix: (M*L+L*N+M*N)*sizeof(datatype)
|
|
D) Coefficients + Vector + Result: (p+1+2N)*sizeof(datatype)
|
|
|
|
Number of floating point operations
|
|
A) N mult N add =>2*N
|
|
B) M times skalar prod => 2*M*N
|
|
C) (Matrix vector product of M*L Matrix with an L Vector) N times => 2*M*N*L
|
|
D) N times(p times * and p times +/- [with Horner's method]) => 2*N*p
|
|
|
|
Number of Read/Write operations
|
|
A) Read: 2*N Write: 1
|
|
B) Read: 2*M*N Write: M
|
|
C) Read: 2*M*N*L Write: M*N
|
|
D) Read: N*p Write: N
|