libflame  revision_anchor
FLASH_Queue_gpu.h
Go to the documentation of this file.
00001 /*
00002 
00003     Copyright (C) 2014, The University of Texas at Austin
00004 
00005     This file is part of libflame and is available under the 3-Clause
00006     BSD license, which can be found in the LICENSE file at the top-level
00007     directory, or at http://opensource.org/licenses/BSD-3-Clause
00008 
00009 */
00010 
00011 #ifndef FLASH_QUEUE_GPU_H
00012 #define FLASH_QUEUE_GPU_H
00013 
00014 #ifdef FLA_ENABLE_GPU
00015 
00016 
00017 void           FLASH_Queue_init_gpu( void );
00018 void           FLASH_Queue_finalize_gpu( void );
00019 
00020 FLA_Error      FLASH_Queue_enable_gpu( void );
00021 FLA_Error      FLASH_Queue_disable_gpu( void );
00022 FLA_Bool       FLASH_Queue_get_enabled_gpu( void );
00023 
00024 
00025 // --- helper functions -------------------------------------------------------
00026 
00027 void           FLASH_Queue_set_gpu_num_blocks( dim_t n_blocks );
00028 dim_t          FLASH_Queue_get_gpu_num_blocks( void );
00029 
00030 FLA_Error      FLASH_Queue_bind_gpu( int thread );
00031 FLA_Error      FLASH_Queue_alloc_gpu( dim_t size, FLA_Datatype datatype, void** buffer_gpu );
00032 FLA_Error      FLASH_Queue_free_gpu( void* buffer_gpu );
00033 FLA_Error      FLASH_Queue_write_gpu( FLA_Obj obj, void* buffer_gpu );
00034 FLA_Error      FLASH_Queue_read_gpu( FLA_Obj obj, void* buffer_gpu );
00035 
00036 void           FLASH_Queue_exec_task_gpu( FLASH_Task* t, void** input_arg, void** output_arg );
00037 
00038 
00039 #endif
00040 
00041 #endif // FLASH_QUEUE_GPU_H