MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / makeScaledIdentity

Function makeScaledIdentity

src/samples/example_strsm.cpp:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48static const size_t offB = 0; /* N + off */
49
50static void
51makeScaledIdentity(cl_float* matx, size_t M, size_t N, float scale )
52{
53 for( size_t i = 0; i < M; ++i )
54 for (size_t j = 0; j < N; ++j)
55 {
56 matx[i * M + j] = 0.0f;
57 if( i == j )
58 matx[i * M + j] = 1.0f * scale;
59 }
60
61}
62
63static void
64printResult(const char* str)

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected