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
f2bbcd36
Commit
f2bbcd36
authored
5 years ago
by
Akash Kothari
Browse files
Options
Downloads
Patches
Plain Diff
Fixed OpenCV path and HPVM function names and arguments
parent
c66ea309
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/tools/hpvm/test/parboil/benchmarks/pipeline/src/visc/main.cc
+13
-13
13 additions, 13 deletions
...ls/hpvm/test/parboil/benchmarks/pipeline/src/visc/main.cc
with
13 additions
and
13 deletions
llvm/tools/hpvm/test/parboil/benchmarks/pipeline/src/visc/main.cc
+
13
−
13
View file @
f2bbcd36
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
*/
*/
#include
"opencv2/opencv.hpp"
#include
"opencv2/opencv.hpp"
#include
"opencv2/
core
/ocl.hpp"
#include
"opencv2/
ocl
/ocl.hpp"
#include
<stdio.h>
#include
<stdio.h>
#include
<math.h>
#include
<math.h>
#include
<stdlib.h>
#include
<stdlib.h>
...
@@ -104,7 +104,7 @@ void laplacianEstimate(float *I, size_t bytesI,
...
@@ -104,7 +104,7 @@ void laplacianEstimate(float *I, size_t bytesI,
float
*
L
,
size_t
bytesL
,
float
*
L
,
size_t
bytesL
,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
DEVICE
);
__visc__hint
(
visc
::
CPU_TARGET
);
//__visc__hint(visc::GPU_TARGET);
//__visc__hint(visc::GPU_TARGET);
__visc__attributes
(
2
,
I
,
B
,
1
,
L
);
__visc__attributes
(
2
,
I
,
B
,
1
,
L
);
// 3x3 image area
// 3x3 image area
...
@@ -179,7 +179,7 @@ void laplacianEstimate(float *I, size_t bytesI,
...
@@ -179,7 +179,7 @@ void laplacianEstimate(float *I, size_t bytesI,
//OutStruct output = {bytesB, bytesL};
//OutStruct output = {bytesB, bytesL};
//if(gx == m-1 && gy == n-1)
//if(gx == m-1 && gy == n-1)
//std::cout << "Exit laplacian\n";
//std::cout << "Exit laplacian\n";
__visc__return
(
m
);
__visc__return
(
1
,
m
);
}
}
void
WrapperlaplacianEstimate
(
float
*
I
,
size_t
bytesI
,
void
WrapperlaplacianEstimate
(
float
*
I
,
size_t
bytesI
,
...
@@ -188,7 +188,7 @@ void WrapperlaplacianEstimate(float *I, size_t bytesI,
...
@@ -188,7 +188,7 @@ void WrapperlaplacianEstimate(float *I, size_t bytesI,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__attributes
(
2
,
I
,
B
,
1
,
L
);
__visc__attributes
(
2
,
I
,
B
,
1
,
L
);
void
*
LNode
=
__visc__createNode
2
D
(
laplacianEstimate
,
m
,
n
);
void
*
LNode
=
__visc__createNode
N
D
(
2
,
laplacianEstimate
,
(
size_t
)
m
,
(
size_t
)
n
);
__visc__bindIn
(
LNode
,
0
,
0
,
0
);
// Bind I
__visc__bindIn
(
LNode
,
0
,
0
,
0
);
// Bind I
__visc__bindIn
(
LNode
,
1
,
1
,
0
);
// Bind bytesI
__visc__bindIn
(
LNode
,
1
,
1
,
0
);
// Bind bytesI
__visc__bindIn
(
LNode
,
2
,
2
,
0
);
// Bind B
__visc__bindIn
(
LNode
,
2
,
2
,
0
);
// Bind B
...
@@ -214,7 +214,7 @@ void computeZeroCrossings(float *L, size_t bytesL,
...
@@ -214,7 +214,7 @@ void computeZeroCrossings(float *L, size_t bytesL,
float
*
B
,
size_t
bytesB
,
float
*
B
,
size_t
bytesB
,
float
*
S
,
size_t
bytesS
,
float
*
S
,
size_t
bytesS
,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
DEVICE
);
__visc__hint
(
visc
::
CPU_TARGET
);
//__visc__hint(visc::SPIR_TARGET);
//__visc__hint(visc::SPIR_TARGET);
__visc__attributes
(
2
,
L
,
B
,
1
,
S
);
__visc__attributes
(
2
,
L
,
B
,
1
,
S
);
...
@@ -291,7 +291,7 @@ void computeZeroCrossings(float *L, size_t bytesL,
...
@@ -291,7 +291,7 @@ void computeZeroCrossings(float *L, size_t bytesL,
//std::cout << "Exit ZC\n";
//std::cout << "Exit ZC\n";
// FIXME: Return bytesG instead of L. RZC nodes expects bytesG
// FIXME: Return bytesG instead of L. RZC nodes expects bytesG
// This is just temporary
// This is just temporary
__visc__return
(
m
);
__visc__return
(
1
,
m
);
}
}
void
WrapperComputeZeroCrossings
(
float
*
L
,
size_t
bytesL
,
void
WrapperComputeZeroCrossings
(
float
*
L
,
size_t
bytesL
,
...
@@ -300,7 +300,7 @@ void WrapperComputeZeroCrossings(float *L, size_t bytesL,
...
@@ -300,7 +300,7 @@ void WrapperComputeZeroCrossings(float *L, size_t bytesL,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__attributes
(
2
,
L
,
B
,
1
,
S
);
__visc__attributes
(
2
,
L
,
B
,
1
,
S
);
void
*
ZCNode
=
__visc__createNode
2
D
(
computeZeroCrossings
,
m
,
n
);
void
*
ZCNode
=
__visc__createNode
N
D
(
2
,
computeZeroCrossings
,
(
size_t
)
m
,
(
size_t
)
n
);
__visc__bindIn
(
ZCNode
,
0
,
0
,
0
);
// Bind L
__visc__bindIn
(
ZCNode
,
0
,
0
,
0
);
// Bind L
__visc__bindIn
(
ZCNode
,
1
,
1
,
0
);
// Bind bytesL
__visc__bindIn
(
ZCNode
,
1
,
1
,
0
);
// Bind bytesL
__visc__bindIn
(
ZCNode
,
2
,
2
,
0
);
// Bind B
__visc__bindIn
(
ZCNode
,
2
,
2
,
0
);
// Bind B
...
@@ -326,7 +326,7 @@ void rejectZeroCrossings(float *S, size_t bytesS,
...
@@ -326,7 +326,7 @@ void rejectZeroCrossings(float *S, size_t bytesS,
float
*
E
,
size_t
bytesE
,
float
*
E
,
size_t
bytesE
,
//float theta, float maxG,
//float theta, float maxG,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
DEVICE
);
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__attributes
(
2
,
S
,
G
,
1
,
E
);
__visc__attributes
(
2
,
S
,
G
,
1
,
E
);
void
*
thisNode
=
__visc__getNode
();
void
*
thisNode
=
__visc__getNode
();
...
@@ -338,7 +338,7 @@ void rejectZeroCrossings(float *S, size_t bytesS,
...
@@ -338,7 +338,7 @@ void rejectZeroCrossings(float *S, size_t bytesS,
E
[
gy
*
n
+
gx
]
=
((
S
[
gy
*
n
+
gx
]
>
0.0
)
&&
(
G
[
gy
*
n
+
gx
]
>
theta
*
maxG
))
?
1.0
:
0.0
;
E
[
gy
*
n
+
gx
]
=
((
S
[
gy
*
n
+
gx
]
>
0.0
)
&&
(
G
[
gy
*
n
+
gx
]
>
theta
*
maxG
))
?
1.0
:
0.0
;
}
}
__visc__return
(
m
);
__visc__return
(
1
,
m
);
}
}
...
@@ -349,7 +349,7 @@ void WrapperRejectZeroCrossings(float *S, size_t bytesS,
...
@@ -349,7 +349,7 @@ void WrapperRejectZeroCrossings(float *S, size_t bytesS,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__hint
(
visc
::
CPU_TARGET
);
__visc__attributes
(
2
,
S
,
G
,
1
,
E
);
__visc__attributes
(
2
,
S
,
G
,
1
,
E
);
void
*
RZCNode
=
__visc__createNode
2
D
(
rejectZeroCrossings
,
m
,
n
);
void
*
RZCNode
=
__visc__createNode
N
D
(
2
,
rejectZeroCrossings
,
(
size_t
)
m
,
(
size_t
)
n
);
__visc__bindIn
(
RZCNode
,
0
,
0
,
0
);
// Bind S
__visc__bindIn
(
RZCNode
,
0
,
0
,
0
);
// Bind S
__visc__bindIn
(
RZCNode
,
1
,
1
,
0
);
// Bind bytesS
__visc__bindIn
(
RZCNode
,
1
,
1
,
0
);
// Bind bytesS
__visc__bindIn
(
RZCNode
,
2
,
2
,
0
);
// Bind G
__visc__bindIn
(
RZCNode
,
2
,
2
,
0
);
// Bind G
...
@@ -375,9 +375,9 @@ void edgeDetection(float *I, size_t bytesI,
...
@@ -375,9 +375,9 @@ void edgeDetection(float *I, size_t bytesI,
float
*
E
,
size_t
bytesE
,
float
*
E
,
size_t
bytesE
,
int
m
,
int
n
)
{
int
m
,
int
n
)
{
__visc__attributes
(
2
,
I
,
B
,
4
,
L
,
S
,
G
,
E
);
__visc__attributes
(
2
,
I
,
B
,
4
,
L
,
S
,
G
,
E
);
void
*
LNode
=
__visc__createNode
(
WrapperlaplacianEstimate
);
void
*
LNode
=
__visc__createNode
ND
(
0
,
WrapperlaplacianEstimate
);
void
*
CZCNode
=
__visc__createNode
(
WrapperComputeZeroCrossings
);
void
*
CZCNode
=
__visc__createNode
ND
(
0
,
WrapperComputeZeroCrossings
);
void
*
RZCNode
=
__visc__createNode
(
WrapperRejectZeroCrossings
);
void
*
RZCNode
=
__visc__createNode
ND
(
0
,
WrapperRejectZeroCrossings
);
// Laplacian Inputs
// Laplacian Inputs
__visc__bindIn
(
LNode
,
0
,
0
,
1
);
// Bind I
__visc__bindIn
(
LNode
,
0
,
0
,
1
);
// Bind I
...
...
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