MCPcopy Create free account
hub / github.com/creatale/node-dv / MatrAXPY

Function MatrAXPY

deps/opencv/modules/core/src/lapack.cpp:723–748  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

721
722/* y[0:m,0:n] += diag(a[0:1,0:m]) * x[0:m,0:n] */
723template<typename T1, typename T2, typename T3> static void
724MatrAXPY( int m, int n, const T1* x, int dx,
725 const T2* a, int inca, T3* y, int dy )
726{
727 int i, j;
728 for( i = 0; i < m; i++, x += dx, y += dy )
729 {
730 T2 s = a[i*inca];
731 j=0;
732 #if CV_ENABLE_UNROLLED
733 for(; j <= n - 4; j += 4 )
734 {
735 T3 t0 = (T3)(y[j] + s*x[j]);
736 T3 t1 = (T3)(y[j+1] + s*x[j+1]);
737 y[j] = t0;
738 y[j+1] = t1;
739 t0 = (T3)(y[j+2] + s*x[j+2]);
740 t1 = (T3)(y[j+3] + s*x[j+3]);
741 y[j+2] = t0;
742 y[j+3] = t1;
743 }
744 #endif
745 for( ; j < n; j++ )
746 y[j] = (T3)(y[j] + s*x[j]);
747 }
748}
749
750template<typename T> static void
751SVBkSbImpl_( int m, int n, const T* w, int incw,

Callers 1

SVBkSbImpl_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected