Changeset 631 for trunk/ADOL-C/include


Ignore:
Timestamp:
Aug 20, 2015 10:53:39 AM (4 years ago)
Author:
kulshres
Message:

get this dllexport/dllimport stuff right finally

apparently static class elements need to be
dllimport-ed in the apps and dllexport-ed in the
library. functions and class methods only need to be
dllexport-ed in the library.

Signed-off-by: Kshitij Kulshreshtha <kshitij@…>

Location:
trunk/ADOL-C/include/adolc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ADOL-C/include/adolc/adtl.h

    r628 r631  
    5050class refcounter {
    5151private:
    52     ADOLC_DLL_EXPORT static size_t refcnt;
    53     friend void setNumDir(const size_t p);
    54     friend void setMode(enum Mode newmode);
     52    ADOLC_DLL_EXPIMP static size_t refcnt;
     53    ADOLC_DLL_EXPORT friend void setNumDir(const size_t p);
     54    ADOLC_DLL_EXPORT friend void setMode(enum Mode newmode);
    5555    friend class adouble;
    5656public:
     
    221221
    222222public:
    223     friend int ADOLC_Init_sparse_pattern(adouble *a, int n,unsigned int start_cnt);
    224     friend int ADOLC_get_sparse_pattern(const adouble *const b, int m, unsigned int **&pat);
    225     friend int ADOLC_get_sparse_jacobian( func_ad *const func, int n, int m, int repeat, double* basepoints, int *nnz, unsigned int **rind, unsigned int **cind, double **values);
     223    ADOLC_DLL_EXPORT friend int ADOLC_Init_sparse_pattern(adouble *a, int n,unsigned int start_cnt);
     224    ADOLC_DLL_EXPORT friend int ADOLC_get_sparse_pattern(const adouble *const b, int m, unsigned int **&pat);
     225    ADOLC_DLL_EXPORT friend int ADOLC_get_sparse_jacobian( func_ad *const func, int n, int m, int repeat, double* basepoints, int *nnz, unsigned int **rind, unsigned int **cind, double **values);
    226226#if 0
    227     friend int ADOLC_get_sparse_jacobian(int n, int m, adouble *x, int *nnz, unsigned int *rind, unsigned int *cind, double *values);
     227    ADOLC_DLL_EXPORT friend int ADOLC_get_sparse_jacobian(int n, int m, adouble *x, int *nnz, unsigned int *rind, unsigned int *cind, double *values);
    228228#endif
    229229    /*******************  i/o operations  *********************************/
    230     friend ostream& operator << ( ostream&, const adouble& );
    231     friend istream& operator >> ( istream&, adouble& );
     230    ADOLC_DLL_EXPORT friend ostream& operator << ( ostream&, const adouble& );
     231    ADOLC_DLL_EXPORT friend istream& operator >> ( istream&, adouble& );
    232232
    233233private:
     
    239239    inline static bool _do_adval();
    240240    inline static bool _do_indo();
    241     ADOLC_DLL_EXPORT static size_t numDir;
    242     ADOLC_DLL_EXPORT static enum Mode forward_mode;
     241    ADOLC_DLL_EXPIMP static size_t numDir;
     242    ADOLC_DLL_EXPIMP static enum Mode forward_mode;
    243243    inline friend void setNumDir(const size_t p);
    244244    inline friend void setMode(enum Mode newmode);
    245245};
    246246
    247 inline void setNumDir(const size_t p);
    248 inline void setMode(enum Mode newmode);
    249 
    250 int ADOLC_Init_sparse_pattern(adouble *a, int n, unsigned int start_cnt);
    251 int ADOLC_get_sparse_pattern(const adouble *const b, int m, unsigned int **&pat);
    252 int ADOLC_get_sparse_jacobian(func_ad *const func,
    253                               int n, int m, int repeat, double* basepoints, int *nnz,
    254                               unsigned int **rind, unsigned int **cind,
    255                               double **values);
    256 #if 0
    257 int ADOLC_get_sparse_jacobian(int n, int m, adouble *x, int *nnz,
    258                               unsigned int *rind, unsigned int *cind,
    259                               double *values);
    260 #endif
    261247}
    262248
  • trunk/ADOL-C/include/adolc/internal/common.h

    r617 r631  
    8888#if defined(ADOLC_DLL)
    8989#       define ADOLC_DLL_EXPORT __declspec(dllexport)
     90#   define ADOLC_DLL_EXPIMP __declspec(dllexport)
     91#elif defined(_MSC_VER)
     92#   define ADOLC_DLL_EXPORT
     93#   define ADOLC_DLL_EXPIMP __declspec(dllimport)
    9094#else
    9195#       define ADOLC_DLL_EXPORT
     96#   define ADOLC_DLL_EXPIMP
    9297#endif
    9398
Note: See TracChangeset for help on using the changeset viewer.