Skip to content

Instantly share code, notes, and snippets.

@bwasti
Created September 9, 2022 20:03
Show Gist options
  • Save bwasti/8598c78de8c008f149fe01f084044938 to your computer and use it in GitHub Desktop.
Save bwasti/8598c78de8c008f149fe01f084044938 to your computer and use it in GitHub Desktop.
#include <cstdint>
extern "C" {
void init() {}
int64_t bytesUsed() {
return 0;
}
void* createTensor(void* shape_ptr, int64_t shape_len) {
return nullptr;
}
void* tensorFromBuffer(int64_t numel, void* ptr) {
return nullptr;
}
typedef void (*deleter)(void *, void *);
deleter genTensorDestroyer() {
return nullptr;
}
void setRowMajor() {}
void setColMajor() {}
bool isRowMajor() { return true; }
bool isColMajor() { return false; }
void eval(void* t) {}
int64_t elements(void* t) {
return 0;
}
int64_t bytes(void* t) {
return 0;
}
int shape(void* t, void* out, int out_len) {
return 0;
}
int ndim(void* t) {
return 0;
}
float* buffer(void* t) {
return nullptr;
}
float scalar(void* t) {
return 0;
}
void* _index(void* t,
void* starts,
int64_t starts_len,
void* ends,
int64_t ends_len,
void* strides,
int64_t strides_len) {
return nullptr;
}
void* flatten(void* t) {
return nullptr;
}
void* asContiguousTensor(void* t) {
return nullptr;
}
void* copy(void* t) {
return nullptr;
}
void* _rand(void* shape_ptr, int64_t shape_len) {
return nullptr;
}
void* _randn(void* shape_ptr, int64_t shape_len) {
return nullptr;
}
void* _full(void* shape_ptr, int64_t shape_len, float val) {
return nullptr;
}
void* _identity(int64_t dim) {
return nullptr;
}
void* _arange(float start, float end, float step) {
return nullptr;
}
void* _iota(void* dims_ptr,
int64_t dims_len,
void* tileDims_ptr,
int64_t tileDims_len) {
return nullptr;
}
void* _reshape(void* tensor, void* shape_ptr, int64_t shape_len) {
return nullptr;
}
void* _transpose(void* tensor, void* axes_ptr, int64_t axes_len) {
return nullptr;
}
void* _tile(void* tensor, void* shape_ptr, int64_t shape_len) {
return nullptr;
}
void* _nonzero(void* tensor) {
return nullptr;
}
void* _negative(void* tensor) {
return nullptr;
}
void* _logicalNot(void* tensor) {
return nullptr;
}
void* _exp(void* tensor) {
return nullptr;
}
void* _log(void* tensor) {
return nullptr;
}
void* _log1p(void* tensor) {
return nullptr;
}
void* _sin(void* tensor) {
return nullptr;
}
void* _cos(void* tensor) {
return nullptr;
}
void* _sqrt(void* tensor) {
return nullptr;
}
void* _tanh(void* tensor) {
return nullptr;
}
void* _floor(void* tensor) {
return nullptr;
}
void* _ceil(void* tensor) {
return nullptr;
}
void* _rint(void* tensor) {
return nullptr;
}
void* _absolute(void* tensor) {
return nullptr;
}
void* _abs(void* tensor) {
return nullptr;
}
void* _sigmoid(void* tensor) {
return nullptr;
}
void* _erf(void* tensor) {
return nullptr;
}
void* _flip(void* tensor, uint32_t dim) {
return nullptr;
}
void* _clip(void* tensor, void* low, void* high) {
return nullptr;
}
void* _roll(void* tensor, int shift, uint32_t axis) {
return nullptr;
}
void* _isnan(void* tensor) {
return nullptr;
}
void* _isinf(void* tensor) {
return nullptr;
}
void* _sign(void* tensor) {
return nullptr;
}
void* _tril(void* tensor) {
return nullptr;
}
void* _triu(void* tensor) {
return nullptr;
}
void* _where(void* cond, void* x, void* y) {
return nullptr;
}
void* _sort(void* tensor, uint32_t dim) {
return nullptr;
}
void* _add(void* tensor, void* other) {
return nullptr;
}
void* _sub(void* tensor, void* other) {
return nullptr;
}
void* _mul(void* tensor, void* other) {
return nullptr;
}
void* _div(void* tensor, void* other) {
return nullptr;
}
void* _eq(void* tensor, void* other) {
return nullptr;
}
void* _neq(void* tensor, void* other) {
return nullptr;
}
void* _lessThan(void* tensor, void* other) {
return nullptr;
}
void* _lessThanEqual(void* tensor, void* other) {
return nullptr;
}
void* _greaterThan(void* tensor, void* other) {
return nullptr;
}
void* _greaterThanEqual(void* tensor, void* other) {
return nullptr;
}
void* _logicalOr(void* tensor, void* other) {
return nullptr;
}
void* _logicalAnd(void* tensor, void* other) {
return nullptr;
}
void* _mod(void* tensor, void* other) {
return nullptr;
}
void* _bitwiseAnd(void* tensor, void* other) {
return nullptr;
}
void* _bitwiseOr(void* tensor, void* other) {
return nullptr;
}
void* _bitwiseXor(void* tensor, void* other) {
return nullptr;
}
void* _lShift(void* tensor, void* other) {
return nullptr;
}
void* _rShift(void* tensor, void* other) {
return nullptr;
}
void* _minimum(void* tensor, void* other) {
return nullptr;
}
void* _maximum(void* tensor, void* other) {
return nullptr;
}
void* _power(void* tensor, void* other) {
return nullptr;
}
void* _matmul(void* tensor, void* other) {
return nullptr;
}
void* _amin(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _amax(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _argmin(void* tensor, uint32_t axis, bool keep_dims) {
return nullptr;
}
void* _argmax(void* tensor, uint32_t axis, bool keep_dims) {
return nullptr;
}
void* _sum(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _cumsum(void* tensor, uint32_t axis) {
return nullptr;
}
void* _mean(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _median(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _var(void* tensor,
void* axes_ptr,
int64_t axes_len,
bool bias,
bool keep_dims) {
return nullptr;
}
void* _std(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _norm(void* tensor,
void* axes_ptr,
int64_t axes_len,
double p,
bool keep_dims) {
return nullptr;
}
void* _countNonzero(void* tensor,
void* axes_ptr,
int64_t axes_len,
bool keep_dims) {
return nullptr;
}
void* _any(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
void* _all(void* tensor, void* axes_ptr, int64_t axes_len, bool keep_dims) {
return nullptr;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment