diff --git a/Etaler/Backends/CPUBackend.hpp b/Etaler/Backends/CPUBackend.hpp index 29671f3..42bf1a0 100644 --- a/Etaler/Backends/CPUBackend.hpp +++ b/Etaler/Backends/CPUBackend.hpp @@ -12,7 +12,7 @@ namespace et { -struct CPUBuffer : public BufferImpl +struct ETALER_EXPORT CPUBuffer : public BufferImpl { CPUBuffer(const Shape& shape, DType dtype, std::shared_ptr backend) : BufferImpl(shape.volume(), dtype, std::move(backend)) diff --git a/Etaler/Backends/OpenCLBackend.hpp b/Etaler/Backends/OpenCLBackend.hpp index 3972025..a77367f 100644 --- a/Etaler/Backends/OpenCLBackend.hpp +++ b/Etaler/Backends/OpenCLBackend.hpp @@ -35,7 +35,7 @@ struct ETALER_EXPORT OpenCLBuffer : public BufferImpl cl::Buffer buffer_; }; -struct KernelManager +struct ETALER_EXPORT KernelManager { KernelManager() : KernelManager(cl::Device(), cl::Context()) {}; KernelManager(cl::Device device, cl::Context context); diff --git a/Etaler/Core/TensorImpl.hpp b/Etaler/Core/TensorImpl.hpp index ecfda76..17ca036 100644 --- a/Etaler/Core/TensorImpl.hpp +++ b/Etaler/Core/TensorImpl.hpp @@ -12,7 +12,7 @@ namespace et { -struct BufferImpl : public std::enable_shared_from_this +struct ETALER_EXPORT BufferImpl : public std::enable_shared_from_this { BufferImpl(size_t size, DType dtype, std::shared_ptr backend) : size_(size), dtype_(dtype), backend_(backend) {} @@ -26,7 +26,7 @@ struct BufferImpl : public std::enable_shared_from_this std::shared_ptr backend_; }; -struct TensorImpl : public std::enable_shared_from_this +struct ETALER_EXPORT TensorImpl : public std::enable_shared_from_this { TensorImpl(std::shared_ptr buffer, Shape shape, Shape stride, size_t offset=0) : buffer_(buffer), shape_(shape), stride_(stride), offset_(offset) {}