diff options
author | Gregory Chanan <gchanan@fb.com> | 2017-05-17 18:29:53 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2017-06-11 11:32:08 +0300 |
commit | b9de097a0d5091c59fa2ed98bfc188f8f9b60d4d (patch) | |
tree | 9958ea9dfea6cdfee6f87cfd37698fb901fea4ef | |
parent | 26629b188ad6c7c9a175f9f6115125948a765eb0 (diff) |
Include simple broadcasting example and demonstrate lining up trailing dimensions.
-rw-r--r-- | lib/TH/THStorage.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/TH/THStorage.h b/lib/TH/THStorage.h index 7aab593..c8ab484 100644 --- a/lib/TH/THStorage.h +++ b/lib/TH/THStorage.h @@ -30,8 +30,11 @@ typedef struct { TH_API THDescBuff THLongStorage_sizeDesc(const THLongStorage *size); TH_API THLongStorage *THLongStorage_newInferSize(THLongStorage *size, ptrdiff_t nElement); + +// Given the sizes of {2,N} tensors, write out the size when the tensors are expanded together TH_API int THLongStorage_inferSize2(THLongStorage *output, long *sizesA, long dimsA, long *sizesB, long dimsB, int raiseErrors); TH_API int THLongStorage_inferSizeN(THLongStorage *output, int n, long **sizes, long *dims, int raiseErrors); + TH_API int THLongStorage_inferExpandGeometry(long *tensorSizes, long *tensorStrides, long tensorDim, THLongStorage *sizes, long **esz, long **est, int raiseErrors); #endif |