Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
906a590a
Commit
906a590a
authored
Aug 12, 2010
by
Vladislav Vinogradov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix
parent
60246b9e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
constantspacebp_gpu.cpp
modules/gpu/src/constantspacebp_gpu.cpp
+2
-2
constantspacebp.cu
modules/gpu/src/cuda/constantspacebp.cu
+3
-3
CMakeLists.txt
tests/gpu/CMakeLists.txt
+1
-0
No files found.
modules/gpu/src/constantspacebp_gpu.cpp
View file @
906a590a
...
...
@@ -185,9 +185,9 @@ static void stereo_csbp_gpu_operator(int& ndisp, int& iters, int& levels, int& n
step_pyr
[
0
]
=
data_cost
.
step
/
type_size
;
Size
temp_size
=
data_cost_size
;
if
(
data_cost
.
step
*
data_cost_size
.
height
<
static_cast
<
size_t
>
(
step_pyr
[
levels
-
1
])
*
rows_pyr
[
levels
-
1
]
*
ndisp
)
if
(
data_cost
_size
.
width
*
data_cost_size
.
height
<
static_cast
<
size_t
>
(
step_pyr
[
levels
-
1
])
*
rows_pyr
[
levels
-
1
]
*
ndisp
)
{
temp_size
=
Size
(
step_pyr
[
levels
-
1
],
rows_pyr
[
levels
-
1
]
*
n
r_plane
);
temp_size
=
Size
(
step_pyr
[
levels
-
1
],
rows_pyr
[
levels
-
1
]
*
n
disp
);
}
temp1
.
create
(
temp_size
,
msg_type
);
...
...
modules/gpu/src/cuda/constantspacebp.cu
View file @
906a590a
...
...
@@ -269,7 +269,7 @@ namespace cv { namespace gpu { namespace csbp
const int threadsNum = 256;
const size_t smem_size = threadsNum * sizeof(float);
dim3 threads(winsz, 1, threadsNum
/
winsz);
dim3 threads(winsz, 1, threadsNum
/
winsz);
dim3 grid(w, h, 1);
grid.y *= divUp(ndisp, threads.z);
...
...
@@ -278,7 +278,7 @@ namespace cv { namespace gpu { namespace csbp
case 1: csbp_kernels::data_init<T, winsz, 1><<<grid, threads, smem_size, stream>>>(level, rows, cols, h); break;
case 3: csbp_kernels::data_init<T, winsz, 3><<<grid, threads, smem_size, stream>>>(level, rows, cols, h); break;
default: cv::gpu::error("Unsupported channels count", __FILE__, __LINE__);
}
}
}
typedef void (*DataInitCaller)(int cols, int rows, int w, int h, int level, int ndisp, int channels, const cudaStream_t& stream);
...
...
@@ -419,7 +419,7 @@ namespace cv { namespace gpu { namespace csbp
typedef void (*ComputeDataCostCaller)(const DevMem2D& disp_selected_pyr, const DevMem2D& data_cost,
int h, int w, int level, int nr_plane, int channels, const cudaStream_t& stream);
void compute_data_cost(const DevMem2D& disp_selected_pyr, const DevMem2D& data_cost, size_t msg_step1, size_t msg_step2, int msg_type,
int h, int w, int h2, int level, int nr_plane, int channels, const cudaStream_t& stream)
{
...
...
tests/gpu/CMakeLists.txt
View file @
906a590a
...
...
@@ -22,6 +22,7 @@ include_directories (
"
${
CMAKE_SOURCE_DIR
}
/modules/legacy/include"
"
${
CMAKE_SOURCE_DIR
}
/modules/contrib/include"
"
${
CMAKE_SOURCE_DIR
}
/modules/gpu/include"
"
${
CMAKE_SOURCE_DIR
}
/modules/ml/include"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/src"
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment