Skip to content

Commit

Permalink
Added missing DNEW1 in DNEWS example
Browse files Browse the repository at this point in the history
  • Loading branch information
lauriebose committed Sep 22, 2024
1 parent c579c30 commit 4eb20f6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
27 changes: 20 additions & 7 deletions EXAMPLES/EX07_DNEWS.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,27 @@ int main()
scamp5_kernel_end();
}


//Repeatedly perform DNEWS operations on S0 for the selected number of iterations
for(int n = 0 ; n < DNEWS_iterations ; n++)
if(!use_DNEWS1)
{
scamp5_kernel_begin();
DNEWS0(S6,S0);//S6 = DNEWS(S0)
MOV(S0,S6);//Copy the results in S6 back into S0
scamp5_kernel_end();
//Repeatedly perform DNEWS0 operations on S0 for the selected number of iterations
for(int n = 0 ; n < DNEWS_iterations ; n++)
{
scamp5_kernel_begin();
DNEWS0(S6,S0);//S6 = DNEWS(S0)
MOV(S0,S6);//Copy the results in S6 back into S0
scamp5_kernel_end();
}
}
else
{
//Repeatedly perform DNEWS1 operations on S0 for the selected number of iterations
for(int n = 0 ; n < DNEWS_iterations ; n++)
{
scamp5_kernel_begin();
DNEWS1(S6,S0);//S6 = DNEWS(S0)
MOV(S0,S6);//Copy the results in S6 back into S0
scamp5_kernel_end();
}
}


Expand Down
4 changes: 2 additions & 2 deletions scamp5_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
//#include "EXAMPLES/EX_KERNEL_COST.hpp"
//#include "EXAMPLES/EX_OPTIMIZING_AREG_SHIFT.hpp"
//#include "EXAMPLES/EX_RF_AND_RM.hpp"
#include "EXAMPLES/EX_SHAPE_EXTRACTION.hpp"
//#include "EXAMPLES/EX_SHAPE_EXTRACTION.hpp"
//#include "EXAMPLES/EX00_IMAGE_CAPTURE.hpp"
//#include "EXAMPLES/EX01_IMAGE_CAPTURE_AND_AREG.hpp"
//#include "EXAMPLES/EX02_DREG_BASICS.hpp"
//#include "EXAMPLES/EX03_FLAG.hpp"
//#include "EXAMPLES/EX04_IMAGE_THRESHOLDING.hpp"
//#include "EXAMPLES/EX05_AREG_NEWS.hpp"
//#include "EXAMPLES/EX06_SIMPLE_EDGE_DETECTION.hpp"
//#include "EXAMPLES/EX07_DNEWS.hpp"
#include "EXAMPLES/EX07_DNEWS.hpp"
//#include "EXAMPLES/EX08_DREG_SHIFTING.hpp"
//#include "EXAMPLES/EX09_DREG_EXPAND_AND_ERODE.hpp"
//#include "EXAMPLES/EX10_HALF_SCALING.hpp"

0 comments on commit 4eb20f6

Please sign in to comment.