![]() ![]() You will first be given an integer N which is the number of strings thatįollows. Use line breaks to start a new line.Ĭlick away from text box to display text. ĭocument.getElementById('showingPlace').innerHTML = text Įnter any text. Accepts any input in the textarea box and uses line breaks to start a new column. Again, run this at your own risk.ĬSS solution using JavaScript to wrap the text in tags. I don't know if it's as a result of running my code or a coincidence, but I'm willing to wager it's the former. Update: After a reboot, my desktop environment and some NVIDIA drivers were broken. Free host and device allocation and exit Copy transposed string from device to host and printĬudaMemcpy(h_lines_out, d_lines_out, maxlen * (nlines 1) * sizeof(char),įor (i = 0 i < maxlen * (nlines 1) i = nlines 1) Memset(h_lines_out, ' ', maxlen * (nlines 1) * sizeof(char)) įor (i = 0 i >(d_lines_out, d_lines, nlines, maxlen) Printf("Error allocating memory on host (h_lines_out)\n") H_lines_out = (char *) malloc(maxlen * (nlines 1) * sizeof(char)) Lineno = blockIdx.x * blockDim.x threadIdx.x ĬudaMemcpy(d_lines, h_lines, LINEBUF * nlines * sizeof(char), _global_ void transpose(char * d_out, char * d_in, I give up, but I'll still post the code for "academic purposes", as they say: #include Oh, and it didn't actually print a result. Long story short, I ended up doing so much pointer arithmetic that I confused myself, corrupted some memory, and now my laptop is idling on 70✬-80✬ (usually it's at 30✬-40✬). Not that I'd gain much in speedup anyway, since I read the data sequentially either way, but whatever. So I tried to do this in CUDA, parallelizing the transpose, just because. ![]()
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2023
Categories |