Advertisement
Guest User

-03 single_channel_add_const

a guest
Nov 2nd, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.02 KB | None | 0 0
  1. 42:../src/test.cpp ****
  2. 43:../src/test.cpp **** double single_channel_add_const(int patch_top_left_row, int patch_top_left_col, int image_hash_key,
  3. 44:../src/test.cpp **** Mat* preloaded_images,
  4. 45:../src/test.cpp **** int* random_values){
  5. 46:../src/test.cpp **** //
  6. 47:../src/test.cpp ****
  7. 48:../src/test.cpp ****
  8. 49:../src/test.cpp **** int first_pixel_row = 5 + random_values[0];
  9. 50:../src/test.cpp **** int first_pixel_col = 6 + random_values[1];
  10. 51:../src/test.cpp **** int second_pixel_row = 8 + random_values[2];
  11. 52:../src/test.cpp **** int second_pixel_col = 10 + random_values[3];
  12. 53:../src/test.cpp ****
  13. 54:../src/test.cpp **** int channel = random_values[4];
  14. 55:../src/test.cpp ****
  15. 56:../src/test.cpp **** Vec3b* first_pixel_bgr = preloaded_images[image_hash_key].ptr<Vec3b>(first_pixel_row, first_pixel_
  16. 57:../src/test.cpp **** Vec3b* second_pixel_bgr = preloaded_images[image_hash_key].ptr<Vec3b>(second_pixel_row, second_pix
  17. 58:../src/test.cpp ****
  18. 59:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  19. 60:../src/test.cpp **** }
  20. 61:../src/test.cpp ****
  21. 62:../src/test.cpp ****
  22. 63:../src/test.cpp ****
  23. 64:../src/test.cpp **** int main() {
  24. 65:../src/test.cpp ****
  25. 66:../src/test.cpp **** string filename = string("/home/aly/Datasets/CamSeq01_mini_test/0016E5_08101.png");
  26. 67:../src/test.cpp **** Mat img = imread(filename, CV_LOAD_IMAGE_COLOR);
  27. 68:../src/test.cpp **** Mat preloaded_images[1];
  28. 69:../src/test.cpp **** preloaded_images[0] = img;
  29. 70:../src/test.cpp **** int random_values[5];
  30. 71:../src/test.cpp **** random_values[0] = 2;
  31. 72:../src/test.cpp **** random_values[1] = 1;
  32. 73:../src/test.cpp **** random_values[2] = 1;
  33. 74:../src/test.cpp **** random_values[3] = 2;
  34. GAS LISTING /tmp/ccX058Mu.s page 14
  35.  
  36.  
  37. 75:../src/test.cpp **** random_values[4] = 3;
  38. 76:../src/test.cpp ****
  39. 77:../src/test.cpp **** int max_rows = img.rows -1;
  40. 78:../src/test.cpp **** int max_cols = img.cols -1;
  41. 79:../src/test.cpp **** int t = clock();
  42. 80:../src/test.cpp ****
  43. 81:../src/test.cpp **** for(int i = 0; i < 100000000; i++){
  44. 82:../src/test.cpp **** double v = single_channel_add_const(
  45. 83:../src/test.cpp **** get_random_number_in_range(0, max_rows),
  46. 84:../src/test.cpp **** get_random_number_in_range(0, max_cols),
  47. 85:../src/test.cpp **** 0,
  48. 86:../src/test.cpp **** preloaded_images, random_values);
  49. 87:../src/test.cpp ****
  50. 88:../src/test.cpp **** }
  51. 89:../src/test.cpp ****
  52. 90:../src/test.cpp **** cout << "finished it took " << t << " ticks and " << ((float)t)/CLOCKS_PER_SEC << "seconds " << en
  53. 91:../src/test.cpp **** return 0;
  54. 92:../src/test.cpp **** }
  55. 179 .loc 2 92 0
  56. 180 005c 488B4148 movq 72(%rcx), %rax
  57. 181 .LVL13:
  58. 182 0060 488B5110 movq 16(%rcx), %rdx
  59. 183 .LVL14:
  60. 184 .LBB297:
  61. 185 .LBB298:
  62. 186 .loc 1 460 0
  63. 187 0064 4863F6 movslq %esi, %rsi
  64. 188 .LBE298:
  65. 189 .LBE297:
  66. 190 .LBB300:
  67. 191 .LBB294:
  68. 192 0067 488B08 movq (%rax), %rcx
  69. 193 006a 4C8B4808 movq 8(%rax), %r9
  70. 194 .LVL15:
  71. 195 .LBE294:
  72. 196 .LBE300:
  73. 23:../src/test.cpp **** int first_pixel_row = patch_top_left_row + random_values[0];
  74. 197 .loc 2 23 0
  75. 198 006e 418B00 movl (%r8), %eax
  76. 199 .LBB301:
  77. 200 .LBB295:
  78. 201 .loc 1 460 0
  79. 202 0071 4D0FAFD1 imulq %r9, %r10
  80. 203 .LVL16:
  81. 204 .LBE295:
  82. 205 .LBE301:
  83. 23:../src/test.cpp **** int first_pixel_row = patch_top_left_row + random_values[0];
  84. 206 .loc 2 23 0
  85. 207 0075 01F8 addl %edi, %eax
  86. 25:../src/test.cpp **** int second_pixel_row = patch_top_left_row + random_values[2];
  87. 208 .loc 2 25 0
  88. 209 0077 41037808 addl 8(%r8), %edi
  89. 210 .LVL17:
  90. 211 .LBB302:
  91. 212 .LBB296:
  92. 213 .loc 1 460 0
  93. 214 007b 4898 cltq
  94. GAS LISTING /tmp/ccX058Mu.s page 15
  95.  
  96.  
  97. 215 007d 480FAFC1 imulq %rcx, %rax
  98. 216 .LVL18:
  99. 217 .LBE296:
  100. 218 .LBE302:
  101. 39:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  102. 219 .loc 2 39 0
  103. 220 0081 4901D2 addq %rdx, %r10
  104. 221 .LBB303:
  105. 222 .LBB299:
  106. 223 .loc 1 460 0
  107. 224 0084 490FAFF1 imulq %r9, %rsi
  108. 225 .LVL19:
  109. 226 0088 4863FF movslq %edi, %rdi
  110. 227 008b 480FAFF9 imulq %rcx, %rdi
  111. 228 .LVL20:
  112. 229 .LBE299:
  113. 230 .LBE303:
  114. 39:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  115. 231 .loc 2 39 0
  116. 232 008f 4901C2 addq %rax, %r10
  117. 233 0092 49634010 movslq 16(%r8), %rax
  118. 234 0096 4801D6 addq %rdx, %rsi
  119. 235 0099 4801F7 addq %rsi, %rdi
  120. 236 009c 450FB614 movzbl (%r10,%rax), %r10d
  121. 236 02
  122. 237 00a1 0FB60407 movzbl (%rdi,%rax), %eax
  123. 238 00a5 4401D0 addl %r10d, %eax
  124. 239 00a8 F20F2AC0 cvtsi2sd %eax, %xmm0
  125. 240 .LBE291:
  126. 40:../src/test.cpp **** }
  127. 241 .loc 2 40 0
  128. 242 00ac C3 ret
  129. 243 .cfi_endproc
  130. 244 .LFE4897:
  131. 245 .size _Z18single_channel_addiiiPN2cv3MatEPi, .-_Z18single_channel_addiiiPN2cv3MatEPi
  132. 246 00ad 0F1F00 .p2align 4,,15
  133. 247 .globl _Z24single_channel_add_constiiiPN2cv3MatEPi
  134. 248 .type _Z24single_channel_add_constiiiPN2cv3MatEPi, @function
  135. 249 _Z24single_channel_add_constiiiPN2cv3MatEPi:
  136. 250 .LFB4898:
  137. 45:../src/test.cpp **** int* random_values){
  138. 251 .loc 2 45 0
  139. 252 .cfi_startproc
  140. 253 .LVL21:
  141. 254 .LBB304:
  142. 56:../src/test.cpp **** Vec3b* first_pixel_bgr = preloaded_images[image_hash_key].ptr<Vec3b>(first_pixel_row, first_pixel_
  143. 255 .loc 2 56 0
  144. 256 00b0 4863D2 movslq %edx, %rdx
  145. 257 00b3 488D0452 leaq (%rdx,%rdx,2), %rax
  146. 49:../src/test.cpp **** int first_pixel_row = 5 + random_values[0];
  147. 258 .loc 2 49 0
  148. 259 00b7 418B10 movl (%r8), %edx
  149. 260 .LVL22:
  150. 56:../src/test.cpp **** Vec3b* first_pixel_bgr = preloaded_images[image_hash_key].ptr<Vec3b>(first_pixel_row, first_pixel_
  151. 261 .loc 2 56 0
  152. 262 00ba 48C1E005 salq $5, %rax
  153. 263 00be 4801C1 addq %rax, %rcx
  154. GAS LISTING /tmp/ccX058Mu.s page 16
  155.  
  156.  
  157. 264 .LVL23:
  158. 49:../src/test.cpp **** int first_pixel_row = 5 + random_values[0];
  159. 265 .loc 2 49 0
  160. 266 00c1 83C205 addl $5, %edx
  161. 267 .loc 2 92 0
  162. 268 00c4 488B4148 movq 72(%rcx), %rax
  163. 269 .LVL24:
  164. 270 .LBB305:
  165. 271 .LBB306:
  166. 272 .loc 1 460 0
  167. 273 00c8 4863D2 movslq %edx, %rdx
  168. 274 .LBE306:
  169. 275 .LBE305:
  170. 276 .loc 2 92 0
  171. 277 00cb 488B7110 movq 16(%rcx), %rsi
  172. 278 .LVL25:
  173. 59:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  174. 279 .loc 2 59 0
  175. 280 00cf 49634810 movslq 16(%r8), %rcx
  176. 281 .LBB310:
  177. 282 .LBB307:
  178. 283 .loc 1 460 0
  179. 284 00d3 488B38 movq (%rax), %rdi
  180. 285 .LVL26:
  181. 286 00d6 4C8B4808 movq 8(%rax), %r9
  182. 287 .LVL27:
  183. 288 .LBE307:
  184. 289 .LBE310:
  185. 50:../src/test.cpp **** int first_pixel_col = 6 + random_values[1];
  186. 290 .loc 2 50 0
  187. 291 00da 418B4004 movl 4(%r8), %eax
  188. 292 .LVL28:
  189. 293 .LBB311:
  190. 294 .LBB308:
  191. 295 .loc 1 460 0
  192. 296 00de 480FAFD7 imulq %rdi, %rdx
  193. 297 .LBE308:
  194. 298 .LBE311:
  195. 50:../src/test.cpp **** int first_pixel_col = 6 + random_values[1];
  196. 299 .loc 2 50 0
  197. 300 00e2 83C006 addl $6, %eax
  198. 301 .LBB312:
  199. 302 .LBB309:
  200. 303 .loc 1 460 0
  201. 304 00e5 4898 cltq
  202. 305 00e7 490FAFC1 imulq %r9, %rax
  203. 306 .LBE309:
  204. 307 .LBE312:
  205. 59:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  206. 308 .loc 2 59 0
  207. 309 00eb 4801F0 addq %rsi, %rax
  208. 310 00ee 4801D0 addq %rdx, %rax
  209. 52:../src/test.cpp **** int second_pixel_col = 10 + random_values[3];
  210. 311 .loc 2 52 0
  211. 312 00f1 418B500C movl 12(%r8), %edx
  212. 59:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  213. 313 .loc 2 59 0
  214. GAS LISTING /tmp/ccX058Mu.s page 17
  215.  
  216.  
  217. 314 00f5 440FB614 movzbl (%rax,%rcx), %r10d
  218. 314 08
  219. 51:../src/test.cpp **** int second_pixel_row = 8 + random_values[2];
  220. 315 .loc 2 51 0
  221. 316 00fa 418B4008 movl 8(%r8), %eax
  222. 52:../src/test.cpp **** int second_pixel_col = 10 + random_values[3];
  223. 317 .loc 2 52 0
  224. 318 00fe 83C20A addl $10, %edx
  225. 51:../src/test.cpp **** int second_pixel_row = 8 + random_values[2];
  226. 319 .loc 2 51 0
  227. 320 0101 83C008 addl $8, %eax
  228. 321 .LBB313:
  229. 322 .LBB314:
  230. 323 .loc 1 460 0
  231. 324 0104 4863D2 movslq %edx, %rdx
  232. 325 0107 490FAFD1 imulq %r9, %rdx
  233. 326 010b 4898 cltq
  234. 327 010d 480FAFC7 imulq %rdi, %rax
  235. 328 .LBE314:
  236. 329 .LBE313:
  237. 59:../src/test.cpp **** return (*first_pixel_bgr)[channel] + (*second_pixel_bgr)[channel];
  238. 330 .loc 2 59 0
  239. 331 0111 4801F2 addq %rsi, %rdx
  240. 332 0114 4801D0 addq %rdx, %rax
  241. 333 0117 0FB60408 movzbl (%rax,%rcx), %eax
  242. 334 011b 4401D0 addl %r10d, %eax
  243. 335 011e F20F2AC0 cvtsi2sd %eax, %xmm0
  244. 336 .LBE304:
  245. 60:../src/test.cpp **** }
  246. 337 .loc 2 60 0
  247. 338 0122 C3 ret
  248. 339 .cfi_endproc
  249. 340 .LFE4898:
  250. 341 .size _Z24single_channel_add_constiiiPN2cv3MatEPi, .-_Z24single_channel_add_constiiiPN2cv3MatEPi
  251. 342 .section .rodata.str1.8,"aMS",@progbits,1
  252. 343 .align 8
  253. 344 .LC0:
  254. 345 0000 2F686F6D .string "/home/aly/Datasets/CamSeq01_mini_test/0016E5_08101.png"
  255. 345 652F616C
  256. 345 792F4461
  257. 345 74617365
  258. 345 74732F43
  259. 346 .section .rodata.str1.1,"aMS",@progbits,1
  260. 347 .LC1:
  261. 348 0000 66696E69 .string "finished it took "
  262. 348 73686564
  263. 348 20697420
  264. 348 746F6F6B
  265. 348 2000
  266. 349 .LC2:
  267. 350 0012 20746963 .string " ticks and "
  268. 350 6B732061
  269. 350 6E642000
  270. 351 .LC4:
  271. 352 001e 7365636F .string "seconds "
  272. 352 6E647320
  273. 352 00
  274. GAS LISTING /tmp/ccX058Mu.s page 18
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement