Commit 8a86bd567ff19f0cfd12ea43ee6ed319c5f8e40e

Authored by David Mayerich
1 parent bba4f4d9

changed rts namespace to stim

cuda/devices.h
... ... @@ -3,7 +3,7 @@
3 3  
4 4 #include <cuda.h>
5 5  
6   -namespace rts{
  6 +namespace stim{
7 7  
8 8 int maxThreadsPerBlock()
9 9 {
... ... @@ -15,4 +15,4 @@ int maxThreadsPerBlock()
15 15 }
16 16 } //end namespace rts
17 17  
18   -#endif
19 18 \ No newline at end of file
  19 +#endif
... ...
envi/bil.h
... ... @@ -6,7 +6,7 @@
6 6 #include <cstring>
7 7 #include <utility>
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10  
11 11 template <typename T>
12 12  
... ...
envi/binary.h
... ... @@ -8,7 +8,7 @@
8 8 #include <fstream>
9 9 #include <sys/stat.h>
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 //This class contains a bunch of functions useful for multidimensional binary file access
14 14 template< typename T, unsigned int D = 3 >
... ...
envi/bip.h
... ... @@ -7,7 +7,7 @@
7 7 #include <cstring>
8 8 #include <utility>
9 9  
10   -namespace rts{
  10 +namespace stim{
11 11  
12 12 template <typename T>
13 13  
... ... @@ -438,7 +438,7 @@ public:
438 438 //first creat a temporary bil file and convert bip file to bil file
439 439 bil(temp);
440 440  
441   - rts::bil<T> n;
  441 + stim::bil<T> n;
442 442 if(n.open(temp, R[0], R[1], R[2], offset, w)==false){ //open infile
443 443 std::cout<<"ERROR: unable to open input file"<<std::endl;
444 444 exit(1);
... ...
envi/bsq.h
... ... @@ -8,7 +8,7 @@
8 8 #include <utility>
9 9 #include <vector>
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 template <typename T>
14 14  
... ... @@ -274,7 +274,7 @@ public:
274 274 //first creat a temporary bil file and convert bsq file to bil file
275 275 bil(temp);
276 276  
277   - rts::bil<T> n;
  277 + stim::bil<T> n;
278 278 if(n.open(temp, R[0], R[1], R[2], offset, w)==false){ //open infile
279 279 std::cout<<"ERROR: unable to open input file"<<std::endl;
280 280 exit(1);
... ...
envi/envi.h
... ... @@ -6,7 +6,7 @@
6 6 #include "../envi/bip.h"
7 7 #include "../envi/bil.h"
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10  
11 11 //container class for an ENVI binary file reader
12 12 class envi{
... ... @@ -173,7 +173,7 @@ public:
173 173 }
174 174  
175 175 //perform conversion
176   - bool convert(std::string outfile, rts::envi_header::interleaveType interleave){
  176 + bool convert(std::string outfile, stim::envi_header::interleaveType interleave){
177 177  
178 178 if(header.interleave == envi_header::BSQ){ //if the infile is bsq file
179 179  
... ...
envi/envi_header.h
... ... @@ -11,7 +11,7 @@
11 11 //information from an ENVI header file
12 12 //A good resource can be found here: http://www.exelisvis.com/docs/enviheaderfiles.html
13 13  
14   -namespace rts{
  14 +namespace stim{
15 15  
16 16 struct envi_header
17 17 {
... ...
gl/texture.h
... ... @@ -6,7 +6,7 @@
6 6 #include "rts/gl/error.h"
7 7 #include <stdlib.h>
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10  
11 11 ///This class stores an OpenGL texture map and is used by rts_glShaderProgram.
12 12 class glTexture
... ...
math/bessel.h
... ... @@ -8,7 +8,7 @@
8 8 #define el 0.5772156649015329
9 9  
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 static complex<double> cii(0.0,1.0);
14 14 static complex<double> cone(1.0,0.0);
... ... @@ -1512,4 +1512,4 @@ int cbessjyva_sph(int v,complex&lt;P&gt; z,P &amp;vm,complex&lt;P&gt;*cjv,
1512 1512 } //end namespace rts
1513 1513  
1514 1514  
1515   -#endif
1516 1515 \ No newline at end of file
  1516 +#endif
... ...
math/complex.h
... ... @@ -11,7 +11,7 @@ and can therefore be used in CUDA code and on CUDA devices.
11 11 #include <sstream>
12 12 #include <iostream>
13 13  
14   -namespace rts
  14 +namespace stim
15 15 {
16 16  
17 17 template <class T>
... ...
math/complexfield.cuh
... ... @@ -8,7 +8,7 @@
8 8 #include "../math/complex.h"
9 9 #include "../math/realfield.cuh"
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 template<typename T>
14 14 __global__ void gpu_complexfield_mag(T* dest, complex<T>* source, unsigned int r0, unsigned int r1){
... ...
math/constants.h
1 1 #ifndef RTS_CONSTANTS_H
2 2 #define RTS_CONSTANTS_H
3 3  
4   -#define rtsPI 3.14159
5   -#define rtsTAU 2 * rtsPI
  4 +#define stimPI 3.14159
  5 +#define stimTAU 2 * rtsPI
6 6  
7   -#endif
8 7 \ No newline at end of file
  8 +#endif
... ...
math/field.cuh
... ... @@ -15,7 +15,7 @@
15 15 #include "../visualization/colormap.h"
16 16  
17 17  
18   -namespace rts{
  18 +namespace stim{
19 19  
20 20 //multiply R = X * Y
21 21 template<typename T>
... ...
math/function.h
... ... @@ -3,7 +3,7 @@
3 3  
4 4 #include <string>
5 5  
6   -namespace rts{
  6 +namespace stim{
7 7  
8 8 //template class for a one-dimensional function
9 9 template <class Tx, class Ty>
... ...
math/legendre.h
... ... @@ -3,7 +3,7 @@
3 3  
4 4 #include "rts/cuda/callable.h"
5 5  
6   -namespace rts{
  6 +namespace stim{
7 7  
8 8 template <typename T>
9 9 CUDA_CALLABLE void init_legendre(T x, T& P0, T& P1)
... ...
math/matrix.h
... ... @@ -7,8 +7,7 @@
7 7 #include "vector.h"
8 8 #include "../cuda/callable.h"
9 9  
10   -namespace rts
11   -{
  10 +namespace stim{
12 11  
13 12 template <class T, int N>
14 13 struct matrix
... ...
math/plane.h
... ... @@ -6,14 +6,14 @@
6 6 #include "rts/cuda/callable.h"
7 7  
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10 template <typename T, int D> class plane;
11 11 }
12 12  
13 13 template <typename T, int D>
14   -CUDA_CALLABLE rts::plane<T, D> operator-(rts::plane<T, D> v);
  14 +CUDA_CALLABLE stim::plane<T, D> operator-(stim::plane<T, D> v);
15 15  
16   -namespace rts{
  16 +namespace stim{
17 17  
18 18 template <class T, int D = 3>
19 19 class plane{
... ... @@ -176,4 +176,4 @@ public:
176 176  
177 177  
178 178  
179   -#endif
180 179 \ No newline at end of file
  180 +#endif
... ...
math/quad.h
... ... @@ -10,7 +10,7 @@
10 10 #include <iomanip>
11 11 #include <algorithm>
12 12  
13   -namespace rts{
  13 +namespace stim{
14 14  
15 15 //template for a quadangle class in ND space
16 16 template <class T, int N = 3>
... ...
math/quaternion.h
... ... @@ -4,7 +4,7 @@
4 4 #include "../math/matrix.h"
5 5 #include "../cuda/callable.h"
6 6  
7   -namespace rts{
  7 +namespace stim{
8 8  
9 9 template<typename T>
10 10 class quaternion
... ...
math/realfield.cuh
... ... @@ -33,7 +33,7 @@ __global__ void gpu_gaussian(T* dest, unsigned int r0, unsigned int r1, T mean,
33 33 dest[i] = fx * fy * fz;
34 34 }*/
35 35  
36   -namespace rts{
  36 +namespace stim{
37 37  
38 38 //multiply R = X * Y
39 39 template<typename T>
... ... @@ -293,4 +293,4 @@ public:
293 293 } //end namespace rts
294 294  
295 295  
296   -#endif
297 296 \ No newline at end of file
  297 +#endif
... ...
math/rect.h
... ... @@ -10,7 +10,7 @@
10 10 #include <iomanip>
11 11 #include <algorithm>
12 12  
13   -namespace rts{
  13 +namespace stim{
14 14  
15 15 //template for a rectangle class in ND space
16 16 template <class T, int N = 3>
... ...
math/triangle.h
... ... @@ -6,7 +6,7 @@
6 6 #include "../math/vector.h"
7 7 #include <iostream>
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10  
11 11 template <class T, int N=3>
12 12 struct triangle
... ...
math/vector.h
... ... @@ -8,7 +8,7 @@
8 8 #include "../cuda/callable.h"
9 9  
10 10  
11   -namespace rts
  11 +namespace stim
12 12 {
13 13  
14 14  
... ... @@ -257,7 +257,7 @@ struct vec
257 257 } //end namespace rts
258 258  
259 259 template <typename T, int N>
260   -std::ostream& operator<<(std::ostream& os, rts::vec<T, N> v)
  260 +std::ostream& operator<<(std::ostream& os, stim::vec<T, N> v)
261 261 {
262 262 os<<v.str();
263 263 return os;
... ... @@ -266,9 +266,9 @@ std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, rts::vec&lt;T, N&gt; v)
266 266  
267 267  
268 268 template <typename T, int N>
269   -CUDA_CALLABLE rts::vec<T, N> operator*(T lhs, rts::vec<T, N> rhs)
  269 +CUDA_CALLABLE stim::vec<T, N> operator*(T lhs, stim::vec<T, N> rhs)
270 270 {
271   - rts::vec<T, N> r;
  271 + stim::vec<T, N> r;
272 272  
273 273 return rhs * lhs;
274 274 }
... ...
optics/beam.h
... ... @@ -6,7 +6,7 @@
6 6 #include "../optics/planewave.h"
7 7 #include <vector>
8 8  
9   -namespace rts{
  9 +namespace stim{
10 10  
11 11 template<typename P>
12 12 class beam : public planewave<P>
... ... @@ -200,4 +200,4 @@ public:
200 200  
201 201 }
202 202  
203   -#endif
204 203 \ No newline at end of file
  204 +#endif
... ...
optics/efield.cuh
... ... @@ -10,7 +10,7 @@
10 10 #include "../math/rect.h"
11 11  
12 12  
13   -namespace rts{
  13 +namespace stim{
14 14  
15 15 template<typename T>
16 16 __global__ void gpu_planewave2efield(complex<T>* X, complex<T>* Y, complex<T>* Z, unsigned int r0, unsigned int r1,
... ... @@ -406,4 +406,4 @@ public:
406 406  
407 407 } //end namespace rts
408 408  
409   -#endif
410 409 \ No newline at end of file
  410 +#endif
... ...
optics/esphere.cuh
... ... @@ -8,7 +8,7 @@
8 8 #include "../cuda/devices.h"
9 9 #include "../optics/efield.cuh"
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 /* This class implements a discrete representation of an electromagnetic field
14 14 in 2D scattered by a sphere. This class implements Mie scattering.
... ... @@ -17,7 +17,7 @@ template&lt;typename P&gt;
17 17 class esphere : public efield<P>
18 18 {
19 19 private:
20   - rts::complex<P> n; //sphere refractive index
  20 + stim::complex<P> n; //sphere refractive index
21 21 P a; //sphere radius
22 22  
23 23 //parameters dependent on wavelength
... ... @@ -159,4 +159,4 @@ public:
159 159  
160 160 } //end namespace rts
161 161  
162   -#endif
163 162 \ No newline at end of file
  163 +#endif
... ...
optics/halfspace.cuh
... ... @@ -4,7 +4,7 @@
4 4 #include "../math/plane.h"
5 5  
6 6  
7   -namespace rts{
  7 +namespace stim{
8 8  
9 9 //GPU kernel to compute the electric field
10 10 template<typename T>
... ... @@ -336,4 +336,4 @@ public:
336 336 }
337 337  
338 338  
339   -#endif
340 339 \ No newline at end of file
  340 +#endif
... ...
optics/material.h
... ... @@ -12,7 +12,7 @@
12 12 #include "../math/constants.h"
13 13 #include "../math/function.h"
14 14  
15   -namespace rts{
  15 +namespace stim{
16 16  
17 17 //Material class - default representation for the material property is the refractive index (RI)
18 18 template<typename T>
... ...
optics/mirst-1d.cuh
... ... @@ -8,7 +8,7 @@
8 8 #include <vector>
9 9 #include <sstream>
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 //this function writes a sinc function to "dest" such that an iFFT produces a slab
14 14 template<typename T>
... ...
optics/planewave.h
... ... @@ -8,13 +8,13 @@
8 8 #include "../math/quaternion.h"
9 9 #include "../math/constants.h"
10 10 #include "../math/plane.h"
11   -#include "rts/cuda/callable.h"
  11 +#include "../cuda/callable.h"
12 12  
13 13 /*Basic conversions used here (assuming a vacuum)
14 14 lambda =
15 15 */
16 16  
17   -namespace rts{
  17 +namespace stim{
18 18  
19 19 template<typename T>
20 20 class planewave{
... ... @@ -315,4 +315,4 @@ std::ostream&amp; operator&lt;&lt;(std::ostream&amp; os, rts::planewave&lt;T&gt; p)
315 315 return os;
316 316 }
317 317  
318   -#endif
319 318 \ No newline at end of file
  319 +#endif
... ...
visualization/camera.h
1   -#include <rts/math/vector.h>
2   -#include <rts/math/point.h>
3   -#include <rts/math/quaternion.h>
4   -#include <rts/math/matrix.h>
  1 +#include <../math/vector.h>
  2 +#include <../math/point.h>
  3 +#include <../math/quaternion.h>
  4 +#include <../math/matrix.h>
5 5  
6 6 #include <ostream>
7 7  
8   -#ifndef RTS_CAMERA_H
9   -#define RTS_CAMERA_H
  8 +#ifndef STIM_CAMERA_H
  9 +#define STIM_CAMERA_H
10 10  
11   -namespace rts{
  11 +namespace stim{
12 12  
13 13 class camera
14 14 {
... ...
visualization/colormap.h
1   -#ifndef RTS_COLORMAP_H
2   -#define RTS_COLORMAP_H
  1 +#ifndef STIM_COLORMAP_H
  2 +#define STIM_COLORMAP_H
3 3  
4 4 #include <string>
5 5 #include <stdlib.h>
... ... @@ -30,7 +30,7 @@ texture&lt;float4, cudaTextureType1D&gt; cudaTexBrewer;
30 30 static cudaArray* gpuBrewer;
31 31 #endif
32 32  
33   -namespace rts{
  33 +namespace stim{
34 34  
35 35 enum colormapType {cmBrewer, cmGrayscale, cmRainbow};
36 36  
... ...