Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3422508
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:15:33+00:00 2026-05-18T06:15:33+00:00

double a[] = { 0.11, 0.12, 0.13, 0.21, 0.22, 0.23 }; double b[] =

  • 0
double a[] = { 0.11, 0.12, 0.13,
                  0.21, 0.22, 0.23 };

   double b[] = { 1011, 1012,
                  1021, 1022,
                  1031, 1032 };

   double c[] = { 0.00, 0.00,
                  0.00, 0.00 };

   gsl_matrix_view A = gsl_matrix_view_array(a, 2, 3);
   gsl_matrix_view B = gsl_matrix_view_array(b, 3, 2);
   gsl_matrix_view C = gsl_matrix_view_array(c, 2, 2);

   /* Compute C = A B */

   gsl_blas_dgemm (CblasNoTrans, CblasNoTrans,
                   1.0, &A.matrix, &B.matrix,
                   0.0, &C.matrix);

how do I deallocate the memory assigned to the matrices?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:15:34+00:00Added an answer on May 18, 2026 at 6:15 am

    The compiler will take care of those matrices. Unless you use malloc()/new[] or any function that uses malloc()/new[] and gives you ownership of the allocated memory there’re no chances to leak memory.

    If you asked about gsl_matrix_view_array() – the documentation says that the return value is a pointer to a view in the original matrix which means that no extra matrix is allocated – you only get a pointer into the same matrix. So unless you used malloc()/new to allocate the original matrix you shouldn’t do anything. If you use malloc()/new[] for the original matrix (not your case, but anyway) – call free()/delete[] on the original matrix, not on a view.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

double Matrix::operator()(unsigned int a, unsigned int b) { return m[a*rows+b]; } I have the
double Time; ... WriteFile( tmp_pipe, Time, sizeof(double), &dwWritten, NULL ); The above reports :
two typedefs std::vector<double> Matrix; std::vector<Matrix> MatrixBlocks; The Matrix is represented by a 1D vector,
I have 16 1D arrays with approximately 10-11 million double-precision elements each. I need
Double-clicking a TStaticText on a form copies the caption of that TStaticText to the
double? test = true ? null : 1.0; In my book, this is the
double d[10]; int length = 10; memset(d, length * sizeof(double), 0); //or for (int
Double has range more than a 64-bit integer, but its precision is less dues
In double (*foo)[2] what does the [2] represent? And how would I convert an
private double f(double x, double zn = 1) { double X = - zn;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.