Commit c003e5af authored by Jerry Zhang's avatar Jerry Zhang Committed by Facebook Github Bot

Renaming size() to numel()

Summary:
Codemod generated with clangr shard mode, 50 files per diff,
clangr code(size->numel): diffusion/FBS/browse/master/fbcode/caffe2/caffe2/fb/codemods/TensorMethodRename.cpp

Reviewed By: ezyang

Differential Revision: D12833487

fbshipit-source-id: 5dec5a64f91912620f3a5e48a2cc571be675c5fd
parent ffb87f4c
...@@ -30,7 +30,7 @@ bool ZeroEvenOp<float, CPUContext>::RunOnDevice() { ...@@ -30,7 +30,7 @@ bool ZeroEvenOp<float, CPUContext>::RunOnDevice() {
// Set output elements at even indices to zero. // Set output elements at even indices to zero.
auto* Y_data = Y->mutable_data<float>(); auto* Y_data = Y->mutable_data<float>();
for (auto i = 0; i < Y->size(); i += 2) { for (auto i = 0; i < Y->numel(); i += 2) {
Y_data[i] = 0.0f; Y_data[i] = 0.0f;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment