Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

40,023 questions

51,974 answers

573 users

How to get platform info using OpenCL in C

1 Answer

0 votes
#include <stdio.h>

//#define CL_USE_DEPRECATED_OPENCL_2_0_APIS

#include "opencl.h"
//#include "CL/cl.h"


int main(void)
{
    cl_platform_id platform;
    cl_uint platforms;

    clGetPlatformIDs(1, &platform, &platforms);

    char buf[64] = { 0 };
    clGetPlatformInfo(platform,
                      CL_PLATFORM_VENDOR,
                      sizeof(buf),
                      buf,
                      NULL);

    puts(buf);

    char ch = getchar();

    return 0;
}



/*
run:

NVIDIA Corporation

*/

 



answered Mar 26, 2022 by avibootz
edited Mar 26, 2022 by avibootz

Related questions

1 answer 155 views
1 answer 179 views
179 views asked Mar 26, 2022 by avibootz
1 answer 164 views
2 answers 164 views
2 answers 153 views
1 answer 91 views
1 answer 158 views
...