# ########################################################################
# Copyright (c) 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

Definitions:
  - &M_N_range_quick
    - { M:  37,  N:  37 }
    - { M:  50,  N:  50 }
    - { M:  98,  N:  98 }
    - { M: 121,  N: 121 }
    - { M: 220,  N: 220 }
    - { M: 546,  N: 546 }
    - { M: 756,  N: 756 }
    - { M: 1164, N: 1164 }

  - &M_N_range_checkin
    - { M: 378,  N: 378 }
    - { M: 476,  N: 476 }
    - { M: 937,  N: 937 }
    - { M: 1872, N: 1872 }
    - { M: 3453, N: 3453 }
    - { M: 4583, N: 4583 }
    - { M: 5452, N: 5452 }
    - { M: 9274, N: 9274 }

  - &M_N_range_nightly
    - { M: 56324,  N: 56324 }
    - { M: 58349,  N: 58349 }
    - { M: 67549,  N: 67549 }
    - { M: 85734,  N: 85734 }
    - { M: 93875,  N: 93875 }
    - { M: 102894, N: 102894 }

Tests:
- name: copy_info_bad_arg
  category: pre_checkin
  function: copy_info_bad_arg
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_quick
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info_bad_arg
  category: pre_checkin
  function: copy_info_bad_arg
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_checkin
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info_bad_arg
  category: pre_checkin
  function: copy_info_bad_arg
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_nightly
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info
  category: quick
  function: copy_info
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_quick
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info
  category: pre_checkin
  function: copy_info
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_checkin
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info
  category: nightly
  function: copy_info
  precision: *single_double_precisions_complex_real
  M_N: *M_N_range_nightly
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_random]

- name: copy_info
  category: quick
  function: copy_info
  precision: *single_double_precisions_complex_real
  M: 1
  N: 1
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [mac_econ_fwd500,
             nos2,
             nos4,
             nos6,
             scircuit]

- name: copy_info
  category: pre_checkin
  function: copy_info
  precision: *single_double_precisions_complex_real
  M: 1
  N: 1
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [Chevron2,
             Chevron3,
             Chevron4]

- name: copy_info
  category: nightly
  function: copy_info
  precision: *single_double_precisions_complex_real
  M: 1
  N: 1
  transA: [rocsparse_operation_none, rocsparse_operation_transpose]
  matrix: [rocsparse_matrix_file_rocalution]
  filename: [amazon0312,
             bmwcra_1,
             mac_econ_fwd500,
             sme3Dc,
             webbase-1M,
             Chebyshev4]
