Commit 9f254174 authored by Victor Poughon's avatar Victor Poughon Committed by Guillaume Pasero

WIP: extern templates (add short)

parent 9a3f9a77
......@@ -275,12 +275,18 @@ private:
#endif
namespace otb {
extern template class Image<unsigned int, 2>;
extern template class Image<int, 2>;
extern template class Image<unsigned char, 2>;
extern template class Image<char, 2>;
extern template class Image<float, 2>;
extern template class Image<double, 2>;
// Prevent implicit instanciation of common types to improve build performance
// Explicit instanciations are provided in the .cxx
extern template class Image<unsigned int, 2>;
extern template class Image<int, 2>;
extern template class Image<unsigned char, 2>;
extern template class Image<char, 2>;
extern template class Image<unsigned short, 2>;
extern template class Image<short, 2>;
extern template class Image<float, 2>;
extern template class Image<double, 2>;
}
#endif
......@@ -216,12 +216,18 @@ private:
#endif
namespace otb {
extern template class VectorImage<unsigned int, 2>;
extern template class VectorImage<int, 2>;
extern template class VectorImage<unsigned char, 2>;
extern template class VectorImage<char, 2>;
extern template class VectorImage<float, 2>;
extern template class VectorImage<double, 2>;
// Prevent implicit instanciation of common types to improve build performance
// Explicit instanciations are provided in the .cxx
extern template class VectorImage<unsigned int, 2>;
extern template class VectorImage<int, 2>;
extern template class VectorImage<unsigned char, 2>;
extern template class VectorImage<char, 2>;
extern template class VectorImage<unsigned short, 2>;
extern template class VectorImage<short, 2>;
extern template class VectorImage<float, 2>;
extern template class VectorImage<double, 2>;
}
#endif
......@@ -21,10 +21,14 @@
#include "otbImage.h"
namespace otb {
template class Image<unsigned int, 2>;
template class Image<int, 2>;
template class Image<unsigned char, 2>;
template class Image<char, 2>;
template class Image<float, 2>;
template class Image<double, 2>;
// Explicit instanciation of common types
template class Image<unsigned int, 2>;
template class Image<int, 2>;
template class Image<unsigned char, 2>;
template class Image<char, 2>;
template class Image<unsigned short, 2>;
template class Image<short, 2>;
template class Image<float, 2>;
template class Image<double, 2>;
}
......@@ -21,11 +21,16 @@
#include "otbVectorImage.h"
namespace otb {
template class VectorImage<unsigned int, 2>;
template class VectorImage<int, 2>;
template class VectorImage<unsigned char, 2>;
template class VectorImage<char, 2>;
template class VectorImage<float, 2>;
template class VectorImage<double, 2>;
// Explicit instanciation of common types
template class VectorImage<unsigned int, 2>;
template class VectorImage<int, 2>;
template class VectorImage<unsigned char, 2>;
template class VectorImage<char, 2>;
template class VectorImage<unsigned short, 2>;
template class VectorImage<short, 2>;
template class VectorImage<float, 2>;
template class VectorImage<double, 2>;
}
......@@ -216,13 +216,19 @@ private:
#include "otbVectorImage.h"
namespace otb {
extern template class ImageFileReader<Image<unsigned int, 2>>;
extern template class ImageFileReader<Image<int, 2>>;
extern template class ImageFileReader<Image<unsigned char, 2>>;
extern template class ImageFileReader<Image<char, 2>>;
extern template class ImageFileReader<Image<float, 2>>;
extern template class ImageFileReader<Image<double, 2>>;
// TODO add vector image
// Prevent implicit instanciation of common types to improve build performance
// Explicit instanciations are provided in the .cxx
extern template class ImageFileReader<Image<unsigned int, 2>>;
extern template class ImageFileReader<Image<int, 2>>;
extern template class ImageFileReader<Image<unsigned char, 2>>;
extern template class ImageFileReader<Image<char, 2>>;
extern template class ImageFileReader<Image<unsigned short, 2>>;
extern template class ImageFileReader<Image<short, 2>>;
extern template class ImageFileReader<Image<float, 2>>;
extern template class ImageFileReader<Image<double, 2>>;
// TODO add vector image
}
#endif // otbImageFileReader_h
......@@ -294,13 +294,19 @@ private:
#include "otbVectorImage.h"
namespace otb {
extern template class ImageFileWriter<otb::Image<unsigned int, 2>>;
extern template class ImageFileWriter<otb::Image<int, 2>>;
extern template class ImageFileWriter<otb::Image<unsigned char, 2>>;
extern template class ImageFileWriter<otb::Image<char, 2>>;
extern template class ImageFileWriter<otb::Image<float, 2>>;
extern template class ImageFileWriter<otb::Image<double, 2>>;
// TODO add vector image
// Prevent implicit instanciation of common types to improve build performance
// Explicit instanciations are provided in the .cxx
extern template class ImageFileWriter<otb::Image<unsigned int, 2>>;
extern template class ImageFileWriter<otb::Image<int, 2>>;
extern template class ImageFileWriter<otb::Image<unsigned char, 2>>;
extern template class ImageFileWriter<otb::Image<char, 2>>;
extern template class ImageFileWriter<otb::Image<unsigned short, 2>>;
extern template class ImageFileWriter<otb::Image<short, 2>>;
extern template class ImageFileWriter<otb::Image<float, 2>>;
extern template class ImageFileWriter<otb::Image<double, 2>>;
// TODO add vector image
}
#endif
......@@ -21,10 +21,14 @@
#include "otbImageFileReader.h"
namespace otb {
template class ImageFileReader<otb::Image<unsigned int, 2>>;
template class ImageFileReader<otb::Image<int, 2>>;
template class ImageFileReader<otb::Image<unsigned char, 2>>;
template class ImageFileReader<otb::Image<char, 2>>;
template class ImageFileReader<otb::Image<float, 2>>;
template class ImageFileReader<otb::Image<double, 2>>;
// Explicit instanciation of common types
template class ImageFileReader<otb::Image<unsigned int, 2>>;
template class ImageFileReader<otb::Image<int, 2>>;
template class ImageFileReader<otb::Image<unsigned char, 2>>;
template class ImageFileReader<otb::Image<char, 2>>;
template class ImageFileReader<otb::Image<unsigned short, 2>>;
template class ImageFileReader<otb::Image<short, 2>>;
template class ImageFileReader<otb::Image<float, 2>>;
template class ImageFileReader<otb::Image<double, 2>>;
}
......@@ -21,10 +21,15 @@
#include "otbImageFileWriter.h"
namespace otb {
template class ImageFileWriter<Image<unsigned int, 2>>;
template class ImageFileWriter<Image<int, 2>>;
template class ImageFileWriter<Image<unsigned char, 2>>;
template class ImageFileWriter<Image<char, 2>>;
template class ImageFileWriter<Image<float, 2>>;
template class ImageFileWriter<Image<double, 2>>;
// Explicit instanciation of common types
template class ImageFileWriter<Image<unsigned int, 2>>;
template class ImageFileWriter<Image<int, 2>>;
template class ImageFileWriter<Image<unsigned char, 2>>;
template class ImageFileWriter<Image<char, 2>>;
template class ImageFileWriter<otb::Image<unsigned short, 2>>;
template class ImageFileWriter<otb::Image<short, 2>>;
template class ImageFileWriter<Image<float, 2>>;
template class ImageFileWriter<Image<double, 2>>;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment