Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
6e605fc1
Commit
6e605fc1
authored
7 years ago
by
Prakalp Srivastava
Browse files
Options
Downloads
Patches
Plain Diff
demo ready
parent
08bab65a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/test/VISC/parboil/benchmarks/pipeline/src/visc_parallel/main.cc
+40
-14
40 additions, 14 deletions
...ISC/parboil/benchmarks/pipeline/src/visc_parallel/main.cc
with
40 additions
and
14 deletions
llvm/test/VISC/parboil/benchmarks/pipeline/src/visc_parallel/main.cc
100755 → 100644
+
40
−
14
View file @
6e605fc1
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include
<visc.h>
#include
<visc.h>
#define NUM_RUNS
5
#define NUM_RUNS
100
#define DEPTH 3
#define DEPTH 3
#define HEIGHT 640
#define HEIGHT 640
#define WIDTH 480
#define WIDTH 480
...
@@ -875,6 +875,12 @@ int main (int argc, char *argv[]) {
...
@@ -875,6 +875,12 @@ int main (int argc, char *argv[]) {
int
NUM_FRAMES
=
cap
.
get
(
CV_CAP_PROP_FRAME_COUNT
);
int
NUM_FRAMES
=
cap
.
get
(
CV_CAP_PROP_FRAME_COUNT
);
//NUM_FRAMES = 5;
//NUM_FRAMES = 5;
std
::
cout
<<
"Number of frames = "
<<
NUM_FRAMES
<<
"
\n
"
;
std
::
cout
<<
"Number of frames = "
<<
NUM_FRAMES
<<
"
\n
"
;
// Used to store time after each frame computation is completed
//timeval *timeStamps = (timeval *)malloc(NUM_RUNS*NUM_FRAMES*sizeof(timeval));
//struct timeval tv_start;
//unsigned long cnt = 0; // Counter, for the video frames
namedWindow
(
input_window
,
CV_WINDOW_AUTOSIZE
);
namedWindow
(
input_window
,
CV_WINDOW_AUTOSIZE
);
namedWindow
(
output_window
,
CV_WINDOW_AUTOSIZE
);
namedWindow
(
output_window
,
CV_WINDOW_AUTOSIZE
);
moveWindow
(
input_window
,
POSX_IN
,
POSY_IN
);
moveWindow
(
input_window
,
POSX_IN
,
POSY_IN
);
...
@@ -942,12 +948,12 @@ int main (int argc, char *argv[]) {
...
@@ -942,12 +948,12 @@ int main (int argc, char *argv[]) {
//pb_SwitchToTimer( &timers, pb_TimerID_COMPUTE );
//pb_SwitchToTimer( &timers, pb_TimerID_COMPUTE );
//showInOut(src, E);
//showInOut(src, E);
//
Mat in, out;
Mat
in
,
out
;
//
resize(src, in, Size(HEIGHT, WIDTH));
resize
(
src
,
in
,
Size
(
HEIGHT
,
WIDTH
));
//
resize(E, out, Size(HEIGHT, WIDTH));
resize
(
E
,
out
,
Size
(
HEIGHT
,
WIDTH
));
//
imshow(input_window, in);
imshow
(
input_window
,
in
);
//
imshow(output_window, out);
imshow
(
output_window
,
out
);
//
waitKey(0);
waitKey
(
0
);
//NUM_FRAMES = 20;
//NUM_FRAMES = 20;
pb_SwitchToTimer
(
&
timers
,
visc_TimerID_COMPUTATION
);
pb_SwitchToTimer
(
&
timers
,
visc_TimerID_COMPUTATION
);
...
@@ -972,6 +978,10 @@ int main (int argc, char *argv[]) {
...
@@ -972,6 +978,10 @@ int main (int argc, char *argv[]) {
//imshow(input_window, src);
//imshow(input_window, src);
//imshow(output_window, E);
//imshow(output_window, E);
//waitKey(0);
//waitKey(0);
// Get the time just before computation starts
//gettimeofday(&tv_start,NULL);
for
(
unsigned
j
=
0
;
j
<
NUM_RUNS
;
j
++
)
{
for
(
unsigned
j
=
0
;
j
<
NUM_RUNS
;
j
++
)
{
std
::
cout
<<
"Run: "
<<
j
<<
"
\n
"
;
std
::
cout
<<
"Run: "
<<
j
<<
"
\n
"
;
void
*
DFG
=
__visc__launch
(
1
,
edgeDetection
,
(
void
*
)
args
);
void
*
DFG
=
__visc__launch
(
1
,
edgeDetection
,
(
void
*
)
args
);
...
@@ -1023,14 +1033,16 @@ int main (int argc, char *argv[]) {
...
@@ -1023,14 +1033,16 @@ int main (int argc, char *argv[]) {
//std::cout << "G.data = " << (float*)G.data << "\n";
//std::cout << "G.data = " << (float*)G.data << "\n";
//std::cout << "E.data = " << (float*)E.data << "\n";
//std::cout << "E.data = " << (float*)E.data << "\n";
//std::cout << "Max G = " << *maxG << "\n";
//std::cout << "Max G = " << *maxG << "\n";
//Mat in, out;
//gettimeofday(&timeStamps[cnt], NULL);
//resize(src, in, Size(HEIGHT, WIDTH));
//cnt++;
Mat
in
,
out
;
resize
(
src
,
in
,
Size
(
HEIGHT
,
WIDTH
));
//std::cout << "Show E\n";
//std::cout << "Show E\n";
//
resize(E, out, Size(HEIGHT, WIDTH));
resize
(
E
,
out
,
Size
(
HEIGHT
,
WIDTH
));
//
imshow(output_window, out);
imshow
(
output_window
,
out
);
//
imshow(input_window, in);
imshow
(
input_window
,
in
);
//
waitKey(1);
waitKey
(
1
);
//waitKey(0);
//waitKey(0);
//std::cout << "Show Is\n";
//std::cout << "Show Is\n";
//resize(Is, out, Size(HEIGHT, WIDTH));
//resize(Is, out, Size(HEIGHT, WIDTH));
...
@@ -1080,6 +1092,20 @@ int main (int argc, char *argv[]) {
...
@@ -1080,6 +1092,20 @@ int main (int argc, char *argv[]) {
pb_PrintTimerSet
(
&
timers
);
pb_PrintTimerSet
(
&
timers
);
//const char *fn = "timestamps.txt";
//std::ofstream outfile;
//outfile.open(fn);
//if (!outfile.is_open()) {
//std::cout << "Failed to open " << fn << " for writing\n";
//}
//for (unsigned long i = 0; i < cnt; i++) {
//double elapsed = (timeStamps[i].tv_sec - tv_start.tv_sec) +
//((timeStamps[i].tv_usec - tv_start.tv_usec)/1000000.0);
//outfile << elapsed << "\n";
//}
//free(timeStamps);
//outfile.close();
__visc__cleanup
();
__visc__cleanup
();
//if (params->outFile) {
//if (params->outFile) {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment