pytorch/caffe2/utils
Richard Barnes 2d38d37f5f use irange for loops (#69533)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/69533

Modified loops in files under fbsource/fbcode/caffe2/ from the format
```
for(TYPE var=x0;var<x_max;x++)
```
to the format
```
for(const auto var: irange(xmax))
```

This was achieved by running r-barnes's loop upgrader script (D28874212) with some modification to exclude all files under /torch/jit and a number of reversions or unused variable suppression warnings added by hand.

Test Plan: Sandcastle

Reviewed By: malfet

Differential Revision: D32837942

fbshipit-source-id: 8663037a38ade8f81bd5e983a614d197ea11f0d1
2021-12-07 16:53:27 -08:00
..
hip
math Refactor cub namespace handling (#66219) 2021-10-25 14:37:09 -07:00
threadpool use irange for loops (#69533) 2021-12-07 16:53:27 -08:00
bench_utils.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
bench_utils.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
cast_test.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
cast.h
cblas.h
CMakeLists.txt Do not build PyTorch with caffe2 by default (#66658) 2021-10-21 20:32:47 -07:00
conversions.h [caffe2/utils] Add explicit rule to avoid package boundary violation (#60677) 2021-06-28 14:43:30 -07:00
cpu_neon.h
cpuid_test.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
cpuid.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
cpuid.h [caffe2/utils] Add some fine-grained rules to avoid package boundary violations 2021-06-28 14:45:30 -07:00
cub_namespace.cuh Refactor cub namespace handling (#66219) 2021-10-25 14:37:09 -07:00
eigen_utils.h [caffe2/utils] Add some fine-grained rules to avoid package boundary violations 2021-06-28 14:45:30 -07:00
fatal_signal_asan_no_sig_test.cc Move caffe2 signal_handler to c10. (#56717) 2021-04-26 23:08:12 -07:00
filler.h Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
fixed_divisor_test.cc [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610) 2021-09-29 09:55:43 -07:00
fixed_divisor.h [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610) 2021-09-29 09:55:43 -07:00
GpuAtomics.cuh [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610) 2021-09-29 09:55:43 -07:00
GpuBitonicSort.cuh
GpuDefs.cuh [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610) 2021-09-29 09:55:43 -07:00
GpuScanUtils.cuh [ROCm] Changes not to rely on CUDA_VERSION or HIP_VERSION (#65610) 2021-09-29 09:55:43 -07:00
knob_patcher.cc [caffe2] add a basic implementation of run-time feature rollout checks (#59355) 2021-06-04 14:34:41 -07:00
knob_patcher.h [caffe2] add a basic implementation of run-time feature rollout checks (#59355) 2021-06-04 14:34:41 -07:00
knobs_test.cc [caffe2] add a basic implementation of run-time feature rollout checks (#59355) 2021-06-04 14:34:41 -07:00
knobs.cc [caffe2] add a basic implementation of run-time feature rollout checks (#59355) 2021-06-04 14:34:41 -07:00
knobs.h [caffe2] add a basic implementation of run-time feature rollout checks (#59355) 2021-06-04 14:34:41 -07:00
map_utils.h
math_cpu.cc Stop exporting symbols in anonymous namespaces (#62952) 2021-08-09 12:52:12 -07:00
math_gpu_test.cc
math_gpu.cu Refactor cub namespace handling (#66219) 2021-10-25 14:37:09 -07:00
math_test.cc [dte] fastpath implementation for broadcast utility function (4/x) (#62493) 2021-07-30 16:15:10 -07:00
math-detail.h
math.h [dte] scaffolding for c2 operator broadcasting fastpath (1/x) (#62369) 2021-07-29 16:31:02 -07:00
murmur_hash3.cc [clang-tidy] Exclude cppcoreguidelines-avoid-magic-numbers (#57841) 2021-05-07 20:02:33 -07:00
murmur_hash3.h
proto_convert.cc
proto_convert.h
proto_utils_test.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
proto_utils.cc [Caffe2] Create fewer strings during argument fetching (#64285) 2021-09-01 13:30:54 -07:00
proto_utils.h use irange for loops (#69533) 2021-12-07 16:53:27 -08:00
proto_wrap.cc [caffe2/utils] Add explicit rule to avoid package boundary violation 2021-06-22 12:22:24 -07:00
proto_wrap.h [caffe2/utils] Add explicit rule to avoid package boundary violation 2021-06-22 12:22:24 -07:00
signal_handler.cc Mark unused functions with C10_UNUSED (#62929) 2021-08-09 13:00:33 -07:00
signal_handler.h Move caffe2 signal_handler to c10. (#56717) 2021-04-26 23:08:12 -07:00
simple_queue_test.cc Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
simple_queue.h [caffe2/utils] Add explicit rule to avoid package boundary violation 2021-06-22 12:21:08 -07:00
smart_tensor_printer_test.cc
smart_tensor_printer.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
smart_tensor_printer.h Renaming CAFFE2_API to TORCH_API (#49496) 2020-12-18 10:54:50 -08:00
string_utils.cc Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
string_utils.h [caffe2/utils] Add some fine-grained rules to avoid package boundary violations 2021-06-28 14:45:30 -07:00
zmq_helper.h