@@ -227,29 +227,39 @@ bool fbgemmOptimizedGConv(const conv_param_t<SPATIAL_DIM>& conv_p) {
227
227
std::all_of (
228
228
conv_p.K .begin (),
229
229
conv_p.K .end (),
230
- std::bind (areEqual, std::placeholders::_1, 3 )) &&
230
+ [areEqual](auto && PH1) {
231
+ return areEqual (std::forward<decltype (PH1)>(PH1), 3 );
232
+ }) &&
231
233
232
234
std::all_of (
233
235
conv_p.pad .begin (),
234
236
conv_p.pad .end (),
235
- std::bind (areEqual, std::placeholders::_1, 1 )) &&
237
+ [areEqual](auto && PH1) {
238
+ return areEqual (std::forward<decltype (PH1)>(PH1), 1 );
239
+ }) &&
236
240
237
241
std::all_of (
238
242
conv_p.dilation .begin (),
239
243
conv_p.dilation .end (),
240
- std::bind (areEqual, std::placeholders::_1, 1 )) &&
244
+ [areEqual](auto && PH1) {
245
+ return areEqual (std::forward<decltype (PH1)>(PH1), 1 );
246
+ }) &&
241
247
242
248
// Height/Width strides should be the same and
243
249
// should be either 1 or 2
244
250
// Temporal stride can be anything.
245
251
(std::all_of (
246
252
conv_p.stride .begin () + SPATIAL_DIM - 2 ,
247
253
conv_p.stride .end (),
248
- std::bind (areEqual, std::placeholders::_1, 1 )) ||
254
+ [areEqual](auto && PH1) {
255
+ return areEqual (std::forward<decltype (PH1)>(PH1), 1 );
256
+ }) ||
249
257
std::all_of (
250
258
conv_p.stride .begin () + SPATIAL_DIM - 2 ,
251
259
conv_p.stride .end (),
252
- std::bind (areEqual, std::placeholders::_1, 2 ))) &&
260
+ [areEqual](auto && PH1) {
261
+ return areEqual (std::forward<decltype (PH1)>(PH1), 2 );
262
+ })) &&
253
263
!conv_p.transposed ;
254
264
}
255
265
0 commit comments