Skip to content

Commit d5d50e7

Browse files
author
Carsten Griwodz
committed
[sift] remove some code that is now dead
1 parent 65c5c8b commit d5d50e7

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

src/popsift/s_pyramid_build.cu

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,7 @@ void make_dog( cudaTextureObject_t src_data,
9696
__host__
9797
inline void Pyramid::horiz_from_input_image( const Config& conf, ImageBase* base, cudaStream_t stream )
9898
{
99-
// Variable octave is a leftover of a parameter from the attempt to create
100-
// the top level of every octave directly from the upscaled input
101-
const int octave = 0;
102-
103-
Octave& oct_obj = _octaves[octave];
99+
Octave& oct_obj = _octaves[0];
104100

105101
const int width = oct_obj.getWidth();
106102
const int height = oct_obj.getHeight();
@@ -113,8 +109,8 @@ inline void Pyramid::horiz_from_input_image( const Config& conf, ImageBase* base
113109
const Config::SiftMode& mode = conf.getSiftMode();
114110
float shift = 0.5f;
115111

116-
if( octave == 0 && ( mode == Config::PopSift || mode == Config::VLFeat ) ) {
117-
shift = 0.5f * powf( 2.0f, conf.getUpscaleFactor() - octave );
112+
if( mode == Config::PopSift || mode == Config::VLFeat ) {
113+
shift = 0.5f * powf( 2.0f, conf.getUpscaleFactor() );
118114
}
119115

120116
gauss::normalizedSource::horiz
@@ -123,7 +119,6 @@ inline void Pyramid::horiz_from_input_image( const Config& conf, ImageBase* base
123119
oct_obj.getIntermediateSurface(),
124120
width,
125121
height,
126-
octave,
127122
shift );
128123

129124
POP_SYNC_CHK;

src/popsift/s_pyramid_build_ra.cu

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,15 @@ void horiz( cudaTextureObject_t src_linear_tex,
1919
cudaSurfaceObject_t dst_data,
2020
int dst_w,
2121
int dst_h,
22-
int octave,
2322
float shift )
2423
{
25-
// Create level-0 for the first octave from the input image.
26-
// TODO: octave is always 0
27-
// remove the unused levels of d_gauss.dd.span and d_gauss.dd.filter
28-
2924
const int write_x = blockIdx.x * blockDim.x + threadIdx.x;
3025
const int write_y = blockIdx.y;
3126

3227
if( write_x >= dst_w ) return;
3328

34-
const int span = d_gauss.dd.span[octave];
35-
const float* filter = &d_gauss.dd.filter[octave*GAUSS_ALIGN];
29+
const int span = d_gauss.dd.span[0];
30+
const float* filter = &d_gauss.dd.filter[0];
3631
const float read_x = ( blockIdx.x * blockDim.x + threadIdx.x + shift ) / dst_w;
3732
const float read_y = ( blockIdx.y + shift ) / dst_h;
3833

src/popsift/s_pyramid_build_ra.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ __global__ void horiz(cudaTextureObject_t src_data,
1515
cudaSurfaceObject_t dst_data,
1616
int dst_w,
1717
int dst_h,
18-
int octave,
1918
float shift);
2019

2120
__global__ void horiz_level(cudaTextureObject_t src_linear_tex,

0 commit comments

Comments
 (0)