pytorch/torch/csrc/Storage.cpp
Sam Gross 1486d880b0 Add Storage.from_buffer
The from_buffer is similar to numpy's frombuffer. It decodes a Python
buffer object into a Storage object. For byte and char storages, it
simply copies the bytes.
2016-09-07 15:32:33 -07:00

15 lines
286 B
C++

#include <Python.h>
#include <structmember.h>
#include <stdbool.h>
#include <TH/TH.h>
#include <libshm.h>
#include "THP.h"
#include "byte_order.h"
#include "generic/Storage.cpp"
#include <TH/THGenerateAllTypes.h>
#include "generic/StorageCopy.cpp"
#include <TH/THGenerateAllTypes.h>