# ########################################################################
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# ########################################################################

---
include: rocsparse_common.yaml
include: known_bugs.yaml

Tests:
- name: gebsr2csr_bad_arg
  category: pre_checkin
  function: gebsr2csr_bad_arg
  precision: *single_double_precisions_complex_real

- name: gebsr2csr
  category: quick
  function: gebsr2csr
  precision: *single_double_precisions_complex_real
  M: [16]
  N: [16]
  row_block_dimA: [8]
  col_block_dimA: [4]
  baseA: [rocsparse_index_base_zero]
  baseB: [rocsparse_index_base_one]
  direction: [rocsparse_direction_row, rocsparse_direction_column]
  matrix: [rocsparse_matrix_zero]

- name: gebsr2csr
  category: quick
  function: gebsr2csr
  precision: *single_double_precisions_complex_real
  M: [8, 16]
  N: [8, 16]
  row_block_dimA: [2, 8]
  col_block_dimA: [2, 4, 8]
  baseA: [rocsparse_index_base_zero]
  baseB: [rocsparse_index_base_one]
  direction: [rocsparse_direction_row, rocsparse_direction_column]
  matrix: [rocsparse_matrix_random]

- name: gebsr2csr
  category: quick
  function: gebsr2csr
  precision: *single_double_precisions_complex_real
  M: [1, 99, 200]
  N: [1, 89, 183, 256]
  row_block_dimA: [-1, 0, 1, 2, 3, 7, 8, 64]
  col_block_dimA: [-1, 0, 1, 64]
  baseA: [rocsparse_index_base_zero]
  baseB: [rocsparse_index_base_one]
  direction: [rocsparse_direction_row, rocsparse_direction_column]
  matrix: [rocsparse_matrix_random]

- name: gebsr2csr_file
  category: quick
  function: gebsr2csr
  precision: *single_double_precisions
  M: 1
  N: 1
  row_block_dimA: [3, 4]
  col_block_dimA: [5, 7]
  baseA: [rocsparse_index_base_one]
  baseB: [rocsparse_index_base_one]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [mac_econ_fwd500,
             nos2,
             nos4,
             nos6,
             scircuit]

- name: gebsr2csr
  category: pre_checkin
  function: gebsr2csr
  precision: *single_double_precisions_complex_real
  M: [0, 500]
  N: [0, 242, 1000]
  row_block_dimA: [4]
  col_block_dimA: [4, 8, 10]
  baseA: [rocsparse_index_base_one]
  baseB: [rocsparse_index_base_zero]
  direction: [rocsparse_direction_row, rocsparse_direction_column]
  matrix: [rocsparse_matrix_random]

- name: gebsr2csr_file
  category: pre_checkin
  function: gebsr2csr
  precision: *single_double_precisions
  M: 1
  N: 1
  row_block_dimA: [2, 3, 16]
  col_block_dimA: [4]
  baseA: [rocsparse_index_base_one]
  baseB: [rocsparse_index_base_one]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [mac_econ_fwd500,
             nos2,
             nos4,
             nos6,
             scircuit]

- name: gebsr2csr
  category: nightly
  function: gebsr2csr
  precision: *single_double_precisions_complex_real
  M: [2742, 9412, 37586]
  N: [1858, 5719]
  row_block_dimA: [3]
  col_block_dimA: [3, 7]
  baseA: [rocsparse_index_base_zero]
  baseB: [rocsparse_index_base_zero]
  direction: [rocsparse_direction_row, rocsparse_direction_column]
  matrix: [rocsparse_matrix_random]

- name: gebsr2csr_file
  category: nightly
  function: gebsr2csr
  precision: *single_double_precisions_complex
  M: 1
  N: 1
  row_block_dimA: [3 ]
  col_block_dimA: [3, 3]
  baseA: [rocsparse_index_base_zero]
  baseB: [rocsparse_index_base_one]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [Chevron2,
             Chevron3]

- name: gebsr2csr_file
  category: nightly
  function: gebsr2csr
  precision: *single_double_precisions
  M: 1
  N: 1
  row_block_dimA: [5, 7]
  col_block_dimA: [5]
  baseA: [rocsparse_index_base_one]
  baseB: [rocsparse_index_base_zero]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [sme3Dc,
             webbase-1M,
             Chebyshev4]
