diff options
author | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-11-25 00:14:16 -0500 |
---|---|---|
committer | Chris Dyer <cdyer@Chriss-MacBook-Air.local> | 2013-11-25 00:14:16 -0500 |
commit | cdb7f2b26e717bbfe84dbd73f949c6b06ca2b2d7 (patch) | |
tree | 9d845458299fd0f16de20a0f3dbe07cf7dc3e918 /utils/swap_pod.h | |
parent | f2fb69b10a897e8beb4e6e6d6cbb4327096235ef (diff) |
remove dead code, add adagrad crf learner
Diffstat (limited to 'utils/swap_pod.h')
-rw-r--r-- | utils/swap_pod.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/utils/swap_pod.h b/utils/swap_pod.h deleted file mode 100644 index bb9a830d..00000000 --- a/utils/swap_pod.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef SWAP_POD_H -#define SWAP_POD_H - -//for swapping objects of the same concrete type where just swapping their bytes will work. will at least work on plain old data. - -#include <algorithm> // not used, but people who use this will want to bring std::swap in anyway -#include <cstring> - -template <class T> -inline void swap_pod(T &a,T &b) { - using namespace std; - const unsigned s=sizeof(T); - char tmp[s]; - void *pt=(void*)tmp; - void *pa=(void*)&a; - void *pb=(void*)&b; - memcpy(pt,pa,s); - memcpy(pa,pb,s); - memcpy(pb,pt,s); -} - - -#endif |