Skip to content

Commit

Permalink
abstract upstream and down stream of copy
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDenoyelle committed Nov 22, 2016
1 parent 7bd0385 commit 930a4b0
Showing 1 changed file with 63 additions and 60 deletions.
123 changes: 63 additions & 60 deletions src/MSC/intel/copy.c
Original file line number Diff line number Diff line change
@@ -1,66 +1,69 @@
#include "intel.h"

#define copy_write roofline_storent_ins
#define copy_read roofline_load_ins

#define asm_copy(src, dst) \
roofline_loadnt_ins(STRIDE_0,src,REG_0) \
roofline_storent_ins(STRIDE_0,dst,REG_0) \
roofline_loadnt_ins(STRIDE_1,src,REG_1) \
roofline_storent_ins(STRIDE_1,dst,REG_1) \
roofline_loadnt_ins(STRIDE_2,src,REG_2) \
roofline_storent_ins(STRIDE_2,dst,REG_2) \
roofline_loadnt_ins(STRIDE_3,src,REG_3) \
roofline_storent_ins(STRIDE_3,dst,REG_3) \
roofline_loadnt_ins(STRIDE_4,src,REG_4) \
roofline_storent_ins(STRIDE_4,dst,REG_4) \
roofline_loadnt_ins(STRIDE_5,src,REG_5) \
roofline_storent_ins(STRIDE_5,dst,REG_5) \
roofline_loadnt_ins(STRIDE_6,src,REG_6) \
roofline_storent_ins(STRIDE_6,dst,REG_6) \
roofline_loadnt_ins(STRIDE_7,src,REG_7) \
roofline_storent_ins(STRIDE_7,dst,REG_7) \
roofline_loadnt_ins(STRIDE_8,src,REG_8) \
roofline_storent_ins(STRIDE_8,dst,REG_8) \
roofline_loadnt_ins(STRIDE_9,src,REG_9) \
roofline_storent_ins(STRIDE_9,dst,REG_9) \
roofline_loadnt_ins(STRIDE_10,src,REG_10) \
roofline_storent_ins(STRIDE_10,dst,REG_10) \
roofline_loadnt_ins(STRIDE_11,src,REG_11) \
roofline_storent_ins(STRIDE_11,dst,REG_11) \
roofline_loadnt_ins(STRIDE_12,src,REG_12) \
roofline_storent_ins(STRIDE_12,dst,REG_12) \
roofline_loadnt_ins(STRIDE_13,src,REG_13) \
roofline_storent_ins(STRIDE_13,dst,REG_13) \
roofline_loadnt_ins(STRIDE_14,src,REG_14) \
roofline_storent_ins(STRIDE_14,dst,REG_14) \
roofline_loadnt_ins(STRIDE_15,src,REG_15) \
roofline_storent_ins(STRIDE_15,dst,REG_15) \
roofline_loadnt_ins(STRIDE_16,src,REG_16) \
roofline_storent_ins(STRIDE_16,dst,REG_16) \
roofline_loadnt_ins(STRIDE_17,src,REG_17) \
roofline_storent_ins(STRIDE_17,dst,REG_17) \
roofline_loadnt_ins(STRIDE_18,src,REG_18) \
roofline_storent_ins(STRIDE_18,dst,REG_18) \
roofline_loadnt_ins(STRIDE_19,src,REG_19) \
roofline_storent_ins(STRIDE_19,dst,REG_19) \
roofline_loadnt_ins(STRIDE_20,src,REG_20) \
roofline_storent_ins(STRIDE_20,dst,REG_20) \
roofline_loadnt_ins(STRIDE_21,src,REG_21) \
roofline_storent_ins(STRIDE_21,dst,REG_21) \
roofline_loadnt_ins(STRIDE_22,src,REG_22) \
roofline_storent_ins(STRIDE_22,dst,REG_22) \
roofline_loadnt_ins(STRIDE_23,src,REG_23) \
roofline_storent_ins(STRIDE_23,dst,REG_23) \
roofline_loadnt_ins(STRIDE_24,src,REG_24) \
roofline_storent_ins(STRIDE_24,dst,REG_24) \
roofline_loadnt_ins(STRIDE_25,src,REG_25) \
roofline_storent_ins(STRIDE_25,dst,REG_25) \
roofline_loadnt_ins(STRIDE_26,src,REG_26) \
roofline_storent_ins(STRIDE_26,dst,REG_26) \
roofline_loadnt_ins(STRIDE_27,src,REG_27) \
roofline_storent_ins(STRIDE_27,dst,REG_27) \
roofline_loadnt_ins(STRIDE_28,src,REG_28) \
roofline_storent_ins(STRIDE_28,dst,REG_28) \
roofline_loadnt_ins(STRIDE_29,src,REG_29) \
roofline_storent_ins(STRIDE_29,dst,REG_29)
copy_read(STRIDE_0,src,REG_0) \
copy_write(STRIDE_0,dst,REG_0) \
copy_read(STRIDE_1,src,REG_1) \
copy_write(STRIDE_1,dst,REG_1) \
copy_read(STRIDE_2,src,REG_2) \
copy_write(STRIDE_2,dst,REG_2) \
copy_read(STRIDE_3,src,REG_3) \
copy_write(STRIDE_3,dst,REG_3) \
copy_read(STRIDE_4,src,REG_4) \
copy_write(STRIDE_4,dst,REG_4) \
copy_read(STRIDE_5,src,REG_5) \
copy_write(STRIDE_5,dst,REG_5) \
copy_read(STRIDE_6,src,REG_6) \
copy_write(STRIDE_6,dst,REG_6) \
copy_read(STRIDE_7,src,REG_7) \
copy_write(STRIDE_7,dst,REG_7) \
copy_read(STRIDE_8,src,REG_8) \
copy_write(STRIDE_8,dst,REG_8) \
copy_read(STRIDE_9,src,REG_9) \
copy_write(STRIDE_9,dst,REG_9) \
copy_read(STRIDE_10,src,REG_10) \
copy_write(STRIDE_10,dst,REG_10) \
copy_read(STRIDE_11,src,REG_11) \
copy_write(STRIDE_11,dst,REG_11) \
copy_read(STRIDE_12,src,REG_12) \
copy_write(STRIDE_12,dst,REG_12) \
copy_read(STRIDE_13,src,REG_13) \
copy_write(STRIDE_13,dst,REG_13) \
copy_read(STRIDE_14,src,REG_14) \
copy_write(STRIDE_14,dst,REG_14) \
copy_read(STRIDE_15,src,REG_15) \
copy_write(STRIDE_15,dst,REG_15) \
copy_read(STRIDE_16,src,REG_16) \
copy_write(STRIDE_16,dst,REG_16) \
copy_read(STRIDE_17,src,REG_17) \
copy_write(STRIDE_17,dst,REG_17) \
copy_read(STRIDE_18,src,REG_18) \
copy_write(STRIDE_18,dst,REG_18) \
copy_read(STRIDE_19,src,REG_19) \
copy_write(STRIDE_19,dst,REG_19) \
copy_read(STRIDE_20,src,REG_20) \
copy_write(STRIDE_20,dst,REG_20) \
copy_read(STRIDE_21,src,REG_21) \
copy_write(STRIDE_21,dst,REG_21) \
copy_read(STRIDE_22,src,REG_22) \
copy_write(STRIDE_22,dst,REG_22) \
copy_read(STRIDE_23,src,REG_23) \
copy_write(STRIDE_23,dst,REG_23) \
copy_read(STRIDE_24,src,REG_24) \
copy_write(STRIDE_24,dst,REG_24) \
copy_read(STRIDE_25,src,REG_25) \
copy_write(STRIDE_25,dst,REG_25) \
copy_read(STRIDE_26,src,REG_26) \
copy_write(STRIDE_26,dst,REG_26) \
copy_read(STRIDE_27,src,REG_27) \
copy_write(STRIDE_27,dst,REG_27) \
copy_read(STRIDE_28,src,REG_28) \
copy_write(STRIDE_28,dst,REG_28) \
copy_read(STRIDE_29,src,REG_29) \
copy_write(STRIDE_29,dst,REG_29)

void benchmark_copy(roofline_stream dst, roofline_stream src, roofline_output * out, long repeat){
uint64_t c_low0=0, c_low1=0, c_high0=0, c_high1=0;
Expand Down

0 comments on commit 930a4b0

Please sign in to comment.