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 4110206
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T21:54:14+00:00 2026-05-20T21:54:14+00:00

This should be very simple but I could not find an exhaustive answer: I

  • 0

This should be very simple but I could not find an exhaustive answer:

I need to perform A+B = C with matrices, where A and B are two matrices of unknown size (they could be 2×2 or 20.000×20.000 as greatest value)

Should I use CUBLAS with Sgemm function to calculate?

I need the maximum speed achievable so I thought of CUBLAS library which should be well-optimized

  • 1 1 Answer
  • 3 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-20T21:54:15+00:00Added an answer on May 20, 2026 at 9:54 pm

    For any sort of technical computing, you should always use optimized libraries when available. Existing libraries, used by hundreds of other people, are going to be better tested and better optimized than anything you do yourself, and the time you don’t spend writing (and debugging, and optimizing) that function yourself can be better spent working on the actual high-level problem you want to solve instead of re-discovering things other people have already implemented. This is just basic specialization of labour stuff; focus on the compute problem you want to solve, and let people who spend their days professionally writing GPGPU matrix routines do that for you.

    Only when you are sure that existing libraries don’t do what you need — maybe they solve too general a problem, or make certain assumptions that don’t hold in your case — should you roll your own.

    I agree with the others that in this particular case, the operation is pretty straightforward and it’s feasible to DIY; but if you’re going to be doing anything else with those matricies once you’re done adding them, you’d be best off using optimized BLAS routines for whatever platform you’re on.

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

Sidebar

Related Questions

This question can be very simple but could not find the answer; I receive
This should be very simple, but I'm blocking on this.... Let's say, for the
This seems like it should be very simple but I can't get it to
I feel as if this should be very simple, but it's behaving strangely. I
This should be simple, but I am still lost. There is a very similar
This should be simple, very simple, but I'm having a hard time with it.
I quickly searched for this before posting, but could not find any similar posts.
This should be very simple question. There are many programming languages out there, compiled
This should be a very simple procedure of putting a container in the centre
This should be very easy but I don't know how to do it. I

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.