1+ use std:: collections:: HashMap ;
12mod common;
23
34use std:: sync:: Arc ;
@@ -1146,6 +1147,7 @@ fn multi_output_sincos_jvp_sum_matches_expected() {
11461147 & [ sk ( "x" ) ] ,
11471148 1001 ,
11481149 & mut ( ) ,
1150+ & HashMap :: new ( ) ,
11491151 ) ;
11501152
11511153 let dy_key = tangent_output_key ( & linear, 0 ) . expect ( "active tangent output" ) ;
@@ -1170,6 +1172,7 @@ fn multi_output_sincos_vjp_matches_expected() {
11701172 & [ sk ( "x" ) ] ,
11711173 1002 ,
11721174 & mut ( ) ,
1175+ & HashMap :: new ( ) ,
11731176 ) ;
11741177 let transposed = transpose ( & linear, & mut ( ) ) ;
11751178
@@ -1199,6 +1202,7 @@ fn multi_output_sincos_adjoint_consistency() {
11991202 & [ sk ( "x" ) ] ,
12001203 1003 ,
12011204 & mut ( ) ,
1205+ & HashMap :: new ( ) ,
12021206 ) ;
12031207 let dy_sin_key = tangent_output_key ( & linear, 0 ) . expect ( "active tangent output for sin" ) ;
12041208 let dy_cos_key = tangent_output_key ( & linear, 1 ) . expect ( "active tangent output for cos" ) ;
@@ -1249,6 +1253,7 @@ fn deep_chain_exp_10x() {
12491253 & [ sk ( "x" ) ] ,
12501254 1101 ,
12511255 & mut ( ) ,
1256+ & HashMap :: new ( ) ,
12521257 ) ;
12531258 let dy_key = tangent_output_key ( & linear, 0 ) . expect ( "active tangent output" ) ;
12541259 let dx_key = tangent_input_key ( & linear, 0 ) ;
@@ -1306,6 +1311,7 @@ fn third_order_x_cubed() {
13061311 & [ sk ( "x" ) ] ,
13071312 1201 ,
13081313 & mut ( ) ,
1314+ & HashMap :: new ( ) ,
13091315 ) ;
13101316 let dy_key = tangent_output_key ( & linear_1, 0 ) . expect ( "active first-order tangent output" ) ;
13111317 let dx1_key = tangent_input_key ( & linear_1, 0 ) ;
@@ -1317,6 +1323,7 @@ fn third_order_x_cubed() {
13171323 & [ sk ( "x" ) ] ,
13181324 1202 ,
13191325 & mut ( ) ,
1326+ & HashMap :: new ( ) ,
13201327 ) ;
13211328 let d2y_key = tangent_output_key ( & linear_2, 0 ) . expect ( "active second-order tangent output" ) ;
13221329 let dx2_key = tangent_input_key ( & linear_2, 0 ) ;
@@ -1332,6 +1339,7 @@ fn third_order_x_cubed() {
13321339 & [ sk ( "x" ) ] ,
13331340 1203 ,
13341341 & mut ( ) ,
1342+ & HashMap :: new ( ) ,
13351343 ) ;
13361344 let d3y_key = tangent_output_key ( & linear_3, 0 ) . expect ( "active third-order tangent output" ) ;
13371345 let dx3_key = tangent_input_key ( & linear_3, 0 ) ;
@@ -1364,6 +1372,7 @@ fn fourth_order_x_fourth() {
13641372 & [ sk ( "x" ) ] ,
13651373 1211 ,
13661374 & mut ( ) ,
1375+ & HashMap :: new ( ) ,
13671376 ) ;
13681377 let dy_key = tangent_output_key ( & linear_1, 0 ) . expect ( "active first-order tangent output" ) ;
13691378 let dx1_key = tangent_input_key ( & linear_1, 0 ) ;
@@ -1375,6 +1384,7 @@ fn fourth_order_x_fourth() {
13751384 & [ sk ( "x" ) ] ,
13761385 1212 ,
13771386 & mut ( ) ,
1387+ & HashMap :: new ( ) ,
13781388 ) ;
13791389 let d2y_key = tangent_output_key ( & linear_2, 0 ) . expect ( "active second-order tangent output" ) ;
13801390 let dx2_key = tangent_input_key ( & linear_2, 0 ) ;
@@ -1390,6 +1400,7 @@ fn fourth_order_x_fourth() {
13901400 & [ sk ( "x" ) ] ,
13911401 1213 ,
13921402 & mut ( ) ,
1403+ & HashMap :: new ( ) ,
13931404 ) ;
13941405 let d3y_key = tangent_output_key ( & linear_3, 0 ) . expect ( "active third-order tangent output" ) ;
13951406 let dx3_key = tangent_input_key ( & linear_3, 0 ) ;
@@ -1406,6 +1417,7 @@ fn fourth_order_x_fourth() {
14061417 & [ sk ( "x" ) ] ,
14071418 1214 ,
14081419 & mut ( ) ,
1420+ & HashMap :: new ( ) ,
14091421 ) ;
14101422 let d4y_key = tangent_output_key ( & linear_4, 0 ) . expect ( "active fourth-order tangent output" ) ;
14111423 let dx4_key = tangent_input_key ( & linear_4, 0 ) ;
@@ -1440,6 +1452,7 @@ fn third_order_for_then_f() {
14401452 & [ sk ( "x" ) ] ,
14411453 1221 ,
14421454 & mut ( ) ,
1455+ & HashMap :: new ( ) ,
14431456 ) ;
14441457 let transposed = transpose ( & linear, & mut ( ) ) ;
14451458 let ct_x_key = tangent_output_key ( & transposed, 0 ) . expect ( "active cotangent output" ) ;
@@ -1452,6 +1465,7 @@ fn third_order_for_then_f() {
14521465 & [ sk ( "x" ) ] ,
14531466 1222 ,
14541467 & mut ( ) ,
1468+ & HashMap :: new ( ) ,
14551469 ) ;
14561470 let d_ct_x_key = tangent_output_key ( & linear_2, 0 ) . expect ( "active forward-over-reverse output" ) ;
14571471 let dx2_key = tangent_input_key ( & linear_2, 0 ) ;
@@ -1467,6 +1481,7 @@ fn third_order_for_then_f() {
14671481 & [ sk ( "x" ) ] ,
14681482 1223 ,
14691483 & mut ( ) ,
1484+ & HashMap :: new ( ) ,
14701485 ) ;
14711486 let d2_ct_x_key = tangent_output_key ( & linear_3, 0 ) . expect ( "active third-order output" ) ;
14721487 let dx3_key = tangent_input_key ( & linear_3, 0 ) ;
@@ -1503,6 +1518,7 @@ fn fofof_vector_x_cubed() {
15031518 & [ vk ( "x" ) ] ,
15041519 1401 ,
15051520 & mut ( ) ,
1521+ & HashMap :: new ( ) ,
15061522 ) ;
15071523 let dy_key = tangent_output_key ( & linear_1, 0 ) . expect ( "active first-order tangent output" ) ;
15081524 let dx1_key = tangent_input_key ( & linear_1, 0 ) ;
@@ -1514,6 +1530,7 @@ fn fofof_vector_x_cubed() {
15141530 & [ vk ( "x" ) ] ,
15151531 1402 ,
15161532 & mut ( ) ,
1533+ & HashMap :: new ( ) ,
15171534 ) ;
15181535 let d2y_key = tangent_output_key ( & linear_2, 0 ) . expect ( "active second-order tangent output" ) ;
15191536 let dx2_key = tangent_input_key ( & linear_2, 0 ) ;
@@ -1529,6 +1546,7 @@ fn fofof_vector_x_cubed() {
15291546 & [ vk ( "x" ) ] ,
15301547 1403 ,
15311548 & mut ( ) ,
1549+ & HashMap :: new ( ) ,
15321550 ) ;
15331551 let d3y_key = tangent_output_key ( & linear_3, 0 ) . expect ( "active third-order tangent output" ) ;
15341552 let dx3_key = tangent_input_key ( & linear_3, 0 ) ;
@@ -1570,6 +1588,7 @@ fn fof_vector_adjoint_consistency() {
15701588 & [ vk ( "x" ) ] ,
15711589 1411 ,
15721590 & mut ( ) ,
1591+ & HashMap :: new ( ) ,
15731592 ) ;
15741593 let dy_key = tangent_output_key ( & linear_1, 0 ) . expect ( "active first-order tangent output" ) ;
15751594 let dx1_fof_key = tangent_input_key ( & linear_1, 0 ) ;
@@ -1582,6 +1601,7 @@ fn fof_vector_adjoint_consistency() {
15821601 & [ vk ( "x" ) ] ,
15831602 1412 ,
15841603 & mut ( ) ,
1604+ & HashMap :: new ( ) ,
15851605 ) ;
15861606 let d2y_key = tangent_output_key ( & linear_2, 0 ) . expect ( "active second-order tangent output" ) ;
15871607 let dx2_key = tangent_input_key ( & linear_2, 0 ) ;
@@ -1609,6 +1629,7 @@ fn fof_vector_adjoint_consistency() {
16091629 & [ vk ( "x" ) ] ,
16101630 1413 ,
16111631 & mut ( ) ,
1632+ & HashMap :: new ( ) ,
16121633 ) ;
16131634 let d_ct_x_key = tangent_output_key ( & linear_3, 0 ) . expect ( "active forward-over-reverse output" ) ;
16141635 let dx1_for_key = tangent_input_key ( & linear_3, 0 ) ;
@@ -1637,6 +1658,7 @@ fn complex_vector_jvp_conj_elementwise() {
16371658 & [ cvk ( "z" ) ] ,
16381659 1301 ,
16391660 & mut ( ) ,
1661+ & HashMap :: new ( ) ,
16401662 ) ;
16411663
16421664 let dy_key = tangent_output_key ( & linear, 0 ) . expect ( "active tangent output" ) ;
@@ -1665,6 +1687,7 @@ fn complex_vector_vjp_sum_abs_squared() {
16651687 & [ cvk ( "z" ) ] ,
16661688 1302 ,
16671689 & mut ( ) ,
1690+ & HashMap :: new ( ) ,
16681691 ) ;
16691692 let transposed = transpose ( & linear, & mut ( ) ) ;
16701693
@@ -1696,6 +1719,7 @@ fn complex_vector_adjoint_consistency() {
16961719 & [ cvk ( "z" ) ] ,
16971720 1303 ,
16981721 & mut ( ) ,
1722+ & HashMap :: new ( ) ,
16991723 ) ;
17001724 let dy_key = tangent_output_key ( & linear, 0 ) . expect ( "active tangent output" ) ;
17011725 let dz_key = tangent_input_key ( & linear, 0 ) ;
0 commit comments