/** * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related documentation outside the terms of the EULA * is strictly prohibited. * */ #ifndef NV_UTIL_NPP_SIGNALS_NPP_H #define NV_UTIL_NPP_SIGNALS_NPP_H #include "Exceptions.h" #include "Signal.h" #include "SignalAllocatorsNPP.h" #include namespace npp { // forward declaration template class SignalCPU; template class SignalNPP: public npp::SignalTemplate > { public: SignalNPP() { ; } explicit SignalNPP(size_t nSize): SignalTemplate >(nSize) { ; } SignalNPP(const SignalNPP &rSignal): SignalTemplate >(rSignal) { ; } template explicit SignalNPP(const SignalCPU &rSignal): SignalTemplate >(rSignal.size()) { npp::SignalAllocator::HostToDeviceCopy1D(SignalTemplate >::values(), rSignal.values(), SignalTemplate >::size()); } virtual ~SignalNPP() { ; } SignalNPP & operator= (const SignalNPP &rSignal) { SignalTemplate >::operator= (rSignal); return *this; } void copyTo(D *pValues) const { npp::SignalAllocator::DeviceToHostCopy1D(pValues, SignalTemplate >::values(), SignalTemplate >::size()); } void copyFrom(D *pValues) { npp::SignalAllocator::HostToDeviceCopy1D(SignalTemplate >::values(), pValues, SignalTemplate >::size()); } }; typedef SignalNPP SignalNPP_8u; typedef SignalNPP SignalNPP_16s; typedef SignalNPP SignalNPP_16sc; typedef SignalNPP SignalNPP_32s; typedef SignalNPP SignalNPP_32sc; typedef SignalNPP SignalNPP_32f; typedef SignalNPP SignalNPP_32fc; typedef SignalNPP SignalNPP_64s; typedef SignalNPP SignalNPP_64sc; typedef SignalNPP SignalNPP_64f; typedef SignalNPP SignalNPP_64fc; } // npp namespace #endif // NV_UTIL_NPP_SIGNALS_NPP_H