Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
454694c5
Commit
454694c5
authored
Sep 20, 2018
by
Laurențiu Nicola
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'rm-adapters-openthreads' into 'develop'
Remove `Modules/Adapters/OpenThreads` See merge request
!243
parents
3d05e9b0
7cbc9e34
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
298 deletions
+19
-298
Documentation/SoftwareGuide/Latex/Introduction.tex
Documentation/SoftwareGuide/Latex/Introduction.tex
+7
-7
Modules/Adapters/OpenThreadsAdapters/CMakeLists.txt
Modules/Adapters/OpenThreadsAdapters/CMakeLists.txt
+0
-24
Modules/Adapters/OpenThreadsAdapters/include/otbThreads.h
Modules/Adapters/OpenThreadsAdapters/include/otbThreads.h
+0
-46
Modules/Adapters/OpenThreadsAdapters/otb-module.cmake
Modules/Adapters/OpenThreadsAdapters/otb-module.cmake
+0
-34
Modules/Adapters/OpenThreadsAdapters/src/CMakeLists.txt
Modules/Adapters/OpenThreadsAdapters/src/CMakeLists.txt
+0
-30
Modules/Adapters/OpenThreadsAdapters/src/otbThreads.cxx
Modules/Adapters/OpenThreadsAdapters/src/otbThreads.cxx
+0
-33
Modules/Adapters/OpenThreadsAdapters/test/CMakeLists.txt
Modules/Adapters/OpenThreadsAdapters/test/CMakeLists.txt
+0
-35
Modules/Adapters/OpenThreadsAdapters/test/otbOpenThreadsAdaptersTestDriver.cxx
...ThreadsAdapters/test/otbOpenThreadsAdaptersTestDriver.cxx
+0
-26
Modules/Adapters/OpenThreadsAdapters/test/otbThreadsTest.cxx
Modules/Adapters/OpenThreadsAdapters/test/otbThreadsTest.cxx
+0
-30
Modules/Core/Common/test/otbStopwatchTest.cxx
Modules/Core/Common/test/otbStopwatchTest.cxx
+8
-30
Modules/IO/Carto/otb-module.cmake
Modules/IO/Carto/otb-module.cmake
+0
-1
Modules/IO/Carto/test/otbCoordinateToNameTest.cxx
Modules/IO/Carto/test/otbCoordinateToNameTest.cxx
+4
-2
No files found.
Documentation/SoftwareGuide/Latex/Introduction.tex
View file @
454694c5
...
...
@@ -154,7 +154,7 @@ The \code{OTB} contains the following subdirectories:
OTB is organized into different modules, each one covering different part of image processing.
It is therefore important to understand the source code directory structure---found in
\code
{
OTB/Modules
}
---.
\begin{itemize}
\item
\code
{
OTB/Modules/Adapters
}
---Adapters for Boost, Curl, Gdal
, OpenThreads
and Ossim.
\item
\code
{
OTB/Modules/Adapters
}
---Adapters for Boost, Curl, Gdal and Ossim.
\item
\code
{
OTB/Modules/Applications
}
---a set of applications modules that can be launched in different ways
(command-line, graphical interface, Python/Java), refer to the OTB Cookbook for more information.
\item
\code
{
OTB/Modules/Core
}
---core classes, macro definitions,
...
...
@@ -166,16 +166,16 @@ It is therefore important to understand the source code directory structure---fo
instance, pansharpening.
\item
\code
{
OTB/Modules/Hyperspectral
}
---hyperspectral images analysis.
\item
\code
{
OTB/Modules/IO
}
---classes that support the reading
and writing of data.
and writing of data.
\item
\code
{
OTB/Modules/Learning
}
---several functionalities for
supervised learning and classification.
\item
\code
{
OTB/Modules/OBIA
}
---Object Based Image Analysis filters
and data structures.
and data structures.
\item
\code
{
OTB/Modules/Radiometry
}
---classes allowing to compute
vegetation indices and radiometric corrections.
\item
\code
{
OTB/Modules/Registration
}
---classes for registration of images or other data structures to each other.
\item
\code
{
OTB/Modules/Remote
}
---Functions to fetch remote modules.
\item
\code
{
OTB/Modules/Segmentation
}
---several functionalities for image segmentation.
vegetation indices and radiometric corrections.
\item
\code
{
OTB/Modules/Registration
}
---classes for registration of images or other data structures to each other.
\item
\code
{
OTB/Modules/Remote
}
---Functions to fetch remote modules.
\item
\code
{
OTB/Modules/Segmentation
}
---several functionalities for image segmentation.
\item
\code
{
OTB/Modules/ThirdParty
}
---Modules that import OTB's dependencies.
\item
\code
{
OTB/Modules/Wrappers
}
---Applications wrappers with several access points (command-line, QT Gui, SWIG
\ldots
).
\end{itemize}
...
...
Modules/Adapters/OpenThreadsAdapters/CMakeLists.txt
deleted
100644 → 0
View file @
3d05e9b0
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
project
(
OTBOpenThreadsAdapters
)
set
(
OTBOpenThreadsAdapters_LIBRARIES OTBOpenThreadsAdapters
)
otb_module_impl
()
Modules/Adapters/OpenThreadsAdapters/include/otbThreads.h
deleted
100644 → 0
View file @
3d05e9b0
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otbThreads_h
#define otbThreads_h
namespace
otb
{
/** \class Threads
* \brief Operation from open threads that are used in Monteverdi
*
* Implement the sleep operation from openthreads to remove Monteverdi
* dependence to openthreads at compile time.
*
*
* \ingroup OTBOpenThreadsAdapters
*/
class
Threads
{
public:
static
int
Sleep
(
unsigned
int
microsec
);
};
}
// namespace otb
#endif
Modules/Adapters/OpenThreadsAdapters/otb-module.cmake
deleted
100644 → 0
View file @
3d05e9b0
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set
(
DOCUMENTATION
"Adapters for the OpenThreads library (thread interface for
C++)."
)
otb_module
(
OTBOpenThreadsAdapters
DEPENDS
OTBOpenThreads
TEST_DEPENDS
OTBITK
OTBTestKernel
DESCRIPTION
"
${
DOCUMENTATION
}
"
)
Modules/Adapters/OpenThreadsAdapters/src/CMakeLists.txt
deleted
100644 → 0
View file @
3d05e9b0
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set
(
OTBOpenThreadsAdapters_SRC
otbThreads.cxx
)
add_library
(
OTBOpenThreadsAdapters
${
OTBOpenThreadsAdapters_SRC
}
)
target_link_libraries
(
OTBOpenThreadsAdapters
${
OTBOpenThreads_LIBRARIES
}
)
otb_module_target
(
OTBOpenThreadsAdapters
)
Modules/Adapters/OpenThreadsAdapters/src/otbThreads.cxx
deleted
100644 → 0
View file @
3d05e9b0
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "otbThreads.h"
#include <OpenThreads/Thread>
namespace
otb
{
int
Threads
::
Sleep
(
unsigned
int
microsec
)
{
return
OpenThreads
::
Thread
::
microSleep
(
microsec
);
}
}
Modules/Adapters/OpenThreadsAdapters/test/CMakeLists.txt
deleted
100644 → 0
View file @
3d05e9b0
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
otb_module_test
()
set
(
OTBOpenThreadsAdaptersTests
otbOpenThreadsAdaptersTestDriver.cxx
otbThreadsTest.cxx
)
add_executable
(
otbOpenThreadsAdaptersTestDriver
${
OTBOpenThreadsAdaptersTests
}
)
target_link_libraries
(
otbOpenThreadsAdaptersTestDriver
${
OTBOpenThreadsAdapters-Test_LIBRARIES
}
)
otb_module_target_label
(
otbOpenThreadsAdaptersTestDriver
)
# Tests Declaration
otb_add_test
(
NAME ioTvThreadsTest COMMAND otbOpenThreadsAdaptersTestDriver otbThreadsTest
)
Modules/Adapters/OpenThreadsAdapters/test/otbOpenThreadsAdaptersTestDriver.cxx
deleted
100644 → 0
View file @
3d05e9b0
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "otbTestMain.h"
void
RegisterTests
()
{
REGISTER_TEST
(
otbThreadsTest
);
}
Modules/Adapters/OpenThreadsAdapters/test/otbThreadsTest.cxx
deleted
100644 → 0
View file @
3d05e9b0
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <cstdlib>
#include "otbThreads.h"
#include "itkMacro.h"
int
otbThreadsTest
(
int
itkNotUsed
(
argc
),
char
*
itkNotUsed
(
argv
)
[])
{
otb
::
Threads
::
Sleep
(
10
);
return
EXIT_SUCCESS
;
}
Modules/Core/Common/test/otbStopwatchTest.cxx
View file @
454694c5
...
...
@@ -20,18 +20,17 @@
#include <cassert>
#include <chrono>
#include <iostream>
#include <cstdlib>
#if 0
#include <unistd.h>
#include "itkTimeProbe.h"
#endif
#include <thread>
#include "itkMacro.h"
#include "otbStopwatch.h"
using
namespace
std
::
chrono_literals
;
int
otbStopwatchTest
(
int
itkNotUsed
(
argc
),
char
*
itkNotUsed
(
argv
)[])
{
otb
::
Stopwatch
sw
;
...
...
@@ -51,42 +50,21 @@ int otbStopwatchTest(int itkNotUsed(argc), char * itkNotUsed(argv)[])
assert
(
sw
.
IsRunning
()
);
sw
.
Stop
();
#if 0
// We have no portable sleep() and otbThreads is not linked here
sw
.
Start
();
usleep(500 * 1000
);
std
::
this_thread
::
sleep_for
(
500ms
);
sw
.
Stop
();
assert
(
sw
.
GetElapsedMilliseconds
()
>
450
&&
sw
.
GetElapsedMilliseconds
()
<
550
);
sw
.
Start
();
usleep(500 * 1000
);
std
::
this_thread
::
sleep_for
(
500ms
);
sw
.
Stop
();
assert
(
sw
.
GetElapsedMilliseconds
()
>
900
&&
sw
.
GetElapsedMilliseconds
()
<
1100
);
sw
.
Restart
();
usleep(500 * 1000
);
std
::
this_thread
::
sleep_for
(
500ms
);
sw
.
Stop
();
assert
(
sw
.
GetElapsedMilliseconds
()
>
450
&&
sw
.
GetElapsedMilliseconds
()
<
550
);
const int iterations = 100000;
sw.Restart();
for (int i = 0; i < iterations; i++)
{
itk::TimeProbe chrono;
chrono.Start();
chrono.Stop();
}
std::cerr << "itk::TimeProbe time: " << sw.GetElapsedMilliseconds() << std::endl;
sw.Restart();
for (int i = 0; i < iterations; i++)
{
auto chrono = otb::Stopwatch::StartNew();
chrono.Stop();
}
std::cerr << "otb::Stopwatch time: " << sw.GetElapsedMilliseconds() << std::endl;
#endif
return
EXIT_SUCCESS
;
}
Modules/IO/Carto/otb-module.cmake
View file @
454694c5
...
...
@@ -43,7 +43,6 @@ ENABLE_SHARED
TEST_DEPENDS
OTBCommandLineParser
OTBOpenThreadsAdapters
OTBTestKernel
DESCRIPTION
...
...
Modules/IO/Carto/test/otbCoordinateToNameTest.cxx
View file @
454694c5
...
...
@@ -21,11 +21,12 @@
#include <fstream>
#include <chrono>
#include <cstdlib>
#include <thread>
#include "otbCoordinateToName.h"
#include "otbCurlHelperStub.h"
#include "otbThreads.h"
int
otbCoordinateToNameTest
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -50,9 +51,10 @@ int otbCoordinateToNameTest(int argc, char* argv[])
if
((
argc
>
4
)
&&
atoi
(
argv
[
4
])
==
1
)
{
using
namespace
std
::
chrono_literals
;
conv
->
MultithreadOn
();
conv
->
Evaluate
();
otb
::
T
hread
s
::
S
leep
(
10000000
);
//Make sure that the web request has the time to complete
std
::
this_t
hread
::
s
leep
_for
(
10s
);
}
else
{
...
...
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