/
usr
/
local
/
lib64
/
python3.6
/
site-packages
/
torch
/
include
/
TH
/
/usr/local/lib64/python3.6/site-packages/torch/include/TH
mkdir
upload
Name
Size
Mode
Actions
generic/
-
0755
rm
TH.h
126
0644
edit
dl
rm
THGeneral.h
4903
0644
edit
dl
rm
THGenerateAllTypes.h
411
0644
edit
dl
rm
THGenerateBFloat16Type.h
427
0644
edit
dl
rm
THGenerateBoolType.h
373
0644
edit
dl
rm
THGenerateByteType.h
376
0644
edit
dl
rm
THGenerateCharType.h
375
0644
edit
dl
rm
THGenerateComplexDoubleType.h
438
0644
edit
dl
rm
THGenerateComplexFloatType.h
433
0644
edit
dl
rm
THGenerateComplexTypes.h
442
0644
edit
dl
rm
THGenerateDoubleType.h
382
0644
edit
dl
rm
THGenerateFloatType.h
377
0644
edit
dl
rm
THGenerateFloatTypes.h
420
0644
edit
dl
rm
THGenerateHalfType.h
396
0644
edit
dl
rm
THGenerateIntType.h
372
0644
edit
dl
rm
THGenerateIntTypes.h
514
0644
edit
dl
rm
THGenerateLongType.h
376
0644
edit
dl
rm
THGenerateQInt8Type.h
508
0644
edit
dl
rm
THGenerateQInt32Type.h
513
0644
edit
dl
rm
THGenerateQTypes.h
480
0644
edit
dl
rm
THGenerateQUInt4x2Type.h
520
0644
edit
dl
rm
THGenerateQUInt8Type.h
514
0644
edit
dl
rm
THGenerateShortType.h
380
0644
edit
dl
rm
THHalf.h
97
0644
edit
dl
rm
THStorage.h
125
0644
edit
dl
rm
THStorageFunctions.h
1116
0644
edit
dl
rm
THStorageFunctions.hpp
1297
0644
edit
dl
rm
THTensor.h
514
0644
edit
dl
rm
THTensor.hpp
4061
0644
edit
dl
rm
Edit:
/usr/local/lib64/python3.6/site-packages/torch/include/TH/THStorageFunctions.hpp
(1297B)
#pragma once // STOP!!! Thinking of including this header directly? Please // read Note [TH abstraction violation] #include <c10/core/Storage.h> #include <c10/core/StorageImpl.h> #include <TH/THStorageFunctions.h> #include <c10/core/ScalarType.h> #include <c10/core/ScalarTypeToTypeMeta.h> // Note [Weak references for intrusive refcounting] // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Here's the scheme: // // - refcount == number of strong references to the object // weakcount == number of weak references to the object, // plus one more if refcount > 0 // // - THStorage stays live as long as there are any strong // or weak pointers to it (weakcount > 0, since strong // references count as a +1 to weakcount) // // - finalizers are called and data_ptr is deallocated when refcount == 0 // // - Once refcount == 0, it can never again be > 0 (the transition // from > 0 to == 0 is monotonic) // // - When you access THStorage via a weak pointer, you must // atomically increment the use count, if it is greater than 0. // If it is not, you must report that the storage is dead. // TH_CPP_API THStorage* THStorage_new(); TH_API void THStorage_retain(THStorage *storage); TH_API void THStorage_resizeBytes(THStorage* storage, ptrdiff_t size_bytes);
Save
cmd:
run