MCPcopy Create free account
hub / github.com/ProjectMitosisOS/mitosis-core / handler

Function handler

exp/fork-functions/linpack/function.py:17–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16@tick_execution_time
17def handler():
18 n = 4 # FIXME: stuck when n is large
19 # LINPACK benchmarks
20 ops = (2.0 * n) * n * n / 3.0 + (2.0 * n) * n
21
22 # Create AxA array of random numbers -0.5 to 0.5
23 A = random.random_sample((n, n)) - 0.5
24 B = A.sum(axis=1)
25
26 # Convert to matrices
27 A = matrix(A)
28 B = matrix(B.reshape((n, 1)))
29
30 # Ax = B
31 x = linalg.solve(A, B)
32
33@mitosis_bench
34def bench():

Callers 1

benchFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected