openGPMP
Open Source Mathematics Package
Functions
_gpu_mtx.h File Reference

Go to the source code of this file.

Functions

void init_vec (int *vec, int len, int set_one_flag)
 GPU kernel acceleration utility/helper functions. More...
 

Detailed Description

Definitions for OpenCL GPU kernel function helpers

Definition in file _gpu_mtx.h.

Function Documentation

◆ init_vec()

void init_vec ( int *  vec,
int  len,
int  set_one_flag 
)

GPU kernel acceleration utility/helper functions.

Definition at line 56 of file _gpu_mtx_add.c.

56  {
57  for (int i = 0; i < len; i++) {
58  if (set_one_flag)
59  vec[i] = 1;
60  else
61  vec[i] = 0;
62  }
63 }

Referenced by accl_mtx_exec().