#include <amsculib3/amsculib3.hpp>

namespace amscuda
{

int cuda_errortrap(const char *msgheader)
{
    int ret = 0;
    cudaError_t err = cudaSuccess;

    err = cudaGetLastError();
    if(err!=cudaSuccess)
    {
        printf("%s :%s\n",msgheader,cudaGetErrorString(err));
        ret = 1;
    }

    return ret;
}

}; //end namespace amscuda