kernel_static.rscript:14:14: error: Non-const static variables are not allowed in kernels: 'i' kernel_static.rscript:18:22: error: Invalid use of attribute kernel with static function declaration: static_kernel