next up previous contents
Next: 2.4 Example Up: 2.3 Linear Algebra Objects Previous: 2.3.4 Extracting and setting

2.3.5 Initializing object data

   

A particularly useful operation involves the initialization of all entries in a linear algebra object to a given value. In its most general form, this is accomplished through a call to


 
int PLA_Obj_set  		 ( 		 PLA_Obj   		 obj, 		 MPI_Datatype 		 datatype,

void *value )

figure2809

 
IN/OUT 		 obj 		  tex2html_wrap13133 

IN datatype tex2html_wrap13135

IN value tex2html_wrap13137


The value to be used is given at the address value and is of MPI data type datatype. We pass in the address since this allows one to pass a value of any data type using the same parameter. The data type of the value need not match that of the linear algebra object. PLAPACK makes the logical casting of the value, when possible.

A number of special cases are common enough that they warrant their own calls. These include the case of setting all entries to zero, one, or negative (minus) one:


 
int PLA_Obj_set_to_zero  		 ( 		 PLA_Obj   		 obj )

int PLA_Obj_set_to_one ( PLA_Obj obj )

int PLA_Obj_set_to_minus_one

( PLA_Obj obj )

figure2821

 
IN/OUT 		 obj 		  tex2html_wrap13139  



next up previous contents
Next: 2.4 Example Up: 2.3 Linear Algebra Objects Previous: 2.3.4 Extracting and setting

rvdg@cs.utexas.edu