Commit 896e81a8 authored by Vít Hanousek's avatar Vít Hanousek
Browse files

doplněny nov soubory

parent 15dc3870
Loading
Loading
Loading
Loading

netbeans_build.sh

0 → 100755
+5 −0
Original line number Diff line number Diff line
#!/bin/bash

module load gcc-5.3.0 cmake-3.4.3 intel_parallel_studio_ex-2016.1
make -j 6 tnlSatanMICVectorExperimentalTest-dbg
#make -j 6 tnl-image-converter-dbg
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
#!/bin/bash

module load gcc-5.3.0 cmake-3.4.3 intel_parallel_studio_ex-2016.1
cd Debug/bin
#OFFLOAD_REPORT=2 ./tnlSatanExperimentalTest-dbg
#./tnlSatanExperimentalTest-dbg
./tnlSatanMICVectorExperimentalTest-dbg
 No newline at end of file
+934 −0

File added.

Preview size limit exceeded, changes collapsed.

+34 −0
Original line number Diff line number Diff line
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   tnldevice_callable.h
 * Author: hanouvit
 *
 * Created on 18. dubna 2016, 15:49
 */

#ifndef TNLDEVICE_CALLABLE_H
#define TNLDEVICE_CALLABLE_H

//deprecated __cuda_callable__
#ifdef HAVE_CUDA
    #define __cuda_callable__ __device__ __host__
#else
    #define __cuda_callable__ 
#endif

//NEW, better  __device_callable__ --used only with MIC touch code
#ifdef HAVE_ICPC 
    #define __device_callable__ __attribute__((target(mic)))
#elif HAVE_CUDA
    #define __device_callable__ __device__ __host__
#else
    #define __device_callable__ 
#endif

#endif /* TNLDEVICE_CALLABLE_H */

src/core/tnlMIC.h

0 → 100644
+56 −0
Original line number Diff line number Diff line
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/* 
 * File:   tnlMIC.h
 * Author: hanouvit
 *
 * Created on 18. dubna 2016, 12:38
 */

#include <iostream>
#include <core/tnlString.h>
#include <core/tnlDevice.h>
#include <core/tnlDevice_Callable.h>


#ifndef TNLMIC_H
#define TNLMIC_H

#define ALLOC alloc_if(1) //naalokuj promenou na zacatku offload  bloku -- default
#define FREE free_if(1) // smaz promenou na konci offload bloku -- default
#define RETAIN free_if(0) //nesmaz promenou na konci bloku
#define REUSE alloc_if(0) //nealokuj proměnnou na zacatku


class tnlMIC
{
   public:
       //useful debuging -- but produce warning
       __device_callable__ static inline void CheckMIC(void)
       {
            #ifdef __MIC__
                    std::cout<<"ON MIC"<<std::endl;
            #else
                    std::cout<<"ON CPU" <<std::endl;
            #endif
        }
       
       
        static tnlString getDeviceType()
        {
            return tnlString( "tnlMIC" );
        }

         __device_callable__ static inline tnlDeviceEnum getDevice()
         {
             return tnlMICDevice;
         }
};


#endif /* TNLMIC_H */
Loading