---
include: rocblas_common.yaml
include: known_bugs.yaml

Definitions:
  - &special_case_range
    - { N: 0, lda: 1, incx: 1, incy: 1, batch_count: 1 }
    - { N: 1, lda: 1, incx: 1, incy: 1, batch_count: 0 }

    - { N: -1, lda: 1, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, lda: 0, incx: 1, incy: 1, batch_count:  0 }
    - { N:  2, lda: 1, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, incx: 0, incy: 1, batch_count:  0 }
    - { N:  0, lda: 1, incx: 1, incy: 0, batch_count:  0 }
    - { N:  0, lda: 1, incx: 1, incy: 1, batch_count: -1 }

  - &tiny_matrix_size
    - { N:    33, lda:   33 }

  - &medium_matrix_size_range
    - { N:    10, lda:    2 }
    - { N:    33, lda:   33 }
    - { N:   300, lda:  600 }

  - &large_matrix_size_range
    - { N:  4011, lda:  4011 }
    - { N:  7000, lda:  7000 }

  - &incx_incy_range
    - { incx:   2, incy:   1 }
    - { incx:  -1, incy:  -1 }

  - &complex_alpha_beta_range
    - { alpha:  0,    alphai:  0,   beta:  1,   betai:  0 } # quick success
    - { alpha:  1.5,  alphai:  0.5, beta:  2,   betai:  0.5 }
    - { alpha:  1,    alphai:  2,   beta:  1,   betai:  2 }
    - { alpha:  1.0,  alphai:  1,   beta:  0.5, betai:  1 }

  - &alpha_beta_range_small
    - { alpha: 2, alphai: 0.5, beta: 1.5, betai: -1.5 }

  - &alpha_beta_range_nan
    - { alpha: .NaN, beta: 1.5 }
    - { alpha: 1.2, beta: .NaN }

Tests:
- name: symv_bad
  category: pre_checkin
  function: symv_bad_arg
  precision: *single_precision
  fortran: [ false, true ]

- name: symv_arg_check
  category: quick
  function:
  - symv
  - symv_batched
  - symv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: L
  matrix_size: *special_case_range

- name: symv_fortran
  category: quick
  function: symv
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small
  fortran: true

- name: symv_NaN
  category: pre_checkin
  function: symv
  precision: *single_double_precisions_complex_real
  uplo: [ U ]
  matrix_size: *tiny_matrix_size
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_nan

- name: symv_medium
  category: pre_checkin
  function: symv
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *complex_alpha_beta_range

- name: symv_large
  category: nightly
  function: symv
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small

  # batched
- name: symv_batched_bad
  category: pre_checkin
  function: symv_batched_bad_arg
  precision: *single_precision
  fortran: [ false, true ]

- name: symv_batched_fortran
  category: quick
  function: symv_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: symv_batched_medium
  category: pre_checkin
  function: symv_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *complex_alpha_beta_range
  batch_count: [ 1, 257 ]

- name: symv_batched_large
  category: nightly
  function: symv_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small
  batch_count: [ 1, 3 ]

  # strided batched
- name: symv_strided_batched_bad
  category: pre_checkin
  function: symv_strided_batched_bad_arg
  precision: *single_precision
  fortran: [ false, true ]

- name: symv_strided_batched_fortran
  category: quick
  function: symv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: symv_strided_batched_medium
  category: pre_checkin
  function: symv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *complex_alpha_beta_range
  batch_count: [ 1, 257 ]

- name: symv_strided_batched_large
  category: nightly
  function: symv_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_beta_range_small
  batch_count: [ 1, 3 ]

...
