c++ - template class with parameter -


class in program should use fftw library image processing. class should have possibilities work float , double types. purpose implement following construction:

class myclass { ... public:     template <class t>      class ffttypes{ }; ... } 

and include *.inl file in header file "myclass.h" write

template <> class myclass::ffttypes<float>     {     private:         typedef fftwf_plan fft_plan;     public:         typedef fftwf_complex fft_complex;          static fft_complex* fft_malloc(int size     ....     } 

and similar class double type:

template <>  class myclass::ffttypes<double> { private:     typedef fftw_plan fft_plan;  public:     typedef fftw_complex fft_complex;      static fft_complex* fft_malloc(int size) 

today find out should add function in class myclass parameter fft_complex type. surf internet , different sources not find way how can it? have ideas?


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -