diff options
| author | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
|---|---|---|
| committer | leochanj105 <leochanj@live.unc.edu> | 2021-10-26 13:22:32 -0400 |
| commit | 14c854543b1a3cf344a371a5b45595657f95786b (patch) | |
| tree | 70f752880522e5e44669af365754ac0f649dce81 /SD-VBS/benchmarks/disparity/src/c/padarray4.c | |
| parent | 5e2ccfae0532ddd89bcc04bf14aad451e9c79785 (diff) | |
add deadlines and costs
Diffstat (limited to 'SD-VBS/benchmarks/disparity/src/c/padarray4.c')
| -rw-r--r-- | SD-VBS/benchmarks/disparity/src/c/padarray4.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/SD-VBS/benchmarks/disparity/src/c/padarray4.c b/SD-VBS/benchmarks/disparity/src/c/padarray4.c deleted file mode 100644 index 321cad9..0000000 --- a/SD-VBS/benchmarks/disparity/src/c/padarray4.c +++ /dev/null | |||
| @@ -1,41 +0,0 @@ | |||
| 1 | /******************************** | ||
| 2 | Author: Sravanthi Kota Venkata | ||
| 3 | ********************************/ | ||
| 4 | |||
| 5 | #include <stdio.h> | ||
| 6 | #include <stdlib.h> | ||
| 7 | #include <math.h> | ||
| 8 | #include "disparity.h" | ||
| 9 | |||
| 10 | void padarray4(I2D* inMat, I2D* borderMat, int dir, I2D* paddedArray) | ||
| 11 | { | ||
| 12 | int rows, cols, bRows, bCols, newRows, newCols; | ||
| 13 | int i, j; | ||
| 14 | int adir; | ||
| 15 | |||
| 16 | adir = abs(dir); | ||
| 17 | rows = inMat->height; | ||
| 18 | cols = inMat->width; | ||
| 19 | |||
| 20 | bRows = borderMat->data[0]; | ||
| 21 | bCols = borderMat->data[1]; | ||
| 22 | |||
| 23 | newRows = rows + bRows; | ||
| 24 | newCols = cols + bCols; | ||
| 25 | |||
| 26 | if(dir ==1) | ||
| 27 | { | ||
| 28 | for(i=0; i<rows; i++) | ||
| 29 | for(j=0; j<cols; j++) | ||
| 30 | subsref(paddedArray, i, j) = subsref(inMat,i,j); | ||
| 31 | } | ||
| 32 | else | ||
| 33 | { | ||
| 34 | for(i=0; i<rows-bRows; i++) | ||
| 35 | for(j=0; j<cols-bCols; j++) | ||
| 36 | subsref(paddedArray, (bRows+i), (bCols+j)) = subsref(inMat,i,j); | ||
| 37 | } | ||
| 38 | |||
| 39 | return; | ||
| 40 | } | ||
| 41 | |||
