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
bench_utils.h
cast.h
cast_test.cc
cblas.h
CMakeLists.txt Do not build PyTorch with caffe2 by default (#66658) 2021-10-21 20:32:47 -07:00
conversions.h
cpu_neon.h
cpuid.cc
cpuid.h
cpuid_test.cc
cub_namespace.cuh Refactor cub namespace handling (#66219) 2021-10-25 14:37:09 -07:00
eigen_utils.h
fatal_signal_asan_no_sig_test.cc
filler.h
fixed_divisor.h
fixed_divisor_test.cc
GpuAtomics.cuh
GpuBitonicSort.cuh
GpuDefs.cuh
GpuScanUtils.cuh
knob_patcher.cc
knob_patcher.h
knobs.cc
knobs.h
knobs_test.cc
map_utils.h
math-detail.h
math.h
math_cpu.cc
math_gpu.cu Refactor cub namespace handling (#66219) 2021-10-25 14:37:09 -07:00
math_gpu_test.cc
math_test.cc
murmur_hash3.cc
murmur_hash3.h
proto_convert.cc
proto_convert.h
proto_utils.cc
proto_utils.h use irange for loops (#69533) 2021-12-07 16:53:27 -08:00
proto_utils_test.cc
proto_wrap.cc
proto_wrap.h
signal_handler.cc
signal_handler.h
simple_queue.h
simple_queue_test.cc
smart_tensor_printer.cc
smart_tensor_printer.h
smart_tensor_printer_test.cc
string_utils.cc
string_utils.h
zmq_helper.h