MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsAligned

Method IsAligned

tensorflow/core/framework/tensor.h:290–298  ·  view source on GitHub ↗

Returns true iff this tensor is aligned.

Source from the content-addressed store, hash-verified

288
289 /// Returns true iff this tensor is aligned.
290 bool IsAligned() const {
291#if EIGEN_MAX_ALIGN_BYTES == 0
292 return true;
293#else
294 void* ptr = base<void>();
295 return dtype() == DT_STRING ||
296 (reinterpret_cast<intptr_t>(ptr) % EIGEN_MAX_ALIGN_BYTES == 0);
297#endif
298 }
299
300 /// Assign operator. This tensor shares other's underlying storage.
301 Tensor& operator=(const Tensor& other) {

Callers 7

TESTFunction · 0.80
TEST_FFunction · 0.80
GetArgMethod · 0.80
GetNextInternalMethod · 0.80
InputSliceMethod · 0.80
OutputSliceMethod · 0.80
TF_TensorIsAlignedFunction · 0.80

Calls 1

dtypeFunction · 0.50

Tested by 2

TESTFunction · 0.64
TEST_FFunction · 0.64