You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

gemm64.cpp 508 B

1234567891011121314151617181920
  1. #include <iostream>
  2. #include <cblas.h>
  3. int main ( int argc, char* argv[] ) {
  4. const long n = ((long)1 << 31) - 1;
  5. std::cout << n <<std::endl;
  6. float* A = new float[n];
  7. float* B = new float[n];
  8. float* C = new float[1];
  9. for(long i =0; i <n; i++){
  10. A[i] = 1;
  11. B[i] = 1;
  12. }
  13. cblas_sgemm(CblasRowMajor, CblasNoTrans, CblasNoTrans, 1, 1, n, 1.0, A, n, B, 1, 0.0, C, 1);
  14. std::cout << *C <<std::endl;
  15. delete[] A;
  16. delete[] B;
  17. delete[] C;
  18. return 0;
  19. }