diff --git a/frame/3/her2k/bli_her2k.c b/frame/3/her2k/bli_her2k.c index fcb2c884b..81e861d04 100644 --- a/frame/3/her2k/bli_her2k.c +++ b/frame/3/her2k/bli_her2k.c @@ -50,6 +50,7 @@ void bli_her2k( obj_t* alpha, obj_t alpha_local; obj_t alpha_conj_local; obj_t beta_local; + obj_t c_local; obj_t ah; obj_t bh; num_t dt_targ_a; @@ -71,6 +72,11 @@ void bli_her2k( obj_t* alpha, return; } + // Alias C so we can reset it as the root object (in case it is not + // already a root object). + bli_obj_alias_to( *c, c_local ); + bli_obj_set_as_root( c_local ); + // Create objects to track A' and B' (for the second rank-k update). bli_obj_alias_with_trans( BLIS_CONJ_TRANSPOSE, *a, ah ); bli_obj_alias_with_trans( BLIS_CONJ_TRANSPOSE, *b, bh ); @@ -145,7 +151,7 @@ void bli_her2k( obj_t* alpha, b, &ah, &beta_local, - c, + &c_local, cntl ); /* @@ -153,13 +159,13 @@ void bli_her2k( obj_t* alpha, a, &bh, &beta_local, - c, + &c_local, herk_cntl ); bli_herk_int( &alpha_conj_local, b, &ah, &BLIS_ONE, - c, + &c_local, herk_cntl ); */ } diff --git a/frame/3/herk/bli_herk.c b/frame/3/herk/bli_herk.c index 511f31af2..af6f5ef63 100644 --- a/frame/3/herk/bli_herk.c +++ b/frame/3/herk/bli_herk.c @@ -47,6 +47,7 @@ void bli_herk( obj_t* alpha, herk_t* cntl; obj_t alpha_local; obj_t beta_local; + obj_t c_local; obj_t ah; num_t dt_targ_a; num_t dt_targ_ah; @@ -67,6 +68,11 @@ void bli_herk( obj_t* alpha, return; } + // Alias C so we can reset it as the root object (in case it is not + // already a root object). + bli_obj_alias_to( *c, c_local ); + bli_obj_set_as_root( c_local ); + // For herk, the right-hand "B" operand is simply A'. bli_obj_alias_with_trans( BLIS_CONJ_TRANSPOSE, *a, ah ); @@ -141,7 +147,7 @@ void bli_herk( obj_t* alpha, a, &ah, &beta_local, - c, + &c_local, cntl ); } diff --git a/frame/3/syr2k/bli_syr2k.c b/frame/3/syr2k/bli_syr2k.c index 27378878c..22df3491c 100644 --- a/frame/3/syr2k/bli_syr2k.c +++ b/frame/3/syr2k/bli_syr2k.c @@ -49,6 +49,7 @@ void bli_syr2k( obj_t* alpha, her2k_t* cntl; obj_t alpha_local; obj_t beta_local; + obj_t c_local; obj_t at; obj_t bt; num_t dt_targ_a; @@ -70,6 +71,11 @@ void bli_syr2k( obj_t* alpha, return; } + // Alias C so we can reset it as the root object (in case it is not + // already a root object). + bli_obj_alias_to( *c, c_local ); + bli_obj_set_as_root( c_local ); + // Create objects to track A^T and B^T (for the second rank-k update). bli_obj_alias_with_trans( BLIS_TRANSPOSE, *a, at ); bli_obj_alias_with_trans( BLIS_TRANSPOSE, *b, bt ); @@ -141,20 +147,20 @@ void bli_syr2k( obj_t* alpha, b, &at, &beta_local, - c, + &c_local, cntl ); /* bli_herk_int( &alpha_local, a, &bt, &beta_local, - c, + &c_local, herk_cntl ); bli_herk_int( &alpha_local, b, &at, &BLIS_ONE, - c, + &c_local, herk_cntl ); */ } diff --git a/frame/3/syrk/bli_syrk.c b/frame/3/syrk/bli_syrk.c index 43cf6afe7..6b8680f2b 100644 --- a/frame/3/syrk/bli_syrk.c +++ b/frame/3/syrk/bli_syrk.c @@ -47,6 +47,7 @@ void bli_syrk( obj_t* alpha, herk_t* cntl; obj_t alpha_local; obj_t beta_local; + obj_t c_local; obj_t at; num_t dt_targ_a; num_t dt_targ_at; @@ -67,6 +68,11 @@ void bli_syrk( obj_t* alpha, return; } + // Alias C so we can reset it as the root object (in case it is not + // already a root object). + bli_obj_alias_to( *c, c_local ); + bli_obj_set_as_root( c_local ); + // For syrk, the right-hand "B" operand is simply A^T. bli_obj_alias_with_trans( BLIS_TRANSPOSE, *a, at ); @@ -144,7 +150,7 @@ void bli_syrk( obj_t* alpha, a, &at, &beta_local, - c, + &c_local, cntl ); }