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

Definitions:
  - &quick_matrix_size_range
    - { N:  -1,  K:  1,  lda:  1,  ldb: 1,  ldc:  1 } # bad n
    - { N:   2,  K: -1,  lda:  2,  ldb: 2,  ldc:  1 } # bad k
    - { N:   0,  K:  3,  lda:  3,  ldb: 3,  ldc:  3 } # n==0
    - { N:   3,  K:  0,  lda:  3,  ldb: 3,  ldc:  3 } # k==0
    - { N:   3,  K:  1,  lda:  1,  ldb: 3,  ldc:  3 } # bad lda if not transpose
    - { N:   1,  K:  3,  lda:  1,  ldb: 3,  ldc:  3 } # bad lda if transpose
    - { N:   3,  K:  1,  lda:  3,  ldb: 1,  ldc:  3 } # bad ldb if not transpose
    - { N:   1,  K:  3,  lda:  3,  ldb: 1,  ldc:  3 } # bad ldb if transpose
    - { N:   3,  K:  3,  lda:  3,  ldb: 3,  ldc:  1 } # bad ldc

  - &medium_matrix_size_range
    - { N:   199, K:   33,  lda:  199,  ldb: 199,  ldc: 199 }
    - { N:    88, K:  200,  lda:  200,  ldb: 200,  ldc: 88 }
    - { N:    64, K:   70,  lda:  128,  ldb: 128,  ldc: 64 }
    - { N:   199, K:  290,  lda:  290,  ldb: 290,  ldc: 200 }

  - &large_matrix_size_range
    - { N:  2011, K:  253,  lda:  2011, ldb: 2011, ldc: 2048 }
    - { N:  1024, K:  1200, lda:  1200, ldb: 1200, ldc: 1024 }

  - &alpha_beta_range
    - { alpha:  1.5, alphai:  1.5, beta:  0.0, betai: 0.0 }
    - { alpha: -2.0, alphai:  1.0, beta: -1.0, betai: 0.5 }
    - { alpha:  0.0, alphai:  0.0, beta:  1.0, betai: 0.0 } # quick success
    - { alpha:  0.0, alphai:  0.0, beta:  2.0, betai: 0.5 } # scale step only

  - &alpha_beta
    - { alpha: 1.0, alphai:  -1.0, beta: 0.5, betai: -0.5 }

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

- name: syr2k_size_t
  category: nightly
  function: syr2k
  precision: *single_precision
  uplo: [ U ]
  transA: [ T ]
  matrix_size:
    - { N:     4, K: 51200, lda: 51200, ldb: 51200, ldc:     4 }
    - { N: 51200, K:     4, lda:     4, ldb:     4, ldc: 51200 }
  alpha_beta:
    - { alpha:  2.0, alphai:  0.0, beta:  3.0, betai: 0.0 }

- name: syr2k_quick
  category: quick
  function: syr2k
  precision: *single_precision
  uplo: [ U ]
  transA: [ N, T ]
  matrix_size: *quick_matrix_size_range
  alpha: [ 0, 1 ]
  beta: [ 0, 1 ]

- name: syr2k_medium
  category: pre_checkin
  function: syr2k
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  transA: [ N, T ]
  matrix_size: *medium_matrix_size_range
  alpha_beta: *alpha_beta_range
  fortran: [ false, true ]

- name: syr2k_large
  category: nightly
  function: syr2k
  precision: *single_double_precisions_complex_real
  uplo: [ U ]
  transA: [ N, T ]
  matrix_size: *large_matrix_size_range
  alpha_beta: *alpha_beta

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

- name: syr2k_batched_quick
  category: quick
  function: syr2k_batched
  precision: *single_precision
  uplo: [ U ]
  transA: [ N, T ]
  matrix_size: *quick_matrix_size_range
  alpha: [ 0, 1 ]
  beta: [ 0, 1 ]
  batch_count: [ 0, 1 ]

- name: syr2k_batched_medium
  category: pre_checkin
  function: syr2k_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  transA: [ N, T ]
  matrix_size: *medium_matrix_size_range
  alpha_beta: *alpha_beta_range
  batch_count: [ 2 ]
  fortran: [ false, true ]

- name: syr2k_batched_large
  category: nightly
  function: syr2k_batched
  precision: *single_double_precisions_complex_real
  uplo: [ L ]
  transA: [ N, T ]
  matrix_size: *large_matrix_size_range
  alpha_beta: *alpha_beta
  batch_count: [ 2 ]

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

- name: syr2k_strided_batched_quick
  category: quick
  function: syr2k_strided_batched
  precision: *single_precision
  uplo: [ U ]
  transA: [ N, T ]
  matrix_size: *quick_matrix_size_range
  alpha: [ 0, 1 ]
  beta: [ 0, 1 ]
  batch_count: [ 0, 1 ]

- name: syr2k_strided_batched_medium
  category: pre_checkin
  function: syr2k_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U, L ]
  transA: [ N, T ]
  matrix_size: *medium_matrix_size_range
  alpha_beta: *alpha_beta_range
  batch_count: [ 2 ]
  fortran: [ false, true ]

- name: syr2k_strided_batched_large
  category: nightly
  function: syr2k_strided_batched
  precision: *single_double_precisions_complex_real
  uplo: [ U ]
  transA: [ N, T ]
  matrix_size: *large_matrix_size_range
  alpha_beta: *alpha_beta
  batch_count: [ 2 ]

...
