Last active
August 29, 2015 13:57
-
-
Save cronin101/9723948 to your computer and use it in GitHub Desktop.
yum, code generation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main ⭔ (1..100)[Int].map { |x| x + 10 }.map { |y| y * y}.filter { |x| x.even? }.filter { |y| y < 200 }[Fixnum] | |
#[2014-03-23 14:44:27 +0000] Simplify!: Simplified from [["x = x >> 1", "x = x + 10", "x = x * x"], ["x = x + 10"], ["x = x * x"], ["((x % 2 == 0)) && (x < 200)"], ["x < 200"], ["x = (x << 1) | 0x01"]], to [["x = x >> 1", "x = x + 10", "x = x * x", "?{((x % 2 == 0)) && (x < 200)}?", "x = (x << 1) | 0x01"]]. | |
#[2014-03-23 14:44:27 +0000] Executing filter kernel: | |
# __kernel void hadopemappingfilter7(__global int *data_array, __global int *presence_array) { | |
# int x; | |
# int global_id = get_global_id(0); | |
# x = data_array[global_id]; | |
# | |
# x = x >> 1; | |
# x = x + 10; | |
# x = x * x; | |
#; | |
#int flag = ((x % 2 == 0)) && (x < 200) ? 1 : 0; | |
#x = (x << 1) | 0x01; | |
# | |
# presence_array[global_id] = flag; | |
# data_array[global_id] = x; | |
# | |
#} | |
=> [144, 196] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment