Created
August 29, 2016 03:02
-
-
Save hyunsik/1d14287c33f3b5874d674471c6f4fede to your computer and use it in GitHub Desktop.
Select primitive in vectorized processing model
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
int sel_le_long_long_col_col(int vec_num, int [] res_sel_vec, | |
long [] col1, long [] col2, int [] sel_vec) { | |
int ret = 0; | |
if (sel_vec == null) { | |
for (int i = 0; i < vec_num; i++) { | |
if (col1[i] < col2[i]) { | |
res_sel_vec[ret++] = i | |
} | |
} | |
} else { | |
for (int i = 0; i < vec_num; i++) { | |
int sel_id = sel_vec[i]; | |
if (col1[sel_id] < col2[sel_id]) { | |
res_sel_vec[ret++] = sel_id; | |
} | |
} | |
return ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment