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

Definitions:
  - &small_matrix_size_range
    - { N:     1 }
    - { N:     4 }
    - { N:    16 }
    - { N:    33 }
    - { N:    65 }

  - &special_case_range
    - { N: 0, incx: 1, incy: 1, batch_count: 1 }
    - { N: 1, incx: 1, incy: 1, batch_count: 0 }
# invalid_arg checks
    - { N: -1, incx: 1, incy: 1, batch_count:  0 }
    - { N:  0, incx: 0, incy: 1, batch_count:  0 }
    - { N:  0, incx: 1, incy: 0, batch_count:  0 }
    - { N:  0, incx: 1, incy: 1, batch_count: -1 }

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

  - &large_matrix_size_range
    - { N:  2048 }
    - { N:  4011 }

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

  - &incx_incy_range_small
    - { incx: 1, incy: 1 }

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

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

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

Tests:

- name: hpr2_bad_arg
  category: pre_checkin
  function:
  - hpr2_bad_arg: *single_double_precisions_complex
  - hpr2_batched_bad_arg: *single_double_precisions_complex
  - hpr2_strided_batched_bad_arg: *single_double_precisions_complex
  fortran: [ false, true ]

- name: hpr2_arg_check
  category: quick
  function:
  - hpr2: *single_double_precisions_complex
  - hpr2_batched: *single_double_precisions_complex
  - hpr2_strided_batched: *single_double_precisions_complex
  uplo: L
  matrix_size: *special_case_range

- name: hpr2_fortran
  category: quick
  function: hpr2
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  fortran: true

- name: hpr2_NaN
  category: quick
  function: hpr2
  precision: *single_double_precisions_complex
  uplo: [ U ]
  N: [ 32 ]
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_nan

- name: hpr2_small
  category: quick
  function: hpr2
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_range

- name: hpr2_medium
  category: pre_checkin
  function: hpr2
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small

- name: hpr2_large
  category: nightly
  function: hpr2
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small

# batched
- name: hpr2_batched_fortran
  category: quick
  function: hpr2_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  fortran: true

- name: hpr2_batched_small
  category: quick
  function: hpr2_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_range
  batch_count: [ 1, 5 ]

- name: hpr2_batched_medium
  category: pre_checkin
  function: hpr2_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

- name: hpr2_batched_large
  category: nightly
  function: hpr2_batched
  precision: *single_double_precisions_complex
  uplo: [ L ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  batch_count: [ 1, 3 ]

# strided batched
- name: hpr2_strided_batched_fortran
  category: quick
  function: hpr2_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  batch_count: [ -1, 0, 3 ]
  stride_scale: [ 2 ]
  fortran: true

- name: hpr2_strided_batched_small
  category: quick
  function: hpr2_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *small_matrix_size_range
  incx_incy: *incx_incy_range
  alpha_beta: *alpha_range
  stride_scale: [ 1.0, 2.5 ]
  batch_count: [ 1, 5 ]

- name: hpr2_strided_batched_medium
  category: pre_checkin
  function: hpr2_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U, L ]
  matrix_size: *medium_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  stride_scale: [ 1.0, 2.5 ]
  batch_count: [ 1, 3 ]

- name: hpr2_strided_large
  category: nightly
  function: hpr2_strided_batched
  precision: *single_double_precisions_complex
  uplo: [ U ]
  matrix_size: *large_matrix_size_range
  incx_incy: *incx_incy_range_small
  alpha_beta: *alpha_range_small
  stride_scale: [ 1.0 ]
  batch_count: [ 1, 3 ]

...
