Thanks for your prompt reply, Stan.
Would you please explain how this magma_int_t is mapped to cudablas function? As far as I can understand, cudablas functions do not accept long ints as arguments, so you would have to cast them to ints. This is not a limitation of cuda per se, perhaps, but it is a limitation of using cudablas. If a number is too large to fit in an int, how is this handled? truncation? it is checked and an error is issued? In those codes, long ints are used exactly to be able to handle array indices which will not fit into an int, so it should either fall back on the cpu implementation or fail gracefully.