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

Definitions:
  - &small_matrix_size_range
    - { N:     1, lda:     1 }
    - { N:    11, lda:    12 }
    - { N:    16, lda:    16 }
    - { N:    33, lda:    32 }
    - { N:    65, lda:    66 }

  - &special_case_range
    # Quick return
    - { N: 0, lda: 1, incx: 1, batch_count: 1 }
    - { N: 1, lda: 1, incx: 1, batch_count: 0 }
    # invalid_arg checks
    - { N: -1, lda: 1, incx: 1, batch_count:  0 }
    - { N:  0, lda: 0, incx: 1, batch_count:  0 }
    - { N:  2, lda: 1, incx: 1, batch_count:  0 }
    - { N:  0, lda: 1, incx: 0, batch_count:  0 }
    - { N:  0, lda: 1, incx: 1, batch_count: -1 }

  - &medium_matrix_size_range
    - { N:  1000, lda:  1000 }
    - { N:  2011, lda:  2011 }

  - &large_matrix_size_range
    - { N:  3000, lda:  3000 }
    - { N:  6001, lda:  6001 }

  - &alpha_range
    - { alpha: -0.5, alphai:  1.5 }
    - { alpha:  0.0, alphai:  0.0 }
    - { alpha:  0.0, alphai:  2.0 }
    - { alpha:  1.0, alphai:  0.0 }

  - &alpha_range_small
    - { alpha: 2.0, alphai: 0.5 }

  - &alpha_nan
    - { alpha: .NaN, alphai: .NaN }

Tests:

- name: syr_bad_arg
  category: pre_checkin
  function:
  - syr_bad_arg: *single_precision
  - syr_batched_bad_arg: *single_precision
  - syr_strided_batched_bad_arg: *single_precision
  fortran: [ false, true ]

- name: syr_arg_check
  category: quick
  function:
  - syr: *single_precision
  - syr_batched: *single_precision
  - syr_strided_batched: *single_precision
  uplo: L
  matrix_size: *special_case_range

- name: syr_fortran
  category: quick
  function: syr
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ -2, 2 ]
  alpha_beta: *alpha_range_small
  fortran: true

- name: syr_NaN
  category: quick
  function: syr
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  N: [ 32 ]
  lda: [ 32 ]
  incx: [ 1 ]
  alpha_beta: *alpha_nan

- name: syr_small
  category: quick
  function: syr
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 1, -2, 10 ]
  alpha_beta: *alpha_range

- name: syr_medium
  category: pre_checkin
  function: syr
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range_small

- name: syr_large
  category: nightly
  function: syr
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx: [ 3 ]
  alpha_beta: *alpha_range_small

# batched
- name: syr_batched_fortran
  category: quick
  function: syr_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ -2, 2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: syr_batched_small
  category: quick
  function: syr_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ -1, 2, 10 ]
  alpha_beta: *alpha_range
  batch_count: [ 1, 5 ]

- name: syr_batched_medium
  category: pre_checkin
  function: syr_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

- name: syr_batched_large
  category: nightly
  function: syr_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U ]
  matrix_size: *large_matrix_size_range
  incx: [ 3 ]
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

# strided batched
- name: syr_strided_batched_fortran
  category: quick
  function: syr_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ -2, 2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: syr_strided_batched_small
  category: quick
  function: syr_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx: [ 1, -2, 10 ]
  alpha_beta: *alpha_range
  batch_count: [ 1, 5 ]

- name: syr_strided_batched_medium
  category: pre_checkin
  function: syr_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx: [ 2, -2 ]
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

- name: syr_strided_large
  category: nightly
  function: syr_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ L ]
  matrix_size: *large_matrix_size_range
  incx: [ 3 ]
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

...
