View sel_le_long_long_col_col.java
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 { |
View map_add_long_int_col_col.java
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
map_add_long_int_col_col(int vec_num, long [] result, long [] col1, | |
int [] col2, int [] sel_vec) { | |
if (sel_vec == null) { | |
for (int i = 0; i = 0; i < vec_num; i++) { | |
result[i] = col1[i] + col2[i]; | |
} | |
} else { | |
int sel_idx; | |
for (int i = 0; I = 0; i < vec_num; i++) { | |
sel_idx = sel_vec[i]; |
View unrolled.c
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
for (i = 0; i < 128; i+=4) { | |
a[i] = b[i] + c[i]; | |
a[i+1] = b[i+1] + c[i+1]; | |
a[i+2] = b[i+2] + c[i+2]; | |
a[i+3] = b[i+3] + c[i+3]; | |
} |
View unoptimized.c
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
for (i = 0; i < 128; i++) { | |
a[i] = b[i] + c[i]; | |
} |
View uselect_bt_void_int_bat_int_const.c
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 uselect_bt_void_int_bat_int_const(oid *output, int *input, int value, int size) { | |
oid i; | |
int j = 0; | |
for (i = 0; i < size; i++) { | |
if (input[i] > value) { | |
output[j++] = i; | |
} | |
} | |
return j; | |
} |
View tpch_q1.sql
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
select | |
l_returnflag, l_linestatus, sum(l_quantity) as sum_qty, | |
sum(l_extendedprice) as sum_base_price, | |
sum(l_extendedprice*(1-l_discount)) as sum_disc_price, | |
sum(l_extendedprice*(1-l_discount)*(1+l_tax)) as sum_charge, | |
avg(l_quantity) as avg_qty, | |
avg(l_extendedprice) as avg_price, avg(l_discount) as avg_disc, | |
count(*) as count_order | |
from | |
lineitem |
View latency_comparison_numbers.txt
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
Latency Comparison Numbers | |
-------------------------- | |
execute typical instruction 1 ns 1/1,000,000,000 sec | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns |
View ColumnVector.java
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
public abstract class ColumnVector { | |
public boolean[] isNull; | |
public boolean noNulls; | |
public boolean isRepeating; | |
... | |
} | |
public class LongColumnVector extends ColumnVector { | |
public long[] vector; | |
public static final long NULL_VALUE = 1; |
View VectorizedRowBatch.java
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
public class VectorizedRowBatch implements Writable { | |
public int numCols; // number of columns | |
public ColumnVector[] cols; // a vector for each column | |
public int size; // number of rows that qualify (i.e. haven't been filtered out) | |
public int[] selected; // array of positions of selected values | |
public int[] projectedColumns; | |
public int projectionSize; | |
... | |
} |
View Operator.java
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
/** | |
* Base operator implementation. | |
**/ | |
public abstract class Operator<T extends OperatorDesc> implements ... { | |
public void initialize(Configuration hconf, ...) ... | |
public abstract void processOp(Object row, int tag) throws ...; | |
public void close(boolean abort) throws HiveException { ... } | |
} |
NewerOlder