A loopy kernel
The snippet can be accessed without any authentication.
Authored by
Xiaoyu Wei
knl 1.80 KiB
---------------------------------------------------------------------------
KERNEL: eval_expr
---------------------------------------------------------------------------
ARGUMENTS:
I: ValueArg, type: <auto/runtime>
expr_val: type: <auto/runtime>, shape: () aspace: global
k_p: ValueArg, type: <auto/runtime>
k_t: ValueArg, type: <auto/runtime>
n_targets: ValueArg, type: np:dtype('int32')
result: type: <auto/runtime>, shape: (n_targets), dim_tags: (N0:stride:1) aspace: global
target_points: type: np:dtype('float64'), shape: (2, n_targets), dim_tags: (N1:stride:n_targets, N0:stride:1) aspace: global
---------------------------------------------------------------------------
DOMAINS:
[n_targets] -> { [itgt] : 0 <= itgt < n_targets }
---------------------------------------------------------------------------
INAME IMPLEMENTATION TAGS:
itgt: None
---------------------------------------------------------------------------
TEMPORARIES:
cse_exprhank1_01_result: type: <auto/runtime>, shape: () scope:auto
cse_exprhank1_01_result_0: type: <auto/runtime>, shape: () scope:auto
x0: type: <auto/runtime>, shape: () scope:auto
x1: type: <auto/runtime>, shape: () scope:auto
---------------------------------------------------------------------------
INSTRUCTIONS:
for itgt
↱ x0 = target_points[0, itgt] {id=insn}
│↱ x1 = target_points[1, itgt] {id=insn_0}
├├↱ cse_exprhank1_01_result = hank1_01(k_t*sqrt((x0 + -1.23)*(x0 + -1.23) + x1*x1)).order0 {id=insn_1}
└└│↱ cse_exprhank1_01_result_0 = hank1_01(k_p*sqrt((x0 + -1.23)*(x0 + -1.23) + x1*x1)).order0 {id=insn_2}
↱ └└ expr_val = cse_exprhank1_01_result*(I / 4) + cse_exprhank1_01_result_0*(I / 4) {id=insn_3}
└ result[itgt] = expr_val {id=insn_4}
end itgt
---------------------------------------------------------------------------
Please register or sign in to comment