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

  • Home
  • SEARCH
  • 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 8821177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:47:16+00:00 2026-06-14T05:47:16+00:00

Here’s the problem: I’m developing a framework (CLCuda, not the most creative name out

  • 0

Here’s the problem: I’m developing a framework (CLCuda, not the most creative name out there) where the programmer instantiates one object, and depending on what the system supports (CUDA or AMD OpenCL), will use the corresponding methods, without having to change any line of code to that.

I have a abstract class named CLCuda (pure virtual methods, but could be just virtual), and the two classes that implement its methods are CLCudaCUDA and CLCudaOPENCL.

I wanted to have something like this: instantiate one object that will iniciatlizate CUDA or OpenCL, depending on what graphics card the user have, that can access the methods of the available platform (through the class CLCudaCUDA or CLCudaOPENCL).

I already coded the methods of CLCudaOpenCL and CLCudaCUDA (hard times doing that), so my problem is with OOP.

How could I structure my classes?

If anyone can help… thanks very much!

  • 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-06-14T05:47:17+00:00Added an answer on June 14, 2026 at 5:47 am

    Your problem seems to suggest a “Factory” design pattern. Presumably you have a method to determine which is supported on the current host, so you should leverage that in the implementation of your factory.

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

Sidebar

Related Questions

Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here is what I am currently doing. PHP echo's out the recent post in
Here is my SQL script CREATE TABLE tracks( track_id int NOT NULL AUTO_INCREMENT, account_id
Here is the final result of what my page is(not much fancy stuff yet):
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here my problem: @Assert\Regex( * pattern=/^[A-Za-z0-9][A-Za-z0-9\]*$/, * groups={creation, creation_logged} * ) I'm using the
Here is the problem that I am trying to solve. I have two folders
Here is my problem : I have a post controller with the action create.
Here is the problem I'm trying to solve for my game. I have this
Here's a dump of the stats provided my mod_pagespeed from one of my sites.

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.