Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] View of /branches/pure-cfg/src/lib/cl-target/clinfo.h
ViewVC logotype

View of /branches/pure-cfg/src/lib/cl-target/clinfo.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1269 - (download) (as text) (annotate)
Sun Jun 5 11:46:52 2011 UTC (10 years, 6 months ago) by jhr
File size: 1280 byte(s)
  Working on OpenCL runtime support.  Also, added configure support for generating OpenCL
  runtime makefiles.
/*! \file clinfo.h
 *
 * \author John Reppy
 */

/*
 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.
 */

#ifndef _CLINFO_H_
#define _CLINFO_H_

#include "Diderot/diderot.h"
# ifdef HAVE_CL_CL_H
#   include <CL/cl.h>
# elif defined(HAVE_OPENCL_CL_H)
#   include <OpenCL/cl.h>
# else
#   error no cl.h
# endif

typedef struct {
    char            *name;              //!< name of device
    cl_device_id    id;                 //!< the device ID
    cl_device_type  ty;                 //!< the type of the device
} DeviceInfo_t;

typedef struct {
    char            *name;              //!< name of platform
    cl_platform_id  id;                 //! the platform ID
    int             numDevices;         //!< number of devices supported by platform
    DeviceInfo_t    *devices;           //!< array of devices
} PlatformInfo_t;

typedef struct {
    int             numPlatforms;       //!< number of platforms supported by system
    PlatformInfo_t  *platforms;         //!< array of supported platforms.
} CLInfo_t;

/*! \brief return information about the OpenCL support of the system.
 *  \return pointer to a CLInfo_t structure or 0 if there is an error.
 */
CLInfo_t *GetCLInfo ();

#endif /* !_CLINFO_H_ */

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0