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

SCM Repository

[diderot] View of /branches/cuda/src/lib/include/diderot/diderot.cuh
ViewVC logotype

View of /branches/cuda/src/lib/include/diderot/diderot.cuh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5634 - (download) (annotate)
Wed Sep 15 21:02:20 2021 UTC (2 months, 2 weeks ago) by adrianlehmann
File size: 1664 byte(s)
Add GPU selection mechanism for multi-gpu machines
/*! \file diderot.h
 *
 * This header file pulls in all the various headers used in the Diderot library code.
 * It is meant to be included in the generated code produced by the Diderot compiler.
 *
 * \author John Reppy
 */

/*
 * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)
 *
 * COPYRIGHT (c) 2016 The University of Chicago
 * All rights reserved.
 */

#ifndef _DIDEROT_DIDEROT_HXX_
#define _DIDEROT_DIDEROT_HXX_

#include "base.h"
#include "base.cuh"
#include "util.cuh"
#include "options.h"
#include "tensor.h"
#include "image.cuh"
#include "dynseq.h"
#include "gpu-select.cuh"
#ifdef DIDEROT_HAS_STRAND_COMMUNICATION
#  ifdef DIDEROT_NO_SPACE_PARTITION
#    include "brute-force-query.h"
#  else
#    include "kdtree.h"
#  endif // DIDEROT_NO_SPACE_PARTITION
#endif // DIDEROT_HAS_STRAND_COMMUNICATION
#include "world.h"
#include "eigen.h"

#ifdef DIDEROT_TARGET_PARALLEL
#include "parallel.h"
#endif
#define cuda_err(cuda_fn, str) \
    {                          \
        cudaError_t cudaErr = cuda_fn;\
        if(cudaErr) { \
            std::cerr << (str) << ". Error " << cudaGetErrorName(cudaErr) << ": \"" << cudaGetErrorString(cudaErr) <<  "\" at " << __FILE__ << ":" << __LINE__  << std::endl; \
            return 1; \
        }\
    }

#define cuda_err_passthrough(cuda_fn, str) \
    {                          \
        cudaError_t cudaErr = cuda_fn;\
        if(cudaErr) {                      \
            std::cerr << str << ". Error "<< cudaGetErrorName(cudaErr) << ": " << cudaGetErrorString(cudaErr) << std::endl; \
            return cudaErr; \
        }\
    }

#endif // !_DIDEROT_DIDEROT_HXX_

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