Fixed int-to-packbuf_t conversion error (C++ only).

Details:
- Fixed an error that manifests only when using C++ (specifically,
  modern versions of g++) to compile drivers in 'test' (and likely most
  other application code that #includes blis.h. Thanks to Ajay Panyala
  for reporting this issue (#374).
This commit is contained in:
Field G. Van Zee
2020-02-07 17:37:03 -06:00
committed by dzambare
parent 25d23cdda2
commit b2f628eab2

View File

@@ -147,14 +147,7 @@ static void bli_mem_set_size( siz_t size, mem_t* mem )
static void bli_mem_clear( mem_t* mem )
{
bli_mem_set_buffer( NULL, mem );
#ifdef __cplusplus
packbuf_t pb;
//C++ has more strong type checking. Using -1 will result in error
//Pass actual type instead
bli_mem_set_buf_type ( pb, mem );
#else
bli_mem_set_buf_type( ( packbuf_t )-1, mem );
#endif
bli_mem_set_pool( NULL, mem );
bli_mem_set_size( 0, mem );
}