Fréchet View  1.6.0
A Tool for Exploring Fréchet Distance Algorithms
clm4rm_bitwise.cpp File Reference
#include <clm4rm.h>
#include <qdebug.h>

Go to the source code of this file.

Functions

void assertMatrixSize (clmatrix_t *C, clmatrix_t *A, clmatrix_t *B)
 
void clm4rm_or (clmatrix_t *C, clmatrix_t *A, clmatrix_t *B, cl_command_queue queue, clm4rm_conditions *cond)
 perform element-wise logical disjunction (OR) More...
 
void clm4rm_and (clmatrix_t *C, clmatrix_t *A, clmatrix_t *B, cl_command_queue queue, clm4rm_conditions *cond)
 perform element-wise logical conjunction (AND). For each entry, compute C_ij := A_ij & B_ij. All input matrices must have the same size. More...
 
cl_mem clm4rm_query_diagonal (clmatrix_t *M, cl_context ctx, cl_command_queue queue, clm4rm_conditions *cond)
 find a non-zero entry on the diagonal of a matrix. Return the column/row of the first non-zero entry, or -1 if all entries are zero. The operation does not immediately return a result. It performs asynchronously. Use the post-conditions variables to wait for the execution of the operation, then use clm4rm_query_result to retrieve the actual result. More...
 
int clm4rm_query_result (cl_mem result_buffer, cl_command_queue queue, clm4rm_conditions *cond)
 examine the result of a previous call to clm4rm_query_diagonal More...
 
void clm4rm_free (clmatrix_t *gpu_matrix)
 release memory (CPU and GPU) More...
 
void clm4rm_stack (clmatrix_t *C, clmatrix_t *A, clmatrix_t *B, cl_command_queue queue, clm4rm_conditions *cond)
 concatenate two matrices More...
 
void clm4rm_concat (clmatrix_t *C, clmatrix_t *A, clmatrix_t *B, cl_command_queue queue, clm4rm_conditions *cond)
 concatenate two matrices More...
 

Variables

cl_kernel clm4rm_and_kernel
 
cl_kernel clm4rm_or_kernel
 
cl_kernel clm4rm_copy_kernel
 
cl_kernel clm4rm_query_diagonal_kernel
 

Function Documentation

◆ assertMatrixSize()

void assertMatrixSize ( clmatrix_t C,
clmatrix_t A,
clmatrix_t B 
)

Definition at line 5 of file clm4rm_bitwise.cpp.

◆ clm4rm_and()

void clm4rm_and ( clmatrix_t C,
clmatrix_t A,
clmatrix_t B,
cl_command_queue  queue,
clm4rm_conditions cond 
)

perform element-wise logical conjunction (AND). For each entry, compute C_ij := A_ij & B_ij. All input matrices must have the same size.

Parameters
Ca Boolean matrix; holds the result on return
Aan input Boolean matrix
Ban input Boolean matrix
queueOpenCL command queue
condkeeps track of pre-conditions and newly created post-conditions

Definition at line 45 of file clm4rm_bitwise.cpp.

◆ clm4rm_concat()

void clm4rm_concat ( clmatrix_t C,
clmatrix_t A,
clmatrix_t B,
cl_command_queue  queue,
clm4rm_conditions cond 
)

concatenate two matrices

Deprecated:
not used anymore

Definition at line 160 of file clm4rm_bitwise.cpp.

◆ clm4rm_free()

void clm4rm_free ( clmatrix_t gpu_matrix)

release memory (CPU and GPU)

release gpu memory

Definition at line 112 of file clm4rm_bitwise.cpp.

◆ clm4rm_or()

void clm4rm_or ( clmatrix_t C,
clmatrix_t A,
clmatrix_t B,
cl_command_queue  queue,
clm4rm_conditions cond 
)

perform element-wise logical disjunction (OR)

Deprecated:
not used anymore

Definition at line 23 of file clm4rm_bitwise.cpp.

◆ clm4rm_query_diagonal()

cl_mem clm4rm_query_diagonal ( clmatrix_t M,
cl_context  ctx,
cl_command_queue  queue,
clm4rm_conditions cond 
)

find a non-zero entry on the diagonal of a matrix. Return the column/row of the first non-zero entry, or -1 if all entries are zero. The operation does not immediately return a result. It performs asynchronously. Use the post-conditions variables to wait for the execution of the operation, then use clm4rm_query_result to retrieve the actual result.

Parameters
Ma matrix
ctxOpenCL context
queueOpenCL command queue
condkeeps track of pre-conditions and newly created post-conditions
Returns
a memory buffer that holds exactly one integer. It will eventually hold the result.

Definition at line 67 of file clm4rm_bitwise.cpp.

◆ clm4rm_query_result()

int clm4rm_query_result ( cl_mem  result_buffer,
cl_command_queue  queue,
clm4rm_conditions cond 
)

examine the result of a previous call to clm4rm_query_diagonal

Parameters
result_bufferbuffer that holds one integer. Was returned by clm4rm_query_diagonal. Will be released.
queueOpenCL command queue
condkeeps track of pre-conditions and newly created post-conditions
Returns
the column/row of the first non-zero entry, or -1 if all entries are zero.

Definition at line 94 of file clm4rm_bitwise.cpp.

◆ clm4rm_stack()

void clm4rm_stack ( clmatrix_t C,
clmatrix_t A,
clmatrix_t B,
cl_command_queue  queue,
clm4rm_conditions cond 
)

concatenate two matrices

Deprecated:
not used anymore

Definition at line 123 of file clm4rm_bitwise.cpp.

Variable Documentation

◆ clm4rm_and_kernel

cl_kernel clm4rm_and_kernel

Definition at line 63 of file clm4rm.cpp.

◆ clm4rm_copy_kernel

cl_kernel clm4rm_copy_kernel

Definition at line 65 of file clm4rm.cpp.

◆ clm4rm_or_kernel

cl_kernel clm4rm_or_kernel

Definition at line 64 of file clm4rm.cpp.

◆ clm4rm_query_diagonal_kernel

cl_kernel clm4rm_query_diagonal_kernel

Definition at line 66 of file clm4rm.cpp.