1 /** 2 * Author......: See docs/credits.txt 3 * License.....: MIT 4 */ 5 6 #ifdef KERNEL_STATIC 7 #include M2S(INCLUDE_PATH/inc_vendor.h) 8 #include M2S(INCLUDE_PATH/inc_types.h) 9 #include M2S(INCLUDE_PATH/inc_platform.cl) 10 #include M2S(INCLUDE_PATH/inc_common.cl) 11 #include M2S(INCLUDE_PATH/inc_rp.h) 12 #include M2S(INCLUDE_PATH/inc_rp.cl) 13 #include M2S(INCLUDE_PATH/inc_amp.h) 14 #endif 15 16 KERNEL_FQ void amp (KERN_ATTR_AMP) 17 { 18 const u64 gid = get_global_id (0); 19 20 if (gid >= gid_max) return; 21 22 if (rules_buf[0].cmds[0] == RULE_OP_MANGLE_NOOP && rules_buf[0].cmds[1] == 0) return; 23 24 pw_t pw = pws_amp[gid]; 25 26 pw.pw_len = apply_rules (rules_buf[0].cmds, pw.i, pw.pw_len); 27 28 pws[gid] = pw; 29 }