Click here to Skip to main content
15,894,955 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: QR CODE IN ARABIC Pin
Member 1054250021-Mar-18 6:59
Member 1054250021-Mar-18 6:59 
GeneralRe: QR CODE IN ARABIC Pin
leon de boer21-Mar-18 16:44
leon de boer21-Mar-18 16:44 
AnswerRe: QR CODE IN ARABIC Pin
Daniel Pfeffer21-Mar-18 9:37
professionalDaniel Pfeffer21-Mar-18 9:37 
GeneralRe: QR CODE IN ARABIC Pin
Member 1054250021-Mar-18 11:13
Member 1054250021-Mar-18 11:13 
GeneralRe: QR CODE IN ARABIC Pin
leon de boer21-Mar-18 16:35
leon de boer21-Mar-18 16:35 
GeneralRe: QR CODE IN ARABIC Pin
Daniel Pfeffer21-Mar-18 20:24
professionalDaniel Pfeffer21-Mar-18 20:24 
QuestionWinTECH opc client Pin
D.Manivelan20-Mar-18 21:28
D.Manivelan20-Mar-18 21:28 
AnswerRe: WinTECH opc client Pin
Victor Nijegorodov20-Mar-18 22:26
Victor Nijegorodov20-Mar-18 22:26 
AnswerRe: WinTECH opc client Pin
Richard MacCutchan20-Mar-18 22:43
mveRichard MacCutchan20-Mar-18 22:43 
Questionporting _beginthreadex from VS2005 to VS2017 Pin
jimNLX20-Mar-18 5:13
jimNLX20-Mar-18 5:13 
AnswerRe: porting _beginthreadex from VS2005 to VS2017 Pin
Jochen Arndt20-Mar-18 5:43
professionalJochen Arndt20-Mar-18 5:43 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX6-Apr-18 9:03
jimNLX6-Apr-18 9:03 
AnswerRe: porting _beginthreadex from VS2005 to VS2017 Pin
leon de boer20-Mar-18 8:00
leon de boer20-Mar-18 8:00 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX6-Apr-18 9:06
jimNLX6-Apr-18 9:06 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX11-Apr-18 9:03
jimNLX11-Apr-18 9:03 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
leon de boer17-Apr-18 21:45
leon de boer17-Apr-18 21:45 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX18-Apr-18 3:49
jimNLX18-Apr-18 3:49 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
leon de boer18-Apr-18 15:27
leon de boer18-Apr-18 15:27 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX9-May-18 9:18
jimNLX9-May-18 9:18 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
leon de boer9-May-18 16:11
leon de boer9-May-18 16:11 
GeneralRe: porting _beginthreadex from VS2005 to VS2017 Pin
jimNLX11-May-18 6:23
jimNLX11-May-18 6:23 
QuestionOpenCL bit-matrix multiplication (implementing tiling in local memory) Pin
User 1370349219-Mar-18 19:19
User 1370349219-Mar-18 19:19 
AnswerRe: OpenCL bit-matrix multiplication (implementing tiling in local memory) Pin
leon de boer19-Mar-18 23:47
leon de boer19-Mar-18 23:47 
GeneralRe: OpenCL bit-matrix multiplication (implementing tiling in local memory) Pin
User 1370349220-Mar-18 1:02
User 1370349220-Mar-18 1:02 
GeneralRe: OpenCL bit-matrix multiplication (implementing tiling in local memory) Pin
leon de boer20-Mar-18 3:12
leon de boer20-Mar-18 3:12 
It isn't valid C++ code ... Are you seriously telling me you can compile these 3 lines of code on Visual Studio?
C++
unsigned long long A = new unsigned long long[n*n/64]; // stores bits in 64-bit integers
unsigned long long B = new unsigned long long[n*n/64]; // for example, one row consists of 256 bits and uses 4x64-bit integers to store them
int C  = new int[n*n];

I don't care what n is I actually don't know a C++ compiler that will take that.

Visual Studio 2017 will report it correctly that it's missing an all important "*" making it a pointer
Error (active)	E0144	a value of type "unsigned long long *" cannot be used to initialize an entity of type "unsigned long long"	
Error (active)	E0144	a value of type "unsigned long long *" cannot be used to initialize an entity of type "unsigned long long"	
Error (active)	E0144	a value of type "int *" cannot be used to initialize an entity of type "int"

Hence I am still favouring you have typed it wrong because you would be complaining of those errors and I can't believe a lecturer would write that.
Your link isn't correct so I can't look at what I suspect is the real code.

Are you allowed to change BitProduct function to
__kernel void BitProduct(const int N, const __global unsigned long long* A, const __global unsigned long long* B, __global int* C)

That might give you a fighting chance other than that I am pretty sure you are wasting your time and go talk to lecturer.
In vino veritas


modified 20-Mar-18 14:10pm.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.