Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@dace.map
def comp(i: _[0:N]):
in_x << x[i]
in_y << y[i]
out >> y[i]
# computes y[i]=(int)x[i] + ((int)y[i])*2.1
var1 = int(in_x)
var2: int = in_y
var3 = 2.1
res = var1 + var3 * var2
out = res
@dace.map
def comp_cov_k(k: _[0:N]):
indi << data[k, i]
indj << data[k, j]
cov_ij >> corr(1, lambda x, y: x + y, 0)[i, j]
cov_ij = (indi * indj)
@dace.map
def mult_G(i: _[0:NI], j: _[0:NL], k: _[0:NJ]):
in_a << E[i, k]
in_b << F[k, j]
out >> G(1, lambda x, y: x + y, 0)[i, j]
out = in_a * in_b
@dace.map
def symmetrize_col(j: _[i + 1:M]):
corrin << corr[i, j]
corrout >> corr[j, i]
corrout = corrin
@dace.map
def compute(i: _[0:N], j: _[0:M]):
inA << A[i, j]
inr << r[i]
inp << p[j]
outs >> s(1, lambda a, b: a + b)[j]
outq >> q(1, lambda a, b: a + b)[i]
outs = inr * inA
outq = inA * inp
@dace.map
def b(i: _[1:N - 1], j: _[1:N - 1]):
a1 << B[i, j]
a2 << B[i, j - 1]
a3 << B[i, j + 1]
a4 << B[i + 1, j]
a5 << B[i - 1, j]
b >> A[i, j]
b = 0.2 * (a1 + a2 + a3 + a4 + a5)
@dace.map
def update_ey(i: _[1:NX], j: _[0:NY]):
eyin << ey[i, j]
hz1 << hz[i, j]
hz2 << hz[i - 1, j]
eyout >> ey[i, j]
eyout = eyin - datatype(0.5) * (hz1 - hz2)
@dace.map(_[0:N])
def filter(i):
a << A[i]
r << ratio
b >> ostream(-1)
osz >> outsz(-1, lambda x, y: x + y, 0)
filter = (a > r)
if filter:
b = a
osz = filter
@dace.map
def a(i: _[1:N - 1], j: _[1:N - 1], k: _[1:N - 1]):
a11 << B[i + 1, j, k]
a12 << B[i - 1, j, k]
a21 << B[i, j + 1, k]
a22 << B[i, j - 1, k]
a31 << B[i, j, k + 1]
a32 << B[i, j, k - 1]
a << B[i, j, k]
b >> A[i, j, k]
b = 0.125 * (a11 - datatype(2.0) * a + a12) +\
0.125 * (a21 - datatype(2.0) * a + a22) +\
0.125 * (a31 - datatype(2.0) * a + a32) +\
a
@dace.map
def symmetrize_col(j: _[i:M]):
cov_ij << cov[i, j]
covout >> cov(2)[:, :]
covout[i, j] = cov_ij / (N - 1)
covout[j, i] = cov_ij / (N - 1)