libflame  12600
FLASH_Queue_gpu.h
Go to the documentation of this file.
00001 /*
00002    libflame
00003    An object-based infrastructure for developing high-performance
00004    dense linear algebra libraries.
00005 
00006    Copyright (C) 2011, The University of Texas
00007 
00008    libflame is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU Lesser General Public License as
00010    published by the Free Software Foundation; either version 2.1 of
00011    the License, or (at your option) any later version.
00012 
00013    libflame is distributed in the hope that it will be useful, but
00014    WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with libflame; if you did not receive a copy, see
00020    http://www.gnu.org/licenses/.
00021 
00022    For more information, please contact us at flame@cs.utexas.edu or
00023    send mail to:
00024 
00025    Field G. Van Zee and/or
00026    Robert A. van de Geijn
00027    The University of Texas at Austin
00028    Department of Computer Sciences
00029    1 University Station C0500
00030    Austin TX 78712
00031 */
00032 
00033 #ifndef FLASH_QUEUE_GPU_H
00034 #define FLASH_QUEUE_GPU_H
00035 
00036 #ifdef FLA_ENABLE_GPU
00037 
00038 
00039 void           FLASH_Queue_init_gpu( void );
00040 void           FLASH_Queue_finalize_gpu( void );
00041 
00042 FLA_Error      FLASH_Queue_enable_gpu( void );
00043 FLA_Error      FLASH_Queue_disable_gpu( void );
00044 FLA_Bool       FLASH_Queue_get_enabled_gpu( void );
00045 
00046 
00047 // --- helper functions -------------------------------------------------------
00048 
00049 void           FLASH_Queue_set_gpu_num_blocks( dim_t n_blocks );
00050 dim_t          FLASH_Queue_get_gpu_num_blocks( void );
00051 
00052 FLA_Error      FLASH_Queue_bind_gpu( int thread );
00053 FLA_Error      FLASH_Queue_alloc_gpu( dim_t size, FLA_Datatype datatype, void** buffer_gpu );
00054 FLA_Error      FLASH_Queue_free_gpu( void* buffer_gpu );
00055 FLA_Error      FLASH_Queue_write_gpu( FLA_Obj obj, void* buffer_gpu );
00056 FLA_Error      FLASH_Queue_read_gpu( FLA_Obj obj, void* buffer_gpu );
00057 
00058 void           FLASH_Queue_exec_task_gpu( FLASH_Task* t, void** input_arg, void** output_arg );
00059 
00060 
00061 #endif
00062 
00063 #endif // FLASH_QUEUE_GPU_H