https://github.com/Microsoft/CNTK
Raw File
Tip revision: f7f1e8dc98e3034d56fcfa1ea08b44fe62f2ad9b authored by Yang Chen on 18 July 2019, 07:39:00 UTC
added a mapping from onnx outputs to cntk outputs into the graph's description
Tip revision: f7f1e8d
CUDAPageLockedMemAllocator.h
#pragma once

#include "MemAllocator.h"

namespace Microsoft { namespace MSR { namespace CNTK {

#ifdef _WIN32
#ifdef MATH_EXPORTS
#define MATH_API __declspec(dllexport)
#else
#define MATH_API __declspec(dllimport)
#endif
#else // no DLLs on Linux
#define MATH_API
#endif

class MATH_API CUDAPageLockedMemAllocator : public MemAllocator
{
public:
    CUDAPageLockedMemAllocator(int deviceID);

    int GetDeviceId() const;
    void* Malloc(size_t size) override;
    void Free(void* p) override;
    static void* Malloc(size_t size, int deviceId);
    static void Free(void* p, int deviceId);

private:
    int m_deviceID;
};
} } }
back to top