2008-03-10 20:40:35 +00:00
|
|
|
// Berkeley Open Infrastructure for Network Computing
|
|
|
|
// http://boinc.berkeley.edu
|
|
|
|
// Copyright (C) 2008 University of California
|
|
|
|
//
|
|
|
|
// This is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation;
|
|
|
|
// either version 2.1 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This software is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
// See the GNU Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// To view the GNU Lesser General Public License visit
|
|
|
|
// http://www.gnu.org/copyleft/lesser.html
|
|
|
|
// or write to the Free Software Foundation, Inc.,
|
|
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
|
|
|
#ifndef _COPROC_
|
|
|
|
#define _COPROC_
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
struct COPROC {
|
|
|
|
char name[256]; // must be unique
|
|
|
|
int count; // how many are present
|
|
|
|
|
|
|
|
virtual void write_xml(FILE*){}
|
|
|
|
virtual ~COPROC(){}
|
|
|
|
};
|
|
|
|
|
|
|
|
struct COPROCS {
|
|
|
|
std::vector<COPROC> coprocs;
|
|
|
|
|
|
|
|
COPROCS(){}
|
|
|
|
void get();
|
2008-03-10 21:59:27 +00:00
|
|
|
int parse(FILE*);
|
2008-03-10 20:40:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// the following copied from /usr/local/cuda/include/driver_types.h
|
|
|
|
//
|
|
|
|
struct cudaDeviceProp {
|
|
|
|
char name[256];
|
|
|
|
size_t totalGlobalMem;
|
|
|
|
size_t sharedMemPerBlock;
|
|
|
|
int regsPerBlock;
|
|
|
|
int warpSize;
|
|
|
|
size_t memPitch;
|
|
|
|
int maxThreadsPerBlock;
|
|
|
|
int maxThreadsDim[3];
|
|
|
|
int maxGridSize[3];
|
|
|
|
size_t totalConstMem;
|
|
|
|
int major;
|
|
|
|
int minor;
|
|
|
|
int clockRate;
|
|
|
|
size_t textureAlignment;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct COPROC_CUDA : public COPROC {
|
|
|
|
cudaDeviceProp prop;
|
|
|
|
|
|
|
|
virtual void write_xml(FILE*);
|
|
|
|
virtual ~COPROC_CUDA(){}
|
|
|
|
static void get(COPROCS&);
|
2008-03-10 21:59:27 +00:00
|
|
|
void clear();
|
|
|
|
int parse(FILE*);
|
2008-03-10 20:40:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct COPROC_CELL_SPE : public COPROC {
|
|
|
|
static void get(COPROCS&);
|
|
|
|
virtual ~COPROC_CELL_SPE(){}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|