tester/g_ult/unit_tests/gpu/common.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
/// Compare content of work_item's output with given reference buffers. count is number of elements
Compare content of work_item's output with given reference buffers. count is number of elements
Compare content of work_item ' s output with given reference buffers . count is number of elements
bool verify_output( std::unique_ptr<nn::data<float, 0>> &output_data, float * const ref_buf)
{
    for(auto index=0u; index<output_data->count(); ++index) {
        float candidate = static_cast<float *>(output_data->buffer)[index];
        float reference = ref_buf[index];
        if(fabs(candidate-reference)/reference > 0.01f) {
            return false;
        }
    }
    return true;
}
bool verify_output ( std :: unique_ptr < nn :: data < float , 0 > > & output_data , float * const ref_buf ) { for ( auto index = 0u ; index < output_data -> count ( ) ; ++ index ) { float candidate = static_cast < float * > ( output_data -> buffer ) [ index ] ; float reference = ref_buf [ index ] ; if ( fabs ( candidate - reference ) / reference > 0.01f ) { return false ; } } return true ; }
Compare content of work_item's output with given reference buffers.
Compare content of work_item ' s output with given reference buffers .